@skyservice-developers/vue-dev-kit 2.19.0 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vue-dev-kit.cjs +1 -1
- package/dist/vue-dev-kit.js +1 -1
- package/package.json +1 -1
package/dist/vue-dev-kit.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),ne=require("./money-dyX9wNiC.cjs");require("ua-parser-js");const Af=require("@tanstack/vue-virtual"),Xe=require("@tanstack/vue-table"),ee=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},vg={props:{to:{type:String,default:"body"}}};function gg(e,t,n,a,r,o){return i.openBlock(),i.createBlock(i.Teleport,{to:n.to},[i.renderSlot(e.$slots,"default")],8,["to"])}const Pf=ee(vg,[["render",gg]]),yg={class:"sky-dialog-overlay"},_g={key:0,class:"sky-dialog-subtitle"},kg=["title"],bg={key:0,class:"sky-dialog-header-actions"},Cg={key:0,class:"sky-dialog-swipe-area"},wg={key:1,class:"sky-dialog-footer"},Eg={__name:"DialogModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},zIndex:{type:[Number,String],default:null},closeText:{type:String,default:"Закрити"},closeOnEsc:{type:Boolean,default:!0},hasButtons:{type:Boolean,default:null}},emits:["update:modelValue","close","save"],setup(e,{emit:t}){const n=i.useSlots(),a=e,r=t,o=i.ref(null),s=i.ref(null),l=i.ref(0),u=i.computed(()=>{try{return ne.isIosWebview()}catch{return!1}}),c=i.computed(()=>{try{return ne.isAndroidWebview()}catch{return!1}}),d=i.computed(()=>!!a.subtitle||!!n.subtitle),f=i.computed(()=>a.hasButtons!==null?a.hasButtons:!!n.buttons),m=()=>{r("update:modelValue",!1),r("close")},h=p=>{p.key==="Escape"&&a.closeOnEsc&&a.modelValue&&m(),p.key==="Enter"&&a.modelValue&&r("save")},g=p=>{p.touches[0].clientX<35&&(l.value=p.touches[0].clientX)},y=p=>{l.value>0&&l.value<35&&p.changedTouches[0].clientX-l.value>50&&m(),l.value=0},_=()=>{if(!(!c.value||!o.value))try{if(typeof Android<"u"&&Android.getDisplayCutoutTop){const p=Android.getDisplayCutoutTop();if(p&&window.devicePixelRatio>1){const v=p/window.devicePixelRatio;o.value.style.paddingTop=v+"px"}}}catch{}};return i.watch(()=>a.modelValue,p=>{p?(document.body.style.overflow="hidden",i.nextTick(()=>{_()})):document.body.style.overflow=""}),i.onMounted(()=>{document.addEventListener("keydown",h),window.addEventListener("resize",_)}),i.onUnmounted(()=>{document.removeEventListener("keydown",h),window.removeEventListener("resize",_),document.body.style.overflow=""}),(p,v)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[e.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,class:"sky-dialogbox sky-dialogbox-classic",style:i.normalizeStyle([e.zIndex?{"z-index":e.zIndex}:null])},[i.createElementVNode("div",yg,[i.createElementVNode("div",{ref_key:"dialogContent",ref:o,class:"sky-dialog-content"},[i.createElementVNode("div",{class:i.normalizeClass(["sky-dialog-title",{"sky-dialog-title-with-subtitle":d.value,"sky-dialog-title-with-actions":p.$slots["header-actions"]}])},[i.renderSlot(p.$slots,"title",{},()=>[i.createTextVNode(i.toDisplayString(e.title),1)],!0),i.renderSlot(p.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("span",_g,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)],2),i.createElementVNode("button",{class:"sky-dialog-close",title:e.closeText,onClick:m},[...v[0]||(v[0]=[i.createElementVNode("svg",{viewBox:"0 0 16 16",width:"16",height:"16"},[i.createElementVNode("line",{x1:"1",y1:"15",x2:"15",y2:"1",stroke:"currentColor","stroke-width":"2"}),i.createElementVNode("line",{x1:"1",y1:"1",x2:"15",y2:"15",stroke:"currentColor","stroke-width":"2"})],-1)])],8,kg),p.$slots["header-actions"]?(i.openBlock(),i.createElementBlock("div",bg,[i.renderSlot(p.$slots,"header-actions",{},void 0,!0)])):i.createCommentVNode("",!0),v[1]||(v[1]=i.createElementVNode("div",{class:"sky-dialog-clearfix"},null,-1)),i.createElementVNode("div",{ref_key:"dialogPaper",ref:s,class:i.normalizeClass(["sky-dialog-paper",{"sky-dialog-paper-no-footer":!f.value}]),onTouchstart:g,onTouchend:y},[u.value?(i.openBlock(),i.createElementBlock("div",Cg)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"default",{},void 0,!0)],34),v[2]||(v[2]=i.createElementVNode("div",null,null,-1)),f.value?(i.openBlock(),i.createElementBlock("div",wg,[i.renderSlot(p.$slots,"buttons",{},void 0,!0)])):i.createCommentVNode("",!0)],512)])],4)):i.createCommentVNode("",!0)]))}},Fs=ee(Eg,[["__scopeId","data-v-1a8b2da7"]]),Sg={class:"sky-dialog-overlay"},Tg={class:"sky-dialog-header"},Dg=["title"],Og={width:"15",height:"15",viewBox:"0 0 451.847 451.847",style:{transform:"rotate(90deg)"}},Vg={key:0,class:"sky-dialog-subtitle"},$g={key:0,class:"sky-dialog-header-actions"},xg={key:0,class:"sky-dialog-swipe-area"},Ig={key:0,class:"sky-dialog-footer"},Rg={__name:"DialogNext",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},zIndex:{type:[Number,String],default:null},closeText:{type:String,default:"Назад"},closeOnEsc:{type:Boolean,default:!0},hasButtons:{type:Boolean,default:null}},emits:["update:modelValue","close","save"],setup(e,{emit:t}){const n=i.useSlots(),a=e,r=t,o=i.ref(null),s=i.ref(null),l=i.ref(0),u=i.computed(()=>{try{return ne.isIosWebview()}catch{return!1}}),c=i.computed(()=>{try{return ne.isAndroidWebview()}catch{return!1}}),d=i.computed(()=>!!a.subtitle||!!n.subtitle),f=i.computed(()=>a.hasButtons!==null?a.hasButtons:!!n.buttons),m=()=>{r("update:modelValue",!1),r("close")},h=p=>{p.key==="Escape"&&a.closeOnEsc&&a.modelValue&&m(),p.key==="Enter"&&a.modelValue&&r("save")},g=p=>{p.touches[0].clientX<35&&(l.value=p.touches[0].clientX)},y=p=>{l.value>0&&l.value<35&&p.changedTouches[0].clientX-l.value>50&&m(),l.value=0},_=()=>{if(!(!c.value||!o.value))try{if(typeof Android<"u"&&Android.getDisplayCutoutTop){const p=Android.getDisplayCutoutTop();if(p&&window.devicePixelRatio>1){const v=p/window.devicePixelRatio;o.value.style.paddingTop=v+"px"}}}catch{}};return i.watch(()=>a.modelValue,p=>{p?(document.body.style.overflow="hidden",i.nextTick(()=>{_()})):document.body.style.overflow=""}),i.onMounted(()=>{document.addEventListener("keydown",h),window.addEventListener("resize",_)}),i.onUnmounted(()=>{document.removeEventListener("keydown",h),window.removeEventListener("resize",_),document.body.style.overflow=""}),(p,v)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[e.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,class:"sky-dialogbox sky-dialogbox-next",style:i.normalizeStyle([e.zIndex?{"z-index":e.zIndex}:null])},[i.createElementVNode("div",Sg,[i.createElementVNode("div",{ref_key:"dialogContent",ref:o,class:"sky-dialog-content"},[i.createElementVNode("div",Tg,[i.createElementVNode("button",{class:"sky-dialog-back",title:e.closeText,onClick:m},[(i.openBlock(),i.createElementBlock("svg",Og,[...v[0]||(v[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])]))],8,Dg),i.createElementVNode("div",{class:i.normalizeClass(["sky-dialog-title",{"sky-dialog-title-with-subtitle":d.value}])},[i.renderSlot(p.$slots,"title",{},()=>[i.createTextVNode(i.toDisplayString(e.title),1)],!0),i.renderSlot(p.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("span",Vg,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)],2),p.$slots["header-actions"]?(i.openBlock(),i.createElementBlock("div",$g,[i.renderSlot(p.$slots,"header-actions",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",{ref_key:"dialogPaper",ref:s,class:i.normalizeClass(["sky-dialog-paper",{"sky-dialog-paper-no-footer":!f.value}]),onTouchstart:g,onTouchend:y},[u.value?(i.openBlock(),i.createElementBlock("div",xg)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"default",{},void 0,!0)],34),f.value?(i.openBlock(),i.createElementBlock("div",Ig,[i.renderSlot(p.$slots,"buttons",{},void 0,!0)])):i.createCommentVNode("",!0)],512)])],4)):i.createCommentVNode("",!0)]))}},js=ee(Rg,[["__scopeId","data-v-4a14198a"]]),Bg={__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},zIndex:{type:[Number,String],default:null},closeText:{type:String,default:""},closeOnEsc:{type:Boolean,default:!0},mode:{type:String,default:null,validator:e=>[null,"next","classic"].includes(e)}},emits:["update:modelValue","close","save"],setup(e,{emit:t}){const n=e,a=t,r=i.computed({get:()=>n.modelValue,set:l=>a("update:modelValue",l)}),o=i.ref(!0);i.onMounted(()=>{try{new URLSearchParams(window.location.search).get("rocketMode")==="false"?o.value=!1:o.value=!0}catch{o.value=!0}});const s=i.computed(()=>n.mode==="next"?js:n.mode==="classic"?Fs:o.value?js:Fs);return(l,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.value),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),title:e.title,subtitle:e.subtitle,"z-index":e.zIndex,"close-text":e.closeText,"close-on-esc":e.closeOnEsc,"has-buttons":!!l.$slots.buttons,onClose:u[1]||(u[1]=c=>l.$emit("close")),onSave:u[2]||(u[2]=c=>l.$emit("save"))},i.createSlots({_:2},[i.renderList(l.$slots,(c,d)=>({name:d,fn:i.withCtx(f=>[i.renderSlot(l.$slots,d,i.normalizeProps(i.guardReactiveProps(f||{})))])}))]),1064,["modelValue","title","subtitle","z-index","close-text","close-on-esc","has-buttons"]))}};Date.prototype.getWeekNumber=function(e){if(!e){let n=(this.getDay()+6)%7;this.setDate(this.getDate()-n+3)}let t=new Date(this.getFullYear(),0,4);return Math.ceil(((this-t)/864e5+t.getDay()+1)/7)};class Ng{constructor(t,n,a,r){this.sundayStart=t,this.leftAndRightDays=n,this.dateFormat=a,this.dayNames=r}formatDate(t){let n=t.getDate(),a=t.getMonth()+1,r=t.getFullYear(),o=this.dateFormat.replace("dd",n.toString());return o=o.replace("mm",a.toString()),o=o.replace("yyyy",r.toString()),o.split(" ")[0]}getDateFromFormat(t){let n=this.dateFormat.split(" ")[0];if(t=t.split(" ")[0],n.indexOf("/")!==-1)n=n.split("/"),t=t.split("/");else if(n.indexOf("-")!==-1)n=n.split("-"),t=t.split("-");else if(n.indexOf(".")!==-1)n=n.split("."),t=t.split(".");else throw new Error("Your date format not valid. Please read documentation.!");let a=n.indexOf("yyyy"),r=n.indexOf("mm"),o=n.indexOf("dd");return new Date(t[a],t[r]-1,t[o])}checkValidDate(t){return t=this.getDateFromFormat(t),t!="Invalid Date"}getWeeksInMonth(t,n){let a=[],r=new Date(n,t,1),o=new Date(n,t+1,0),s=o.getDate(),l=1,u=this.sundayStart?7-r.getDay():r.getDay()===0?1:7-r.getDay()+1;for(;l<=s;)a.push({year:n,start:l,end:u,number:new Date(n,t,l).getWeekNumber(this.sundayStart),days:[]}),l=u+1,u=u+7,u>s&&(u=s);return{weeks:a,month:o.getMonth(),year:o.getFullYear()}}getLeftMonthDays(t,n){let r=this.getWeeksInMonth(t,n).weeks[0],o=r.end-r.start+1,s=[],l=0,u=0;if(o!==7){let c=this.getWeeksInMonth(t-1,n),d=c.weeks[c.weeks.length-1];for(let f=d.start;f<=d.end;f++)s.push(f);u=c.month,l=c.year}return{days:s.reverse(),month:u,year:l}}getRightMonthDays(t,n){let a=this.getWeeksInMonth(t,n),r=a.weeks[a.weeks.length-1],o=r.end-r.start+1,s=[],l=0,u=0;if(o!==7){let c=this.getWeeksInMonth(t+1,n),d=c.weeks[0];for(let f=d.start;f<=d.end;f++)s.push(f);u=c.month,l=c.year}return{days:s,month:u,year:l}}getFinalizedWeeks(t,n){let a=this.getWeeksInMonth(t,n),r=this.getLeftMonthDays(t,n),o=this.getRightMonthDays(t,n);return a.weeks.forEach(s=>{for(let l=s.start;l<=s.end;l++)s.days.push({day:l,month:a.month,year:a.year,hide:!1,hideLeftAndRightDays:!1})}),r.days.length&&r.days.forEach(s=>{let l=!1;this.leftAndRightDays||(s="",l=!0),a.weeks[0].days.unshift({day:s,month:r.month,year:r.year,hide:!0,hideLeftAndRightDays:l})}),o.days.length&&o.days.forEach(s=>{let l=!1;this.leftAndRightDays||(s="",l=!0),a.weeks[a.weeks.length-1].days.push({day:s,month:o.month,year:o.year,hide:!0,hideLeftAndRightDays:l})}),a.weeks.forEach(s=>{delete s.year}),a.weeks}mask(t){let n=this.getDateFromFormat(t).getDate().toString().length,a=this.getDateFromFormat(t).getMonth(),r="00";n===1&&(r="0");let o="00";a+1<=9&&(o="0");let s=this.dateFormat.replace("dd",r).replace("mm",o).replace("yyyy","0000"),l=/[0\*]/,u=/[0-9]/,c="";for(let d=0,f=0;f<s.length&&!(f>=t.length||s[f]==="0"&&t[d].match(u)==null);){for(;s[f].match(l)==null&&t[d]!==s[f];)c+=s[f++];c+=t[d++],f++}return c}}const qe=()=>{},Ag={props:{activeHours:{type:Array,required:!1},activeMinutes:{type:Array,required:!1},borderColor:{type:String,default:""},displayTimeInput:{type:Boolean,default:!1},configs:{type:Object,default:()=>{}},sundayStart:{type:Boolean,default:qe},placeholder:{type:[String,Boolean],default:qe},dateFormat:{type:String,validator(e){let t=e.split(" ")[1];return t?!!~["HH:MM","HH:mm","hh:MM","hh:mm"].indexOf(t):!0}},canClearRange:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:qe},isSeparately:{type:Boolean,default:qe},isDatePicker:{type:Boolean,default:qe},isMultipleDatePicker:{type:Boolean,default:qe},isMultipleDateRange:{type:Boolean,default:qe},isDateRange:{type:Boolean,default:qe},withTimePicker:{type:Boolean,default:qe},calendarsCount:{type:Number},isModal:{type:Boolean,default:qe},isTypeable:{type:Boolean,default:qe},changeMonthFunction:{type:Boolean,default:qe},changeYearFunction:{type:Boolean,default:qe},changeYearStep:{type:Number,default:()=>3},changeMonthStep:{type:Number,default:()=>1},newCurrentDate:{type:Date},markedDates:{type:Array,default:()=>[]},markedDateRange:{type:[Object,Array]},disabledDayNames:{type:Array},disabledDates:{type:Array,default:()=>[]},enabledDates:{type:Array,default:()=>[]},limits:{type:[Object,Boolean],default:qe},minSelDays:{type:[Number,Boolean],default:qe},maxSelDays:{type:[Number,Boolean],default:qe},dayNames:{type:Array},monthNames:{type:Array},shortMonthNames:{type:Array},showWeekNumbers:{type:Boolean,default:qe},value:{type:Object},transition:{type:Boolean,default:qe},hiddenElements:{type:Array},isAutoCloseable:{type:Boolean,default:void 0},isDark:{type:Boolean,default:void 0},isLayoutExpandable:{type:Boolean,default:void 0},titlePosition:{type:String,default:"center"},arrowsPosition:{type:String,default:"space-between"},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{popoverElement:"",defaultDateFormat:{date:!1,dateTime:!1,hour:"00",minute:"00"},hoveredObject:null,calendar:{currentDate:new Date,selectedDate:!1,selectedDateTime:!1,selectedHour:"00",selectedMinute:"00",selectedDatesItem:"",selectedDates:[],dateRange:{start:"",end:""},multipleDateRange:[]},transitionPrefix:"left",showCalendar:!0,showMonthPicker:!1,showYearPicker:!1,showTimePicker:!1,allowPreDate:!0,allowNextDate:!0,listCalendars:[],fConfigs:{sundayStart:!1,placeholder:!1,dateFormat:"dd/mm/yyyy hh:MM",isMultipleDateRange:!1,isDatePicker:!1,isMultipleDatePicker:!1,isDateRange:!1,withTimePicker:!1,isMultiple:!1,calendarsCount:1,isSeparately:!1,isModal:!1,isTypeable:!1,changeMonthFunction:!1,changeYearFunction:!1,changeYearStep:3,changeMonthStep:1,markedDates:[],markedDateRange:{start:!1,end:!1},limits:!1,minSelDays:!1,maxSelDays:!1,disabledDates:[],enabledDates:[],disabledDayNames:[],dayNames:["Mo","Tu","We","Th","Fr","Sa","Su"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],showWeekNumbers:!1,transition:!0,hiddenElements:[],isAutoCloseable:!1,isDark:!1,isLayoutExpandable:!1,titlePosition:"center",arrowsPosition:"space-between"}}}},Pg={name:"TimePicker",data(){return{startDateActive:!0,currentSelectedDate:""}},props:{height:{type:Number,required:!0},hours:{type:Array,default:function(){return[...Array(24).keys()]},required:!1},minutes:{type:Array,default:function(){return[...Array(60).keys()]},required:!1}},watch:{startDateActive:function(){this.setScrollPosition()}},computed:{getCurrentDate(){return this.currentSelectedDate.date},getCurrentDateTime(){return this.currentSelectedDate.dateTime}},created(){let e=this.$parent.calendar.selectedDates;this.currentSelectedDate=e[e.length-1]},mounted(){let e=this.$parent.calendar.dateRange.start.split(" ")[0],t=this.$parent.calendar.dateRange.end.split(" ")[0];e&&this.$parent.helpCalendar.getDateFromFormat(e)<this.$parent.helpCalendar.getDateFromFormat(t)?this.startDateActive=!1:this.startDateActive=!0,this.setSelectedDateTime(),this.setStyles()},methods:{formatTime(e){return e<10?"0"+e:e},close(){this.$parent.showTimePicker=!1},addMinuteHour(e,t,n){let a="";return a+=t.split(" ")[0],e=="hour"?(a+=" "+n+":",a+=t.split(" ")[1].split(":")[1]):(a+=" "+t.split(" ")[1].split(":")[0]+":",a+=n),a},changeHour(e){if(this.$parent.fConfigs.isDateRange)this.checkStartDate()?this.$parent.calendar.dateRange.start=this.addMinuteHour("hour",this.$parent.calendar.dateRange.start,e):this.$parent.calendar.dateRange.end=this.addMinuteHour("hour",this.$parent.calendar.dateRange.end,e);else if(this.$parent.fConfigs.isMultipleDatePicker){let t=this.$parent.calendar.selectedDates.find(n=>n.date===this.getCurrentDate);t.hour=e}else this.$parent.calendar.selectedHour=e;this.setSelectedDateTime(),this.setScrollPosition()},changeMinute(e){if(this.$parent.fConfigs.isDateRange)this.checkStartDate()?this.$parent.calendar.dateRange.start=this.addMinuteHour("minute",this.$parent.calendar.dateRange.start,e):this.$parent.calendar.dateRange.end=this.addMinuteHour("minute",this.$parent.calendar.dateRange.end,e);else if(this.$parent.fConfigs.isMultipleDatePicker){let t=this.$parent.calendar.selectedDates.find(n=>n.date===this.getCurrentDate);t.minute=e}else this.$parent.calendar.selectedMinute=e;this.setSelectedDateTime(),this.setScrollPosition()},setSelectedDateTime(){if(this.$parent.fConfigs.isDatePicker)this.$parent.calendar.selectedDateTime=this.$parent.calendar.selectedDate+" "+this.$parent.calendar.selectedHour+":"+this.$parent.calendar.selectedMinute;else if(this.$parent.fConfigs.isMultipleDatePicker){let e=this.$parent.calendar.selectedDates.find(t=>t.date===this.getCurrentDate);e.dateTime=e.date+" "+e.hour+":"+e.minute}},checkStartDate(){return this.startDateActive},checkHourActiveClass(e){let t;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?t=this.$parent.calendar.dateRange.start.split(" ")[1].split(":")[0]:t=this.$parent.calendar.dateRange.end.split(" ")[1].split(":")[0]:this.$parent.fConfigs.isMultipleDatePicker?t=this.$parent.calendar.selectedDates.find(n=>n.date===this.getCurrentDate).hour:t=this.$parent.calendar.selectedHour,this.hours.length&&!this.hours.some(n=>n==t)&&(t=this.hours[0]),t==this.formatTime(e)},checkMinuteActiveClass(e){let t;return this.$parent.fConfigs.isDateRange?this.checkStartDate()?t=this.$parent.calendar.dateRange.start.split(":")[1]:t=this.$parent.calendar.dateRange.end.split(":")[1]:this.$parent.fConfigs.isMultipleDatePicker?t=this.$parent.calendar.selectedDates.find(n=>n.date===this.getCurrentDate).minute:t=this.$parent.calendar.selectedMinute,this.minutes.length&&!this.minutes.some(n=>n==t)&&(t=this.minutes[0]),t==this.formatTime(e)},setStyles(){this.setScrollPosition();let e=+this.height-35-85;document.getElementsByClassName("vfc-time-picker__list")[0].style.height=e+"px",document.getElementsByClassName("vfc-time-picker__list")[1].style.height=e+"px"},setScrollPosition(){let e=this.$parent.$refs.mainContainer;this.$nextTick(function(){const t=this.$refs.hourList.querySelector(".vfc-time-picker__item--selected"),n=this.$refs.minuteList.querySelector(".vfc-time-picker__item--selected");this.$refs.hourList.scrollTop=t?t.offsetTop-e.clientHeight/2:0,this.$refs.minuteList.scrollTop=n?n.offsetTop-e.clientHeight/2:0})}}},Mg={class:"vfc-time-picker-container"},Lg={class:"vfc-modal-time-mechanic"},Fg={id:"time-line",class:"vfc-modal-time-line"},jg={class:"vfc-time-picker"},Ug={class:"vfc-time-picker__list vfc-time-picker__list--hours",ref:"hourList"},zg=["onClick"],Hg={class:"vfc-time-picker__list vfc-time-picker__list--minutes",ref:"minuteList"},Wg=["onClick"];function Yg(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",Mg,[i.createElementVNode("div",{class:"vfc-close",onClick:t[0]||(t[0]=s=>o.close())}),i.createElementVNode("div",Lg,[i.createElementVNode("div",Fg,[i.createElementVNode("span",null,[e.$parent.fConfigs.isDateRange?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",{onClick:t[1]||(t[1]=s=>r.startDateActive=!0),class:i.normalizeClass({"vfc-active":r.startDateActive})},i.toDisplayString(e.$parent.calendar.dateRange.start),3),e.$parent.calendar.dateRange.end?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t[3]||(t[3]=i.createElementVNode("span",null,"-",-1)),i.createElementVNode("span",{onClick:t[2]||(t[2]=s=>r.startDateActive=!1),class:i.normalizeClass({"vfc-active":!r.startDateActive})},i.toDisplayString(e.$parent.calendar.dateRange.end),3)],64)):i.createCommentVNode("",!0)],64)):e.$parent.fConfigs.isMultipleDatePicker?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(o.getCurrentDateTime),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(e.$parent.calendar.selectedDateTime),1)],64))])]),t[4]||(t[4]=i.createElementVNode("div",{class:"titles"},[i.createElementVNode("div",null,"Hour"),i.createElementVNode("div",null,"Minute")],-1)),i.createElementVNode("div",jg,[i.createElementVNode("div",Ug,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.hours,s=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-time-picker__item",{"vfc-time-picker__item--selected":o.checkHourActiveClass(s)}]),key:s,onClick:l=>o.changeHour(o.formatTime(s))},i.toDisplayString(o.formatTime(s)),11,zg))),128))],512),i.createElementVNode("div",Hg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.minutes,s=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-time-picker__item",{"vfc-time-picker__item--selected":o.checkMinuteActiveClass(s)}]),key:s,onClick:l=>o.changeMinute(o.formatTime(s))},i.toDisplayString(o.formatTime(s)),11,Wg))),128))],512)])])])}const Kg=ee(Pg,[["render",Yg],["__scopeId","data-v-c8a44ad2"]]),Gg={name:"Arrows",props:{fConfigs:{type:Object,required:!0},allowPreDate:{type:Boolean,required:!0},allowNextDate:{type:Boolean,required:!0},calendarKey:{type:Number,default:0},isMultiple:{type:Boolean,required:!0}},computed:{oneArrows(){return!this.fConfigs.isSeparately&&!this.isMultiple},manyArrows(){return this.fConfigs.isSeparately&&this.isMultiple}}};function qg(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",null,[o.oneArrows||o.manyArrows?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vfc-separately-navigation-buttons","vfc-"+n.fConfigs.arrowsPosition])},[i.createElementVNode("div",{onClick:t[0]||(t[0]=s=>e.$parent.PreMonth(o.oneArrows?0:n.calendarKey)),class:i.normalizeClass({"vfc-cursor-pointer":n.allowPreDate})},[i.renderSlot(e.$slots,"navigationArrowLeft",{},()=>[i.createElementVNode("div",{class:i.normalizeClass(["vfc-arrow-left",{"vfc-disabled":!n.allowPreDate}])},null,2)])],2),i.createElementVNode("div",{onClick:t[1]||(t[1]=s=>e.$parent.NextMonth(o.oneArrows?0:n.calendarKey)),class:i.normalizeClass({"vfc-cursor-pointer":n.allowNextDate})},[i.renderSlot(e.$slots,"navigationArrowRight",{},()=>[i.createElementVNode("div",{class:i.normalizeClass(["vfc-arrow-right",{"vfc-disabled":!n.allowNextDate}])},null,2)])],2)],2)):i.createCommentVNode("",!0)])}const Xg=ee(Gg,[["render",qg]]),Zg={name:"WeekNumbers",props:{number:{tyoe:Number,required:!0},borderColor:{type:String,default:""}}},Jg={class:"vfc-span-day"};function Qg(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",{class:"vfc-day vfc-week-number",style:i.normalizeStyle({borderRightColor:n.borderColor})},[i.createElementVNode("span",Jg,i.toDisplayString(n.number),1)],4)}const e1=ee(Zg,[["render",Qg]]),t1={name:"Day",props:{day_key:{type:Number,required:!0},week:{type:Object,required:!0},day:{type:Object,required:!0},helpCalendar:{type:Object,required:!0},fConfigs:{type:Object,required:!0},calendar:{type:Object,required:!0},alwaysUseDefaultClasses:{type:Boolean,default:!1}},data(){return{toolTip:!1,onNumber:!1}},computed:{startActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const e=this.day.date.inRange(this.calendar.multipleDateRange),t=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!t)return e;const n=~this.calendar.multipleDateRange.map(r=>r.start).indexOf(this.day.date),a=~this.calendar.multipleDateRange.map(r=>r.end).indexOf(this.day.date);return n===a&&a?e:n&&~n>-1&&this.calendar.multipleDateRange[~n].end||!t.start&&!t.end?n||e:(this.day.isDateRangeStart||this.day.isMouseToLeft)&&!this.day.hideLeftAndRightDays||e},endActive(){if(!this.fConfigs.isMultipleDateRange)return(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays;"".inRange||this.inRangeInit();const e=this.day.date.inRange(this.calendar.multipleDateRange),t=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!t)return e;const n=~this.calendar.multipleDateRange.map(r=>r.start).indexOf(this.day.date),a=~this.calendar.multipleDateRange.map(r=>r.end).indexOf(this.day.date);return n===a&&a?e:a?!0:!t.start&&!t.end?t.start===t.end?!1:a:(this.day.isDateRangeEnd||this.day.isMouseToRight)&&!this.day.hideLeftAndRightDays||e},numberShow(){return this.fConfigs.isMultipleDateRange?!!(~this.calendar.multipleDateRange.map(t=>t.end).indexOf(this.day.date)||~this.calendar.multipleDateRange.map(t=>t.start).indexOf(this.day.date)):!1},timesShow(){let e=this.calendar.multipleDateRange?~this.calendar.multipleDateRange.map(t=>t.end).indexOf(this.day.date):-1;return this.fConfigs.isMultipleDateRange&&e},getDaysNumber(){const e=this.calendar.multipleDateRange.map(r=>r.end).indexOf(this.day.date),t=this.calendar.multipleDateRange.map(r=>r.start).indexOf(this.day.date),n=this.calendar.multipleDateRange.map(r=>r.end).lastIndexOf(this.day.date),a=this.calendar.multipleDateRange.map(r=>r.start).lastIndexOf(this.day.date);return this.toolTip=e!==n||t!==a||e>-1&&t>-1||t>-1&&e>-1,this.toolTip?"·":(e>-1?Number(e):0)||t}},methods:{toolTipTxt(){const e=[],t=this.calendar.multipleDateRange.map(s=>s.end),n=this.calendar.multipleDateRange.map(s=>s.start);let a=0,r=0,o=t.indexOf(this.day.date,a);for(;~t.indexOf(this.day.date,a);)o=t.indexOf(this.day.date,a),e.push(o),a=o+1;for(o=n.indexOf(this.day.date,r);~n.indexOf(this.day.date,r);)o=n.indexOf(this.day.date,r),e.push(o),r=o+1;return e.sort((s,l)=>s-l)},inRangeInit(){//!!!!\\
|
|
2
2
|
const e=this.helpCalendar;String.prototype.inRange=function(t){let n=!1;return t.forEach(a=>{const r=+e.getDateFromFormat(a.start.split(" ")[0]),o=+e.getDateFromFormat(a.end.split(" ")[0]),s=+e.getDateFromFormat(this.split(" ")[0]);r!==o&&r&&o&&(n=n||r<s&&s<o)}),n};//!!!!\\
|
|
3
|
-
},clearRange(){const e=this.calendar.multipleDateRange.findIndex(t=>t.end===this.day.date);this.calendar.multipleDateRange.splice(e,1)},dayMouseOver(){this.$emit("dayMouseOver",this.day.date)},hasSlot(e="default"){return!!this.$parent.$parent.$slots[e]},isDisabledDate(e){const t=this.fConfigs.disabledDates;return this.isDateIncludedInDatesCollection(e,t)||!this.isEnabledDate(e)},isEnabledDate(e){const t=this.fConfigs.enabledDates;return!t.length||this.isDateIncludedInDatesCollection(e,t)},isDateIncludedInDatesCollection(e,t){let n=new Date;n.setHours(0,0,0,0);let a=this.helpCalendar.getDateFromFormat(e);return t.includes(e)||t.includes("beforeToday")&&a.getTime()<n.getTime()||t.includes("afterToday")&&a.getTime()>n.getTime()},getClassNames(e){let t=[];(!this.hasSlot("default")||this.alwaysUseDefaultClasses)&&t.push("vfc-span-day");let n=this.helpCalendar.getDateFromFormat(e.date).getDay()-1;n===-1&&(n=6);let a=this.fConfigs.dayNames[n];this.fConfigs.disabledDayNames.includes(a)&&(e.hide=!0,t.push("vfc-cursor-not-allowed"));let r=this.helpCalendar.getDateFromFormat(e.date);if(new Date().setHours(0,0,0,0),this.isDisabledDate(e.date)&&(t.push("vfc-disabled"),t.push("vfc-cursor-not-allowed")),this.fConfigs.limits){let s=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),l=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime();(r.getTime()<s||r.getTime()>l)&&(t.push("vfc-disabled"),t.push("vfc-cursor-not-allowed"))}if(e.hide&&t.push("vfc-hide"),e.isToday&&t.push("vfc-today"),!e.hideLeftAndRightDays&&!this.fConfigs.disabledDayNames.includes(a)&&(e.isMarked?t.push("vfc-marked"):e.isHovered&&t.push("vfc-hovered"),this.fConfigs.markedDates.includes(e.date)&&t.push("vfc-borderd"),Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.forEach(s=>{this.helpCalendar.getDateFromFormat(s.start)<=this.helpCalendar.getDateFromFormat(e.date)&&this.helpCalendar.getDateFromFormat(s.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),e.date===s.start?t.push("vfc-start-marked"):e.date===s.end&&t.push("vfc-end-marked")}):this.fConfigs.markedDateRange.start&&this.fConfigs.markedDateRange.end?(this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(e.date)&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),e.date===this.fConfigs.markedDateRange.start?t.push("vfc-start-marked"):e.date===this.fConfigs.markedDateRange.end&&t.push("vfc-end-marked")):(this.fConfigs.markedDateRange.start&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),this.fConfigs.markedDateRange.end&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked")),t.push("vfc-hover")),this.fConfigs.isMultipleDateRange&&("".inRange||this.inRangeInit(),(e.isMarked||~this.calendar.multipleDateRange.map(s=>s.start.split(" ")[0]).indexOf(e.date)||~this.calendar.multipleDateRange.map(s=>s.end.split(" ")[0]).indexOf(e.date)||e.date.inRange(this.calendar.multipleDateRange))&&t.push("vfc-marked"),this.fConfigs.markedDates.includes(e.date)&&t.push("vfc-borderd"),~this.calendar.multipleDateRange.map(s=>s.start.split(" ")[0]).indexOf(e.date)&&t.push("vfc-start-marked"),~this.calendar.multipleDateRange.map(s=>s.end.split(" ")[0]).indexOf(e.date)&&t.push("vfc-end-marked")),typeof this.fConfigs.markedDates=="object"){let s=this.fConfigs.markedDates.find(l=>l.date===e.date);typeof s<"u"&&t.push(s.class)}return e.date===this.calendar.dateRange.start.split(" ")[0]&&t.push("vfc-start-marked"),e.date===this.calendar.dateRange.end.split(" ")[0]&&t.push("vfc-end-marked"),(e.date===this.calendar.selectedDate||this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(s=>s.date===e.date))&&t.push("vfc-borderd"),t}}},n1={class:"vfc-day"},a1={key:0,class:"vfc-base-start"},r1={key:1,class:"vfc-base-end"};function o1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",n1,[o.startActive?(i.openBlock(),i.createElementBlock("div",a1)):i.createCommentVNode("",!0),o.endActive?(i.openBlock(),i.createElementBlock("div",r1)):i.createCommentVNode("",!0),n.day.hideLeftAndRightDays?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(o.getClassNames(n.day)),onClick:t[3]||(t[3]=i.withModifiers(s=>e.$parent.$parent.clickDay(n.day,o.isDisabledDate),["self"])),onMouseover:t[4]||(t[4]=(...s)=>o.dayMouseOver&&o.dayMouseOver(...s))},[i.renderSlot(e.$slots,"default",{week:n.week,day:n.day},()=>[i.createTextVNode(i.toDisplayString(n.day.day),1)],!0),o.timesShow?(i.openBlock(),i.createElementBlock("span",{key:0,onClick:t[0]||(t[0]=(...s)=>o.clearRange&&o.clearRange(...s)),class:"times"},"×")):i.createCommentVNode("",!0),o.numberShow?(i.openBlock(),i.createElementBlock("span",{key:1,onMouseover:t[1]||(t[1]=s=>r.toolTip&&(r.onNumber=!0)),onMouseleave:t[2]||(t[2]=s=>r.onNumber=!1),class:"number"},[i.createTextVNode(i.toDisplayString(o.getDaysNumber)+" ",1),i.withDirectives(i.createElementVNode("div",{class:"toolTip"},i.toDisplayString(o.toolTipTxt().join(" ")),513),[[i.vShow,r.toolTip&&r.onNumber]])],32)):i.createCommentVNode("",!0)],34))])}const i1=ee(t1,[["render",o1],["__scopeId","data-v-b7b929c3"]]),s1={name:"MonthYearPicker",props:{calendarKey:{type:Number,default:0},changeYearStep:{type:Number,default:3}},data(){return{delta:0}},watch:{delta(e){e<-new Date().getFullYear()&&(this.delta=0)}},methods:{changePicker(e){if(this.$parent.showMonthPicker){e==="right"?this.$parent.NextYear(this.calendarKey):this.$parent.PreYear(this.calendarKey);return}e==="right"?this.delta+=this.changeYearStep:this.delta-=this.changeYearStep}}},l1={class:"vfc-months-container"},u1={class:"vfc-content vfc-content-MY-picker"},c1={class:"vfc-navigation-buttons"},d1={class:"vfc-months"},f1=["onClick"],m1=["onClick"];function h1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",l1,[i.createElementVNode("div",u1,[i.createElementVNode("div",c1,[i.createElementVNode("div",{onClick:t[0]||(t[0]=s=>o.changePicker("left"))},[...t[3]||(t[3]=[i.createElementVNode("div",{class:"vfc-arrow-left"},null,-1)])]),i.createElementVNode("h2",{class:i.normalizeClass(["vfc-top-date",r.delta!==0&&"vfc-top-date-has-delta"]),onClick:t[1]||(t[1]=s=>r.delta=0)},[t[4]||(t[4]=i.createElementVNode("span",{class:"vfc-popover-caret"},null,-1)),i.createTextVNode(" "+i.toDisplayString(e.$parent.listCalendars[n.calendarKey].date.getFullYear()),1)],2),i.createElementVNode("div",{onClick:t[2]||(t[2]=s=>o.changePicker("right"))},[...t[5]||(t[5]=[i.createElementVNode("div",{class:"vfc-arrow-right"},null,-1)])])]),i.createElementVNode("div",d1,[e.$parent.showMonthPicker?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.$parent.fConfigs.shortMonthNames,(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-item",{"vfc-selected":e.$parent.listCalendars[n.calendarKey].date.getMonth()===l}]),key:l,onClick:u=>e.$parent.pickMonth(l,n.calendarKey)},i.toDisplayString(s),11,f1))),128)):e.$parent.showYearPicker?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.$parent.getYearList(e.$parent.listCalendars[n.calendarKey].date,r.delta),(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-item",{"vfc-selected":e.$parent.listCalendars[n.calendarKey].date.getFullYear()===s.year}]),key:l,onClick:u=>e.$parent.pickYear(s.year,n.calendarKey)},i.toDisplayString(s.year),11,m1))),128)):i.createCommentVNode("",!0)])])])}const p1=ee(s1,[["render",h1]]),v1={name:"PickerInputs",props:{fConfigs:{type:Object,required:!0},singleSelectedDate:{type:String,required:!0},calendar:{type:Object,required:!0}},computed:{singleSelectedDateModel:{get(){return this.singleSelectedDate},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.selectedDate=e)}},dateRangeSelectedStartDate:{get(){return this.calendar.dateRange.start?this.calendar.dateRange.start:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.dateRange.start=e)}},dateRangeSelectedEndDate:{get(){return this.calendar.dateRange.end?this.calendar.dateRange.end:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.dateRange.end=e)}}}},g1=["placeholder","readonly","maxlength"],y1=["placeholder","readonly","maxlength"],_1=["placeholder","readonly","maxlength"],k1={class:"vfc-tags-input-wrapper-default vfc-tags-input"},b1=["innerHTML"],C1=["onClick"];function w1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",null,[n.fConfigs.isModal&&n.fConfigs.isDateRange?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vfc-multiple-input",{"vfc-dark":n.fConfigs.isDark}])},[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:o.dateRangeSelectedStartDate,endDate:o.dateRangeSelectedEndDate,isTypeable:n.fConfigs.isTypeable},()=>[i.withDirectives(i.createElementVNode("input",{type:"text",title:"Start Date","onUpdate:modelValue":t[0]||(t[0]=s=>o.dateRangeSelectedStartDate=s),placeholder:n.fConfigs.placeholder.split(" ")[0],readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,g1),[[i.vModelText,o.dateRangeSelectedStartDate]]),i.withDirectives(i.createElementVNode("input",{type:"text",title:"End Date","onUpdate:modelValue":t[1]||(t[1]=s=>o.dateRangeSelectedEndDate=s),placeholder:n.fConfigs.placeholder.split(" ")[0],readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,y1),[[i.vModelText,o.dateRangeSelectedEndDate]])])],2)):n.fConfigs.isModal&&n.fConfigs.isDatePicker?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass({"vfc-dark":n.fConfigs.isDark})},[i.renderSlot(e.$slots,"datePickerInput",{selectedDate:n.singleSelectedDate,isTypeable:n.fConfigs.isTypeable},()=>[i.withDirectives(i.createElementVNode("input",{class:"vfc-single-input",type:"text",title:"Date","onUpdate:modelValue":t[2]||(t[2]=s=>o.singleSelectedDateModel=s),placeholder:n.fConfigs.placeholder,readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,_1),[[i.vModelText,o.singleSelectedDateModel]])])],2)):n.fConfigs.isModal&&n.fConfigs.isMultipleDatePicker?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["vfc-tags-input-root",{"vfc-dark":n.fConfigs.isDark}])},[i.createElementVNode("div",k1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.calendar.selectedDates,(s,l)=>(i.openBlock(),i.createElementBlock("span",{class:"vfc-tags-input-badge vfc-tags-input-badge-pill vfc-tags-input-badge-selected-default",key:l},[i.createElementVNode("span",{innerHTML:s.date},null,8,b1),i.createElementVNode("a",{href:"#",class:"vfc-tags-input-remove",onClick:i.withModifiers(u=>e.removeFromSelectedDates(l),["prevent"])},null,8,C1)]))),128)),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>n.calendar.selectedDatesItem=s),onKeydown:t[4]||(t[4]=i.withKeys(i.withModifiers((...s)=>e.$parent.addToSelectedDates&&e.$parent.addToSelectedDates(...s),["prevent"]),["enter"])),type:"text",placeholder:"Add a date"},null,544),[[i.vModelText,n.calendar.selectedDatesItem]])])],2)):i.createCommentVNode("",!0)])}const E1=ee(v1,[["render",w1]]),S1={name:"Footer"},T1={class:"footerCon"};function D1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",T1,[i.renderSlot(e.$slots,"cleaner",{},void 0,!0),i.renderSlot(e.$slots,"footer",{},void 0,!0)])}const O1=ee(S1,[["render",D1],["__scopeId","data-v-85f28d28"]]),V1=(e,t)=>!!e&&!!t&&(e===t||e.contains(t)),ha=()=>new Date().getUTCMilliseconds(),$1={name:"FunctionalCalendar",components:{MonthYearPicker:p1,TimePicker:Kg,PickerInputs:E1,Arrows:Xg,Footer:O1,Day:i1,WeekNumbers:e1},mixins:[Ag],computed:{startDMY(){return this.calendar.dateRange.start?this.calendar.dateRange.start.split(" ")[0]:""},endDMY(){return this.calendar.dateRange.end?this.calendar.dateRange.end.split(" ")[0]:""},rangeIsSelected(){return this.isMultipleDateRange?this.calendar.multipleDateRange.length>0:!!(this.calendar.dateRange.end&&this.calendar.dateRange.start)},helpCalendar(){return new Ng(this.fConfigs.sundayStart,this.checkHiddenElement("leftAndRightDays"),this.fConfigs.dateFormat,this.fConfigs.dayNames)},singleSelectedDate:{get(){let e="";if(this.displayTimeInput){const t=["HH:MM","HH:mm","hh:MM","hh:mm","MM:HH","mm:HH","MM:hh","mm:hh"];let n=this.fConfigs.dateFormat;this.dateFormat&&(n=this.dateFormat),t.indexOf(n.split(" ")[1])>3?e+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].reverse().join(":"):e+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].join(":")}return this.calendar.selectedDate?this.calendar.selectedDate+e:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.selectedDate=e)}}},created(){this.setConfigs(),this.initCalendar()},mounted(){this.displayTimeInput&&(this.fConfigs.placeholder.split(" ")[1]||(this.fConfigs.placeholder+=" hh:mm")),this.popoverElement=this.$refs.popoverElement,this.popoverElement.addEventListener("focusin",this.onFocusIn),this.popoverElement.addEventListener("focusout",this.onFocusOut),window.addEventListener("click",this.hideMonthYearPicker,{capture:!0}),this.$watch("value",function(e){if(typeof e=="object"&&(e.hasOwnProperty("dateRange")||e.hasOwnProperty("selectedDate")))this.calendar=e;else if(typeof e=="object"&&e.hasOwnProperty("multipleDateRange")){this.calendar.multipleDateRange=e.multipleDateRange;const t=this.calendar.multipleDateRange[Math.max(0,this.calendar.multipleDateRange.length-1)];if(t&&(t.start&&!t.end||!t.start&&t.end))throw new Error("Invalid Data Range")}},{immediate:!0,deep:!0}),this.$watch("showCalendar",function(e){e?this.$emit("opened"):this.$emit("closed")},{immediate:!0,deep:!0})},beforeUnmount:function(){window.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("focusout",this.onFocusOut),window.removeEventListener("click",this.hideMonthYearPicker)},watch:{enabledDates:{handler(){this.fConfigs.enabledDates=this.enabledDates},deep:!0},"configs.enabledDates":{handler(){this.fConfigs.enabledDates=this.configs.enabledDates},deep:!0},fConfigs:{handler(){this.markChooseDays()},deep:!0,immediate:!0},calendar:{handler(){this.markChooseDays()},deep:!0,immediate:!0},"calendar.currentDate":{handler(e){this.$emit("input",this.calendar),this.checkLimits(e)}}},methods:{initCalendar(){this.setCalendarData(),this.listRendering(),this.markChooseDays(),this.checkLimits(this.calendar.currentDate)},updateCalendar(){this.setExistingCalendarData(),this.listRendering(),this.markChooseDays()},isNotSeparatelyAndFirst(e){return this.isSeparately||e==0},setCalendarData(){let e=this.calendar.currentDate;e=new Date(e.getFullYear(),e.getMonth()-1),this.listCalendars=[];for(let t=0;t<this.fConfigs.calendarsCount;t++){e=new Date(e.getFullYear(),e.getMonth()+1);let n={key:t+ha(),date:e,dateTop:`${this.fConfigs.monthNames[e.getMonth()]} ${e.getFullYear()}`,month:this.fConfigs.monthNames[e.getMonth()],year:e.getFullYear(),weeks:this.helpCalendar.getFinalizedWeeks(e.getMonth(),e.getFullYear())};if(this.listCalendars.push(n),!this.fConfigs.isMultiple)break}},setExistingCalendarData(){for(let e=0;e<this.listCalendars.length;e++){let t=this.listCalendars[e],n=t.date;if(this.listCalendars[e]={key:t.key,date:n,dateTop:`${this.fConfigs.monthNames[n.getMonth()]} ${n.getFullYear()}`,month:this.fConfigs.monthNames[n.getMonth()],year:n.getFullYear(),weeks:this.helpCalendar.getFinalizedWeeks(n.getMonth(),n.getFullYear())},!this.fConfigs.isMultiple)break}},setConfigs(){let e;if(typeof this.$getOptions<"u"&&(e=this.$getOptions(),Object.keys(e).forEach(t=>{typeof this.fConfigs[t]<"u"&&(this.fConfigs[t]=e[t])})),typeof this.configs<"u"?Object.keys(this.fConfigs).forEach(t=>{typeof this.configs[t]<"u"&&(this.fConfigs[t]=this.configs[t])}):Object.keys(this.$props).forEach(t=>{typeof this.fConfigs[t]<"u"&&typeof this.$props[t]<"u"&&(this.fConfigs[t]=this.$props[t])}),this.fConfigs.isModal&&(this.showCalendar=!1),this.fConfigs.placeholder||(this.fConfigs.placeholder=this.fConfigs.dateFormat),typeof this.newCurrentDate<"u"&&(this.calendar.currentDate=this.newCurrentDate),this.fConfigs.sundayStart){let t=[...this.fConfigs.dayNames],n=t[t.length-1];t.splice(t.length-1,1),t.unshift(n),this.fConfigs.dayNames=t}},listRendering(){this.listCalendars.forEach(e=>{e.weeks.forEach(t=>{let n=[];t.days.forEach(a=>{let r=new Date(a.year,a.month,a.day),o=new Date,s=!1;r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()&&(s=!0);let l;typeof this.fConfigs.markedDates[0]=="object"?l=this.fConfigs.markedDates.find(c=>c.date===this.helpCalendar.formatDate(r)):l=this.fConfigs.markedDates.find(c=>c===this.helpCalendar.formatDate(r)),this.startDMY===this.helpCalendar.formatDate(r)&&(l=!0);let u=!1;typeof l<"u"&&(u=!0),n.push({day:a.day,date:this.helpCalendar.formatDate(r),hide:a.hide,isMouseToLeft:!1,isMouseToRight:!1,isHovered:!1,isDateRangeStart:this.checkDateRangeStart(this.helpCalendar.formatDate(r)),isDateRangeEnd:this.checkDateRangeEnd(this.helpCalendar.formatDate(r)),hideLeftAndRightDays:a.hideLeftAndRightDays,isToday:s,isMarked:u})}),t.days=n})})},clickDay(e,t){if(this.fConfigs.withTimePicker&&this.fConfigs.isDateRange&&(e.date=e.date+" 00:00"),this.$emit("dayClicked",e),!this.fConfigs.isDateRange&&!this.fConfigs.isDatePicker&&!this.fConfigs.isMultipleDatePicker)return!1;let n=this.helpCalendar.getDateFromFormat(e.date).getDay()-1;n===-1&&(n=6);let a=this.fConfigs.dayNames[n];if(this.fConfigs.disabledDayNames.includes(a)||t(e.date))return!1;if(this.fConfigs.limits){let r=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),o=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime(),s=this.helpCalendar.getDateFromFormat(e.date).getTime();if(s<r||s>o)return!1}if(this.fConfigs.isMultipleDateRange){let r=this.helpCalendar.getDateFromFormat(e.date.split(" ")[0]).getTime(),o=this.calendar.multipleDateRange.length,s=this.calendar.multipleDateRange[o-1],l="";if(s||(this.calendar.multipleDateRange.push({end:"",start:""}),o=this.calendar.multipleDateRange.length,s=this.calendar.multipleDateRange[o-1]),s.start&&(l=this.helpCalendar.getDateFromFormat(s.start)),s.start!==""&&s.end!==""?this.calendar.multipleDateRange.push({end:"",start:e.date}):s.start===""&&s.end===""?s.start=e.date:s.end===""&&r>l.getTime()?s.end=e.date:s.start!==""&&r<=l.getTime()&&(this.$nextTick(()=>{this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),s.end=s.start,s.start=e.date),s.start!==""&&s.end!==""){let u=864e5,c=this.helpCalendar.getDateFromFormat(s.start),d=this.helpCalendar.getDateFromFormat(s.end),f=Math.round(Math.abs((c.getTime()-d.getTime())/u)),m=this.helpCalendar.getDateFromFormat(e.date).getTime();this.$emit("selectedDaysCount",f),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let h=this.fConfigs.minSelDays;h&&m>=l.getTime()&&f<h&&(l.setDate(l.getDate()+(h-1)),s.end=this.helpCalendar.formatDate(l)),h&&m<l.getTime()&&f<h&&(l.setDate(l.getDate()-(h-1)),s.start=this.helpCalendar.formatDate(l));let g=this.fConfigs.maxSelDays;g&&m>=l.getTime()&&f>=g&&(l.setDate(l.getDate()+(g-1)),s.end=this.helpCalendar.formatDate(l)),g&&m<l.getTime()&&f>=g&&(l.setDate(l.getDate()-(g-1)),s.start=this.helpCalendar.formatDate(l))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDateRange){let r=this.helpCalendar.getDateFromFormat(e.date.split(" ")[0]).getTime(),o="";if(this.calendar.dateRange.start&&(o=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start)),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""?(this.calendar.dateRange.start=e.date,this.calendar.dateRange.end=""):this.calendar.dateRange.start===""&&this.calendar.dateRange.end===""?this.calendar.dateRange.start=e.date:this.calendar.dateRange.end===""&&r>o.getTime()?this.calendar.dateRange.end=e.date:this.calendar.dateRange.start!==""&&r<=o.getTime()&&(this.$nextTick(()=>{this.calendar.dateRange&&this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),this.calendar.dateRange.end=this.calendar.dateRange.start,this.calendar.dateRange.start=e.date),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""){let s=864e5,l=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start),u=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.end),c=Math.round(Math.abs((l.getTime()-u.getTime())/s)),d=this.helpCalendar.getDateFromFormat(e.date).getTime();this.$emit("selectedDaysCount",c),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let f=this.fConfigs.minSelDays;f&&d>=o.getTime()&&c<f&&(o.setDate(o.getDate()+(f-1)),this.calendar.dateRange.end=this.helpCalendar.formatDate(o)),f&&d<o.getTime()&&c<f&&(o.setDate(o.getDate()-(f-1)),this.calendar.dateRange.start=this.helpCalendar.formatDate(o));let m=this.fConfigs.maxSelDays;m&&d>=o.getTime()&&c>=m&&(o.setDate(o.getDate()+(m-1)),this.calendar.dateRange.end=this.helpCalendar.formatDate(o)),m&&d<o.getTime()&&c>=m&&(o.setDate(o.getDate()-(m-1)),this.calendar.dateRange.start=this.helpCalendar.formatDate(o))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDatePicker)this.calendar.selectedDate=e.date,this.$emit("input",this.calendar),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);else if(this.fConfigs.isMultipleDatePicker){if(this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(r=>r.date===e.date)){let r=this.calendar.selectedDates.findIndex(o=>o.date===e.date);this.calendar.selectedDates.splice(r,1)}else{let r=Object.assign({},this.defaultDateFormat);r.date=e.date,this.calendar.hasOwnProperty("selectedDates")||(this.calendar.selectedDates=[]),this.calendar.selectedDates.push(r)}this.$emit("input",this.calendar)}this.markChooseDays(),this.fConfigs.withTimePicker&&((this.fConfigs.isDateRange||this.fConfigs.isDatePicker)&&this.openTimePicker(),this.calendar.selectedDates.find(r=>r.date===e.date)&&this.fConfigs.isMultipleDatePicker&&this.openTimePicker()),this.$emit("choseDay",e)},markChooseDays(){let e=this.startDMY,t=this.endDMY;this.listCalendars.forEach(n=>{n.weeks.forEach(a=>{a.days.forEach(r=>{r.isMarked=!1,r.date=r.date.split(" ")[0],this.fConfigs.isDatePicker?this.calendar.selectedDate===r.date&&(r.isMarked=!0):this.fConfigs.isMultipleDatePicker?this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(o=>o.date===r.date)&&(r.isMarked=!0):(r.isMouseToLeft=!1,r.isMouseToRight=!1,e===r.date&&(r.isMouseToLeft=!!t,r.isMarked=!0),t===r.date&&(r.isMouseToRight=!!t,r.isMarked=!0),this.calendar.multipleDateRange&&(~this.calendar.multipleDateRange.map(o=>o.start.split(" ")[0]).indexOf(r.date)&&(r.isMouseToLeft=!!t,r.isMarked=!0),~this.calendar.multipleDateRange.map(o=>o.end.split(" ")[0]).indexOf(r.date)&&(r.isMouseToRight=!!t,r.isMarked=!0),this.calendar.multipleDateRange.forEach(o=>{o.start&&o.start===o.end&&(r.isMouseToLeft=!1,r.isMouseToRight=!1),o.start&&o.end&&this.helpCalendar.getDateFromFormat(r.date).getTime()>this.helpCalendar.getDateFromFormat(o.start)&&this.helpCalendar.getDateFromFormat(r.date)<this.helpCalendar.getDateFromFormat(o.end)&&(r.isMarked=!0)})),e&&e===t&&(r.isMouseToLeft=!1,r.isMouseToRight=!1),e&&t&&this.helpCalendar.getDateFromFormat(r.date).getTime()>this.helpCalendar.getDateFromFormat(e)&&this.helpCalendar.getDateFromFormat(r.date)<this.helpCalendar.getDateFromFormat(t)&&(r.isMarked=!0)),this.fConfigs.markedDates.includes(r.date)&&(r.isMarked=!0)})})})},dayMouseOver(e){if(this.$emit("dayMouseOver",e),!this.fConfigs.isDateRange)return!1;if(this.fConfigs.limits){let t=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),n=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime(),a=this.helpCalendar.getDateFromFormat(e).getTime();if(a<t||a>n)return!1}if((this.calendar.dateRange.start===""||this.calendar.dateRange.end==="")&&(this.calendar.dateRange.start!==""||this.calendar.dateRange.end!==""))for(let t=0;t<this.listCalendars.length;t++){let n=this.listCalendars[t];for(let a=0;a<n.weeks.length;a++){let r=n.weeks[a];for(let o=0;o<r.days.length;o++){let s=r.days[o];if(this.listCalendars[t].weeks[a].days[o].isHovered=!1,s.date!==this.startDMY&&!this.fConfigs.markedDates.includes(s.date)&&(this.listCalendars[t].weeks[a].days[o].isMarked=!1),this.calendar.dateRange.start){let l=this.helpCalendar.getDateFromFormat(s.date).getTime(),u=this.helpCalendar.getDateFromFormat(e).getTime(),c=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start);this.listCalendars[t].weeks[a].days[o].isMouseToLeft=l===c.getTime()&&u>c.getTime()||l===u&&u<c.getTime(),this.listCalendars[t].weeks[a].days[o].isMouseToRight=l===c.getTime()&&u<c.getTime()||l===u&&u>c.getTime();let d=this.helpCalendar.getDateFromFormat(s.date).getDay()-1;d===-1&&(d=6);let f=this.fConfigs.dayNames[d];if(!this.fConfigs.disabledDayNames.includes(f)&&(l>c.getTime()&&l<u||l<c.getTime()&&l>u)&&(this.listCalendars[t].weeks[a].days[o].isMarked=!0),!this.calendar.dateRange.end&&l===u&&(this.listCalendars[t].weeks[a].days[o].isHovered=!1),this.checkSelDates("min",this.calendar.dateRange.start,s.date,e)){this.listCalendars[t].weeks[a].days[o].isMarked=!0;let m,h;h=new Date(c.getTime()),m=new Date(c.getTime()),h.setDate(h.getDate()-this.fConfigs.minSelDays+1),m.setDate(m.getDate()+this.fConfigs.minSelDays-1),u>=h.getTime()&&this.helpCalendar.formatDate(h)===s.date?(this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!0,this.listCalendars[t].weeks[a].days[o].isHovered=!0):u<=m.getTime()&&this.helpCalendar.formatDate(m)===s.date&&(this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!0,this.listCalendars[t].weeks[a].days[o].isHovered=!0)}if(this.checkSelDates("max",this.calendar.dateRange.start,s.date,e)){this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isHovered=!1,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!1,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!1;let m,h;m=new Date(c.getTime()),h=new Date(c.getTime()),m.setDate(m.getDate()-this.fConfigs.maxSelDays+1),h.setDate(h.getDate()+this.fConfigs.maxSelDays-1),u<=m.getTime()&&this.helpCalendar.formatDate(m)===s.date&&(this.listCalendars[t].weeks[a].days[o].isHovered=!0,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!0),u>=h.getTime()&&this.helpCalendar.formatDate(h)===s.date&&(this.listCalendars[t].weeks[a].days[o].isHovered=!0,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!0)}}}}}if(this.calendar.multipleDateRange){let t=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!t)return;if((t.start===""||t.end==="")&&(t.start!==""||t.end!==""))for(let n=0;n<this.listCalendars.length;n++){let a=this.listCalendars[n];for(let r=0;r<a.weeks.length;r++){let o=a.weeks[r];for(let s=0;s<o.days.length;s++){let l=o.days[s];if(this.listCalendars[n].weeks[r].days[s].isHovered=!1,l.date!==this.startDMY&&!this.fConfigs.markedDates.includes(l.date)&&(this.listCalendars[n].weeks[r].days[s].isMarked=!1),t.start){let u=this.helpCalendar.getDateFromFormat(l.date).getTime(),c=this.helpCalendar.getDateFromFormat(e).getTime(),d=this.helpCalendar.getDateFromFormat(t.start);this.listCalendars[n].weeks[r].days[s].isMouseToLeft=u===d.getTime()&&c>d.getTime()||u===c&&c<d.getTime(),this.listCalendars[n].weeks[r].days[s].isMouseToRight=u===d.getTime()&&c<d.getTime()||u===c&&c>d.getTime();let f=this.helpCalendar.getDateFromFormat(l.date).getDay()-1;f===-1&&(f=6);let m=this.fConfigs.dayNames[f];if(!this.fConfigs.disabledDayNames.includes(m)&&(u>d.getTime()&&u<c||u<d.getTime()&&u>c)&&(this.listCalendars[n].weeks[r].days[s].isMarked=!0),!t.end&&u===c&&(this.listCalendars[n].weeks[r].days[s].isHovered=!1),this.checkSelDates("min",t.start,l.date,e)){this.listCalendars[n].weeks[r].days[s].isMarked=!0;let h,g;g=new Date(d.getTime()),h=new Date(d.getTime()),g.setDate(g.getDate()-this.fConfigs.minSelDays+1),h.setDate(h.getDate()+this.fConfigs.minSelDays-1),c>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date?(this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!0,this.listCalendars[n].weeks[r].days[s].isHovered=!0):c<=h.getTime()&&this.helpCalendar.formatDate(h)===l.date&&(this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!0,this.listCalendars[n].weeks[r].days[s].isHovered=!0)}if(this.checkSelDates("max",t.start,l.date,e)){this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isHovered=!1,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!1,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!1;let h,g;h=new Date(d.getTime()),g=new Date(d.getTime()),h.setDate(h.getDate()-this.fConfigs.maxSelDays+1),g.setDate(g.getDate()+this.fConfigs.maxSelDays-1),c<=h.getTime()&&this.helpCalendar.formatDate(h)===l.date&&(this.listCalendars[n].weeks[r].days[s].isHovered=!0,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!0),c>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date&&(this.listCalendars[n].weeks[r].days[s].isHovered=!0,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!0)}}}}}}},PreMonth(e=null){if(!this.allowPreDate)return!1;this.transitionPrefix="right";let t=this.fConfigs.changeMonthStep;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear(),n.date.getMonth()-t),n.key-=ha(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedMonth",n.date)},NextMonth(e=null){if(!this.allowNextDate)return!1;this.transitionPrefix="left";let t=this.fConfigs.changeMonthStep;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear(),n.date.getMonth()+t),n.key+=ha(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedMonth",n.date)},PreYear(e=null){if(!this.allowPreDate)return!1;let t=this.showYearPicker?this.fConfigs.changeYearStep:1;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear()-t,n.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedYear",n.date)},NextYear(e=null){if(!this.allowNextDate)return!1;let t=this.showYearPicker?this.fConfigs.changeYearStep:1;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear()+t,n.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedYear",n.date)},ChooseDate(e){let t=this.helpCalendar.getDateFromFormat(e);e==="today"&&(t=new Date),this.listCalendars[0].date=this.calendar.currentDate=t,this.updateCalendar(),this.initCalendar()},openMonthPicker(e){this.fConfigs.changeMonthFunction&&(this.showMonthPicker=e===this.showMonthPicker?!1:e,this.showYearPicker=!1)},openYearPicker(e){this.fConfigs.changeYearFunction&&(this.showYearPicker=e===this.showYearPicker?!1:e,this.showMonthPicker=!1)},openTimePicker(){this.showTimePicker=!0},pickMonth(e,t){if(this.showMonthPicker=!1,!this.isSeparately)this.listCalendars.forEach((a,r)=>{let o=a.date;a.date=new Date(o.getFullYear(),e+1+r,0),a.key+=ha()});else{let a=this.listCalendars[t],r=a.date;a.date=new Date(r.getFullYear(),e+1,0),a.key+=ha()}let n=this.listCalendars[t];this.$emit("changedMonth",n.date),this.updateCalendar()},pickYear(e,t){if(this.showYearPicker=!1,!this.isSeparately)this.listCalendars.forEach(n=>{let a=n.date;n.date=new Date(e,a.getMonth()+1,0),n.key+=ha(),this.$emit("changedYear",n.date)});else{let n=this.listCalendars[t],a=n.date;n.date=new Date(e,a.getMonth()+1,0),n.key+=ha(),this.$emit("changedYear",n.date)}this.updateCalendar()},getYearList(e,t){let n=[],a=e.getFullYear()-4+t;for(let r=0;r<12;r++){let o=a+r;n.push({year:o})}return n},addToSelectedDates(){if(this.helpCalendar.checkValidDate(this.calendar.selectedDatesItem)){let e=Object.assign({},this.defaultDateFormat);e.date=this.calendar.selectedDatesItem,this.calendar.selectedDates.push(e),this.calendar.selectedDatesItem="",this.markChooseDays()}},removeFromSelectedDates(e){this.calendar.selectedDates.splice(e,1),this.markChooseDays()},checkDateRangeEnd(e){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(t=>t.end===e)!==-1:e===this.fConfigs.markedDateRange.end},checkSelDates(e,t,n,a){let r=this.helpCalendar.getDateFromFormat(t).getTime(),o=this.helpCalendar.getDateFromFormat(n).getTime(),s=this.helpCalendar.getDateFromFormat(a).getTime(),u=(e==="min"?this.fConfigs.minSelDays:this.fConfigs.maxSelDays-2)*1e3*60*60*24,c=r+u,d=r-u,f;return s>r?e==="min"?f=o<c&&o>r&&this.fConfigs.minSelDays:f=o>c&&o>r&&this.fConfigs.maxSelDays:s<r&&(e==="min"?f=o>d&&o<r&&this.fConfigs.minSelDays:f=o<d&&o<r&&this.fConfigs.maxSelDays),f},checkLimits(e){if(this.fConfigs.limits){let t=new Date(this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min));t.setDate(1),t.setHours(0,0,0,0);let n=new Date(this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max));n.setDate(1),n.setHours(0,0,0,0),this.allowPreDate=!0,this.allowNextDate=!0;let a=new Date(e);a.setDate(1),a.setHours(0,0,0,0),a<=t&&(this.allowPreDate=!1),a>=n&&(this.allowNextDate=!1)}},getTransition_(){if(!this.fConfigs.transition)return"";let e="";return this.transitionPrefix==="left"?e="vfc-calendar-slide-left":this.transitionPrefix==="right"&&(e="vfc-calendar-slide-right"),e},checkHiddenElement(e){return!this.fConfigs.hiddenElements.includes(e)},onFocusIn(){this.fConfigs.isModal&&(this.showCalendar=!0)},onFocusOut(e){if(this.fConfigs.isModal&&!V1(this.popoverElement,e.relatedTarget))return this.showCalendar=this.showMonthPicker=this.showYearPicker=!1},hideMonthYearPicker(e){this.$nextTick(()=>{if(this.showMonthPicker||this.showYearPicker){let t=this.showMonthPicker?this.showMonthPicker-1:this.showYearPicker-1;return this.$refs.calendars.querySelectorAll(".vfc-content-MY-picker")[t].contains(e.target)?void 0:this.showMonthPicker=this.showYearPicker=!1}})},checkDateRangeStart(e){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(t=>t.start===e)!==-1:e===this.fConfigs.markedDateRange.start},cleanRange(){if(!this.isMultipleDateRange){this.calendar.dateRange.end="",this.calendar.dateRange.start="";return}this.calendar.multipleDateRange=[]}}},x1={class:"vfc-popover-container",ref:"popoverElement",tabindex:"0"},I1={key:1,class:"vfc-calendars-container"},R1={class:"vfc-calendars",ref:"calendars"},B1={class:"vfc-content"},N1=["onClick"],A1=["onClick"],P1={class:"vfc-dayNames"},M1={key:0},L1={key:0,class:"rangeCleaner"};function F1(e,t,n,a,r,o){const s=i.resolveComponent("PickerInputs"),l=i.resolveComponent("time-picker"),u=i.resolveComponent("Arrows"),c=i.resolveComponent("month-year-picker"),d=i.resolveComponent("WeekNumbers"),f=i.resolveComponent("Day"),m=i.resolveComponent("Footer");return i.openBlock(),i.createElementBlock("div",x1,[i.createVNode(s,{fConfigs:e.fConfigs,singleSelectedDate:o.singleSelectedDate,calendar:e.calendar},{dateRangeInputs:i.withCtx(h=>[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:h.startDate,endDate:h.endDate,isTypeable:e.fConfigs.isTypeable})]),datePickerInput:i.withCtx(h=>[i.renderSlot(e.$slots,"datePickerInput",{selectedDate:h.selectedDate,isTypeable:e.fConfigs.isTypeable})]),_:3},8,["fConfigs","singleSelectedDate","calendar"]),i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["vfc-main-container",{"vfc-modal":e.fConfigs.isModal&&(e.fConfigs.isDatePicker||e.fConfigs.isDateRange||e.fConfigs.isMultipleDatePicker),"vfc-dark":e.fConfigs.isDark}]),ref:"mainContainer"},[e.showTimePicker?(i.openBlock(),i.createBlock(l,{key:0,ref:"timePicker",height:e.$refs.popoverElement.clientHeight,hours:e.activeHours,minutes:e.activeMinutes},null,8,["height","hours","minutes"])):(i.openBlock(),i.createElementBlock("div",I1,[i.createVNode(u,{isMultiple:!1,fConfigs:e.fConfigs,allowPreDate:e.allowPreDate,allowNextDate:e.allowNextDate},{navigationArrowLeft:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowLeft")]),navigationArrowRight:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowRight")]),_:3},8,["fConfigs","allowPreDate","allowNextDate"]),i.createElementVNode("div",R1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.listCalendars,(h,g)=>(i.openBlock(),i.createElementBlock("div",{class:"vfc-calendar",key:h.key},[i.withDirectives(i.createVNode(c,{ref_for:!0,ref:"monthContainer",class:i.normalizeClass("vfc-"+e.fConfigs.titlePosition),changeYearStep:e.changeYearStep,"calendar-key":g},null,8,["class","changeYearStep","calendar-key"]),[[i.vShow,e.showMonthPicker===g+1||e.showYearPicker===g+1]]),i.createElementVNode("div",B1,[i.createVNode(u,{isMultiple:!0,fConfigs:e.fConfigs,allowPreDate:e.allowPreDate,allowNextDate:e.allowNextDate,"calendar-key":g},{navigationArrowLeft:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowLeft")]),navigationArrowRight:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowRight")]),_:3},8,["fConfigs","allowPreDate","allowNextDate","calendar-key"]),i.createVNode(i.Transition,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[o.checkHiddenElement("month")?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vfc-top-date","vfc-"+e.fConfigs.titlePosition])},[i.createElementVNode("span",{onClick:i.withModifiers(y=>o.isNotSeparatelyAndFirst(g)&&o.openMonthPicker(g+1),["prevent"]),class:i.normalizeClass({"vfc-cursor-pointer vfc-underline":e.fConfigs.changeMonthFunction&&o.isNotSeparatelyAndFirst(g),"vfc-underline-active":e.showMonthPicker===g+1})},i.toDisplayString(h.month),11,N1),i.createElementVNode("span",{onClick:i.withModifiers(y=>o.isNotSeparatelyAndFirst(g)&&o.openYearPicker(g+1),["prevent"]),class:i.normalizeClass({"vfc-cursor-pointer vfc-underline":e.fConfigs.changeYearFunction&&o.isNotSeparatelyAndFirst(g),"vfc-underline-active":e.showYearPicker===g+1})},i.toDisplayString(h.year),11,A1)],2)):i.createCommentVNode("",!0)]),_:2},1032,["name"]),i.createVNode(i.Transition,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[i.createElementVNode("div",P1,[e.fConfigs.showWeekNumbers?(i.openBlock(),i.createElementBlock("span",M1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.fConfigs.dayNames,(y,_)=>(i.openBlock(),i.createElementBlock("span",{key:g+_+1,class:"vfc-day"},[o.checkHiddenElement("dayNames")?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(y),1)],64)):i.createCommentVNode("",!0)]))),128))])]),_:2},1032,["name"]),i.createVNode(i.TransitionGroup,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.weeks,(y,_)=>(i.openBlock(),i.createElementBlock("div",{class:"vfc-week",key:g+_+1},[e.showWeekNumbers?(i.openBlock(),i.createBlock(d,{key:0,number:y.number,borderColor:e.borderColor},null,8,["number","borderColor"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.days,(p,v)=>(i.openBlock(),i.createBlock(f,{ref_for:!0,ref:"day",key:g+_+v+1,isMultipleDateRange:e.isMultipleDateRange,day:p,fConfigs:e.fConfigs,calendar:e.calendar,helpCalendar:o.helpCalendar,week:y,day_key:v,onDayMouseOver:o.dayMouseOver,alwaysUseDefaultClasses:e.alwaysUseDefaultClasses},{default:i.withCtx(k=>[i.renderSlot(e.$slots,"default",{week:k.week,day:k.day})]),_:2},1032,["isMultipleDateRange","day","fConfigs","calendar","helpCalendar","week","day_key","onDayMouseOver","alwaysUseDefaultClasses"]))),128))]))),128)),h.weeks.length<6&&!e.fConfigs.isLayoutExpandable?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(6-h.weeks.length,y=>(i.openBlock(),i.createElementBlock("div",{style:{height:"32.6px"},key:g+y+"moreWeek"}," "))),128)):i.createCommentVNode("",!0)]),_:2},1032,["name"])])]))),128))],512),e.canClearRange||e.$slots.footer?(i.openBlock(),i.createBlock(m,{key:0},{footer:i.withCtx(()=>[i.createElementVNode("div",{onClick:t[1]||(t[1]=(...h)=>o.cleanRange&&o.cleanRange(...h))},[i.renderSlot(e.$slots,"cleaner",{},()=>[e.canClearRange&&e.fConfigs.isDateRange?(i.openBlock(),i.createElementBlock("div",L1,[i.createElementVNode("span",{class:i.normalizeClass([o.rangeIsSelected?"active":"disabled"]),onClick:t[0]||(t[0]=(...h)=>o.cleanRange&&o.cleanRange(...h))},"Clear Range"+i.toDisplayString(e.isMultipleDateRange&&"s"),3)])):i.createCommentVNode("",!0)])]),i.renderSlot(e.$slots,"footer")]),_:3})):i.createCommentVNode("",!0)]))],2),[[i.vShow,e.showCalendar]])],512)}const Mf=ee($1,[["render",F1]]),j1={class:"sky-header-container"},U1={class:"topmenubox"},z1={class:"header-left"},H1=["title"],W1={width:"15",height:"15",viewBox:"0 0 451.847 451.847",style:{transform:"rotate(90deg)"}},Y1={class:"notPadding"},K1={class:"topmenu-title"},G1={key:0,class:"title-dropdown"},q1={class:"title-dropdown-header"},X1=["onClick"],Z1={class:"pageName"},J1={class:"pageVisit"},Q1={key:0,class:"topmenu-description"},e0={class:"topmenubox-button"},t0={__name:"Header",props:{title:{type:String,default:""},subtitle:{type:String,default:""},showBackButton:{type:Boolean,default:!0},backButtonTitle:{type:String,default:"Назад"},backEvent:{type:Function,default:null},dropdownItems:{type:Array,default:()=>[]},dropdownTitle:{type:String,default:"Останні відвідані розділи"},visitLabel:{type:String,default:"Останнє відвідування"},trackPageName:{type:String,default:""},trackPagePath:{type:String,default:""},appId:{type:String,default:""}},emits:["back","navigate"],setup(e,{emit:t}){const n=e;ne.setSenderId(n.appId||ne.getSenderId());const a=t,r=i.ref(null),o=i.ref(!1),s=i.ref([]),l=i.ref({});ne.isInsideIframe()&&n.trackPageName&&ne.trackVisit(n.trackPageName,n.trackPagePath||`/apps/${n.trackPageName}`),ne.isInsideIframe()&&ne.getWindowData("lang").then(k=>{k!=null&&(l.value=k)});function u(k){try{if(!k)return;const C=typeof k=="string"?JSON.parse(k):k;C!=null&&C.pages&&(s.value=Object.values(C.pages))}catch{}}u(localStorage.componentStats),ne.isInsideIframe()&&ne.getLocalStorageData("componentStats").then(k=>{k!=null&&(localStorage.setItem("componentStats",JSON.stringify(k)),u(k))});const c=i.computed(()=>[...n.dropdownItems.length?n.dropdownItems:s.value].sort((C,E)=>E.lastVisit-C.lastVisit)),d=()=>{c.value.length&&(o.value=!o.value)},f=()=>{o.value=!1},m=k=>{a("navigate",k.path),ne.isInsideIframe()&&ne.navigate(k.path),f()},h=k=>{if(!k)return"";const C=l.value[k]||k;return C.charAt(0).toUpperCase()+C.slice(1)},g=k=>{const E=Date.now()-k,D=Math.floor(E/1e3),w=Math.floor(D/60),T=Math.floor(w/60),I=Math.floor(T/24);return I>0?`${I}д тому`:T>0?`${T}год тому`:w>0?`${w}хв тому`:`${D}с тому`},y=k=>{r.value&&!r.value.contains(k.target)&&f()};i.onMounted(()=>{document.addEventListener("click",y,!0)}),i.onUnmounted(()=>{document.removeEventListener("click",y,!0)});const _=i.computed(()=>n.backEvent||n.showBackButton&&ne.isInsideIframe()),p=()=>c.value.find(k=>k.name!==n.trackPageName&&k.path),v=async()=>{if(n.backEvent)return n.backEvent();let k=p();if(!k&&ne.isInsideIframe()){const C=await ne.getLocalStorageData("componentStats");C&&(u(C),k=p())}k?ne.navigate(k.path):ne.exit()};return(k,C)=>(i.openBlock(),i.createElementBlock("header",j1,[i.createElementVNode("div",U1,[i.createElementVNode("div",z1,[_.value?(i.openBlock(),i.createElementBlock("button",{key:0,class:"btn-back",onClick:v,title:e.backButtonTitle},[(i.openBlock(),i.createElementBlock("svg",W1,[...C[0]||(C[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])]))],8,H1)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"dropdownRef",ref:r,class:"titleAndDesc"},[i.createElementVNode("button",{class:i.normalizeClass(["title-dropdown-toggle",{"title-dropdown-toggle-active":c.value.length}]),onClick:d},[i.renderSlot(k.$slots,"title",{},()=>[i.createElementVNode("h4",Y1,[i.createElementVNode("span",K1,i.toDisplayString(e.title),1),c.value.length?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["arrow",{open:o.value}]),width:"12",height:"12",viewBox:"0 0 451.847 451.847",style:{"flex-shrink":"0"}},[...C[1]||(C[1]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])],2)):i.createCommentVNode("",!0)])],!0)],2),o.value&&c.value.length?(i.openBlock(),i.createElementBlock("div",G1,[i.createElementVNode("div",q1,i.toDisplayString(e.dropdownTitle),1),C[2]||(C[2]=i.createElementVNode("div",{class:"title-dropdown-divider"},null,-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(E,D)=>(i.openBlock(),i.createElementBlock("div",{key:D,class:"title-dropdown-item",onClick:w=>m(E)},[i.createElementVNode("p",Z1,i.toDisplayString(h(E.name)),1),i.createElementVNode("small",J1," ("+i.toDisplayString(e.visitLabel)+" "+i.toDisplayString(g(E.lastVisit))+") ",1)],8,X1))),128))])):i.createCommentVNode("",!0),i.renderSlot(k.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("p",Q1,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)],512)]),i.createElementVNode("div",e0,[C[3]||(C[3]=i.createElementVNode("div",null,null,-1)),i.renderSlot(k.$slots,"default",{},void 0,!0),C[4]||(C[4]=i.createElementVNode("div",null,null,-1))])])]))}},n0=ee(t0,[["__scopeId","data-v-f35ac363"]]),a0=["title"],r0={width:"15",height:"15",viewBox:"0 0 451.847 451.847",style:{transform:"rotate(90deg)"}},o0={class:"sky-modal-title-wrapper"},i0={class:"sky-modal-title"},s0={key:0,class:"sky-modal-subtitle"},l0={key:0,class:"sky-modal-header-actions"},u0={key:0,class:"sky-modal-footer"},c0=500,d0={__name:"Modal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},closeTitle:{type:String,default:"Закрити"},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},width:{type:String,default:"100%"},height:{type:String,default:"100%"},borderRadius:{type:String,default:"12px"}},emits:["update:modelValue","close"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(typeof window>"u"?1/0:window.innerWidth),o=()=>{r.value=window.innerWidth},s=i.computed(()=>r.value<=c0),l=i.computed(()=>n.width==="100%"&&n.height==="100%"||s.value),u=i.computed(()=>({width:n.width,height:n.height,...l.value?{}:{borderRadius:n.borderRadius}})),c=i.ref(null),d=i.computed(()=>{try{return ne.isAndroidWebview()}catch{return!1}}),f=()=>{if(!(!d.value||!l.value||!c.value))try{if(typeof Android<"u"&&Android.getDisplayCutoutTop){const y=Android.getDisplayCutoutTop();if(y&&window.devicePixelRatio>1){const _=y/window.devicePixelRatio;c.value.style.paddingTop=`calc(16px + ${_}px)`}}}catch{}},m=()=>{a("update:modelValue",!1),a("close")},h=()=>{n.closeOnOverlay&&m()},g=y=>{y.key==="Escape"&&n.closeOnEsc&&n.modelValue&&m()};return i.watch(()=>n.modelValue,y=>{y?(document.body.style.overflow="hidden",i.nextTick(f)):document.body.style.overflow=""}),i.onMounted(()=>{document.addEventListener("keydown",g),window.addEventListener("resize",o),window.addEventListener("resize",f)}),i.onUnmounted(()=>{document.removeEventListener("keydown",g),window.removeEventListener("resize",o),window.removeEventListener("resize",f),document.body.style.overflow=""}),(y,_)=>(i.openBlock(),i.createBlock(Pf,{to:"body"},{default:i.withCtx(()=>[e.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,class:"sky-modal-overlay",onMousedown:i.withModifiers(h,["self"])},[i.createElementVNode("div",{class:i.normalizeClass(["sky-modal",{"sky-modal--fullscreen":l.value}]),style:i.normalizeStyle(u.value)},[i.createElementVNode("div",{class:"sky-modal-header",ref_key:"modalHeaderRef",ref:c},[i.createElementVNode("button",{class:"sky-modal-back",onClick:m,title:e.closeTitle},[(i.openBlock(),i.createElementBlock("svg",r0,[..._[0]||(_[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])]))],8,a0),i.createElementVNode("div",o0,[i.renderSlot(y.$slots,"title",{},()=>[i.createElementVNode("h4",i0,i.toDisplayString(e.title),1)],!0),i.renderSlot(y.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("div",s0,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)]),y.$slots["header-actions"]?(i.openBlock(),i.createElementBlock("div",l0,[i.renderSlot(y.$slots,"header-actions",{},void 0,!0)])):i.createCommentVNode("",!0)],512),i.createElementVNode("div",{class:i.normalizeClass(["sky-modal-body",{"sky-modal-body--no-footer":!y.$slots.footer}])},[i.renderSlot(y.$slots,"default",{},void 0,!0)],2),y.$slots.footer?(i.openBlock(),i.createElementBlock("div",u0,[i.renderSlot(y.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)],6)],32)):i.createCommentVNode("",!0)]),_:3}))}},f0=ee(d0,[["__scopeId","data-v-9034b1d1"]]),m0={key:0,class:"sky-alert-icon",width:"16",height:"16",viewBox:"0 0 20 20",fill:"none"},h0={class:"sky-alert-body"},p0={__name:"SkyAlert",props:{tone:{type:String,default:"info",validator:e=>["success","error","warning","info"].includes(e)},showIcon:{type:Boolean,default:!0}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-alert",`sky-alert-${e.tone}`])},[e.showIcon?(i.openBlock(),i.createElementBlock("svg",m0,[...n[0]||(n[0]=[i.createElementVNode("path",{d:"M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zm1 15H9v-2h2v2zm0-4H9V5h2v6z",fill:"currentColor"},null,-1)])])):i.createCommentVNode("",!0),i.createElementVNode("span",h0,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],2))}},v0=ee(p0,[["__scopeId","data-v-ae1976b5"]]),g0={key:0,class:"sky-badge-dot"},y0={__name:"SkyBadge",props:{tone:{type:String,default:"default",validator:e=>["success","error","warning","pending","info","default"].includes(e)},label:{type:String,default:""},dot:{type:Boolean,default:!0}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["sky-badge",`sky-badge-${e.tone}`])},[e.dot?(i.openBlock(),i.createElementBlock("span",g0)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.label),1)],!0)],2))}},_0=ee(y0,[["__scopeId","data-v-03b6ebdb"]]),k0=["disabled"],b0={key:0,class:"sky-btn-spinner"},C0={__name:"SkyButton",props:{variant:{type:String,default:"primary",validator:e=>["primary","danger","secondary","outline"].includes(e)},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},icon:{type:Boolean,default:!1}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps({class:["sky-btn",[`sky-btn-${e.variant}`,{"sky-btn-block":e.block,"sky-btn-loading":e.loading,"sky-btn-icon":e.icon}]],disabled:e.disabled||e.loading},t.$attrs),[e.loading?(i.openBlock(),i.createElementBlock("span",b0)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)],16,k0))}},w0=ee(C0,[["__scopeId","data-v-755083cb"]]),E0={class:"sky-card"},S0={key:0,class:"sky-card-ribbon"},T0={key:1,class:"sky-card-header"},D0={key:2,class:"sky-card-body"},O0={key:3,class:"sky-card-footer"},V0={__name:"SkyCard",setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",E0,[t.$slots.ribbon?(i.openBlock(),i.createElementBlock("div",S0,[i.renderSlot(t.$slots,"ribbon",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.header?(i.openBlock(),i.createElementBlock("div",T0,[i.renderSlot(t.$slots,"header",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.default?(i.openBlock(),i.createElementBlock("div",D0,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer?(i.openBlock(),i.createElementBlock("div",O0,[i.renderSlot(t.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)]))}},$0=ee(V0,[["__scopeId","data-v-6a2d353e"]]),x0={class:"sky-card-header-content"},I0={key:0,class:"sky-card-header-icon"},R0=["src","alt"],B0={class:"sky-card-header-titles"},N0={class:"sky-card-header-title"},A0={key:0,class:"sky-card-header-subtitle"},P0={__name:"SkyCardHeader",props:{title:{type:String,required:!0},subtitle:{type:String,default:""},iconSrc:{type:String,default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",x0,[t.$slots.icon||e.iconSrc?(i.openBlock(),i.createElementBlock("div",I0,[i.renderSlot(t.$slots,"icon",{},()=>[e.iconSrc?(i.openBlock(),i.createElementBlock("img",{key:0,src:e.iconSrc,alt:e.title,width:"48",height:"48"},null,8,R0)):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",B0,[i.createElementVNode("h3",N0,i.toDisplayString(e.title),1),e.subtitle?(i.openBlock(),i.createElementBlock("p",A0,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)])]))}},M0=ee(P0,[["__scopeId","data-v-ab38d71f"]]),L0={class:"sky-card-row"},F0={class:"sky-card-row-label"},j0={class:"sky-card-row-value"},U0={__name:"SkyCardRow",props:{label:{type:String,required:!0},value:{type:[String,Number],default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",L0,[i.createElementVNode("span",F0,i.toDisplayString(e.label),1),i.renderSlot(t.$slots,"default",{},()=>[i.createElementVNode("span",j0,i.toDisplayString(e.value),1)],!0)]))}},z0=ee(U0,[["__scopeId","data-v-8bd0b0e7"]]),H0=["checked",".indeterminate","disabled"],W0={key:0,class:"sky-checkbox__track"},Y0={key:1,class:"sky-checkbox__box"},K0={key:2,class:"sky-checkbox__label"},G0=i.defineComponent({inheritAttrs:!1,__name:"SkyCheckbox",props:{modelValue:{type:[Boolean,Array]},value:{},switch:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.useAttrs(),o=i.computed(()=>({class:r.class,style:r.style})),s=i.computed(()=>{const{class:d,style:f,...m}=r;return m}),l=i.computed(()=>n.switch),u=i.computed(()=>Array.isArray(n.modelValue)?n.modelValue.includes(n.value):n.modelValue);function c(d){const f=d.target;if(!Array.isArray(n.modelValue)){a("update:modelValue",f.checked);return}if(n.value===void 0){console.warn("[SkyCheckbox] `modelValue` є масивом, але проп `value` не заданий — класти в список нема чого, зміну проігноровано.");return}const m=[...n.modelValue];if(f.checked)m.includes(n.value)||m.push(n.value);else{const h=m.indexOf(n.value);h!==-1&&m.splice(h,1)}a("update:modelValue",m)}return(d,f)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value,{class:["sky-checkbox",{"sky-checkbox--switch":l.value,"sky-checkbox--disabled":e.disabled}]}),[i.createElementVNode("input",i.mergeProps(s.value,{type:"checkbox",class:"sky-checkbox__input",checked:u.value,".indeterminate":e.indeterminate,disabled:e.disabled,onChange:c}),null,48,H0),l.value?(i.openBlock(),i.createElementBlock("span",W0,[...f[0]||(f[0]=[i.createElementVNode("span",{class:"sky-checkbox__thumb"},null,-1)])])):(i.openBlock(),i.createElementBlock("span",Y0,[...f[1]||(f[1]=[i.createElementVNode("svg",{class:"sky-checkbox__check",viewBox:"0 0 10 8",fill:"none"},[i.createElementVNode("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1),i.createElementVNode("span",{class:"sky-checkbox__dash"},null,-1)])])),d.$slots.default?(i.openBlock(),i.createElementBlock("span",K0,[i.renderSlot(d.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)],16))}}),wi=ee(G0,[["__scopeId","data-v-0975847b"]]),He=new Proxy({},{get(e,t){return((typeof window<"u"?window.lang:null)||{})[t]??""}}),q0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],X0={comprasion:"Порівняння",today:"Сьогодні",yesterday:"Вчора",week:"Тиждень",month:"Місяць",alltime:"За весь час",clear:"Очистити",Gotovo:"Готово",Mon:"Пн",Tue:"Вт",Wed:"Ср",Thu:"Чт",Fri:"Пт",Sat:"Сб",Sun:"Нд",Jan:"Січень",Feb:"Лютий",Mar:"Березень",Apr:"Квітень",May:"Травень",Jun:"Червень",Jul:"Липень",Aug:"Серпень",Sep:"Вересень",Oct:"Жовтень",Nov:"Листопад",Dec:"Грудень"};function gr(e,t){typeof e=="string"&&t===void 0&&(t=e,e=new Date);const n=e instanceof Date?e:new Date(e);return t==="mmm"?q0[n.getMonth()]:`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`}const Z0={name:"SkyDateRangePicker",components:{FunctionalCalendar:Mf},props:{isExcel:{type:Boolean,default:!1},resetDate:{type:Boolean},modelValue:{type:Object,default:()=>({start:gr(new Date,"yyyy-m-d"),end:gr(new Date,"yyyy-m-d")})},enableClean:{type:Boolean,default:!0},dateComparing:{type:Boolean,default:!1},isdateLimist:{type:Boolean},countDays:{type:Number},fullFiscal:{type:Boolean,default:!1},localActive:{type:Boolean,default:!1},limits:{type:Object,default:null},allwaysShowLabel:{type:Boolean,default:!1},locale:{type:String,default:"uk-UA"}},emits:["update:modelValue","setDate","closed"],data(){return{localConfig:{},oneday:36e5*24,calendarData:{dateRange:{start:"",end:""}},limitsDate:{min:"",max:""},opened:!1,windowWidth:typeof window<"u"?window.innerWidth:1920,dateFormatOptions:{year:"numeric",month:"2-digit",day:"2-digit"},isInitialized:!1,quartals:{},activeIndex:{},activeYear:{year:"",key:""},lastSelectedRange:{start:"",end:""}}},computed:{lang(){return He},monthNow(){return gr("mmm")},monthLast(){const e=new Date;return e.setDate(1),e.setMonth(e.getMonth()-1),gr(e,"mmm")},rightWidth(){return this.windowWidth},dayNames(){return[this.t("Mon"),this.t("Tue"),this.t("Wed"),this.t("Thu"),this.t("Fri"),this.t("Sat"),this.t("Sun")]},monthNames(){return this.getMonthNames("long").map(e=>e.charAt(0).toUpperCase()+e.slice(1))},shortMonthNames(){return this.getMonthNames("short")},calendarPlaceholder(){return"Somedate"},dateFormat(){return gr},isDateEmpty(){return this.calendarData.dateRange.start===""&&this.calendarData.dateRange.end===""}},watch:{resetDate(){this.resetDate===!0&&this.cleanAndClose()},calendarData:{handler(){this.isdateLimist&&this.isInitialized&&this.setLimits(this.calendarData.dateRange.start,this.countDays)},deep:!0}},created(){this.isdateLimist?this.$nextTick(()=>{this.isInitialized=!0}):this.calendarData.dateRange=this.modelValue,this.fullFiscal&&(this.quartals=this.CvartalLabel())},mounted(){this.onResize=()=>{this.windowWidth=window.innerWidth},window.addEventListener("resize",this.onResize),this.$watch("modelValue",function(e){this.isdateLimist||(this.calendarData.dateRange=this.modelValue,this.calendarData.dateRange.start=this.formatDateString(this.calendarData.dateRange.start,"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.calendarData.dateRange.end,"","yyyy-m-d"))},{immediate:!0,deep:!0})},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{t(e){return this.lang[e]||X0[e]||e},setLimits(e,t){if(e){let n=new Date(e);n.setDate(n.getDate()-t),this.limitsDate.min=n.toISOString().split("T")[0],n.setDate(n.getDate()+t*2),this.limitsDate.max=n.toISOString().split("T")[0]}},handleCheckbox(){this.opened?this.closeCalendar():(this.$refs.Calendar.showCalendar=!0,this.opened=!0)},calendarLabel(e,t){e=e.replace(/-/g,"/"),t=t.replace(/-/g,"/");const n=this.locale,a=new Date(e).toLocaleDateString(n,{month:"long",day:"numeric"}),r=new Date(t).toLocaleDateString(n,{month:"long",day:"numeric"});return new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?this.t("today"):!e&&!t?this.t("alltime"):new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()!==new Date(this.today()).toDateString()||!t?`${a}`:new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()===new Date(this.yesterday()).toDateString()?this.t("yesterday"):new Date(e).toDateString()===new Date(this.week()).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?`${a} - ${r}`:new Date(e).toDateString()===new Date(this.month()).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?`${a} - ${r}`:new Date(e).toDateString()===new Date(this.thisLastMonth().first).toDateString()&&new Date(t).toDateString()===new Date(this.thisLastMonth().last).toDateString()?this.t(this.monthLast):`${a} - ${r}`},setToday(){let e;this.dateComparing?e={cpr1:this.today(),cpr2:this.today()}:e={pr1:this.today(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.today(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.today(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setYesterday(){let e;this.dateComparing?e={cpr1:this.yesterday(),cpr2:this.yesterday()}:e={pr1:this.yesterday(),pr2:this.yesterday()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.yesterday(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.yesterday(),"","yyyy-m-d")),this.lastSelectedRange={start:this.yesterday(),end:this.yesterday()},this.$emit("setDate",e),this.closeCalendar()},setWeek(){let e;this.dateComparing?e={cpr1:this.week(),cpr2:this.today()}:e={pr1:this.week(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.week(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.week(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setMonth(){let e;this.dateComparing?e={cpr1:this.month(),cpr2:this.today()}:e={pr1:this.month(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.month(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.month(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setThisMonth(){let e;this.dateComparing?e={cpr1:this.thisMonth(),cpr2:this.today()}:e={pr1:this.thisMonth(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.thisMonth(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.thisMonth(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setLastMonth(){let e;this.dateComparing?e={cpr1:this.thisLastMonth().first,cpr2:this.thisLastMonth().last}:e={pr1:this.thisLastMonth().first,pr2:this.thisLastMonth().last},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.thisLastMonth().first,"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.thisLastMonth().last,"","yyyy-m-d")),this.lastSelectedRange={start:this.thisLastMonth().first,end:this.thisLastMonth().last},this.$emit("setDate",e),this.closeCalendar()},setAlltime(){let e;this.dateComparing?e={cpr1:"",cpr2:""}:e={pr1:"",pr2:""},this.$emit("setDate",e),this.closeCalendar()},getMonthDates(e=2e3){const t=[];for(let n=0;n<12;n++)t.push(new Date(e,n,15));return t},getMonthNames(e){const t=new Intl.DateTimeFormat(this.locale,{month:e,timezome:"UTC"});return this.getMonthDates().map(n=>t.format(n))},formatDateString(e,t="",n="dd.mm.yyyy"){if((typeof e=="string"||e instanceof String)&&e!=""){let a=e.split("-"),r=n.replace("dd",("0"+a[2]).slice(-2));return r=r.replace("mm",("0"+a[1]).slice(-2)),r=r.replace("yyyy",a[0]),r=r.replace("d",+a[2]),r=r.replace("m",+a[1]),r}else return t},calendarClosed(){this.$emit("update:modelValue",{start:this.formatDateString(this.calendarData.dateRange.start,"","yyyy-mm-dd"),end:this.formatDateString(this.calendarData.dateRange.end,"","yyyy-mm-dd")}),this.$emit("closed"),this.limitsDate.max="",this.limitsDate.min="",this.opened=!1},cleanAndClose(){this.isdateLimist?this.setToday():this.$refs.Calendar.cleanRange(),this.closeCalendar()},closeCalendar(){this.$refs.Calendar.showCalendar=!1,document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()},formatDate(e){const t=e.split("/"),n=t[2],a=t[0].padStart(2,"0"),r=t[1].padStart(2,"0");return`${n}-${a}-${r}`},calculateDate(e=0){const t=new Date;return new Date(new Date(t).setDate(t.getDate()-e)).toLocaleDateString("en-US",this.dateFormatOptions)},today(){return!this.isInitialized&&this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDate(this.calculateDate(0)),this.calendarData.dateRange.end=this.formatDate(this.calculateDate(0))),this.formatDate(this.calculateDate(0))},checkToday(){return this.lastSelectedRange.start===this.today()&&this.lastSelectedRange.end===this.today()},yesterday(){return this.formatDate(this.calculateDate(1))},checkYesterday(){return this.lastSelectedRange.start===this.yesterday()&&this.lastSelectedRange.end===this.yesterday()},week(){return this.formatDate(this.calculateDate(6))},checkWeek(){return this.lastSelectedRange.start===this.week()&&this.lastSelectedRange.end===this.today()},month(){return this.formatDate(this.calculateDate(30))},checkMonth(){return this.lastSelectedRange.start===this.month()&&this.lastSelectedRange.end===this.today()},thisMonth(){const t=this.today().slice(8);let n;return t-1!=0?n=t-1:n=1,this.formatDate(this.calculateDate(n))},checkThisMonth(){return this.lastSelectedRange.start===this.thisMonth()&&this.lastSelectedRange.end===this.today()},thisLastMonth(){const t=this.today().slice(8),n=this.formatDate(this.calculateDate(t));return{first:`${n.slice(0,8)}01`,last:n}},setQuartal(e,t){let n=e.split("_")[0],a={first:{first:t+"-1-1",last:t+"-3-31"},second:{first:t+"-4-1",last:t+"-6-30"},third:{first:t+"-7-1",last:t+"-9-30"},fourth:{first:t+"-10-1",last:t+"-12-31"},year:{first:t+"-1-1",last:t+"-12-31"}},r,o="";this.limits?o=this.limits.max:o=a[n].last,this.dateComparing?r={cpr1:a[n].first,cpr2:this.minDate(a[n].last,o)}:r={pr1:a[n].first,pr2:this.minDate(a[n].last,o)},this.activeIndex={name:e,year:t},this.$emit("setDate",r)},minDate(e,t){return new Date(e)<new Date(t)?e:t},CvartalLabel(){const e=this.today(),t=parseInt(e.slice(0,4)),n=parseInt(e.slice(5,7)),a=t-1;this.activeYear.year=t,this.activeYear.key="year";let r={year:{label:"Рік",year:t,items:{}},lastYear:{label:"Рік",year:a,items:{}}};return[{start:1,name:"first",label:"1 квартал"},{start:4,name:"second",label:"2 квартал"},{start:7,name:"third",label:"3 квартал"},{start:10,name:"fourth",label:"4 квартал"},{start:1,name:"year",label:"Весь рік"}].forEach(s=>{s.start<=n&&(r.year.items[s.name]={year:t,label:s.label}),r.lastYear.items[s.name]={year:a,label:s.label}}),r},chooseYear(e,t){this.activeYear.year=e,this.activeYear.key=t},getRoundedClass(e){return this.activeYear.key===this.quartals[e].year?"":e=="year"?"left-radius":e=="lastYear"?"right-radius":"full-radius"},checkThisLastMonth(){return this.lastSelectedRange.start===this.thisLastMonth().first&&this.lastSelectedRange.end===this.thisLastMonth().last},checkAlltime(){return!this.lastSelectedRange.start&&!this.lastSelectedRange.end}}},J0={class:"datepicker datepicker-range"},Q0={key:0,style:{color:"inherit"},class:"calendarLabel"},ey={key:1,class:"calendarLabel"},ty={key:0},ny={class:"datefilter"},ay={key:1},ry={class:"yearBlock",style:{display:"flex"}},oy=["onClick"],iy={style:{padding:"5px 10px 5px 10px"},class:"quartalYear"},sy={class:"quartalsBlock"},ly=["onClick"],uy={class:"quartalLabel"},cy={class:"datepicker-range-footer"};function dy(e,t,n,a,r,o){const s=i.resolveComponent("FunctionalCalendar");return i.openBlock(),i.createElementBlock("div",J0,[i.createVNode(s,{ref:"Calendar",value:r.calendarData,"date-format":"yyyy-mm-dd","is-modal":!0,"is-separately":!0,"is-date-range":!0,"is-date-picker":n.isExcel,"is-auto-closeable":!0,"change-month-function":!0,"change-year-function":!0,limits:n.limits||r.limitsDate,"day-names":o.dayNames,"month-names":o.monthNames,"short-month-names":o.shortMonthNames,placeholder:o.calendarPlaceholder,"max-sel-days":r.localConfig.maxSelDays||!1,"min-sel-days":r.localConfig.minSelDays||!1,onClosed:o.calendarClosed},{dateRangeInputs:i.withCtx(l=>[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:l.startDate,endDate:l.endDate},()=>[i.createElementVNode("div",{class:i.normalizeClass(["overlay",r.opened?"hf-check":""]),onClick:t[0]||(t[0]=i.withModifiers((...u)=>o.handleCheckbox&&o.handleCheckbox(...u),["prevent"]))},[n.dateComparing&&!(l.startDate&&l.endDate)&&(o.rightWidth>=450||n.allwaysShowLabel)?(i.openBlock(),i.createElementBlock("button",Q0,i.toDisplayString(o.t("comprasion")),1)):o.rightWidth>=450||n.allwaysShowLabel?(i.openBlock(),i.createElementBlock("button",ey,i.toDisplayString(o.calendarLabel(l.startDate,l.endDate)),1)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["icon",{"d-flex- align-items-center w-100":n.localActive}])},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["calendar-icon",{"calendar-icon--muted":r.opened}]),width:"18",height:"18",viewBox:"0 0 18 18"},[...t[10]||(t[10]=[i.createElementVNode("path",{fill:"currentColor",d:"M5 4.5a.5.5 0 0 1-.5-.5V2a.5.5 0 0 1 1 0v2a.5.5 0 0 1-.5.5zM11 4.5a.5.5 0 0 1-.5-.5V2a.5.5 0 0 1 1 0v2a.5.5 0 0 1-.5.5z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M13 14.5H3c-.827 0-1.5-.673-1.5-1.5V4c0-.827.673-1.5 1.5-1.5h10c.827 0 1.5.673 1.5 1.5v9c0 .827-.673 1.5-1.5 1.5zM3 3.5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V4a.5.5 0 0 0-.5-.5H3z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M14 6.5H2a.5.5 0 0 1 0-1h12a.5.5 0 0 1 0 1zM5.5 7.5h1v1h-1zM7.5 7.5h1v1h-1zM9.5 7.5h1v1h-1zM11.5 7.5h1v1h-1zM3.5 9.5h1v1h-1zM5.5 9.5h1v1h-1zM7.5 9.5h1v1h-1zM9.5 9.5h1v1h-1zM11.5 9.5h1v1h-1zM3.5 11.5h1v1h-1zM5.5 11.5h1v1h-1zM7.5 11.5h1v1h-1z"},null,-1)])],2)),n.localActive&&o.rightWidth<=450?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(o.calendarLabel(l.startDate,l.endDate)),1)],64)):i.createCommentVNode("",!0)],2)],2)],!0)]),footer:i.withCtx(()=>[n.fullFiscal?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ty,[i.createElementVNode("ul",ny,[i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkToday()}]),onClick:t[1]||(t[1]=(...l)=>o.setToday&&o.setToday(...l))},i.toDisplayString(o.t("today")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkYesterday()}]),onClick:t[2]||(t[2]=(...l)=>o.setYesterday&&o.setYesterday(...l))},i.toDisplayString(o.t("yesterday")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkWeek()}]),onClick:t[3]||(t[3]=(...l)=>o.setWeek&&o.setWeek(...l))},i.toDisplayString(o.t("week")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkMonth()}]),onClick:t[4]||(t[4]=(...l)=>o.setMonth&&o.setMonth(...l))},i.toDisplayString(o.t("month")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton hideThisOnMob",{selectedRangeWraper:o.checkThisLastMonth()}]),onClick:t[5]||(t[5]=(...l)=>o.setLastMonth&&o.setLastMonth(...l))},i.toDisplayString(o.t(o.monthLast)),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton hideThisOnMob",{selectedRangeWraper:o.checkThisMonth()}]),onClick:t[6]||(t[6]=(...l)=>o.setThisMonth&&o.setThisMonth(...l))},i.toDisplayString(o.t(o.monthNow)),3),!n.dateComparing&&!n.isdateLimist&&!n.isExcel?(i.openBlock(),i.createElementBlock("li",{key:0,class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkAlltime()}]),onClick:t[7]||(t[7]=(...l)=>o.setAlltime&&o.setAlltime(...l))},i.toDisplayString(o.t("alltime")),3)):i.createCommentVNode("",!0)])])),n.fullFiscal?(i.openBlock(),i.createElementBlock("div",ay,[i.createElementVNode("div",ry,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.quartals,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass([r.activeYear.year==l.year?"activeYear":"nonActiveYear",o.getRoundedClass(u)]),onClick:c=>o.chooseYear(l.year,u)},[i.createElementVNode("p",iy,i.toDisplayString(l.year),1)],10,oy))),128))]),i.createElementVNode("div",sy,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.quartals[r.activeYear.key].items,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass(["quartalButton",{selectedQuartal:r.activeIndex.name===u&&r.activeIndex.year===l.year}]),onClick:c=>o.setQuartal(u,l.year)},[i.createElementVNode("label",uy,i.toDisplayString(l.label),1)],10,ly))),128))])])):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"footer",{},()=>[i.createElementVNode("div",cy,[n.enableClean?(i.openBlock(),i.createElementBlock("p",{key:0,class:i.normalizeClass(["datepicker-range-footer-button footer-button-clear",o.isDateEmpty?"footer-button-clear-disabled":null]),onClick:t[8]||(t[8]=l=>o.isDateEmpty?null:o.cleanAndClose())},i.toDisplayString(o.t("clear")),3)):i.createCommentVNode("",!0),i.createElementVNode("p",{class:"datepicker-range-footer-button footer-button-save",onClick:t[9]||(t[9]=(...l)=>o.closeCalendar&&o.closeCalendar(...l))},i.toDisplayString(o.t("Gotovo")),1)])],!0)]),_:3},8,["value","is-date-picker","limits","day-names","month-names","short-month-names","placeholder","max-sel-days","min-sel-days","onClosed"])])}const fy=ee(Z0,[["render",dy],["__scopeId","data-v-2209df8d"]]),my={class:"sky-filter-dropdown"},hy=["disabled","aria-expanded"],py={class:"sky-filter-dropdown__title"},vy={key:0,class:"sky-filter-dropdown__badge"},gy={key:0,class:"sky-filter-dropdown__caret",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},yy=["aria-label"],$o=5,qu=180,yr=8,_y=i.defineComponent({__name:"SkyFilterDropdown",props:{title:{},summary:{default:""},badge:{default:""},disabled:{type:Boolean,default:!1},align:{default:"start"},width:{default:280},triggerClass:{default:""},panelClass:{default:""},panelVars:{default:()=>({})}},emits:["open","close"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=i.ref(null),s=i.ref(null),l=i.ref(!1),u=i.ref({}),c=i.computed(()=>a.summary||a.title),d=i.computed(()=>!a.disabled&&a.badge!==""&&a.badge!=null);function f(){const k=o.value;if(!k)return;const C=k.getBoundingClientRect(),E=window.innerWidth,D=window.innerHeight,w=Math.min(a.width,E-yr*2),T=a.align==="end"?C.right-w:C.left,I=D-C.bottom-$o-yr,R=C.top-$o-yr,O=I<qu&&R>I;u.value={...a.panelVars,left:`${Math.max(yr,Math.min(T,E-w-yr))}px`,width:`${w}px`,maxHeight:`${Math.max(qu,O?R:I)}px`,...O?{bottom:`${D-C.top+$o}px`}:{top:`${C.bottom+$o}px`}}}function m(){a.disabled||l.value||(l.value=!0,r("open"),i.nextTick(f))}function h(){l.value&&(l.value=!1,r("close"))}function g(){l.value?h():m()}function y(k){var E,D;const C=k.target;C&&((E=o.value)!=null&&E.contains(C)||(D=s.value)!=null&&D.contains(C)||h())}function _(k){var C;k.key==="Escape"&&(h(),(C=o.value)==null||C.focus())}function p(){document.addEventListener("pointerdown",y,!0),document.addEventListener("keydown",_),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f)}function v(){document.removeEventListener("pointerdown",y,!0),document.removeEventListener("keydown",_),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}return i.watch(l,k=>k?p():v()),i.watch(()=>a.disabled,k=>{k&&h()}),i.onBeforeUnmount(v),t({open:m,close:h,toggle:g,isOpen:l}),(k,C)=>(i.openBlock(),i.createElementBlock("div",my,[i.createElementVNode("button",{ref_key:"triggerRef",ref:o,type:"button",class:i.normalizeClass(["sky-filter-dropdown__trigger",[e.triggerClass,{"is-open":l.value,"is-disabled":e.disabled}]]),disabled:e.disabled,"aria-haspopup":"dialog","aria-expanded":l.value,onClick:g},[i.renderSlot(k.$slots,"trigger",{isOpen:l.value},()=>[i.createElementVNode("span",py,i.toDisplayString(c.value),1),d.value?(i.openBlock(),i.createElementBlock("span",vy,i.toDisplayString(e.badge),1)):i.createCommentVNode("",!0)],!0),k.$slots.trigger?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("svg",gy,[...C[0]||(C[0]=[i.createElementVNode("path",{d:"m6 9 6 6 6-6"},null,-1)])]))],10,hy),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"sky-filter-dropdown-fade"},{default:i.withCtx(()=>[l.value?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"panelRef",ref:s,class:i.normalizeClass(["sky-filter-dropdown__panel",e.panelClass]),role:"dialog","aria-label":e.title,style:i.normalizeStyle(u.value)},[i.renderSlot(k.$slots,"default",{close:h},void 0,!0)],14,yy)):i.createCommentVNode("",!0)]),_:3})]))]))}}),Ei=ee(_y,[["__scopeId","data-v-557df337"]]),ky=["id","type","value","placeholder","disabled"],by=i.defineComponent({__name:"SkyInput",props:{modelValue:{},type:{},placeholder:{},id:{},disabled:{type:Boolean},state:{},hint:{}},emits:["update:modelValue"],setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:e.id,class:i.normalizeClass(["sky-input",e.state]),type:e.type??"text",value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,onInput:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value))},null,42,ky),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],64))}}),Cy=ee(by,[["__scopeId","data-v-6fe5a450"]]),wy={class:"sky-loader"},Ey={key:0,class:"sky-loader-text"},Sy={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"50px",viewBox:"0 0 44.96 56.12",style:{"enable-background":"new 0 0 44.96 56.12",fill:"#ffffff",display:"block",margin:"auto","margin-top":"39px"},"xml:space":"preserve"},Ty=i.defineComponent({__name:"SkyLoader",props:{text:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",wy,[e.text?(i.openBlock(),i.createElementBlock("div",Ey,i.toDisplayString(e.text),1)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",Sy,[...n[0]||(n[0]=[i.createElementVNode("path",{d:"m0.84382,47.05821l28.6299,0c4.64652,0 4.86634,-4.02966 4.86634,-5.8895c0,-2.16243 -0.51403,-4.63853 -5.01514,-6.10722l-20.36828,-6.73085c-0.80824,-0.23248 -4.05472,-1.39119 -6.12097,-4.02597c-2.36046,-2.94475 -2.65467,-7.19581 -2.65467,-10.21806c0,-3.25103 0.36861,-7.19581 3.3175,-10.06307c2.65467,-2.6237 5.97893,-3.01855 8.48819,-3.01855l29.73235,0l0,8.12942l-26.41485,0c-1.32565,0 -2.87787,0.07749 -4.05472,1.23989c-1.25463,1.2362 -1.32565,3.16985 -1.32565,4.17726c0,2.40229 0.66282,4.71972 4.79194,6.1146l18.88707,6.26958c3.46291,1.1624 5.83014,2.3248 7.3756,3.86729c3.10106,3.09605 3.39528,7.89694 3.39528,10.44685c0,3.40602 -0.44301,7.20319 -2.58028,10.07045c-2.58366,3.48351 -5.83014,3.86729 -9.22203,3.86729l-31.72758,0l0,-8.12942z"},null,-1)])])),n[1]||(n[1]=i.createElementVNode("div",{class:"sky-loader-double-ring"},[i.createElementVNode("div")],-1))]))}}),Dy=ee(Ty,[["__scopeId","data-v-934935ba"]]),Oy={key:0,class:"sky-pagination"},Vy={class:"sky-pagination__size-value"},$y={class:"sky-pagination__list"},xy=["onClick"],Iy=["disabled","aria-current","onClick"],Ry=i.defineComponent({__name:"SkyPagination",props:{total:{},page:{},pageSize:{},pageSizeOptions:{default:()=>[5,10,25,50,100,200,500,750,1e3]},allLabel:{type:Function,default:void 0},allLimit:{default:1e3},siblings:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:page","update:pageSize"],setup(e,{emit:t}){const n=e,a=t,r={"--sky-filter-panel-padding":"0","--sky-filter-panel-radius":"4px","--sky-filter-panel-bg":"#fff","--sky-filter-panel-shadow":"none"},o=i.computed(()=>Math.max(1,Math.ceil(n.total/Math.max(1,n.pageSize)))),s=i.computed(()=>!!n.allLabel&&n.total>0&&n.total<=n.allLimit),l=i.computed(()=>s.value&&n.pageSize>=n.total?n.total:n.pageSize),u=i.computed(()=>{const g=n.pageSizeOptions.filter(y=>y<n.total);return s.value&&g.push(n.total),g.includes(l.value)||g.push(l.value),[...new Set(g)].sort((y,_)=>y-_)}),c=g=>s.value&&g===n.total?n.allLabel(n.total):String(g),d=i.computed(()=>{const g=o.value,y=n.siblings;if(g<=5+y*2)return Array.from({length:g},(k,C)=>C+1);const _=Math.max(2,n.page-y),p=Math.min(g-1,n.page+y),v=[1];_>2&&v.push("…");for(let k=_;k<=p;k++)v.push(k);return p<g-1&&v.push("…"),v.push(g),v}),f=i.computed(()=>o.value>1||u.value.length>1);function m(g){n.disabled||g===n.page||a("update:page",g)}function h(g,y){y(),g!==l.value&&a("update:pageSize",g)}return(g,y)=>f.value?(i.openBlock(),i.createElementBlock("div",Oy,[u.value.length>1?(i.openBlock(),i.createBlock(Ei,{key:0,class:"sky-pagination__size","trigger-class":"sky-pagination__size-btn","panel-class":"sky-pagination__menu","panel-vars":r,title:c(l.value),width:160,disabled:e.disabled},{trigger:i.withCtx(()=>[i.createElementVNode("span",Vy,i.toDisplayString(c(l.value)),1),y[0]||(y[0]=i.createElementVNode("i",{class:"sky-pagination__size-caret","aria-hidden":"true"},null,-1))]),default:i.withCtx(({close:_})=>[i.createElementVNode("ul",$y,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.value,p=>(i.openBlock(),i.createElementBlock("li",{key:p,class:"sky-pagination__item"},[i.createElementVNode("button",{type:"button",class:"sky-pagination__item-btn",onClick:v=>h(p,_)},i.toDisplayString(c(p)),9,xy)]))),128))])]),_:1},8,["title","disabled"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value>1?d.value:[],(_,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[_!=="…"?(i.openBlock(),i.createElementBlock("button",{key:`p${_}`,type:"button",class:i.normalizeClass(["sky-pagination__page",{"is-current":_===e.page}]),style:i.normalizeStyle(p===0&&u.value.length>1?{marginLeft:"5px"}:void 0),disabled:e.disabled,"aria-current":_===e.page?"page":void 0,onClick:v=>m(_)},i.toDisplayString(_),15,Iy)):(i.openBlock(),i.createElementBlock("span",{key:`gap${p}`,class:"sky-pagination__gap"},"…"))],64))),256))])):i.createCommentVNode("",!0)}}),By=ee(Ry,[["__scopeId","data-v-2032c9b7"]]),Ny=["id","value","disabled"],Ay={key:0,value:"",disabled:"",hidden:""},Py=["value"],My=i.defineComponent({__name:"SkySelect",props:{modelValue:{},options:{},id:{},disabled:{type:Boolean},state:{},placeholder:{},hint:{}},emits:["update:modelValue"],setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("select",{id:e.id,class:i.normalizeClass(["sky-select",e.state]),value:e.modelValue,disabled:e.disabled,onChange:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value))},[e.placeholder?(i.openBlock(),i.createElementBlock("option",Ay,i.toDisplayString(e.placeholder),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,a=>(i.openBlock(),i.createElementBlock("option",{key:a.value,value:a.value},i.toDisplayString(a.text),9,Py))),128))],42,Ny),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],64))}}),Ly=ee(My,[["__scopeId","data-v-dc5ff9bc"]]),Fy={class:"sky-select-search__control"},jy=["id","disabled","aria-expanded","aria-controls","aria-activedescendant"],Uy={key:0,class:"sky-select-search__search"},zy=["placeholder","aria-controls","aria-activedescendant"],Hy=["id"],Wy=["id","aria-selected","onMousemove","onMousedown"],Yy={key:0,class:"sky-select-search__empty"},Ky=6,Xu=4,Zu=160,Ju=8,Gy=i.defineComponent({__name:"SkySelectSearch",props:{modelValue:{default:void 0},options:{},id:{default:void 0},disabled:{type:Boolean,default:!1},state:{default:"default"},placeholder:{default:""},hint:{default:""},searchPlaceholder:{default:"Пошук…"},noResultsText:{default:"Нічого не знайдено"},searchThreshold:{default:Ky}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=i.computed(()=>n.options.length>=n.searchThreshold),r=t;let o=0;const s=`sky-select-search-${o+=1}`,l=i.ref(null),u=i.ref(null),c=i.ref(null),d=i.ref(null),f=i.ref(!1),m=i.ref(""),h=i.ref(-1),g=i.ref(!1),y=i.ref("");function _(){const N=c.value;if(!N)return;const P=N.getBoundingClientRect(),A=window.innerHeight-P.bottom-Xu-Ju,j=P.top-Xu-Ju,V=A<Zu&&j>A;g.value=V,y.value=`${Math.max(Zu,V?j:A)}px`}const p=i.computed(()=>{const N=n.options.find(P=>P.value===n.modelValue);return N?N.text:""}),v=i.computed(()=>{const N=m.value.trim().toLowerCase();return N?n.options.filter(P=>String(P.text).toLowerCase().indexOf(N)!==-1):n.options}),k=i.computed(()=>h.value>=0?`${s}-opt-${h.value}`:"");function C(){if(n.disabled||f.value)return;_(),f.value=!0,m.value="";const N=v.value.findIndex(P=>P.value===n.modelValue);h.value=N!==-1?N:v.value.length?0:-1,i.nextTick(()=>{u.value&&u.value.focus(),I()})}function E(N){f.value&&(f.value=!1,m.value="",h.value=-1,N&&c.value&&c.value.focus())}function D(){n.disabled||(f.value?E(!1):C())}function w(N){r("update:modelValue",N.value),E(!0)}function T(N){const P=v.value.length;if(!P)return;let x=h.value+N;x<0&&(x=0),x>P-1&&(x=P-1),h.value=x,i.nextTick(I)}function I(){if(!d.value||h.value<0)return;const P=d.value.querySelectorAll(".sky-select-search__option")[h.value];P&&P.scrollIntoView({block:"nearest"})}function R(N){if(!n.disabled){if(f.value){O(N);return}(N.key==="ArrowDown"||N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),C())}}function O(N){if(N.key==="ArrowDown")N.preventDefault(),T(1);else if(N.key==="ArrowUp")N.preventDefault(),T(-1);else if(N.key==="Enter"){N.preventDefault();const P=v.value[h.value];P&&w(P)}else N.key==="Escape"?(N.preventDefault(),E(!0)):N.key==="Tab"&&E(!1)}i.watch(m,()=>{h.value=v.value.length?0:-1});function $(N){if(!f.value)return;const P=N.target;l.value&&P&&l.value.contains(P)||E(!1)}return i.onMounted(()=>{document.addEventListener("mousedown",$)}),i.watch(f,N=>{N?(window.addEventListener("scroll",_,!0),window.addEventListener("resize",_)):(window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_))}),i.onBeforeUnmount(()=>{document.removeEventListener("mousedown",$),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_)}),(N,P)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:i.normalizeClass(["sky-select-search",{"is-open":f.value,"is-disabled":e.disabled}])},[i.createElementVNode("div",Fy,[i.createElementVNode("button",{ref_key:"triggerRef",ref:c,type:"button",class:i.normalizeClass(["sky-select-search__trigger",e.state]),id:e.id,disabled:e.disabled,role:"combobox","aria-haspopup":"listbox","aria-expanded":f.value?"true":"false","aria-controls":`${s}-list`,"aria-activedescendant":!a.value&&f.value?k.value:void 0,onClick:D,onKeydown:R},[i.createElementVNode("span",{class:i.normalizeClass(["sky-select-search__value",{"is-placeholder":!p.value}])},i.toDisplayString(p.value||e.placeholder),3)],42,jy),f.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["sky-select-search__dropdown",{"is-drop-up":g.value}]),style:i.normalizeStyle({maxHeight:y.value})},[a.value?(i.openBlock(),i.createElementBlock("div",Uy,[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":P[0]||(P[0]=x=>m.value=x),type:"text",class:"sky-select-search__input",placeholder:e.searchPlaceholder,"aria-controls":`${s}-list`,"aria-activedescendant":k.value,autocomplete:"off",onKeydown:O},null,40,zy),[[i.vModelText,m.value]])])):i.createCommentVNode("",!0),i.createElementVNode("ul",{id:`${s}-list`,ref_key:"listRef",ref:d,class:"sky-select-search__list",role:"listbox"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.value,(x,A)=>(i.openBlock(),i.createElementBlock("li",{id:`${s}-opt-${A}`,key:x.value,class:i.normalizeClass(["sky-select-search__option",{"is-active":A===h.value,"is-selected":x.value===e.modelValue}]),role:"option","aria-selected":x.value===e.modelValue?"true":"false",onMousemove:j=>h.value=A,onMousedown:i.withModifiers(j=>w(x),["prevent"])},i.toDisplayString(x.text),43,Wy))),128)),v.value.length?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("li",Yy,i.toDisplayString(e.noResultsText),1))],8,Hy)],6)):i.createCommentVNode("",!0)]),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],2))}}),qy=ee(Gy,[["__scopeId","data-v-0b50e37f"]]),Xy=["id","value","placeholder","disabled"],Zy=["aria-label","disabled"],Jy=i.defineComponent({__name:"SkySearchInput",props:{modelValue:{default:""},placeholder:{default:""},id:{default:void 0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},clearAriaLabel:{default:"Очистити"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref(null),s=i.ref(!n.collapsible);function l(){n.disabled||s.value||(s.value=!0,requestAnimationFrame(()=>{var g;return(g=o.value)==null?void 0:g.focus()}))}function u(){var g;!n.collapsible||!s.value||n.modelValue||(s.value=!1,(g=o.value)==null||g.blur())}function c(){!n.collapsible||n.disabled||s.value||l()}function d(){!n.collapsible||n.disabled||(s.value?u():l())}function f(g){a("update:modelValue",g.target.value)}function m(){var g;if(!n.disabled){if(n.modelValue){a("update:modelValue",""),(g=o.value)==null||g.focus();return}n.collapsible&&(s.value=!1)}}function h(g){if(!n.collapsible||!s.value)return;const y=g.target;r.value&&y&&r.value.contains(y)||u()}return i.onMounted(()=>{document.addEventListener("mousedown",h)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousedown",h)}),(g,y)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"wrapperRef",ref:r,class:i.normalizeClass(["sky-search",{"is-collapsible":e.collapsible,"is-collapsed":e.collapsible&&!s.value,"is-disabled":e.disabled}]),onClick:c},[i.createElementVNode("input",{id:e.id,ref_key:"inputRef",ref:o,type:"text",class:i.normalizeClass(["sky-search__input",{"has-value":e.modelValue}]),value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",onInput:f},null,42,Xy),i.createElementVNode("span",{class:"sky-search__icon","aria-hidden":"true",onClick:i.withModifiers(d,["stop"])},[...y[0]||(y[0]=[i.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"currentColor"},[i.createElementVNode("path",{d:"M15.504 13.616l-3.79-3.223c-0.392-0.353-0.811-0.514-1.149-0.499 0.895-1.048 1.435-2.407 1.435-3.893 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.486 0 2.845-0.54 3.893-1.435-0.016 0.338 0.146 0.757 0.499 1.149l3.223 3.79c0.552 0.613 1.453 0.665 2.003 0.115s0.498-1.451-0.115-2.003zM6 10c-2.209 0-4-1.791-4-4s1.791-4 4-4 4 1.791 4 4-1.791 4-4 4z"})],-1)])]),i.createElementVNode("button",{type:"button",class:"sky-search__clear","aria-label":e.clearAriaLabel,disabled:e.disabled,onClick:i.withModifiers(m,["stop"])},[...y[1]||(y[1]=[i.createElementVNode("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[i.createElementVNode("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6z"})],-1)])],8,Zy)],2))}}),Lf=ee(Jy,[["__scopeId","data-v-f63d7c34"]]),Qy={key:0,class:"productAppereanceBlock__productName"},e2={key:1,class:"productAppereanceBlock__productName_onlyText"},t2={key:0,class:"productAppereanceBlock__description"},n2=["src"],a2=["innerHTML"],r2={__name:"itemDefault",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""},section:{type:String,default:null},name:{type:String,default:""}},emits:["open","updateRemains"],setup(e,{emit:t}){const n=e,a=t,r=[{group:"Quantity",value:"pcs",text:He.shtuk||"шт"},{group:"Weight",value:"t",text:He.unit_t||"т"},{group:"Weight",value:"kg",text:He.unit_kg||"кг"},{group:"Weight",value:"gr",text:He.unit_gr||"г"},{group:"Volume",value:"l",text:He.unit_l||"л"},{group:"Volume",value:"ml",text:He.unit_ml||"мл"},{group:"Time",value:"min",text:He.unit_min||"хв"},{group:"Meters",value:"m",text:He.unit_m||"м"},{group:"Meters",value:"cm",text:He.unit_cm||"см"},{group:"Meters",value:"mm",text:He.unit_mm||"мм"},{group:"Meters",value:"m3",text:He.unit_m3||"м³"},{group:"Meters",value:"m2",text:He.unit_m2||"м²"},{group:"Meters",value:"mp",text:He.unit_mp||"м.п."}],o=i.computed(()=>{if(n.params.name==="type"){const c=r.find(d=>d.value===n.item.unit);return c?c.text:""}return null}),s=i.computed(()=>{var d,f;const c=(d=n.item[n.name])==null?void 0:d.match(/[а-яa-zА-ЯA-Z]+/g);return c?c.length===1?c[0].length===1?`${c[0][0]}`:`${c[0][0]}${c[0][1]}`:c.length>1?`${c[0][0]}${c[1][0]}`:"":((f=n.item[n.name])==null?void 0:f.substr(0,2))||""}),l=i.computed(()=>n.params.name==="logo"&&n.item.logo?`https://img-1.skyservice.pro/uploads/images/${n.item.logo}`:"");function u(){return n.item[n.params.activeAppearance]===0?`background-color: ${n.item.background}`:n.item[n.params.activeAppearance]===1?`background-image: url(${l.value})`:n.item[n.params.activeAppearance]===3&&n.params.mutate?`background-image: url(${n.params.mutate(n.item[n.params.name],n.item)})`:"background: #fff"}return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["item-default",{negativeQuantity:e.params.name==="quantity"&&+e.item[e.params.name]<0,minQuantity:e.params.name==="quantity"&&+e.item[e.params.name]>0&&+e.item[e.params.name]<e.item.min_quantity}]),style:i.normalizeStyle(e.params.style?e.params.style(e.item[e.params.name],e.item)+`flex: ${e.widthFlex};`:`flex: ${e.widthFlex};`),onClick:d[1]||(d[1]=f=>a("open"))},[i.renderSlot(c.$slots,"default",{item:e.item,value:e.item[e.params.name]},()=>[e.params.name=="logo"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{class:"productAppereanceBlock",style:i.normalizeStyle([{"flex-shrink":"0"},u()])},[e.item[e.params.activeAppearance]==0?(i.openBlock(),i.createElementBlock("span",Qy,i.toDisplayString(s.value),1)):e.item[e.params.activeAppearance]==2?(i.openBlock(),i.createElementBlock("span",e2,i.toDisplayString(e.item[e.name]),1)):i.createCommentVNode("",!0)],4),e.params.description?(i.openBlock(),i.createElementBlock("div",t2,i.toDisplayString(e.item[e.name]),1)):i.createCommentVNode("",!0)],64)):e.params.mutate!=null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[e.params.image?(i.openBlock(),i.createElementBlock("span",{key:0,style:{cursor:"pointer"},onClick:d[0]||(d[0]=f=>e.params.emit?a(e.params.emit,e.item):null)},[i.createElementVNode("img",{class:i.normalizeClass(["movement-history",{movementHistoryWhite:e.params.name==="quantity"&&+e.item[e.params.name]<0}]),src:e.params.image},null,10,n2)])):i.createCommentVNode("",!0),i.createElementVNode("span",{style:i.normalizeStyle(e.params.styleChildren?e.params.styleChildren(e.item[e.params.name],e.item):""),innerHTML:e.params.mutate(e.item[e.params.name],e.item)+(o.value?` (${o.value})`:"")},null,12,a2)],64)):(i.openBlock(),i.createElementBlock("span",{key:2,style:i.normalizeStyle(e.params.styleChildren?e.params.styleChildren(e.item[e.params.name],e.item):"")},i.toDisplayString(e.item[e.params.name]),5))],!0)],6))}},Qu=ee(r2,[["__scopeId","data-v-396f67b1"]]),o2=["disabled"],i2=["value"],s2=["value"],l2={__name:"itemSelect",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},emits:["selectUpdate"],setup(e){const t=e,n=i.computed(()=>{const a=`flex: ${t.widthFlex};`;return t.params.style?t.params.style(t.item[t.params.name],t.item)+a:a});return(a,r)=>e.params.select!=null?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":r[0]||(r[0]=o=>e.item[e.params.name]=o),disabled:e.params.disable?!e.item[e.params.disable]&&e.item[e.params.disable]!==0:!1,class:i.normalizeClass(["table-custom-select table__categories",{"hidden-item":e.item[e.params.name]===void 0}]),style:i.normalizeStyle(n.value),onChange:r[1]||(r[1]=o=>a.$emit("selectUpdate"))},[e.params.select.default!=null?(i.openBlock(),i.createElementBlock("option",{key:0,value:e.item[e.params.name]===null?null:0},i.toDisplayString(e.params.select.default),9,i2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.select.items,(o,s)=>(i.openBlock(),i.createElementBlock("option",{key:s,value:o.id},i.toDisplayString(o.title?o.spacesh?o.spacesh+o.title:o.title:o.spacesh?o.spacesh+o.name:o.name),9,s2))),128))],46,o2)),[[i.vModelSelect,e.item[e.params.name]]]):i.createCommentVNode("",!0)}},u2=ee(l2,[["__scopeId","data-v-7f6acadb"]]),c2={props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},data(){return{editMode:!1,lastValue:null,enterPressed:!1}},methods:{editInputFocus(){if(this.params.emit)if(this.params.name==="markup"){if(!+this.item.cost){this.$emit(this.params.emit,this.item);return}}else{this.$emit(this.params.emit,this.item);return}this.editMode=!0,this.lastValue=this.item[this.params.name],this.$nextTick(()=>{this.$refs.inputElem.focus()})},editInputBlur(){this.editMode=!1,this.$nextTick(()=>this.enterPressed=!1),this.lastValue!=this.item[this.params.name]&&this.$emit("inputEdit",this.lastValue)},open(){this.$emit("open")}}},d2=["innerHTML"];function f2(e,t,n,a,r,o){return r.editMode===!1?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["item-inner custom-input",{"hidden-item":n.item[n.params.name]===void 0}]),style:i.normalizeStyle(n.params.style?n.params.style(n.item[n.params.name],n.item)+`cursor: pointer; flex: ${n.widthFlex};`:`cursor: pointer; flex: ${n.widthFlex};`),onClick:t[0]||(t[0]=s=>n.params.inputEnabled?o.editInputFocus():null),onMousedown:t[1]||(t[1]=s=>n.params.inputEnabled?null:o.open()),innerHTML:n.params.mutate?n.params.mutate(n.item[n.params.name],n.item):n.item[n.params.name]},null,46,d2)):i.withDirectives((i.openBlock(),i.createElementBlock("input",{key:1,ref:"inputElem","onUpdate:modelValue":t[2]||(t[2]=s=>n.item[n.params.name]=s),type:"number",class:i.normalizeClass(["form-control input custom-input",{"hidden-item":n.item[n.params.name]===void 0}]),style:i.normalizeStyle({flex:n.widthFlex}),onKeyup:t[3]||(t[3]=i.withKeys(s=>{r.enterPressed=!0,o.editInputBlur()},["enter"])),onBlur:t[4]||(t[4]=s=>r.enterPressed?null:o.editInputBlur())},null,38)),[[i.vModelText,n.item[n.params.name]]])}const m2=ee(c2,[["render",f2],["__scopeId","data-v-bd215e17"]]),h2={name:"TagsInput",provide(){return{tagsInputProvider:{registerInput:this.registerInput,addTag:this.addTag,removeTag:this.removeTag,tags:()=>this.tags}}},props:{value:{type:Array,default:()=>[]}},data(){return{tags:this.value,inputComponent:null}},watch:{value(e){this.tags=e},tags(e){this.$emit("input",e)}},methods:{registerInput(e){this.inputComponent=e},addTag(e){e&&e.trim()&&!this.tags.includes(e.trim())&&(this.tags=[...this.tags,e.trim()])},removeTag(e){this.tags=this.tags.filter(t=>t!==e)}}},p2={class:"tags-input"};function v2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",p2,[i.renderSlot(e.$slots,"default")])}const g2=ee(h2,[["render",v2]]),y2={name:"TagsInputItem",inject:["tagsInputProvider"],props:{value:{type:String,required:!0}},provide(){return{tagItem:{value:this.value,remove:this.remove}}},methods:{remove(){this.tagsInputProvider.removeTag(this.value)}}},_2={class:"tags-input-item"};function k2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",_2,[i.renderSlot(e.$slots,"default")])}const b2=ee(y2,[["render",k2]]),C2={name:"TagsInputItemDelete",inject:["tagItem"],props:{useCustomHandler:{type:Boolean,default:!1}},methods:{remove(){this.tagItem.remove()},handleClick(e){this.$emit("click",e),this.useCustomHandler||this.remove()}}};function w2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("button",{type:"button",onClick:t[0]||(t[0]=(...s)=>o.handleClick&&o.handleClick(...s)),class:"tags-input-item-delete"},[...t[1]||(t[1]=[i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"delete-icon"},[i.createElementVNode("path",{d:"M18 6 6 18"}),i.createElementVNode("path",{d:"m6 6 12 12"})],-1),i.createElementVNode("span",{class:"sr-only"},"Remove",-1)])])}const E2=ee(C2,[["render",w2]]),S2={name:"TagsInputItemText",inject:["tagItem"],computed:{value(){return this.tagItem.value}}},T2={class:"tags-input-item-text"};function D2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("span",T2,i.toDisplayString(o.value),1)}const O2=ee(S2,[["render",D2]]),V2={components:{TagsInput:g2,TagsInputItem:b2,TagsInputItemText:O2,TagsInputItemDelete:E2},props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},data(){return{editMode:!1,lastValue:null,enterPressed:!1}},methods:{editInputFocus(){if(this.params.emit)if(this.params.name==="markup"){if(!+this.item.cost){this.$emit(this.params.emit,this.item);return}}else{this.$emit(this.params.emit,this.item);return}this.editMode=!0,this.lastValue=this.item[this.params.name],this.$nextTick(()=>{this.$refs.inputElem.focus()})},editInputBlur(){this.editMode=!1,this.$nextTick(()=>this.enterPressed=!1),this.lastValue!=this.item[this.params.name]&&this.$emit("inputEdit",this.lastValue)},open(){this.$emit("open")}}};function $2(e,t,n,a,r,o){const s=i.resolveComponent("TagsInputItemText"),l=i.resolveComponent("TagsInputItemDelete"),u=i.resolveComponent("TagsInputItem"),c=i.resolveComponent("TagsInput");return i.openBlock(),i.createElementBlock("div",{class:"tags-container item-inner custom-input",style:i.normalizeStyle(n.params.style?n.params.style(n.item[n.params.name],n.item)+`cursor: pointer; flex: ${n.widthFlex};`:`cursor: pointer; flex: ${n.widthFlex};`)},[i.createVNode(c,{modelValue:n.item.tags,"onUpdate:modelValue":t[1]||(t[1]=d=>n.item.tags=d),class:"tags-input"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.item.tags,d=>(i.openBlock(),i.createBlock(u,{key:d,value:d},{default:i.withCtx(()=>[i.createVNode(s),i.createVNode(l,{onClick:f=>e.$emit("deleteTag",d)},null,8,["onClick"])]),_:2},1032,["value"]))),128)),n.item.tags.length!=2?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"add-tag-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",onClick:t[0]||(t[0]=d=>e.$emit("openTagsModal"))},[...t[2]||(t[2]=[i.createElementVNode("path",{d:"M5 12h14"},null,-1),i.createElementVNode("path",{d:"M12 5v14"},null,-1)])])):i.createCommentVNode("",!0)]),_:1},8,["modelValue"])],4)}const x2=ee(V2,[["render",$2],["__scopeId","data-v-d38e5228"]]),I2={key:0,class:"tags-input-item tag-text"},R2={key:0,class:"tags-input-item tag-text"},B2={key:1,class:"tag-badge--empty"},N2={key:2,class:"tag-edit-wrap"},A2=["title","onKeydown"],P2={__name:"itemTagEditor",props:{params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},emits:["inputEdit"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(!1),o=i.ref(""),s=i.ref(""),l=i.ref(null);let u=!1;const c=i.computed(()=>n.item[n.params.typeField||"templateType"]==="custom"),d=i.computed(()=>{const _=n.item[n.params.name]||"",p=n.item[n.params.typeField||"templateType"];return _===p&&He[p]||_});function f(){const _=n.item[n.params.name]||"",p=n.item[n.params.typeField||"templateType"];o.value=_===p?"":_,s.value="",u=!1,r.value=!0,i.nextTick(()=>{var v;return(v=l.value)==null?void 0:v.focus()})}function m(){u=!0,r.value=!1,s.value=""}function h(_){const p=_.trim(),v=n.params.toggleField||"isEnabledForOnlineStore";return!p&&n.item[v]?He.customTagNameRequired||"Required":p.length>20?He.customTagNameTooLong||"Max 20 chars":p&&!/^[\p{L}\d\s-]+$/u.test(p)?He.customTagNameInvalidChars||"Invalid chars":""}function g(){if(!r.value)return;const _=o.value.trim(),p=h(_);if(p){s.value=p,i.nextTick(()=>{var C;return(C=l.value)==null?void 0:C.focus()});return}const v=n.item[n.params.name];n.item[n.params.name]=_;const k=n.params.tagNameField||"tagName";k in n.item&&(n.item[k]=_),r.value=!1,s.value="",a("inputEdit",v)}function y(){if(u){u=!1;return}g()}return(_,p)=>(i.openBlock(),i.createElementBlock("div",{class:"item-tag-editor",style:i.normalizeStyle(`flex: ${e.widthFlex};`),onClick:p[1]||(p[1]=i.withModifiers(()=>{},["stop"]))},[c.value?r.value?(i.openBlock(),i.createElementBlock("div",N2,[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=v=>o.value=v),class:i.normalizeClass(["form-control custom-input",{"is-invalid":s.value}]),maxlength:"20",title:s.value||void 0,onKeydown:[i.withKeys(i.withModifiers(g,["prevent"]),["enter"]),i.withKeys(i.withModifiers(m,["prevent"]),["escape"])],onBlur:y},null,42,A2),[[i.vModelText,o.value]]),i.createElementVNode("span",{class:i.normalizeClass(["tag-counter",{"tag-counter--limit":o.value.length>=18}])},i.toDisplayString(o.value.length)+"/20 ",3)])):(i.openBlock(),i.createElementBlock("div",{key:1,class:"tag-view",onClick:i.withModifiers(f,["stop"])},[d.value?(i.openBlock(),i.createElementBlock("span",R2,i.toDisplayString(d.value),1)):(i.openBlock(),i.createElementBlock("span",B2)),p[2]||(p[2]=i.createElementVNode("svg",{class:"tag-pen-icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{d:"M9.917 1.75a1.458 1.458 0 0 1 2.333 1.75L4.083 11.667H1.75V9.333L9.917 1.75z",stroke:"#6B7280","stroke-width":"1.2","stroke-linejoin":"round"})],-1))])):(i.openBlock(),i.createElementBlock("span",I2,i.toDisplayString(i.unref(He)[e.item[e.params.tagNameField||"tagName"]]||e.item[e.params.tagNameField||"tagName"]||"—"),1))],4))}},M2=ee(P2,[["__scopeId","data-v-73c76d93"]]),L2={key:1,class:"button-toggle-expand"},F2={key:0,class:"fs1","aria-hidden":"true","data-icon":"",style:{color:"var(--info-button-primary-color)"}},j2={key:1,src:"/svg/arrow_black.svg",style:{width:"15px",transform:"rotate(180deg)"}},U2={key:2,class:"button-delete"},z2={__name:"Row",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},selected:{type:Array,default:()=>[]},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1}},emits:["checkbox","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow","shrink","expand"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o={itemDefault:Qu,itemSelect:u2,itemInput:m2,itemTags:x2,itemTagEditor:M2};function s(E){return E.customItemComponent&&o[E.customItemComponent]?o[E.customItemComponent]:Qu}const l=i.computed({get(){let E=!1;if(v(n.item))return E;try{n.params.id&&n.selected.map(T=>T[n.params.id]).indexOf(n.item[n.params.id])!==-1&&(E=!0)}catch{}return E},set(E){v(n.item)||a("checkbox",n.index,E,n.item)}}),u=i.computed(()=>window.innerWidth);i.computed(()=>Number(n.item.parent)>0);function c(E,D){const w=E.name;let T=n.item[E.name];n.params.id&&a("inputEdit",{[n.params.id]:n.item[n.params.id],tPointItemId:n.item.tPointItemId,[w]:T},w,{error:()=>{T=D},updateField:(I,R)=>{n.item[I]=R}},n.item)}function d(E,D){const w=E.name;n.params.id&&a("selectUpdate",w,n.item)}function f(E,D){a("openTagsModal",n.item)}function m(E,D){a("deleteTag",n.item,D)}function h(E){E.target.closest("input, select, button, a, .item-cell, .tags-container, .custom-input")||v(n.item)||n.item.isNotCheckable||n.params.massActions&&(l.value=!l.value)}function g(){const E=v(n.item);if(n.item.products!==void 0)return p();a("open",n.item,E)}function y(E){var T,I,R,O;let D,w;E.clientX&&E.clientY&&(D=E.clientX,w=E.clientY),(I=(T=E==null?void 0:E.touches)==null?void 0:T[0])!=null&&I.clientX&&((O=(R=E==null?void 0:E.touches)==null?void 0:R[0])!=null&&O.clientY)&&(D=E.touches[0].clientX,w=E.touches[0].clientY),a("openContext",n.item,{x:D,y:w})}function _(E){if(n.tableViewExpanded||n.widthColumns[u.value]===void 0)return E.width?`0 0 ${E.width}px`:E.widthFr?`${E.widthFr}`:"1";const D=n.widthColumns[u.value][E.name];return D===void 0?E.width?`0 0 ${E.width}px`:E.widthIfResizedNotCalculated?`0 0 ${E.widthIfResizedNotCalculated}px`:"0 0 120px":D.endsWith("px")?`0 0 ${D}`:D.endsWith("fr")?parseInt(D).toString():"1"}function p(){n.params.id&&(n.item.isExpanded?a("shrink",{id:n.item[n.params.id],plusSum:n.item.plusSum}):a("expand",{id:n.item[n.params.id],plusSum:n.item.plusSum}))}function v(E){return E.parent>0}function k(E){r.value=setTimeout(()=>{y(E)},500)}function C(){clearTimeout(r.value)}return(E,D)=>{var T,I;const w=i.resolveComponent("b-button");return i.openBlock(),i.createElementBlock("div",{ref:"itemRow",class:i.normalizeClass([{gray:e.item.isGray,forceUpdated1:e.forceUpdating},"item-string",`nested-item-${e.item.nestedLevel}`]),style:i.normalizeStyle({cursor:"pointer",opacity:e.item.rowOpacity??1}),onClick:h,onContextmenu:i.withModifiers(y,["prevent","stop"]),onTouchstart:k,onTouchend:C},[e.params.massActions!=null?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["item item--checkbox",{hidden:+e.item.parent>0||e.item.isNotCheckable}])},[i.createVNode(i.unref(wi),{modelValue:l.value,"onUpdate:modelValue":D[0]||(D[0]=R=>l.value=R),class:"item-cell"},null,8,["modelValue"])],2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.header,(R,O)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:O},[e.tableViewExpanded&&e.selectedColumns[R.name]||e.selectedColumns[R.name]&&(R.minWidthScreen<=u.value||R.minWidthScreen===void 0)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(R)),{key:0,item:e.item,params:R,class:"item","width-flex":_(R),name:e.params.name,onOpen:g,onCreateNewComing:$=>a(R.emit,$),onInputEdit:$=>c(R,$),onSelectUpdate:$=>d(R),onOpenTagsModal:$=>f(),onDeleteTag:$=>m(R,$)},i.createSlots({_:2},[E.$slots["cell-"+R.name]?{name:"default",fn:i.withCtx($=>[i.renderSlot(E.$slots,"cell-"+R.name,i.mergeProps({row:e.item,value:e.item[R.name],item:e.item},{ref_for:!0},$),void 0,!0)]),key:"0"}:void 0]),1064,["item","params","width-flex","name","onCreateNewComing","onInputEdit","onSelectUpdate","onOpenTagsModal","onDeleteTag"])):i.createCommentVNode("",!0)],64))),128)),e.isShowToggleExpand?(i.openBlock(),i.createElementBlock("div",L2,[((T=e.item.products)==null?void 0:T.length)>=1?(i.openBlock(),i.createBlock(w,{key:0,variant:"light",class:"btn-row-open",onClick:D[1]||(D[1]=R=>p())},{default:i.withCtx(()=>[e.item.isExpanded!=!0?(i.openBlock(),i.createElementBlock("span",F2)):i.createCommentVNode("",!0),e.item.isExpanded==!0?(i.openBlock(),i.createElementBlock("img",j2)):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(I=e.params)!=null&&I.isShowDeleteRow?(i.openBlock(),i.createElementBlock("div",U2,[i.createElementVNode("button",{type:"button",class:"btn btn-danger",onClick:D[2]||(D[2]=R=>a("deleteRow",e.item))}," × ")])):i.createCommentVNode("",!0)],38)}}},H2=ee(z2,[["__scopeId","data-v-53ceb83e"]]),W2=["data-index"],Y2={__name:"DynamicScroller",props:{params:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},selected:{type:Array,default:()=>[]},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1}},emits:["checkbox","getData","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow"],setup(e,{emit:t}){const n=e,a=i.computed(()=>{var f;return((f=n.params)==null?void 0:f.id)||"id"}),r=i.computed(()=>n.items.map((f,m)=>(f._dsIndex=m,f.index=m,f))),o=i.ref(null),s=Af.useVirtualizer(i.computed(()=>({count:r.value.length,getScrollElement:()=>o.value,estimateSize:()=>30,overscan:6,getItemKey:f=>{const m=r.value[f];return(m==null?void 0:m[a.value])??f}}))),l=i.computed(()=>s.value.getVirtualItems()),u=i.computed(()=>s.value.getTotalSize());function c(f){f&&s.value.measureElement(f)}const d=t;return(f,m)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"scrollEl",ref:o,class:"scroller"},[i.createElementVNode("div",{class:"scroller__sizer",style:i.normalizeStyle({height:`${u.value}px`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,h=>(i.openBlock(),i.createElementBlock("div",{key:h.key,ref_for:!0,ref:c,"data-index":h.index,class:"scroller__row",style:i.normalizeStyle({transform:`translateY(${h.start}px)`})},[i.createVNode(H2,{index:h.index,item:r.value[h.index],params:e.params,selected:e.selected,"selected-columns":e.selectedColumns,"width-columns":e.widthColumns,"table-view-expanded":e.tableViewExpanded,"force-updating":e.forceUpdating,"is-show-toggle-expand":e.isShowToggleExpand,onCheckbox:m[0]||(m[0]=(g,y,_)=>d("checkbox",g,y,_)),onGetData:m[1]||(m[1]=g=>d("getData")),onOpen:m[2]||(m[2]=(...g)=>d("open",...g)),onOpenContext:m[3]||(m[3]=(...g)=>d("openContext",...g)),onInputEdit:m[4]||(m[4]=(...g)=>d("inputEdit",...g)),onSelectUpdate:m[5]||(m[5]=(...g)=>d("selectUpdate",...g)),onOpenTagsModal:m[6]||(m[6]=(...g)=>d("openTagsModal",...g)),onDeleteTag:m[7]||(m[7]=(...g)=>d("deleteTag",...g)),onDeleteRow:m[8]||(m[8]=(...g)=>d("deleteRow",...g))},i.createSlots({_:2},[i.renderList(f.$slots,(g,y)=>({name:y,fn:i.withCtx(_=>[i.renderSlot(f.$slots,y,i.mergeProps({ref_for:!0},_??{}),void 0,!0)])}))]),1032,["index","item","params","selected","selected-columns","width-columns","table-view-expanded","force-updating","is-show-toggle-expand"])],12,W2))),128))],4)],512))}},K2=ee(Y2,[["__scopeId","data-v-198fe5fa"]]),G2={class:"header-table-outer"},q2={key:0,class:"ht ht-checkbox",style:{flex:"0 0 40px"}},X2=["data-name","title"],Z2=["data-name","title","onClick"],J2=["title"],Q2={key:0,class:"fs1","aria-hidden":"true","data-icon":"",style:{color:"var(--info-button-primary-color)"}},e_={key:1,src:"/svg/arrow_black.svg",style:{width:"15px",transform:"rotate(180deg)"}},t_={__name:"Header",props:{params:{type:Object,default:()=>({})},allSelect:{type:Boolean,default:!1},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1},scroll:{type:Boolean,default:!1}},emits:["checkbox","sort","changeWidthColumn","changeTableSettingToDefault","switchView","changeHeaderWidth"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref({ot:"asc",of:"id"}),s=i.ref(null),l=i.ref(null),u=i.ref(null),c=i.ref(!0),d=i.ref(null),f=i.computed(()=>{const w={},T=o.value.ot==="asc"?"icon-arrow-down-2":"icon-arrow-up-2";return w[o.value.of]=T,w}),m=i.computed({get:()=>n.allSelect,set:()=>{}}),h=i.computed(()=>window.innerWidth);function g(w){a("checkbox",w)}function y(){a("switchView")}function _(w){l.value||(o.value.of===w&&(o.value.ot=o.value.ot==="asc"?"desc":"asc"),o.value.of=w,a("sort",{ot:o.value.ot,of:o.value.of}))}function p(w){if(n.tableViewExpanded||n.widthColumns[h.value]===void 0)return w.width?`0 0 ${w.width}px`:w.widthFr?w.widthFr:w.name!=="logo"?"1":"";const T=n.widthColumns[h.value][w.name];return T===void 0?w.width?`0 0 ${w.width}px`:w.widthIfResizedNotCalculated?`0 0 ${w.widthIfResizedNotCalculated}px`:"0 0 120px":T.endsWith("px")?`0 0 ${T}`:T.endsWith("fr")?parseInt(T).toString():"1"}function v(w){w.which===1&&(l.value=w.target.parentElement,s.value=l.value.offsetWidth-w.x,u.value=l.value.dataset.name)}function k(w){if(l.value){if(d.value=w.x,!c.value)return;c.value=!1;const T=100;let I=s.value+w.x;n.widthColumns[h.value]===void 0?a("changeWidthColumn",u.value,I,D()):a("changeWidthColumn",u.value,I),setTimeout(()=>{d.value!=null&&d.value!==w.x&&(I=s.value+d.value,n.widthColumns[h.value]===void 0?a("changeWidthColumn",u.value,I,D()):a("changeWidthColumn",u.value,I)),c.value=!0},T)}}function C(w){w.which===1&&l.value&&setTimeout(()=>{var T;a("changeHeaderWidth",((T=r.value)==null?void 0:T.scrollWidth)||0),l.value=null,u.value=null},0)}function E(){l.value&&setTimeout(()=>{var w;l.value=null,u.value=null,a("changeHeaderWidth",((w=r.value)==null?void 0:w.scrollWidth)||0)},0)}function D(){var I;const w=[],T=((I=r.value)==null?void 0:I.querySelectorAll(".resizer"))||[];for(const R of T){const O=R.parentElement;w.push({columnName:O.dataset.name,width:O.offsetWidth})}return w}return i.onMounted(()=>{var w,T;try{o.value.ot=((w=n.params.sort)==null?void 0:w.ot)||"asc",o.value.of=((T=n.params.sort)==null?void 0:T.of)||"id"}catch{}r.value&&l.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),i.onUpdated(()=>{r.value&&l.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),(w,T)=>{var O;const I=i.resolveComponent("b-button"),R=i.resolveDirective("b-tooltip");return i.openBlock(),i.createElementBlock("div",G2,[i.createElementVNode("div",{ref_key:"headerTable",ref:r,class:i.normalizeClass(["header-table",{forceUpdated1:e.forceUpdating}]),onMousemove:k,onMouseleave:E,onMouseup:C},[e.params.massActions!=null?(i.openBlock(),i.createElementBlock("div",q2,[i.createVNode(i.unref(wi),{modelValue:m.value,"onUpdate:modelValue":[T[0]||(T[0]=$=>m.value=$),g]},null,8,["modelValue"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"header-table__content",style:i.normalizeStyle({flex:e.params.massActions!=null?"0 0 calc(100% - 40px)":"0 0 100%"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.header,($,N)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:N},[e.tableViewExpanded&&e.selectedColumns[$.name]||e.selectedColumns[$.name]&&($.minWidthScreen<=h.value||$.minWidthScreen===void 0)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[$.sort==!1?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["ht",$.name=="logo"&&"logo"]),style:i.normalizeStyle([{flex:p($)},{position:"relative","white-space":"nowrap"}]),"data-name":$.name,title:$.title},[i.createTextVNode(i.toDisplayString($.title)+" ",1),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:v}," ",32)):i.createCommentVNode("",!0)],14,X2)):(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle([{flex:p($)},{position:"relative","white-space":"nowrap"}]),class:i.normalizeClass([$.sort?f.value[$.sort]:f.value[$.name],"ht sort"]),"data-name":$.name,title:$.title,onClick:P=>_($.sort?$.sort:$.name)},[i.createTextVNode(i.toDisplayString($.title)+" ",1),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:v}," ",32)):i.createCommentVNode("",!0),$.tooltip?i.withDirectives((i.openBlock(),i.createElementBlock("i",{key:1,style:{"margin-left":"5px","font-size":"16px",color:"#ed2626"},class:"icomoon icon-question",title:$.tooltip},null,8,J2)),[[R,{variant:"secondary"},void 0,{hover:!0}]]):i.createCommentVNode("",!0)],14,Z2))],64)):i.createCommentVNode("",!0)],64))),128)),e.isShowToggleExpand?(i.openBlock(),i.createElementBlock("div",{key:0,class:"button-toggle-expand button-toggle-expand-all",style:i.normalizeStyle({paddingRight:e.scroll?"5px":0})},[i.createVNode(I,{variant:"light",class:"btn-row-open",onClick:T[1]||(T[1]=$=>y())},{default:i.withCtx(()=>[e.params.isAllExpanded!=!0?(i.openBlock(),i.createElementBlock("span",Q2)):i.createCommentVNode("",!0),e.params.isAllExpanded==!0?(i.openBlock(),i.createElementBlock("img",e_)):i.createCommentVNode("",!0)]),_:1})],4)):i.createCommentVNode("",!0),(O=e.params)!=null&&O.isShowDeleteRow?(i.openBlock(),i.createElementBlock("div",{key:1,class:"button-toggle-delete",style:i.normalizeStyle({paddingRight:e.scroll?"5px":0})},null,4)):i.createCommentVNode("",!0)],4)],34)])}}},n_={class:"footer-table-outer"},a_=["data-name","title"],r_={__name:"Footer",props:{params:{type:Object,default:()=>({})},allSelect:{type:Boolean,default:!1},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1},scroll:{type:Boolean,default:!1}},emits:["checkbox","sort","changeWidthColumn","changeTableSettingToDefault","switchView","changeHeaderWidth"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref(null),s=i.ref(null),l=i.ref(null),u=i.ref(!0),c=i.ref(null),d=i.computed(()=>window.innerWidth);function f(p){if(n.tableViewExpanded||n.widthColumns[d.value]===void 0)return p.width?`0 0 ${p.width}px`:p.widthFr?p.widthFr:p.name!=="logo"?"1":"";const v=n.widthColumns[d.value][p.name];return v===void 0?p.width?`0 0 ${p.width}px`:p.widthIfResizedNotCalculated?`0 0 ${p.widthIfResizedNotCalculated}px`:"0 0 120px":v.endsWith("px")?`0 0 ${v}`:v.endsWith("fr")?parseInt(v).toString():"1"}function m(p){p.which===1&&(s.value=p.target.parentElement,o.value=s.value.offsetWidth-p.x,l.value=s.value.dataset.name)}function h(p){if(s.value){if(c.value=p.x,!u.value)return;u.value=!1;const v=100;let k=o.value+p.x;n.widthColumns[d.value]===void 0?a("changeWidthColumn",l.value,k,_()):a("changeWidthColumn",l.value,k),setTimeout(()=>{c.value!=null&&c.value!==p.x&&(k=o.value+c.value,n.widthColumns[d.value]===void 0?a("changeWidthColumn",l.value,k,_()):a("changeWidthColumn",l.value,k)),u.value=!0},v)}}function g(p){p.which===1&&s.value&&setTimeout(()=>{var v;a("changeHeaderWidth",((v=r.value)==null?void 0:v.scrollWidth)||0),s.value=null,l.value=null},0)}function y(){s.value&&setTimeout(()=>{var p;s.value=null,l.value=null,a("changeHeaderWidth",((p=r.value)==null?void 0:p.scrollWidth)||0)},0)}function _(){var k;const p=[],v=((k=r.value)==null?void 0:k.querySelectorAll(".resizer"))||[];for(const C of v){const E=C.parentElement;p.push({columnName:E.dataset.name,width:E.offsetWidth})}return p}return i.onMounted(()=>{r.value&&s.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),i.onUpdated(()=>{r.value&&s.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),(p,v)=>(i.openBlock(),i.createElementBlock("div",n_,[i.createElementVNode("div",{ref_key:"footerTable",ref:r,class:i.normalizeClass(["footer-table",{forceUpdated1:e.forceUpdating}]),onMousemove:h,onMouseleave:y,onMouseup:g},[i.createElementVNode("div",{class:"footer-table__content",style:i.normalizeStyle({flex:e.params.massActions!=null?"0 0 calc(100%)":"0 0 100%"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.footer,(k,C)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:C},[(k.minWidthScreen<=d.value||k.minWidthScreen===void 0)&&(k.maxWidthScreen>=d.value||k.maxWidthScreen===void 0)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["ht",k.name=="logo"&&"logo"]),style:i.normalizeStyle([{flex:f(k)},{position:"relative","white-space":"nowrap"}]),"data-name":k.name,title:k.title},[i.createElementVNode("span",{class:"ht-content",style:i.normalizeStyle(k.style?k.style(k):"")},i.toDisplayString(k.title)+": "+i.toDisplayString(k==null?void 0:k.value),5),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:m}," ",32)):i.createCommentVNode("",!0)],14,a_)):i.createCommentVNode("",!0)],64))),128))],4)],34)]))}},o_={class:"table-container dynamic-scroller-table"},i_={class:"dynamic-scroller-table__right"},s_={class:"dynamic-scroller-table__content listContainer"},l_={key:0,class:"dynamic-scroller-table__mass-action"},u_={class:"dynamic-scroller-table__mass-count"},c_={value:"empty"},d_=["value"],f_={key:1,class:"dynamic-scroller-table__table"},m_={key:1,class:"dynamic-scroller-table__body"},h_={key:3,class:"dynamic-scroller-table__footer-found"},p_={class:"dynamic-scroller-table__footer-content"},v_={key:2},g_={class:"no-data-text",style:{color:"gray"}},y_={__name:"Table",props:{params:{type:Object,default:()=>({})},json:{type:Object,default:()=>({})},mainJsonData:{type:Array,default:()=>[]},justDeleted:{type:String,default:""}},emits:["getData","updateSelected","updateMassactionData","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(0),o=i.ref(0),s=i.ref(!1),l=i.ref(!1),u=i.ref(!1),c=i.ref({}),d=i.ref({}),f=i.ref("empty"),m=i.ref({of:"",ot:""}),h=i.ref(0),g=i.computed({get:()=>n.params.selected||[],set:x=>{n.params.selected=x}}),y=i.computed({get:()=>n.params.allSelect||!1,set:x=>{n.params.allSelect=x}}),_=i.computed(()=>{var x;try{return((x=n.json)==null?void 0:x.total)||0}catch{return 0}}),p=i.computed(()=>window.lang||{}),v=i.computed(()=>r.value>o.value),k=i.computed(()=>n.mainJsonData),C=i.computed(()=>{var x,A;return((A=(x=n.json)==null?void 0:x.items)==null?void 0:A.some(j=>{var V;return((V=j.products)==null?void 0:V.length)>=1}))||!1});i.watch(c,x=>{var A;(A=n.params.header)==null||A.forEach(j=>{j.enable=c.value[j.name]})},{deep:!0}),i.watch(()=>n.justDeleted,x=>{x!==""&&(g.value=g.value.filter(A=>A[n.params.id]!=x))});function E(){const x=k.value.filter(j=>!(Number(j.parent)>0));g.value.length>=x.length&&x.length>0?(n.params.selected=[],n.params.allSelect=!1):(n.params.selected=[],k.value.forEach(j=>{Number(j.parent)>0||n.params.selected.push(j)}),n.params.allSelect=!0),a("updateSelected",JSON.parse(JSON.stringify(n.params.selected)))}function D(x,A,j){const G=g.value.map(X=>X[n.params.id]).indexOf(j[n.params.id]);if(A===!0&&G===-1||A===!1&&G!==-1){s.value?w(x,A):A===!1&&G!==-1?g.value.splice(G,1):A===!0&&G===-1&&g.value.push(j),h.value=x;const X=k.value.filter(se=>!(Number(se.parent)>0)).length;y.value=g.value.length>=X}a("updateSelected",JSON.parse(JSON.stringify(g.value)))}function w(x,A){const j=x>h.value?1:x<h.value?-1:null;if(j!=null){let V=h.value;const G=n.json.items,X=n.params.sort.of;for(;;){if(A===!1){const se=g.value.indexOf(G[V][X]);se!==-1&&g.value.splice(se,1)}else g.value.indexOf(G[V][X])===-1&&g.value.push(G[V]);if(V===x)break;V+=j}}g.value=g.value.filter((V,G,X)=>G===X.findIndex(se=>se[n.params.id]===V[n.params.id]))}function T(){return{ot:m.value.ot,of:m.value.of}}function I(x){const A={action:x.target.value,items:g.value.filter((j,V,G)=>V===G.findIndex(X=>X[n.params.id]===j[n.params.id]))};a("updateMassactionData",A),f.value="empty"}function R(x,A,j=[]){const V=window.innerWidth;if(!d.value[V]){d.value[V]={};for(const G of j)d.value[V][G.columnName]=G.width+"px"}d.value[V][x]=A+"px",u.value=!u.value}function O(){const x={};for(const A in n.params.header){const j=n.params.header[A],V=j.name;x[V]=j.enableDefault}c.value=x,d.value={}}function $(x=!l.value){l.value=x}function N(x){}function P(x){m.value.ot=x.ot,m.value.of=x.of,a("getData",T())}return i.onMounted(()=>{n.params.sort&&(m.value.of=n.params.sort.of,m.value.ot=n.params.sort.ot);for(const x in n.params.header){const A=n.params.header[x],j=A.name;c.value[j]==null&&(c.value[j]=A.enable)}}),typeof window<"u"&&(window.addEventListener("keydown",x=>{x.key==="Shift"&&(s.value=!0)}),window.addEventListener("keyup",x=>{x.key==="Shift"&&(s.value=!1)})),(x,A)=>{const j=i.resolveComponent("center");return i.openBlock(),i.createElementBlock("div",o_,[i.createElementVNode("div",i_,[i.createElementVNode("div",s_,[g.value.length>0&&e.params.massActions!=null&&!e.params.massActions.hasOwnProperty("none")?(i.openBlock(),i.createElementBlock("div",l_,[i.createElementVNode("div",u_,i.toDisplayString(g.value.length),1),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":A[0]||(A[0]=V=>f.value=V),name:"dynamic-scroller-table__mass-select",class:"dynamic-scroller-table__mass-select custom-select",style:{width:"calc(100% - 60px)"},onChange:A[1]||(A[1]=V=>I(V))},[i.createElementVNode("option",c_,i.toDisplayString(p.value.dejstvie||"Дія"),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.massActions,(V,G)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:G},[V?(i.openBlock(),i.createElementBlock("option",{key:0,value:V.value},i.toDisplayString(V.title),9,d_)):i.createCommentVNode("",!0)],64))),128))],544),[[i.vModelSelect,f.value]])])):i.createCommentVNode("",!0),_.value?(i.openBlock(),i.createElementBlock("div",f_,[i.createElementVNode("div",{class:"dynamic-scroller-table__table-wrapper",style:i.normalizeStyle({"min-width":e.params.minTableWidth?e.params.minTableWidth+"px":"max-content"})},[_.value!=0?(i.openBlock(),i.createBlock(t_,{key:0,class:"dynamic-scroller-table__header",params:e.params,"all-select":y.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,scroll:v.value,"is-show-toggle-expand":C.value,onCheckbox:E,onSort:P,onChangeWidthColumn:R,onChangeTableSettingToDefault:O,onSwitchView:$,onChangeHeaderWidth:N},null,8,["params","all-select","selected-columns","width-columns","table-view-expanded","force-updating","scroll","is-show-toggle-expand"])):i.createCommentVNode("",!0),_.value!=0?(i.openBlock(),i.createElementBlock("div",m_,[e.json.items!=null?(i.openBlock(),i.createBlock(K2,{key:0,items:k.value,params:e.params,selected:g.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,"is-show-toggle-expand":C.value,onCheckbox:D,onGetData:A[2]||(A[2]=V=>a("getData",T())),onSelectUpdate:A[3]||(A[3]=(...V)=>a("selectUpdate",...V)),onOpen:A[4]||(A[4]=(...V)=>a("open",...V)),onOpenContext:A[5]||(A[5]=(...V)=>a("openContext",...V)),onInputEdit:A[6]||(A[6]=(...V)=>a("inputEdit",...V)),onOpenTagsModal:A[7]||(A[7]=(...V)=>a("openTagsModal",...V)),onDeleteTag:A[8]||(A[8]=(...V)=>a("deleteTag",...V)),onDeleteRow:A[9]||(A[9]=(...V)=>a("deleteRow",...V))},i.createSlots({_:2},[i.renderList(x.$slots,(V,G)=>({name:G,fn:i.withCtx(X=>[i.renderSlot(x.$slots,G,i.normalizeProps(i.guardReactiveProps(X??{})),void 0,!0)])}))]),1032,["items","params","selected","selected-columns","width-columns","table-view-expanded","force-updating","is-show-toggle-expand"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),_.value!=0&&e.params.footer?(i.openBlock(),i.createBlock(r_,{key:2,class:"dynamic-scroller-table__footer",params:e.params,"all-select":y.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,scroll:v.value,"is-show-toggle-expand":C.value,onCheckbox:E,onSort:P,onChangeWidthColumn:R,onChangeTableSettingToDefault:O,onSwitchView:$,onChangeHeaderWidth:N},null,8,["params","all-select","selected-columns","width-columns","table-view-expanded","force-updating","scroll","is-show-toggle-expand"])):(i.openBlock(),i.createElementBlock("div",h_,[i.createElementVNode("span",p_,i.toDisplayString(`${p.value.najdeno||"Знайдено"} ${_.value?_.value:"-"}`),1)]))],4)])):i.createCommentVNode("",!0),e.json&&_.value==0?(i.openBlock(),i.createElementBlock("div",v_,[i.createVNode(j,{class:"no-data"},{default:i.withCtx(()=>[A[10]||(A[10]=i.createElementVNode("img",{class:"no-data-img",src:"/image/dragons/Dragon_5_400.png",width:"200"},null,-1)),i.createElementVNode("h5",g_,i.toDisplayString(p.value.NoDataSadDino||"Даних немає"),1)]),_:1})])):i.createCommentVNode("",!0)])])])}}},__=ee(y_,[["__scopeId","data-v-b8ebd336"]]),k_=["aria-selected","disabled","onClick"],b_=i.defineComponent({__name:"SkyTabs",props:{modelValue:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref({opacity:"0"});let s=!1;function l(){const c=r.value,d=c==null?void 0:c.querySelector(".sky-tabs__btn--active");if(!c||!d)return;const f=c.getBoundingClientRect(),m=d.getBoundingClientRect();o.value={opacity:"1",width:`${m.width}px`,transform:`translateX(${Math.round(m.left-f.left)}px)`,...s?{}:{transition:"none"}}}function u(c){n.disabled||a("update:modelValue",c)}return i.watch(()=>[n.modelValue,n.options.length],()=>void i.nextTick(l)),i.onMounted(()=>{i.nextTick(()=>{l(),requestAnimationFrame(()=>{s=!0})}),window.addEventListener("resize",l)}),i.onBeforeUnmount(()=>window.removeEventListener("resize",l)),(c,d)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"tabsEl",ref:r,class:i.normalizeClass(["sky-tabs",{"sky-tabs--disabled":e.disabled}]),role:"tablist"},[i.createElementVNode("span",{class:"sky-tabs__indicator",style:i.normalizeStyle(o.value),"aria-hidden":"true"},null,4),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,f=>(i.openBlock(),i.createElementBlock("button",{key:f.value,type:"button",role:"tab",class:i.normalizeClass(["sky-tabs__btn",{"sky-tabs__btn--active":e.modelValue===f.value}]),"aria-selected":e.modelValue===f.value,disabled:e.disabled,onClick:m=>u(f.value)},i.toDisplayString(f.text),11,k_))),128))],2))}}),C_=ee(b_,[["__scopeId","data-v-989e5d03"]]),w_="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='1024'%20height='1024'%3e%3cmask%20id='doorCutout'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='1024'%20height='1024'%3e%3crect%20width='1024'%20height='1024'%20fill='white'/%3e%3cpath%20d='M0%200%20C0.71968964%20-0.00700928%201.43937927%20-0.01401855%202.18087769%20-0.02124023%20C4.53968888%20-0.03872211%206.89728194%20-0.02723241%209.25610352%20-0.01367188%20C10.90845467%20-0.01636993%2012.56080427%20-0.02025496%2014.21315002%20-0.02526855%20C17.6687844%20-0.03115055%2021.12400388%20-0.02264408%2024.57958984%20-0.00390625%20C28.99232552%200.01886496%2033.40408691%200.00576414%2037.81678677%20-0.01819611%20C41.22706843%20-0.03270484%2044.63712214%20-0.02802469%2048.04741096%20-0.01768494%20C49.67358581%20-0.0150307%2051.29978186%20-0.01824119%2052.92593193%20-0.02760315%20C69.87342689%20-0.10376397%2069.87342689%20-0.10376397%2075.44750977%204.51757812%20C81.77544038%2011.15115655%2081.12718673%2019.01439831%2081.01513672%2027.65429688%20C81.01372463%2029.18255059%2081.01452136%2030.7108077%2081.01734924%2032.23905945%20C81.01877857%2036.36891989%2080.98946805%2040.49804807%2080.95447946%2044.62773895%20C80.92313473%2048.95051825%2080.92027884%2053.273316%2080.91435242%2057.59619141%20C80.89883773%2065.773633%2080.85784165%2073.95073871%2080.80760497%2082.12803268%20C80.74116384%2093.18398679%2080.71425777%20104.24003333%2080.68509388%20115.29613686%20C80.63813785%20132.70353533%2080.5385101%20150.11022514%2080.44750977%20167.51757812%20C47.44750977%20167.51757812%2014.44750977%20167.51757812%20-19.55249023%20167.51757812%20C-19.75400541%20128.96996495%20-19.75400541%20128.96996495%20-19.79663086%20112.81054688%20C-19.82629345%20101.65499371%20-19.86115507%2090.49962943%20-19.9296875%2079.34423828%20C-19.9795767%2071.2196221%20-20.01179411%2063.09515924%20-20.02293271%2054.97039413%20C-20.02944217%2050.66966519%20-20.044704%2046.36937479%20-20.08114052%2042.06878662%20C-20.11518745%2038.01724955%20-20.12552586%2033.96632987%20-20.11802864%2029.91466331%20C-20.11939933%2028.43121162%20-20.12928048%2026.94773837%20-20.14851761%2025.46441078%20C-20.31994571%2011.55888315%20-20.31994571%2011.55888315%20-16.08115768%206.03028107%20C-11.33789555%201.33655478%20-6.67499482%200.01643261%200%200%20Z%20'%20fill='black'%20transform='translate(481.552490234375,561.482421875)'/%3e%3c/mask%3e%3cg%20mask='url(%23doorCutout)'%3e%3cpath%20d='M0%200%20C4.77025411%203.24811326%209.54995152%206.4822498%2014.33056641%209.71508789%20C15.31726318%2010.38239929%2016.30395996%2011.04971069%2017.32055664%2011.73724365%20C27.56943173%2018.65721894%2037.89827701%2025.45356978%2048.23681641%2032.23852539%20C63.70757381%2042.39575713%2079.08876899%2052.67577653%2094.4140625%2063.05102539%20C107.95573396%2072.21541636%20121.56891245%2081.26359889%20135.23681641%2090.23852539%20C150.70586805%20100.39616199%20166.08681738%20110.67430759%20181.41104126%20121.04901123%20C194.10175317%20129.63768216%20206.84992823%20138.13219047%20219.65756226%20146.54550171%20C226.93757749%20151.32917217%20234.20919481%20156.12561112%20241.48095703%20160.92181396%20C243.34111617%20162.14806389%20245.20180618%20163.37350884%20247.06298828%20164.59820557%20C252.65071885%20168.27520707%20258.22895331%20171.96583466%20263.7940979%20175.67694092%20C265.52028129%20176.82484576%20267.24966244%20177.96795933%20268.98251343%20179.10577393%20C283.07952443%20188.36868628%20295.16273494%20197.52844414%20300.04541016%20214.55883789%20C302.97062567%20228.72091575%20301.32633387%20242.71379426%20293.88916016%20255.24243164%20C286.10852553%20266.99615628%20274.11859478%20274.86442543%20260.23681641%20277.73852539%20C258.28165343%20277.82493738%20256.32376637%20277.85623255%20254.36669922%20277.85205078%20C253.18577698%20277.85197525%20252.00485474%20277.85189972%20250.78814697%20277.8518219%20C249.51823914%20277.84666061%20248.2483313%20277.84149933%20246.93994141%20277.83618164%20C245.63603455%20277.83476669%20244.33212769%20277.83335175%20242.9887085%20277.83189392%20C239.52978585%20277.82808406%20236.0709055%20277.8182669%20232.61199951%20277.80718994%20C229.07939221%20277.79694285%20225.54677805%20277.79238924%20222.01416016%20277.78735352%20C215.08836158%20277.77664321%20208.16259103%20277.75958523%20201.23681641%20277.73852539%20C201.23795557%20278.34510426%20201.23909473%20278.95168312%20201.24026841%20279.57664317%20C201.30746129%20315.55953322%20201.35890569%20351.54241244%20201.39001239%20387.52535222%20C201.39376433%20391.84974664%20201.39764732%20396.17414093%20201.40161133%20400.49853516%20C201.40239826%20401.35941279%20201.40318519%20402.22029042%20201.40399597%20403.10725526%20C201.41703558%20417.03062396%20201.44068144%20430.95395535%20201.46827479%20444.87730195%20C201.49636923%20459.17314928%20201.51300119%20473.46897712%20201.51908189%20487.76485091%20C201.52318997%20496.58001117%20201.53614612%20505.39506595%20201.56056581%20514.21019373%20C201.57647289%20520.26216649%20201.58120555%20526.31408503%20201.57732054%20532.36607715%20C201.57540669%20535.85324376%20201.57825679%20539.34022656%20201.59443283%20542.82736015%20C201.60943924%20546.61960446%20201.60573992%20550.41140365%20201.59757996%20554.20365906%20C201.60631848%20555.29027618%20201.615057%20556.3768933%20201.62406033%20557.49643821%20C201.53155137%20573.48857632%20197.13157326%20586.59455363%20186.02587891%20598.19165039%20C172.60172101%20610.45012511%20156.23132748%20612.35118168%20138.91059875%20612.23973083%20C137.21090757%20612.2436326%20135.51121967%20612.24928001%20133.81153935%20612.25650173%20C129.18243172%20612.27114826%20124.55366801%20612.26114008%20119.92457187%20612.24676502%20C114.91636288%20612.23559741%20109.90819987%20612.24761677%20104.8999939%20612.25660706%20C95.10615172%20612.27050136%2085.31243896%20612.26301198%2075.518603%20612.24793147%20C64.10406126%20612.23102762%2052.68955135%20612.23428707%2041.27500095%20612.23802555%20C20.90539448%20612.24389695%200.53584992%20612.22975977%20-19.83374023%20612.20507812%20C-39.58376383%20612.18115002%20-59.33370474%20612.17407849%20-79.08374023%20612.18457031%20C-100.61305041%20612.19598691%20-122.14232239%20612.19790113%20-143.67163211%20612.18347222%20C-145.96839797%20612.18194644%20-148.26516384%20612.18042608%20-150.5619297%20612.17891121%20C-151.69186566%20612.17815339%20-152.82180162%20612.17739558%20-153.98597806%20612.1766148%20C-161.93645035%20612.17187846%20-169.88690553%20612.17371873%20-177.83737755%20612.17797661%20C-187.52816674%20612.18290983%20-197.21887787%20612.17688934%20-206.90964922%20612.15708231%20C-211.85090274%20612.1472306%20-216.79203754%20612.14208234%20-221.73329735%20612.14997482%20C-226.26140177%20612.15705931%20-230.7892672%20612.15016259%20-235.31734023%20612.13237119%20C-236.95033363%20612.12834467%20-238.58334901%20612.1292962%20-240.21633407%20612.13589006%20C-258.08996439%20612.20185402%20-272.27416072%20608.69688708%20-285.54052734%20596.08227539%20C-296.5468394%20584.47632243%20-298.92412223%20570.50718428%20-298.88343811%20555.04544067%20C-298.88429254%20553.86016749%20-298.88514696%20552.67489431%20-298.88602728%20551.45370376%20C-298.88738794%20548.17219027%20-298.88426895%20544.89071643%20-298.87924922%20541.60920763%20C-298.87492603%20538.06735773%20-298.87639247%20534.52550964%20-298.87715149%20530.98365784%20C-298.87767554%20524.8499419%20-298.87454115%20518.71623661%20-298.86891365%20512.58252335%20C-298.86078256%20503.71423175%20-298.85818178%20494.8459453%20-298.85692566%20485.97765039%20C-298.85473767%20471.58901987%20-298.84808444%20457.20039502%20-298.83862305%20442.81176758%20C-298.82944238%20428.83553089%20-298.82236475%20414.85929574%20-298.81811523%20400.88305664%20C-298.81785251%20400.02139126%20-298.81758979%20399.15972588%20-298.8173191%20398.27194943%20C-298.81601405%20393.94917665%20-298.81475035%20389.62640386%20-298.8135072%20385.30363107%20C-298.80314247%20349.44859184%20-298.78553103%20313.59355906%20-298.76318359%20277.73852539%20C-299.40416992%20277.74740784%20-300.04515625%20277.75629028%20-300.70556641%20277.76544189%20C-307.45547447%20277.85482983%20-314.20521096%20277.91463373%20-320.95556641%20277.95825195%20C-323.46540165%20277.97820704%20-325.97519139%20278.00538092%20-328.48486328%20278.0402832%20C-348.80799272%20278.31557659%20-368.66938574%20278.38482639%20-384.45068359%20263.80102539%20C-393.99076069%20254.13445739%20-398.57107239%20241.89526285%20-399.07568359%20228.42602539%20C-398.73538597%20213.3678555%20-393.28635008%20200.77279137%20-382.53585815%20190.30438232%20C-376.7991329%20185.23695979%20-370.10257225%20181.27951023%20-363.66650391%20177.17529297%20C-359.73984285%20174.6710173%20-355.83613209%20172.13189378%20-351.93063354%20169.5947876%20C-349.89653031%20168.27369407%20-347.86130242%20166.95433065%20-345.82498169%20165.63665771%20C-336.43706498%20159.55523653%20-327.16208116%20153.31427141%20-317.90719604%20147.03289795%20C-301.69307684%20136.02910311%20-285.38256576%20125.18159042%20-269.00292969%20114.42602539%20C-255.35566021%20105.46147677%20-241.78420572%2096.39227956%20-228.26318359%2087.23852539%20C-212.91876201%2076.85032679%20-197.4921545%2066.59690855%20-182.00292969%2056.42602539%20C-168.35562859%2047.46145599%20-154.78552199%2038.3903693%20-141.26318359%2029.23852539%20C-127.12242047%2019.67603921%20-112.95779321%2010.15062943%20-98.72607422%200.72387695%20C-96.81938655%20-0.54018636%20-94.91422764%20-1.80655921%20-93.01074219%20-3.07543945%20C-56.60316438%20-27.33199629%20-35.65391528%20-24.285668%200%200%20Z%20'%20fill='%23FEFEFE'%20transform='translate(560.76318359375,217.261474609375)'/%3e%3c/g%3e%3c/svg%3e",E_={class:"sky-tile-card"},S_={class:"sky-tile-card-head"},T_=["src","alt"],D_={class:"sky-tile-card-titles"},O_={class:"sky-tile-card-title"},V_={key:0,class:"sky-tile-card-subtitle"},$_={key:0,class:"sky-tile-card-body"},x_={__name:"SkyTileCard",props:{title:{type:String,required:!0},subtitle:{type:String,default:""},imageUrl:{type:String,default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",E_,[i.createElementVNode("div",S_,[i.createElementVNode("div",{class:i.normalizeClass(["sky-tile-card-icon",{"is-default":!e.imageUrl&&!t.$slots.icon}])},[i.renderSlot(t.$slots,"icon",{},()=>[i.createElementVNode("img",{src:e.imageUrl||i.unref(w_),alt:e.title},null,8,T_)],!0)],2),i.createElementVNode("div",D_,[i.createElementVNode("h3",O_,i.toDisplayString(e.title),1),e.subtitle?(i.openBlock(),i.createElementBlock("p",V_,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)])]),t.$slots.default?(i.openBlock(),i.createElementBlock("div",$_,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)]))}},I_=ee(x_,[["__scopeId","data-v-ea9d56a4"]]),Si=Symbol("sky-table"),R_={class:"sky-table",role:"table"},B_=i.defineComponent({__name:"SkyTableRoot",props:{columns:{},minWidth:{default:"max-content"}},setup(e,{expose:t}){const n=e,a=i.ref(typeof window>"u"?1/0:window.innerWidth),r=()=>a.value=window.innerWidth;i.onMounted(()=>window.addEventListener("resize",r)),i.onBeforeUnmount(()=>window.removeEventListener("resize",r));const o=i.computed(()=>n.columns.filter(l=>!l.minWidthScreen||a.value>=l.minWidthScreen)),s=i.computed(()=>o.value.map(l=>l.width?`${l.width}px`:`${l.widthFr??1}fr`).join(" "));return i.provide(Si,{columns:o,gridTemplate:s}),t({visibleColumns:o}),(l,u)=>(i.openBlock(),i.createElementBlock("div",R_,[i.createElementVNode("div",{class:"sky-table__viewport",style:i.normalizeStyle({minWidth:e.minWidth})},[i.renderSlot(l.$slots,"default",{columns:o.value},void 0,!0)],4)]))}}),Ff=ee(B_,[["__scopeId","data-v-e343b115"]]),N_=i.defineComponent({__name:"SkyTableHeader",props:{sticky:{type:Boolean,default:!0}},setup(e){const t=i.inject(Si);return(n,a)=>{var r,o;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__header",{"is-sticky":e.sticky}]),role:"row",style:i.normalizeStyle({gridTemplateColumns:(r=i.unref(t))==null?void 0:r.gridTemplate.value})},[i.renderSlot(n.$slots,"default",{columns:((o=i.unref(t))==null?void 0:o.columns.value)??[]},void 0,!0)],6)}}}),jf=ee(N_,[["__scopeId","data-v-525d4a1b"]]),A_=["aria-sort"],P_={class:"sky-table__head-title"},M_=i.defineComponent({__name:"SkyTableHead",props:{column:{},sort:{}},emits:["sort"],setup(e,{emit:t}){const n=e,a=t,r=i.computed(()=>{const s=n.column.sortable;return s?typeof s=="string"?s:n.column.name:""}),o=i.computed(()=>{var s;return r.value&&((s=n.sort)==null?void 0:s.of)===r.value?n.sort.ot:""});return(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__head",[`is-${e.column.align??"left"}`,{"is-sortable":r.value}]]),role:"columnheader","aria-sort":o.value==="asc"?"ascending":o.value==="desc"?"descending":"none",onClick:l[0]||(l[0]=u=>r.value&&a("sort",r.value))},[i.renderSlot(s.$slots,"default",{},()=>[i.createElementVNode("span",P_,i.toDisplayString(e.column.title),1)],!0),r.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["sky-table__sort",{"is-active":o.value,"is-desc":o.value==="desc"}]),width:"10",height:"10",viewBox:"0 0 451.847 451.847","aria-hidden":"true"},[...l[1]||(l[1]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])],2)):i.createCommentVNode("",!0)],10,A_))}}),Uf=ee(M_,[["__scopeId","data-v-8dc32657"]]),L_={class:"sky-table__body",role:"rowgroup"},F_=i.defineComponent({__name:"SkyTableBody",props:{rows:{default:void 0},rowKey:{type:Function,default:(e,t)=>t}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",L_,[e.rows?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[e.rows.length?i.createCommentVNode("",!0):i.renderSlot(t.$slots,"empty",{},void 0,!0,0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.rows,(a,r)=>i.renderSlot(t.$slots,"default",{row:a,index:r},void 0,!0,e.rowKey(a,r))),128))],64)):i.renderSlot(t.$slots,"default",i.normalizeProps(i.guardReactiveProps({})),void 0,!0,1)]))}}),zf=ee(F_,[["__scopeId","data-v-949756f6"]]),j_=["data-index"],U_=i.defineComponent({__name:"SkyTableVirtualBody",props:{rows:{},rowKey:{type:Function,default:(e,t)=>t},estimateSize:{default:40},overscan:{default:6},dynamic:{type:Boolean,default:!1}},emits:["reach-end"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=Af.useVirtualizer(i.computed(()=>({count:n.rows.length,getScrollElement:()=>r.value,estimateSize:()=>n.estimateSize,overscan:n.overscan,getItemKey:c=>n.rowKey(n.rows[c],c)}))),s=i.computed(()=>o.value.getVirtualItems()),l=i.computed(()=>o.value.getTotalSize());function u(c){c instanceof Element&&o.value.measureElement(c)}return i.watch(()=>{const c=s.value;return c.length?c[c.length-1].index:-1},c=>{n.rows.length>0&&c>=n.rows.length-1&&a("reach-end")}),(c,d)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"scrollEl",ref:r,class:"sky-table__body sky-table__body--virtual",role:"rowgroup"},[e.rows.length?(i.openBlock(),i.createElementBlock("div",{key:1,class:"sky-table__virtual-sizer",style:i.normalizeStyle({height:`${l.value}px`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,f=>(i.openBlock(),i.createElementBlock("div",{key:String(f.key),ref_for:!0,ref:e.dynamic?u:void 0,"data-index":f.index,class:"sky-table__virtual-row",style:i.normalizeStyle({transform:`translateY(${f.start}px)`})},[i.renderSlot(c.$slots,"default",{row:e.rows[f.index],index:f.index},void 0,!0)],12,j_))),128))],4)):i.renderSlot(c.$slots,"empty",{},void 0,!0,0)],512))}}),Ll=ee(U_,[["__scopeId","data-v-e505464f"]]),z_=["aria-selected"],H_=i.defineComponent({__name:"SkyTableRow",props:{selected:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},setup(e){const t=i.inject(Si);return(n,a)=>{var r,o;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__row",{"is-selected":e.selected,"is-interactive":e.interactive}]),role:"row","aria-selected":e.selected||void 0,style:i.normalizeStyle({gridTemplateColumns:(r=i.unref(t))==null?void 0:r.gridTemplate.value})},[i.renderSlot(n.$slots,"default",{columns:((o=i.unref(t))==null?void 0:o.columns.value)??[]},void 0,!0)],14,z_)}}}),Hf=ee(H_,[["__scopeId","data-v-e787719d"]]),W_=i.defineComponent({__name:"SkyTableCell",props:{align:{default:"left"},noTruncate:{type:Boolean,default:!1}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__cell",[`is-${e.align}`,{"is-truncate":!e.noTruncate}]]),role:"cell"},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),Wf=ee(W_,[["__scopeId","data-v-1caaa68a"]]),Y_={class:"sky-table__empty"},K_={class:"sky-table__empty-text"},G_=i.defineComponent({__name:"SkyTableEmpty",props:{text:{default:"Даних немає"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",Y_,[i.renderSlot(t.$slots,"illustration",{},void 0,!0),i.renderSlot(t.$slots,"default",{},()=>[i.createElementVNode("p",K_,i.toDisplayString(e.text),1)],!0)]))}}),Yf=ee(G_,[["__scopeId","data-v-99a12e6e"]]),Kf=Xe.tableFeatures({columnFilteringFeature:Xe.columnFilteringFeature,columnSizingFeature:Xe.columnSizingFeature,columnVisibilityFeature:Xe.columnVisibilityFeature,globalFilteringFeature:Xe.globalFilteringFeature,rowPaginationFeature:Xe.rowPaginationFeature,rowSelectionFeature:Xe.rowSelectionFeature,rowSortingFeature:Xe.rowSortingFeature,coreRowModel:Xe.createCoreRowModel(),filteredRowModel:Xe.createFilteredRowModel(),sortedRowModel:Xe.createSortedRowModel(),paginatedRowModel:Xe.createPaginatedRowModel(),sortFns:Xe.sortFns,filterFns:Xe.filterFns});function q_(){return Xe.createColumnHelper()}function X_(e={}){const{initial:t={},tristate:n=!1}=e,a=i.ref({of:t.of??"",ot:t.ot??""});function r(l){return a.value.of!==l?a.value={of:l,ot:"asc"}:a.value.ot==="asc"?a.value={of:l,ot:"desc"}:a.value.ot==="desc"?a.value=n?{of:"",ot:""}:{of:l,ot:"asc"}:a.value={of:l,ot:"asc"},{...a.value}}return{sort:a,toggle:r,directionOf:l=>a.value.of===l?a.value.ot:"",reset:()=>{a.value={of:"",ot:""}}}}function Z_(e,t={}){const{rowId:n="id",selectable:a}=t,r=v=>typeof n=="function"?n(v):v[n],o=i.ref([]),s=i.ref(null),l=i.computed(()=>i.unref(e).filter(v=>a?a(v):!0)),u=i.computed(()=>o.value.map(r)),c=v=>u.value.includes(r(v)),d=i.computed(()=>l.value.length>0&&o.value.length>=l.value.length),f=i.computed(()=>o.value.length>0&&!d.value);function m(v){c(v)||(o.value=[...o.value,v])}function h(v){const k=r(v);o.value=o.value.filter(C=>r(C)!==k)}function g(v,k,C={}){const E=!c(v);if(C.shift&&s.value!==null){const D=i.unref(e),[w,T]=[s.value,k].sort((I,R)=>I-R);for(let I=w;I<=T;I+=1){const R=D[I];!R||a&&!a(R)||(E?m(R):h(R))}}else E?m(v):h(v);s.value=k}function y(){o.value=d.value?[]:[...l.value]}return{selected:o,selectedIds:u,isSelected:c,allSelected:d,someSelected:f,toggle:g,toggleAll:y,clear:()=>{o.value=[],s.value=null},remove:v=>{o.value=o.value.filter(k=>r(k)!==v)}}}function J_(e,t={}){const{storageKey:n,hidden:a=[]}=t,r=()=>Object.fromEntries(i.unref(e).map(d=>[d.name,!a.includes(d.name)])),o=()=>{const d=r();if(!n||typeof localStorage>"u")return d;try{const f=JSON.parse(localStorage.getItem(n)||"null");return f?{...d,...f}:d}catch{return d}},s=i.ref(o());n&&i.watch(s,d=>{try{localStorage.setItem(n,JSON.stringify(d))}catch{}},{deep:!0});const l=i.computed(()=>i.unref(e).filter(d=>s.value[d.name]!==!1));return{visibility:s,visibleColumns:l,toggle:d=>{s.value={...s.value,[d]:!s.value[d]}},reset:()=>{s.value=r()}}}const Q_={class:"sky-filter-search"},ek=["value","placeholder","aria-label"],tk=["aria-label"],nk=i.defineComponent({__name:"FilterSearch",props:{modelValue:{},placeholder:{},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(a,r)=>(i.openBlock(),i.createElementBlock("div",Q_,[i.createElementVNode("input",{class:"sky-filter-search__input",type:"text",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.label||e.placeholder,onInput:r[0]||(r[0]=o=>n("update:modelValue",o.target.value))},null,40,ek),e.modelValue.trim()?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",class:"sky-filter-search__clear","aria-label":`${e.label||e.placeholder} ✕`,onClick:r[1]||(r[1]=o=>n("update:modelValue",""))}," × ",8,tk)):i.createCommentVNode("",!0)]))}}),Gf=ee(nk,[["__scopeId","data-v-1ebab115"]]),ak={class:"sky-checkbox-filter__actions"},rk={class:"sky-checkbox-filter__options"},ok={class:"sky-checkbox-filter__actions sky-checkbox-filter__actions--footer"},ik=["onClick"],sk=i.defineComponent({__name:"SkyCheckboxFilter",props:{title:{},options:{},modelValue:{default:()=>[]},selectAllLabel:{default:"Обрати все"},clearLabel:{default:"Очистити"},doneLabel:{default:"Готово"},searchPlaceholder:{default:"Пошук"},selectAll:{type:Boolean,default:!0},searchable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(""),o=i.computed(()=>{const m=r.value.trim().toLowerCase();return m?n.options.filter(h=>h.name.toLowerCase().includes(m)):n.options}),s=i.computed({get:()=>n.modelValue,set:m=>a("update:modelValue",m)}),l=i.computed(()=>{if(s.value.length!==1)return"";const m=n.options.find(h=>h.value===s.value[0]);return m?m.name.length<20?m.name:m.name.slice(0,20)+"...":""}),u=i.computed(()=>l.value),c=i.computed(()=>s.value.length>1?s.value.length:"");function d(){s.value=n.options.map(m=>m.value)}function f(){s.value=[]}return(m,h)=>(i.openBlock(),i.createBlock(Ei,{class:"sky-checkbox-filter",title:e.title,summary:u.value,badge:c.value,disabled:e.disabled,onOpen:h[2]||(h[2]=g=>r.value=""),onClose:h[3]||(h[3]=g=>r.value="")},{default:i.withCtx(({close:g})=>[i.createElementVNode("div",ak,[e.selectAll?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",class:"sky-checkbox-filter__link",onClick:d},i.toDisplayString(e.selectAllLabel),1)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button",class:"sky-checkbox-filter__link",onClick:f},i.toDisplayString(e.clearLabel),1)]),e.searchable?(i.openBlock(),i.createBlock(Gf,{key:0,modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=y=>r.value=y),placeholder:e.searchPlaceholder,label:e.title},null,8,["modelValue","placeholder","label"])):i.createCommentVNode("",!0),i.createElementVNode("div",rk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,y=>(i.openBlock(),i.createElementBlock("div",{key:y.value,class:"sky-checkbox-filter__option"},[i.createVNode(wi,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=_=>s.value=_),value:y.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(y.name),1)]),_:2},1032,["modelValue","value"])]))),128))]),h[4]||(h[4]=i.createElementVNode("hr",{class:"sky-checkbox-filter__sep"},null,-1)),i.createElementVNode("div",ok,[i.createElementVNode("button",{type:"button",class:"sky-checkbox-filter__link",onClick:g},i.toDisplayString(e.doneLabel),9,ik)])]),_:1},8,["title","summary","badge","disabled"]))}}),lk=ee(sk,[["__scopeId","data-v-4f92da77"]]),uk=["aria-label"],ck=["aria-selected","onClick"],dk=["aria-selected","onClick"],fk={key:1,class:"sky-select-filter__empty"},mk=i.defineComponent({__name:"SkySelectFilter",props:{title:{},options:{},modelValue:{default:null},allLabel:{default:""},searchPlaceholder:{default:"Пошук"},emptyLabel:{default:"Нічого не знайдено"},searchable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(""),o=i.computed(()=>{const c=r.value.trim().toLowerCase();return c?n.options.filter(d=>d.name.toLowerCase().includes(c)):n.options}),s=i.computed(()=>n.modelValue==null?void 0:n.options.find(c=>c.value===n.modelValue)),l=i.computed(()=>{var d;const c=(d=s.value)==null?void 0:d.name;return c?c.length<20?c:c.slice(0,20)+"...":""});function u(c,d){a("update:modelValue",c),d()}return(c,d)=>(i.openBlock(),i.createBlock(Ei,{class:"sky-select-filter",title:e.title,summary:l.value,disabled:e.disabled,onOpen:d[1]||(d[1]=f=>r.value=""),onClose:d[2]||(d[2]=f=>r.value="")},{default:i.withCtx(({close:f})=>[e.searchable?(i.openBlock(),i.createBlock(Gf,{key:0,modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=m=>r.value=m),placeholder:e.searchPlaceholder,label:e.title},null,8,["modelValue","placeholder","label"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"sky-select-filter__options",role:"listbox","aria-label":e.title},[e.allLabel&&!r.value.trim()?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",role:"option",class:i.normalizeClass(["sky-select-filter__option",{"is-selected":e.modelValue==null}]),"aria-selected":e.modelValue==null,onClick:m=>u(null,f)},i.toDisplayString(e.allLabel),11,ck)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,m=>(i.openBlock(),i.createElementBlock("button",{key:m.value,type:"button",role:"option",class:i.normalizeClass(["sky-select-filter__option",{"is-selected":m.value===e.modelValue}]),"aria-selected":m.value===e.modelValue,style:i.normalizeStyle({paddingLeft:`${8+(m.depth??0)*14}px`}),onClick:h=>u(m.value,f)},i.toDisplayString(m.name),15,dk))),128)),o.value.length?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("p",fk,i.toDisplayString(e.emptyLabel),1))],8,uk)]),_:1},8,["title","summary","disabled"]))}}),hk=ee(mk,[["__scopeId","data-v-6dad32e8"]]),pk={key:0,class:"sky-table-mass"},vk={class:"sky-table-mass__count"},gk={value:""},yk=["value"],_k=i.defineComponent({__name:"TableMassActions",props:{count:{},actions:{},placeholder:{default:"Дія"}},emits:["action"],setup(e,{emit:t}){const n=e,a=t,r=i.ref("");i.watch(()=>n.count,s=>{s===0&&(r.value="")});function o(s){const l=s.target.value;l&&(a("action",l),r.value="")}return(s,l)=>e.count>0?(i.openBlock(),i.createElementBlock("div",pk,[i.createElementVNode("span",vk,i.toDisplayString(e.count),1),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),class:"sky-table-mass__select",onChange:o},[i.createElementVNode("option",gk,i.toDisplayString(e.placeholder),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.actions,u=>(i.openBlock(),i.createElementBlock("option",{key:u.value,value:u.value},i.toDisplayString(u.title),9,yk))),128))],544),[[i.vModelSelect,r.value]]),i.renderSlot(s.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)}}),kk=ee(_k,[["__scopeId","data-v-9fb8b310"]]),bk=["aria-expanded","title"],Ck={key:0,class:"sky-table-columns__menu"},wk={class:"sky-table-columns__header"},Ek=["checked","onChange"],Sk=i.defineComponent({__name:"TableColumnSettings",props:{columns:{},modelValue:{},title:{},resetLabel:{}},emits:["update:modelValue","reset"],setup(e,{emit:t}){const n=t,a=i.ref(!1),r=i.ref(null);function o(l,u){n("update:modelValue",{...u,[l]:!u[l]})}function s(l){a.value&&r.value&&!r.value.contains(l.target)&&(a.value=!1)}return i.onMounted(()=>document.addEventListener("mousedown",s)),i.onBeforeUnmount(()=>document.removeEventListener("mousedown",s)),(l,u)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"root",ref:r,class:"sky-table-columns"},[i.createElementVNode("button",{type:"button",class:"sky-table-columns__trigger","aria-expanded":a.value,title:e.title??"Колонки",onClick:u[0]||(u[0]=c=>a.value=!a.value)},[...u[2]||(u[2]=[i.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[i.createElementVNode("path",{fill:"currentColor",d:"M2 2h3v12H2zM6.5 2h3v12h-3zM11 2h3v12h-3z",opacity:"0.85"})],-1)])],8,bk),a.value?(i.openBlock(),i.createElementBlock("div",Ck,[i.createElementVNode("div",wk,i.toDisplayString(e.title??"Колонки"),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.columns,c=>(i.openBlock(),i.createElementBlock("label",{key:c.name,class:"sky-table-columns__item"},[i.createElementVNode("input",{type:"checkbox",checked:e.modelValue[c.name]!==!1,onChange:d=>o(c.name,e.modelValue)},null,40,Ek),i.createElementVNode("span",null,i.toDisplayString(c.title??c.name),1)]))),128)),i.createElementVNode("button",{type:"button",class:"sky-table-columns__reset",onClick:u[1]||(u[1]=c=>n("reset"))},i.toDisplayString(e.resetLabel??"Скинути"),1)])):i.createCommentVNode("",!0)],512))}}),Tk=ee(Sk,[["__scopeId","data-v-23cf2224"]]),Dk=i.defineComponent({__name:"TableVirtualBody",props:{items:{},keyField:{default:"id"},minItemSize:{default:36},sizeDependencies:{type:Function,default:void 0}},emits:["reach-end"],setup(e,{emit:t}){const n=e,a=t;function r(o,s){return(o==null?void 0:o[n.keyField])??s}return(o,s)=>(i.openBlock(),i.createBlock(Ll,{rows:e.items,"row-key":r,"estimate-size":e.minItemSize,dynamic:"",onReachEnd:s[0]||(s[0]=l=>a("reach-end"))},{default:i.withCtx(({row:l,index:u})=>[i.renderSlot(o.$slots,"default",{item:l,index:u,active:!0})]),_:3},8,["rows","estimate-size"]))}}),Ok={class:"sky-data-table"},Vk={key:0,class:"sky-data-table__toolbar"},$k={key:0,class:"sky-data-table__search"},xk={key:0,class:"sky-data-table__pagination"},Ik={class:"sky-data-table__count"},Rk={class:"sky-data-table__pager"},Bk=["disabled"],Nk={class:"sky-data-table__page"},Ak=["disabled"],Pk=i.defineComponent({__name:"SkyDataTable",props:{columns:{},data:{},features:{default:void 0},rowId:{type:[String,Function],default:void 0},pageSize:{default:0},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Пошук…"},initialSorting:{default:void 0},emptyText:{default:"Даних немає"},interactiveRows:{type:Boolean,default:!1},virtual:{type:[Boolean,Object]}},emits:["row-click","reach-end"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=Xe.useTable({features:a.features??Kf,columns:i.computed(()=>a.columns),data:i.computed(()=>a.data),getRowId:typeof a.rowId=="function"?_=>a.rowId(_):a.rowId?_=>String(_[a.rowId]):void 0,initialState:{...a.initialSorting?{sorting:a.initialSorting}:{},...a.pageSize?{pagination:{pageIndex:0,pageSize:a.pageSize}}:{}}}),s=i.computed(()=>o.getVisibleLeafColumns().map(_=>{const p=_.columnDef.meta??{},v=_.columnDef.size;return{name:_.id,width:p.widthFr?void 0:typeof v=="number"?v:void 0,widthFr:p.widthFr,align:p.align,minWidthScreen:p.minWidthScreen}})),l=i.computed(()=>o.getHeaderGroups()),u=i.computed(()=>a.pageSize>0?o.getRowModel().rows:o.getPrePaginatedRowModel().rows),c=i.computed({get:()=>{var _;return((_=o.atoms.globalFilter)==null?void 0:_.get())??""},set:_=>o.setGlobalFilter(_)}),d=i.computed(()=>{var _;return(_=o.atoms.pagination)==null?void 0:_.get()}),f=i.computed(()=>a.pageSize>0&&o.getPageCount()>1);function m(_){var p;return((p=s.value.find(v=>v.name===_))==null?void 0:p.align)??"left"}function h(_){return _.id}const g=i.computed(()=>!!a.virtual),y=i.computed(()=>typeof a.virtual=="object"&&a.virtual!==null?a.virtual:{});return a.virtual&&a.pageSize>0&&console.warn("[SkyDataTable] `virtual` і `pageSize` разом не мають сенсу: пагінація вже обмежує кількість рядків у DOM. Лишіть щось одне — pageSize={0} для віртуалізації."),t({table:o}),(_,p)=>(i.openBlock(),i.createElementBlock("div",Ok,[i.renderSlot(_.$slots,"toolbar",{table:i.unref(o)},()=>[e.searchable||_.$slots.actions?(i.openBlock(),i.createElementBlock("div",Vk,[e.searchable?(i.openBlock(),i.createElementBlock("div",$k,[i.createVNode(Lf,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=v=>c.value=v),placeholder:e.searchPlaceholder},null,8,["modelValue","placeholder"])])):i.createCommentVNode("",!0),i.renderSlot(_.$slots,"actions",{table:i.unref(o)},void 0,!0)])):i.createCommentVNode("",!0)],!0),i.createVNode(Ff,{columns:s.value,class:"sky-data-table__table"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,v=>(i.openBlock(),i.createBlock(jf,{key:v.id},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.headers,k=>(i.openBlock(),i.createBlock(Uf,{key:k.id,column:{name:k.column.id,align:m(k.column.id),sortable:k.column.getCanSort()},sort:{of:k.column.getIsSorted()?k.column.id:"",ot:k.column.getIsSorted()==="desc"?"desc":"asc"},onSort:C=>k.column.toggleSorting()},{default:i.withCtx(()=>[k.isPlaceholder?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xe.FlexRender),{key:0,render:k.column.columnDef.header,props:k.getContext()},null,8,["render","props"]))]),_:2},1032,["column","sort","onSort"]))),128))]),_:2},1024))),128)),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.value?Ll:zf),i.mergeProps({rows:u.value,"row-key":h},g.value?y.value:{},{onReachEnd:p[1]||(p[1]=v=>r("reach-end"))}),{empty:i.withCtx(()=>[i.createVNode(Yf,{text:e.emptyText},{default:i.withCtx(()=>[i.renderSlot(_.$slots,"empty",{},void 0,!0)]),_:3},8,["text"])]),default:i.withCtx(({row:v})=>[i.createVNode(Hf,{selected:v.getIsSelected(),interactive:e.interactiveRows,onClick:k=>r("row-click",v.original)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.getVisibleCells(),k=>(i.openBlock(),i.createBlock(Wf,{key:k.id,align:m(k.column.id),"no-truncate":""},{default:i.withCtx(()=>[i.createVNode(i.unref(Xe.FlexRender),{render:k.column.columnDef.cell,props:k.getContext()},null,8,["render","props"])]),_:2},1032,["align"]))),128))]),_:2},1032,["selected","interactive","onClick"])]),_:3},16,["rows"]))]),_:3},8,["columns"]),i.renderSlot(_.$slots,"footer",{table:i.unref(o)},()=>{var v;return[f.value?(i.openBlock(),i.createElementBlock("div",xk,[i.createElementVNode("span",Ik," Знайдено "+i.toDisplayString(i.unref(o).getRowCount()),1),i.createElementVNode("div",Rk,[i.createElementVNode("button",{type:"button",class:"sky-data-table__page-btn",disabled:!i.unref(o).getCanPreviousPage(),onClick:p[2]||(p[2]=k=>i.unref(o).previousPage())}," ‹ ",8,Bk),i.createElementVNode("span",Nk,i.toDisplayString((((v=d.value)==null?void 0:v.pageIndex)??0)+1)+" / "+i.toDisplayString(i.unref(o).getPageCount()),1),i.createElementVNode("button",{type:"button",class:"sky-data-table__page-btn",disabled:!i.unref(o).getCanNextPage(),onClick:p[3]||(p[3]=k=>i.unref(o).nextPage())}," › ",8,Ak)])])):i.createCommentVNode("",!0)]},!0)]))}}),Mk=ee(Pk,[["__scopeId","data-v-7988d0cf"]]),Lk=["title","aria-expanded"],Fk={key:0,class:"sky-dt-columns__menu"},jk={class:"sky-dt-columns__header"},Uk=["checked","onChange"],zk=i.defineComponent({__name:"SkyDataTableColumnToggle",props:{table:{},title:{default:"Колонки"},resetLabel:{default:"Показати всі"}},setup(e){const t=e,n=i.ref(!1),a=i.ref(null),r=i.computed(()=>t.table.getAllLeafColumns().filter(s=>{var l;return((l=s.getCanHide)==null?void 0:l.call(s))!==!1&&s.columnDef.header}));function o(s){n.value&&a.value&&!a.value.contains(s.target)&&(n.value=!1)}return i.onMounted(()=>document.addEventListener("mousedown",o)),i.onBeforeUnmount(()=>document.removeEventListener("mousedown",o)),(s,l)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"root",ref:a,class:"sky-dt-columns"},[i.createElementVNode("button",{type:"button",class:"sky-dt-columns__trigger",title:e.title,"aria-expanded":n.value,onClick:l[0]||(l[0]=u=>n.value=!n.value)},[...l[2]||(l[2]=[i.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[i.createElementVNode("path",{fill:"currentColor",d:"M2 2h3v12H2zM6.5 2h3v12h-3zM11 2h3v12h-3z"})],-1)])],8,Lk),n.value?(i.openBlock(),i.createElementBlock("div",Fk,[i.createElementVNode("div",jk,i.toDisplayString(e.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,u=>(i.openBlock(),i.createElementBlock("label",{key:u.id,class:"sky-dt-columns__item"},[i.createElementVNode("input",{type:"checkbox",checked:u.getIsVisible(),onChange:c=>u.toggleVisibility()},null,40,Uk),i.createElementVNode("span",null,i.toDisplayString(typeof u.columnDef.header=="string"?u.columnDef.header:u.id),1)]))),128)),i.createElementVNode("button",{type:"button",class:"sky-dt-columns__reset",onClick:l[1]||(l[1]=u=>e.table.resetColumnVisibility())},i.toDisplayString(e.resetLabel),1)])):i.createCommentVNode("",!0)],512))}}),Hk=ee(zk,[["__scopeId","data-v-a723f9fe"]]);var xo;function Wk(e){return Qf(e)||em(e)||Ti(e)||Jf()}function ec(e,t,n,a){var r=Us(tr(e.prototype),t,n);return typeof r=="function"?function(o){return r.apply(n,o)}:r}function Us(){return Us=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var a=Yk(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Us.apply(null,arguments)}function Yk(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=tr(e))!==null;);return e}function tc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tc(Object(n),!0).forEach(function(a){le(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tc(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(h,g,y,_){var p=g&&g.prototype instanceof l?g:l,v=Object.create(p.prototype);return Et(v,"_invoke",function(k,C,E){var D,w,T,I=0,R=E||[],O=!1,$={p:0,n:0,v:e,a:N,f:N.bind(e,4),d:function(x,A){return D=x,w=0,T=e,$.n=A,s}};function N(P,x){for(w=P,T=x,t=0;!O&&I&&!A&&t<R.length;t++){var A,j=R[t],V=$.p,G=j[2];P>3?(A=G===x)&&(T=j[(w=j[4])?5:(w=3,3)],j[4]=j[5]=e):j[0]<=V&&((A=P<2&&V<j[1])?(w=0,$.v=x,$.n=j[1]):V<G&&(A=P<3||j[0]>x||x>G)&&(j[4]=P,j[5]=x,$.n=G,w=0))}if(A||P>1)return s;throw O=!0,x}return function(P,x,A){if(I>1)throw TypeError("Generator is already running");for(O&&x===1&&N(x,A),w=x,T=A;(t=w<2?e:T)||!O;){D||(w?w<3?(w>1&&($.n=-1),N(w,T)):$.n=T:$.v=T);try{if(I=2,D){if(w||(P="next"),t=D[P]){if(!(t=t.call(D,T)))throw TypeError("iterator result is not an object");if(!t.done)return t;T=t.value,w<2&&(w=0)}else w===1&&(t=D.return)&&t.call(D),w<2&&(T=TypeError("The iterator does not provide a '"+P+"' method"),w=1);D=e}else if((t=(O=$.n<0)?T:k.call(C,$))!==s)break}catch(j){D=e,w=1,T=j}finally{I=1}}return{value:t,done:O}}}(h,y,_),!0),v}var s={};function l(){}function u(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(Et(t={},a,function(){return this}),t),f=c.prototype=l.prototype=Object.create(d);function m(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Et(h,r,"GeneratorFunction")),h.prototype=Object.create(f),h}return u.prototype=c,Et(f,"constructor",c),Et(c,"constructor",u),u.displayName="GeneratorFunction",Et(c,r,"GeneratorFunction"),Et(f),Et(f,r,"Generator"),Et(f,a,function(){return this}),Et(f,"toString",function(){return"[object Generator]"}),(_e=function(){return{w:o,m}})()}function Et(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Et=function(s,l,u,c){function d(f,m){Et(s,f,function(h){return this._invoke(f,m,h)})}l?r?r(s,l,{value:u,enumerable:!c,configurable:!c,writable:!c}):s[l]=u:(d("next",0),d("throw",1),d("return",2))},Et(e,t,n,a)}function nc(e,t,n,a,r,o,s){try{var l=e[o](s),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(a,r)}function ot(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){var o=e.apply(t,n);function s(u){nc(o,a,r,s,l,"next",u)}function l(u){nc(o,a,r,s,l,"throw",u)}s(void 0)})}}function yo(e,t,n){return t=tr(t),Kk(e,Xf()?Reflect.construct(t,n||[],tr(e).constructor):t.apply(e,n))}function Kk(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qf(e)}function qf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xf=function(){return!!e})()}function tr(e){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tr(e)}function _o(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zs(e,t)}function zs(e,t){return zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zs(e,t)}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gk(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Zf(a.key),a)}}function Ne(e,t,n){return t&&Gk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function le(e,t,n){return(t=Zf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e){var t=qk(e,"string");return typeof t=="symbol"?t:t+""}function qk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lt(e,t){return Qf(e)||Xk(e,t)||Ti(e,t)||Jf()}function Jf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
},clearRange(){const e=this.calendar.multipleDateRange.findIndex(t=>t.end===this.day.date);this.calendar.multipleDateRange.splice(e,1)},dayMouseOver(){this.$emit("dayMouseOver",this.day.date)},hasSlot(e="default"){return!!this.$parent.$parent.$slots[e]},isDisabledDate(e){const t=this.fConfigs.disabledDates;return this.isDateIncludedInDatesCollection(e,t)||!this.isEnabledDate(e)},isEnabledDate(e){const t=this.fConfigs.enabledDates;return!t.length||this.isDateIncludedInDatesCollection(e,t)},isDateIncludedInDatesCollection(e,t){let n=new Date;n.setHours(0,0,0,0);let a=this.helpCalendar.getDateFromFormat(e);return t.includes(e)||t.includes("beforeToday")&&a.getTime()<n.getTime()||t.includes("afterToday")&&a.getTime()>n.getTime()},getClassNames(e){let t=[];(!this.hasSlot("default")||this.alwaysUseDefaultClasses)&&t.push("vfc-span-day");let n=this.helpCalendar.getDateFromFormat(e.date).getDay()-1;n===-1&&(n=6);let a=this.fConfigs.dayNames[n];this.fConfigs.disabledDayNames.includes(a)&&(e.hide=!0,t.push("vfc-cursor-not-allowed"));let r=this.helpCalendar.getDateFromFormat(e.date);if(new Date().setHours(0,0,0,0),this.isDisabledDate(e.date)&&(t.push("vfc-disabled"),t.push("vfc-cursor-not-allowed")),this.fConfigs.limits){let s=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),l=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime();(r.getTime()<s||r.getTime()>l)&&(t.push("vfc-disabled"),t.push("vfc-cursor-not-allowed"))}if(e.hide&&t.push("vfc-hide"),e.isToday&&t.push("vfc-today"),!e.hideLeftAndRightDays&&!this.fConfigs.disabledDayNames.includes(a)&&(e.isMarked?t.push("vfc-marked"):e.isHovered&&t.push("vfc-hovered"),this.fConfigs.markedDates.includes(e.date)&&t.push("vfc-borderd"),Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.forEach(s=>{this.helpCalendar.getDateFromFormat(s.start)<=this.helpCalendar.getDateFromFormat(e.date)&&this.helpCalendar.getDateFromFormat(s.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),e.date===s.start?t.push("vfc-start-marked"):e.date===s.end&&t.push("vfc-end-marked")}):this.fConfigs.markedDateRange.start&&this.fConfigs.markedDateRange.end?(this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(e.date)&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),e.date===this.fConfigs.markedDateRange.start?t.push("vfc-start-marked"):e.date===this.fConfigs.markedDateRange.end&&t.push("vfc-end-marked")):(this.fConfigs.markedDateRange.start&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.start)<=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked"),this.fConfigs.markedDateRange.end&&this.helpCalendar.getDateFromFormat(this.fConfigs.markedDateRange.end)>=this.helpCalendar.getDateFromFormat(e.date)&&t.push("vfc-marked")),t.push("vfc-hover")),this.fConfigs.isMultipleDateRange&&("".inRange||this.inRangeInit(),(e.isMarked||~this.calendar.multipleDateRange.map(s=>s.start.split(" ")[0]).indexOf(e.date)||~this.calendar.multipleDateRange.map(s=>s.end.split(" ")[0]).indexOf(e.date)||e.date.inRange(this.calendar.multipleDateRange))&&t.push("vfc-marked"),this.fConfigs.markedDates.includes(e.date)&&t.push("vfc-borderd"),~this.calendar.multipleDateRange.map(s=>s.start.split(" ")[0]).indexOf(e.date)&&t.push("vfc-start-marked"),~this.calendar.multipleDateRange.map(s=>s.end.split(" ")[0]).indexOf(e.date)&&t.push("vfc-end-marked")),typeof this.fConfigs.markedDates=="object"){let s=this.fConfigs.markedDates.find(l=>l.date===e.date);typeof s<"u"&&t.push(s.class)}return e.date===this.calendar.dateRange.start.split(" ")[0]&&t.push("vfc-start-marked"),e.date===this.calendar.dateRange.end.split(" ")[0]&&t.push("vfc-end-marked"),(e.date===this.calendar.selectedDate||this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(s=>s.date===e.date))&&t.push("vfc-borderd"),t}}},n1={class:"vfc-day"},a1={key:0,class:"vfc-base-start"},r1={key:1,class:"vfc-base-end"};function o1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",n1,[o.startActive?(i.openBlock(),i.createElementBlock("div",a1)):i.createCommentVNode("",!0),o.endActive?(i.openBlock(),i.createElementBlock("div",r1)):i.createCommentVNode("",!0),n.day.hideLeftAndRightDays?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(o.getClassNames(n.day)),onClick:t[3]||(t[3]=i.withModifiers(s=>e.$parent.$parent.clickDay(n.day,o.isDisabledDate),["self"])),onMouseover:t[4]||(t[4]=(...s)=>o.dayMouseOver&&o.dayMouseOver(...s))},[i.renderSlot(e.$slots,"default",{week:n.week,day:n.day},()=>[i.createTextVNode(i.toDisplayString(n.day.day),1)],!0),o.timesShow?(i.openBlock(),i.createElementBlock("span",{key:0,onClick:t[0]||(t[0]=(...s)=>o.clearRange&&o.clearRange(...s)),class:"times"},"×")):i.createCommentVNode("",!0),o.numberShow?(i.openBlock(),i.createElementBlock("span",{key:1,onMouseover:t[1]||(t[1]=s=>r.toolTip&&(r.onNumber=!0)),onMouseleave:t[2]||(t[2]=s=>r.onNumber=!1),class:"number"},[i.createTextVNode(i.toDisplayString(o.getDaysNumber)+" ",1),i.withDirectives(i.createElementVNode("div",{class:"toolTip"},i.toDisplayString(o.toolTipTxt().join(" ")),513),[[i.vShow,r.toolTip&&r.onNumber]])],32)):i.createCommentVNode("",!0)],34))])}const i1=ee(t1,[["render",o1],["__scopeId","data-v-b7b929c3"]]),s1={name:"MonthYearPicker",props:{calendarKey:{type:Number,default:0},changeYearStep:{type:Number,default:3}},data(){return{delta:0}},watch:{delta(e){e<-new Date().getFullYear()&&(this.delta=0)}},methods:{changePicker(e){if(this.$parent.showMonthPicker){e==="right"?this.$parent.NextYear(this.calendarKey):this.$parent.PreYear(this.calendarKey);return}e==="right"?this.delta+=this.changeYearStep:this.delta-=this.changeYearStep}}},l1={class:"vfc-months-container"},u1={class:"vfc-content vfc-content-MY-picker"},c1={class:"vfc-navigation-buttons"},d1={class:"vfc-months"},f1=["onClick"],m1=["onClick"];function h1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",l1,[i.createElementVNode("div",u1,[i.createElementVNode("div",c1,[i.createElementVNode("div",{onClick:t[0]||(t[0]=s=>o.changePicker("left"))},[...t[3]||(t[3]=[i.createElementVNode("div",{class:"vfc-arrow-left"},null,-1)])]),i.createElementVNode("h2",{class:i.normalizeClass(["vfc-top-date",r.delta!==0&&"vfc-top-date-has-delta"]),onClick:t[1]||(t[1]=s=>r.delta=0)},[t[4]||(t[4]=i.createElementVNode("span",{class:"vfc-popover-caret"},null,-1)),i.createTextVNode(" "+i.toDisplayString(e.$parent.listCalendars[n.calendarKey].date.getFullYear()),1)],2),i.createElementVNode("div",{onClick:t[2]||(t[2]=s=>o.changePicker("right"))},[...t[5]||(t[5]=[i.createElementVNode("div",{class:"vfc-arrow-right"},null,-1)])])]),i.createElementVNode("div",d1,[e.$parent.showMonthPicker?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.$parent.fConfigs.shortMonthNames,(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-item",{"vfc-selected":e.$parent.listCalendars[n.calendarKey].date.getMonth()===l}]),key:l,onClick:u=>e.$parent.pickMonth(l,n.calendarKey)},i.toDisplayString(s),11,f1))),128)):e.$parent.showYearPicker?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.$parent.getYearList(e.$parent.listCalendars[n.calendarKey].date,r.delta),(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vfc-item",{"vfc-selected":e.$parent.listCalendars[n.calendarKey].date.getFullYear()===s.year}]),key:l,onClick:u=>e.$parent.pickYear(s.year,n.calendarKey)},i.toDisplayString(s.year),11,m1))),128)):i.createCommentVNode("",!0)])])])}const p1=ee(s1,[["render",h1]]),v1={name:"PickerInputs",props:{fConfigs:{type:Object,required:!0},singleSelectedDate:{type:String,required:!0},calendar:{type:Object,required:!0}},computed:{singleSelectedDateModel:{get(){return this.singleSelectedDate},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.selectedDate=e)}},dateRangeSelectedStartDate:{get(){return this.calendar.dateRange.start?this.calendar.dateRange.start:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.dateRange.start=e)}},dateRangeSelectedEndDate:{get(){return this.calendar.dateRange.end?this.calendar.dateRange.end:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.dateRange.end=e)}}}},g1=["placeholder","readonly","maxlength"],y1=["placeholder","readonly","maxlength"],_1=["placeholder","readonly","maxlength"],k1={class:"vfc-tags-input-wrapper-default vfc-tags-input"},b1=["innerHTML"],C1=["onClick"];function w1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",null,[n.fConfigs.isModal&&n.fConfigs.isDateRange?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vfc-multiple-input",{"vfc-dark":n.fConfigs.isDark}])},[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:o.dateRangeSelectedStartDate,endDate:o.dateRangeSelectedEndDate,isTypeable:n.fConfigs.isTypeable},()=>[i.withDirectives(i.createElementVNode("input",{type:"text",title:"Start Date","onUpdate:modelValue":t[0]||(t[0]=s=>o.dateRangeSelectedStartDate=s),placeholder:n.fConfigs.placeholder.split(" ")[0],readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,g1),[[i.vModelText,o.dateRangeSelectedStartDate]]),i.withDirectives(i.createElementVNode("input",{type:"text",title:"End Date","onUpdate:modelValue":t[1]||(t[1]=s=>o.dateRangeSelectedEndDate=s),placeholder:n.fConfigs.placeholder.split(" ")[0],readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,y1),[[i.vModelText,o.dateRangeSelectedEndDate]])])],2)):n.fConfigs.isModal&&n.fConfigs.isDatePicker?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass({"vfc-dark":n.fConfigs.isDark})},[i.renderSlot(e.$slots,"datePickerInput",{selectedDate:n.singleSelectedDate,isTypeable:n.fConfigs.isTypeable},()=>[i.withDirectives(i.createElementVNode("input",{class:"vfc-single-input",type:"text",title:"Date","onUpdate:modelValue":t[2]||(t[2]=s=>o.singleSelectedDateModel=s),placeholder:n.fConfigs.placeholder,readonly:!n.fConfigs.isTypeable,maxlength:n.fConfigs.dateFormat.length},null,8,_1),[[i.vModelText,o.singleSelectedDateModel]])])],2)):n.fConfigs.isModal&&n.fConfigs.isMultipleDatePicker?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["vfc-tags-input-root",{"vfc-dark":n.fConfigs.isDark}])},[i.createElementVNode("div",k1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.calendar.selectedDates,(s,l)=>(i.openBlock(),i.createElementBlock("span",{class:"vfc-tags-input-badge vfc-tags-input-badge-pill vfc-tags-input-badge-selected-default",key:l},[i.createElementVNode("span",{innerHTML:s.date},null,8,b1),i.createElementVNode("a",{href:"#",class:"vfc-tags-input-remove",onClick:i.withModifiers(u=>e.removeFromSelectedDates(l),["prevent"])},null,8,C1)]))),128)),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>n.calendar.selectedDatesItem=s),onKeydown:t[4]||(t[4]=i.withKeys(i.withModifiers((...s)=>e.$parent.addToSelectedDates&&e.$parent.addToSelectedDates(...s),["prevent"]),["enter"])),type:"text",placeholder:"Add a date"},null,544),[[i.vModelText,n.calendar.selectedDatesItem]])])],2)):i.createCommentVNode("",!0)])}const E1=ee(v1,[["render",w1]]),S1={name:"Footer"},T1={class:"footerCon"};function D1(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",T1,[i.renderSlot(e.$slots,"cleaner",{},void 0,!0),i.renderSlot(e.$slots,"footer",{},void 0,!0)])}const O1=ee(S1,[["render",D1],["__scopeId","data-v-85f28d28"]]),V1=(e,t)=>!!e&&!!t&&(e===t||e.contains(t)),ha=()=>new Date().getUTCMilliseconds(),$1={name:"FunctionalCalendar",components:{MonthYearPicker:p1,TimePicker:Kg,PickerInputs:E1,Arrows:Xg,Footer:O1,Day:i1,WeekNumbers:e1},mixins:[Ag],computed:{startDMY(){return this.calendar.dateRange.start?this.calendar.dateRange.start.split(" ")[0]:""},endDMY(){return this.calendar.dateRange.end?this.calendar.dateRange.end.split(" ")[0]:""},rangeIsSelected(){return this.isMultipleDateRange?this.calendar.multipleDateRange.length>0:!!(this.calendar.dateRange.end&&this.calendar.dateRange.start)},helpCalendar(){return new Ng(this.fConfigs.sundayStart,this.checkHiddenElement("leftAndRightDays"),this.fConfigs.dateFormat,this.fConfigs.dayNames)},singleSelectedDate:{get(){let e="";if(this.displayTimeInput){const t=["HH:MM","HH:mm","hh:MM","hh:mm","MM:HH","mm:HH","MM:hh","mm:hh"];let n=this.fConfigs.dateFormat;this.dateFormat&&(n=this.dateFormat),t.indexOf(n.split(" ")[1])>3?e+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].reverse().join(":"):e+=" "+[this.calendar.selectedHour,this.calendar.selectedMinute].join(":")}return this.calendar.selectedDate?this.calendar.selectedDate+e:""},set(e){e=this.helpCalendar.mask(e),this.helpCalendar.getDateFromFormat(e).getMonth()&&(this.calendar.selectedDate=e)}}},created(){this.setConfigs(),this.initCalendar()},mounted(){this.displayTimeInput&&(this.fConfigs.placeholder.split(" ")[1]||(this.fConfigs.placeholder+=" hh:mm")),this.popoverElement=this.$refs.popoverElement,this.popoverElement.addEventListener("focusin",this.onFocusIn),this.popoverElement.addEventListener("focusout",this.onFocusOut),window.addEventListener("click",this.hideMonthYearPicker,{capture:!0}),this.$watch("value",function(e){if(typeof e=="object"&&(e.hasOwnProperty("dateRange")||e.hasOwnProperty("selectedDate")))this.calendar=e;else if(typeof e=="object"&&e.hasOwnProperty("multipleDateRange")){this.calendar.multipleDateRange=e.multipleDateRange;const t=this.calendar.multipleDateRange[Math.max(0,this.calendar.multipleDateRange.length-1)];if(t&&(t.start&&!t.end||!t.start&&t.end))throw new Error("Invalid Data Range")}},{immediate:!0,deep:!0}),this.$watch("showCalendar",function(e){e?this.$emit("opened"):this.$emit("closed")},{immediate:!0,deep:!0})},beforeUnmount:function(){window.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("focusout",this.onFocusOut),window.removeEventListener("click",this.hideMonthYearPicker)},watch:{enabledDates:{handler(){this.fConfigs.enabledDates=this.enabledDates},deep:!0},"configs.enabledDates":{handler(){this.fConfigs.enabledDates=this.configs.enabledDates},deep:!0},fConfigs:{handler(){this.markChooseDays()},deep:!0,immediate:!0},calendar:{handler(){this.markChooseDays()},deep:!0,immediate:!0},"calendar.currentDate":{handler(e){this.$emit("input",this.calendar),this.checkLimits(e)}}},methods:{initCalendar(){this.setCalendarData(),this.listRendering(),this.markChooseDays(),this.checkLimits(this.calendar.currentDate)},updateCalendar(){this.setExistingCalendarData(),this.listRendering(),this.markChooseDays()},isNotSeparatelyAndFirst(e){return this.isSeparately||e==0},setCalendarData(){let e=this.calendar.currentDate;e=new Date(e.getFullYear(),e.getMonth()-1),this.listCalendars=[];for(let t=0;t<this.fConfigs.calendarsCount;t++){e=new Date(e.getFullYear(),e.getMonth()+1);let n={key:t+ha(),date:e,dateTop:`${this.fConfigs.monthNames[e.getMonth()]} ${e.getFullYear()}`,month:this.fConfigs.monthNames[e.getMonth()],year:e.getFullYear(),weeks:this.helpCalendar.getFinalizedWeeks(e.getMonth(),e.getFullYear())};if(this.listCalendars.push(n),!this.fConfigs.isMultiple)break}},setExistingCalendarData(){for(let e=0;e<this.listCalendars.length;e++){let t=this.listCalendars[e],n=t.date;if(this.listCalendars[e]={key:t.key,date:n,dateTop:`${this.fConfigs.monthNames[n.getMonth()]} ${n.getFullYear()}`,month:this.fConfigs.monthNames[n.getMonth()],year:n.getFullYear(),weeks:this.helpCalendar.getFinalizedWeeks(n.getMonth(),n.getFullYear())},!this.fConfigs.isMultiple)break}},setConfigs(){let e;if(typeof this.$getOptions<"u"&&(e=this.$getOptions(),Object.keys(e).forEach(t=>{typeof this.fConfigs[t]<"u"&&(this.fConfigs[t]=e[t])})),typeof this.configs<"u"?Object.keys(this.fConfigs).forEach(t=>{typeof this.configs[t]<"u"&&(this.fConfigs[t]=this.configs[t])}):Object.keys(this.$props).forEach(t=>{typeof this.fConfigs[t]<"u"&&typeof this.$props[t]<"u"&&(this.fConfigs[t]=this.$props[t])}),this.fConfigs.isModal&&(this.showCalendar=!1),this.fConfigs.placeholder||(this.fConfigs.placeholder=this.fConfigs.dateFormat),typeof this.newCurrentDate<"u"&&(this.calendar.currentDate=this.newCurrentDate),this.fConfigs.sundayStart){let t=[...this.fConfigs.dayNames],n=t[t.length-1];t.splice(t.length-1,1),t.unshift(n),this.fConfigs.dayNames=t}},listRendering(){this.listCalendars.forEach(e=>{e.weeks.forEach(t=>{let n=[];t.days.forEach(a=>{let r=new Date(a.year,a.month,a.day),o=new Date,s=!1;r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()&&(s=!0);let l;typeof this.fConfigs.markedDates[0]=="object"?l=this.fConfigs.markedDates.find(c=>c.date===this.helpCalendar.formatDate(r)):l=this.fConfigs.markedDates.find(c=>c===this.helpCalendar.formatDate(r)),this.startDMY===this.helpCalendar.formatDate(r)&&(l=!0);let u=!1;typeof l<"u"&&(u=!0),n.push({day:a.day,date:this.helpCalendar.formatDate(r),hide:a.hide,isMouseToLeft:!1,isMouseToRight:!1,isHovered:!1,isDateRangeStart:this.checkDateRangeStart(this.helpCalendar.formatDate(r)),isDateRangeEnd:this.checkDateRangeEnd(this.helpCalendar.formatDate(r)),hideLeftAndRightDays:a.hideLeftAndRightDays,isToday:s,isMarked:u})}),t.days=n})})},clickDay(e,t){if(this.fConfigs.withTimePicker&&this.fConfigs.isDateRange&&(e.date=e.date+" 00:00"),this.$emit("dayClicked",e),!this.fConfigs.isDateRange&&!this.fConfigs.isDatePicker&&!this.fConfigs.isMultipleDatePicker)return!1;let n=this.helpCalendar.getDateFromFormat(e.date).getDay()-1;n===-1&&(n=6);let a=this.fConfigs.dayNames[n];if(this.fConfigs.disabledDayNames.includes(a)||t(e.date))return!1;if(this.fConfigs.limits){let r=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),o=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime(),s=this.helpCalendar.getDateFromFormat(e.date).getTime();if(s<r||s>o)return!1}if(this.fConfigs.isMultipleDateRange){let r=this.helpCalendar.getDateFromFormat(e.date.split(" ")[0]).getTime(),o=this.calendar.multipleDateRange.length,s=this.calendar.multipleDateRange[o-1],l="";if(s||(this.calendar.multipleDateRange.push({end:"",start:""}),o=this.calendar.multipleDateRange.length,s=this.calendar.multipleDateRange[o-1]),s.start&&(l=this.helpCalendar.getDateFromFormat(s.start)),s.start!==""&&s.end!==""?this.calendar.multipleDateRange.push({end:"",start:e.date}):s.start===""&&s.end===""?s.start=e.date:s.end===""&&r>l.getTime()?s.end=e.date:s.start!==""&&r<=l.getTime()&&(this.$nextTick(()=>{this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),s.end=s.start,s.start=e.date),s.start!==""&&s.end!==""){let u=864e5,c=this.helpCalendar.getDateFromFormat(s.start),d=this.helpCalendar.getDateFromFormat(s.end),f=Math.round(Math.abs((c.getTime()-d.getTime())/u)),m=this.helpCalendar.getDateFromFormat(e.date).getTime();this.$emit("selectedDaysCount",f),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let h=this.fConfigs.minSelDays;h&&m>=l.getTime()&&f<h&&(l.setDate(l.getDate()+(h-1)),s.end=this.helpCalendar.formatDate(l)),h&&m<l.getTime()&&f<h&&(l.setDate(l.getDate()-(h-1)),s.start=this.helpCalendar.formatDate(l));let g=this.fConfigs.maxSelDays;g&&m>=l.getTime()&&f>=g&&(l.setDate(l.getDate()+(g-1)),s.end=this.helpCalendar.formatDate(l)),g&&m<l.getTime()&&f>=g&&(l.setDate(l.getDate()-(g-1)),s.start=this.helpCalendar.formatDate(l))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDateRange){let r=this.helpCalendar.getDateFromFormat(e.date.split(" ")[0]).getTime(),o="";if(this.calendar.dateRange.start&&(o=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start)),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""?(this.calendar.dateRange.start=e.date,this.calendar.dateRange.end=""):this.calendar.dateRange.start===""&&this.calendar.dateRange.end===""?this.calendar.dateRange.start=e.date:this.calendar.dateRange.end===""&&r>o.getTime()?this.calendar.dateRange.end=e.date:this.calendar.dateRange.start!==""&&r<=o.getTime()&&(this.$nextTick(()=>{this.calendar.dateRange&&this.calendar.withTimePicker&&(this.$refs.timePicker.startDateActive=!0)}),this.calendar.dateRange.end=this.calendar.dateRange.start,this.calendar.dateRange.start=e.date),this.calendar.dateRange.start!==""&&this.calendar.dateRange.end!==""){let s=864e5,l=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start),u=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.end),c=Math.round(Math.abs((l.getTime()-u.getTime())/s)),d=this.helpCalendar.getDateFromFormat(e.date).getTime();this.$emit("selectedDaysCount",c),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);let f=this.fConfigs.minSelDays;f&&d>=o.getTime()&&c<f&&(o.setDate(o.getDate()+(f-1)),this.calendar.dateRange.end=this.helpCalendar.formatDate(o)),f&&d<o.getTime()&&c<f&&(o.setDate(o.getDate()-(f-1)),this.calendar.dateRange.start=this.helpCalendar.formatDate(o));let m=this.fConfigs.maxSelDays;m&&d>=o.getTime()&&c>=m&&(o.setDate(o.getDate()+(m-1)),this.calendar.dateRange.end=this.helpCalendar.formatDate(o)),m&&d<o.getTime()&&c>=m&&(o.setDate(o.getDate()-(m-1)),this.calendar.dateRange.start=this.helpCalendar.formatDate(o))}this.$emit("input",this.calendar)}else if(this.fConfigs.isDatePicker)this.calendar.selectedDate=e.date,this.$emit("input",this.calendar),this.fConfigs.isModal&&this.fConfigs.isAutoCloseable&&(this.showCalendar=!1);else if(this.fConfigs.isMultipleDatePicker){if(this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(r=>r.date===e.date)){let r=this.calendar.selectedDates.findIndex(o=>o.date===e.date);this.calendar.selectedDates.splice(r,1)}else{let r=Object.assign({},this.defaultDateFormat);r.date=e.date,this.calendar.hasOwnProperty("selectedDates")||(this.calendar.selectedDates=[]),this.calendar.selectedDates.push(r)}this.$emit("input",this.calendar)}this.markChooseDays(),this.fConfigs.withTimePicker&&((this.fConfigs.isDateRange||this.fConfigs.isDatePicker)&&this.openTimePicker(),this.calendar.selectedDates.find(r=>r.date===e.date)&&this.fConfigs.isMultipleDatePicker&&this.openTimePicker()),this.$emit("choseDay",e)},markChooseDays(){let e=this.startDMY,t=this.endDMY;this.listCalendars.forEach(n=>{n.weeks.forEach(a=>{a.days.forEach(r=>{r.isMarked=!1,r.date=r.date.split(" ")[0],this.fConfigs.isDatePicker?this.calendar.selectedDate===r.date&&(r.isMarked=!0):this.fConfigs.isMultipleDatePicker?this.calendar.hasOwnProperty("selectedDates")&&this.calendar.selectedDates.find(o=>o.date===r.date)&&(r.isMarked=!0):(r.isMouseToLeft=!1,r.isMouseToRight=!1,e===r.date&&(r.isMouseToLeft=!!t,r.isMarked=!0),t===r.date&&(r.isMouseToRight=!!t,r.isMarked=!0),this.calendar.multipleDateRange&&(~this.calendar.multipleDateRange.map(o=>o.start.split(" ")[0]).indexOf(r.date)&&(r.isMouseToLeft=!!t,r.isMarked=!0),~this.calendar.multipleDateRange.map(o=>o.end.split(" ")[0]).indexOf(r.date)&&(r.isMouseToRight=!!t,r.isMarked=!0),this.calendar.multipleDateRange.forEach(o=>{o.start&&o.start===o.end&&(r.isMouseToLeft=!1,r.isMouseToRight=!1),o.start&&o.end&&this.helpCalendar.getDateFromFormat(r.date).getTime()>this.helpCalendar.getDateFromFormat(o.start)&&this.helpCalendar.getDateFromFormat(r.date)<this.helpCalendar.getDateFromFormat(o.end)&&(r.isMarked=!0)})),e&&e===t&&(r.isMouseToLeft=!1,r.isMouseToRight=!1),e&&t&&this.helpCalendar.getDateFromFormat(r.date).getTime()>this.helpCalendar.getDateFromFormat(e)&&this.helpCalendar.getDateFromFormat(r.date)<this.helpCalendar.getDateFromFormat(t)&&(r.isMarked=!0)),this.fConfigs.markedDates.includes(r.date)&&(r.isMarked=!0)})})})},dayMouseOver(e){if(this.$emit("dayMouseOver",e),!this.fConfigs.isDateRange)return!1;if(this.fConfigs.limits){let t=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min).getTime(),n=this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max).getTime(),a=this.helpCalendar.getDateFromFormat(e).getTime();if(a<t||a>n)return!1}if((this.calendar.dateRange.start===""||this.calendar.dateRange.end==="")&&(this.calendar.dateRange.start!==""||this.calendar.dateRange.end!==""))for(let t=0;t<this.listCalendars.length;t++){let n=this.listCalendars[t];for(let a=0;a<n.weeks.length;a++){let r=n.weeks[a];for(let o=0;o<r.days.length;o++){let s=r.days[o];if(this.listCalendars[t].weeks[a].days[o].isHovered=!1,s.date!==this.startDMY&&!this.fConfigs.markedDates.includes(s.date)&&(this.listCalendars[t].weeks[a].days[o].isMarked=!1),this.calendar.dateRange.start){let l=this.helpCalendar.getDateFromFormat(s.date).getTime(),u=this.helpCalendar.getDateFromFormat(e).getTime(),c=this.helpCalendar.getDateFromFormat(this.calendar.dateRange.start);this.listCalendars[t].weeks[a].days[o].isMouseToLeft=l===c.getTime()&&u>c.getTime()||l===u&&u<c.getTime(),this.listCalendars[t].weeks[a].days[o].isMouseToRight=l===c.getTime()&&u<c.getTime()||l===u&&u>c.getTime();let d=this.helpCalendar.getDateFromFormat(s.date).getDay()-1;d===-1&&(d=6);let f=this.fConfigs.dayNames[d];if(!this.fConfigs.disabledDayNames.includes(f)&&(l>c.getTime()&&l<u||l<c.getTime()&&l>u)&&(this.listCalendars[t].weeks[a].days[o].isMarked=!0),!this.calendar.dateRange.end&&l===u&&(this.listCalendars[t].weeks[a].days[o].isHovered=!1),this.checkSelDates("min",this.calendar.dateRange.start,s.date,e)){this.listCalendars[t].weeks[a].days[o].isMarked=!0;let m,h;h=new Date(c.getTime()),m=new Date(c.getTime()),h.setDate(h.getDate()-this.fConfigs.minSelDays+1),m.setDate(m.getDate()+this.fConfigs.minSelDays-1),u>=h.getTime()&&this.helpCalendar.formatDate(h)===s.date?(this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!0,this.listCalendars[t].weeks[a].days[o].isHovered=!0):u<=m.getTime()&&this.helpCalendar.formatDate(m)===s.date&&(this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!0,this.listCalendars[t].weeks[a].days[o].isHovered=!0)}if(this.checkSelDates("max",this.calendar.dateRange.start,s.date,e)){this.listCalendars[t].weeks[a].days[o].isMarked=!1,this.listCalendars[t].weeks[a].days[o].isHovered=!1,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!1,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!1;let m,h;m=new Date(c.getTime()),h=new Date(c.getTime()),m.setDate(m.getDate()-this.fConfigs.maxSelDays+1),h.setDate(h.getDate()+this.fConfigs.maxSelDays-1),u<=m.getTime()&&this.helpCalendar.formatDate(m)===s.date&&(this.listCalendars[t].weeks[a].days[o].isHovered=!0,this.listCalendars[t].weeks[a].days[o].isMouseToLeft=!0),u>=h.getTime()&&this.helpCalendar.formatDate(h)===s.date&&(this.listCalendars[t].weeks[a].days[o].isHovered=!0,this.listCalendars[t].weeks[a].days[o].isMouseToRight=!0)}}}}}if(this.calendar.multipleDateRange){let t=this.calendar.multipleDateRange[this.calendar.multipleDateRange.length-1];if(!t)return;if((t.start===""||t.end==="")&&(t.start!==""||t.end!==""))for(let n=0;n<this.listCalendars.length;n++){let a=this.listCalendars[n];for(let r=0;r<a.weeks.length;r++){let o=a.weeks[r];for(let s=0;s<o.days.length;s++){let l=o.days[s];if(this.listCalendars[n].weeks[r].days[s].isHovered=!1,l.date!==this.startDMY&&!this.fConfigs.markedDates.includes(l.date)&&(this.listCalendars[n].weeks[r].days[s].isMarked=!1),t.start){let u=this.helpCalendar.getDateFromFormat(l.date).getTime(),c=this.helpCalendar.getDateFromFormat(e).getTime(),d=this.helpCalendar.getDateFromFormat(t.start);this.listCalendars[n].weeks[r].days[s].isMouseToLeft=u===d.getTime()&&c>d.getTime()||u===c&&c<d.getTime(),this.listCalendars[n].weeks[r].days[s].isMouseToRight=u===d.getTime()&&c<d.getTime()||u===c&&c>d.getTime();let f=this.helpCalendar.getDateFromFormat(l.date).getDay()-1;f===-1&&(f=6);let m=this.fConfigs.dayNames[f];if(!this.fConfigs.disabledDayNames.includes(m)&&(u>d.getTime()&&u<c||u<d.getTime()&&u>c)&&(this.listCalendars[n].weeks[r].days[s].isMarked=!0),!t.end&&u===c&&(this.listCalendars[n].weeks[r].days[s].isHovered=!1),this.checkSelDates("min",t.start,l.date,e)){this.listCalendars[n].weeks[r].days[s].isMarked=!0;let h,g;g=new Date(d.getTime()),h=new Date(d.getTime()),g.setDate(g.getDate()-this.fConfigs.minSelDays+1),h.setDate(h.getDate()+this.fConfigs.minSelDays-1),c>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date?(this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!0,this.listCalendars[n].weeks[r].days[s].isHovered=!0):c<=h.getTime()&&this.helpCalendar.formatDate(h)===l.date&&(this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!0,this.listCalendars[n].weeks[r].days[s].isHovered=!0)}if(this.checkSelDates("max",t.start,l.date,e)){this.listCalendars[n].weeks[r].days[s].isMarked=!1,this.listCalendars[n].weeks[r].days[s].isHovered=!1,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!1,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!1;let h,g;h=new Date(d.getTime()),g=new Date(d.getTime()),h.setDate(h.getDate()-this.fConfigs.maxSelDays+1),g.setDate(g.getDate()+this.fConfigs.maxSelDays-1),c<=h.getTime()&&this.helpCalendar.formatDate(h)===l.date&&(this.listCalendars[n].weeks[r].days[s].isHovered=!0,this.listCalendars[n].weeks[r].days[s].isMouseToLeft=!0),c>=g.getTime()&&this.helpCalendar.formatDate(g)===l.date&&(this.listCalendars[n].weeks[r].days[s].isHovered=!0,this.listCalendars[n].weeks[r].days[s].isMouseToRight=!0)}}}}}}},PreMonth(e=null){if(!this.allowPreDate)return!1;this.transitionPrefix="right";let t=this.fConfigs.changeMonthStep;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear(),n.date.getMonth()-t),n.key-=ha(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedMonth",n.date)},NextMonth(e=null){if(!this.allowNextDate)return!1;this.transitionPrefix="left";let t=this.fConfigs.changeMonthStep;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear(),n.date.getMonth()+t),n.key+=ha(),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedMonth",n.date)},PreYear(e=null){if(!this.allowPreDate)return!1;let t=this.showYearPicker?this.fConfigs.changeYearStep:1;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear()-t,n.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedYear",n.date)},NextYear(e=null){if(!this.allowNextDate)return!1;let t=this.showYearPicker?this.fConfigs.changeYearStep:1;e=e!==null?e:0;let n=this.listCalendars[e];n.date=new Date(n.date.getFullYear()+t,n.date.getMonth()),this.updateCalendar(),this.fConfigs.isSeparately||(this.calendar.currentDate=n.date,this.initCalendar()),this.$emit("changedYear",n.date)},ChooseDate(e){let t=this.helpCalendar.getDateFromFormat(e);e==="today"&&(t=new Date),this.listCalendars[0].date=this.calendar.currentDate=t,this.updateCalendar(),this.initCalendar()},openMonthPicker(e){this.fConfigs.changeMonthFunction&&(this.showMonthPicker=e===this.showMonthPicker?!1:e,this.showYearPicker=!1)},openYearPicker(e){this.fConfigs.changeYearFunction&&(this.showYearPicker=e===this.showYearPicker?!1:e,this.showMonthPicker=!1)},openTimePicker(){this.showTimePicker=!0},pickMonth(e,t){if(this.showMonthPicker=!1,!this.isSeparately)this.listCalendars.forEach((a,r)=>{let o=a.date;a.date=new Date(o.getFullYear(),e+1+r,0),a.key+=ha()});else{let a=this.listCalendars[t],r=a.date;a.date=new Date(r.getFullYear(),e+1,0),a.key+=ha()}let n=this.listCalendars[t];this.$emit("changedMonth",n.date),this.updateCalendar()},pickYear(e,t){if(this.showYearPicker=!1,!this.isSeparately)this.listCalendars.forEach(n=>{let a=n.date;n.date=new Date(e,a.getMonth()+1,0),n.key+=ha(),this.$emit("changedYear",n.date)});else{let n=this.listCalendars[t],a=n.date;n.date=new Date(e,a.getMonth()+1,0),n.key+=ha(),this.$emit("changedYear",n.date)}this.updateCalendar()},getYearList(e,t){let n=[],a=e.getFullYear()-4+t;for(let r=0;r<12;r++){let o=a+r;n.push({year:o})}return n},addToSelectedDates(){if(this.helpCalendar.checkValidDate(this.calendar.selectedDatesItem)){let e=Object.assign({},this.defaultDateFormat);e.date=this.calendar.selectedDatesItem,this.calendar.selectedDates.push(e),this.calendar.selectedDatesItem="",this.markChooseDays()}},removeFromSelectedDates(e){this.calendar.selectedDates.splice(e,1),this.markChooseDays()},checkDateRangeEnd(e){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(t=>t.end===e)!==-1:e===this.fConfigs.markedDateRange.end},checkSelDates(e,t,n,a){let r=this.helpCalendar.getDateFromFormat(t).getTime(),o=this.helpCalendar.getDateFromFormat(n).getTime(),s=this.helpCalendar.getDateFromFormat(a).getTime(),u=(e==="min"?this.fConfigs.minSelDays:this.fConfigs.maxSelDays-2)*1e3*60*60*24,c=r+u,d=r-u,f;return s>r?e==="min"?f=o<c&&o>r&&this.fConfigs.minSelDays:f=o>c&&o>r&&this.fConfigs.maxSelDays:s<r&&(e==="min"?f=o>d&&o<r&&this.fConfigs.minSelDays:f=o<d&&o<r&&this.fConfigs.maxSelDays),f},checkLimits(e){if(this.fConfigs.limits){let t=new Date(this.helpCalendar.getDateFromFormat(this.fConfigs.limits.min));t.setDate(1),t.setHours(0,0,0,0);let n=new Date(this.helpCalendar.getDateFromFormat(this.fConfigs.limits.max));n.setDate(1),n.setHours(0,0,0,0),this.allowPreDate=!0,this.allowNextDate=!0;let a=new Date(e);a.setDate(1),a.setHours(0,0,0,0),a<=t&&(this.allowPreDate=!1),a>=n&&(this.allowNextDate=!1)}},getTransition_(){if(!this.fConfigs.transition)return"";let e="";return this.transitionPrefix==="left"?e="vfc-calendar-slide-left":this.transitionPrefix==="right"&&(e="vfc-calendar-slide-right"),e},checkHiddenElement(e){return!this.fConfigs.hiddenElements.includes(e)},onFocusIn(){this.fConfigs.isModal&&(this.showCalendar=!0)},onFocusOut(e){if(this.fConfigs.isModal&&!V1(this.popoverElement,e.relatedTarget))return this.showCalendar=this.showMonthPicker=this.showYearPicker=!1},hideMonthYearPicker(e){this.$nextTick(()=>{if(this.showMonthPicker||this.showYearPicker){let t=this.showMonthPicker?this.showMonthPicker-1:this.showYearPicker-1;return this.$refs.calendars.querySelectorAll(".vfc-content-MY-picker")[t].contains(e.target)?void 0:this.showMonthPicker=this.showYearPicker=!1}})},checkDateRangeStart(e){return Array.isArray(this.fConfigs.markedDateRange)?this.fConfigs.markedDateRange.findIndex(t=>t.start===e)!==-1:e===this.fConfigs.markedDateRange.start},cleanRange(){if(!this.isMultipleDateRange){this.calendar.dateRange.end="",this.calendar.dateRange.start="";return}this.calendar.multipleDateRange=[]}}},x1={class:"vfc-popover-container",ref:"popoverElement",tabindex:"0"},I1={key:1,class:"vfc-calendars-container"},R1={class:"vfc-calendars",ref:"calendars"},B1={class:"vfc-content"},N1=["onClick"],A1=["onClick"],P1={class:"vfc-dayNames"},M1={key:0},L1={key:0,class:"rangeCleaner"};function F1(e,t,n,a,r,o){const s=i.resolveComponent("PickerInputs"),l=i.resolveComponent("time-picker"),u=i.resolveComponent("Arrows"),c=i.resolveComponent("month-year-picker"),d=i.resolveComponent("WeekNumbers"),f=i.resolveComponent("Day"),m=i.resolveComponent("Footer");return i.openBlock(),i.createElementBlock("div",x1,[i.createVNode(s,{fConfigs:e.fConfigs,singleSelectedDate:o.singleSelectedDate,calendar:e.calendar},{dateRangeInputs:i.withCtx(h=>[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:h.startDate,endDate:h.endDate,isTypeable:e.fConfigs.isTypeable})]),datePickerInput:i.withCtx(h=>[i.renderSlot(e.$slots,"datePickerInput",{selectedDate:h.selectedDate,isTypeable:e.fConfigs.isTypeable})]),_:3},8,["fConfigs","singleSelectedDate","calendar"]),i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["vfc-main-container",{"vfc-modal":e.fConfigs.isModal&&(e.fConfigs.isDatePicker||e.fConfigs.isDateRange||e.fConfigs.isMultipleDatePicker),"vfc-dark":e.fConfigs.isDark}]),ref:"mainContainer"},[e.showTimePicker?(i.openBlock(),i.createBlock(l,{key:0,ref:"timePicker",height:e.$refs.popoverElement.clientHeight,hours:e.activeHours,minutes:e.activeMinutes},null,8,["height","hours","minutes"])):(i.openBlock(),i.createElementBlock("div",I1,[i.createVNode(u,{isMultiple:!1,fConfigs:e.fConfigs,allowPreDate:e.allowPreDate,allowNextDate:e.allowNextDate},{navigationArrowLeft:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowLeft")]),navigationArrowRight:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowRight")]),_:3},8,["fConfigs","allowPreDate","allowNextDate"]),i.createElementVNode("div",R1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.listCalendars,(h,g)=>(i.openBlock(),i.createElementBlock("div",{class:"vfc-calendar",key:h.key},[i.withDirectives(i.createVNode(c,{ref_for:!0,ref:"monthContainer",class:i.normalizeClass("vfc-"+e.fConfigs.titlePosition),changeYearStep:e.changeYearStep,"calendar-key":g},null,8,["class","changeYearStep","calendar-key"]),[[i.vShow,e.showMonthPicker===g+1||e.showYearPicker===g+1]]),i.createElementVNode("div",B1,[i.createVNode(u,{isMultiple:!0,fConfigs:e.fConfigs,allowPreDate:e.allowPreDate,allowNextDate:e.allowNextDate,"calendar-key":g},{navigationArrowLeft:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowLeft")]),navigationArrowRight:i.withCtx(()=>[i.renderSlot(e.$slots,"navigationArrowRight")]),_:3},8,["fConfigs","allowPreDate","allowNextDate","calendar-key"]),i.createVNode(i.Transition,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[o.checkHiddenElement("month")?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vfc-top-date","vfc-"+e.fConfigs.titlePosition])},[i.createElementVNode("span",{onClick:i.withModifiers(y=>o.isNotSeparatelyAndFirst(g)&&o.openMonthPicker(g+1),["prevent"]),class:i.normalizeClass({"vfc-cursor-pointer vfc-underline":e.fConfigs.changeMonthFunction&&o.isNotSeparatelyAndFirst(g),"vfc-underline-active":e.showMonthPicker===g+1})},i.toDisplayString(h.month),11,N1),i.createElementVNode("span",{onClick:i.withModifiers(y=>o.isNotSeparatelyAndFirst(g)&&o.openYearPicker(g+1),["prevent"]),class:i.normalizeClass({"vfc-cursor-pointer vfc-underline":e.fConfigs.changeYearFunction&&o.isNotSeparatelyAndFirst(g),"vfc-underline-active":e.showYearPicker===g+1})},i.toDisplayString(h.year),11,A1)],2)):i.createCommentVNode("",!0)]),_:2},1032,["name"]),i.createVNode(i.Transition,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[i.createElementVNode("div",P1,[e.fConfigs.showWeekNumbers?(i.openBlock(),i.createElementBlock("span",M1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.fConfigs.dayNames,(y,_)=>(i.openBlock(),i.createElementBlock("span",{key:g+_+1,class:"vfc-day"},[o.checkHiddenElement("dayNames")?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(y),1)],64)):i.createCommentVNode("",!0)]))),128))])]),_:2},1032,["name"]),i.createVNode(i.TransitionGroup,{tag:"div",name:o.getTransition_(),appear:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.weeks,(y,_)=>(i.openBlock(),i.createElementBlock("div",{class:"vfc-week",key:g+_+1},[e.showWeekNumbers?(i.openBlock(),i.createBlock(d,{key:0,number:y.number,borderColor:e.borderColor},null,8,["number","borderColor"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.days,(p,v)=>(i.openBlock(),i.createBlock(f,{ref_for:!0,ref:"day",key:g+_+v+1,isMultipleDateRange:e.isMultipleDateRange,day:p,fConfigs:e.fConfigs,calendar:e.calendar,helpCalendar:o.helpCalendar,week:y,day_key:v,onDayMouseOver:o.dayMouseOver,alwaysUseDefaultClasses:e.alwaysUseDefaultClasses},{default:i.withCtx(k=>[i.renderSlot(e.$slots,"default",{week:k.week,day:k.day})]),_:2},1032,["isMultipleDateRange","day","fConfigs","calendar","helpCalendar","week","day_key","onDayMouseOver","alwaysUseDefaultClasses"]))),128))]))),128)),h.weeks.length<6&&!e.fConfigs.isLayoutExpandable?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(6-h.weeks.length,y=>(i.openBlock(),i.createElementBlock("div",{style:{height:"32.6px"},key:g+y+"moreWeek"}," "))),128)):i.createCommentVNode("",!0)]),_:2},1032,["name"])])]))),128))],512),e.canClearRange||e.$slots.footer?(i.openBlock(),i.createBlock(m,{key:0},{footer:i.withCtx(()=>[i.createElementVNode("div",{onClick:t[1]||(t[1]=(...h)=>o.cleanRange&&o.cleanRange(...h))},[i.renderSlot(e.$slots,"cleaner",{},()=>[e.canClearRange&&e.fConfigs.isDateRange?(i.openBlock(),i.createElementBlock("div",L1,[i.createElementVNode("span",{class:i.normalizeClass([o.rangeIsSelected?"active":"disabled"]),onClick:t[0]||(t[0]=(...h)=>o.cleanRange&&o.cleanRange(...h))},"Clear Range"+i.toDisplayString(e.isMultipleDateRange&&"s"),3)])):i.createCommentVNode("",!0)])]),i.renderSlot(e.$slots,"footer")]),_:3})):i.createCommentVNode("",!0)]))],2),[[i.vShow,e.showCalendar]])],512)}const Mf=ee($1,[["render",F1]]),j1={class:"sky-header-container"},U1={class:"topmenubox"},z1={class:"header-left"},H1=["title"],W1={width:"15",height:"15",viewBox:"0 0 451.847 451.847",style:{transform:"rotate(90deg)"}},Y1={class:"notPadding"},K1={class:"topmenu-title"},G1={key:0,class:"title-dropdown"},q1={class:"title-dropdown-header"},X1=["onClick"],Z1={class:"pageName"},J1={class:"pageVisit"},Q1={key:0,class:"topmenu-description"},e0={class:"topmenubox-button"},t0={__name:"Header",props:{title:{type:String,default:""},subtitle:{type:String,default:""},showBackButton:{type:Boolean,default:!0},backButtonTitle:{type:String,default:"Назад"},backEvent:{type:Function,default:null},dropdownItems:{type:Array,default:()=>[]},dropdownTitle:{type:String,default:"Останні відвідані розділи"},visitLabel:{type:String,default:"Останнє відвідування"},trackPageName:{type:String,default:""},trackPagePath:{type:String,default:""},appId:{type:String,default:""}},emits:["back","navigate"],setup(e,{emit:t}){const n=e;ne.setSenderId(n.appId||ne.getSenderId());const a=t,r=i.ref(null),o=i.ref(!1),s=i.ref([]),l=i.ref({});ne.isInsideIframe()&&n.trackPageName&&ne.trackVisit(n.trackPageName,n.trackPagePath||`/apps/${n.trackPageName}`),ne.isInsideIframe()&&ne.getWindowData("lang").then(k=>{k!=null&&(l.value=k)});function u(k){try{if(!k)return;const C=typeof k=="string"?JSON.parse(k):k;C!=null&&C.pages&&(s.value=Object.values(C.pages))}catch{}}u(localStorage.componentStats),ne.isInsideIframe()&&ne.getLocalStorageData("componentStats").then(k=>{k!=null&&(localStorage.setItem("componentStats",JSON.stringify(k)),u(k))});const c=i.computed(()=>[...n.dropdownItems.length?n.dropdownItems:s.value].sort((C,E)=>E.lastVisit-C.lastVisit)),d=()=>{c.value.length&&(o.value=!o.value)},f=()=>{o.value=!1},m=k=>{a("navigate",k.path),ne.isInsideIframe()&&ne.navigate(k.path),f()},h=k=>{if(!k)return"";const C=l.value[k]||k;return C.charAt(0).toUpperCase()+C.slice(1)},g=k=>{const E=Date.now()-k,D=Math.floor(E/1e3),w=Math.floor(D/60),T=Math.floor(w/60),I=Math.floor(T/24);return I>0?`${I}д тому`:T>0?`${T}год тому`:w>0?`${w}хв тому`:`${D}с тому`},y=k=>{r.value&&!r.value.contains(k.target)&&f()};i.onMounted(()=>{document.addEventListener("click",y,!0)}),i.onUnmounted(()=>{document.removeEventListener("click",y,!0)});const _=i.computed(()=>n.backEvent||n.showBackButton&&ne.isInsideIframe()),p=()=>c.value.find(k=>k.name!==n.trackPageName&&k.path),v=async()=>{if(n.backEvent)return n.backEvent();let k=p();if(!k&&ne.isInsideIframe()){const C=await ne.getLocalStorageData("componentStats");C&&(u(C),k=p())}k?ne.navigate(k.path):ne.exit()};return(k,C)=>(i.openBlock(),i.createElementBlock("header",j1,[i.createElementVNode("div",U1,[i.createElementVNode("div",z1,[_.value?(i.openBlock(),i.createElementBlock("button",{key:0,class:"btn-back",onClick:v,title:e.backButtonTitle},[(i.openBlock(),i.createElementBlock("svg",W1,[...C[0]||(C[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])]))],8,H1)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"dropdownRef",ref:r,class:"titleAndDesc"},[i.createElementVNode("button",{class:i.normalizeClass(["title-dropdown-toggle",{"title-dropdown-toggle-active":c.value.length}]),onClick:d},[i.renderSlot(k.$slots,"title",{},()=>[i.createElementVNode("h4",Y1,[i.createElementVNode("span",K1,i.toDisplayString(e.title),1),c.value.length?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["arrow",{open:o.value}]),width:"12",height:"12",viewBox:"0 0 451.847 451.847",style:{"flex-shrink":"0"}},[...C[1]||(C[1]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])],2)):i.createCommentVNode("",!0)])],!0)],2),o.value&&c.value.length?(i.openBlock(),i.createElementBlock("div",G1,[i.createElementVNode("div",q1,i.toDisplayString(e.dropdownTitle),1),C[2]||(C[2]=i.createElementVNode("div",{class:"title-dropdown-divider"},null,-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(E,D)=>(i.openBlock(),i.createElementBlock("div",{key:D,class:"title-dropdown-item",onClick:w=>m(E)},[i.createElementVNode("p",Z1,i.toDisplayString(h(E.name)),1),i.createElementVNode("small",J1," ("+i.toDisplayString(e.visitLabel)+" "+i.toDisplayString(g(E.lastVisit))+") ",1)],8,X1))),128))])):i.createCommentVNode("",!0),i.renderSlot(k.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("p",Q1,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)],512)]),i.createElementVNode("div",e0,[C[3]||(C[3]=i.createElementVNode("div",null,null,-1)),i.renderSlot(k.$slots,"default",{},void 0,!0),C[4]||(C[4]=i.createElementVNode("div",null,null,-1))])])]))}},n0=ee(t0,[["__scopeId","data-v-f35ac363"]]),a0=["title"],r0={width:"15",height:"15",viewBox:"0 0 451.847 451.847",style:{transform:"rotate(90deg)"}},o0={class:"sky-modal-title-wrapper"},i0={class:"sky-modal-title"},s0={key:0,class:"sky-modal-subtitle"},l0={key:0,class:"sky-modal-header-actions"},u0={key:0,class:"sky-modal-footer"},c0=500,d0={__name:"Modal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},closeTitle:{type:String,default:"Закрити"},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},width:{type:String,default:"100%"},height:{type:String,default:"100%"},borderRadius:{type:String,default:"12px"}},emits:["update:modelValue","close"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(typeof window>"u"?1/0:window.innerWidth),o=()=>{r.value=window.innerWidth},s=i.computed(()=>r.value<=c0),l=i.computed(()=>n.width==="100%"&&n.height==="100%"||s.value),u=i.computed(()=>({width:n.width,height:n.height,...l.value?{}:{borderRadius:n.borderRadius}})),c=i.ref(null),d=i.computed(()=>{try{return ne.isAndroidWebview()}catch{return!1}}),f=()=>{if(!(!d.value||!l.value||!c.value))try{if(typeof Android<"u"&&Android.getDisplayCutoutTop){const y=Android.getDisplayCutoutTop();if(y&&window.devicePixelRatio>1){const _=y/window.devicePixelRatio;c.value.style.paddingTop=`calc(16px + ${_}px)`}}}catch{}},m=()=>{a("update:modelValue",!1),a("close")},h=()=>{n.closeOnOverlay&&m()},g=y=>{y.key==="Escape"&&n.closeOnEsc&&n.modelValue&&m()};return i.watch(()=>n.modelValue,y=>{y?(document.body.style.overflow="hidden",i.nextTick(f)):document.body.style.overflow=""}),i.onMounted(()=>{document.addEventListener("keydown",g),window.addEventListener("resize",o),window.addEventListener("resize",f)}),i.onUnmounted(()=>{document.removeEventListener("keydown",g),window.removeEventListener("resize",o),window.removeEventListener("resize",f),document.body.style.overflow=""}),(y,_)=>(i.openBlock(),i.createBlock(Pf,{to:"body"},{default:i.withCtx(()=>[e.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,class:"sky-modal-overlay",onMousedown:i.withModifiers(h,["self"])},[i.createElementVNode("div",{class:i.normalizeClass(["sky-modal",{"sky-modal--fullscreen":l.value}]),style:i.normalizeStyle(u.value)},[i.createElementVNode("div",{class:"sky-modal-header",ref_key:"modalHeaderRef",ref:c},[i.createElementVNode("button",{class:"sky-modal-back",onClick:m,title:e.closeTitle},[(i.openBlock(),i.createElementBlock("svg",r0,[..._[0]||(_[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])]))],8,a0),i.createElementVNode("div",o0,[i.renderSlot(y.$slots,"title",{},()=>[i.createElementVNode("h4",i0,i.toDisplayString(e.title),1)],!0),i.renderSlot(y.$slots,"subtitle",{},()=>[e.subtitle?(i.openBlock(),i.createElementBlock("div",s0,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)],!0)]),y.$slots["header-actions"]?(i.openBlock(),i.createElementBlock("div",l0,[i.renderSlot(y.$slots,"header-actions",{},void 0,!0)])):i.createCommentVNode("",!0)],512),i.createElementVNode("div",{class:i.normalizeClass(["sky-modal-body",{"sky-modal-body--no-footer":!y.$slots.footer}])},[i.renderSlot(y.$slots,"default",{},void 0,!0)],2),y.$slots.footer?(i.openBlock(),i.createElementBlock("div",u0,[i.renderSlot(y.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)],6)],32)):i.createCommentVNode("",!0)]),_:3}))}},f0=ee(d0,[["__scopeId","data-v-9034b1d1"]]),m0={key:0,class:"sky-alert-icon",width:"16",height:"16",viewBox:"0 0 20 20",fill:"none"},h0={class:"sky-alert-body"},p0={__name:"SkyAlert",props:{tone:{type:String,default:"info",validator:e=>["success","error","warning","info"].includes(e)},showIcon:{type:Boolean,default:!0}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-alert",`sky-alert-${e.tone}`])},[e.showIcon?(i.openBlock(),i.createElementBlock("svg",m0,[...n[0]||(n[0]=[i.createElementVNode("path",{d:"M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zm1 15H9v-2h2v2zm0-4H9V5h2v6z",fill:"currentColor"},null,-1)])])):i.createCommentVNode("",!0),i.createElementVNode("span",h0,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],2))}},v0=ee(p0,[["__scopeId","data-v-ae1976b5"]]),g0={key:0,class:"sky-badge-dot"},y0={__name:"SkyBadge",props:{tone:{type:String,default:"default",validator:e=>["success","error","warning","pending","info","default"].includes(e)},label:{type:String,default:""},dot:{type:Boolean,default:!0}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["sky-badge",`sky-badge-${e.tone}`])},[e.dot?(i.openBlock(),i.createElementBlock("span",g0)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(e.label),1)],!0)],2))}},_0=ee(y0,[["__scopeId","data-v-03b6ebdb"]]),k0=["disabled"],b0={key:0,class:"sky-btn-spinner"},C0={__name:"SkyButton",props:{variant:{type:String,default:"primary",validator:e=>["primary","danger","secondary","outline"].includes(e)},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},icon:{type:Boolean,default:!1}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps({class:["sky-btn",[`sky-btn-${e.variant}`,{"sky-btn-block":e.block,"sky-btn-loading":e.loading,"sky-btn-icon":e.icon}]],disabled:e.disabled||e.loading},t.$attrs),[e.loading?(i.openBlock(),i.createElementBlock("span",b0)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)],16,k0))}},w0=ee(C0,[["__scopeId","data-v-755083cb"]]),E0={class:"sky-card"},S0={key:0,class:"sky-card-ribbon"},T0={key:1,class:"sky-card-header"},D0={key:2,class:"sky-card-body"},O0={key:3,class:"sky-card-footer"},V0={__name:"SkyCard",setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",E0,[t.$slots.ribbon?(i.openBlock(),i.createElementBlock("div",S0,[i.renderSlot(t.$slots,"ribbon",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.header?(i.openBlock(),i.createElementBlock("div",T0,[i.renderSlot(t.$slots,"header",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.default?(i.openBlock(),i.createElementBlock("div",D0,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer?(i.openBlock(),i.createElementBlock("div",O0,[i.renderSlot(t.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)]))}},$0=ee(V0,[["__scopeId","data-v-6a2d353e"]]),x0={class:"sky-card-header-content"},I0={key:0,class:"sky-card-header-icon"},R0=["src","alt"],B0={class:"sky-card-header-titles"},N0={class:"sky-card-header-title"},A0={key:0,class:"sky-card-header-subtitle"},P0={__name:"SkyCardHeader",props:{title:{type:String,required:!0},subtitle:{type:String,default:""},iconSrc:{type:String,default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",x0,[t.$slots.icon||e.iconSrc?(i.openBlock(),i.createElementBlock("div",I0,[i.renderSlot(t.$slots,"icon",{},()=>[e.iconSrc?(i.openBlock(),i.createElementBlock("img",{key:0,src:e.iconSrc,alt:e.title,width:"48",height:"48"},null,8,R0)):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",B0,[i.createElementVNode("h3",N0,i.toDisplayString(e.title),1),e.subtitle?(i.openBlock(),i.createElementBlock("p",A0,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)])]))}},M0=ee(P0,[["__scopeId","data-v-ab38d71f"]]),L0={class:"sky-card-row"},F0={class:"sky-card-row-label"},j0={class:"sky-card-row-value"},U0={__name:"SkyCardRow",props:{label:{type:String,required:!0},value:{type:[String,Number],default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",L0,[i.createElementVNode("span",F0,i.toDisplayString(e.label),1),i.renderSlot(t.$slots,"default",{},()=>[i.createElementVNode("span",j0,i.toDisplayString(e.value),1)],!0)]))}},z0=ee(U0,[["__scopeId","data-v-8bd0b0e7"]]),H0=["checked",".indeterminate","disabled"],W0={key:0,class:"sky-checkbox__track"},Y0={key:1,class:"sky-checkbox__box"},K0={key:2,class:"sky-checkbox__label"},G0=i.defineComponent({inheritAttrs:!1,__name:"SkyCheckbox",props:{modelValue:{type:[Boolean,Array]},value:{},switch:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.useAttrs(),o=i.computed(()=>({class:r.class,style:r.style})),s=i.computed(()=>{const{class:d,style:f,...m}=r;return m}),l=i.computed(()=>n.switch),u=i.computed(()=>Array.isArray(n.modelValue)?n.modelValue.includes(n.value):n.modelValue);function c(d){const f=d.target;if(!Array.isArray(n.modelValue)){a("update:modelValue",f.checked);return}if(n.value===void 0){console.warn("[SkyCheckbox] `modelValue` є масивом, але проп `value` не заданий — класти в список нема чого, зміну проігноровано.");return}const m=[...n.modelValue];if(f.checked)m.includes(n.value)||m.push(n.value);else{const h=m.indexOf(n.value);h!==-1&&m.splice(h,1)}a("update:modelValue",m)}return(d,f)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value,{class:["sky-checkbox",{"sky-checkbox--switch":l.value,"sky-checkbox--disabled":e.disabled}]}),[i.createElementVNode("input",i.mergeProps(s.value,{type:"checkbox",class:"sky-checkbox__input",checked:u.value,".indeterminate":e.indeterminate,disabled:e.disabled,onChange:c}),null,48,H0),l.value?(i.openBlock(),i.createElementBlock("span",W0,[...f[0]||(f[0]=[i.createElementVNode("span",{class:"sky-checkbox__thumb"},null,-1)])])):(i.openBlock(),i.createElementBlock("span",Y0,[...f[1]||(f[1]=[i.createElementVNode("svg",{class:"sky-checkbox__check",viewBox:"0 0 10 8",fill:"none"},[i.createElementVNode("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1),i.createElementVNode("span",{class:"sky-checkbox__dash"},null,-1)])])),d.$slots.default?(i.openBlock(),i.createElementBlock("span",K0,[i.renderSlot(d.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)],16))}}),wi=ee(G0,[["__scopeId","data-v-0975847b"]]),He=new Proxy({},{get(e,t){return((typeof window<"u"?window.lang:null)||{})[t]??""}}),q0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],X0={comprasion:"Порівняння",today:"Сьогодні",yesterday:"Вчора",week:"Тиждень",month:"Місяць",alltime:"За весь час",clear:"Очистити",Gotovo:"Готово",Mon:"Пн",Tue:"Вт",Wed:"Ср",Thu:"Чт",Fri:"Пт",Sat:"Сб",Sun:"Нд",Jan:"Січень",Feb:"Лютий",Mar:"Березень",Apr:"Квітень",May:"Травень",Jun:"Червень",Jul:"Липень",Aug:"Серпень",Sep:"Вересень",Oct:"Жовтень",Nov:"Листопад",Dec:"Грудень"};function gr(e,t){typeof e=="string"&&t===void 0&&(t=e,e=new Date);const n=e instanceof Date?e:new Date(e);return t==="mmm"?q0[n.getMonth()]:`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`}const Z0={name:"SkyDateRangePicker",components:{FunctionalCalendar:Mf},props:{isExcel:{type:Boolean,default:!1},resetDate:{type:Boolean},modelValue:{type:Object,default:()=>({start:gr(new Date,"yyyy-m-d"),end:gr(new Date,"yyyy-m-d")})},enableClean:{type:Boolean,default:!0},dateComparing:{type:Boolean,default:!1},isdateLimist:{type:Boolean},countDays:{type:Number},fullFiscal:{type:Boolean,default:!1},localActive:{type:Boolean,default:!1},limits:{type:Object,default:null},allwaysShowLabel:{type:Boolean,default:!1},locale:{type:String,default:"uk-UA"}},emits:["update:modelValue","setDate","closed"],data(){return{localConfig:{},oneday:36e5*24,calendarData:{dateRange:{start:"",end:""}},limitsDate:{min:"",max:""},opened:!1,windowWidth:typeof window<"u"?window.innerWidth:1920,dateFormatOptions:{year:"numeric",month:"2-digit",day:"2-digit"},isInitialized:!1,quartals:{},activeIndex:{},activeYear:{year:"",key:""},lastSelectedRange:{start:"",end:""}}},computed:{lang(){return He},monthNow(){return gr("mmm")},monthLast(){const e=new Date;return e.setDate(1),e.setMonth(e.getMonth()-1),gr(e,"mmm")},rightWidth(){return this.windowWidth},dayNames(){return[this.t("Mon"),this.t("Tue"),this.t("Wed"),this.t("Thu"),this.t("Fri"),this.t("Sat"),this.t("Sun")]},monthNames(){return this.getMonthNames("long").map(e=>e.charAt(0).toUpperCase()+e.slice(1))},shortMonthNames(){return this.getMonthNames("short")},calendarPlaceholder(){return"Somedate"},dateFormat(){return gr},isDateEmpty(){return this.calendarData.dateRange.start===""&&this.calendarData.dateRange.end===""}},watch:{resetDate(){this.resetDate===!0&&this.cleanAndClose()},calendarData:{handler(){this.isdateLimist&&this.isInitialized&&this.setLimits(this.calendarData.dateRange.start,this.countDays)},deep:!0}},created(){this.isdateLimist?this.$nextTick(()=>{this.isInitialized=!0}):this.calendarData.dateRange=this.modelValue,this.fullFiscal&&(this.quartals=this.CvartalLabel())},mounted(){this.onResize=()=>{this.windowWidth=window.innerWidth},window.addEventListener("resize",this.onResize),this.$watch("modelValue",function(e){this.isdateLimist||(this.calendarData.dateRange=this.modelValue,this.calendarData.dateRange.start=this.formatDateString(this.calendarData.dateRange.start,"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.calendarData.dateRange.end,"","yyyy-m-d"))},{immediate:!0,deep:!0})},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{t(e){return this.lang[e]||X0[e]||e},setLimits(e,t){if(e){let n=new Date(e);n.setDate(n.getDate()-t),this.limitsDate.min=n.toISOString().split("T")[0],n.setDate(n.getDate()+t*2),this.limitsDate.max=n.toISOString().split("T")[0]}},handleCheckbox(){this.opened?this.closeCalendar():(this.$refs.Calendar.showCalendar=!0,this.opened=!0)},calendarLabel(e,t){e=e.replace(/-/g,"/"),t=t.replace(/-/g,"/");const n=this.locale,a=new Date(e).toLocaleDateString(n,{month:"long",day:"numeric"}),r=new Date(t).toLocaleDateString(n,{month:"long",day:"numeric"});return new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?this.t("today"):!e&&!t?this.t("alltime"):new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()!==new Date(this.today()).toDateString()||!t?`${a}`:new Date(e).toDateString()===new Date(t).toDateString()&&new Date(t).toDateString()===new Date(this.yesterday()).toDateString()?this.t("yesterday"):new Date(e).toDateString()===new Date(this.week()).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?`${a} - ${r}`:new Date(e).toDateString()===new Date(this.month()).toDateString()&&new Date(t).toDateString()===new Date(this.today()).toDateString()?`${a} - ${r}`:new Date(e).toDateString()===new Date(this.thisLastMonth().first).toDateString()&&new Date(t).toDateString()===new Date(this.thisLastMonth().last).toDateString()?this.t(this.monthLast):`${a} - ${r}`},setToday(){let e;this.dateComparing?e={cpr1:this.today(),cpr2:this.today()}:e={pr1:this.today(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.today(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.today(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setYesterday(){let e;this.dateComparing?e={cpr1:this.yesterday(),cpr2:this.yesterday()}:e={pr1:this.yesterday(),pr2:this.yesterday()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.yesterday(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.yesterday(),"","yyyy-m-d")),this.lastSelectedRange={start:this.yesterday(),end:this.yesterday()},this.$emit("setDate",e),this.closeCalendar()},setWeek(){let e;this.dateComparing?e={cpr1:this.week(),cpr2:this.today()}:e={pr1:this.week(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.week(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.week(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setMonth(){let e;this.dateComparing?e={cpr1:this.month(),cpr2:this.today()}:e={pr1:this.month(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.month(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.month(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setThisMonth(){let e;this.dateComparing?e={cpr1:this.thisMonth(),cpr2:this.today()}:e={pr1:this.thisMonth(),pr2:this.today()},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.thisMonth(),"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.today(),"","yyyy-m-d")),this.lastSelectedRange={start:this.thisMonth(),end:this.today()},this.$emit("setDate",e),this.closeCalendar()},setLastMonth(){let e;this.dateComparing?e={cpr1:this.thisLastMonth().first,cpr2:this.thisLastMonth().last}:e={pr1:this.thisLastMonth().first,pr2:this.thisLastMonth().last},this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDateString(this.thisLastMonth().first,"","yyyy-m-d"),this.calendarData.dateRange.end=this.formatDateString(this.thisLastMonth().last,"","yyyy-m-d")),this.lastSelectedRange={start:this.thisLastMonth().first,end:this.thisLastMonth().last},this.$emit("setDate",e),this.closeCalendar()},setAlltime(){let e;this.dateComparing?e={cpr1:"",cpr2:""}:e={pr1:"",pr2:""},this.$emit("setDate",e),this.closeCalendar()},getMonthDates(e=2e3){const t=[];for(let n=0;n<12;n++)t.push(new Date(e,n,15));return t},getMonthNames(e){const t=new Intl.DateTimeFormat(this.locale,{month:e,timezome:"UTC"});return this.getMonthDates().map(n=>t.format(n))},formatDateString(e,t="",n="dd.mm.yyyy"){if((typeof e=="string"||e instanceof String)&&e!=""){let a=e.split("-"),r=n.replace("dd",("0"+a[2]).slice(-2));return r=r.replace("mm",("0"+a[1]).slice(-2)),r=r.replace("yyyy",a[0]),r=r.replace("d",+a[2]),r=r.replace("m",+a[1]),r}else return t},calendarClosed(){this.$emit("update:modelValue",{start:this.formatDateString(this.calendarData.dateRange.start,"","yyyy-mm-dd"),end:this.formatDateString(this.calendarData.dateRange.end,"","yyyy-mm-dd")}),this.$emit("closed"),this.limitsDate.max="",this.limitsDate.min="",this.opened=!1},cleanAndClose(){this.isdateLimist?this.setToday():this.$refs.Calendar.cleanRange(),this.closeCalendar()},closeCalendar(){this.$refs.Calendar.showCalendar=!1,document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()},formatDate(e){const t=e.split("/"),n=t[2],a=t[0].padStart(2,"0"),r=t[1].padStart(2,"0");return`${n}-${a}-${r}`},calculateDate(e=0){const t=new Date;return new Date(new Date(t).setDate(t.getDate()-e)).toLocaleDateString("en-US",this.dateFormatOptions)},today(){return!this.isInitialized&&this.isdateLimist&&(this.calendarData.dateRange.start=this.formatDate(this.calculateDate(0)),this.calendarData.dateRange.end=this.formatDate(this.calculateDate(0))),this.formatDate(this.calculateDate(0))},checkToday(){return this.lastSelectedRange.start===this.today()&&this.lastSelectedRange.end===this.today()},yesterday(){return this.formatDate(this.calculateDate(1))},checkYesterday(){return this.lastSelectedRange.start===this.yesterday()&&this.lastSelectedRange.end===this.yesterday()},week(){return this.formatDate(this.calculateDate(6))},checkWeek(){return this.lastSelectedRange.start===this.week()&&this.lastSelectedRange.end===this.today()},month(){return this.formatDate(this.calculateDate(30))},checkMonth(){return this.lastSelectedRange.start===this.month()&&this.lastSelectedRange.end===this.today()},thisMonth(){const t=this.today().slice(8);let n;return t-1!=0?n=t-1:n=1,this.formatDate(this.calculateDate(n))},checkThisMonth(){return this.lastSelectedRange.start===this.thisMonth()&&this.lastSelectedRange.end===this.today()},thisLastMonth(){const t=this.today().slice(8),n=this.formatDate(this.calculateDate(t));return{first:`${n.slice(0,8)}01`,last:n}},setQuartal(e,t){let n=e.split("_")[0],a={first:{first:t+"-1-1",last:t+"-3-31"},second:{first:t+"-4-1",last:t+"-6-30"},third:{first:t+"-7-1",last:t+"-9-30"},fourth:{first:t+"-10-1",last:t+"-12-31"},year:{first:t+"-1-1",last:t+"-12-31"}},r,o="";this.limits?o=this.limits.max:o=a[n].last,this.dateComparing?r={cpr1:a[n].first,cpr2:this.minDate(a[n].last,o)}:r={pr1:a[n].first,pr2:this.minDate(a[n].last,o)},this.activeIndex={name:e,year:t},this.$emit("setDate",r)},minDate(e,t){return new Date(e)<new Date(t)?e:t},CvartalLabel(){const e=this.today(),t=parseInt(e.slice(0,4)),n=parseInt(e.slice(5,7)),a=t-1;this.activeYear.year=t,this.activeYear.key="year";let r={year:{label:"Рік",year:t,items:{}},lastYear:{label:"Рік",year:a,items:{}}};return[{start:1,name:"first",label:"1 квартал"},{start:4,name:"second",label:"2 квартал"},{start:7,name:"third",label:"3 квартал"},{start:10,name:"fourth",label:"4 квартал"},{start:1,name:"year",label:"Весь рік"}].forEach(s=>{s.start<=n&&(r.year.items[s.name]={year:t,label:s.label}),r.lastYear.items[s.name]={year:a,label:s.label}}),r},chooseYear(e,t){this.activeYear.year=e,this.activeYear.key=t},getRoundedClass(e){return this.activeYear.key===this.quartals[e].year?"":e=="year"?"left-radius":e=="lastYear"?"right-radius":"full-radius"},checkThisLastMonth(){return this.lastSelectedRange.start===this.thisLastMonth().first&&this.lastSelectedRange.end===this.thisLastMonth().last},checkAlltime(){return!this.lastSelectedRange.start&&!this.lastSelectedRange.end}}},J0={class:"datepicker datepicker-range"},Q0={key:0,style:{color:"inherit"},class:"calendarLabel"},ey={key:1,class:"calendarLabel"},ty={key:0},ny={class:"datefilter"},ay={key:1},ry={class:"yearBlock",style:{display:"flex"}},oy=["onClick"],iy={style:{padding:"5px 10px 5px 10px"},class:"quartalYear"},sy={class:"quartalsBlock"},ly=["onClick"],uy={class:"quartalLabel"},cy={class:"datepicker-range-footer"};function dy(e,t,n,a,r,o){const s=i.resolveComponent("FunctionalCalendar");return i.openBlock(),i.createElementBlock("div",J0,[i.createVNode(s,{ref:"Calendar",value:r.calendarData,"date-format":"yyyy-mm-dd","is-modal":!0,"is-separately":!0,"is-date-range":!0,"is-date-picker":n.isExcel,"is-auto-closeable":!0,"change-month-function":!0,"change-year-function":!0,limits:n.limits||r.limitsDate,"day-names":o.dayNames,"month-names":o.monthNames,"short-month-names":o.shortMonthNames,placeholder:o.calendarPlaceholder,"max-sel-days":r.localConfig.maxSelDays||!1,"min-sel-days":r.localConfig.minSelDays||!1,onClosed:o.calendarClosed},{dateRangeInputs:i.withCtx(l=>[i.renderSlot(e.$slots,"dateRangeInputs",{startDate:l.startDate,endDate:l.endDate},()=>[i.createElementVNode("div",{class:i.normalizeClass(["overlay",r.opened?"hf-check":""]),onClick:t[0]||(t[0]=i.withModifiers((...u)=>o.handleCheckbox&&o.handleCheckbox(...u),["prevent"]))},[n.dateComparing&&!(l.startDate&&l.endDate)&&(o.rightWidth>=450||n.allwaysShowLabel)?(i.openBlock(),i.createElementBlock("button",Q0,i.toDisplayString(o.t("comprasion")),1)):o.rightWidth>=450||n.allwaysShowLabel?(i.openBlock(),i.createElementBlock("button",ey,i.toDisplayString(o.calendarLabel(l.startDate,l.endDate)),1)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["icon",{"d-flex- align-items-center w-100":n.localActive}])},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["calendar-icon",{"calendar-icon--muted":r.opened}]),width:"18",height:"18",viewBox:"0 0 18 18"},[...t[10]||(t[10]=[i.createElementVNode("path",{fill:"currentColor",d:"M5 4.5a.5.5 0 0 1-.5-.5V2a.5.5 0 0 1 1 0v2a.5.5 0 0 1-.5.5zM11 4.5a.5.5 0 0 1-.5-.5V2a.5.5 0 0 1 1 0v2a.5.5 0 0 1-.5.5z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M13 14.5H3c-.827 0-1.5-.673-1.5-1.5V4c0-.827.673-1.5 1.5-1.5h10c.827 0 1.5.673 1.5 1.5v9c0 .827-.673 1.5-1.5 1.5zM3 3.5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V4a.5.5 0 0 0-.5-.5H3z"},null,-1),i.createElementVNode("path",{fill:"currentColor",d:"M14 6.5H2a.5.5 0 0 1 0-1h12a.5.5 0 0 1 0 1zM5.5 7.5h1v1h-1zM7.5 7.5h1v1h-1zM9.5 7.5h1v1h-1zM11.5 7.5h1v1h-1zM3.5 9.5h1v1h-1zM5.5 9.5h1v1h-1zM7.5 9.5h1v1h-1zM9.5 9.5h1v1h-1zM11.5 9.5h1v1h-1zM3.5 11.5h1v1h-1zM5.5 11.5h1v1h-1zM7.5 11.5h1v1h-1z"},null,-1)])],2)),n.localActive&&o.rightWidth<=450?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(o.calendarLabel(l.startDate,l.endDate)),1)],64)):i.createCommentVNode("",!0)],2)],2)],!0)]),footer:i.withCtx(()=>[n.fullFiscal?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ty,[i.createElementVNode("ul",ny,[i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkToday()}]),onClick:t[1]||(t[1]=(...l)=>o.setToday&&o.setToday(...l))},i.toDisplayString(o.t("today")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkYesterday()}]),onClick:t[2]||(t[2]=(...l)=>o.setYesterday&&o.setYesterday(...l))},i.toDisplayString(o.t("yesterday")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkWeek()}]),onClick:t[3]||(t[3]=(...l)=>o.setWeek&&o.setWeek(...l))},i.toDisplayString(o.t("week")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkMonth()}]),onClick:t[4]||(t[4]=(...l)=>o.setMonth&&o.setMonth(...l))},i.toDisplayString(o.t("month")),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton hideThisOnMob",{selectedRangeWraper:o.checkThisLastMonth()}]),onClick:t[5]||(t[5]=(...l)=>o.setLastMonth&&o.setLastMonth(...l))},i.toDisplayString(o.t(o.monthLast)),3),i.createElementVNode("li",{class:i.normalizeClass(["datebutton hideThisOnMob",{selectedRangeWraper:o.checkThisMonth()}]),onClick:t[6]||(t[6]=(...l)=>o.setThisMonth&&o.setThisMonth(...l))},i.toDisplayString(o.t(o.monthNow)),3),!n.dateComparing&&!n.isdateLimist&&!n.isExcel?(i.openBlock(),i.createElementBlock("li",{key:0,class:i.normalizeClass(["datebutton",{selectedRangeWraper:o.checkAlltime()}]),onClick:t[7]||(t[7]=(...l)=>o.setAlltime&&o.setAlltime(...l))},i.toDisplayString(o.t("alltime")),3)):i.createCommentVNode("",!0)])])),n.fullFiscal?(i.openBlock(),i.createElementBlock("div",ay,[i.createElementVNode("div",ry,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.quartals,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass([r.activeYear.year==l.year?"activeYear":"nonActiveYear",o.getRoundedClass(u)]),onClick:c=>o.chooseYear(l.year,u)},[i.createElementVNode("p",iy,i.toDisplayString(l.year),1)],10,oy))),128))]),i.createElementVNode("div",sy,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.quartals[r.activeYear.key].items,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass(["quartalButton",{selectedQuartal:r.activeIndex.name===u&&r.activeIndex.year===l.year}]),onClick:c=>o.setQuartal(u,l.year)},[i.createElementVNode("label",uy,i.toDisplayString(l.label),1)],10,ly))),128))])])):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"footer",{},()=>[i.createElementVNode("div",cy,[n.enableClean?(i.openBlock(),i.createElementBlock("p",{key:0,class:i.normalizeClass(["datepicker-range-footer-button footer-button-clear",o.isDateEmpty?"footer-button-clear-disabled":null]),onClick:t[8]||(t[8]=l=>o.isDateEmpty?null:o.cleanAndClose())},i.toDisplayString(o.t("clear")),3)):i.createCommentVNode("",!0),i.createElementVNode("p",{class:"datepicker-range-footer-button footer-button-save",onClick:t[9]||(t[9]=(...l)=>o.closeCalendar&&o.closeCalendar(...l))},i.toDisplayString(o.t("Gotovo")),1)])],!0)]),_:3},8,["value","is-date-picker","limits","day-names","month-names","short-month-names","placeholder","max-sel-days","min-sel-days","onClosed"])])}const fy=ee(Z0,[["render",dy],["__scopeId","data-v-2209df8d"]]),my={class:"sky-filter-dropdown"},hy=["disabled","aria-expanded"],py={class:"sky-filter-dropdown__title"},vy={key:0,class:"sky-filter-dropdown__badge"},gy={key:0,class:"sky-filter-dropdown__caret",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},yy=["aria-label"],$o=5,qu=180,yr=8,_y=i.defineComponent({__name:"SkyFilterDropdown",props:{title:{},summary:{default:""},badge:{default:""},disabled:{type:Boolean,default:!1},align:{default:"start"},width:{default:280},triggerClass:{default:""},panelClass:{default:""},panelVars:{default:()=>({})}},emits:["open","close"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=i.ref(null),s=i.ref(null),l=i.ref(!1),u=i.ref({}),c=i.computed(()=>a.summary||a.title),d=i.computed(()=>!a.disabled&&a.badge!==""&&a.badge!=null);function f(){const k=o.value;if(!k)return;const C=k.getBoundingClientRect(),E=window.innerWidth,D=window.innerHeight,w=Math.min(a.width,E-yr*2),T=a.align==="end"?C.right-w:C.left,I=D-C.bottom-$o-yr,R=C.top-$o-yr,O=I<qu&&R>I;u.value={...a.panelVars,left:`${Math.max(yr,Math.min(T,E-w-yr))}px`,width:`${w}px`,maxHeight:`${Math.max(qu,O?R:I)}px`,...O?{bottom:`${D-C.top+$o}px`}:{top:`${C.bottom+$o}px`}}}function m(){a.disabled||l.value||(l.value=!0,r("open"),i.nextTick(f))}function h(){l.value&&(l.value=!1,r("close"))}function g(){l.value?h():m()}function y(k){var E,D;const C=k.target;C&&((E=o.value)!=null&&E.contains(C)||(D=s.value)!=null&&D.contains(C)||h())}function _(k){var C;k.key==="Escape"&&(h(),(C=o.value)==null||C.focus())}function p(){document.addEventListener("pointerdown",y,!0),document.addEventListener("keydown",_),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f)}function v(){document.removeEventListener("pointerdown",y,!0),document.removeEventListener("keydown",_),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}return i.watch(l,k=>k?p():v()),i.watch(()=>a.disabled,k=>{k&&h()}),i.onBeforeUnmount(v),t({open:m,close:h,toggle:g,isOpen:l}),(k,C)=>(i.openBlock(),i.createElementBlock("div",my,[i.createElementVNode("button",{ref_key:"triggerRef",ref:o,type:"button",class:i.normalizeClass(["sky-filter-dropdown__trigger",[e.triggerClass,{"is-open":l.value,"is-disabled":e.disabled}]]),disabled:e.disabled,"aria-haspopup":"dialog","aria-expanded":l.value,onClick:g},[i.renderSlot(k.$slots,"trigger",{isOpen:l.value},()=>[i.createElementVNode("span",py,i.toDisplayString(c.value),1),d.value?(i.openBlock(),i.createElementBlock("span",vy,i.toDisplayString(e.badge),1)):i.createCommentVNode("",!0)],!0),k.$slots.trigger?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("svg",gy,[...C[0]||(C[0]=[i.createElementVNode("path",{d:"m6 9 6 6 6-6"},null,-1)])]))],10,hy),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"sky-filter-dropdown-fade"},{default:i.withCtx(()=>[l.value?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"panelRef",ref:s,class:i.normalizeClass(["sky-filter-dropdown__panel",e.panelClass]),role:"dialog","aria-label":e.title,style:i.normalizeStyle(u.value)},[i.renderSlot(k.$slots,"default",{close:h},void 0,!0)],14,yy)):i.createCommentVNode("",!0)]),_:3})]))]))}}),Ei=ee(_y,[["__scopeId","data-v-557df337"]]),ky=["id","type","value","placeholder","disabled"],by=i.defineComponent({__name:"SkyInput",props:{modelValue:{},type:{},placeholder:{},id:{},disabled:{type:Boolean},state:{},hint:{}},emits:["update:modelValue"],setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:e.id,class:i.normalizeClass(["sky-input",e.state]),type:e.type??"text",value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,onInput:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value))},null,42,ky),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],64))}}),Cy=ee(by,[["__scopeId","data-v-6fe5a450"]]),wy={class:"sky-loader"},Ey={key:0,class:"sky-loader-text"},Sy={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"50px",viewBox:"0 0 44.96 56.12",style:{"enable-background":"new 0 0 44.96 56.12",fill:"#ffffff",display:"block",margin:"auto","margin-top":"39px"},"xml:space":"preserve"},Ty=i.defineComponent({__name:"SkyLoader",props:{text:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",wy,[e.text?(i.openBlock(),i.createElementBlock("div",Ey,i.toDisplayString(e.text),1)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",Sy,[...n[0]||(n[0]=[i.createElementVNode("path",{d:"m0.84382,47.05821l28.6299,0c4.64652,0 4.86634,-4.02966 4.86634,-5.8895c0,-2.16243 -0.51403,-4.63853 -5.01514,-6.10722l-20.36828,-6.73085c-0.80824,-0.23248 -4.05472,-1.39119 -6.12097,-4.02597c-2.36046,-2.94475 -2.65467,-7.19581 -2.65467,-10.21806c0,-3.25103 0.36861,-7.19581 3.3175,-10.06307c2.65467,-2.6237 5.97893,-3.01855 8.48819,-3.01855l29.73235,0l0,8.12942l-26.41485,0c-1.32565,0 -2.87787,0.07749 -4.05472,1.23989c-1.25463,1.2362 -1.32565,3.16985 -1.32565,4.17726c0,2.40229 0.66282,4.71972 4.79194,6.1146l18.88707,6.26958c3.46291,1.1624 5.83014,2.3248 7.3756,3.86729c3.10106,3.09605 3.39528,7.89694 3.39528,10.44685c0,3.40602 -0.44301,7.20319 -2.58028,10.07045c-2.58366,3.48351 -5.83014,3.86729 -9.22203,3.86729l-31.72758,0l0,-8.12942z"},null,-1)])])),n[1]||(n[1]=i.createElementVNode("div",{class:"sky-loader-double-ring"},[i.createElementVNode("div")],-1))]))}}),Dy=ee(Ty,[["__scopeId","data-v-934935ba"]]),Oy={key:0,class:"sky-pagination"},Vy={class:"sky-pagination__size-value"},$y={class:"sky-pagination__list"},xy=["onClick"],Iy=["disabled","aria-current","onClick"],Ry=i.defineComponent({__name:"SkyPagination",props:{total:{},page:{},pageSize:{},pageSizeOptions:{default:()=>[5,10,25,50,100,200,500,750,1e3]},allLabel:{type:Function,default:void 0},allLimit:{default:1e3},siblings:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:page","update:pageSize"],setup(e,{emit:t}){const n=e,a=t,r={"--sky-filter-panel-padding":"0","--sky-filter-panel-radius":"4px","--sky-filter-panel-bg":"#fff","--sky-filter-panel-shadow":"none"},o=i.computed(()=>Math.max(1,Math.ceil(n.total/Math.max(1,n.pageSize)))),s=i.computed(()=>!!n.allLabel&&n.total>0&&n.total<=n.allLimit),l=i.computed(()=>s.value&&n.pageSize>=n.total?n.total:n.pageSize),u=i.computed(()=>{const g=n.pageSizeOptions.filter(y=>y<n.total);return s.value&&g.push(n.total),g.includes(l.value)||g.push(l.value),[...new Set(g)].sort((y,_)=>y-_)}),c=g=>s.value&&g===n.total?n.allLabel(n.total):String(g),d=i.computed(()=>{const g=o.value,y=n.siblings;if(g<=5+y*2)return Array.from({length:g},(k,C)=>C+1);const _=Math.max(2,n.page-y),p=Math.min(g-1,n.page+y),v=[1];_>2&&v.push("…");for(let k=_;k<=p;k++)v.push(k);return p<g-1&&v.push("…"),v.push(g),v}),f=i.computed(()=>o.value>1||u.value.length>1);function m(g){n.disabled||g===n.page||a("update:page",g)}function h(g,y){y(),g!==l.value&&a("update:pageSize",g)}return(g,y)=>f.value?(i.openBlock(),i.createElementBlock("div",Oy,[u.value.length>1?(i.openBlock(),i.createBlock(Ei,{key:0,class:"sky-pagination__size","trigger-class":"sky-pagination__size-btn","panel-class":"sky-pagination__menu","panel-vars":r,title:c(l.value),width:160,disabled:e.disabled},{trigger:i.withCtx(()=>[i.createElementVNode("span",Vy,i.toDisplayString(c(l.value)),1),y[0]||(y[0]=i.createElementVNode("i",{class:"sky-pagination__size-caret","aria-hidden":"true"},null,-1))]),default:i.withCtx(({close:_})=>[i.createElementVNode("ul",$y,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.value,p=>(i.openBlock(),i.createElementBlock("li",{key:p,class:"sky-pagination__item"},[i.createElementVNode("button",{type:"button",class:"sky-pagination__item-btn",onClick:v=>h(p,_)},i.toDisplayString(c(p)),9,xy)]))),128))])]),_:1},8,["title","disabled"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value>1?d.value:[],(_,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[_!=="…"?(i.openBlock(),i.createElementBlock("button",{key:`p${_}`,type:"button",class:i.normalizeClass(["sky-pagination__page",{"is-current":_===e.page}]),style:i.normalizeStyle(p===0&&u.value.length>1?{marginLeft:"5px"}:void 0),disabled:e.disabled,"aria-current":_===e.page?"page":void 0,onClick:v=>m(_)},i.toDisplayString(_),15,Iy)):(i.openBlock(),i.createElementBlock("span",{key:`gap${p}`,class:"sky-pagination__gap"},"…"))],64))),256))])):i.createCommentVNode("",!0)}}),By=ee(Ry,[["__scopeId","data-v-d25e6c02"]]),Ny=["id","value","disabled"],Ay={key:0,value:"",disabled:"",hidden:""},Py=["value"],My=i.defineComponent({__name:"SkySelect",props:{modelValue:{},options:{},id:{},disabled:{type:Boolean},state:{},placeholder:{},hint:{}},emits:["update:modelValue"],setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("select",{id:e.id,class:i.normalizeClass(["sky-select",e.state]),value:e.modelValue,disabled:e.disabled,onChange:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value))},[e.placeholder?(i.openBlock(),i.createElementBlock("option",Ay,i.toDisplayString(e.placeholder),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,a=>(i.openBlock(),i.createElementBlock("option",{key:a.value,value:a.value},i.toDisplayString(a.text),9,Py))),128))],42,Ny),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],64))}}),Ly=ee(My,[["__scopeId","data-v-dc5ff9bc"]]),Fy={class:"sky-select-search__control"},jy=["id","disabled","aria-expanded","aria-controls","aria-activedescendant"],Uy={key:0,class:"sky-select-search__search"},zy=["placeholder","aria-controls","aria-activedescendant"],Hy=["id"],Wy=["id","aria-selected","onMousemove","onMousedown"],Yy={key:0,class:"sky-select-search__empty"},Ky=6,Xu=4,Zu=160,Ju=8,Gy=i.defineComponent({__name:"SkySelectSearch",props:{modelValue:{default:void 0},options:{},id:{default:void 0},disabled:{type:Boolean,default:!1},state:{default:"default"},placeholder:{default:""},hint:{default:""},searchPlaceholder:{default:"Пошук…"},noResultsText:{default:"Нічого не знайдено"},searchThreshold:{default:Ky}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=i.computed(()=>n.options.length>=n.searchThreshold),r=t;let o=0;const s=`sky-select-search-${o+=1}`,l=i.ref(null),u=i.ref(null),c=i.ref(null),d=i.ref(null),f=i.ref(!1),m=i.ref(""),h=i.ref(-1),g=i.ref(!1),y=i.ref("");function _(){const N=c.value;if(!N)return;const P=N.getBoundingClientRect(),A=window.innerHeight-P.bottom-Xu-Ju,j=P.top-Xu-Ju,V=A<Zu&&j>A;g.value=V,y.value=`${Math.max(Zu,V?j:A)}px`}const p=i.computed(()=>{const N=n.options.find(P=>P.value===n.modelValue);return N?N.text:""}),v=i.computed(()=>{const N=m.value.trim().toLowerCase();return N?n.options.filter(P=>String(P.text).toLowerCase().indexOf(N)!==-1):n.options}),k=i.computed(()=>h.value>=0?`${s}-opt-${h.value}`:"");function C(){if(n.disabled||f.value)return;_(),f.value=!0,m.value="";const N=v.value.findIndex(P=>P.value===n.modelValue);h.value=N!==-1?N:v.value.length?0:-1,i.nextTick(()=>{u.value&&u.value.focus(),I()})}function E(N){f.value&&(f.value=!1,m.value="",h.value=-1,N&&c.value&&c.value.focus())}function D(){n.disabled||(f.value?E(!1):C())}function w(N){r("update:modelValue",N.value),E(!0)}function T(N){const P=v.value.length;if(!P)return;let x=h.value+N;x<0&&(x=0),x>P-1&&(x=P-1),h.value=x,i.nextTick(I)}function I(){if(!d.value||h.value<0)return;const P=d.value.querySelectorAll(".sky-select-search__option")[h.value];P&&P.scrollIntoView({block:"nearest"})}function R(N){if(!n.disabled){if(f.value){O(N);return}(N.key==="ArrowDown"||N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),C())}}function O(N){if(N.key==="ArrowDown")N.preventDefault(),T(1);else if(N.key==="ArrowUp")N.preventDefault(),T(-1);else if(N.key==="Enter"){N.preventDefault();const P=v.value[h.value];P&&w(P)}else N.key==="Escape"?(N.preventDefault(),E(!0)):N.key==="Tab"&&E(!1)}i.watch(m,()=>{h.value=v.value.length?0:-1});function $(N){if(!f.value)return;const P=N.target;l.value&&P&&l.value.contains(P)||E(!1)}return i.onMounted(()=>{document.addEventListener("mousedown",$)}),i.watch(f,N=>{N?(window.addEventListener("scroll",_,!0),window.addEventListener("resize",_)):(window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_))}),i.onBeforeUnmount(()=>{document.removeEventListener("mousedown",$),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_)}),(N,P)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:i.normalizeClass(["sky-select-search",{"is-open":f.value,"is-disabled":e.disabled}])},[i.createElementVNode("div",Fy,[i.createElementVNode("button",{ref_key:"triggerRef",ref:c,type:"button",class:i.normalizeClass(["sky-select-search__trigger",e.state]),id:e.id,disabled:e.disabled,role:"combobox","aria-haspopup":"listbox","aria-expanded":f.value?"true":"false","aria-controls":`${s}-list`,"aria-activedescendant":!a.value&&f.value?k.value:void 0,onClick:D,onKeydown:R},[i.createElementVNode("span",{class:i.normalizeClass(["sky-select-search__value",{"is-placeholder":!p.value}])},i.toDisplayString(p.value||e.placeholder),3)],42,jy),f.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["sky-select-search__dropdown",{"is-drop-up":g.value}]),style:i.normalizeStyle({maxHeight:y.value})},[a.value?(i.openBlock(),i.createElementBlock("div",Uy,[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":P[0]||(P[0]=x=>m.value=x),type:"text",class:"sky-select-search__input",placeholder:e.searchPlaceholder,"aria-controls":`${s}-list`,"aria-activedescendant":k.value,autocomplete:"off",onKeydown:O},null,40,zy),[[i.vModelText,m.value]])])):i.createCommentVNode("",!0),i.createElementVNode("ul",{id:`${s}-list`,ref_key:"listRef",ref:d,class:"sky-select-search__list",role:"listbox"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.value,(x,A)=>(i.openBlock(),i.createElementBlock("li",{id:`${s}-opt-${A}`,key:x.value,class:i.normalizeClass(["sky-select-search__option",{"is-active":A===h.value,"is-selected":x.value===e.modelValue}]),role:"option","aria-selected":x.value===e.modelValue?"true":"false",onMousemove:j=>h.value=A,onMousedown:i.withModifiers(j=>w(x),["prevent"])},i.toDisplayString(x.text),43,Wy))),128)),v.value.length?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("li",Yy,i.toDisplayString(e.noResultsText),1))],8,Hy)],6)):i.createCommentVNode("",!0)]),e.hint?(i.openBlock(),i.createElementBlock("small",{key:0,class:i.normalizeClass(["setting-hint",e.state])},i.toDisplayString(e.hint),3)):i.createCommentVNode("",!0)],2))}}),qy=ee(Gy,[["__scopeId","data-v-0b50e37f"]]),Xy=["id","value","placeholder","disabled"],Zy=["aria-label","disabled"],Jy=i.defineComponent({__name:"SkySearchInput",props:{modelValue:{default:""},placeholder:{default:""},id:{default:void 0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},clearAriaLabel:{default:"Очистити"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref(null),s=i.ref(!n.collapsible);function l(){n.disabled||s.value||(s.value=!0,requestAnimationFrame(()=>{var g;return(g=o.value)==null?void 0:g.focus()}))}function u(){var g;!n.collapsible||!s.value||n.modelValue||(s.value=!1,(g=o.value)==null||g.blur())}function c(){!n.collapsible||n.disabled||s.value||l()}function d(){!n.collapsible||n.disabled||(s.value?u():l())}function f(g){a("update:modelValue",g.target.value)}function m(){var g;if(!n.disabled){if(n.modelValue){a("update:modelValue",""),(g=o.value)==null||g.focus();return}n.collapsible&&(s.value=!1)}}function h(g){if(!n.collapsible||!s.value)return;const y=g.target;r.value&&y&&r.value.contains(y)||u()}return i.onMounted(()=>{document.addEventListener("mousedown",h)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousedown",h)}),(g,y)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"wrapperRef",ref:r,class:i.normalizeClass(["sky-search",{"is-collapsible":e.collapsible,"is-collapsed":e.collapsible&&!s.value,"is-disabled":e.disabled}]),onClick:c},[i.createElementVNode("input",{id:e.id,ref_key:"inputRef",ref:o,type:"text",class:i.normalizeClass(["sky-search__input",{"has-value":e.modelValue}]),value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",onInput:f},null,42,Xy),i.createElementVNode("span",{class:"sky-search__icon","aria-hidden":"true",onClick:i.withModifiers(d,["stop"])},[...y[0]||(y[0]=[i.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"currentColor"},[i.createElementVNode("path",{d:"M15.504 13.616l-3.79-3.223c-0.392-0.353-0.811-0.514-1.149-0.499 0.895-1.048 1.435-2.407 1.435-3.893 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.486 0 2.845-0.54 3.893-1.435-0.016 0.338 0.146 0.757 0.499 1.149l3.223 3.79c0.552 0.613 1.453 0.665 2.003 0.115s0.498-1.451-0.115-2.003zM6 10c-2.209 0-4-1.791-4-4s1.791-4 4-4 4 1.791 4 4-1.791 4-4 4z"})],-1)])]),i.createElementVNode("button",{type:"button",class:"sky-search__clear","aria-label":e.clearAriaLabel,disabled:e.disabled,onClick:i.withModifiers(m,["stop"])},[...y[1]||(y[1]=[i.createElementVNode("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[i.createElementVNode("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6z"})],-1)])],8,Zy)],2))}}),Lf=ee(Jy,[["__scopeId","data-v-f63d7c34"]]),Qy={key:0,class:"productAppereanceBlock__productName"},e2={key:1,class:"productAppereanceBlock__productName_onlyText"},t2={key:0,class:"productAppereanceBlock__description"},n2=["src"],a2=["innerHTML"],r2={__name:"itemDefault",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""},section:{type:String,default:null},name:{type:String,default:""}},emits:["open","updateRemains"],setup(e,{emit:t}){const n=e,a=t,r=[{group:"Quantity",value:"pcs",text:He.shtuk||"шт"},{group:"Weight",value:"t",text:He.unit_t||"т"},{group:"Weight",value:"kg",text:He.unit_kg||"кг"},{group:"Weight",value:"gr",text:He.unit_gr||"г"},{group:"Volume",value:"l",text:He.unit_l||"л"},{group:"Volume",value:"ml",text:He.unit_ml||"мл"},{group:"Time",value:"min",text:He.unit_min||"хв"},{group:"Meters",value:"m",text:He.unit_m||"м"},{group:"Meters",value:"cm",text:He.unit_cm||"см"},{group:"Meters",value:"mm",text:He.unit_mm||"мм"},{group:"Meters",value:"m3",text:He.unit_m3||"м³"},{group:"Meters",value:"m2",text:He.unit_m2||"м²"},{group:"Meters",value:"mp",text:He.unit_mp||"м.п."}],o=i.computed(()=>{if(n.params.name==="type"){const c=r.find(d=>d.value===n.item.unit);return c?c.text:""}return null}),s=i.computed(()=>{var d,f;const c=(d=n.item[n.name])==null?void 0:d.match(/[а-яa-zА-ЯA-Z]+/g);return c?c.length===1?c[0].length===1?`${c[0][0]}`:`${c[0][0]}${c[0][1]}`:c.length>1?`${c[0][0]}${c[1][0]}`:"":((f=n.item[n.name])==null?void 0:f.substr(0,2))||""}),l=i.computed(()=>n.params.name==="logo"&&n.item.logo?`https://img-1.skyservice.pro/uploads/images/${n.item.logo}`:"");function u(){return n.item[n.params.activeAppearance]===0?`background-color: ${n.item.background}`:n.item[n.params.activeAppearance]===1?`background-image: url(${l.value})`:n.item[n.params.activeAppearance]===3&&n.params.mutate?`background-image: url(${n.params.mutate(n.item[n.params.name],n.item)})`:"background: #fff"}return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["item-default",{negativeQuantity:e.params.name==="quantity"&&+e.item[e.params.name]<0,minQuantity:e.params.name==="quantity"&&+e.item[e.params.name]>0&&+e.item[e.params.name]<e.item.min_quantity}]),style:i.normalizeStyle(e.params.style?e.params.style(e.item[e.params.name],e.item)+`flex: ${e.widthFlex};`:`flex: ${e.widthFlex};`),onClick:d[1]||(d[1]=f=>a("open"))},[i.renderSlot(c.$slots,"default",{item:e.item,value:e.item[e.params.name]},()=>[e.params.name=="logo"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{class:"productAppereanceBlock",style:i.normalizeStyle([{"flex-shrink":"0"},u()])},[e.item[e.params.activeAppearance]==0?(i.openBlock(),i.createElementBlock("span",Qy,i.toDisplayString(s.value),1)):e.item[e.params.activeAppearance]==2?(i.openBlock(),i.createElementBlock("span",e2,i.toDisplayString(e.item[e.name]),1)):i.createCommentVNode("",!0)],4),e.params.description?(i.openBlock(),i.createElementBlock("div",t2,i.toDisplayString(e.item[e.name]),1)):i.createCommentVNode("",!0)],64)):e.params.mutate!=null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[e.params.image?(i.openBlock(),i.createElementBlock("span",{key:0,style:{cursor:"pointer"},onClick:d[0]||(d[0]=f=>e.params.emit?a(e.params.emit,e.item):null)},[i.createElementVNode("img",{class:i.normalizeClass(["movement-history",{movementHistoryWhite:e.params.name==="quantity"&&+e.item[e.params.name]<0}]),src:e.params.image},null,10,n2)])):i.createCommentVNode("",!0),i.createElementVNode("span",{style:i.normalizeStyle(e.params.styleChildren?e.params.styleChildren(e.item[e.params.name],e.item):""),innerHTML:e.params.mutate(e.item[e.params.name],e.item)+(o.value?` (${o.value})`:"")},null,12,a2)],64)):(i.openBlock(),i.createElementBlock("span",{key:2,style:i.normalizeStyle(e.params.styleChildren?e.params.styleChildren(e.item[e.params.name],e.item):"")},i.toDisplayString(e.item[e.params.name]),5))],!0)],6))}},Qu=ee(r2,[["__scopeId","data-v-396f67b1"]]),o2=["disabled"],i2=["value"],s2=["value"],l2={__name:"itemSelect",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},emits:["selectUpdate"],setup(e){const t=e,n=i.computed(()=>{const a=`flex: ${t.widthFlex};`;return t.params.style?t.params.style(t.item[t.params.name],t.item)+a:a});return(a,r)=>e.params.select!=null?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":r[0]||(r[0]=o=>e.item[e.params.name]=o),disabled:e.params.disable?!e.item[e.params.disable]&&e.item[e.params.disable]!==0:!1,class:i.normalizeClass(["table-custom-select table__categories",{"hidden-item":e.item[e.params.name]===void 0}]),style:i.normalizeStyle(n.value),onChange:r[1]||(r[1]=o=>a.$emit("selectUpdate"))},[e.params.select.default!=null?(i.openBlock(),i.createElementBlock("option",{key:0,value:e.item[e.params.name]===null?null:0},i.toDisplayString(e.params.select.default),9,i2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.select.items,(o,s)=>(i.openBlock(),i.createElementBlock("option",{key:s,value:o.id},i.toDisplayString(o.title?o.spacesh?o.spacesh+o.title:o.title:o.spacesh?o.spacesh+o.name:o.name),9,s2))),128))],46,o2)),[[i.vModelSelect,e.item[e.params.name]]]):i.createCommentVNode("",!0)}},u2=ee(l2,[["__scopeId","data-v-7f6acadb"]]),c2={props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},data(){return{editMode:!1,lastValue:null,enterPressed:!1}},methods:{editInputFocus(){if(this.params.emit)if(this.params.name==="markup"){if(!+this.item.cost){this.$emit(this.params.emit,this.item);return}}else{this.$emit(this.params.emit,this.item);return}this.editMode=!0,this.lastValue=this.item[this.params.name],this.$nextTick(()=>{this.$refs.inputElem.focus()})},editInputBlur(){this.editMode=!1,this.$nextTick(()=>this.enterPressed=!1),this.lastValue!=this.item[this.params.name]&&this.$emit("inputEdit",this.lastValue)},open(){this.$emit("open")}}},d2=["innerHTML"];function f2(e,t,n,a,r,o){return r.editMode===!1?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["item-inner custom-input",{"hidden-item":n.item[n.params.name]===void 0}]),style:i.normalizeStyle(n.params.style?n.params.style(n.item[n.params.name],n.item)+`cursor: pointer; flex: ${n.widthFlex};`:`cursor: pointer; flex: ${n.widthFlex};`),onClick:t[0]||(t[0]=s=>n.params.inputEnabled?o.editInputFocus():null),onMousedown:t[1]||(t[1]=s=>n.params.inputEnabled?null:o.open()),innerHTML:n.params.mutate?n.params.mutate(n.item[n.params.name],n.item):n.item[n.params.name]},null,46,d2)):i.withDirectives((i.openBlock(),i.createElementBlock("input",{key:1,ref:"inputElem","onUpdate:modelValue":t[2]||(t[2]=s=>n.item[n.params.name]=s),type:"number",class:i.normalizeClass(["form-control input custom-input",{"hidden-item":n.item[n.params.name]===void 0}]),style:i.normalizeStyle({flex:n.widthFlex}),onKeyup:t[3]||(t[3]=i.withKeys(s=>{r.enterPressed=!0,o.editInputBlur()},["enter"])),onBlur:t[4]||(t[4]=s=>r.enterPressed?null:o.editInputBlur())},null,38)),[[i.vModelText,n.item[n.params.name]]])}const m2=ee(c2,[["render",f2],["__scopeId","data-v-bd215e17"]]),h2={name:"TagsInput",provide(){return{tagsInputProvider:{registerInput:this.registerInput,addTag:this.addTag,removeTag:this.removeTag,tags:()=>this.tags}}},props:{value:{type:Array,default:()=>[]}},data(){return{tags:this.value,inputComponent:null}},watch:{value(e){this.tags=e},tags(e){this.$emit("input",e)}},methods:{registerInput(e){this.inputComponent=e},addTag(e){e&&e.trim()&&!this.tags.includes(e.trim())&&(this.tags=[...this.tags,e.trim()])},removeTag(e){this.tags=this.tags.filter(t=>t!==e)}}},p2={class:"tags-input"};function v2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",p2,[i.renderSlot(e.$slots,"default")])}const g2=ee(h2,[["render",v2]]),y2={name:"TagsInputItem",inject:["tagsInputProvider"],props:{value:{type:String,required:!0}},provide(){return{tagItem:{value:this.value,remove:this.remove}}},methods:{remove(){this.tagsInputProvider.removeTag(this.value)}}},_2={class:"tags-input-item"};function k2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",_2,[i.renderSlot(e.$slots,"default")])}const b2=ee(y2,[["render",k2]]),C2={name:"TagsInputItemDelete",inject:["tagItem"],props:{useCustomHandler:{type:Boolean,default:!1}},methods:{remove(){this.tagItem.remove()},handleClick(e){this.$emit("click",e),this.useCustomHandler||this.remove()}}};function w2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("button",{type:"button",onClick:t[0]||(t[0]=(...s)=>o.handleClick&&o.handleClick(...s)),class:"tags-input-item-delete"},[...t[1]||(t[1]=[i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"delete-icon"},[i.createElementVNode("path",{d:"M18 6 6 18"}),i.createElementVNode("path",{d:"m6 6 12 12"})],-1),i.createElementVNode("span",{class:"sr-only"},"Remove",-1)])])}const E2=ee(C2,[["render",w2]]),S2={name:"TagsInputItemText",inject:["tagItem"],computed:{value(){return this.tagItem.value}}},T2={class:"tags-input-item-text"};function D2(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("span",T2,i.toDisplayString(o.value),1)}const O2=ee(S2,[["render",D2]]),V2={components:{TagsInput:g2,TagsInputItem:b2,TagsInputItemText:O2,TagsInputItemDelete:E2},props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},data(){return{editMode:!1,lastValue:null,enterPressed:!1}},methods:{editInputFocus(){if(this.params.emit)if(this.params.name==="markup"){if(!+this.item.cost){this.$emit(this.params.emit,this.item);return}}else{this.$emit(this.params.emit,this.item);return}this.editMode=!0,this.lastValue=this.item[this.params.name],this.$nextTick(()=>{this.$refs.inputElem.focus()})},editInputBlur(){this.editMode=!1,this.$nextTick(()=>this.enterPressed=!1),this.lastValue!=this.item[this.params.name]&&this.$emit("inputEdit",this.lastValue)},open(){this.$emit("open")}}};function $2(e,t,n,a,r,o){const s=i.resolveComponent("TagsInputItemText"),l=i.resolveComponent("TagsInputItemDelete"),u=i.resolveComponent("TagsInputItem"),c=i.resolveComponent("TagsInput");return i.openBlock(),i.createElementBlock("div",{class:"tags-container item-inner custom-input",style:i.normalizeStyle(n.params.style?n.params.style(n.item[n.params.name],n.item)+`cursor: pointer; flex: ${n.widthFlex};`:`cursor: pointer; flex: ${n.widthFlex};`)},[i.createVNode(c,{modelValue:n.item.tags,"onUpdate:modelValue":t[1]||(t[1]=d=>n.item.tags=d),class:"tags-input"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.item.tags,d=>(i.openBlock(),i.createBlock(u,{key:d,value:d},{default:i.withCtx(()=>[i.createVNode(s),i.createVNode(l,{onClick:f=>e.$emit("deleteTag",d)},null,8,["onClick"])]),_:2},1032,["value"]))),128)),n.item.tags.length!=2?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"add-tag-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",onClick:t[0]||(t[0]=d=>e.$emit("openTagsModal"))},[...t[2]||(t[2]=[i.createElementVNode("path",{d:"M5 12h14"},null,-1),i.createElementVNode("path",{d:"M12 5v14"},null,-1)])])):i.createCommentVNode("",!0)]),_:1},8,["modelValue"])],4)}const x2=ee(V2,[["render",$2],["__scopeId","data-v-d38e5228"]]),I2={key:0,class:"tags-input-item tag-text"},R2={key:0,class:"tags-input-item tag-text"},B2={key:1,class:"tag-badge--empty"},N2={key:2,class:"tag-edit-wrap"},A2=["title","onKeydown"],P2={__name:"itemTagEditor",props:{params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},widthFlex:{type:String,default:""}},emits:["inputEdit"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(!1),o=i.ref(""),s=i.ref(""),l=i.ref(null);let u=!1;const c=i.computed(()=>n.item[n.params.typeField||"templateType"]==="custom"),d=i.computed(()=>{const _=n.item[n.params.name]||"",p=n.item[n.params.typeField||"templateType"];return _===p&&He[p]||_});function f(){const _=n.item[n.params.name]||"",p=n.item[n.params.typeField||"templateType"];o.value=_===p?"":_,s.value="",u=!1,r.value=!0,i.nextTick(()=>{var v;return(v=l.value)==null?void 0:v.focus()})}function m(){u=!0,r.value=!1,s.value=""}function h(_){const p=_.trim(),v=n.params.toggleField||"isEnabledForOnlineStore";return!p&&n.item[v]?He.customTagNameRequired||"Required":p.length>20?He.customTagNameTooLong||"Max 20 chars":p&&!/^[\p{L}\d\s-]+$/u.test(p)?He.customTagNameInvalidChars||"Invalid chars":""}function g(){if(!r.value)return;const _=o.value.trim(),p=h(_);if(p){s.value=p,i.nextTick(()=>{var C;return(C=l.value)==null?void 0:C.focus()});return}const v=n.item[n.params.name];n.item[n.params.name]=_;const k=n.params.tagNameField||"tagName";k in n.item&&(n.item[k]=_),r.value=!1,s.value="",a("inputEdit",v)}function y(){if(u){u=!1;return}g()}return(_,p)=>(i.openBlock(),i.createElementBlock("div",{class:"item-tag-editor",style:i.normalizeStyle(`flex: ${e.widthFlex};`),onClick:p[1]||(p[1]=i.withModifiers(()=>{},["stop"]))},[c.value?r.value?(i.openBlock(),i.createElementBlock("div",N2,[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=v=>o.value=v),class:i.normalizeClass(["form-control custom-input",{"is-invalid":s.value}]),maxlength:"20",title:s.value||void 0,onKeydown:[i.withKeys(i.withModifiers(g,["prevent"]),["enter"]),i.withKeys(i.withModifiers(m,["prevent"]),["escape"])],onBlur:y},null,42,A2),[[i.vModelText,o.value]]),i.createElementVNode("span",{class:i.normalizeClass(["tag-counter",{"tag-counter--limit":o.value.length>=18}])},i.toDisplayString(o.value.length)+"/20 ",3)])):(i.openBlock(),i.createElementBlock("div",{key:1,class:"tag-view",onClick:i.withModifiers(f,["stop"])},[d.value?(i.openBlock(),i.createElementBlock("span",R2,i.toDisplayString(d.value),1)):(i.openBlock(),i.createElementBlock("span",B2)),p[2]||(p[2]=i.createElementVNode("svg",{class:"tag-pen-icon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{d:"M9.917 1.75a1.458 1.458 0 0 1 2.333 1.75L4.083 11.667H1.75V9.333L9.917 1.75z",stroke:"#6B7280","stroke-width":"1.2","stroke-linejoin":"round"})],-1))])):(i.openBlock(),i.createElementBlock("span",I2,i.toDisplayString(i.unref(He)[e.item[e.params.tagNameField||"tagName"]]||e.item[e.params.tagNameField||"tagName"]||"—"),1))],4))}},M2=ee(P2,[["__scopeId","data-v-73c76d93"]]),L2={key:1,class:"button-toggle-expand"},F2={key:0,class:"fs1","aria-hidden":"true","data-icon":"",style:{color:"var(--info-button-primary-color)"}},j2={key:1,src:"/svg/arrow_black.svg",style:{width:"15px",transform:"rotate(180deg)"}},U2={key:2,class:"button-delete"},z2={__name:"Row",props:{index:{type:Number,default:null},params:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},selected:{type:Array,default:()=>[]},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1}},emits:["checkbox","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow","shrink","expand"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o={itemDefault:Qu,itemSelect:u2,itemInput:m2,itemTags:x2,itemTagEditor:M2};function s(E){return E.customItemComponent&&o[E.customItemComponent]?o[E.customItemComponent]:Qu}const l=i.computed({get(){let E=!1;if(v(n.item))return E;try{n.params.id&&n.selected.map(T=>T[n.params.id]).indexOf(n.item[n.params.id])!==-1&&(E=!0)}catch{}return E},set(E){v(n.item)||a("checkbox",n.index,E,n.item)}}),u=i.computed(()=>window.innerWidth);i.computed(()=>Number(n.item.parent)>0);function c(E,D){const w=E.name;let T=n.item[E.name];n.params.id&&a("inputEdit",{[n.params.id]:n.item[n.params.id],tPointItemId:n.item.tPointItemId,[w]:T},w,{error:()=>{T=D},updateField:(I,R)=>{n.item[I]=R}},n.item)}function d(E,D){const w=E.name;n.params.id&&a("selectUpdate",w,n.item)}function f(E,D){a("openTagsModal",n.item)}function m(E,D){a("deleteTag",n.item,D)}function h(E){E.target.closest("input, select, button, a, .item-cell, .tags-container, .custom-input")||v(n.item)||n.item.isNotCheckable||n.params.massActions&&(l.value=!l.value)}function g(){const E=v(n.item);if(n.item.products!==void 0)return p();a("open",n.item,E)}function y(E){var T,I,R,O;let D,w;E.clientX&&E.clientY&&(D=E.clientX,w=E.clientY),(I=(T=E==null?void 0:E.touches)==null?void 0:T[0])!=null&&I.clientX&&((O=(R=E==null?void 0:E.touches)==null?void 0:R[0])!=null&&O.clientY)&&(D=E.touches[0].clientX,w=E.touches[0].clientY),a("openContext",n.item,{x:D,y:w})}function _(E){if(n.tableViewExpanded||n.widthColumns[u.value]===void 0)return E.width?`0 0 ${E.width}px`:E.widthFr?`${E.widthFr}`:"1";const D=n.widthColumns[u.value][E.name];return D===void 0?E.width?`0 0 ${E.width}px`:E.widthIfResizedNotCalculated?`0 0 ${E.widthIfResizedNotCalculated}px`:"0 0 120px":D.endsWith("px")?`0 0 ${D}`:D.endsWith("fr")?parseInt(D).toString():"1"}function p(){n.params.id&&(n.item.isExpanded?a("shrink",{id:n.item[n.params.id],plusSum:n.item.plusSum}):a("expand",{id:n.item[n.params.id],plusSum:n.item.plusSum}))}function v(E){return E.parent>0}function k(E){r.value=setTimeout(()=>{y(E)},500)}function C(){clearTimeout(r.value)}return(E,D)=>{var T,I;const w=i.resolveComponent("b-button");return i.openBlock(),i.createElementBlock("div",{ref:"itemRow",class:i.normalizeClass([{gray:e.item.isGray,forceUpdated1:e.forceUpdating},"item-string",`nested-item-${e.item.nestedLevel}`]),style:i.normalizeStyle({cursor:"pointer",opacity:e.item.rowOpacity??1}),onClick:h,onContextmenu:i.withModifiers(y,["prevent","stop"]),onTouchstart:k,onTouchend:C},[e.params.massActions!=null?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["item item--checkbox",{hidden:+e.item.parent>0||e.item.isNotCheckable}])},[i.createVNode(i.unref(wi),{modelValue:l.value,"onUpdate:modelValue":D[0]||(D[0]=R=>l.value=R),class:"item-cell"},null,8,["modelValue"])],2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.header,(R,O)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:O},[e.tableViewExpanded&&e.selectedColumns[R.name]||e.selectedColumns[R.name]&&(R.minWidthScreen<=u.value||R.minWidthScreen===void 0)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(R)),{key:0,item:e.item,params:R,class:"item","width-flex":_(R),name:e.params.name,onOpen:g,onCreateNewComing:$=>a(R.emit,$),onInputEdit:$=>c(R,$),onSelectUpdate:$=>d(R),onOpenTagsModal:$=>f(),onDeleteTag:$=>m(R,$)},i.createSlots({_:2},[E.$slots["cell-"+R.name]?{name:"default",fn:i.withCtx($=>[i.renderSlot(E.$slots,"cell-"+R.name,i.mergeProps({row:e.item,value:e.item[R.name],item:e.item},{ref_for:!0},$),void 0,!0)]),key:"0"}:void 0]),1064,["item","params","width-flex","name","onCreateNewComing","onInputEdit","onSelectUpdate","onOpenTagsModal","onDeleteTag"])):i.createCommentVNode("",!0)],64))),128)),e.isShowToggleExpand?(i.openBlock(),i.createElementBlock("div",L2,[((T=e.item.products)==null?void 0:T.length)>=1?(i.openBlock(),i.createBlock(w,{key:0,variant:"light",class:"btn-row-open",onClick:D[1]||(D[1]=R=>p())},{default:i.withCtx(()=>[e.item.isExpanded!=!0?(i.openBlock(),i.createElementBlock("span",F2)):i.createCommentVNode("",!0),e.item.isExpanded==!0?(i.openBlock(),i.createElementBlock("img",j2)):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(I=e.params)!=null&&I.isShowDeleteRow?(i.openBlock(),i.createElementBlock("div",U2,[i.createElementVNode("button",{type:"button",class:"btn btn-danger",onClick:D[2]||(D[2]=R=>a("deleteRow",e.item))}," × ")])):i.createCommentVNode("",!0)],38)}}},H2=ee(z2,[["__scopeId","data-v-53ceb83e"]]),W2=["data-index"],Y2={__name:"DynamicScroller",props:{params:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},selected:{type:Array,default:()=>[]},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1}},emits:["checkbox","getData","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow"],setup(e,{emit:t}){const n=e,a=i.computed(()=>{var f;return((f=n.params)==null?void 0:f.id)||"id"}),r=i.computed(()=>n.items.map((f,m)=>(f._dsIndex=m,f.index=m,f))),o=i.ref(null),s=Af.useVirtualizer(i.computed(()=>({count:r.value.length,getScrollElement:()=>o.value,estimateSize:()=>30,overscan:6,getItemKey:f=>{const m=r.value[f];return(m==null?void 0:m[a.value])??f}}))),l=i.computed(()=>s.value.getVirtualItems()),u=i.computed(()=>s.value.getTotalSize());function c(f){f&&s.value.measureElement(f)}const d=t;return(f,m)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"scrollEl",ref:o,class:"scroller"},[i.createElementVNode("div",{class:"scroller__sizer",style:i.normalizeStyle({height:`${u.value}px`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,h=>(i.openBlock(),i.createElementBlock("div",{key:h.key,ref_for:!0,ref:c,"data-index":h.index,class:"scroller__row",style:i.normalizeStyle({transform:`translateY(${h.start}px)`})},[i.createVNode(H2,{index:h.index,item:r.value[h.index],params:e.params,selected:e.selected,"selected-columns":e.selectedColumns,"width-columns":e.widthColumns,"table-view-expanded":e.tableViewExpanded,"force-updating":e.forceUpdating,"is-show-toggle-expand":e.isShowToggleExpand,onCheckbox:m[0]||(m[0]=(g,y,_)=>d("checkbox",g,y,_)),onGetData:m[1]||(m[1]=g=>d("getData")),onOpen:m[2]||(m[2]=(...g)=>d("open",...g)),onOpenContext:m[3]||(m[3]=(...g)=>d("openContext",...g)),onInputEdit:m[4]||(m[4]=(...g)=>d("inputEdit",...g)),onSelectUpdate:m[5]||(m[5]=(...g)=>d("selectUpdate",...g)),onOpenTagsModal:m[6]||(m[6]=(...g)=>d("openTagsModal",...g)),onDeleteTag:m[7]||(m[7]=(...g)=>d("deleteTag",...g)),onDeleteRow:m[8]||(m[8]=(...g)=>d("deleteRow",...g))},i.createSlots({_:2},[i.renderList(f.$slots,(g,y)=>({name:y,fn:i.withCtx(_=>[i.renderSlot(f.$slots,y,i.mergeProps({ref_for:!0},_??{}),void 0,!0)])}))]),1032,["index","item","params","selected","selected-columns","width-columns","table-view-expanded","force-updating","is-show-toggle-expand"])],12,W2))),128))],4)],512))}},K2=ee(Y2,[["__scopeId","data-v-198fe5fa"]]),G2={class:"header-table-outer"},q2={key:0,class:"ht ht-checkbox",style:{flex:"0 0 40px"}},X2=["data-name","title"],Z2=["data-name","title","onClick"],J2=["title"],Q2={key:0,class:"fs1","aria-hidden":"true","data-icon":"",style:{color:"var(--info-button-primary-color)"}},e_={key:1,src:"/svg/arrow_black.svg",style:{width:"15px",transform:"rotate(180deg)"}},t_={__name:"Header",props:{params:{type:Object,default:()=>({})},allSelect:{type:Boolean,default:!1},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1},scroll:{type:Boolean,default:!1}},emits:["checkbox","sort","changeWidthColumn","changeTableSettingToDefault","switchView","changeHeaderWidth"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref({ot:"asc",of:"id"}),s=i.ref(null),l=i.ref(null),u=i.ref(null),c=i.ref(!0),d=i.ref(null),f=i.computed(()=>{const w={},T=o.value.ot==="asc"?"icon-arrow-down-2":"icon-arrow-up-2";return w[o.value.of]=T,w}),m=i.computed({get:()=>n.allSelect,set:()=>{}}),h=i.computed(()=>window.innerWidth);function g(w){a("checkbox",w)}function y(){a("switchView")}function _(w){l.value||(o.value.of===w&&(o.value.ot=o.value.ot==="asc"?"desc":"asc"),o.value.of=w,a("sort",{ot:o.value.ot,of:o.value.of}))}function p(w){if(n.tableViewExpanded||n.widthColumns[h.value]===void 0)return w.width?`0 0 ${w.width}px`:w.widthFr?w.widthFr:w.name!=="logo"?"1":"";const T=n.widthColumns[h.value][w.name];return T===void 0?w.width?`0 0 ${w.width}px`:w.widthIfResizedNotCalculated?`0 0 ${w.widthIfResizedNotCalculated}px`:"0 0 120px":T.endsWith("px")?`0 0 ${T}`:T.endsWith("fr")?parseInt(T).toString():"1"}function v(w){w.which===1&&(l.value=w.target.parentElement,s.value=l.value.offsetWidth-w.x,u.value=l.value.dataset.name)}function k(w){if(l.value){if(d.value=w.x,!c.value)return;c.value=!1;const T=100;let I=s.value+w.x;n.widthColumns[h.value]===void 0?a("changeWidthColumn",u.value,I,D()):a("changeWidthColumn",u.value,I),setTimeout(()=>{d.value!=null&&d.value!==w.x&&(I=s.value+d.value,n.widthColumns[h.value]===void 0?a("changeWidthColumn",u.value,I,D()):a("changeWidthColumn",u.value,I)),c.value=!0},T)}}function C(w){w.which===1&&l.value&&setTimeout(()=>{var T;a("changeHeaderWidth",((T=r.value)==null?void 0:T.scrollWidth)||0),l.value=null,u.value=null},0)}function E(){l.value&&setTimeout(()=>{var w;l.value=null,u.value=null,a("changeHeaderWidth",((w=r.value)==null?void 0:w.scrollWidth)||0)},0)}function D(){var I;const w=[],T=((I=r.value)==null?void 0:I.querySelectorAll(".resizer"))||[];for(const R of T){const O=R.parentElement;w.push({columnName:O.dataset.name,width:O.offsetWidth})}return w}return i.onMounted(()=>{var w,T;try{o.value.ot=((w=n.params.sort)==null?void 0:w.ot)||"asc",o.value.of=((T=n.params.sort)==null?void 0:T.of)||"id"}catch{}r.value&&l.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),i.onUpdated(()=>{r.value&&l.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),(w,T)=>{var O;const I=i.resolveComponent("b-button"),R=i.resolveDirective("b-tooltip");return i.openBlock(),i.createElementBlock("div",G2,[i.createElementVNode("div",{ref_key:"headerTable",ref:r,class:i.normalizeClass(["header-table",{forceUpdated1:e.forceUpdating}]),onMousemove:k,onMouseleave:E,onMouseup:C},[e.params.massActions!=null?(i.openBlock(),i.createElementBlock("div",q2,[i.createVNode(i.unref(wi),{modelValue:m.value,"onUpdate:modelValue":[T[0]||(T[0]=$=>m.value=$),g]},null,8,["modelValue"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"header-table__content",style:i.normalizeStyle({flex:e.params.massActions!=null?"0 0 calc(100% - 40px)":"0 0 100%"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.header,($,N)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:N},[e.tableViewExpanded&&e.selectedColumns[$.name]||e.selectedColumns[$.name]&&($.minWidthScreen<=h.value||$.minWidthScreen===void 0)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[$.sort==!1?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["ht",$.name=="logo"&&"logo"]),style:i.normalizeStyle([{flex:p($)},{position:"relative","white-space":"nowrap"}]),"data-name":$.name,title:$.title},[i.createTextVNode(i.toDisplayString($.title)+" ",1),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:v}," ",32)):i.createCommentVNode("",!0)],14,X2)):(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle([{flex:p($)},{position:"relative","white-space":"nowrap"}]),class:i.normalizeClass([$.sort?f.value[$.sort]:f.value[$.name],"ht sort"]),"data-name":$.name,title:$.title,onClick:P=>_($.sort?$.sort:$.name)},[i.createTextVNode(i.toDisplayString($.title)+" ",1),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:v}," ",32)):i.createCommentVNode("",!0),$.tooltip?i.withDirectives((i.openBlock(),i.createElementBlock("i",{key:1,style:{"margin-left":"5px","font-size":"16px",color:"#ed2626"},class:"icomoon icon-question",title:$.tooltip},null,8,J2)),[[R,{variant:"secondary"},void 0,{hover:!0}]]):i.createCommentVNode("",!0)],14,Z2))],64)):i.createCommentVNode("",!0)],64))),128)),e.isShowToggleExpand?(i.openBlock(),i.createElementBlock("div",{key:0,class:"button-toggle-expand button-toggle-expand-all",style:i.normalizeStyle({paddingRight:e.scroll?"5px":0})},[i.createVNode(I,{variant:"light",class:"btn-row-open",onClick:T[1]||(T[1]=$=>y())},{default:i.withCtx(()=>[e.params.isAllExpanded!=!0?(i.openBlock(),i.createElementBlock("span",Q2)):i.createCommentVNode("",!0),e.params.isAllExpanded==!0?(i.openBlock(),i.createElementBlock("img",e_)):i.createCommentVNode("",!0)]),_:1})],4)):i.createCommentVNode("",!0),(O=e.params)!=null&&O.isShowDeleteRow?(i.openBlock(),i.createElementBlock("div",{key:1,class:"button-toggle-delete",style:i.normalizeStyle({paddingRight:e.scroll?"5px":0})},null,4)):i.createCommentVNode("",!0)],4)],34)])}}},n_={class:"footer-table-outer"},a_=["data-name","title"],r_={__name:"Footer",props:{params:{type:Object,default:()=>({})},allSelect:{type:Boolean,default:!1},selectedColumns:{type:Object,default:()=>({})},widthColumns:{type:Object,default:()=>({})},tableViewExpanded:{type:Boolean,default:!1},forceUpdating:{type:Boolean,default:!1},isShowToggleExpand:{type:Boolean,default:!1},scroll:{type:Boolean,default:!1}},emits:["checkbox","sort","changeWidthColumn","changeTableSettingToDefault","switchView","changeHeaderWidth"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref(null),s=i.ref(null),l=i.ref(null),u=i.ref(!0),c=i.ref(null),d=i.computed(()=>window.innerWidth);function f(p){if(n.tableViewExpanded||n.widthColumns[d.value]===void 0)return p.width?`0 0 ${p.width}px`:p.widthFr?p.widthFr:p.name!=="logo"?"1":"";const v=n.widthColumns[d.value][p.name];return v===void 0?p.width?`0 0 ${p.width}px`:p.widthIfResizedNotCalculated?`0 0 ${p.widthIfResizedNotCalculated}px`:"0 0 120px":v.endsWith("px")?`0 0 ${v}`:v.endsWith("fr")?parseInt(v).toString():"1"}function m(p){p.which===1&&(s.value=p.target.parentElement,o.value=s.value.offsetWidth-p.x,l.value=s.value.dataset.name)}function h(p){if(s.value){if(c.value=p.x,!u.value)return;u.value=!1;const v=100;let k=o.value+p.x;n.widthColumns[d.value]===void 0?a("changeWidthColumn",l.value,k,_()):a("changeWidthColumn",l.value,k),setTimeout(()=>{c.value!=null&&c.value!==p.x&&(k=o.value+c.value,n.widthColumns[d.value]===void 0?a("changeWidthColumn",l.value,k,_()):a("changeWidthColumn",l.value,k)),u.value=!0},v)}}function g(p){p.which===1&&s.value&&setTimeout(()=>{var v;a("changeHeaderWidth",((v=r.value)==null?void 0:v.scrollWidth)||0),s.value=null,l.value=null},0)}function y(){s.value&&setTimeout(()=>{var p;s.value=null,l.value=null,a("changeHeaderWidth",((p=r.value)==null?void 0:p.scrollWidth)||0)},0)}function _(){var k;const p=[],v=((k=r.value)==null?void 0:k.querySelectorAll(".resizer"))||[];for(const C of v){const E=C.parentElement;p.push({columnName:E.dataset.name,width:E.offsetWidth})}return p}return i.onMounted(()=>{r.value&&s.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),i.onUpdated(()=>{r.value&&s.value===null&&a("changeHeaderWidth",r.value.scrollWidth)}),(p,v)=>(i.openBlock(),i.createElementBlock("div",n_,[i.createElementVNode("div",{ref_key:"footerTable",ref:r,class:i.normalizeClass(["footer-table",{forceUpdated1:e.forceUpdating}]),onMousemove:h,onMouseleave:y,onMouseup:g},[i.createElementVNode("div",{class:"footer-table__content",style:i.normalizeStyle({flex:e.params.massActions!=null?"0 0 calc(100%)":"0 0 100%"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.footer,(k,C)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:C},[(k.minWidthScreen<=d.value||k.minWidthScreen===void 0)&&(k.maxWidthScreen>=d.value||k.maxWidthScreen===void 0)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["ht",k.name=="logo"&&"logo"]),style:i.normalizeStyle([{flex:f(k)},{position:"relative","white-space":"nowrap"}]),"data-name":k.name,title:k.title},[i.createElementVNode("span",{class:"ht-content",style:i.normalizeStyle(k.style?k.style(k):"")},i.toDisplayString(k.title)+": "+i.toDisplayString(k==null?void 0:k.value),5),!e.tableViewExpanded&&e.params.canResize?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resizer",onMousedown:m}," ",32)):i.createCommentVNode("",!0)],14,a_)):i.createCommentVNode("",!0)],64))),128))],4)],34)]))}},o_={class:"table-container dynamic-scroller-table"},i_={class:"dynamic-scroller-table__right"},s_={class:"dynamic-scroller-table__content listContainer"},l_={key:0,class:"dynamic-scroller-table__mass-action"},u_={class:"dynamic-scroller-table__mass-count"},c_={value:"empty"},d_=["value"],f_={key:1,class:"dynamic-scroller-table__table"},m_={key:1,class:"dynamic-scroller-table__body"},h_={key:3,class:"dynamic-scroller-table__footer-found"},p_={class:"dynamic-scroller-table__footer-content"},v_={key:2},g_={class:"no-data-text",style:{color:"gray"}},y_={__name:"Table",props:{params:{type:Object,default:()=>({})},json:{type:Object,default:()=>({})},mainJsonData:{type:Array,default:()=>[]},justDeleted:{type:String,default:""}},emits:["getData","updateSelected","updateMassactionData","open","openContext","inputEdit","selectUpdate","openTagsModal","deleteTag","deleteRow"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(0),o=i.ref(0),s=i.ref(!1),l=i.ref(!1),u=i.ref(!1),c=i.ref({}),d=i.ref({}),f=i.ref("empty"),m=i.ref({of:"",ot:""}),h=i.ref(0),g=i.computed({get:()=>n.params.selected||[],set:x=>{n.params.selected=x}}),y=i.computed({get:()=>n.params.allSelect||!1,set:x=>{n.params.allSelect=x}}),_=i.computed(()=>{var x;try{return((x=n.json)==null?void 0:x.total)||0}catch{return 0}}),p=i.computed(()=>window.lang||{}),v=i.computed(()=>r.value>o.value),k=i.computed(()=>n.mainJsonData),C=i.computed(()=>{var x,A;return((A=(x=n.json)==null?void 0:x.items)==null?void 0:A.some(j=>{var V;return((V=j.products)==null?void 0:V.length)>=1}))||!1});i.watch(c,x=>{var A;(A=n.params.header)==null||A.forEach(j=>{j.enable=c.value[j.name]})},{deep:!0}),i.watch(()=>n.justDeleted,x=>{x!==""&&(g.value=g.value.filter(A=>A[n.params.id]!=x))});function E(){const x=k.value.filter(j=>!(Number(j.parent)>0));g.value.length>=x.length&&x.length>0?(n.params.selected=[],n.params.allSelect=!1):(n.params.selected=[],k.value.forEach(j=>{Number(j.parent)>0||n.params.selected.push(j)}),n.params.allSelect=!0),a("updateSelected",JSON.parse(JSON.stringify(n.params.selected)))}function D(x,A,j){const G=g.value.map(X=>X[n.params.id]).indexOf(j[n.params.id]);if(A===!0&&G===-1||A===!1&&G!==-1){s.value?w(x,A):A===!1&&G!==-1?g.value.splice(G,1):A===!0&&G===-1&&g.value.push(j),h.value=x;const X=k.value.filter(se=>!(Number(se.parent)>0)).length;y.value=g.value.length>=X}a("updateSelected",JSON.parse(JSON.stringify(g.value)))}function w(x,A){const j=x>h.value?1:x<h.value?-1:null;if(j!=null){let V=h.value;const G=n.json.items,X=n.params.sort.of;for(;;){if(A===!1){const se=g.value.indexOf(G[V][X]);se!==-1&&g.value.splice(se,1)}else g.value.indexOf(G[V][X])===-1&&g.value.push(G[V]);if(V===x)break;V+=j}}g.value=g.value.filter((V,G,X)=>G===X.findIndex(se=>se[n.params.id]===V[n.params.id]))}function T(){return{ot:m.value.ot,of:m.value.of}}function I(x){const A={action:x.target.value,items:g.value.filter((j,V,G)=>V===G.findIndex(X=>X[n.params.id]===j[n.params.id]))};a("updateMassactionData",A),f.value="empty"}function R(x,A,j=[]){const V=window.innerWidth;if(!d.value[V]){d.value[V]={};for(const G of j)d.value[V][G.columnName]=G.width+"px"}d.value[V][x]=A+"px",u.value=!u.value}function O(){const x={};for(const A in n.params.header){const j=n.params.header[A],V=j.name;x[V]=j.enableDefault}c.value=x,d.value={}}function $(x=!l.value){l.value=x}function N(x){}function P(x){m.value.ot=x.ot,m.value.of=x.of,a("getData",T())}return i.onMounted(()=>{n.params.sort&&(m.value.of=n.params.sort.of,m.value.ot=n.params.sort.ot);for(const x in n.params.header){const A=n.params.header[x],j=A.name;c.value[j]==null&&(c.value[j]=A.enable)}}),typeof window<"u"&&(window.addEventListener("keydown",x=>{x.key==="Shift"&&(s.value=!0)}),window.addEventListener("keyup",x=>{x.key==="Shift"&&(s.value=!1)})),(x,A)=>{const j=i.resolveComponent("center");return i.openBlock(),i.createElementBlock("div",o_,[i.createElementVNode("div",i_,[i.createElementVNode("div",s_,[g.value.length>0&&e.params.massActions!=null&&!e.params.massActions.hasOwnProperty("none")?(i.openBlock(),i.createElementBlock("div",l_,[i.createElementVNode("div",u_,i.toDisplayString(g.value.length),1),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":A[0]||(A[0]=V=>f.value=V),name:"dynamic-scroller-table__mass-select",class:"dynamic-scroller-table__mass-select custom-select",style:{width:"calc(100% - 60px)"},onChange:A[1]||(A[1]=V=>I(V))},[i.createElementVNode("option",c_,i.toDisplayString(p.value.dejstvie||"Дія"),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.params.massActions,(V,G)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:G},[V?(i.openBlock(),i.createElementBlock("option",{key:0,value:V.value},i.toDisplayString(V.title),9,d_)):i.createCommentVNode("",!0)],64))),128))],544),[[i.vModelSelect,f.value]])])):i.createCommentVNode("",!0),_.value?(i.openBlock(),i.createElementBlock("div",f_,[i.createElementVNode("div",{class:"dynamic-scroller-table__table-wrapper",style:i.normalizeStyle({"min-width":e.params.minTableWidth?e.params.minTableWidth+"px":"max-content"})},[_.value!=0?(i.openBlock(),i.createBlock(t_,{key:0,class:"dynamic-scroller-table__header",params:e.params,"all-select":y.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,scroll:v.value,"is-show-toggle-expand":C.value,onCheckbox:E,onSort:P,onChangeWidthColumn:R,onChangeTableSettingToDefault:O,onSwitchView:$,onChangeHeaderWidth:N},null,8,["params","all-select","selected-columns","width-columns","table-view-expanded","force-updating","scroll","is-show-toggle-expand"])):i.createCommentVNode("",!0),_.value!=0?(i.openBlock(),i.createElementBlock("div",m_,[e.json.items!=null?(i.openBlock(),i.createBlock(K2,{key:0,items:k.value,params:e.params,selected:g.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,"is-show-toggle-expand":C.value,onCheckbox:D,onGetData:A[2]||(A[2]=V=>a("getData",T())),onSelectUpdate:A[3]||(A[3]=(...V)=>a("selectUpdate",...V)),onOpen:A[4]||(A[4]=(...V)=>a("open",...V)),onOpenContext:A[5]||(A[5]=(...V)=>a("openContext",...V)),onInputEdit:A[6]||(A[6]=(...V)=>a("inputEdit",...V)),onOpenTagsModal:A[7]||(A[7]=(...V)=>a("openTagsModal",...V)),onDeleteTag:A[8]||(A[8]=(...V)=>a("deleteTag",...V)),onDeleteRow:A[9]||(A[9]=(...V)=>a("deleteRow",...V))},i.createSlots({_:2},[i.renderList(x.$slots,(V,G)=>({name:G,fn:i.withCtx(X=>[i.renderSlot(x.$slots,G,i.normalizeProps(i.guardReactiveProps(X??{})),void 0,!0)])}))]),1032,["items","params","selected","selected-columns","width-columns","table-view-expanded","force-updating","is-show-toggle-expand"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),_.value!=0&&e.params.footer?(i.openBlock(),i.createBlock(r_,{key:2,class:"dynamic-scroller-table__footer",params:e.params,"all-select":y.value,"selected-columns":c.value,"width-columns":d.value,"table-view-expanded":l.value,"force-updating":u.value,scroll:v.value,"is-show-toggle-expand":C.value,onCheckbox:E,onSort:P,onChangeWidthColumn:R,onChangeTableSettingToDefault:O,onSwitchView:$,onChangeHeaderWidth:N},null,8,["params","all-select","selected-columns","width-columns","table-view-expanded","force-updating","scroll","is-show-toggle-expand"])):(i.openBlock(),i.createElementBlock("div",h_,[i.createElementVNode("span",p_,i.toDisplayString(`${p.value.najdeno||"Знайдено"} ${_.value?_.value:"-"}`),1)]))],4)])):i.createCommentVNode("",!0),e.json&&_.value==0?(i.openBlock(),i.createElementBlock("div",v_,[i.createVNode(j,{class:"no-data"},{default:i.withCtx(()=>[A[10]||(A[10]=i.createElementVNode("img",{class:"no-data-img",src:"/image/dragons/Dragon_5_400.png",width:"200"},null,-1)),i.createElementVNode("h5",g_,i.toDisplayString(p.value.NoDataSadDino||"Даних немає"),1)]),_:1})])):i.createCommentVNode("",!0)])])])}}},__=ee(y_,[["__scopeId","data-v-b8ebd336"]]),k_=["aria-selected","disabled","onClick"],b_=i.defineComponent({__name:"SkyTabs",props:{modelValue:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=i.ref({opacity:"0"});let s=!1;function l(){const c=r.value,d=c==null?void 0:c.querySelector(".sky-tabs__btn--active");if(!c||!d)return;const f=c.getBoundingClientRect(),m=d.getBoundingClientRect();o.value={opacity:"1",width:`${m.width}px`,transform:`translateX(${Math.round(m.left-f.left)}px)`,...s?{}:{transition:"none"}}}function u(c){n.disabled||a("update:modelValue",c)}return i.watch(()=>[n.modelValue,n.options.length],()=>void i.nextTick(l)),i.onMounted(()=>{i.nextTick(()=>{l(),requestAnimationFrame(()=>{s=!0})}),window.addEventListener("resize",l)}),i.onBeforeUnmount(()=>window.removeEventListener("resize",l)),(c,d)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"tabsEl",ref:r,class:i.normalizeClass(["sky-tabs",{"sky-tabs--disabled":e.disabled}]),role:"tablist"},[i.createElementVNode("span",{class:"sky-tabs__indicator",style:i.normalizeStyle(o.value),"aria-hidden":"true"},null,4),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,f=>(i.openBlock(),i.createElementBlock("button",{key:f.value,type:"button",role:"tab",class:i.normalizeClass(["sky-tabs__btn",{"sky-tabs__btn--active":e.modelValue===f.value}]),"aria-selected":e.modelValue===f.value,disabled:e.disabled,onClick:m=>u(f.value)},i.toDisplayString(f.text),11,k_))),128))],2))}}),C_=ee(b_,[["__scopeId","data-v-989e5d03"]]),w_="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='1024'%20height='1024'%3e%3cmask%20id='doorCutout'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='1024'%20height='1024'%3e%3crect%20width='1024'%20height='1024'%20fill='white'/%3e%3cpath%20d='M0%200%20C0.71968964%20-0.00700928%201.43937927%20-0.01401855%202.18087769%20-0.02124023%20C4.53968888%20-0.03872211%206.89728194%20-0.02723241%209.25610352%20-0.01367188%20C10.90845467%20-0.01636993%2012.56080427%20-0.02025496%2014.21315002%20-0.02526855%20C17.6687844%20-0.03115055%2021.12400388%20-0.02264408%2024.57958984%20-0.00390625%20C28.99232552%200.01886496%2033.40408691%200.00576414%2037.81678677%20-0.01819611%20C41.22706843%20-0.03270484%2044.63712214%20-0.02802469%2048.04741096%20-0.01768494%20C49.67358581%20-0.0150307%2051.29978186%20-0.01824119%2052.92593193%20-0.02760315%20C69.87342689%20-0.10376397%2069.87342689%20-0.10376397%2075.44750977%204.51757812%20C81.77544038%2011.15115655%2081.12718673%2019.01439831%2081.01513672%2027.65429688%20C81.01372463%2029.18255059%2081.01452136%2030.7108077%2081.01734924%2032.23905945%20C81.01877857%2036.36891989%2080.98946805%2040.49804807%2080.95447946%2044.62773895%20C80.92313473%2048.95051825%2080.92027884%2053.273316%2080.91435242%2057.59619141%20C80.89883773%2065.773633%2080.85784165%2073.95073871%2080.80760497%2082.12803268%20C80.74116384%2093.18398679%2080.71425777%20104.24003333%2080.68509388%20115.29613686%20C80.63813785%20132.70353533%2080.5385101%20150.11022514%2080.44750977%20167.51757812%20C47.44750977%20167.51757812%2014.44750977%20167.51757812%20-19.55249023%20167.51757812%20C-19.75400541%20128.96996495%20-19.75400541%20128.96996495%20-19.79663086%20112.81054688%20C-19.82629345%20101.65499371%20-19.86115507%2090.49962943%20-19.9296875%2079.34423828%20C-19.9795767%2071.2196221%20-20.01179411%2063.09515924%20-20.02293271%2054.97039413%20C-20.02944217%2050.66966519%20-20.044704%2046.36937479%20-20.08114052%2042.06878662%20C-20.11518745%2038.01724955%20-20.12552586%2033.96632987%20-20.11802864%2029.91466331%20C-20.11939933%2028.43121162%20-20.12928048%2026.94773837%20-20.14851761%2025.46441078%20C-20.31994571%2011.55888315%20-20.31994571%2011.55888315%20-16.08115768%206.03028107%20C-11.33789555%201.33655478%20-6.67499482%200.01643261%200%200%20Z%20'%20fill='black'%20transform='translate(481.552490234375,561.482421875)'/%3e%3c/mask%3e%3cg%20mask='url(%23doorCutout)'%3e%3cpath%20d='M0%200%20C4.77025411%203.24811326%209.54995152%206.4822498%2014.33056641%209.71508789%20C15.31726318%2010.38239929%2016.30395996%2011.04971069%2017.32055664%2011.73724365%20C27.56943173%2018.65721894%2037.89827701%2025.45356978%2048.23681641%2032.23852539%20C63.70757381%2042.39575713%2079.08876899%2052.67577653%2094.4140625%2063.05102539%20C107.95573396%2072.21541636%20121.56891245%2081.26359889%20135.23681641%2090.23852539%20C150.70586805%20100.39616199%20166.08681738%20110.67430759%20181.41104126%20121.04901123%20C194.10175317%20129.63768216%20206.84992823%20138.13219047%20219.65756226%20146.54550171%20C226.93757749%20151.32917217%20234.20919481%20156.12561112%20241.48095703%20160.92181396%20C243.34111617%20162.14806389%20245.20180618%20163.37350884%20247.06298828%20164.59820557%20C252.65071885%20168.27520707%20258.22895331%20171.96583466%20263.7940979%20175.67694092%20C265.52028129%20176.82484576%20267.24966244%20177.96795933%20268.98251343%20179.10577393%20C283.07952443%20188.36868628%20295.16273494%20197.52844414%20300.04541016%20214.55883789%20C302.97062567%20228.72091575%20301.32633387%20242.71379426%20293.88916016%20255.24243164%20C286.10852553%20266.99615628%20274.11859478%20274.86442543%20260.23681641%20277.73852539%20C258.28165343%20277.82493738%20256.32376637%20277.85623255%20254.36669922%20277.85205078%20C253.18577698%20277.85197525%20252.00485474%20277.85189972%20250.78814697%20277.8518219%20C249.51823914%20277.84666061%20248.2483313%20277.84149933%20246.93994141%20277.83618164%20C245.63603455%20277.83476669%20244.33212769%20277.83335175%20242.9887085%20277.83189392%20C239.52978585%20277.82808406%20236.0709055%20277.8182669%20232.61199951%20277.80718994%20C229.07939221%20277.79694285%20225.54677805%20277.79238924%20222.01416016%20277.78735352%20C215.08836158%20277.77664321%20208.16259103%20277.75958523%20201.23681641%20277.73852539%20C201.23795557%20278.34510426%20201.23909473%20278.95168312%20201.24026841%20279.57664317%20C201.30746129%20315.55953322%20201.35890569%20351.54241244%20201.39001239%20387.52535222%20C201.39376433%20391.84974664%20201.39764732%20396.17414093%20201.40161133%20400.49853516%20C201.40239826%20401.35941279%20201.40318519%20402.22029042%20201.40399597%20403.10725526%20C201.41703558%20417.03062396%20201.44068144%20430.95395535%20201.46827479%20444.87730195%20C201.49636923%20459.17314928%20201.51300119%20473.46897712%20201.51908189%20487.76485091%20C201.52318997%20496.58001117%20201.53614612%20505.39506595%20201.56056581%20514.21019373%20C201.57647289%20520.26216649%20201.58120555%20526.31408503%20201.57732054%20532.36607715%20C201.57540669%20535.85324376%20201.57825679%20539.34022656%20201.59443283%20542.82736015%20C201.60943924%20546.61960446%20201.60573992%20550.41140365%20201.59757996%20554.20365906%20C201.60631848%20555.29027618%20201.615057%20556.3768933%20201.62406033%20557.49643821%20C201.53155137%20573.48857632%20197.13157326%20586.59455363%20186.02587891%20598.19165039%20C172.60172101%20610.45012511%20156.23132748%20612.35118168%20138.91059875%20612.23973083%20C137.21090757%20612.2436326%20135.51121967%20612.24928001%20133.81153935%20612.25650173%20C129.18243172%20612.27114826%20124.55366801%20612.26114008%20119.92457187%20612.24676502%20C114.91636288%20612.23559741%20109.90819987%20612.24761677%20104.8999939%20612.25660706%20C95.10615172%20612.27050136%2085.31243896%20612.26301198%2075.518603%20612.24793147%20C64.10406126%20612.23102762%2052.68955135%20612.23428707%2041.27500095%20612.23802555%20C20.90539448%20612.24389695%200.53584992%20612.22975977%20-19.83374023%20612.20507812%20C-39.58376383%20612.18115002%20-59.33370474%20612.17407849%20-79.08374023%20612.18457031%20C-100.61305041%20612.19598691%20-122.14232239%20612.19790113%20-143.67163211%20612.18347222%20C-145.96839797%20612.18194644%20-148.26516384%20612.18042608%20-150.5619297%20612.17891121%20C-151.69186566%20612.17815339%20-152.82180162%20612.17739558%20-153.98597806%20612.1766148%20C-161.93645035%20612.17187846%20-169.88690553%20612.17371873%20-177.83737755%20612.17797661%20C-187.52816674%20612.18290983%20-197.21887787%20612.17688934%20-206.90964922%20612.15708231%20C-211.85090274%20612.1472306%20-216.79203754%20612.14208234%20-221.73329735%20612.14997482%20C-226.26140177%20612.15705931%20-230.7892672%20612.15016259%20-235.31734023%20612.13237119%20C-236.95033363%20612.12834467%20-238.58334901%20612.1292962%20-240.21633407%20612.13589006%20C-258.08996439%20612.20185402%20-272.27416072%20608.69688708%20-285.54052734%20596.08227539%20C-296.5468394%20584.47632243%20-298.92412223%20570.50718428%20-298.88343811%20555.04544067%20C-298.88429254%20553.86016749%20-298.88514696%20552.67489431%20-298.88602728%20551.45370376%20C-298.88738794%20548.17219027%20-298.88426895%20544.89071643%20-298.87924922%20541.60920763%20C-298.87492603%20538.06735773%20-298.87639247%20534.52550964%20-298.87715149%20530.98365784%20C-298.87767554%20524.8499419%20-298.87454115%20518.71623661%20-298.86891365%20512.58252335%20C-298.86078256%20503.71423175%20-298.85818178%20494.8459453%20-298.85692566%20485.97765039%20C-298.85473767%20471.58901987%20-298.84808444%20457.20039502%20-298.83862305%20442.81176758%20C-298.82944238%20428.83553089%20-298.82236475%20414.85929574%20-298.81811523%20400.88305664%20C-298.81785251%20400.02139126%20-298.81758979%20399.15972588%20-298.8173191%20398.27194943%20C-298.81601405%20393.94917665%20-298.81475035%20389.62640386%20-298.8135072%20385.30363107%20C-298.80314247%20349.44859184%20-298.78553103%20313.59355906%20-298.76318359%20277.73852539%20C-299.40416992%20277.74740784%20-300.04515625%20277.75629028%20-300.70556641%20277.76544189%20C-307.45547447%20277.85482983%20-314.20521096%20277.91463373%20-320.95556641%20277.95825195%20C-323.46540165%20277.97820704%20-325.97519139%20278.00538092%20-328.48486328%20278.0402832%20C-348.80799272%20278.31557659%20-368.66938574%20278.38482639%20-384.45068359%20263.80102539%20C-393.99076069%20254.13445739%20-398.57107239%20241.89526285%20-399.07568359%20228.42602539%20C-398.73538597%20213.3678555%20-393.28635008%20200.77279137%20-382.53585815%20190.30438232%20C-376.7991329%20185.23695979%20-370.10257225%20181.27951023%20-363.66650391%20177.17529297%20C-359.73984285%20174.6710173%20-355.83613209%20172.13189378%20-351.93063354%20169.5947876%20C-349.89653031%20168.27369407%20-347.86130242%20166.95433065%20-345.82498169%20165.63665771%20C-336.43706498%20159.55523653%20-327.16208116%20153.31427141%20-317.90719604%20147.03289795%20C-301.69307684%20136.02910311%20-285.38256576%20125.18159042%20-269.00292969%20114.42602539%20C-255.35566021%20105.46147677%20-241.78420572%2096.39227956%20-228.26318359%2087.23852539%20C-212.91876201%2076.85032679%20-197.4921545%2066.59690855%20-182.00292969%2056.42602539%20C-168.35562859%2047.46145599%20-154.78552199%2038.3903693%20-141.26318359%2029.23852539%20C-127.12242047%2019.67603921%20-112.95779321%2010.15062943%20-98.72607422%200.72387695%20C-96.81938655%20-0.54018636%20-94.91422764%20-1.80655921%20-93.01074219%20-3.07543945%20C-56.60316438%20-27.33199629%20-35.65391528%20-24.285668%200%200%20Z%20'%20fill='%23FEFEFE'%20transform='translate(560.76318359375,217.261474609375)'/%3e%3c/g%3e%3c/svg%3e",E_={class:"sky-tile-card"},S_={class:"sky-tile-card-head"},T_=["src","alt"],D_={class:"sky-tile-card-titles"},O_={class:"sky-tile-card-title"},V_={key:0,class:"sky-tile-card-subtitle"},$_={key:0,class:"sky-tile-card-body"},x_={__name:"SkyTileCard",props:{title:{type:String,required:!0},subtitle:{type:String,default:""},imageUrl:{type:String,default:""}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",E_,[i.createElementVNode("div",S_,[i.createElementVNode("div",{class:i.normalizeClass(["sky-tile-card-icon",{"is-default":!e.imageUrl&&!t.$slots.icon}])},[i.renderSlot(t.$slots,"icon",{},()=>[i.createElementVNode("img",{src:e.imageUrl||i.unref(w_),alt:e.title},null,8,T_)],!0)],2),i.createElementVNode("div",D_,[i.createElementVNode("h3",O_,i.toDisplayString(e.title),1),e.subtitle?(i.openBlock(),i.createElementBlock("p",V_,i.toDisplayString(e.subtitle),1)):i.createCommentVNode("",!0)])]),t.$slots.default?(i.openBlock(),i.createElementBlock("div",$_,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)]))}},I_=ee(x_,[["__scopeId","data-v-ea9d56a4"]]),Si=Symbol("sky-table"),R_={class:"sky-table",role:"table"},B_=i.defineComponent({__name:"SkyTableRoot",props:{columns:{},minWidth:{default:"max-content"}},setup(e,{expose:t}){const n=e,a=i.ref(typeof window>"u"?1/0:window.innerWidth),r=()=>a.value=window.innerWidth;i.onMounted(()=>window.addEventListener("resize",r)),i.onBeforeUnmount(()=>window.removeEventListener("resize",r));const o=i.computed(()=>n.columns.filter(l=>!l.minWidthScreen||a.value>=l.minWidthScreen)),s=i.computed(()=>o.value.map(l=>l.width?`${l.width}px`:`${l.widthFr??1}fr`).join(" "));return i.provide(Si,{columns:o,gridTemplate:s}),t({visibleColumns:o}),(l,u)=>(i.openBlock(),i.createElementBlock("div",R_,[i.createElementVNode("div",{class:"sky-table__viewport",style:i.normalizeStyle({minWidth:e.minWidth})},[i.renderSlot(l.$slots,"default",{columns:o.value},void 0,!0)],4)]))}}),Ff=ee(B_,[["__scopeId","data-v-e343b115"]]),N_=i.defineComponent({__name:"SkyTableHeader",props:{sticky:{type:Boolean,default:!0}},setup(e){const t=i.inject(Si);return(n,a)=>{var r,o;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__header",{"is-sticky":e.sticky}]),role:"row",style:i.normalizeStyle({gridTemplateColumns:(r=i.unref(t))==null?void 0:r.gridTemplate.value})},[i.renderSlot(n.$slots,"default",{columns:((o=i.unref(t))==null?void 0:o.columns.value)??[]},void 0,!0)],6)}}}),jf=ee(N_,[["__scopeId","data-v-525d4a1b"]]),A_=["aria-sort"],P_={class:"sky-table__head-title"},M_=i.defineComponent({__name:"SkyTableHead",props:{column:{},sort:{}},emits:["sort"],setup(e,{emit:t}){const n=e,a=t,r=i.computed(()=>{const s=n.column.sortable;return s?typeof s=="string"?s:n.column.name:""}),o=i.computed(()=>{var s;return r.value&&((s=n.sort)==null?void 0:s.of)===r.value?n.sort.ot:""});return(s,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__head",[`is-${e.column.align??"left"}`,{"is-sortable":r.value}]]),role:"columnheader","aria-sort":o.value==="asc"?"ascending":o.value==="desc"?"descending":"none",onClick:l[0]||(l[0]=u=>r.value&&a("sort",r.value))},[i.renderSlot(s.$slots,"default",{},()=>[i.createElementVNode("span",P_,i.toDisplayString(e.column.title),1)],!0),r.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["sky-table__sort",{"is-active":o.value,"is-desc":o.value==="desc"}]),width:"10",height:"10",viewBox:"0 0 451.847 451.847","aria-hidden":"true"},[...l[1]||(l[1]=[i.createElementVNode("path",{fill:"currentColor",d:"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"},null,-1)])],2)):i.createCommentVNode("",!0)],10,A_))}}),Uf=ee(M_,[["__scopeId","data-v-8dc32657"]]),L_={class:"sky-table__body",role:"rowgroup"},F_=i.defineComponent({__name:"SkyTableBody",props:{rows:{default:void 0},rowKey:{type:Function,default:(e,t)=>t}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",L_,[e.rows?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[e.rows.length?i.createCommentVNode("",!0):i.renderSlot(t.$slots,"empty",{},void 0,!0,0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.rows,(a,r)=>i.renderSlot(t.$slots,"default",{row:a,index:r},void 0,!0,e.rowKey(a,r))),128))],64)):i.renderSlot(t.$slots,"default",i.normalizeProps(i.guardReactiveProps({})),void 0,!0,1)]))}}),zf=ee(F_,[["__scopeId","data-v-949756f6"]]),j_=["data-index"],U_=i.defineComponent({__name:"SkyTableVirtualBody",props:{rows:{},rowKey:{type:Function,default:(e,t)=>t},estimateSize:{default:40},overscan:{default:6},dynamic:{type:Boolean,default:!1}},emits:["reach-end"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(null),o=Af.useVirtualizer(i.computed(()=>({count:n.rows.length,getScrollElement:()=>r.value,estimateSize:()=>n.estimateSize,overscan:n.overscan,getItemKey:c=>n.rowKey(n.rows[c],c)}))),s=i.computed(()=>o.value.getVirtualItems()),l=i.computed(()=>o.value.getTotalSize());function u(c){c instanceof Element&&o.value.measureElement(c)}return i.watch(()=>{const c=s.value;return c.length?c[c.length-1].index:-1},c=>{n.rows.length>0&&c>=n.rows.length-1&&a("reach-end")}),(c,d)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"scrollEl",ref:r,class:"sky-table__body sky-table__body--virtual",role:"rowgroup"},[e.rows.length?(i.openBlock(),i.createElementBlock("div",{key:1,class:"sky-table__virtual-sizer",style:i.normalizeStyle({height:`${l.value}px`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,f=>(i.openBlock(),i.createElementBlock("div",{key:String(f.key),ref_for:!0,ref:e.dynamic?u:void 0,"data-index":f.index,class:"sky-table__virtual-row",style:i.normalizeStyle({transform:`translateY(${f.start}px)`})},[i.renderSlot(c.$slots,"default",{row:e.rows[f.index],index:f.index},void 0,!0)],12,j_))),128))],4)):i.renderSlot(c.$slots,"empty",{},void 0,!0,0)],512))}}),Ll=ee(U_,[["__scopeId","data-v-e505464f"]]),z_=["aria-selected"],H_=i.defineComponent({__name:"SkyTableRow",props:{selected:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},setup(e){const t=i.inject(Si);return(n,a)=>{var r,o;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__row",{"is-selected":e.selected,"is-interactive":e.interactive}]),role:"row","aria-selected":e.selected||void 0,style:i.normalizeStyle({gridTemplateColumns:(r=i.unref(t))==null?void 0:r.gridTemplate.value})},[i.renderSlot(n.$slots,"default",{columns:((o=i.unref(t))==null?void 0:o.columns.value)??[]},void 0,!0)],14,z_)}}}),Hf=ee(H_,[["__scopeId","data-v-e787719d"]]),W_=i.defineComponent({__name:"SkyTableCell",props:{align:{default:"left"},noTruncate:{type:Boolean,default:!1}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sky-table__cell",[`is-${e.align}`,{"is-truncate":!e.noTruncate}]]),role:"cell"},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),Wf=ee(W_,[["__scopeId","data-v-1caaa68a"]]),Y_={class:"sky-table__empty"},K_={class:"sky-table__empty-text"},G_=i.defineComponent({__name:"SkyTableEmpty",props:{text:{default:"Даних немає"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",Y_,[i.renderSlot(t.$slots,"illustration",{},void 0,!0),i.renderSlot(t.$slots,"default",{},()=>[i.createElementVNode("p",K_,i.toDisplayString(e.text),1)],!0)]))}}),Yf=ee(G_,[["__scopeId","data-v-99a12e6e"]]),Kf=Xe.tableFeatures({columnFilteringFeature:Xe.columnFilteringFeature,columnSizingFeature:Xe.columnSizingFeature,columnVisibilityFeature:Xe.columnVisibilityFeature,globalFilteringFeature:Xe.globalFilteringFeature,rowPaginationFeature:Xe.rowPaginationFeature,rowSelectionFeature:Xe.rowSelectionFeature,rowSortingFeature:Xe.rowSortingFeature,coreRowModel:Xe.createCoreRowModel(),filteredRowModel:Xe.createFilteredRowModel(),sortedRowModel:Xe.createSortedRowModel(),paginatedRowModel:Xe.createPaginatedRowModel(),sortFns:Xe.sortFns,filterFns:Xe.filterFns});function q_(){return Xe.createColumnHelper()}function X_(e={}){const{initial:t={},tristate:n=!1}=e,a=i.ref({of:t.of??"",ot:t.ot??""});function r(l){return a.value.of!==l?a.value={of:l,ot:"asc"}:a.value.ot==="asc"?a.value={of:l,ot:"desc"}:a.value.ot==="desc"?a.value=n?{of:"",ot:""}:{of:l,ot:"asc"}:a.value={of:l,ot:"asc"},{...a.value}}return{sort:a,toggle:r,directionOf:l=>a.value.of===l?a.value.ot:"",reset:()=>{a.value={of:"",ot:""}}}}function Z_(e,t={}){const{rowId:n="id",selectable:a}=t,r=v=>typeof n=="function"?n(v):v[n],o=i.ref([]),s=i.ref(null),l=i.computed(()=>i.unref(e).filter(v=>a?a(v):!0)),u=i.computed(()=>o.value.map(r)),c=v=>u.value.includes(r(v)),d=i.computed(()=>l.value.length>0&&o.value.length>=l.value.length),f=i.computed(()=>o.value.length>0&&!d.value);function m(v){c(v)||(o.value=[...o.value,v])}function h(v){const k=r(v);o.value=o.value.filter(C=>r(C)!==k)}function g(v,k,C={}){const E=!c(v);if(C.shift&&s.value!==null){const D=i.unref(e),[w,T]=[s.value,k].sort((I,R)=>I-R);for(let I=w;I<=T;I+=1){const R=D[I];!R||a&&!a(R)||(E?m(R):h(R))}}else E?m(v):h(v);s.value=k}function y(){o.value=d.value?[]:[...l.value]}return{selected:o,selectedIds:u,isSelected:c,allSelected:d,someSelected:f,toggle:g,toggleAll:y,clear:()=>{o.value=[],s.value=null},remove:v=>{o.value=o.value.filter(k=>r(k)!==v)}}}function J_(e,t={}){const{storageKey:n,hidden:a=[]}=t,r=()=>Object.fromEntries(i.unref(e).map(d=>[d.name,!a.includes(d.name)])),o=()=>{const d=r();if(!n||typeof localStorage>"u")return d;try{const f=JSON.parse(localStorage.getItem(n)||"null");return f?{...d,...f}:d}catch{return d}},s=i.ref(o());n&&i.watch(s,d=>{try{localStorage.setItem(n,JSON.stringify(d))}catch{}},{deep:!0});const l=i.computed(()=>i.unref(e).filter(d=>s.value[d.name]!==!1));return{visibility:s,visibleColumns:l,toggle:d=>{s.value={...s.value,[d]:!s.value[d]}},reset:()=>{s.value=r()}}}const Q_={class:"sky-filter-search"},ek=["value","placeholder","aria-label"],tk=["aria-label"],nk=i.defineComponent({__name:"FilterSearch",props:{modelValue:{},placeholder:{},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(a,r)=>(i.openBlock(),i.createElementBlock("div",Q_,[i.createElementVNode("input",{class:"sky-filter-search__input",type:"text",value:e.modelValue,placeholder:e.placeholder,"aria-label":e.label||e.placeholder,onInput:r[0]||(r[0]=o=>n("update:modelValue",o.target.value))},null,40,ek),e.modelValue.trim()?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",class:"sky-filter-search__clear","aria-label":`${e.label||e.placeholder} ✕`,onClick:r[1]||(r[1]=o=>n("update:modelValue",""))}," × ",8,tk)):i.createCommentVNode("",!0)]))}}),Gf=ee(nk,[["__scopeId","data-v-1ebab115"]]),ak={class:"sky-checkbox-filter__actions"},rk={class:"sky-checkbox-filter__options"},ok={class:"sky-checkbox-filter__actions sky-checkbox-filter__actions--footer"},ik=["onClick"],sk=i.defineComponent({__name:"SkyCheckboxFilter",props:{title:{},options:{},modelValue:{default:()=>[]},selectAllLabel:{default:"Обрати все"},clearLabel:{default:"Очистити"},doneLabel:{default:"Готово"},searchPlaceholder:{default:"Пошук"},selectAll:{type:Boolean,default:!0},searchable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(""),o=i.computed(()=>{const m=r.value.trim().toLowerCase();return m?n.options.filter(h=>h.name.toLowerCase().includes(m)):n.options}),s=i.computed({get:()=>n.modelValue,set:m=>a("update:modelValue",m)}),l=i.computed(()=>{if(s.value.length!==1)return"";const m=n.options.find(h=>h.value===s.value[0]);return m?m.name.length<20?m.name:m.name.slice(0,20)+"...":""}),u=i.computed(()=>l.value),c=i.computed(()=>s.value.length>1?s.value.length:"");function d(){s.value=n.options.map(m=>m.value)}function f(){s.value=[]}return(m,h)=>(i.openBlock(),i.createBlock(Ei,{class:"sky-checkbox-filter",title:e.title,summary:u.value,badge:c.value,disabled:e.disabled,onOpen:h[2]||(h[2]=g=>r.value=""),onClose:h[3]||(h[3]=g=>r.value="")},{default:i.withCtx(({close:g})=>[i.createElementVNode("div",ak,[e.selectAll?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",class:"sky-checkbox-filter__link",onClick:d},i.toDisplayString(e.selectAllLabel),1)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button",class:"sky-checkbox-filter__link",onClick:f},i.toDisplayString(e.clearLabel),1)]),e.searchable?(i.openBlock(),i.createBlock(Gf,{key:0,modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=y=>r.value=y),placeholder:e.searchPlaceholder,label:e.title},null,8,["modelValue","placeholder","label"])):i.createCommentVNode("",!0),i.createElementVNode("div",rk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,y=>(i.openBlock(),i.createElementBlock("div",{key:y.value,class:"sky-checkbox-filter__option"},[i.createVNode(wi,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=_=>s.value=_),value:y.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(y.name),1)]),_:2},1032,["modelValue","value"])]))),128))]),h[4]||(h[4]=i.createElementVNode("hr",{class:"sky-checkbox-filter__sep"},null,-1)),i.createElementVNode("div",ok,[i.createElementVNode("button",{type:"button",class:"sky-checkbox-filter__link",onClick:g},i.toDisplayString(e.doneLabel),9,ik)])]),_:1},8,["title","summary","badge","disabled"]))}}),lk=ee(sk,[["__scopeId","data-v-4f92da77"]]),uk=["aria-label"],ck=["aria-selected","onClick"],dk=["aria-selected","onClick"],fk={key:1,class:"sky-select-filter__empty"},mk=i.defineComponent({__name:"SkySelectFilter",props:{title:{},options:{},modelValue:{default:null},allLabel:{default:""},searchPlaceholder:{default:"Пошук"},emptyLabel:{default:"Нічого не знайдено"},searchable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref(""),o=i.computed(()=>{const c=r.value.trim().toLowerCase();return c?n.options.filter(d=>d.name.toLowerCase().includes(c)):n.options}),s=i.computed(()=>n.modelValue==null?void 0:n.options.find(c=>c.value===n.modelValue)),l=i.computed(()=>{var d;const c=(d=s.value)==null?void 0:d.name;return c?c.length<20?c:c.slice(0,20)+"...":""});function u(c,d){a("update:modelValue",c),d()}return(c,d)=>(i.openBlock(),i.createBlock(Ei,{class:"sky-select-filter",title:e.title,summary:l.value,disabled:e.disabled,onOpen:d[1]||(d[1]=f=>r.value=""),onClose:d[2]||(d[2]=f=>r.value="")},{default:i.withCtx(({close:f})=>[e.searchable?(i.openBlock(),i.createBlock(Gf,{key:0,modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=m=>r.value=m),placeholder:e.searchPlaceholder,label:e.title},null,8,["modelValue","placeholder","label"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"sky-select-filter__options",role:"listbox","aria-label":e.title},[e.allLabel&&!r.value.trim()?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",role:"option",class:i.normalizeClass(["sky-select-filter__option",{"is-selected":e.modelValue==null}]),"aria-selected":e.modelValue==null,onClick:m=>u(null,f)},i.toDisplayString(e.allLabel),11,ck)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,m=>(i.openBlock(),i.createElementBlock("button",{key:m.value,type:"button",role:"option",class:i.normalizeClass(["sky-select-filter__option",{"is-selected":m.value===e.modelValue}]),"aria-selected":m.value===e.modelValue,style:i.normalizeStyle({paddingLeft:`${8+(m.depth??0)*14}px`}),onClick:h=>u(m.value,f)},i.toDisplayString(m.name),15,dk))),128)),o.value.length?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("p",fk,i.toDisplayString(e.emptyLabel),1))],8,uk)]),_:1},8,["title","summary","disabled"]))}}),hk=ee(mk,[["__scopeId","data-v-6dad32e8"]]),pk={key:0,class:"sky-table-mass"},vk={class:"sky-table-mass__count"},gk={value:""},yk=["value"],_k=i.defineComponent({__name:"TableMassActions",props:{count:{},actions:{},placeholder:{default:"Дія"}},emits:["action"],setup(e,{emit:t}){const n=e,a=t,r=i.ref("");i.watch(()=>n.count,s=>{s===0&&(r.value="")});function o(s){const l=s.target.value;l&&(a("action",l),r.value="")}return(s,l)=>e.count>0?(i.openBlock(),i.createElementBlock("div",pk,[i.createElementVNode("span",vk,i.toDisplayString(e.count),1),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),class:"sky-table-mass__select",onChange:o},[i.createElementVNode("option",gk,i.toDisplayString(e.placeholder),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.actions,u=>(i.openBlock(),i.createElementBlock("option",{key:u.value,value:u.value},i.toDisplayString(u.title),9,yk))),128))],544),[[i.vModelSelect,r.value]]),i.renderSlot(s.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)}}),kk=ee(_k,[["__scopeId","data-v-9fb8b310"]]),bk=["aria-expanded","title"],Ck={key:0,class:"sky-table-columns__menu"},wk={class:"sky-table-columns__header"},Ek=["checked","onChange"],Sk=i.defineComponent({__name:"TableColumnSettings",props:{columns:{},modelValue:{},title:{},resetLabel:{}},emits:["update:modelValue","reset"],setup(e,{emit:t}){const n=t,a=i.ref(!1),r=i.ref(null);function o(l,u){n("update:modelValue",{...u,[l]:!u[l]})}function s(l){a.value&&r.value&&!r.value.contains(l.target)&&(a.value=!1)}return i.onMounted(()=>document.addEventListener("mousedown",s)),i.onBeforeUnmount(()=>document.removeEventListener("mousedown",s)),(l,u)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"root",ref:r,class:"sky-table-columns"},[i.createElementVNode("button",{type:"button",class:"sky-table-columns__trigger","aria-expanded":a.value,title:e.title??"Колонки",onClick:u[0]||(u[0]=c=>a.value=!a.value)},[...u[2]||(u[2]=[i.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[i.createElementVNode("path",{fill:"currentColor",d:"M2 2h3v12H2zM6.5 2h3v12h-3zM11 2h3v12h-3z",opacity:"0.85"})],-1)])],8,bk),a.value?(i.openBlock(),i.createElementBlock("div",Ck,[i.createElementVNode("div",wk,i.toDisplayString(e.title??"Колонки"),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.columns,c=>(i.openBlock(),i.createElementBlock("label",{key:c.name,class:"sky-table-columns__item"},[i.createElementVNode("input",{type:"checkbox",checked:e.modelValue[c.name]!==!1,onChange:d=>o(c.name,e.modelValue)},null,40,Ek),i.createElementVNode("span",null,i.toDisplayString(c.title??c.name),1)]))),128)),i.createElementVNode("button",{type:"button",class:"sky-table-columns__reset",onClick:u[1]||(u[1]=c=>n("reset"))},i.toDisplayString(e.resetLabel??"Скинути"),1)])):i.createCommentVNode("",!0)],512))}}),Tk=ee(Sk,[["__scopeId","data-v-23cf2224"]]),Dk=i.defineComponent({__name:"TableVirtualBody",props:{items:{},keyField:{default:"id"},minItemSize:{default:36},sizeDependencies:{type:Function,default:void 0}},emits:["reach-end"],setup(e,{emit:t}){const n=e,a=t;function r(o,s){return(o==null?void 0:o[n.keyField])??s}return(o,s)=>(i.openBlock(),i.createBlock(Ll,{rows:e.items,"row-key":r,"estimate-size":e.minItemSize,dynamic:"",onReachEnd:s[0]||(s[0]=l=>a("reach-end"))},{default:i.withCtx(({row:l,index:u})=>[i.renderSlot(o.$slots,"default",{item:l,index:u,active:!0})]),_:3},8,["rows","estimate-size"]))}}),Ok={class:"sky-data-table"},Vk={key:0,class:"sky-data-table__toolbar"},$k={key:0,class:"sky-data-table__search"},xk={key:0,class:"sky-data-table__pagination"},Ik={class:"sky-data-table__count"},Rk={class:"sky-data-table__pager"},Bk=["disabled"],Nk={class:"sky-data-table__page"},Ak=["disabled"],Pk=i.defineComponent({__name:"SkyDataTable",props:{columns:{},data:{},features:{default:void 0},rowId:{type:[String,Function],default:void 0},pageSize:{default:0},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Пошук…"},initialSorting:{default:void 0},emptyText:{default:"Даних немає"},interactiveRows:{type:Boolean,default:!1},virtual:{type:[Boolean,Object]}},emits:["row-click","reach-end"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=Xe.useTable({features:a.features??Kf,columns:i.computed(()=>a.columns),data:i.computed(()=>a.data),getRowId:typeof a.rowId=="function"?_=>a.rowId(_):a.rowId?_=>String(_[a.rowId]):void 0,initialState:{...a.initialSorting?{sorting:a.initialSorting}:{},...a.pageSize?{pagination:{pageIndex:0,pageSize:a.pageSize}}:{}}}),s=i.computed(()=>o.getVisibleLeafColumns().map(_=>{const p=_.columnDef.meta??{},v=_.columnDef.size;return{name:_.id,width:p.widthFr?void 0:typeof v=="number"?v:void 0,widthFr:p.widthFr,align:p.align,minWidthScreen:p.minWidthScreen}})),l=i.computed(()=>o.getHeaderGroups()),u=i.computed(()=>a.pageSize>0?o.getRowModel().rows:o.getPrePaginatedRowModel().rows),c=i.computed({get:()=>{var _;return((_=o.atoms.globalFilter)==null?void 0:_.get())??""},set:_=>o.setGlobalFilter(_)}),d=i.computed(()=>{var _;return(_=o.atoms.pagination)==null?void 0:_.get()}),f=i.computed(()=>a.pageSize>0&&o.getPageCount()>1);function m(_){var p;return((p=s.value.find(v=>v.name===_))==null?void 0:p.align)??"left"}function h(_){return _.id}const g=i.computed(()=>!!a.virtual),y=i.computed(()=>typeof a.virtual=="object"&&a.virtual!==null?a.virtual:{});return a.virtual&&a.pageSize>0&&console.warn("[SkyDataTable] `virtual` і `pageSize` разом не мають сенсу: пагінація вже обмежує кількість рядків у DOM. Лишіть щось одне — pageSize={0} для віртуалізації."),t({table:o}),(_,p)=>(i.openBlock(),i.createElementBlock("div",Ok,[i.renderSlot(_.$slots,"toolbar",{table:i.unref(o)},()=>[e.searchable||_.$slots.actions?(i.openBlock(),i.createElementBlock("div",Vk,[e.searchable?(i.openBlock(),i.createElementBlock("div",$k,[i.createVNode(Lf,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=v=>c.value=v),placeholder:e.searchPlaceholder},null,8,["modelValue","placeholder"])])):i.createCommentVNode("",!0),i.renderSlot(_.$slots,"actions",{table:i.unref(o)},void 0,!0)])):i.createCommentVNode("",!0)],!0),i.createVNode(Ff,{columns:s.value,class:"sky-data-table__table"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,v=>(i.openBlock(),i.createBlock(jf,{key:v.id},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.headers,k=>(i.openBlock(),i.createBlock(Uf,{key:k.id,column:{name:k.column.id,align:m(k.column.id),sortable:k.column.getCanSort()},sort:{of:k.column.getIsSorted()?k.column.id:"",ot:k.column.getIsSorted()==="desc"?"desc":"asc"},onSort:C=>k.column.toggleSorting()},{default:i.withCtx(()=>[k.isPlaceholder?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xe.FlexRender),{key:0,render:k.column.columnDef.header,props:k.getContext()},null,8,["render","props"]))]),_:2},1032,["column","sort","onSort"]))),128))]),_:2},1024))),128)),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.value?Ll:zf),i.mergeProps({rows:u.value,"row-key":h},g.value?y.value:{},{onReachEnd:p[1]||(p[1]=v=>r("reach-end"))}),{empty:i.withCtx(()=>[i.createVNode(Yf,{text:e.emptyText},{default:i.withCtx(()=>[i.renderSlot(_.$slots,"empty",{},void 0,!0)]),_:3},8,["text"])]),default:i.withCtx(({row:v})=>[i.createVNode(Hf,{selected:v.getIsSelected(),interactive:e.interactiveRows,onClick:k=>r("row-click",v.original)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.getVisibleCells(),k=>(i.openBlock(),i.createBlock(Wf,{key:k.id,align:m(k.column.id),"no-truncate":""},{default:i.withCtx(()=>[i.createVNode(i.unref(Xe.FlexRender),{render:k.column.columnDef.cell,props:k.getContext()},null,8,["render","props"])]),_:2},1032,["align"]))),128))]),_:2},1032,["selected","interactive","onClick"])]),_:3},16,["rows"]))]),_:3},8,["columns"]),i.renderSlot(_.$slots,"footer",{table:i.unref(o)},()=>{var v;return[f.value?(i.openBlock(),i.createElementBlock("div",xk,[i.createElementVNode("span",Ik," Знайдено "+i.toDisplayString(i.unref(o).getRowCount()),1),i.createElementVNode("div",Rk,[i.createElementVNode("button",{type:"button",class:"sky-data-table__page-btn",disabled:!i.unref(o).getCanPreviousPage(),onClick:p[2]||(p[2]=k=>i.unref(o).previousPage())}," ‹ ",8,Bk),i.createElementVNode("span",Nk,i.toDisplayString((((v=d.value)==null?void 0:v.pageIndex)??0)+1)+" / "+i.toDisplayString(i.unref(o).getPageCount()),1),i.createElementVNode("button",{type:"button",class:"sky-data-table__page-btn",disabled:!i.unref(o).getCanNextPage(),onClick:p[3]||(p[3]=k=>i.unref(o).nextPage())}," › ",8,Ak)])])):i.createCommentVNode("",!0)]},!0)]))}}),Mk=ee(Pk,[["__scopeId","data-v-7988d0cf"]]),Lk=["title","aria-expanded"],Fk={key:0,class:"sky-dt-columns__menu"},jk={class:"sky-dt-columns__header"},Uk=["checked","onChange"],zk=i.defineComponent({__name:"SkyDataTableColumnToggle",props:{table:{},title:{default:"Колонки"},resetLabel:{default:"Показати всі"}},setup(e){const t=e,n=i.ref(!1),a=i.ref(null),r=i.computed(()=>t.table.getAllLeafColumns().filter(s=>{var l;return((l=s.getCanHide)==null?void 0:l.call(s))!==!1&&s.columnDef.header}));function o(s){n.value&&a.value&&!a.value.contains(s.target)&&(n.value=!1)}return i.onMounted(()=>document.addEventListener("mousedown",o)),i.onBeforeUnmount(()=>document.removeEventListener("mousedown",o)),(s,l)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"root",ref:a,class:"sky-dt-columns"},[i.createElementVNode("button",{type:"button",class:"sky-dt-columns__trigger",title:e.title,"aria-expanded":n.value,onClick:l[0]||(l[0]=u=>n.value=!n.value)},[...l[2]||(l[2]=[i.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[i.createElementVNode("path",{fill:"currentColor",d:"M2 2h3v12H2zM6.5 2h3v12h-3zM11 2h3v12h-3z"})],-1)])],8,Lk),n.value?(i.openBlock(),i.createElementBlock("div",Fk,[i.createElementVNode("div",jk,i.toDisplayString(e.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,u=>(i.openBlock(),i.createElementBlock("label",{key:u.id,class:"sky-dt-columns__item"},[i.createElementVNode("input",{type:"checkbox",checked:u.getIsVisible(),onChange:c=>u.toggleVisibility()},null,40,Uk),i.createElementVNode("span",null,i.toDisplayString(typeof u.columnDef.header=="string"?u.columnDef.header:u.id),1)]))),128)),i.createElementVNode("button",{type:"button",class:"sky-dt-columns__reset",onClick:l[1]||(l[1]=u=>e.table.resetColumnVisibility())},i.toDisplayString(e.resetLabel),1)])):i.createCommentVNode("",!0)],512))}}),Hk=ee(zk,[["__scopeId","data-v-a723f9fe"]]);var xo;function Wk(e){return Qf(e)||em(e)||Ti(e)||Jf()}function ec(e,t,n,a){var r=Us(tr(e.prototype),t,n);return typeof r=="function"?function(o){return r.apply(n,o)}:r}function Us(){return Us=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var a=Yk(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Us.apply(null,arguments)}function Yk(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=tr(e))!==null;);return e}function tc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tc(Object(n),!0).forEach(function(a){le(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tc(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(h,g,y,_){var p=g&&g.prototype instanceof l?g:l,v=Object.create(p.prototype);return Et(v,"_invoke",function(k,C,E){var D,w,T,I=0,R=E||[],O=!1,$={p:0,n:0,v:e,a:N,f:N.bind(e,4),d:function(x,A){return D=x,w=0,T=e,$.n=A,s}};function N(P,x){for(w=P,T=x,t=0;!O&&I&&!A&&t<R.length;t++){var A,j=R[t],V=$.p,G=j[2];P>3?(A=G===x)&&(T=j[(w=j[4])?5:(w=3,3)],j[4]=j[5]=e):j[0]<=V&&((A=P<2&&V<j[1])?(w=0,$.v=x,$.n=j[1]):V<G&&(A=P<3||j[0]>x||x>G)&&(j[4]=P,j[5]=x,$.n=G,w=0))}if(A||P>1)return s;throw O=!0,x}return function(P,x,A){if(I>1)throw TypeError("Generator is already running");for(O&&x===1&&N(x,A),w=x,T=A;(t=w<2?e:T)||!O;){D||(w?w<3?(w>1&&($.n=-1),N(w,T)):$.n=T:$.v=T);try{if(I=2,D){if(w||(P="next"),t=D[P]){if(!(t=t.call(D,T)))throw TypeError("iterator result is not an object");if(!t.done)return t;T=t.value,w<2&&(w=0)}else w===1&&(t=D.return)&&t.call(D),w<2&&(T=TypeError("The iterator does not provide a '"+P+"' method"),w=1);D=e}else if((t=(O=$.n<0)?T:k.call(C,$))!==s)break}catch(j){D=e,w=1,T=j}finally{I=1}}return{value:t,done:O}}}(h,y,_),!0),v}var s={};function l(){}function u(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(Et(t={},a,function(){return this}),t),f=c.prototype=l.prototype=Object.create(d);function m(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Et(h,r,"GeneratorFunction")),h.prototype=Object.create(f),h}return u.prototype=c,Et(f,"constructor",c),Et(c,"constructor",u),u.displayName="GeneratorFunction",Et(c,r,"GeneratorFunction"),Et(f),Et(f,r,"Generator"),Et(f,a,function(){return this}),Et(f,"toString",function(){return"[object Generator]"}),(_e=function(){return{w:o,m}})()}function Et(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Et=function(s,l,u,c){function d(f,m){Et(s,f,function(h){return this._invoke(f,m,h)})}l?r?r(s,l,{value:u,enumerable:!c,configurable:!c,writable:!c}):s[l]=u:(d("next",0),d("throw",1),d("return",2))},Et(e,t,n,a)}function nc(e,t,n,a,r,o,s){try{var l=e[o](s),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(a,r)}function ot(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){var o=e.apply(t,n);function s(u){nc(o,a,r,s,l,"next",u)}function l(u){nc(o,a,r,s,l,"throw",u)}s(void 0)})}}function yo(e,t,n){return t=tr(t),Kk(e,Xf()?Reflect.construct(t,n||[],tr(e).constructor):t.apply(e,n))}function Kk(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qf(e)}function qf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xf=function(){return!!e})()}function tr(e){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tr(e)}function _o(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zs(e,t)}function zs(e,t){return zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zs(e,t)}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gk(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Zf(a.key),a)}}function Ne(e,t,n){return t&&Gk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function le(e,t,n){return(t=Zf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e){var t=qk(e,"string");return typeof t=="symbol"?t:t+""}function qk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lt(e,t){return Qf(e)||Xk(e,t)||Ti(e,t)||Jf()}function Jf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);u=!0);}catch(d){c=!0,r=d}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return l}}function Qf(e){if(Array.isArray(e))return e}function de(e){return Jk(e)||em(e)||Ti(e)||Zk()}function Zk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function em(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jk(e){if(Array.isArray(e))return ti(e)}function Ct(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ti(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return s=c.done,c},e:function(c){l=!0,o=c},f:function(){try{s||n.return==null||n.return()}finally{if(l)throw o}}}}function Ti(e,t){if(e){if(typeof e=="string")return ti(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,t):void 0}}function ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}(function(){(function(e){try{if(typeof document<"u"){var t=document.createElement("style");t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("".concat(e))),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})(".Vue-Toastification__container{z-index:9999;position:fixed;padding:4px;width:600px;box-sizing:border-box;display:flex;min-height:100%;color:#fff;flex-direction:column;pointer-events:none}@media only screen and (min-width:600px){.Vue-Toastification__container.top-left,.Vue-Toastification__container.top-right,.Vue-Toastification__container.top-center{top:1em}.Vue-Toastification__container.bottom-left,.Vue-Toastification__container.bottom-right,.Vue-Toastification__container.bottom-center{bottom:1em;flex-direction:column-reverse}.Vue-Toastification__container.top-left,.Vue-Toastification__container.bottom-left{left:1em}.Vue-Toastification__container.top-left .Vue-Toastification__toast,.Vue-Toastification__container.bottom-left .Vue-Toastification__toast{margin-right:auto}@supports not (-moz-appearance: none){.Vue-Toastification__container.top-left .Vue-Toastification__toast--rtl,.Vue-Toastification__container.bottom-left .Vue-Toastification__toast--rtl{margin-right:unset;margin-left:auto}}.Vue-Toastification__container.top-right,.Vue-Toastification__container.bottom-right{right:1em}.Vue-Toastification__container.top-right .Vue-Toastification__toast,.Vue-Toastification__container.bottom-right .Vue-Toastification__toast{margin-left:auto}@supports not (-moz-appearance: none){.Vue-Toastification__container.top-right .Vue-Toastification__toast--rtl,.Vue-Toastification__container.bottom-right .Vue-Toastification__toast--rtl{margin-left:unset;margin-right:auto}}.Vue-Toastification__container.top-center,.Vue-Toastification__container.bottom-center{left:50%;margin-left:-300px}.Vue-Toastification__container.top-center .Vue-Toastification__toast,.Vue-Toastification__container.bottom-center .Vue-Toastification__toast{margin-left:auto;margin-right:auto}}@media only screen and (max-width:600px){.Vue-Toastification__container{width:100vw;padding:0;left:0;margin:0}.Vue-Toastification__container .Vue-Toastification__toast{width:100%}.Vue-Toastification__container.top-left,.Vue-Toastification__container.top-right,.Vue-Toastification__container.top-center{top:0}.Vue-Toastification__container.bottom-left,.Vue-Toastification__container.bottom-right,.Vue-Toastification__container.bottom-center{bottom:0;flex-direction:column-reverse}}.Vue-Toastification__toast{display:inline-flex;position:relative;max-height:800px;min-height:64px;box-sizing:border-box;margin-bottom:1rem;padding:22px 24px;border-radius:8px;box-shadow:0 1px 10px #0000001a,0 2px 15px #0000000d;justify-content:space-between;font-family:Lato,Helvetica,Roboto,Arial,sans-serif;max-width:600px;min-width:326px;pointer-events:auto;overflow:hidden;transform:translateZ(0);direction:ltr}.Vue-Toastification__toast--rtl{direction:rtl}.Vue-Toastification__toast--default{background-color:#1976d2;color:#fff}.Vue-Toastification__toast--info{background-color:#2196f3;color:#fff}.Vue-Toastification__toast--success{background-color:#4caf50;color:#fff}.Vue-Toastification__toast--error{background-color:#ff5252;color:#fff}.Vue-Toastification__toast--warning{background-color:#ffc107;color:#fff}@media only screen and (max-width:600px){.Vue-Toastification__toast{border-radius:0;margin-bottom:.5rem}}.Vue-Toastification__toast-body{flex:1;line-height:24px;font-size:16px;word-break:break-word;white-space:pre-wrap}.Vue-Toastification__toast-component-body{flex:1}.Vue-Toastification__toast.disable-transition{animation:none!important}.Vue-Toastification__close-button{font-weight:700;font-size:24px;line-height:24px;background:transparent;outline:none;border:none;padding:0 0 0 10px;cursor:pointer;transition:.3s ease;align-items:center;color:#fff;opacity:.3;transition:visibility 0s,opacity .2s linear}.Vue-Toastification__close-button:hover,.Vue-Toastification__close-button:focus{opacity:1}.Vue-Toastification__toast:not(:hover) .Vue-Toastification__close-button.show-on-hover{opacity:0}.Vue-Toastification__toast--rtl .Vue-Toastification__close-button{padding-left:unset;padding-right:10px}@keyframes scale-x-frames{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Vue-Toastification__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:10000;background-color:#ffffffb3;transform-origin:left;animation:scale-x-frames linear 1 forwards}.Vue-Toastification__toast--rtl .Vue-Toastification__progress-bar{right:0;left:unset;transform-origin:right}.Vue-Toastification__icon{margin:auto 18px auto 0;background:transparent;outline:none;border:none;padding:0;transition:.3s ease;align-items:center;width:20px;height:100%}.Vue-Toastification__toast--rtl .Vue-Toastification__icon{margin:auto 0 auto 18px}@keyframes bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes bounceOutRight{40%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(1000px,0,0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Vue-Toastification__bounce-enter-active.top-left,.Vue-Toastification__bounce-enter-active.bottom-left{animation-name:bounceInLeft}.Vue-Toastification__bounce-enter-active.top-right,.Vue-Toastification__bounce-enter-active.bottom-right{animation-name:bounceInRight}.Vue-Toastification__bounce-enter-active.top-center{animation-name:bounceInDown}.Vue-Toastification__bounce-enter-active.bottom-center{animation-name:bounceInUp}.Vue-Toastification__bounce-leave-active:not(.disable-transition).top-left,.Vue-Toastification__bounce-leave-active:not(.disable-transition).bottom-left{animation-name:bounceOutLeft}.Vue-Toastification__bounce-leave-active:not(.disable-transition).top-right,.Vue-Toastification__bounce-leave-active:not(.disable-transition).bottom-right{animation-name:bounceOutRight}.Vue-Toastification__bounce-leave-active:not(.disable-transition).top-center{animation-name:bounceOutUp}.Vue-Toastification__bounce-leave-active:not(.disable-transition).bottom-center{animation-name:bounceOutDown}.Vue-Toastification__bounce-leave-active,.Vue-Toastification__bounce-enter-active{animation-duration:.75s;animation-fill-mode:both}.Vue-Toastification__bounce-move{transition-timing-function:ease-in-out;transition-property:all;transition-duration:.4s}@keyframes fadeOutTop{0%{transform:translateY(0);opacity:1}to{transform:translateY(-50px);opacity:0}}@keyframes fadeOutLeft{0%{transform:translate(0);opacity:1}to{transform:translate(-50px);opacity:0}}@keyframes fadeOutBottom{0%{transform:translateY(0);opacity:1}to{transform:translateY(50px);opacity:0}}@keyframes fadeOutRight{0%{transform:translate(0);opacity:1}to{transform:translate(50px);opacity:0}}@keyframes fadeInLeft{0%{transform:translate(-50px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes fadeInRight{0%{transform:translate(50px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes fadeInTop{0%{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes fadeInBottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.Vue-Toastification__fade-enter-active.top-left,.Vue-Toastification__fade-enter-active.bottom-left{animation-name:fadeInLeft}.Vue-Toastification__fade-enter-active.top-right,.Vue-Toastification__fade-enter-active.bottom-right{animation-name:fadeInRight}.Vue-Toastification__fade-enter-active.top-center{animation-name:fadeInTop}.Vue-Toastification__fade-enter-active.bottom-center{animation-name:fadeInBottom}.Vue-Toastification__fade-leave-active:not(.disable-transition).top-left,.Vue-Toastification__fade-leave-active:not(.disable-transition).bottom-left{animation-name:fadeOutLeft}.Vue-Toastification__fade-leave-active:not(.disable-transition).top-right,.Vue-Toastification__fade-leave-active:not(.disable-transition).bottom-right{animation-name:fadeOutRight}.Vue-Toastification__fade-leave-active:not(.disable-transition).top-center{animation-name:fadeOutTop}.Vue-Toastification__fade-leave-active:not(.disable-transition).bottom-center{animation-name:fadeOutBottom}.Vue-Toastification__fade-leave-active,.Vue-Toastification__fade-enter-active{animation-duration:.75s;animation-fill-mode:both}.Vue-Toastification__fade-move{transition-timing-function:ease-in-out;transition-property:all;transition-duration:.4s}@keyframes slideInBlurredLeft{0%{transform:translate(-1000px) scaleX(2.5) scaleY(.2);transform-origin:100% 50%;filter:blur(40px);opacity:0}to{transform:translate(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}}@keyframes slideInBlurredTop{0%{transform:translateY(-1000px) scaleY(2.5) scaleX(.2);transform-origin:50% 0%;filter:blur(240px);opacity:0}to{transform:translateY(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}}@keyframes slideInBlurredRight{0%{transform:translate(1000px) scaleX(2.5) scaleY(.2);transform-origin:0% 50%;filter:blur(40px);opacity:0}to{transform:translate(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}}@keyframes slideInBlurredBottom{0%{transform:translateY(1000px) scaleY(2.5) scaleX(.2);transform-origin:50% 100%;filter:blur(240px);opacity:0}to{transform:translateY(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}}@keyframes slideOutBlurredTop{0%{transform:translateY(0) scaleY(1) scaleX(1);transform-origin:50% 0%;filter:blur(0);opacity:1}to{transform:translateY(-1000px) scaleY(2) scaleX(.2);transform-origin:50% 0%;filter:blur(240px);opacity:0}}@keyframes slideOutBlurredBottom{0%{transform:translateY(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}to{transform:translateY(1000px) scaleY(2) scaleX(.2);transform-origin:50% 100%;filter:blur(240px);opacity:0}}@keyframes slideOutBlurredLeft{0%{transform:translate(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}to{transform:translate(-1000px) scaleX(2) scaleY(.2);transform-origin:100% 50%;filter:blur(40px);opacity:0}}@keyframes slideOutBlurredRight{0%{transform:translate(0) scaleY(1) scaleX(1);transform-origin:50% 50%;filter:blur(0);opacity:1}to{transform:translate(1000px) scaleX(2) scaleY(.2);transform-origin:0% 50%;filter:blur(40px);opacity:0}}.Vue-Toastification__slideBlurred-enter-active.top-left,.Vue-Toastification__slideBlurred-enter-active.bottom-left{animation-name:slideInBlurredLeft}.Vue-Toastification__slideBlurred-enter-active.top-right,.Vue-Toastification__slideBlurred-enter-active.bottom-right{animation-name:slideInBlurredRight}.Vue-Toastification__slideBlurred-enter-active.top-center{animation-name:slideInBlurredTop}.Vue-Toastification__slideBlurred-enter-active.bottom-center{animation-name:slideInBlurredBottom}.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).top-left,.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).bottom-left{animation-name:slideOutBlurredLeft}.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).top-right,.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).bottom-right{animation-name:slideOutBlurredRight}.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).top-center{animation-name:slideOutBlurredTop}.Vue-Toastification__slideBlurred-leave-active:not(.disable-transition).bottom-center{animation-name:slideOutBlurredBottom}.Vue-Toastification__slideBlurred-leave-active,.Vue-Toastification__slideBlurred-enter-active{animation-duration:.75s;animation-fill-mode:both}.Vue-Toastification__slideBlurred-move{transition-timing-function:ease-in-out;transition-property:all;transition-duration:.4s}.Vue-Toastification__container{z-index:2147483647!important}.sky-vt-custom-toast{background:transparent!important;box-shadow:none!important;min-height:unset!important;cursor:default!important;overflow:visible!important;padding:0!important}.sky-vt-custom-toast .Vue-Toastification__toast-body{padding:0!important;width:100%}.sky-vt-custom-toast .Vue-Toastification__icon{display:none!important}.Vue-Toastification__fade-move{transition-duration:0s!important}.sky-vt-custom-toast.Vue-Toastification__toast{margin-bottom:.6rem!important}")})();/**
|