sprof 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.sprof={},L.Quasar,L.Vue,L.draggable,L.VueRouter))})(this,function(L,x,e,wo,Yl){"use strict";var Cw=Object.defineProperty;var Sw=(L,x,e)=>x in L?Cw(L,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):L[x]=e;var d=(L,x,e)=>Sw(L,typeof x!="symbol"?x+"":x,e);var Ht,Ut,ot,jn,re,at,Zt;var xn=typeof document<"u"?document.currentScript:null,Le=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Le||{}),he=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(he||{});class nn{constructor(t,i,o,r){d(this,"text","Сохранить");d(this,"type",he.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(t,i,o){return new nn(t,i,he.Primary,o)}static Success(t,i,o){return new nn(t,i,he.Success,o)}static Warning(t,i,o){return new nn(t,i,he.Warning,o)}static Error(t,i,o){return new nn(t,i,he.Error,o)}}class Si extends nn{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Le.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let bo=class extends Si{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Le.Login)}};class Yr extends Si{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Le.Refresh)}}class Co extends Si{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Le.Register)}}class ki extends Si{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Le.Restore)}}class Xr{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class xi extends Xr{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var En=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(En||{});const Xl=/\S+@\S+\.\S+/;class Zr{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),Xl.test(t)||this.errors.push("Некорректный email"),this.errors}}let Zl=class extends xi{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new Zr);d(this,"method",En.Email)}};const Ei=new Zl;class Jl{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Kl=class extends xi{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new Jl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const Bi=new Kl;let ec=class extends xi{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const Jr=new ec,Kr={allowRestore:!1,[Le.Login]:{methods:[En.Email],title:"Вход в систему",action:"login",buttons:[new bo,new Co,new ki],fields:[Ei,Bi],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Le.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Co,new bo,new ki],fields:[Ei,Bi,Jr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Le.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new ki],fields:[Ei]},[Le.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Yr],fields:[Bi]}};class tc{constructor(){d(this,"block",!1);d(this,"settings",Kr);d(this,"chunk",Le.Login);d(this,"selectedMethod",En.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),i=new Map;return t.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),i=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(i==null?void 0:i.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===Le.Login}get IsRegister(){return this.chunk===Le.Register}get IsRestore(){return this.chunk===Le.Restore}get IsRefresh(){return this.chunk===Le.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(i=>{i.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Le.Login),this.ResetFields()}GetField(t){return this.GetFields().find(i=>i.id===t)}}class nc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Bn{constructor(){d(this,"type",he.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case he.Success:return"positive";case he.Warning:return"warning";case he.Error:return"negative";case he.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,i){this.type=i,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Bn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,he.Info)}Success(t){this.showMessage(t,he.Success)}Error(t){this.showMessage(t,he.Error)}Warning(t){this.showMessage(t,he.Warning)}FormMessage(t){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(t))t[o][0]&&t[o][0].message&&(i+=`<li>${t[o][0].message}</li>`);return i+="</ul>",i}}class So{static Get(t,i,o="-"){return!t||!i?"":`${t}${o}${i}`}static In(t,i,o){return t>=i&&t<=o}static Intersects(t,i,o,r){return t===o||i===r||t>o&&t<r||i>o&&i<r||i>r&&t<o}}const es=1e3,ts=60*es,ko=60*ts;var Qn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Qn||{});const Ni={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class oe{static S(t){return es*t}static M(t){return ts*t}static H(t){return ko*t}static D(t){return ko*t}static W(t){return ko*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const i=oe.SplitHM(t);return i.length>1?oe.HtoM(i[0])+i[1]:oe.HtoM(i[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const i=t.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(t){const i=oe.SplitHM(t);return oe.ConcatHM(i[0],i[1])}static AddMtoHM(t,i){const o=new Date,r=oe.SplitHM(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),c=s.getMinutes();return oe.ConcatHM(a,c)}static ConcatHM(t,i){return`${t}:${oe.NormalizeTime(i)}`}static DiffM(t,i){return oe.Gt(i,t)?oe.HMtoM(i)-oe.HMtoM(t):oe.HMtoM(t)-oe.HMtoM(i)}static GetPeriod(t,i){return So.Get(t,i)}static Gt(t,i){return oe.HMtoM(t)>oe.HMtoM(i)}static GtOrEq(t,i){return oe.Gt(t,i)||oe.Eq(t,i)}static Eq(t,i){return oe.HMtoM(t)===oe.HMtoM(i)}static PeriodInPeriod(t,i,o,r){return oe.HMtoM(t)>=oe.HMtoM(o)&&oe.HMtoM(i)<=oe.HMtoM(r)}static PeriodsIntersects(t,i,o,r){return So.Intersects(oe.HMtoM(t),oe.HMtoM(i),oe.HMtoM(o),oe.HMtoM(r))}}const ic="top";class oc extends Bn{constructor(){super(...arguments);d(this,"duration",oe.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof x.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;x.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Bn.ContainsHtml(this.text),position:ic})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",he.Warning)}Save(){this.showMessage("Изменения успешно сохранены",he.Success)}}const Nn=new oc;class xt{static Get(t){const i=localStorage.getItem(t);if(i)return JSON.parse(i)}static Set(t,i){i&&localStorage.setItem(t,JSON.stringify(i))}static Remove(t){localStorage.removeItem(t)}}var ut=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ut||{});class rc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return xt.Get(ut.AccessToken)}getRefreshToken(){return xt.Get(ut.RefreshToken)}setAccessToken(t){xt.Set(ut.AccessToken,t)}setRefreshToken(t){xt.Set(ut.RefreshToken,t)}reset(){xt.Remove(ut.AccessToken),xt.Remove(ut.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class sc{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),xt.Set(ut.User,this.user))}reset(){this.user=void 0,xt.Remove(ut.User)}actualize(){const t=xt.Get(ut.User);t&&this.set(t)}}class ac{constructor(){d(this,"isAuth",!1);d(this,"user",new sc);d(this,"tokens",new rc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Nn.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let lc=(Ht=class{constructor(){d(this,"form",e.reactive(new tc));d(this,"status",e.reactive(new ac));d(this,"modal",e.reactive(new nc));if(Ht.instance)return Ht.instance;Ht.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(Ht,"instance"),Ht);const _e=new lc;var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.sprof={},L.Quasar,L.Vue,L.draggable,L.VueRouter))})(this,function(L,x,e,wi,Yl){"use strict";var Cw=Object.defineProperty;var Sw=(L,x,e)=>x in L?Cw(L,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):L[x]=e;var d=(L,x,e)=>Sw(L,typeof x!="symbol"?x+"":x,e);var Ht,Ut,it,jn,re,at,Zt;var xn=typeof document<"u"?document.currentScript:null,Le=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Le||{}),he=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(he||{});class nn{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",he.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=i,this.action=o,r!==void 0&&(this.condition=r)}static Primary(t,o,i){return new nn(t,o,he.Primary,i)}static Success(t,o,i){return new nn(t,o,he.Success,i)}static Warning(t,o,i){return new nn(t,o,he.Warning,i)}static Error(t,o,i){return new nn(t,o,he.Error,i)}}class ko extends nn{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Le.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let bi=class extends ko{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Le.Login)}};class Yr extends ko{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Le.Refresh)}}class Ci extends ko{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Le.Register)}}class xo extends ko{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Le.Restore)}}class Xr{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class Eo extends Xr{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var En=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(En||{});const Xl=/\S+@\S+\.\S+/;class Zr{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),Xl.test(t)||this.errors.push("Некорректный email"),this.errors}}let Zl=class extends Eo{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new Zr);d(this,"method",En.Email)}};const Bo=new Zl;class Jl{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Kl=class extends Eo{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new Jl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const No=new Kl;let ec=class extends Eo{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const Jr=new ec,Kr={allowRestore:!1,[Le.Login]:{methods:[En.Email],title:"Вход в систему",action:"login",buttons:[new bi,new Ci,new xo],fields:[Bo,No],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Le.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Ci,new bi,new xo],fields:[Bo,No,Jr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Le.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new xo],fields:[Bo]},[Le.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Yr],fields:[No]}};class tc{constructor(){d(this,"block",!1);d(this,"settings",Kr);d(this,"chunk",Le.Login);d(this,"selectedMethod",En.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),o=new Map;return t.forEach(i=>{i.value&&o.set(i.name,i.value)}),Object.fromEntries(o)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),o=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(o==null?void 0:o.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===Le.Login}get IsRegister(){return this.chunk===Le.Register}get IsRestore(){return this.chunk===Le.Restore}get IsRefresh(){return this.chunk===Le.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(o=>{o.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Le.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class nc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Bn{constructor(){d(this,"type",he.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case he.Success:return"positive";case he.Warning:return"warning";case he.Error:return"negative";case he.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,o){this.type=o,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Bn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,he.Info)}Success(t){this.showMessage(t,he.Success)}Error(t){this.showMessage(t,he.Error)}Warning(t){this.showMessage(t,he.Warning)}FormMessage(t){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(o+=`<li>${t[i][0].message}</li>`);return o+="</ul>",o}}class Si{static Get(t,o,i="-"){return!t||!o?"":`${t}${i}${o}`}static In(t,o,i){return t>=o&&t<=i}static Intersects(t,o,i,r){return t===i||o===r||t>i&&t<r||o>i&&o<r||o>r&&t<i}}const es=1e3,ts=60*es,ki=60*ts;var Qn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Qn||{});const Vo={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(t){return es*t}static M(t){return ts*t}static H(t){return ki*t}static D(t){return ki*t}static W(t){return ki*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=ie.SplitHM(t);return o.length>1?ie.HtoM(o[0])+o[1]:ie.HtoM(o[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const o=t.split(":");return[Number(o[0]),Number(o[1])]}static HmsToHm(t){const o=ie.SplitHM(t);return ie.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=ie.SplitHM(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return ie.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${ie.NormalizeTime(o)}`}static DiffM(t,o){return ie.Gt(o,t)?ie.HMtoM(o)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(o)}static GetPeriod(t,o){return Si.Get(t,o)}static Gt(t,o){return ie.HMtoM(t)>ie.HMtoM(o)}static GtOrEq(t,o){return ie.Gt(t,o)||ie.Eq(t,o)}static Eq(t,o){return ie.HMtoM(t)===ie.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return ie.HMtoM(t)>=ie.HMtoM(i)&&ie.HMtoM(o)<=ie.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return Si.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const oc="top";class ic extends Bn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof x.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof o=="string"?{}:o;x.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Bn.ContainsHtml(this.text),position:oc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",he.Warning)}Save(){this.showMessage("Изменения успешно сохранены",he.Success)}}const Nn=new ic;class xt{static Get(t){const o=localStorage.getItem(t);if(o)return JSON.parse(o)}static Set(t,o){o&&localStorage.setItem(t,JSON.stringify(o))}static Remove(t){localStorage.removeItem(t)}}var ut=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ut||{});class rc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return xt.Get(ut.AccessToken)}getRefreshToken(){return xt.Get(ut.RefreshToken)}setAccessToken(t){xt.Set(ut.AccessToken,t)}setRefreshToken(t){xt.Set(ut.RefreshToken,t)}reset(){xt.Remove(ut.AccessToken),xt.Remove(ut.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class sc{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),xt.Set(ut.User,this.user))}reset(){this.user=void 0,xt.Remove(ut.User)}actualize(){const t=xt.Get(ut.User);t&&this.set(t)}}class ac{constructor(){d(this,"isAuth",!1);d(this,"user",new sc);d(this,"tokens",new rc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Nn.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let lc=(Ht=class{constructor(){d(this,"form",e.reactive(new tc));d(this,"status",e.reactive(new ac));d(this,"modal",e.reactive(new nc));if(Ht.instance)return Ht.instance;Ht.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(Ht,"instance"),Ht);const _e=new lc;var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,23 +11,23 @@
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var is;(function(n){(function(t){var i=typeof globalThis=="object"?globalThis:typeof ns=="object"?ns:typeof self=="object"?self:typeof this=="object"?this:c(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),t(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(l,u){return function(f,h){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:h}),u&&u(f,h)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(t,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return wi(Object.create(null))}:l?function(){return wi({__proto__:null})}:function(){return wi({})},has:u?function(B,V){return o.call(B,V)}:function(B,V){return V in B},get:u?function(B,V){return o.call(B,V)?B[V]:void 0}:function(B,V){return B[V]}},h=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Hr(),y=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wn(),b=typeof WeakMap=="function"?WeakMap:Ur(),N=r?Symbol.for("@reflect-metadata:registry"):void 0,E=fo(),S=mo(E);function P(B,V,I,O){if(Q(I)){if(!Kt(B))throw new TypeError;if(!Rt(V))throw new TypeError;return Me(B,V)}else{if(!Kt(B))throw new TypeError;if(!ye(V))throw new TypeError;if(!ye(O)&&!Q(O)&&!Ze(O))throw new TypeError;return Ze(O)&&(O=void 0),I=rt(I),ge(B,V,I,O)}}t("decorate",P);function C(B,V){function I(O,Y){if(!ye(O))throw new TypeError;if(!Q(Y)&&!Cn(Y))throw new TypeError;bn(B,V,O,Y)}return I}t("metadata",C);function $(B,V,I,O){if(!ye(I))throw new TypeError;return Q(O)||(O=rt(O)),bn(B,V,I,O)}t("defineMetadata",$);function M(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Be(B,V,I)}t("hasMetadata",M);function A(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Pt(B,V,I)}t("hasOwnMetadata",A);function G(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),It(B,V,I)}t("getMetadata",G);function de(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Jt(B,V,I)}t("getOwnMetadata",de);function $e(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),lt(B,V)}t("getMetadataKeys",$e);function Ee(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),je(B,V)}t("getOwnMetadataKeys",Ee);function De(B,V,I){if(!ye(V))throw new TypeError;if(Q(I)||(I=rt(I)),!ye(V))throw new TypeError;Q(I)||(I=rt(I));var O=kn(V,I,!1);return Q(O)?!1:O.OrdinaryDeleteMetadata(B,V,I)}t("deleteMetadata",De);function Me(B,V){for(var I=B.length-1;I>=0;--I){var O=B[I],Y=O(V);if(!Q(Y)&&!Ze(Y)){if(!Rt(Y))throw new TypeError;V=Y}}return V}function ge(B,V,I,O){for(var Y=B.length-1;Y>=0;--Y){var Pe=B[Y],Ne=Pe(V,I,O);if(!Q(Ne)&&!Ze(Ne)){if(!ye(Ne))throw new TypeError;O=Ne}}return O}function Be(B,V,I){var O=Pt(B,V,I);if(O)return!0;var Y=Sn(V);return Ze(Y)?!1:Be(B,Y,I)}function Pt(B,V,I){var O=kn(V,I,!1);return Q(O)?!1:vt(O.OrdinaryHasOwnMetadata(B,V,I))}function It(B,V,I){var O=Pt(B,V,I);if(O)return Jt(B,V,I);var Y=Sn(V);if(!Ze(Y))return It(B,Y,I)}function Jt(B,V,I){var O=kn(V,I,!1);if(!Q(O))return O.OrdinaryGetOwnMetadata(B,V,I)}function bn(B,V,I,O){var Y=kn(I,O,!0);Y.OrdinaryDefineOwnMetadata(B,V,I,O)}function lt(B,V){var I=je(B,V),O=Sn(B);if(O===null)return I;var Y=lt(O,V);if(Y.length<=0)return I;if(I.length<=0)return Y;for(var Pe=new y,Ne=[],te=0,H=I;te<H.length;te++){var U=H[te],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}for(var q=0,ne=Y;q<ne.length;q++){var U=ne[q],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}return Ne}function je(B,V){var I=kn(B,V,!1);return I?I.OrdinaryOwnMetadataKeys(B,V):[]}function be(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function Q(B){return B===void 0}function Ze(B){return B===null}function St(B){return typeof B=="symbol"}function ye(B){return typeof B=="object"?B!==null:typeof B=="function"}function se(B,V){switch(be(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var I="string",O=ee(B,s);if(O!==void 0){var Y=O.call(B,I);if(ye(Y))throw new TypeError;return Y}return We(B)}function We(B,V){var I,O;{var Y=B.toString;if(Fe(Y)){var O=Y.call(B);if(!ye(O))return O}var I=B.valueOf;if(Fe(I)){var O=I.call(B);if(!ye(O))return O}}throw new TypeError}function vt(B){return!!B}function ct(B){return""+B}function rt(B){var V=se(B);return St(V)?V:ct(V)}function Kt(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Fe(B){return typeof B=="function"}function Rt(B){return typeof B=="function"}function Cn(B){switch(be(B)){case 3:return!0;case 4:return!0;default:return!1}}function ue(B,V){return B===V||B!==B&&V!==V}function ee(B,V){var I=B[V];if(I!=null){if(!Fe(I))throw new TypeError;return I}}function Oe(B){var V=ee(B,a);if(!Fe(V))throw new TypeError;var I=V.call(B);if(!ye(I))throw new TypeError;return I}function st(B){return B.value}function gt(B){var V=B.next();return V.done?!1:V}function en(B){var V=B.return;V&&V.call(B)}function Sn(B){var V=Object.getPrototypeOf(B);if(typeof B!="function"||B===h||V!==h)return V;var I=B.prototype,O=I&&Object.getPrototypeOf(I);if(O==null||O===Object.prototype)return V;var Y=O.constructor;return typeof Y!="function"||Y===B?V:Y}function dt(){var B;!Q(N)&&typeof i.Reflect<"u"&&!(N in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(B=_r(i.Reflect));var V,I,O,Y=new b,Pe={registerProvider:Ne,getProvider:H,setProvider:v};return Pe;function Ne(q){if(!Object.isExtensible(Pe))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case Q(V):V=q;break;case V===q:break;case Q(I):I=q;break;case I===q:break;default:O===void 0&&(O=new y),O.add(q);break}}function te(q,ne){if(!Q(V)){if(V.isProviderFor(q,ne))return V;if(!Q(I)){if(I.isProviderFor(q,ne))return V;if(!Q(O))for(var me=Oe(O);;){var we=gt(me);if(!we)return;var Je=st(we);if(Je.isProviderFor(q,ne))return en(me),Je}}}if(!Q(B)&&B.isProviderFor(q,ne))return B}function H(q,ne){var me=Y.get(q),we;return Q(me)||(we=me.get(ne)),Q(we)&&(we=te(q,ne),Q(we)||(Q(me)&&(me=new p,Y.set(q,me)),me.set(ne,we))),we}function U(q){if(Q(q))throw new TypeError;return V===q||I===q||!Q(O)&&O.has(q)}function v(q,ne,me){if(!U(me))throw new Error("Metadata provider not registered.");var we=H(q,ne);if(we!==me){if(!Q(we))return!1;var Je=Y.get(q);Q(Je)&&(Je=new p,Y.set(q,Je)),Je.set(ne,me)}return!0}}function fo(){var B;return!Q(N)&&ye(i.Reflect)&&Object.isExtensible(i.Reflect)&&(B=i.Reflect[N]),Q(B)&&(B=dt()),!Q(N)&&ye(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,N,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function mo(B){var V=new b,I={isProviderFor:function(U,v){var q=V.get(U);return Q(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:Ne,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Pe,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return E.registerProvider(I),I;function O(U,v,q){var ne=V.get(U),me=!1;if(Q(ne)){if(!q)return;ne=new p,V.set(U,ne),me=!0}var we=ne.get(v);if(Q(we)){if(!q)return;if(we=new p,ne.set(v,we),!B.setProvider(U,v,I))throw ne.delete(v),me&&V.delete(U),new Error("Wrong provider for target.")}return we}function Y(U,v,q){var ne=O(v,q,!1);return Q(ne)?!1:vt(ne.has(U))}function Pe(U,v,q){var ne=O(v,q,!1);if(!Q(ne))return ne.get(U)}function Ne(U,v,q,ne){var me=O(q,ne,!0);me.set(U,v)}function te(U,v){var q=[],ne=O(U,v,!1);if(Q(ne))return q;for(var me=ne.keys(),we=Oe(me),Je=0;;){var ho=gt(we);if(!ho)return q.length=Je,q;var vr=st(ho);try{q[Je]=vr}catch(yt){try{en(we)}finally{throw yt}}Je++}}function H(U,v,q){var ne=O(v,q,!1);if(Q(ne)||!ne.delete(U))return!1;if(ne.size===0){var me=V.get(v);Q(me)||(me.delete(q),me.size===0&&V.delete(me))}return!0}}function _r(B){var V=B.defineMetadata,I=B.hasOwnMetadata,O=B.getOwnMetadata,Y=B.getOwnMetadataKeys,Pe=B.deleteMetadata,Ne=new b,te={isProviderFor:function(H,U){var v=Ne.get(H);return!Q(v)&&v.has(U)?!0:Y(H,U).length?(Q(v)&&(v=new y,Ne.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:V,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:O,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Pe};return te}function kn(B,V,I){var O=E.getProvider(B,V);if(!Q(O))return O;if(I){if(E.setProvider(B,V,S))return S;throw new Error("Illegal state.")}}function Hr(){var B={},V=[],I=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=V,this._values=V):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=V,this._values=V),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=V,this._values=V),{value:H,done:!0}},te}(),O=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,ue(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Y)},te.prototype.values=function(){return new I(this._keys,this._values,Pe)},te.prototype.entries=function(){return new I(this._keys,this._values,Ne)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!ue(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(ue(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return O;function Y(te,H){return te}function Pe(te,H){return H}function Ne(te,H){return[te,H]}}function Wn(){var B=function(){function V(){this._map=new p}return Object.defineProperty(V.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),V.prototype.has=function(I){return this._map.has(I)},V.prototype.add=function(I){return this._map.set(I,I),this},V.prototype.delete=function(I){return this._map.delete(I)},V.prototype.clear=function(){this._map.clear()},V.prototype.keys=function(){return this._map.keys()},V.prototype.values=function(){return this._map.keys()},V.prototype.entries=function(){return this._map.entries()},V.prototype["@@iterator"]=function(){return this.keys()},V.prototype[a]=function(){return this.keys()},V}();return B}function Ur(){var B=16,V=f.create(),I=O();return function(){function H(){this._key=O()}return H.prototype.has=function(U){var v=Y(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Y(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Y(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Y(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=O()},H}();function O(){var H;do H="@@WeakMap@@"+te();while(f.has(V,H));return V[H]=!0,H}function Y(H,U){if(!o.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function Pe(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function Ne(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):Pe(U,H),U}return Pe(new Array(H),H)}function te(){var H=Ne(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function wi(B){return B.__=void 0,delete B.__,B}})})(is||(is={}));const He=[];for(let n=0;n<256;++n)He.push((n+256).toString(16).slice(1));function cc(n,t=0){return(He[n[t+0]]+He[n[t+1]]+He[n[t+2]]+He[n[t+3]]+"-"+He[n[t+4]]+He[n[t+5]]+"-"+He[n[t+6]]+He[n[t+7]]+"-"+He[n[t+8]]+He[n[t+9]]+"-"+He[n[t+10]]+He[n[t+11]]+He[n[t+12]]+He[n[t+13]]+He[n[t+14]]+He[n[t+15]]).toLowerCase()}const dc=new Uint8Array(16);function uc(){return crypto.getRandomValues(dc)}function jt(n,t,i){return crypto.randomUUID?crypto.randomUUID():fc(n)}function fc(n,t,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??uc();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,cc(o)}class Ke{static UUID(){return jt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function mc(n){var t=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function xo(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),mc(n)}class Ce{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,i,o){try{const r=new URL(t);return i&&(r.port=i.toString()),xo(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(i).map((r,s)=>s===0?r.toLowerCase():Ce.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,i,o){return t.substring(t.indexOf(i)+2,t.lastIndexOf(o))}static Translit(t,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(c=>o[c]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(i,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,i){const o=t.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=Ce.Translit(o),a=Ce.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(t,i){return Ce.StringsEquals(t,i)}static SearchInFields(t,i){let o=!1;for(let r=0;r<i.length;r++)if(Ce.SearchIn(i[r],t)){o=!0;break}return o}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,i,o){const r=o??"highlight-text",s=new RegExp(Ce.GetVariants(i).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const i=Ce.Translit(t);return[t,Ce.Capitalize(t),t.toLowerCase(),t.toUpperCase(),i,Ce.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,i){const o=[2,0,1,1,1,2];return t.length+" "+i[t.length%100>4&&t.length%100<20?2:o[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Xt=class Xt{static BuildClass(t,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))t[o]instanceof Date?t[o]=new Date(r):t[o]=r;else if(r!=null&&!Array.isArray(r))if(t[o]&&t[o].constructor)t[o]=new t[o].constructor(r);else{const s=Reflect.getMetadata(o,t);s&&(t[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,t);r.length!==0&&!s&&(t[o]=r),s&&(t[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,i,o){Xt.RemoveFromClass(t,i,o)}static RemoveFromClassById(t,i,o){if(!t)return;const r=i.findIndex(s=>s.id===t);if(!(r<0))return Xt.RemoveFromClass(r,i,o),t}static RemoveFromClass(t,i,o){if(t<0)return;const r=i[t].id;r&&o&&o.push(r),i.splice(t,1)}static GetPropertyName(t){const i=new t;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(t,i){const o=t.constructor(i);return Xt.BuildClass(o),o.id=Ke.UUID(),o}static ExistsWithId(t,i){return t.some(o=>o.id===i)}static DeepMap(t){return i=>Array.isArray(i)?i.map(Xt.DeepMap(t)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Xt.DeepMap(t)(r)])):t(i)}static DeepTrim(t){return this.DeepMap(Ce.TrimText)(t)}};d(Xt,"GetClassConstructor",t=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=t,Reflect.defineMetadata(o,r,i)});let K=Xt,Yn=class Ol{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new Ol;return t.id=Ke.UUID(),t}};class Eo{static Setup(t="http://localhost",i="9000",o="api"){this.staticUrl=Ce.BuildSafeUrl(t,i,o),this.staticUrl=xo(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Eo,"staticUrl","");class Et{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);K.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Eo.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,i){const o=new Et;return o.id=i??Ke.UUID(),o.originalName=t.name,o.file=t.blob,o.fileSystemPath=Ke.UUID(),o}setFile(t){this.id||(this.id=Ke.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Ke.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,i){if(t.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const i=t.split(".");return i[i.length-1]}}class os{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);K.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=Ce.Capitalize(this.name),this.surname=Ce.Capitalize(this.surname),this.patronymic=Ce.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class on{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new on;return t.id=Ke.UUID(),t}}class Vi{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}class $i{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");K.BuildClass(this,t)}static Create(){const t=new $i;return t.id=Ke.UUID(),t}}class Bo{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}let hc=(Ut=class{},d(Ut,"Phone",on),d(Ut,"FileInfo",Et),d(Ut,"Website",Bo),d(Ut,"Email",Yn),d(Ut,"Human",os),d(Ut,"PostAddress",Vi),d(Ut,"UserAccount",$i),Ut);var Se=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Se||{});class Ti{constructor(t){d(this,"field","");d(this,"operator",Se.Eq);d(this,"value","");K.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,i){return new Ti({operator:i,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetween(){return this.operator===Se.Btw}isSet(){return this.operator===Se.In}}class No{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);K.BuildClass(this,t)}static Create(t){const i=new No;return i.model=t.GetClassName(),i}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Ti.Create(t,i);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(i=>i.eq(t))}}let rs=class Ll{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);K.BuildClass(this,t)}static Create(t){const i=new Ll;return i.model=t.GetClassName(),i}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Ti.Create(t,i);return this.wheres.push(r),r}removeWhere(t){const i=this.wheres.findIndex(o=>o.eq(t));i>-1&&this.wheres.splice(i,1)}addJoin(t){const i=this.findJoin({model:t.GetClassName()});if(i)return i;const o=No.Create(t);return this.joins.push(o),o}findJoin(t){return this.joins.find(i=>i.eq(t))}findWhere(t){return this.wheres.find(i=>i.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let i=t.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[t[i],t[o]]=[t[o],t[i]]}}static GenerateNumsRange(t,i,o=1){return Array.from({length:(i-t)/o+1},(r,s)=>t+s*o)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((i,o)=>i.order=o)}static Refill(t,i){t.splice(0,t.length),t.push(...i)}static Eq(t,i){return t.length===i.length&&(t==null?void 0:t.every((o,r)=>t[r]==i[r]))}static SwipeById(t,i,o){const r=t.findIndex(a=>i.id===a.id),s=t.findIndex(a=>o.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,i,o){if(i<0||i>=t.length||o<0||o>=t.length)return;const r=t[i];t[i]=t[o],t[o]=r}static MoveUp(t,i){t[i].order=i-1,t[i-1]&&(t[i-1].order=i),[t[i],t[i-1]]=[t[i-1],t[i]]}static MoveDown(t,i){t[i].order=i+1,t[i+1]&&(t[i+1].order=i),[t[i],t[i+1]]=[t[i+1],t[i]]}}var Ae=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Ae||{}),pc=Object.defineProperty,gc=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&pc(t,i,r),r};const ss=class Ci{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Se.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Ae.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");K.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ae.Join){const i=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Se.In?i&&Dt.Eq(this.set,t.set):i}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Ae.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Ae.String?this.value1===(t==null?void 0:t.value1):this.type===Ae.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Ae.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Ae.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Ae.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Ae.Number?`"number":${this.number}`:"",f=this.type===Ae.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Ae.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,i,o,r,s,a,c,l,u,f,h].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetweenFilter(){return this.operator===Se.Btw}isSetFilter(){return this.operator===Se.In}static Create(t,i,o){const r=new Ci;return r.model=t.GetClassName(),r.col=i??"",r.type=o,r.type===Ae.Number&&(r.value1="0"),r.type===Ae.String&&(r.value1=""),r.type===Ae.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(t,i,o,r,s,a,c,l){const u=new Ci;return u.id=jt(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,i,o,r,s,a,c){const l=new Ci;return l.model=t,l.joinTableModel=o,l.joinTablePk=r,l.joinTableFk=s,l.col=i,l.type=Ae.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,i){const o=new Ci;return o.id=jt(),o.model=Ce.ToCamelCase(t.GetClassName()),o.joinTableModel=Ce.ToCamelCase(i.GetClassName()),o.type=Ae.Join,o}addToSet(...t){t.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...t){t.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,i){if(!t&&!i){this.dropDates();return}if(!i){this.setDate1(t),this.operator=Se.Eq;return}this.setDate2(i),this.operator=Se.Btw}};gc([K.GetClassConstructor(String)],ss.prototype,"set");let Vo=ss;class yc{constructor(){d(this,"operation",Se.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,i,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Mi{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new yc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");K.BuildClass(this,t)}setLoadMore(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,i,o,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,K.BuildClass(this)}}var ft=(n=>(n.Asc="asc",n.Desc="desc",n))(ft||{});class Pi{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);K.BuildClass(this,t)}static Create(t,i,o=ft.Asc,r,s){const a=new Pi;return a.model=t.GetClassName(),a.col=i??"",a.order=o??ft.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ft.Asc}isDesc(){return this.order===ft.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[t,i,o].toString()}async fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("s=")+2,t.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ft.Asc}desc(){this.order=ft.Desc}}class Ii{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,i){const o=new Ii;return o.model=t.GetClassName(),o.cols=i,o}}var wc=Object.defineProperty,Xn=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&wc(t,i,r),r};const Vn=(ot=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Mi);d(this,"t",new Ii);K.BuildClass(this,t)}static Get(){return this.instance||(this.instance=e.reactive(new ot)),this.instance}createFrom(t){const i=new ot(JSON.parse(t));this.f=i.f}clearForHTTP(){const t=new ot(this);return t.f=this.f.map(i=>ot.EmptyEntiries(i)),t.f2=this.f2.map(i=>ot.EmptyEntiries(i)),t.s=this.s.map(i=>ot.EmptyEntiries(i)),t.p=ot.EmptyEntiries(this.p),t.t=ot.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const o=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(t){return this.f.find(i=>t.id===i.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,i){this.removeF(i),t&&this.setF(t)}removeF(t){const i=this.f.findIndex(o=>o.eq(t));K.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new Mi}resetF(){this.f=[]}},d(ot,"instance"),ot);Xn([K.GetClassConstructor(Vo)],Vn.prototype,"f"),Xn([K.GetClassConstructor(rs)],Vn.prototype,"f2"),Xn([K.GetClassConstructor(Pi)],Vn.prototype,"s"),Xn([K.GetClassConstructor(Mi)],Vn.prototype,"p"),Xn([K.GetClassConstructor(Ii)],Vn.prototype,"t");let Ft=Vn,bc=(jn=class{},d(jn,"SortModel",Pi),d(jn,"FilterModel",Vo),d(jn,"FilterModelV2",rs),d(jn,"FTSP",Ft),jn);function as(n,t){return function(){return n.apply(t,arguments)}}const{toString:Cc}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Zn,toStringTag:ls}=Symbol,Ri=(({hasOwnProperty:n})=>(t,i)=>n.call(t,i))(Object.prototype),Jn=(n,t)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Ri(i,t))return!0;i=$n(i)}return!1},Sc=(n,t)=>n!=null&&Jn(n,t)?n[t]:void 0,$o=(n=>t=>{const i=Cc.call(t);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),wt=n=>(n=n.toLowerCase(),t=>$o(t)===n),Ai=n=>t=>typeof t===n,{isArray:rn}=Array,Tn=Ai("undefined");function Mn(n){return n!==null&&!Tn(n)&&n.constructor!==null&&!Tn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cs=wt("ArrayBuffer");function kc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&cs(n.buffer),t}const xc=Ai("string"),tt=Ai("function"),ds=Ai("number"),Pn=n=>n!==null&&typeof n=="object",Ec=n=>n===!0||n===!1,zi=n=>{if(!Pn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Jn(n,ls)&&!Jn(n,Zn)},Bc=n=>{if(!Pn(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Nc=wt("Date"),Vc=wt("File"),$c=n=>!!(n&&typeof n.uri<"u"),Tc=n=>n&&typeof n.getParts<"u",Mc=wt("Blob"),Pc=wt("FileList"),Ic=n=>Pn(n)&&tt(n.pipe);function Rc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Rc(),fs=typeof us.FormData<"u"?us.FormData:void 0,Ac=n=>{if(!n)return!1;if(fs&&n instanceof fs)return!0;const t=$n(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const i=$o(n);return i==="formdata"||i==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},zc=wt("URLSearchParams"),[Dc,Fc,Oc,Lc]=["ReadableStream","Request","Response","Headers"].map(wt),_c=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kn(n,t,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),rn(n))for(o=0,r=n.length;o<r;o++)t.call(null,n[o],o,n);else{if(Mn(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(o=0;o<a;o++)c=s[o],t.call(null,n[c],c,n)}}function ms(n,t){if(Mn(n))return null;t=t.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],t===r.toLowerCase())return r;return null}const sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=n=>!Tn(n)&&n!==sn;function To(...n){const{caseless:t,skipUndefined:i}=hs(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&ms(o,a)||a,l=Ri(o,c)?o[c]:void 0;zi(l)&&zi(s)?o[c]=To(l,s):zi(s)?o[c]=To({},s):rn(s)?o[c]=s.slice():(!i||!Tn(s))&&(o[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(Kn(c,r),typeof c!="object"||rn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];Jc.call(c,f)&&r(c[f],f)}}return o}const Hc=(n,t,i,{allOwnKeys:o}={})=>(Kn(t,(r,s)=>{i&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:as(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),Uc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),vc=(n,t,i,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),i&&Object.assign(n.prototype,i)},qc=(n,t,i,o)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=i!==!1&&$n(n)}while(n&&(!i||i(n,t))&&n!==Object.prototype);return t},jc=(n,t,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=t.length;const o=n.indexOf(t,i);return o!==-1&&o===i},Wc=n=>{if(!n)return null;if(rn(n))return n;let t=n.length;if(!ds(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=n[t];return i},Gc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),Qc=(n,t)=>{const o=(n&&n[Zn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},Yc=(n,t)=>{let i;const o=[];for(;(i=n.exec(t))!==null;)o.push(i);return o},Xc=wt("HTMLFormElement"),Zc=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:Jc}=Object.prototype,Kc=wt("RegExp"),ps=(n,t)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Kn(i,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},ed=n=>{ps(n,(t,i)=>{if(tt(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(tt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},td=(n,t)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return rn(n)?o(n):o(String(n).split(t)),i},nd=()=>{},id=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function od(n){return!!(n&&tt(n.append)&&n[ls]==="FormData"&&n[Zn])}const rd=n=>{const t=new WeakSet,i=o=>{if(Pn(o)){if(t.has(o))return;if(Mn(o))return o;if(!("toJSON"in o)){t.add(o);const r=rn(o)?[]:{};return Kn(o,(s,a)=>{const c=i(s);!Tn(c)&&(r[a]=c)}),t.delete(o),r}}return o};return i(n)},sd=wt("AsyncFunction"),ad=n=>n&&(Pn(n)||tt(n))&&tt(n.then)&&tt(n.catch),gs=((n,t)=>n?setImmediate:t?((i,o)=>(sn.addEventListener("message",({source:r,data:s})=>{r===sn&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),sn.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",tt(sn.postMessage)),ld=typeof queueMicrotask<"u"?queueMicrotask.bind(sn):typeof process<"u"&&process.nextTick||gs,ys=n=>n!=null&&tt(n[Zn]),k={isArray:rn,isArrayBuffer:cs,isBuffer:Mn,isFormData:Ac,isArrayBufferView:kc,isString:xc,isNumber:ds,isBoolean:Ec,isObject:Pn,isPlainObject:zi,isEmptyObject:Bc,isReadableStream:Dc,isRequest:Fc,isResponse:Oc,isHeaders:Lc,isUndefined:Tn,isDate:Nc,isFile:Vc,isReactNativeBlob:$c,isReactNative:Tc,isBlob:Mc,isRegExp:Kc,isFunction:tt,isStream:Ic,isURLSearchParams:zc,isTypedArray:Gc,isFileList:Pc,forEach:Kn,merge:To,extend:Hc,trim:_c,stripBOM:Uc,inherits:vc,toFlatObject:qc,kindOf:$o,kindOfTest:wt,endsWith:jc,toArray:Wc,forEachEntry:Qc,matchAll:Yc,isHTMLForm:Xc,hasOwnProperty:Ri,hasOwnProp:Ri,hasOwnInPrototypeChain:Jn,getSafeProp:Sc,reduceDescriptors:ps,freezeMethods:ed,toObjectSet:td,toCamelCase:Zc,noop:nd,toFiniteNumber:id,findKey:ms,global:sn,isContextDefined:hs,isSpecCompliantForm:od,toJSONObject:rd,isAsyncFn:sd,isThenable:ad,setImmediate:gs,asap:ld,isIterable:ys,isSafeIterable:n=>n!=null&&Jn(n,Zn)&&ys(n)},cd=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dd=n=>{const t={};let i,o,r;return n&&n.split(`
15
- `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||t[i]&&cd[i])&&(i==="set-cookie"?t[i]?t[i].push(o):t[i]=[o]:t[i]=t[i]?t[i]+", "+o:o)}),t};function ud(n){let t=0,i=n.length;for(;t<i;){const o=n.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;i>t;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return t===0&&i===n.length?n:n.slice(t,i)}const fd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),md=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Mo(n,t){return k.isArray(n)?n.map(i=>Mo(i,t)):ud(String(n).replace(t,""))}const hd=n=>Mo(n,fd),pd=n=>Mo(n,md);function ws(n){const t=Object.create(null);return k.forEach(n.toJSON(),(i,o)=>{t[o]=pd(i)}),t}const bs=Symbol("internals");function ei(n){return n&&String(n).trim().toLowerCase()}function Di(n){return n===!1||n==null?n:k.isArray(n)?n.map(Di):hd(String(n))}function gd(n){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)t[o[1]]=o[2];return t}const yd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Po(n,t,i,o,r){if(k.isFunction(o))return o.call(this,t,i);if(r&&(t=i),!!k.isString(t)){if(k.isString(o))return t.indexOf(o)!==-1;if(k.isRegExp(o))return o.test(t)}}function wd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,o)=>i.toUpperCase()+o)}function bd(n,t){const i=k.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}let Ge=class{constructor(t){t&&this.set(t)}set(t,i,o){const r=this;function s(c,l,u){const f=ei(l);if(!f)return;const h=k.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||l]=Di(c))}const a=(c,l)=>k.forEach(c,(u,f)=>s(u,f,l));if(k.isPlainObject(t)||t instanceof this.constructor)a(t,i);else if(k.isString(t)&&(t=t.trim())&&!yd(t))a(dd(t),i);else if(k.isObject(t)&&k.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!k.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],k.hasOwnProp(c,u)?(l=c[u],c[u]=k.isArray(l)?[...l,f[1]]:[l,f[1]]):c[u]=f[1]}a(c,i)}else t!=null&&s(i,t,o);return this}get(t,i){if(t=ei(t),t){const o=k.findKey(this,t);if(o){const r=this[o];if(!i)return r;if(i===!0)return gd(r);if(k.isFunction(i))return i.call(this,r,o);if(k.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=ei(t),t){const o=k.findKey(this,t);return!!(o&&this[o]!==void 0&&(!i||Po(this,this[o],o,i)))}return!1}delete(t,i){const o=this;let r=!1;function s(a){if(a=ei(a),a){const c=k.findKey(o,a);c&&(!i||Po(o,o[c],c,i))&&(delete o[c],r=!0)}}return k.isArray(t)?t.forEach(s):s(t),r}clear(t){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!t||Po(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const i=this,o={};return k.forEach(this,(r,s)=>{const a=k.findKey(o,s);if(a){i[a]=Di(r),delete i[s];return}const c=t?wd(s):String(s).trim();c!==s&&delete i[s],i[c]=Di(r),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return k.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=t&&k.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const o=new this(t);return i.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=ei(a);o[c]||(bd(r,a),o[c]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}};Ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(Ge.prototype,({value:n},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[i]=o}}}),k.freezeMethods(Ge);const Cd="[REDACTED ****]";function Sd(n){if(k.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kd(n,t){const i=new Set(t.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||k.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof Ge&&(s=s.toJSON()),o.push(s);let a;if(k.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);k.isUndefined(u)||(a[l]=u)});else{if(!k.isPlainObject(s)&&Sd(s))return o.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=i.has(c.toLowerCase())?Cd:r(l);k.isUndefined(u)||(a[c]=u)}}return o.pop(),a};return r(n)}let _=class _l extends Error{static from(t,i,o,r,s,a){const c=new _l(t.message,i||t.code,o,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,i,o,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,i=t&&k.hasOwnProp(t,"redact")?t.redact:void 0,o=k.isArray(i)&&i.length>0?kd(t,i):k.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xd=null,Cs=100;function Io(n){return k.isPlainObject(n)||k.isArray(n)}function Ss(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function Ro(n,t,i){return n?n.concat(t).map(function(r,s){return r=Ss(r),!i&&s?"["+r+"]":r}).join(i?".":""):t}function Ed(n){return k.isArray(n)&&!n.some(Io)}const Bd=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function Fi(n,t,i){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,i=k.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,C){return!k.isUndefined(C[P])});const o=i.metaTokens,r=i.visitor||b,s=i.dots,a=i.indexes,c=i.Blob||typeof Blob<"u"&&Blob,l=i.maxDepth===void 0?Cs:i.maxDepth,u=c&&k.isSpecCompliantForm(t),f=[];if(!k.isFunction(r))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(k.isDate(S))return S.toISOString();if(k.isBoolean(S))return S.toString();if(!u&&k.isBlob(S))throw new _("Blob is not supported. Use a Buffer instead.");if(k.isArrayBuffer(S)||k.isTypedArray(S)){if(u&&typeof c=="function")return new c([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return S}function p(S){if(S>l)throw new _("Object is too deeply nested ("+S+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,P){if(l===1/0)return JSON.stringify(S);const C=[];return JSON.stringify(S,function(M,A){if(!k.isObject(A))return A;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(A),p(P+C.length-1),A})}function b(S,P,C){let $=S;if(k.isReactNative(t)&&k.isReactNativeBlob(S))return t.append(Ro(C,P,s),h(S)),!1;if(S&&!C&&typeof S=="object"){if(k.endsWith(P,"{}"))P=o?P:P.slice(0,-2),S=y(S,1);else if(k.isArray(S)&&Ed(S)||(k.isFileList(S)||k.endsWith(P,"[]"))&&($=k.toArray(S)))return P=Ss(P),$.forEach(function(A,G){!(k.isUndefined(A)||A===null)&&t.append(a===!0?Ro([P],G,s):a===null?P:P+"[]",h(A))}),!1}return Io(S)?!0:(t.append(Ro(C,P,s),h(S)),!1)}const N=Object.assign(Bd,{defaultVisitor:b,convertValue:h,isVisitable:Io});function E(S,P,C=0){if(!k.isUndefined(S)){if(p(C),f.indexOf(S)!==-1)throw new Error("Circular reference detected in "+P.join("."));f.push(S),k.forEach(S,function(M,A){(!(k.isUndefined(M)||M===null)&&r.call(t,M,k.isString(A)?A.trim():A,P,N))===!0&&E(M,P?P.concat(A):[A],C+1)}),f.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return E(n),t}function ks(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return t[o]})}function Ao(n,t){this._pairs=[],n&&Fi(n,this,t)}const xs=Ao.prototype;xs.append=function(t,i){this._pairs.push([t,i])},xs.toString=function(t){const i=t?o=>t.call(this,o,ks):ks;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function Nd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Es(n,t,i){if(!t)return n;n=n||"";const o=k.isFunction(i)?{serialize:i}:i,r=k.getSafeProp(o,"encode")||Nd,s=k.getSafeProp(o,"serialize");let a;if(s?a=s(t,o):a=k.isURLSearchParams(t)?t.toString():new Ao(t,o).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Bs{constructor(){this.handlers=[]}use(t,i,o){return this.handlers.push({fulfilled:t,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(o){o!==null&&t(o)})}}const zo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Vd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ao,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Do=typeof window<"u"&&typeof document<"u",Fo=typeof navigator=="object"&&navigator||void 0,$d=Do&&(!Fo||["ReactNative","NativeScript","NS"].indexOf(Fo.product)<0),Td=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Md=Do&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Do,hasStandardBrowserEnv:$d,hasStandardBrowserWebWorkerEnv:Td,navigator:Fo,origin:Md},Symbol.toStringTag,{value:"Module"})),...Vd};function Pd(n,t){return Fi(n,new Ue.classes.URLSearchParams,{visitor:function(i,o,r,s){return Ue.isNode&&k.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Cs;function Vs(n){if(n>Ns)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Id(n){const t=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)Vs(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Rd(n){const t={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],t[s]=n[s];return t}function $s(n){function t(i,o,r,s){Vs(s);let a=i[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=i.length;return a=!a&&k.isArray(r)?r.length:a,l?(k.hasOwnProp(r,a)?r[a]=k.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!c):((!k.hasOwnProp(r,a)||!k.isObject(r[a]))&&(r[a]=[]),t(i,o,r[a],s)&&k.isArray(r[a])&&(r[a]=Rd(r[a])),!c)}if(k.isFormData(n)&&k.isFunction(n.entries)){const i={};return k.forEachEntry(n,(o,r)=>{t(Id(o),r,i,0)}),i}return null}const In=(n,t)=>n!=null&&k.hasOwnProp(n,t)?n[t]:void 0;function Ad(n,t,i){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const ti={transitional:zo,adapter:["xhr","http","fetch"],transformRequest:[function(t,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=k.isObject(t);if(s&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return r?JSON.stringify($s(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=In(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Pd(t,l).toString();if((c=k.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return Fi(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(i.setContentType("application/json",!1),Ad(t)):t}],transformResponse:[function(t){const i=In(this,"transitional")||ti.transitional,o=i&&i.forcedJSONParsing,r=In(this,"responseType"),s=r==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(o&&!r||s)){const c=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(t,In(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,In(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch","query"],n=>{ti.headers[n]={}});function Oo(n,t){const i=this||ti,o=t||i,r=Ge.from(o.headers);let s=o.data;return k.forEach(n,function(c){s=c.call(i,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ts(n){return!!(n&&n.__CANCEL__)}let ni=class extends _{constructor(t,i,o){super(t??"canceled",_.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):t(new _("Request failed with status code "+i.status,i.status>=400&&i.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,i.config,i.request,i))}function zd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Dd(n,t){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=o[s];a||(a=u),i[r]=l,o[r]=u;let h=s,p=0;for(;h!==r;)p+=i[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const y=f&&u-f;return y?Math.round(p*1e3/y):void 0}}function Fd(n,t){let i=0,o=1e3/t,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-i;h>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-h)))},()=>r&&a(r)]}const Oi=(n,t,i=3)=>{let o=0;const r=Dd(50,250);return Fd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-o),f=r(u);o=Math.max(o,l);const h={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(h)},i)},Ps=(n,t)=>{const i=n!=null;return[o=>t[0]({lengthComputable:i,total:n,loaded:o}),t[1]]},Is=n=>(...t)=>k.asap(()=>n(...t)),Od=Ue.hasStandardBrowserEnv?((n,t)=>i=>(i=new URL(i,Ue.origin),n.protocol===i.protocol&&n.host===i.host&&(t||n.port===i.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Ld=Ue.hasStandardBrowserEnv?{write(n,t,i,o,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];k.isNumber(i)&&c.push(`expires=${new Date(i).toUTCString()}`),k.isString(o)&&c.push(`path=${o}`),k.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),k.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let i=0;i<t.length;i++){const o=t[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _d(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Hd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Ud=/^https?:(?!\/\/)/i,vd=/[\t\n\r]/g;function qd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function jd(n){return qd(n).replace(vd,"")}function Rs(n,t){if(typeof n=="string"&&Ud.test(jd(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function As(n,t,i,o){Rs(t,o);let r=!_d(t);return n&&(r||i===!1)?(Rs(n,o),Hd(n,t)):t}const zs=n=>n instanceof Ge?{...n}:n;function an(n,t){n=n||{},t=t||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,h,p,y){return k.isPlainObject(f)&&k.isPlainObject(h)?k.merge.call({caseless:y},f,h):k.isPlainObject(h)?k.merge({},h):k.isArray(h)?h.slice():h}function r(f,h,p,y){if(k.isUndefined(h)){if(!k.isUndefined(f))return o(void 0,f,p,y)}else return o(f,h,p,y)}function s(f,h){if(!k.isUndefined(h))return o(void 0,h)}function a(f,h){if(k.isUndefined(h)){if(!k.isUndefined(f))return o(void 0,f)}else return o(void 0,h)}function c(f){const h=k.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!k.isUndefined(h))if(k.isPlainObject(h)){if(k.hasOwnProp(h,f))return h[f]}else return;const p=k.hasOwnProp(n,"transitional")?n.transitional:void 0;if(k.isPlainObject(p)&&k.hasOwnProp(p,f))return p[f]}function l(f,h,p){if(k.hasOwnProp(t,p))return o(f,h);if(k.hasOwnProp(n,p))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(f,h,p)=>r(zs(f),zs(h),p,!0)};return k.forEach(Object.keys({...n,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const p=k.hasOwnProp(u,h)?u[h]:r,y=k.hasOwnProp(n,h)?n[h]:void 0,b=k.hasOwnProp(t,h)?t[h]:void 0,N=p(y,b,h);k.isUndefined(N)&&p!==l||(i[h]=N)}),k.hasOwnProp(t,"validateStatus")&&k.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(k.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Wd=["content-type","content-length"];function Gd(n,t,i){if(i!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,r])=>{Wd.includes(o.toLowerCase())&&n.set(o,r)})}const Qd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16)));function Ds(n){const t=an({},n),i=p=>k.hasOwnProp(t,p)?t[p]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let c=i("headers");const l=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),h=i("url");if(t.headers=c=Ge.from(c),t.url=Es(As(u,h,f,t),i("params"),i("paramsSerializer")),l){const p=k.getSafeProp(l,"username")||"",y=k.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(y?Qd(y):"")))}catch(b){throw _.from(b,_.ERR_BAD_OPTION_VALUE,n)}}if(k.isFormData(o)&&(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv||k.isReactNative(o)?c.setContentType(void 0):k.isFunction(o.getHeaders)&&Gd(c,o.getHeaders(),i("formDataHeaderPolicy"))),Ue.hasStandardBrowserEnv&&(k.isFunction(r)&&(r=r(t)),r===!0||r==null&&Od(t.url))){const y=s&&a&&Ld.read(a);y&&c.set(s,y)}return t}const Yd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=Ds(n);let s=r.data;const a=Ge.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,h,p,y,b;function N(){y&&y(),b&&b(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function S(){if(!E)return;const C=Ge.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),M={data:!c||c==="text"||c==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:C,config:n,request:E};Ms(function(G){i(G),N()},function(G){o(G),N()},M),E=null}"onloadend"in E?E.onloadend=S:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(S)},E.onabort=function(){E&&(o(new _("Request aborted",_.ECONNABORTED,n,E)),N(),E=null)},E.onerror=function($){const M=$&&$.message?$.message:"Network Error",A=new _(M,_.ERR_NETWORK,n,E);A.event=$||null,o(A),N(),E=null},E.ontimeout=function(){let $=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||zo;r.timeoutErrorMessage&&($=r.timeoutErrorMessage),o(new _($,M.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,E)),N(),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&k.forEach(ws(a),function($,M){E.setRequestHeader(M,$)}),k.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),c&&c!=="json"&&(E.responseType=r.responseType),u&&([p,b]=Oi(u,!0),E.addEventListener("progress",p)),l&&E.upload&&([h,y]=Oi(l),E.upload.addEventListener("progress",h),E.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(f=C=>{E&&(o(!C||C.type?new ni(null,n,E):C),E.abort(),N(),E=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const P=zd(r.url);if(P&&!Ue.protocols.includes(P)){o(new _("Unsupported protocol "+P+":",_.ERR_BAD_REQUEST,n)),N();return}E.send(s||null)})},Xd=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const i=new AbortController;let o=!1;const r=function(l){if(!o){o=!0,a();const u=l instanceof Error?l:this.reason;i.abort(u instanceof _?u:new ni(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=i;return c.unsubscribe=()=>k.asap(a),c},Zd=function*(n,t){let i=n.byteLength;if(i<t){yield n;return}let o=0,r;for(;o<i;)r=o+t,yield n.slice(o,r),o=r},Jd=async function*(n,t){for await(const i of Kd(n))yield*Zd(i,t)},Kd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:i,value:o}=await t.read();if(i)break;yield o}}finally{await t.cancel()}},Fs=(n,t,i,o)=>{const r=Jd(n,t);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let h=f.byteLength;if(i){let p=s+=h;i(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},Li=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,eu=(n,t,i)=>t+2<i&&Li(n.charCodeAt(t+1))&&Li(n.charCodeAt(t+2));function tu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const i=n.slice(5,t),o=n.slice(t+1);if(/;base64/i.test(i)){let a=o.length;const c=o.length;for(let y=0;y<c;y++)if(o.charCodeAt(y)===37&&y+2<c){const b=o.charCodeAt(y+1),N=o.charCodeAt(y+2);Li(b)&&Li(N)&&(a-=2,y+=2)}let l=0,u=c-1;const f=y=>y>=2&&o.charCodeAt(y-2)===37&&o.charCodeAt(y-1)===51&&(o.charCodeAt(y)===68||o.charCodeAt(y)===100);u>=0&&(o.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=o.length;a<c;a++){const l=o.charCodeAt(a);if(l===37&&eu(o,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Lo="1.18.1",Os=64*1024,{isFunction:_i}=k,nu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16))),Ls=n=>{if(!k.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},_s=(n,...t)=>{try{return!!n(...t)}catch{return!1}},iu=n=>{const t=n.indexOf("://");let i=n;return t!==-1&&(i=i.slice(t+3)),i.includes("@")||i.includes(":")},ou=n=>{const t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:i,TextEncoder:o}=t;n=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?_i(r):typeof fetch=="function",l=_i(s),u=_i(a);if(!c)return!1;const f=c&&_i(i),h=c&&(typeof o=="function"?(S=>P=>S.encode(P))(new o):async S=>new Uint8Array(await new s(S).arrayBuffer())),p=l&&f&&_s(()=>{let S=!1;const P=new s(Ue.origin,{body:new i,method:"POST",get duplex(){return S=!0,"half"}}),C=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),S&&!C}),y=u&&f&&_s(()=>k.isReadableStream(new a("").body)),b={stream:y&&(S=>S.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!b[S]&&(b[S]=(P,C)=>{let $=P&&P[S];if($)return $.call(P);throw new _(`Response type '${S}' is not supported`,_.ERR_NOT_SUPPORT,C)})});const N=async S=>{if(S==null)return 0;if(k.isBlob(S))return S.size;if(k.isSpecCompliantForm(S))return(await new s(Ue.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(k.isArrayBufferView(S)||k.isArrayBuffer(S))return S.byteLength;if(k.isURLSearchParams(S)&&(S=S+""),k.isString(S))return(await h(S)).byteLength},E=async(S,P)=>{const C=k.toFiniteNumber(S.getContentLength());return C??N(P)};return async S=>{let{url:P,method:C,data:$,signal:M,cancelToken:A,timeout:G,onDownloadProgress:de,onUploadProgress:$e,responseType:Ee,headers:De,withCredentials:Me="same-origin",fetchOptions:ge,maxContentLength:Be,maxBodyLength:Pt}=Ds(S);const It=k.isNumber(Be)&&Be>-1,Jt=k.isNumber(Pt)&&Pt>-1,bn=se=>k.hasOwnProp(S,se)?S[se]:void 0;let lt=r||fetch;Ee=Ee?(Ee+"").toLowerCase():"text";let je=Xd([M,A&&A.toAbortSignal()],G),be=null;const Q=je&&je.unsubscribe&&(()=>{je.unsubscribe()});let Ze,St=null;const ye=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,S,be);try{let se;const We=bn("auth");if(We){const ee=k.getSafeProp(We,"username")||"",Oe=k.getSafeProp(We,"password")||"";se={username:ee,password:Oe}}if(iu(P)){const ee=new URL(P,Ue.origin);if(!se&&(ee.username||ee.password)){const Oe=Ls(ee.username),st=Ls(ee.password);se={username:Oe,password:st}}(ee.username||ee.password)&&(ee.username="",ee.password="",P=ee.href)}if(se&&(De.delete("authorization"),De.set("Authorization","Basic "+btoa(nu((se.username||"")+":"+(se.password||""))))),It&&typeof P=="string"&&P.startsWith("data:")&&tu(P)>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,S,be);if(Jt&&C!=="get"&&C!=="head"){const ee=await N($);if(typeof ee=="number"&&isFinite(ee)&&(Ze=ee,ee>Pt))throw ye()}const vt=Jt&&(k.isReadableStream($)||k.isStream($)),ct=(ee,Oe,st)=>Fs(ee,Os,gt=>{if(Jt&&gt>Pt)throw St=ye();Oe&&Oe(gt)},st);if(p&&C!=="get"&&C!=="head"&&($e||vt)){if(Ze=Ze??await E(De,$),Ze!==0||vt){let ee=new s(P,{method:"POST",body:$,duplex:"half"}),Oe;if(k.isFormData($)&&(Oe=ee.headers.get("content-type"))&&De.setContentType(Oe),ee.body){const[st,gt]=$e&&Ps(Ze,Oi(Is($e)))||[];$=ct(ee.body,st,gt)}}}else if(vt&&!l&&f&&C!=="get"&&C!=="head")$=ct($);else if(vt&&l&&!p&&C!=="get"&&C!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,S,be);k.isString(Me)||(Me=Me?"include":"omit");const rt=l&&"credentials"in s.prototype;if(k.isFormData($)){const ee=De.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&De.delete("content-type")}De.set("User-Agent","axios/"+Lo,!1);const Kt={...ge,signal:je,method:C.toUpperCase(),headers:ws(De.normalize()),body:$,duplex:"half",credentials:rt?Me:void 0};be=l&&new s(P,Kt);let Fe=await(l?lt(be,ge):lt(P,Kt));const Rt=Ge.from(Fe.headers);if(It){const ee=k.toFiniteNumber(Rt.getContentLength());if(ee!=null&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,S,be)}const Cn=y&&(Ee==="stream"||Ee==="response");if(y&&Fe.body&&(de||It||Cn&&Q)){const ee={};["status","statusText","headers"].forEach(dt=>{ee[dt]=Fe[dt]});const Oe=k.toFiniteNumber(Rt.getContentLength()),[st,gt]=de&&Ps(Oe,Oi(Is(de),!0))||[];let en=0;const Sn=dt=>{if(It&&(en=dt,en>Be))throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,S,be);st&&st(dt)};Fe=new a(Fs(Fe.body,Os,Sn,()=>{gt&&gt(),Q&&Q()}),ee)}Ee=Ee||"text";let ue=await b[k.findKey(b,Ee)||"text"](Fe,S);if(It&&!y&&!Cn){let ee;if(ue!=null&&(typeof ue.byteLength=="number"?ee=ue.byteLength:typeof ue.size=="number"?ee=ue.size:typeof ue=="string"&&(ee=typeof o=="function"?new o().encode(ue).byteLength:ue.length)),typeof ee=="number"&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,S,be)}return!Cn&&Q&&Q(),await new Promise((ee,Oe)=>{Ms(ee,Oe,{data:ue,headers:Ge.from(Fe.headers),status:Fe.status,statusText:Fe.statusText,config:S,request:be})})}catch(se){if(Q&&Q(),je&&je.aborted&&je.reason instanceof _){const We=je.reason;throw We.config=S,be&&(We.request=be),se!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),We}if(St)throw be&&!St.request&&(St.request=be),St;if(se instanceof _)throw be&&!se.request&&(se.request=be),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const We=new _("Network Error",_.ERR_NETWORK,S,be,se&&se.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),We}throw _.from(se,se&&se.code,S,be,se&&se.response)}}},ru=new Map,Hs=n=>{let t=n&&n.env||{};const{fetch:i,Request:o,Response:r}=t,s=[o,r,i];let a=s.length,c=a,l,u,f=ru;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:ou(t)),f=u;return u};Hs();const _o={http:xd,xhr:Yd,fetch:{get:Hs}};k.forEach(_o,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Us=n=>`- ${n}`,su=n=>k.isFunction(n)||n===null||n===!1;function au(n,t){n=k.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let c;if(r=o,!su(o)&&(r=_o[(c=String(o)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(k.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=i?a.length>1?`since :
14
+ ***************************************************************************** */var os;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof ns=="object"?ns:typeof self=="object"?self:typeof this=="object"?this:c(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(l,u){return function(f,h){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:h}),u&&u(f,h)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(t,o){var i=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return bo(Object.create(null))}:l?function(){return bo({__proto__:null})}:function(){return bo({})},has:u?function(B,V){return i.call(B,V)}:function(B,V){return V in B},get:u?function(B,V){return i.call(B,V)?B[V]:void 0}:function(B,V){return B[V]}},h=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Hr(),k=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wn(),C=typeof WeakMap=="function"?WeakMap:Ur(),N=r?Symbol.for("@reflect-metadata:registry"):void 0,E=fi(),y=mi(E);function M(B,V,I,O){if(Q(I)){if(!Kt(B))throw new TypeError;if(!Rt(V))throw new TypeError;return Me(B,V)}else{if(!Kt(B))throw new TypeError;if(!ye(V))throw new TypeError;if(!ye(O)&&!Q(O)&&!Ze(O))throw new TypeError;return Ze(O)&&(O=void 0),I=rt(I),ge(B,V,I,O)}}t("decorate",M);function b(B,V){function I(O,Y){if(!ye(O))throw new TypeError;if(!Q(Y)&&!Cn(Y))throw new TypeError;bn(B,V,O,Y)}return I}t("metadata",b);function $(B,V,I,O){if(!ye(I))throw new TypeError;return Q(O)||(O=rt(O)),bn(B,V,I,O)}t("defineMetadata",$);function P(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Be(B,V,I)}t("hasMetadata",P);function A(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Pt(B,V,I)}t("hasOwnMetadata",A);function G(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),It(B,V,I)}t("getMetadata",G);function de(B,V,I){if(!ye(V))throw new TypeError;return Q(I)||(I=rt(I)),Jt(B,V,I)}t("getOwnMetadata",de);function $e(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),lt(B,V)}t("getMetadataKeys",$e);function Ee(B,V){if(!ye(B))throw new TypeError;return Q(V)||(V=rt(V)),je(B,V)}t("getOwnMetadataKeys",Ee);function De(B,V,I){if(!ye(V))throw new TypeError;if(Q(I)||(I=rt(I)),!ye(V))throw new TypeError;Q(I)||(I=rt(I));var O=kn(V,I,!1);return Q(O)?!1:O.OrdinaryDeleteMetadata(B,V,I)}t("deleteMetadata",De);function Me(B,V){for(var I=B.length-1;I>=0;--I){var O=B[I],Y=O(V);if(!Q(Y)&&!Ze(Y)){if(!Rt(Y))throw new TypeError;V=Y}}return V}function ge(B,V,I,O){for(var Y=B.length-1;Y>=0;--Y){var Pe=B[Y],Ne=Pe(V,I,O);if(!Q(Ne)&&!Ze(Ne)){if(!ye(Ne))throw new TypeError;O=Ne}}return O}function Be(B,V,I){var O=Pt(B,V,I);if(O)return!0;var Y=Sn(V);return Ze(Y)?!1:Be(B,Y,I)}function Pt(B,V,I){var O=kn(V,I,!1);return Q(O)?!1:vt(O.OrdinaryHasOwnMetadata(B,V,I))}function It(B,V,I){var O=Pt(B,V,I);if(O)return Jt(B,V,I);var Y=Sn(V);if(!Ze(Y))return It(B,Y,I)}function Jt(B,V,I){var O=kn(V,I,!1);if(!Q(O))return O.OrdinaryGetOwnMetadata(B,V,I)}function bn(B,V,I,O){var Y=kn(I,O,!0);Y.OrdinaryDefineOwnMetadata(B,V,I,O)}function lt(B,V){var I=je(B,V),O=Sn(B);if(O===null)return I;var Y=lt(O,V);if(Y.length<=0)return I;if(I.length<=0)return Y;for(var Pe=new k,Ne=[],te=0,H=I;te<H.length;te++){var U=H[te],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}for(var q=0,ne=Y;q<ne.length;q++){var U=ne[q],v=Pe.has(U);v||(Pe.add(U),Ne.push(U))}return Ne}function je(B,V){var I=kn(B,V,!1);return I?I.OrdinaryOwnMetadataKeys(B,V):[]}function be(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function Q(B){return B===void 0}function Ze(B){return B===null}function St(B){return typeof B=="symbol"}function ye(B){return typeof B=="object"?B!==null:typeof B=="function"}function se(B,V){switch(be(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var I="string",O=ee(B,s);if(O!==void 0){var Y=O.call(B,I);if(ye(Y))throw new TypeError;return Y}return We(B)}function We(B,V){var I,O;{var Y=B.toString;if(Fe(Y)){var O=Y.call(B);if(!ye(O))return O}var I=B.valueOf;if(Fe(I)){var O=I.call(B);if(!ye(O))return O}}throw new TypeError}function vt(B){return!!B}function ct(B){return""+B}function rt(B){var V=se(B);return St(V)?V:ct(V)}function Kt(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Fe(B){return typeof B=="function"}function Rt(B){return typeof B=="function"}function Cn(B){switch(be(B)){case 3:return!0;case 4:return!0;default:return!1}}function ue(B,V){return B===V||B!==B&&V!==V}function ee(B,V){var I=B[V];if(I!=null){if(!Fe(I))throw new TypeError;return I}}function Oe(B){var V=ee(B,a);if(!Fe(V))throw new TypeError;var I=V.call(B);if(!ye(I))throw new TypeError;return I}function st(B){return B.value}function gt(B){var V=B.next();return V.done?!1:V}function en(B){var V=B.return;V&&V.call(B)}function Sn(B){var V=Object.getPrototypeOf(B);if(typeof B!="function"||B===h||V!==h)return V;var I=B.prototype,O=I&&Object.getPrototypeOf(I);if(O==null||O===Object.prototype)return V;var Y=O.constructor;return typeof Y!="function"||Y===B?V:Y}function dt(){var B;!Q(N)&&typeof o.Reflect<"u"&&!(N in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=_r(o.Reflect));var V,I,O,Y=new C,Pe={registerProvider:Ne,getProvider:H,setProvider:v};return Pe;function Ne(q){if(!Object.isExtensible(Pe))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case Q(V):V=q;break;case V===q:break;case Q(I):I=q;break;case I===q:break;default:O===void 0&&(O=new k),O.add(q);break}}function te(q,ne){if(!Q(V)){if(V.isProviderFor(q,ne))return V;if(!Q(I)){if(I.isProviderFor(q,ne))return V;if(!Q(O))for(var me=Oe(O);;){var we=gt(me);if(!we)return;var Je=st(we);if(Je.isProviderFor(q,ne))return en(me),Je}}}if(!Q(B)&&B.isProviderFor(q,ne))return B}function H(q,ne){var me=Y.get(q),we;return Q(me)||(we=me.get(ne)),Q(we)&&(we=te(q,ne),Q(we)||(Q(me)&&(me=new p,Y.set(q,me)),me.set(ne,we))),we}function U(q){if(Q(q))throw new TypeError;return V===q||I===q||!Q(O)&&O.has(q)}function v(q,ne,me){if(!U(me))throw new Error("Metadata provider not registered.");var we=H(q,ne);if(we!==me){if(!Q(we))return!1;var Je=Y.get(q);Q(Je)&&(Je=new p,Y.set(q,Je)),Je.set(ne,me)}return!0}}function fi(){var B;return!Q(N)&&ye(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[N]),Q(B)&&(B=dt()),!Q(N)&&ye(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,N,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function mi(B){var V=new C,I={isProviderFor:function(U,v){var q=V.get(U);return Q(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:Ne,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Pe,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return E.registerProvider(I),I;function O(U,v,q){var ne=V.get(U),me=!1;if(Q(ne)){if(!q)return;ne=new p,V.set(U,ne),me=!0}var we=ne.get(v);if(Q(we)){if(!q)return;if(we=new p,ne.set(v,we),!B.setProvider(U,v,I))throw ne.delete(v),me&&V.delete(U),new Error("Wrong provider for target.")}return we}function Y(U,v,q){var ne=O(v,q,!1);return Q(ne)?!1:vt(ne.has(U))}function Pe(U,v,q){var ne=O(v,q,!1);if(!Q(ne))return ne.get(U)}function Ne(U,v,q,ne){var me=O(q,ne,!0);me.set(U,v)}function te(U,v){var q=[],ne=O(U,v,!1);if(Q(ne))return q;for(var me=ne.keys(),we=Oe(me),Je=0;;){var hi=gt(we);if(!hi)return q.length=Je,q;var vr=st(hi);try{q[Je]=vr}catch(yt){try{en(we)}finally{throw yt}}Je++}}function H(U,v,q){var ne=O(v,q,!1);if(Q(ne)||!ne.delete(U))return!1;if(ne.size===0){var me=V.get(v);Q(me)||(me.delete(q),me.size===0&&V.delete(me))}return!0}}function _r(B){var V=B.defineMetadata,I=B.hasOwnMetadata,O=B.getOwnMetadata,Y=B.getOwnMetadataKeys,Pe=B.deleteMetadata,Ne=new C,te={isProviderFor:function(H,U){var v=Ne.get(H);return!Q(v)&&v.has(U)?!0:Y(H,U).length?(Q(v)&&(v=new k,Ne.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:V,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:O,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Pe};return te}function kn(B,V,I){var O=E.getProvider(B,V);if(!Q(O))return O;if(I){if(E.setProvider(B,V,y))return y;throw new Error("Illegal state.")}}function Hr(){var B={},V=[],I=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=V,this._values=V):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=V,this._values=V),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=V,this._values=V),{value:H,done:!0}},te}(),O=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,ue(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Y)},te.prototype.values=function(){return new I(this._keys,this._values,Pe)},te.prototype.entries=function(){return new I(this._keys,this._values,Ne)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!ue(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(ue(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return O;function Y(te,H){return te}function Pe(te,H){return H}function Ne(te,H){return[te,H]}}function Wn(){var B=function(){function V(){this._map=new p}return Object.defineProperty(V.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),V.prototype.has=function(I){return this._map.has(I)},V.prototype.add=function(I){return this._map.set(I,I),this},V.prototype.delete=function(I){return this._map.delete(I)},V.prototype.clear=function(){this._map.clear()},V.prototype.keys=function(){return this._map.keys()},V.prototype.values=function(){return this._map.keys()},V.prototype.entries=function(){return this._map.entries()},V.prototype["@@iterator"]=function(){return this.keys()},V.prototype[a]=function(){return this.keys()},V}();return B}function Ur(){var B=16,V=f.create(),I=O();return function(){function H(){this._key=O()}return H.prototype.has=function(U){var v=Y(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Y(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Y(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Y(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=O()},H}();function O(){var H;do H="@@WeakMap@@"+te();while(f.has(V,H));return V[H]=!0,H}function Y(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function Pe(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function Ne(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):Pe(U,H),U}return Pe(new Array(H),H)}function te(){var H=Ne(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function bo(B){return B.__=void 0,delete B.__,B}})})(os||(os={}));const He=[];for(let n=0;n<256;++n)He.push((n+256).toString(16).slice(1));function cc(n,t=0){return(He[n[t+0]]+He[n[t+1]]+He[n[t+2]]+He[n[t+3]]+"-"+He[n[t+4]]+He[n[t+5]]+"-"+He[n[t+6]]+He[n[t+7]]+"-"+He[n[t+8]]+He[n[t+9]]+"-"+He[n[t+10]]+He[n[t+11]]+He[n[t+12]]+He[n[t+13]]+He[n[t+14]]+He[n[t+15]]).toLowerCase()}const dc=new Uint8Array(16);function uc(){return crypto.getRandomValues(dc)}function jt(n,t,o){return crypto.randomUUID?crypto.randomUUID():fc(n)}function fc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??uc();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,cc(i)}class Ke{static UUID(){return jt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function mc(n){var t=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var r=n[i];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(i>0&&(r=r.replace(/^[\/]+/,"")),i<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function xi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),mc(n)}class Ce{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,o,i){try{const r=new URL(t);return o&&(r.port=o.toString()),xi(r.toString(),i)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const o=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(o).map((r,s)=>s===0?r.toLowerCase():Ce.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,o,i){return t.substring(t.indexOf(o)+2,t.lastIndexOf(i))}static Translit(t,o){const i={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return o&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(i).find(c=>i[c]===r);return a||""}const s=Object.keys(i).find(a=>i[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?i[r]:i[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(o,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,o){const i=t.toLowerCase().replaceAll(/\s/g,""),r=o.toLowerCase().replaceAll(/\s/g,""),s=Ce.Translit(i),a=Ce.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ce.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ce.SearchIn(o[r],t)){i=!0;break}return i}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,o,i){const r=i??"highlight-text",s=new RegExp(Ce.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ce.Translit(t);return[t,Ce.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ce.Capitalize(o),o.toLowerCase(),o.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,o){const i=[2,0,1,1,1,2];return t.length+" "+o[t.length%100>4&&t.length%100<20?2:i[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Xt=class Xt{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r))t[i]instanceof Date?t[i]=new Date(r):t[i]=r;else if(r!=null&&!Array.isArray(r))if(t[i]&&t[i].constructor)t[i]=new t[i].constructor(r);else{const s=Reflect.getMetadata(i,t);s&&(t[i]=new s[i](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(i,t);r.length!==0&&!s&&(t[i]=r),s&&(t[i]=r.map(a=>new s[i](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,o,i){Xt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Xt.RemoveFromClass(r,o,i),t}static RemoveFromClass(t,o,i){if(t<0)return;const r=o[t].id;r&&i&&i.push(r),o.splice(t,1)}static GetPropertyName(t){const o=new t;return new Proxy(o,{get(i,r){return r}})}static InitClassInstance(t,o){const i=t.constructor(o);return Xt.BuildClass(i),i.id=Ke.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Xt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Xt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ce.TrimText)(t)}};d(Xt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let K=Xt,Yn=class Ol{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new Ol;return t.id=Ke.UUID(),t}};class Ei{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ce.BuildSafeUrl(t,o,i),this.staticUrl=xi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Ei,"staticUrl","");class Et{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);K.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Ei.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new Et;return i.id=o??Ke.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Ke.UUID(),i}setFile(t){this.id||(this.id=Ke.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Ke.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,o){if(t.target){let i="";return o&&(i=`@/assets/img/${o}`),new URL(i,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:xn&&xn.tagName.toUpperCase()==="SCRIPT"&&xn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const o=t.split(".");return o[o.length-1]}}class is{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);K.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=Ce.Capitalize(this.name),this.surname=Ce.Capitalize(this.surname),this.patronymic=Ce.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class on{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new on;return t.id=Ke.UUID(),t}}class $o{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}class To{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");K.BuildClass(this,t)}static Create(){const t=new To;return t.id=Ke.UUID(),t}}class Bi{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}let hc=(Ut=class{},d(Ut,"Phone",on),d(Ut,"FileInfo",Et),d(Ut,"Website",Bi),d(Ut,"Email",Yn),d(Ut,"Human",is),d(Ut,"PostAddress",$o),d(Ut,"UserAccount",To),Ut);var Se=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Se||{});class Mo{constructor(t){d(this,"field","");d(this,"operator",Se.Eq);d(this,"value","");K.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Mo({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetween(){return this.operator===Se.Btw}isSet(){return this.operator===Se.In}}class Ni{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);K.BuildClass(this,t)}static Create(t){const o=new Ni;return o.model=t.GetClassName(),o}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Mo.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let rs=class Ll{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);K.BuildClass(this,t)}static Create(t){const o=new Ll;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Mo.Create(t,o);return this.wheres.push(r),r}removeWhere(t){const o=this.wheres.findIndex(i=>i.eq(t));o>-1&&this.wheres.splice(o,1)}addJoin(t){const o=this.findJoin({model:t.GetClassName()});if(o)return o;const i=Ni.Create(t);return this.joins.push(i),i}findJoin(t){return this.joins.find(o=>o.eq(t))}findWhere(t){return this.wheres.find(o=>o.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let o=t.length-1;o>0;o--){const i=Math.floor(Math.random()*(o+1));[t[o],t[i]]=[t[i],t[o]]}}static GenerateNumsRange(t,o,i=1){return Array.from({length:(o-t)/i+1},(r,s)=>t+s*i)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((o,i)=>o.order=i)}static Refill(t,o){t.splice(0,t.length),t.push(...o)}static Eq(t,o){return t.length===o.length&&(t==null?void 0:t.every((i,r)=>t[r]==o[r]))}static SwipeById(t,o,i){const r=t.findIndex(a=>o.id===a.id),s=t.findIndex(a=>i.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,o,i){if(o<0||o>=t.length||i<0||i>=t.length)return;const r=t[o];t[o]=t[i],t[i]=r}static MoveUp(t,o){t[o].order=o-1,t[o-1]&&(t[o-1].order=o),[t[o],t[o-1]]=[t[o-1],t[o]]}static MoveDown(t,o){t[o].order=o+1,t[o+1]&&(t[o+1].order=o),[t[o],t[o+1]]=[t[o+1],t[o]]}}var Ae=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Ae||{}),pc=Object.defineProperty,gc=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pc(t,o,r),r};const ss=class So{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Se.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Ae.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");K.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ae.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Se.In?o&&Dt.Eq(this.set,t.set):o}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Ae.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Ae.String?this.value1===(t==null?void 0:t.value1):this.type===Ae.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",o=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Ae.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Ae.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Ae.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Ae.Number?`"number":${this.number}`:"",f=this.type===Ae.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Ae.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,h].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetweenFilter(){return this.operator===Se.Btw}isSetFilter(){return this.operator===Se.In}static Create(t,o,i){const r=new So;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Ae.Number&&(r.value1="0"),r.type===Ae.String&&(r.value1=""),r.type===Ae.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new So;return u.id=jt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new So;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Ae.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new So;return i.id=jt(),i.model=Ce.ToCamelCase(t.GetClassName()),i.joinTableModel=Ce.ToCamelCase(o.GetClassName()),i.type=Ae.Join,i}addToSet(...t){t.forEach(o=>{if(this.set.indexOf(o)===-1){this.set.push(o);return}this.set=this.set.filter(i=>i!==o)})}pushToSet(...t){t.forEach(o=>{this.set.indexOf(o)===-1&&this.set.push(o)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,o){if(!t&&!o){this.dropDates();return}if(!o){this.setDate1(t),this.operator=Se.Eq;return}this.setDate2(o),this.operator=Se.Btw}};gc([K.GetClassConstructor(String)],ss.prototype,"set");let Vi=ss;class yc{constructor(){d(this,"operation",Se.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",o=this.column?`"column":"${this.column}"`:"",i=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=i?`"value":"${i}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,o,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Po{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new yc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");K.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=o,this.cursor.tableName=i,this.cursorMode=!0}setLoadMoreV2(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=o,this.cursor.model=i,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,o=`"limit":${this.limit}`,i=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,o,i,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.page=Number(i.get("offset")),this.rowsPerPage=Number(i.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,K.BuildClass(this)}}var ft=(n=>(n.Asc="asc",n.Desc="desc",n))(ft||{});class Io{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);K.BuildClass(this,t)}static Create(t,o,i=ft.Asc,r,s){const a=new Io;return a.model=t.GetClassName(),a.col=o??"",a.order=i??ft.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ft.Asc}isDesc(){return this.order===ft.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",i=this.order?`"order":"${this.order}"`:"";return[t,o,i].toString()}async fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("s=")+2,t.indexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.model=i.get("model")??"",this.col=i.get("col")??"",this.label=i.get("label")??"",this.default=!!i.get("default"),this.order=i.get("order")??""}asc(){this.order=ft.Asc}desc(){this.order=ft.Desc}}class Ro{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new Ro;return i.model=t.GetClassName(),i.cols=o,i}}var wc=Object.defineProperty,Xn=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&wc(t,o,r),r};const Vn=(it=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Po);d(this,"t",new Ro);K.BuildClass(this,t)}static Get(){return this.instance||(this.instance=e.reactive(new it)),this.instance}createFrom(t){const o=new it(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new it(this);return t.f=this.f.map(o=>it.EmptyEntiries(o)),t.f2=this.f2.map(o=>it.EmptyEntiries(o)),t.s=this.s.map(o=>it.EmptyEntiries(o)),t.p=it.EmptyEntiries(this.p),t.t=it.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const i=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(i)}findFilterModel(t){return this.f.find(o=>t.id===o.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,o){this.removeF(o),t&&this.setF(t)}removeF(t){const o=this.f.findIndex(i=>i.eq(t));K.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Po}resetF(){this.f=[]}},d(it,"instance"),it);Xn([K.GetClassConstructor(Vi)],Vn.prototype,"f"),Xn([K.GetClassConstructor(rs)],Vn.prototype,"f2"),Xn([K.GetClassConstructor(Io)],Vn.prototype,"s"),Xn([K.GetClassConstructor(Po)],Vn.prototype,"p"),Xn([K.GetClassConstructor(Ro)],Vn.prototype,"t");let Ft=Vn,bc=(jn=class{},d(jn,"SortModel",Io),d(jn,"FilterModel",Vi),d(jn,"FilterModelV2",rs),d(jn,"FTSP",Ft),jn);function as(n,t){return function(){return n.apply(t,arguments)}}const{toString:Cc}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Zn,toStringTag:ls}=Symbol,Ao=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),Jn=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Ao(o,t))return!0;o=$n(o)}return!1},Sc=(n,t)=>n!=null&&Jn(n,t)?n[t]:void 0,$i=(n=>t=>{const o=Cc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),wt=n=>(n=n.toLowerCase(),t=>$i(t)===n),zo=n=>t=>typeof t===n,{isArray:rn}=Array,Tn=zo("undefined");function Mn(n){return n!==null&&!Tn(n)&&n.constructor!==null&&!Tn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cs=wt("ArrayBuffer");function kc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&cs(n.buffer),t}const xc=zo("string"),tt=zo("function"),ds=zo("number"),Pn=n=>n!==null&&typeof n=="object",Ec=n=>n===!0||n===!1,Do=n=>{if(!Pn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Jn(n,ls)&&!Jn(n,Zn)},Bc=n=>{if(!Pn(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Nc=wt("Date"),Vc=wt("File"),$c=n=>!!(n&&typeof n.uri<"u"),Tc=n=>n&&typeof n.getParts<"u",Mc=wt("Blob"),Pc=wt("FileList"),Ic=n=>Pn(n)&&tt(n.pipe);function Rc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Rc(),fs=typeof us.FormData<"u"?us.FormData:void 0,Ac=n=>{if(!n)return!1;if(fs&&n instanceof fs)return!0;const t=$n(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const o=$i(n);return o==="formdata"||o==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},zc=wt("URLSearchParams"),[Dc,Fc,Oc,Lc]=["ReadableStream","Request","Response","Headers"].map(wt),_c=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kn(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),rn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Mn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(i=0;i<a;i++)c=s[i],t.call(null,n[c],c,n)}}function ms(n,t){if(Mn(n))return null;t=t.toLowerCase();const o=Object.keys(n);let i=o.length,r;for(;i-- >0;)if(r=o[i],t===r.toLowerCase())return r;return null}const sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=n=>!Tn(n)&&n!==sn;function Ti(...n){const{caseless:t,skipUndefined:o}=hs(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&ms(i,a)||a,l=Ao(i,c)?i[c]:void 0;Do(l)&&Do(s)?i[c]=Ti(l,s):Do(s)?i[c]=Ti({},s):rn(s)?i[c]=s.slice():(!o||!Tn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(Kn(c,r),typeof c!="object"||rn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];Jc.call(c,f)&&r(c[f],f)}}return i}const Hc=(n,t,o,{allOwnKeys:i}={})=>(Kn(t,(r,s)=>{o&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:as(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Uc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),vc=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},qc=(n,t,o,i)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!i||i(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=o!==!1&&$n(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},jc=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;const i=n.indexOf(t,o);return i!==-1&&i===o},Wc=n=>{if(!n)return null;if(rn(n))return n;let t=n.length;if(!ds(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},Gc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),Qc=(n,t)=>{const i=(n&&n[Zn]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},Yc=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},Xc=wt("HTMLFormElement"),Zc=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:Jc}=Object.prototype,Kc=wt("RegExp"),ps=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};Kn(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},ed=n=>{ps(n,(t,o)=>{if(tt(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(tt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},td=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return rn(n)?i(n):i(String(n).split(t)),o},nd=()=>{},od=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function id(n){return!!(n&&tt(n.append)&&n[ls]==="FormData"&&n[Zn])}const rd=n=>{const t=new WeakSet,o=i=>{if(Pn(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=rn(i)?[]:{};return Kn(i,(s,a)=>{const c=o(s);!Tn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},sd=wt("AsyncFunction"),ad=n=>n&&(Pn(n)||tt(n))&&tt(n.then)&&tt(n.catch),gs=((n,t)=>n?setImmediate:t?((o,i)=>(sn.addEventListener("message",({source:r,data:s})=>{r===sn&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),sn.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tt(sn.postMessage)),ld=typeof queueMicrotask<"u"?queueMicrotask.bind(sn):typeof process<"u"&&process.nextTick||gs,ys=n=>n!=null&&tt(n[Zn]),S={isArray:rn,isArrayBuffer:cs,isBuffer:Mn,isFormData:Ac,isArrayBufferView:kc,isString:xc,isNumber:ds,isBoolean:Ec,isObject:Pn,isPlainObject:Do,isEmptyObject:Bc,isReadableStream:Dc,isRequest:Fc,isResponse:Oc,isHeaders:Lc,isUndefined:Tn,isDate:Nc,isFile:Vc,isReactNativeBlob:$c,isReactNative:Tc,isBlob:Mc,isRegExp:Kc,isFunction:tt,isStream:Ic,isURLSearchParams:zc,isTypedArray:Gc,isFileList:Pc,forEach:Kn,merge:Ti,extend:Hc,trim:_c,stripBOM:Uc,inherits:vc,toFlatObject:qc,kindOf:$i,kindOfTest:wt,endsWith:jc,toArray:Wc,forEachEntry:Qc,matchAll:Yc,isHTMLForm:Xc,hasOwnProperty:Ao,hasOwnProp:Ao,hasOwnInPrototypeChain:Jn,getSafeProp:Sc,reduceDescriptors:ps,freezeMethods:ed,toObjectSet:td,toCamelCase:Zc,noop:nd,toFiniteNumber:od,findKey:ms,global:sn,isContextDefined:hs,isSpecCompliantForm:id,toJSONObject:rd,isAsyncFn:sd,isThenable:ad,setImmediate:gs,asap:ld,isIterable:ys,isSafeIterable:n=>n!=null&&Jn(n,Zn)&&ys(n)},cd=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dd=n=>{const t={};let o,i,r;return n&&n.split(`
15
+ `).forEach(function(a){r=a.indexOf(":"),o=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!o||t[o]&&cd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function ud(n){let t=0,o=n.length;for(;t<o;){const i=n.charCodeAt(t);if(i!==9&&i!==32)break;t+=1}for(;o>t;){const i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}const fd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),md=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Mi(n,t){return S.isArray(n)?n.map(o=>Mi(o,t)):ud(String(n).replace(t,""))}const hd=n=>Mi(n,fd),pd=n=>Mi(n,md);function ws(n){const t=Object.create(null);return S.forEach(n.toJSON(),(o,i)=>{t[i]=pd(o)}),t}const bs=Symbol("internals");function eo(n){return n&&String(n).trim().toLowerCase()}function Fo(n){return n===!1||n==null?n:S.isArray(n)?n.map(Fo):hd(String(n))}function gd(n){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}const yd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Pi(n,t,o,i,r){if(S.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!S.isString(t)){if(S.isString(i))return t.indexOf(i)!==-1;if(S.isRegExp(i))return i.test(t)}}function wd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function bd(n,t){const o=S.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(r,s,a){return this[i].call(this,t,r,s,a)},configurable:!0})})}let Ge=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,u){const f=eo(l);if(!f)return;const h=S.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||l]=Fo(c))}const a=(c,l)=>S.forEach(c,(u,f)=>s(u,f,l));if(S.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(S.isString(t)&&(t=t.trim())&&!yd(t))a(dd(t),o);else if(S.isObject(t)&&S.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!S.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],S.hasOwnProp(c,u)?(l=c[u],c[u]=S.isArray(l)?[...l,f[1]]:[l,f[1]]):c[u]=f[1]}a(c,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=eo(t),t){const i=S.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return gd(r);if(S.isFunction(o))return o.call(this,r,i);if(S.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=eo(t),t){const i=S.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Pi(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=eo(a),a){const c=S.findKey(i,a);c&&(!o||Pi(i,i[c],c,o))&&(delete i[c],r=!0)}}return S.isArray(t)?t.forEach(s):s(t),r}clear(t){const o=Object.keys(this);let i=o.length,r=!1;for(;i--;){const s=o[i];(!t||Pi(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return S.forEach(this,(r,s)=>{const a=S.findKey(i,s);if(a){o[a]=Fo(r),delete o[s];return}const c=t?wd(s):String(s).trim();c!==s&&delete o[s],o[c]=Fo(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return S.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&S.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const i=new this(t);return o.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=eo(a);i[c]||(bd(r,a),i[c]=!0)}return S.isArray(t)?t.forEach(s):s(t),this}};Ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),S.reduceDescriptors(Ge.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),S.freezeMethods(Ge);const Cd="[REDACTED ****]";function Sd(n){if(S.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(S.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kd(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||S.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof Ge&&(s=s.toJSON()),i.push(s);let a;if(S.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);S.isUndefined(u)||(a[l]=u)});else{if(!S.isPlainObject(s)&&Sd(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Cd:r(l);S.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class _l extends Error{static from(t,o,i,r,s,a){const c=new _l(t.message,o||t.code,i,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,o,i,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,o=t&&S.hasOwnProp(t,"redact")?t.redact:void 0,i=S.isArray(o)&&o.length>0?kd(t,o):S.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xd=null,Cs=100;function Ii(n){return S.isPlainObject(n)||S.isArray(n)}function Ss(n){return S.endsWith(n,"[]")?n.slice(0,-2):n}function Ri(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ss(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Ed(n){return S.isArray(n)&&!n.some(Ii)}const Bd=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function Oo(n,t,o){if(!S.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=S.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,b){return!S.isUndefined(b[M])});const i=o.metaTokens,r=o.visitor||C,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Cs:o.maxDepth,u=c&&S.isSpecCompliantForm(t),f=[];if(!S.isFunction(r))throw new TypeError("visitor must be a function");function h(y){if(y===null)return"";if(S.isDate(y))return y.toISOString();if(S.isBoolean(y))return y.toString();if(!u&&S.isBlob(y))throw new _("Blob is not supported. Use a Buffer instead.");if(S.isArrayBuffer(y)||S.isTypedArray(y)){if(u&&typeof c=="function")return new c([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return y}function p(y){if(y>l)throw new _("Object is too deeply nested ("+y+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function k(y,M){if(l===1/0)return JSON.stringify(y);const b=[];return JSON.stringify(y,function(P,A){if(!S.isObject(A))return A;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(A),p(M+b.length-1),A})}function C(y,M,b){let $=y;if(S.isReactNative(t)&&S.isReactNativeBlob(y))return t.append(Ri(b,M,s),h(y)),!1;if(y&&!b&&typeof y=="object"){if(S.endsWith(M,"{}"))M=i?M:M.slice(0,-2),y=k(y,1);else if(S.isArray(y)&&Ed(y)||(S.isFileList(y)||S.endsWith(M,"[]"))&&($=S.toArray(y)))return M=Ss(M),$.forEach(function(A,G){!(S.isUndefined(A)||A===null)&&t.append(a===!0?Ri([M],G,s):a===null?M:M+"[]",h(A))}),!1}return Ii(y)?!0:(t.append(Ri(b,M,s),h(y)),!1)}const N=Object.assign(Bd,{defaultVisitor:C,convertValue:h,isVisitable:Ii});function E(y,M,b=0){if(!S.isUndefined(y)){if(p(b),f.indexOf(y)!==-1)throw new Error("Circular reference detected in "+M.join("."));f.push(y),S.forEach(y,function(P,A){(!(S.isUndefined(P)||P===null)&&r.call(t,P,S.isString(A)?A.trim():A,M,N))===!0&&E(P,M?M.concat(A):[A],b+1)}),f.pop()}}if(!S.isObject(n))throw new TypeError("data must be an object");return E(n),t}function ks(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Ai(n,t){this._pairs=[],n&&Oo(n,this,t)}const xs=Ai.prototype;xs.append=function(t,o){this._pairs.push([t,o])},xs.toString=function(t){const o=t?i=>t.call(this,i,ks):ks;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Nd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Es(n,t,o){if(!t)return n;n=n||"";const i=S.isFunction(o)?{serialize:o}:o,r=S.getSafeProp(i,"encode")||Nd,s=S.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=S.isURLSearchParams(t)?t.toString():new Ai(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Bs{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(i){i!==null&&t(i)})}}const zi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Vd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ai,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Di=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,$d=Di&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),Td=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Md=Di&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Di,hasStandardBrowserEnv:$d,hasStandardBrowserWebWorkerEnv:Td,navigator:Fi,origin:Md},Symbol.toStringTag,{value:"Module"})),...Vd};function Pd(n,t){return Oo(n,new Ue.classes.URLSearchParams,{visitor:function(o,i,r,s){return Ue.isNode&&S.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Cs;function Vs(n){if(n>Ns)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Id(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)Vs(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function Rd(n){const t={},o=Object.keys(n);let i;const r=o.length;let s;for(i=0;i<r;i++)s=o[i],t[s]=n[s];return t}function $s(n){function t(o,i,r,s){Vs(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&S.isArray(r)?r.length:a,l?(S.hasOwnProp(r,a)?r[a]=S.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!S.hasOwnProp(r,a)||!S.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&S.isArray(r[a])&&(r[a]=Rd(r[a])),!c)}if(S.isFormData(n)&&S.isFunction(n.entries)){const o={};return S.forEachEntry(n,(i,r)=>{t(Id(i),r,o,0)}),o}return null}const In=(n,t)=>n!=null&&S.hasOwnProp(n,t)?n[t]:void 0;function Ad(n,t,o){if(S.isString(n))try{return(t||JSON.parse)(n),S.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const to={transitional:zi,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=S.isObject(t);if(s&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return r?JSON.stringify($s(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=In(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Pd(t,l).toString();if((c=S.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return Oo(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),Ad(t)):t}],transformResponse:[function(t){const o=In(this,"transitional")||to.transitional,i=o&&o.forcedJSONParsing,r=In(this,"responseType"),s=r==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,In(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,In(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch","query"],n=>{to.headers[n]={}});function Oi(n,t){const o=this||to,i=t||o,r=Ge.from(i.headers);let s=i.data;return S.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ts(n){return!!(n&&n.__CANCEL__)}let no=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new _("Request failed with status code "+o.status,o.status>=400&&o.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,o.config,o.request,o))}function zd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Dd(n,t){n=n||10;const o=new Array(n),i=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=i[s];a||(a=u),o[r]=l,i[r]=u;let h=s,p=0;for(;h!==r;)p+=o[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const k=f&&u-f;return k?Math.round(p*1e3/k):void 0}}function Fd(n,t){let o=0,i=1e3/t,r,s;const a=(u,f=Date.now())=>{o=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-o;h>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-h)))},()=>r&&a(r)]}const Lo=(n,t,o=3)=>{let i=0;const r=Dd(50,250);return Fd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-i),f=r(u);i=Math.max(i,l);const h={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(h)},o)},Ps=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Is=n=>(...t)=>S.asap(()=>n(...t)),Od=Ue.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Ue.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,Ld=Ue.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];S.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),S.isString(i)&&c.push(`path=${i}`),S.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),S.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let o=0;o<t.length;o++){const i=t[o].replace(/^\s+/,""),r=i.indexOf("=");if(r!==-1&&i.slice(0,r)===n)try{return decodeURIComponent(i.slice(r+1))}catch{return i.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _d(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Hd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Ud=/^https?:(?!\/\/)/i,vd=/[\t\n\r]/g;function qd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function jd(n){return qd(n).replace(vd,"")}function Rs(n,t){if(typeof n=="string"&&Ud.test(jd(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function As(n,t,o,i){Rs(t,i);let r=!_d(t);return n&&(r||o===!1)?(Rs(n,i),Hd(n,t)):t}const zs=n=>n instanceof Ge?{...n}:n;function an(n,t){n=n||{},t=t||{};const o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,h,p,k){return S.isPlainObject(f)&&S.isPlainObject(h)?S.merge.call({caseless:k},f,h):S.isPlainObject(h)?S.merge({},h):S.isArray(h)?h.slice():h}function r(f,h,p,k){if(S.isUndefined(h)){if(!S.isUndefined(f))return i(void 0,f,p,k)}else return i(f,h,p,k)}function s(f,h){if(!S.isUndefined(h))return i(void 0,h)}function a(f,h){if(S.isUndefined(h)){if(!S.isUndefined(f))return i(void 0,f)}else return i(void 0,h)}function c(f){const h=S.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!S.isUndefined(h))if(S.isPlainObject(h)){if(S.hasOwnProp(h,f))return h[f]}else return;const p=S.hasOwnProp(n,"transitional")?n.transitional:void 0;if(S.isPlainObject(p)&&S.hasOwnProp(p,f))return p[f]}function l(f,h,p){if(S.hasOwnProp(t,p))return i(f,h);if(S.hasOwnProp(n,p))return i(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(f,h,p)=>r(zs(f),zs(h),p,!0)};return S.forEach(Object.keys({...n,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const p=S.hasOwnProp(u,h)?u[h]:r,k=S.hasOwnProp(n,h)?n[h]:void 0,C=S.hasOwnProp(t,h)?t[h]:void 0,N=p(k,C,h);S.isUndefined(N)&&p!==l||(o[h]=N)}),S.hasOwnProp(t,"validateStatus")&&S.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(S.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const Wd=["content-type","content-length"];function Gd(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{Wd.includes(i.toLowerCase())&&n.set(i,r)})}const Qd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Ds(n){const t=an({},n),o=p=>S.hasOwnProp(t,p)?t[p]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let c=o("headers");const l=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),h=o("url");if(t.headers=c=Ge.from(c),t.url=Es(As(u,h,f,t),o("params"),o("paramsSerializer")),l){const p=S.getSafeProp(l,"username")||"",k=S.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(k?Qd(k):"")))}catch(C){throw _.from(C,_.ERR_BAD_OPTION_VALUE,n)}}if(S.isFormData(i)&&(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv||S.isReactNative(i)?c.setContentType(void 0):S.isFunction(i.getHeaders)&&Gd(c,i.getHeaders(),o("formDataHeaderPolicy"))),Ue.hasStandardBrowserEnv&&(S.isFunction(r)&&(r=r(t)),r===!0||r==null&&Od(t.url))){const k=s&&a&&Ld.read(a);k&&c.set(s,k)}return t}const Yd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Ds(n);let s=r.data;const a=Ge.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,h,p,k,C;function N(){k&&k(),C&&C(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function y(){if(!E)return;const b=Ge.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:b,config:n,request:E};Ms(function(G){o(G),N()},function(G){i(G),N()},P),E=null}"onloadend"in E?E.onloadend=y:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(y)},E.onabort=function(){E&&(i(new _("Request aborted",_.ECONNABORTED,n,E)),N(),E=null)},E.onerror=function($){const P=$&&$.message?$.message:"Network Error",A=new _(P,_.ERR_NETWORK,n,E);A.event=$||null,i(A),N(),E=null},E.ontimeout=function(){let $=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const P=r.transitional||zi;r.timeoutErrorMessage&&($=r.timeoutErrorMessage),i(new _($,P.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,E)),N(),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&S.forEach(ws(a),function($,P){E.setRequestHeader(P,$)}),S.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),c&&c!=="json"&&(E.responseType=r.responseType),u&&([p,C]=Lo(u,!0),E.addEventListener("progress",p)),l&&E.upload&&([h,k]=Lo(l),E.upload.addEventListener("progress",h),E.upload.addEventListener("loadend",k)),(r.cancelToken||r.signal)&&(f=b=>{E&&(i(!b||b.type?new no(null,n,E):b),E.abort(),N(),E=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const M=zd(r.url);if(M&&!Ue.protocols.includes(M)){i(new _("Unsupported protocol "+M+":",_.ERR_BAD_REQUEST,n)),N();return}E.send(s||null)})},Xd=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;o.abort(u instanceof _?u:new no(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=o;return c.unsubscribe=()=>S.asap(a),c},Zd=function*(n,t){let o=n.byteLength;if(o<t){yield n;return}let i=0,r;for(;i<o;)r=i+t,yield n.slice(i,r),i=r},Jd=async function*(n,t){for await(const o of Kd(n))yield*Zd(o,t)},Kd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:o,value:i}=await t.read();if(o)break;yield i}}finally{await t.cancel()}},Fs=(n,t,o,i)=>{const r=Jd(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let h=f.byteLength;if(o){let p=s+=h;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},_o=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,eu=(n,t,o)=>t+2<o&&_o(n.charCodeAt(t+1))&&_o(n.charCodeAt(t+2));function tu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const o=n.slice(5,t),i=n.slice(t+1);if(/;base64/i.test(o)){let a=i.length;const c=i.length;for(let k=0;k<c;k++)if(i.charCodeAt(k)===37&&k+2<c){const C=i.charCodeAt(k+1),N=i.charCodeAt(k+2);_o(C)&&_o(N)&&(a-=2,k+=2)}let l=0,u=c-1;const f=k=>k>=2&&i.charCodeAt(k-2)===37&&i.charCodeAt(k-1)===51&&(i.charCodeAt(k)===68||i.charCodeAt(k)===100);u>=0&&(i.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=i.length;a<c;a++){const l=i.charCodeAt(a);if(l===37&&eu(i,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Li="1.18.1",Os=64*1024,{isFunction:Ho}=S,nu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Ls=n=>{if(!S.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},_s=(n,...t)=>{try{return!!n(...t)}catch{return!1}},ou=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},iu=n=>{const t=S.global!==void 0&&S.global!==null?S.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=S.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?Ho(r):typeof fetch=="function",l=Ho(s),u=Ho(a);if(!c)return!1;const f=c&&Ho(o),h=c&&(typeof i=="function"?(y=>M=>y.encode(M))(new i):async y=>new Uint8Array(await new s(y).arrayBuffer())),p=l&&f&&_s(()=>{let y=!1;const M=new s(Ue.origin,{body:new o,method:"POST",get duplex(){return y=!0,"half"}}),b=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),y&&!b}),k=u&&f&&_s(()=>S.isReadableStream(new a("").body)),C={stream:k&&(y=>y.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!C[y]&&(C[y]=(M,b)=>{let $=M&&M[y];if($)return $.call(M);throw new _(`Response type '${y}' is not supported`,_.ERR_NOT_SUPPORT,b)})});const N=async y=>{if(y==null)return 0;if(S.isBlob(y))return y.size;if(S.isSpecCompliantForm(y))return(await new s(Ue.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(S.isArrayBufferView(y)||S.isArrayBuffer(y))return y.byteLength;if(S.isURLSearchParams(y)&&(y=y+""),S.isString(y))return(await h(y)).byteLength},E=async(y,M)=>{const b=S.toFiniteNumber(y.getContentLength());return b??N(M)};return async y=>{let{url:M,method:b,data:$,signal:P,cancelToken:A,timeout:G,onDownloadProgress:de,onUploadProgress:$e,responseType:Ee,headers:De,withCredentials:Me="same-origin",fetchOptions:ge,maxContentLength:Be,maxBodyLength:Pt}=Ds(y);const It=S.isNumber(Be)&&Be>-1,Jt=S.isNumber(Pt)&&Pt>-1,bn=se=>S.hasOwnProp(y,se)?y[se]:void 0;let lt=r||fetch;Ee=Ee?(Ee+"").toLowerCase():"text";let je=Xd([P,A&&A.toAbortSignal()],G),be=null;const Q=je&&je.unsubscribe&&(()=>{je.unsubscribe()});let Ze,St=null;const ye=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,y,be);try{let se;const We=bn("auth");if(We){const ee=S.getSafeProp(We,"username")||"",Oe=S.getSafeProp(We,"password")||"";se={username:ee,password:Oe}}if(ou(M)){const ee=new URL(M,Ue.origin);if(!se&&(ee.username||ee.password)){const Oe=Ls(ee.username),st=Ls(ee.password);se={username:Oe,password:st}}(ee.username||ee.password)&&(ee.username="",ee.password="",M=ee.href)}if(se&&(De.delete("authorization"),De.set("Authorization","Basic "+btoa(nu((se.username||"")+":"+(se.password||""))))),It&&typeof M=="string"&&M.startsWith("data:")&&tu(M)>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be);if(Jt&&b!=="get"&&b!=="head"){const ee=await N($);if(typeof ee=="number"&&isFinite(ee)&&(Ze=ee,ee>Pt))throw ye()}const vt=Jt&&(S.isReadableStream($)||S.isStream($)),ct=(ee,Oe,st)=>Fs(ee,Os,gt=>{if(Jt&&gt>Pt)throw St=ye();Oe&&Oe(gt)},st);if(p&&b!=="get"&&b!=="head"&&($e||vt)){if(Ze=Ze??await E(De,$),Ze!==0||vt){let ee=new s(M,{method:"POST",body:$,duplex:"half"}),Oe;if(S.isFormData($)&&(Oe=ee.headers.get("content-type"))&&De.setContentType(Oe),ee.body){const[st,gt]=$e&&Ps(Ze,Lo(Is($e)))||[];$=ct(ee.body,st,gt)}}}else if(vt&&!l&&f&&b!=="get"&&b!=="head")$=ct($);else if(vt&&l&&!p&&b!=="get"&&b!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,y,be);S.isString(Me)||(Me=Me?"include":"omit");const rt=l&&"credentials"in s.prototype;if(S.isFormData($)){const ee=De.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&De.delete("content-type")}De.set("User-Agent","axios/"+Li,!1);const Kt={...ge,signal:je,method:b.toUpperCase(),headers:ws(De.normalize()),body:$,duplex:"half",credentials:rt?Me:void 0};be=l&&new s(M,Kt);let Fe=await(l?lt(be,ge):lt(M,Kt));const Rt=Ge.from(Fe.headers);if(It){const ee=S.toFiniteNumber(Rt.getContentLength());if(ee!=null&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be)}const Cn=k&&(Ee==="stream"||Ee==="response");if(k&&Fe.body&&(de||It||Cn&&Q)){const ee={};["status","statusText","headers"].forEach(dt=>{ee[dt]=Fe[dt]});const Oe=S.toFiniteNumber(Rt.getContentLength()),[st,gt]=de&&Ps(Oe,Lo(Is(de),!0))||[];let en=0;const Sn=dt=>{if(It&&(en=dt,en>Be))throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be);st&&st(dt)};Fe=new a(Fs(Fe.body,Os,Sn,()=>{gt&&gt(),Q&&Q()}),ee)}Ee=Ee||"text";let ue=await C[S.findKey(C,Ee)||"text"](Fe,y);if(It&&!k&&!Cn){let ee;if(ue!=null&&(typeof ue.byteLength=="number"?ee=ue.byteLength:typeof ue.size=="number"?ee=ue.size:typeof ue=="string"&&(ee=typeof i=="function"?new i().encode(ue).byteLength:ue.length)),typeof ee=="number"&&ee>Be)throw new _("maxContentLength size of "+Be+" exceeded",_.ERR_BAD_RESPONSE,y,be)}return!Cn&&Q&&Q(),await new Promise((ee,Oe)=>{Ms(ee,Oe,{data:ue,headers:Ge.from(Fe.headers),status:Fe.status,statusText:Fe.statusText,config:y,request:be})})}catch(se){if(Q&&Q(),je&&je.aborted&&je.reason instanceof _){const We=je.reason;throw We.config=y,be&&(We.request=be),se!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),We}if(St)throw be&&!St.request&&(St.request=be),St;if(se instanceof _)throw be&&!se.request&&(se.request=be),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const We=new _("Network Error",_.ERR_NETWORK,y,be,se&&se.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),We}throw _.from(se,se&&se.code,y,be,se&&se.response)}}},ru=new Map,Hs=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,c=a,l,u,f=ru;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:iu(t)),f=u;return u};Hs();const _i={http:xd,xhr:Yd,fetch:{get:Hs}};S.forEach(_i,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Us=n=>`- ${n}`,su=n=>S.isFunction(n)||n===null||n===!1;function au(n,t){n=S.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let c;if(r=i,!su(i)&&(r=_i[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(S.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
17
17
  `+a.map(Us).join(`
18
- `):" "+Us(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const vs={getAdapter:au,adapters:_o};function Ho(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ni(null,n)}function qs(n){return Ho(n),n.headers=Ge.from(n.headers),n.data=Oo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),vs.getAdapter(n.adapter||ti.adapter,n)(n).then(function(o){Ho(n),n.response=o;try{o.data=Oo.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=Ge.from(o.headers),o},function(o){if(!Ts(o)&&(Ho(n),o&&o.response)){n.response=o.response;try{o.response.data=Oo.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=Ge.from(o.response.headers)}return Promise.reject(o)})}const Hi={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Hi[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const js={};Hi.transitional=function(t,i,o){function r(s,a){return"[Axios v"+Lo+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,c)=>{if(t===!1)throw new _(r(a," has been removed"+(i?" in "+i:"")),_.ERR_DEPRECATED);return i&&!js[a]&&(js[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(s,a,c):!0}},Hi.spelling=function(t){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function lu(n,t,i){if(typeof n!="object"||n===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=n[s],l=c===void 0||a(c,s,n);if(l!==!0)throw new _("option "+s+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new _("Unknown option "+s,_.ERR_BAD_OPTION)}}const Ui={assertOptions:lu,validators:Hi},Qe=Ui.validators;let ln=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bs,response:new Bs}}async request(t,i){try{return await this._request(t,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
19
- `);return a===-1?"":r.stack.slice(a+1)})();try{if(!o.stack)o.stack=s;else if(s){const a=s.indexOf(`
18
+ `):" "+Us(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const vs={getAdapter:au,adapters:_i};function Hi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new no(null,n)}function qs(n){return Hi(n),n.headers=Ge.from(n.headers),n.data=Oi.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),vs.getAdapter(n.adapter||to.adapter,n)(n).then(function(i){Hi(n),n.response=i;try{i.data=Oi.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Ge.from(i.headers),i},function(i){if(!Ts(i)&&(Hi(n),i&&i.response)){n.response=i.response;try{i.response.data=Oi.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Ge.from(i.response.headers)}return Promise.reject(i)})}const Uo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Uo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const js={};Uo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+Li+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,c)=>{if(t===!1)throw new _(r(a," has been removed"+(o?" in "+o:"")),_.ERR_DEPRECATED);return o&&!js[a]&&(js[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,c):!0}},Uo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function lu(n,t,o){if(typeof n!="object"||n===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const s=i[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=n[s],l=c===void 0||a(c,s,n);if(l!==!0)throw new _("option "+s+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new _("Unknown option "+s,_.ERR_BAD_OPTION)}}const vo={assertOptions:lu,validators:Uo},Qe=vo.validators;let ln=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bs,response:new Bs}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
19
+ `);return a===-1?"":r.stack.slice(a+1)})();try{if(!i.stack)i.stack=s;else if(s){const a=s.indexOf(`
20
20
  `),c=a===-1?-1:s.indexOf(`
21
- `,a+1),l=c===-1?"":s.slice(c+1);String(o.stack).endsWith(l)||(o.stack+=`
22
- `+s)}}catch{}}throw o}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=an(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&Ui.assertOptions(o,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean),legacyInterceptorReqResOrdering:Qe.transitional(Qe.boolean),advertiseZstdAcceptEncoding:Qe.transitional(Qe.boolean),validateStatusUndefinedResolves:Qe.transitional(Qe.boolean)},!1),r!=null&&(k.isFunction(r)?i.paramsSerializer={serialize:r}:Ui.assertOptions(r,{encode:Qe.function,serialize:Qe.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Ui.assertOptions(i,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&k.merge(s.common,s[i.method]);s&&k.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete s[b]}),i.headers=Ge.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(i)===!1)return;l=l&&N.synchronous;const E=i.transitional||zo;E&&E.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const u=[];this.interceptors.response.forEach(function(N){u.push(N.fulfilled,N.rejected)});let f,h=0,p;if(!l){const b=[qs.bind(this),void 0];for(b.unshift(...c),b.push(...u),p=b.length,f=Promise.resolve(i);h<p;)f=f.then(b[h++],b[h++]);return f}p=c.length;let y=i;for(;h<p;){const b=c[h++],N=c[h++];try{y=b(y)}catch(E){N.call(this,E);break}}try{f=qs.call(this,y)}catch(b){return Promise.reject(b)}for(h=0,p=u.length;h<p;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=an(this.defaults,t);const i=As(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Es(i,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){ln.prototype[t]=function(i,o){return this.request(an(o||{},{method:t,url:i,data:o&&k.hasOwnProp(o,"data")?o.data:void 0}))}}),k.forEach(["post","put","patch","query"],function(t){function i(o){return function(s,a,c){return this.request(an(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[t]=i(),t!=="query"&&(ln.prototype[t+"Form"]=i(!0))});let cu=class Hl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{o.subscribe(c),s=c}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,c){o.reason||(o.reason=new ni(s,a,c),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const t=new AbortController,i=o=>{t.abort(o)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Hl(function(r){t=r}),cancel:t}}};function du(n){return function(i){return n.apply(null,i)}}function uu(n){return k.isObject(n)&&n.isAxiosError===!0}const Uo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Uo).forEach(([n,t])=>{Uo[t]=n});function Ws(n){const t=new ln(n),i=as(ln.prototype.request,t);return k.extend(i,ln.prototype,t,{allOwnKeys:!0}),k.extend(i,t,null,{allOwnKeys:!0}),i.create=function(r){return Ws(an(n,r))},i}const Ve=Ws(ti);Ve.Axios=ln,Ve.CanceledError=ni,Ve.CancelToken=cu,Ve.isCancel=Ts,Ve.VERSION=Lo,Ve.toFormData=Fi,Ve.AxiosError=_,Ve.Cancel=Ve.CanceledError,Ve.all=function(t){return Promise.all(t)},Ve.spread=du,Ve.isAxiosError=uu,Ve.mergeConfig=an,Ve.AxiosHeaders=Ge,Ve.formToJSON=n=>$s(k.isHTMLForm(n)?new FormData(n):n),Ve.getAdapter=vs.getAdapter,Ve.HttpStatusCode=Uo,Ve.default=Ve;const{Axios:$w,AxiosError:Tw,CanceledError:Mw,isCancel:Pw,CancelToken:Iw,VERSION:Rw,all:Aw,Cancel:zw,isAxiosError:Dw,spread:Fw,toFormData:Ow,AxiosHeaders:Lw,HttpStatusCode:_w,formToJSON:Hw,getAdapter:Uw,mergeConfig:vw,create:qw}=Ve;var ii=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ii||{});const oi=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function i(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function o(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!n())return;const u=oi.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:c}})();class vo{constructor(t){d(this,"code",400);d(this,"err","");K.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,i){const o=t.config;if(t.response){if(t.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=oi.getAccessToken(),t.config.headers.token=oi.getAccessToken(),t.config.baseURL=void 0,i.request(o);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Nn.Error("Неверный логин или пароль");return}Nn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new vo(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const Rn=Ve.create();Rn.interceptors.response.use(n=>n,async n=>await vo.Handle(n,Rn));class ri{static async Get(t,i,o){return await Rn({method:ii.GET,url:t,headers:i,responseType:o})}static async Post(t,i,o,r){return i["Content-Type"]="multipart/form-data",await Rn({method:ii.POST,url:t,headers:i,responseType:o,data:r})}static async Put(t,i,o){return i["Content-Type"]="multipart/form-data",await Rn({method:ii.PUT,url:t,headers:i,data:o})}static async Delete(t,i){return await Rn({method:ii.DELETE,url:t,headers:i})}}class vi{constructor(t){d(this,"name","");K.BuildClass(this,t)}static Set(){}static Get(t,i){const o=sessionStorage.getItem(t);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(i||10)?null:r.data}else return null}static async TryGet(t,i,o){let r;return r=vi.Get(t,o),r||(r=await i()),r}}var qo=(n=>(n.ContentType="Content-Type",n.Token="token",n))(qo||{}),Gs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Gs||{});const pe=class pe{static Setup(t="http://localhost",i,o="api"){this.baseUrl=Ce.BuildSafeUrl(t,i,o),this.host=t,this.apiVersion=o}static newWebSocket(t){const i=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(i)}static download(t,i){const o=pe.getDownloadFileName(t,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,i){if(t)return t;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(t){const i=xt.Get(ut.AccessToken);return t||(t=pe.headers),i&&(t[qo.Token]=i),t??pe.headers}static returnResponse(t,i){if(i)return t!=null&&t.isBlob?pe.download(t.downloadFileName,i):i.data}static async Get(t){return pe.returnResponse(t,await ri.Get(pe.buildUrl((t==null?void 0:t.query)??""),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return pe.returnResponse(t,await ri.Post(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t.isBlob),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return pe.returnResponse(t,await ri.Put(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return pe.returnResponse(t,await ri.Delete(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:i}=t;return new EventSource(pe.buildUrl(i))}static buildUrl(t=""){try{return xo(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,i){const o=new FormData;if(o.append("form",JSON.stringify(t)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};d(pe,"baseUrl",""),d(pe,"apiVersion","api"),d(pe,"host",""),d(pe,"headers",{[qo.ContentType]:Gs.ApplicationJson});let ke=pe;const D=(n,t)=>{const i=n.__vccOpts||n;for(const[o,r]of t)i[o]=r;return i},fu={},mu={style:{"text-align":"center"}};function hu(n,t){return e.openBlock(),e.createElementBlock("div",mu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Qs=D(fu,[["render",hu]]),pu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Qs}],pt=class pt{static Setup(t,i=""){this.router=t,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(pu)}static Get(){return this.router}static AddRoutes(t){t.forEach(i=>{this.Get().addRoute(i)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return pt.GetStringParam("id")}static Slug(){return pt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return pt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const i=this.Get().resolve({path:t});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const t=(i=pt.Route())==null?void 0:i.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let i=t;i[0]==="/"&&(i=t.substring(1)),await pt.To(`/admin/${i}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var i;return(i=this.Route())==null?void 0:i.params[t]}static SetQueryParam(t,i){const o=new URL(window.location);o.searchParams.set(t,String(i)),history.replaceState(null,"",o)}static Resolve(t){return this.Get().resolve(t)}};d(pt,"router"),d(pt,"title",""),d(pt,"ChangeDocumentTitle",(t="")=>{let i=pt.Route().meta.title??t;i&&(i=" | "+i),document.title=pt.title+i});let Bt=pt;class xe{constructor(t,i){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=i}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",i="id"){const o=`${this.getUrl()}/options/${t}/${i}`;try{const r=await ke.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let i;const o=ke.Get;t&&t.withCache?i=await vi.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(t){try{t||(t=Bt.Id()),this.Set(await ke.Get({query:this.getUrl(t)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await z.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(t){var i;try{const r=((t==null?void 0:t.ftsp)??Ft.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await ke.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(t){try{const i=t??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await ke.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(t){const i=await this.Create(t);this.Set(i)}async CreateMany(t){if(!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(t){try{const i=t??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await ke.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(t){const i=await this.Update(t);this.Set(i)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await ke.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(i=>new this.classConstructor(i)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const i=this.items.findIndex(o=>o.id===t);i<0||this.items.splice(i,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){K.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>z.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function gu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const yu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class wu{static GetRandColor(t){return Dt.GetRandEL(t??yu)}}function Ys(n,t){const i=[],o=t||ft.Asc,r=o===ft.Asc?ft.Desc:ft.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),t&&i.forEach(s=>{s.default&&(s.default=s.order===t)}),i}let bu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Ni[Qn.FiveMinutes])}startDrag(t,i){this.draggedStartTime=t,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Ni[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const jo=n=>n===8||n===46,Cu=n=>n>46&&n<58,Su=n=>n>34&&n<41,ku=n=>n+".",xu=(n,t,i)=>{jo(t)||Su(t)||(!Cu(t)||i>9)&&n.preventDefault()};function Eu(n,t){if(t>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function Bu(n){const t=n.keyCode;let i=n.srcElement.value;const o=i.length;xu(n,t,o),!jo(t)&&(o===2||o===5)&&(i=ku(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(jo(t)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=Eu(i,o),n.srcElement.value=i}const Nu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Vu="ru-RU";class Wt{constructor(){d(this,"locale","ru-RU")}static Format(t,i){if(!t)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(Vu,o).format(new Date(t))}static FormatWithTime(t){return Wt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(t,i,o){return`${this.Format(t,o)}-${this.Format(i,o)}`}static GetShortDayName(t){return t?Nu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,i){const o=new Date,r=new Date,s=Wt.SplitHourTime(t),a=Wt.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(t){const i=Wt.SplitHourTime(t);return i[0]*60+i[1]}static SplitHourTime(t){const i=t.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(t,i){const o=new Date,r=Wt.SplitHourTime(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,i){return i.getMonth()-t.getMonth()+12*(i.getFullYear()-t.getFullYear())}static StringToDate(t){const i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,i,o){return new Date(t)>=new Date(i)&&new Date(t)<=new Date(o)}static GetDatesFromPeriod(t,i){const o=[new Date(t)];let r=t;for(;r<=i;)r=Wt.AddDays(r,1),o.push(r);return o}static AddDays(t,i){const o=new Date(t);return o.setDate(o.getDate()+i),o}static Eq(t,i){return t.getTime()===i.getTime()}}class $u{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Xs{static Get(t){const i=t.split(".");return i[i.length-1]}}const Tu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Mu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=Ys(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const cn=new Mu;function Pu(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Iu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),cn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:i}=Pu(),o=s=>Yl.onBeforeRouteLeave((a,c,l)=>{i((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function Zs(n,t){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/t);o++)i[o]=n.slice(o*t,o*t+t);return i}class Wo{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Bt.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===t);i>-1&&this.Select(i)}static Create(t,i){const o=new Wo;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Bt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const uo=class uo{static Format(t){let i=t;if(!i)t=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:t="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):t="+7 (";break;case r<4:t=`+7 (${o}`;break;case r<7:t=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(uo,"validatePhone",(t,i,o)=>{uo.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let Go=uo;class Ru{static Count(t){const i=t.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class Au{static async Auth(t){t&&t()}static Dev(){}}class zu{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"timelines",Ni[Qn.FiveMinutes])}periodIsCorrect(t,i){return oe.GtOrEq(t,this.startHM)&&oe.GtOrEq(this.endHM,i)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Ni[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,i,o,r){return r.filter(s=>s.id!==o).every(s=>!oe.PeriodsIntersects(t,i,s.startTime,s.endTime))}sortByStartTime(t){t.sort((i,o)=>oe.HMtoM(i.startTime)-oe.HMtoM(o.startTime))}}const Du=-68;function Fu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=t??Du;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Ou{static Sort(t){t.forEach((i,o)=>i.order=o)}}class qi{static Wait(t,i){return new Promise(o=>setTimeout(()=>o(i),t))}static WaitS(t,i){return qi.Wait(oe.S(t),i)}static WaitM(t,i){return qi.Wait(oe.M(t),i)}}const si=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Lu=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const i of n){const o=i(t);if(o!==!0)return o}return!0},Email:(n="Некорректный email")=>t=>si(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>i=>si(i)||String(i).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>i=>si(i)||String(i).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>i=>si(i)||n.test(String(i))?!0:t,Required:(n="Обязательное поле")=>t=>si(t)?n:!0},Symbol.toStringTag,{value:"Module"})),_u=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),t(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});class ji{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");K.BuildClass(this,t)}static Create(t,i,o,r){const s=new ji;return s.id=jt(),s.chatId=t,s.message=o,s.userName=r,s}static CreatePingMessage(){const t=new ji;return t.type="ping",t.id=jt(),t}isMessage(){return this.type==="message"||this.type===""}}const Hu="";class Uu{constructor(t="",i="",o="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);K.BuildClass(this,{endpoint:t,query:i,mutation:o}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(ji.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Hu.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}let vu=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",ri),d(re,"BaseStore",xe),d(re,"Cache",vi),d(re,"Classes",K),d(re,"CarouselSwipe",gu),d(re,"Color",wu),d(re,"CreateSortModels",Ys),d(re,"Cursor",bu),d(re,"DateMask",Bu),d(re,"Dates",Wt),d(re,"Dragger",$u),d(re,"Extension",Xs),d(re,"Favourite",Tu),d(re,"Hooks",Iu),d(re,"HttpClient",ke),d(re,"Id",Ke),d(re,"MakeCarousel",Zs),d(re,"Period",So),d(re,"PhoneService",Go),d(re,"Rating",Ru),d(re,"Router",Bt),d(re,"RouterGuard",Au),d(re,"Scheduler",zu),d(re,"Scroll",Fu),d(re,"Sorter",Ou),d(re,"Static",Eo),d(re,"Strings",Ce),d(re,"Time",oe),d(re,"Timer",qi),d(re,"Token",oi),d(re,"Menus",Wo),d(re,"Validate",Lu),d(re,"WaitElement",_u),d(re,"WebSocketClient",Uu),re);class qu{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Js=new qu;var Ks=(n=>(n.TableList="tableList",n.Default="",n))(Ks||{}),Nt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Nt||{}),ea=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ea||{}),ta=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(ta||{}),Qo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Qo||{});const ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Ks,Animations:Nt,CalendarScale:ea,LocalStoreKeys:ut,SocialTypes:ta,ValueRelation:Qo},Symbol.toStringTag,{value:"Module"}));let Wu=class{async Login(t=_e.Form.GetValues()){const i=await ke.Post({query:"auth/login",payload:t});if(!i)throw"Ошибка авторизации";_e.Status.SetState(i)}async LoginAs(t){await ke.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=_e.Form.GetValues()){const i=await ke.Post({query:"auth/register",payload:t});if(!i)throw i}async RestorePassword(t=_e.Form.GetValues()){await ke.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=_e.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await ke.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await ke.Post({query:"auth/refresh-token",payload:{refreshToken:oi.getRefreshToken()}})}async CheckUuid(t){await ke.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await ke.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await ke.Get({query:`auth/email-is-confirm/${t}`})}};const Gu=new Wu;var Qu=Object.defineProperty,Wi=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Qu(t,i,r),r};const ai=class Ul{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Vi]);d(this,"phones",[]);d(this,"websites",[]);K.BuildClass(this,t)}addEmail(){const t=Yn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=on.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Ul;return t.id=Ke.UUID(),t}removeEmail(t){K.RemoveFromClassById(t,this.emails)}removePhone(t){K.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Vi)}addWebsite(){this.websites.push(new Bo)}pushFirst(){this.emails.length||this.emails.push(new Yn),this.phones.length||this.phones.push(new on)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Wi([K.GetClassConstructor(Yn)],ai.prototype,"emails"),Wi([K.GetClassConstructor(Vi)],ai.prototype,"postAddresses"),Wi([K.GetClassConstructor(on)],ai.prototype,"phones"),Wi([K.GetClassConstructor(Bo)],ai.prototype,"websites");let Yu=ai,Xu=class extends xe{constructor(){super(Yu,"contacts")}};const Zu=new Xu;let Ju=class extends xe{constructor(){super(Yn,"emails")}};const Ku=new Ju;class Yo{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");K.BuildClass(this,t)}static Create(t){const i=new Yo;return i.id=Ke.UUID(),i.ftsp=JSON.stringify(t),i}}let ef=class extends xe{constructor(){super(Yo,"ftsp-presets")}};const tf=new ef;let nf=class extends xe{constructor(){super(os,"humans")}};const of=new nf;let rf=class extends xe{constructor(){super(on,"phones")}};const sf=new rf;class af{constructor(t){d(this,"id");d(this,"nameRus","");K.BuildClass(this,t)}}var lf=Object.defineProperty,cf=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&lf(t,i,r),r};class na{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);K.BuildClass(this,t)}}cf([K.GetClassConstructor(af)],na.prototype,"fields");let df=class extends xe{constructor(){super(na,"schemas")}};const uf=new df;class ia{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);K.BuildClass(this,t)}}class ff{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");K.BuildClass(this,t)}}var mf=Object.defineProperty,oa=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&mf(t,i,r),r};class An{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);K.BuildClass(this,t)}}oa([K.GetClassConstructor(ia)],An.prototype,"options"),oa([K.GetClassConstructor(ff)],An.prototype,"searchGroupMetaColumns");class Xo{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new An);d(this,"searchObjects",[]);d(this,"pagination",new Mi);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(i=>new An(i))),t.searchGroup&&(this.searchGroup=new An(t.searchGroup)),t.options&&(this.options=t.options.map(i=>new ia(i))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const i=this.searchGroups.find(o=>o.id===t);i?this.searchGroup=i:this.searchGroup=new An}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let hf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Xo));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const i=await ke.Get({query:`search?key=${t.key}&query=${t.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{t.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(t){this.SetSearchModel(await ke.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(o=>{o.options=[]});const i=await ke.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Xo}SetSearchModel(t){t&&(this.searchModel=new Xo(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Zo=new hf;let pf=class extends xe{constructor(){super($i,"users-accounts")}};const gf=new pf;var Ye=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(Ye||{});class ra{constructor(t){d(this,"id");d(this,"name",Ye.String);d(this,"valueRelation",Qo.simple);K.BuildClass(this,t)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===Ye.Radio)return"RadioProp";if(this.name===Ye.Set)return"SetProp";if(this.name===Ye.Number)return"NumberProp";if(this.name===Ye.String)return"StringProp"}}let yf=class extends xe{constructor(){super(ra,"value-types")}};const wf=new yf;let sa=(at=class{},d(at,"Auth",Gu),d(at,"Contacts",Zu),d(at,"Emails",Ku),d(at,"FileInfos",new xe(Et,"file-infos")),d(at,"FTSPPresets",tf),d(at,"Humans",of),d(at,"Phones",sf),d(at,"Schemas",uf),d(at,"UserAccounts",gf),d(at,"ValueTypes",wf),d(at,"Search",Zo),at);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let bf=(Zt=class{},d(Zt,"Orders",ft),d(Zt,"Sizes",Gt),d(Zt,"Statuses",he),d(Zt,"DataTypes",Ae),d(Zt,"ValueTypes",Ye),d(Zt,"Operators",Se),Zt);class Cf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",i){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=i}}const Sf=new Cf;class kf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var i;return Ce.SearchIn(t.name,this.filterString)||((i=t.children)==null?void 0:i.some(o=>Ce.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var i;return this.filterString?(i=t.children)==null?void 0:i.filter(o=>Ce.SearchIn(o.name,this.filterString)):t.children}}const xf=new kf;class Ef{constructor(){d(this,"Menu",e.reactive(xf));d(this,"Head",e.reactive(Sf))}}const Bf=new Ef,aa="Да",la="Нет";class Nf extends Bn{constructor(){super(...arguments);d(this,"confirmButtonText",aa);d(this,"cancelButtonText",la);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??aa,this.cancelButtonText=o.cancelButtonText??la,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof x.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=x.Dialog.create({title:this.title||void 0,message:this.text,html:Bn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const Vf=new Nf;class $f{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Tf extends $f{Show(){super.show()}Hide(){super.hide()}}const Mf=new Tf;class Qt{}d(Qt,"Admin",Bf),d(Qt,"Dialog",Vf),d(Qt,"Loading",Mf),d(Qt,"Notify",Nn),d(Qt,"Btn",nn),d(Qt,"Input",Xr);class z{}d(z,"Auth",e.reactive(_e)),d(z,"UI",e.reactive(Qt)),d(z,"Paginator",e.reactive(Js)),d(z,"S",sa),d(z,"H",vu),d(z,"C",hc),d(z,"T",bf),d(z,"I",ju),d(z,"F",bc);const li=e.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const t=e.useAttrs(),i=e.computed(()=>{const o={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=t[r]);return o});return(o,r)=>(e.openBlock(),e.createBlock(e.unref(x.QBadge),e.mergeProps(e.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),ie=e.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:Gt.M,required:!1},type:{type:String,default:he.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,i=e.useAttrs(),o=e.computed(()=>{const S={};for(const P of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(P)||(S[P]=i[P]);return S}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?he.Primary:t.type),l=e.computed(()=>{const S={};return t.margin&&(S.margin=t.margin),t.padding&&(S.padding=t.padding),t.width&&(S.maxWidth=t.width,S.minWidth=t.width),t.height&&(S.minHeight=t.height,S.maxHeight=t.height),t.fontSize&&(S.fontSize=t.fontSize),S}),u={[he.Primary]:"primary",[he.Success]:"positive",[he.Warning]:"warning",[he.Error]:"negative",[he.Info]:"info"},f=e.computed(()=>i.color!==void 0?i.color:u[c.value]??"primary"),h={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},p=e.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:h[t.size]??"md"),y=e.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(t.skin)),b=e.computed(()=>i.outline!==void 0?i.outline:t.skin==="invert"),N=e.computed(()=>i.unelevated!==void 0?i.unelevated:t.skin==="base"),E=e.computed(()=>i.disable??t.disabled);return(S,P)=>(e.openBlock(),e.createBlock(e.unref(x.QBtn),e.mergeProps(e.unref(o),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(y),outline:e.unref(b),unelevated:e.unref(N),disable:e.unref(E),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Pf=["innerHTML"],If={key:1},Jo=D(e.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,default:""},fontWeight:{type:String,required:!1,default:""},background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},justifyContent:{type:String,required:!1,default:"center"},isHtml:{type:Boolean,required:!1,default:!1}},emits:["click"],setup(n){const t=n,i={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[e.createVNode(e.unref(x.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Pf)):(e.openBlock(),e.createElementBlock("span",If,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=D(e.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,required:!1},typeStyle:{type:String,default:"primary",required:!1},height:{type:String,default:"16px",required:!1},relPosition:{type:String,default:"right",required:!1},level:{type:String,default:"top",required:!1}},setup(n){const t=n,i=e.useAttrs(),o=e.computed(()=>{const l={};for(const u of Object.keys(i))u!=="delay"&&(l[u]=i[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(o),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(x.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(Jo,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(x.QTooltip),e.mergeProps({key:1},e.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Vt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},et=D(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:i}){const o=i,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const b={};for(const N of Object.keys(s))N!=="id"&&N!=="disable"&&(b[N]=s[N]);return b}),l=n,u=e.computed(()=>s.disable??l.disabled),f=e.ref(null);function h(){var b;(b=f.value)==null||b.focus()}t({focus:h});const p=()=>{o("input",r.value)},y=e.computed(()=>{const b={};return l.margin&&(b.margin=l.margin),l.padding&&(b.padding=l.padding),l.width&&(b.width=l.width),l.borderColor&&(b["--p-border-color"]=l.borderColor),b});return(b,N)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=E=>r.value=E)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(y),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":p,onBlur:N[1]||(N[1]=E=>b.$emit("blur",r.value)),onFocus:N[2]||(N[2]=E=>b.$emit("focus",r.value)),onClear:N[3]||(N[3]=E=>b.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(b.$slots,"before",{},()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(b.$slots,"append",{},()=>[e.renderSlot(b.$slots,"right",{},void 0,!0)],!0)]),_:2},[b.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,b.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,b.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,b.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,b.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,b.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,b.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-c4acf8be"]]),dn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:e.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=e.useAttrs(),o=e.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QDialog),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value=a)},e.unref(o),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Rf={class:"q-mb-md"},Af={class:"text-subtitle1 text-weight-medium text-grey-9"},zf={class:"text-caption text-grey-6 q-mt-xs"},ci=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(dn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Rf,[e.createVNode(e.unref(x.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Af,e.toDisplayString(n.title),1),e.createElementVNode("div",zf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ie,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[r]]),e.createVNode(ie,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),Df={class:"q-mr-md"},Ff={class:"text-subtitle1 text-weight-medium text-grey-9"},di=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(dn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Df,[e.createVNode(ie,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Ff,e.toDisplayString(n.title),1),e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(ie,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[r]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ie,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[r]]),e.createVNode(ie,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"])}}}),Of={class:"q-mt-sm"},Lf={class:"row items-center justify-between q-mb-xs q-px-xs"},_f={class:"row items-center q-gutter-xs"},Hf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Uf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},vf={style:{"min-width":"0"}},qf={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},jf={key:0,class:"text-caption text-grey-6 ellipsis"},Wf={class:"row items-center no-wrap q-gutter-xs"},Gf={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Qf={class:"text-body2 text-grey-7"},un=D(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...Vt,...t.labels})),o=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),y=e.ref(-1),b=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(i.value.copiedEmail))},N=$=>{var M,A;s.value=$,a.value=o.value[$],c.value=t.adapter.emailValue(o.value[$]),l.value=((A=(M=t.adapter).emailDescription)==null?void 0:A.call(M,o.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(i.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,z.UI.Notify.Success(i.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},S=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),N(o.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},P=$=>{y.value=$,p.value=!0},C=async()=>{var $,M;h.value=!0;try{const A=o.value[y.value];await t.adapter.removeEmail((M=($=t.adapter).emailId)==null?void 0:M.call($,A)),o.value.splice(y.value,1),p.value=!1,z.UI.Notify.Success(i.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,M)=>(e.openBlock(),e.createElementBlock("div",Of,[e.createElementVNode("div",Lf,[e.createElementVNode("div",_f,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Hf,e.toDisplayString(e.unref(i).emailsTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(li,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ie,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:S},null,8,["loading"])]),e.unref(o).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).emailId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Uf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",vf,[e.createElementVNode("div",qf,e.toDisplayString(n.adapter.emailValue(A)),1),(De=(Ee=n.adapter).emailDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",jf,e.toDisplayString((ge=(Me=n.adapter).emailDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Wf,[e.createVNode(ie,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>b(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ie,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(ie,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>P(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",Gf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Qf,e.toDisplayString(e.unref(i).noEmails),1),M[7]||(M[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ie,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:S},null,8,["loading"])])),e.createVNode(di,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[2]=A=>e.isRef(r)?r.value=A:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(c)?c.value=A:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterEmail,A=>!A||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(ci,{modelValue:e.unref(p),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:C},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),Yf={class:"q-mt-sm"},Xf={class:"row items-center justify-between q-mb-xs q-px-xs"},Zf={class:"row items-center q-gutter-xs"},Jf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Kf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},em={style:{"min-width":"0"}},tm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},nm={key:0,class:"text-caption text-grey-6 ellipsis"},im={class:"row items-center no-wrap q-gutter-xs"},om={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},rm={class:"text-body2 text-grey-7"},fn=D(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...Vt,...t.labels})),o=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),y=e.ref(-1),b=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(i.value.copiedNumber))},N=$=>{var M,A;s.value=$,a.value=o.value[$],c.value=t.adapter.phoneNumber(o.value[$]),l.value=((A=(M=t.adapter).phoneDescription)==null?void 0:A.call(M,o.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(i.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,z.UI.Notify.Success(i.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},S=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),N(o.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},P=$=>{y.value=$,p.value=!0},C=async()=>{var $,M;h.value=!0;try{const A=o.value[y.value];await t.adapter.removePhone((M=($=t.adapter).phoneId)==null?void 0:M.call($,A)),o.value.splice(y.value,1),p.value=!1,z.UI.Notify.Success(i.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,M)=>(e.openBlock(),e.createElementBlock("div",Yf,[e.createElementVNode("div",Xf,[e.createElementVNode("div",Zf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",Jf,e.toDisplayString(e.unref(i).phonesTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(li,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ie,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:S},null,8,["loading"])]),e.unref(o).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).phoneId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Kf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",em,[e.createElementVNode("div",tm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(De=(Ee=n.adapter).phoneDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",nm,e.toDisplayString((ge=(Me=n.adapter).phoneDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",im,[e.createVNode(ie,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>b(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ie,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(ie,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>P(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",om,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",rm,e.toDisplayString(e.unref(i).noPhones),1),M[7]||(M[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ie,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:S},null,8,["loading"])])),e.createVNode(di,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[2]=A=>e.isRef(r)?r.value=A:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(c)?c.value=A:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(ci,{modelValue:e.unref(p),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:C},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),sm={class:"row items-center q-gutter-sm"},am={class:"text-weight-medium text-grey-9"},lm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Vt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,i=e.computed(()=>({...Vt,...t.labels})),o=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),z.UI.Notify.Success(i.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",sm,[e.createVNode(ie,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(x.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",am,e.toDisplayString(n.title),1),e.unref(o).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(li,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(x.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(ie,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(x.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(x.QSeparator)),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(x.QSeparator),{class:"q-my-sm"}),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),Ko=D(lm,[["__scopeId","data-v-327b9235"]]),cm={class:"contact-edit-wrapper"},er=D(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",cm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),dm={class:"edit-emails-wrapper"},tr=D(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),um={class:"edit-phones-wrapper"},nr=D(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",um,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),fm={class:"contact-view-wrapper"},ir=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function ca(n){n.component("PContactForm",Ko),n.component("PContactFormDeleteDialog",ci),n.component("PContactFormEdit",er),n.component("PContactFormEditDialog",di),n.component("PContactFormEditEmails",tr),n.component("PContactFormEditPhones",nr),n.component("PContactFormView",ir),n.component("PContactFormViewEmails",un),n.component("PContactFormViewPhones",fn)}const mm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:Ko,PContactFormDeleteDialog:ci,PContactFormEdit:er,PContactFormEditDialog:di,PContactFormEditEmails:tr,PContactFormEditPhones:nr,PContactFormView:ir,PContactFormViewEmails:un,PContactFormViewPhones:fn,default:ca,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class mn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);z.H.Classes.BuildClass(this,t)}static Create(t){const i=new mn;return i.id=z.H.Id.UUID(),i.fieldId=t,i}}class da{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class or{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class zn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const i=new zn;return i.id=z.H.Id.UUID(),i.fieldId=t,i}}var hm=Object.defineProperty,ui=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&hm(t,i,r),r};const hn=class yo{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new ra);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);z.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const i=new yo;return i.id=z.H.Id.UUID(),i.formSectionId=t,i}getRegisterPropertyRadioOriginalValue(t){const i=this.answerVariants.find(o=>o.id===t);return i?i.name:""}addRadioItem(t){const i=new mn(t);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(t){const i=this.answerVariants[t].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(t,1)}changeRelation(t){const i=t.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,i)=>t.order=i)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new or(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new zn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=mn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=yo.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=zn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new yo(this);return t.id=z.H.Id.UUID(),t.answerVariants.forEach(i=>{i.id=z.H.Id.UUID(),i.fieldId=t.id}),t.children=t.children.map(i=>{const o=i.copy();return o.parentId=t.id,o}),t}};ui([z.H.Classes.GetClassConstructor(mn)],hn.prototype,"answerVariants"),ui([z.H.Classes.GetClassConstructor(da)],hn.prototype,"fieldExamples"),ui([z.H.Classes.GetClassConstructor(zn)],hn.prototype,"fieldVariants"),ui([z.H.Classes.GetClassConstructor(or)],hn.prototype,"fieldMeasures"),ui([z.H.Classes.GetClassConstructor(hn)],hn.prototype,"children");let Gi=hn;class rr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Et);z.H.Classes.BuildClass(this,t)}}class pn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");z.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new pn;return o.id=jt(),o.fieldFillId=t,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var pm=Object.defineProperty,ua=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&pm(t,i,r),r};const sr=class Qr{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Et);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);z.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,i){const o=new Qr;return o.id=jt(),o.fieldId=t.id,o.formFillId=i,o.order=t.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,i){return t.map(o=>Qr.Create(o,i))}addFile(){const t=new rr;return t.id=jt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(i=>t.push(i.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,i){const o=pn.Create(this.id,t);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(t,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===t&&o.answerVariantIdY===i)}addSelectedAnswerVariant(t){const i=pn.Create(this.id,t);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(t){const i=t.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};ua([z.H.Classes.GetClassConstructor(pn)],sr.prototype,"selectedAnswerVariants"),ua([z.H.Classes.GetClassConstructor(rr)],sr.prototype,"answerFiles");let Dn=sr;class gm{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var ym=Object.defineProperty,wm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&ym(t,i,r),r};const fa=class vl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,i){return`${this.getFieldN(t)}.${i+1}`}static Create(t){const i=new vl;return i.id=z.H.Id.UUID(),i.formId=t,i}addField(){const t=Gi.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,i)=>t.order=i)}getAnswerVariants(){const t=[];return this.fields.forEach(i=>t.push(...i.answerVariants)),t}};wm([z.H.Classes.GetClassConstructor(Gi)],fa.prototype,"fields");let Qi=fa;var bm=Object.defineProperty,Cm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&bm(t,i,r),r};const ma=class ql{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);z.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new ql;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Qi.Create(this.id);return this.formSections.push(t),z.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(o=>o.fields).flat(),i=t.map(o=>o.children).flat();return t.concat(i).filter(o=>o.children.length===0)}};Cm([z.H.Classes.GetClassConstructor(Qi)],ma.prototype,"formSections");let ha=ma;var Sm=Object.defineProperty,km=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Sm(t,i,r),r};const pa=class jl{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");z.H.Classes.BuildClass(this,t)}static Create(t){const i=new jl;return i.id=z.H.Id.UUID(),i.formId=t.id,i.fieldFills.push(...Dn.CreateMany(t.getFields(),i.id)),i}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===t)}pushRegisterProperty(t){const i=new Dn;i.researchResultId=t,this.fieldFills.push(i)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(i=>i.researchResultId===t)}getOrCreateFieldFill(t){let i=this.getFieldFill(t.id);return i||(i=Dn.Create(t),this.addFieldFill(i)),i}getFileInfos(){const t=[];return this.fieldFills.forEach(i=>t.push(...i.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(t/i*100)}getFieldFillByFieldId(t){return this.fieldFills.find(i=>i.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(i=>i.answerVariantId===t)}getFieldsFieldFillsMap(t){const i={};return t.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};km([z.H.Classes.GetClassConstructor(Dn)],pa.prototype,"fieldFills");let ga=pa;const xm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:mn,Field:Gi,FieldExample:da,FieldFill:Dn,FieldFillFile:rr,FieldFilter:gm,FieldMeasure:or,FieldVariant:zn,Form:ha,FormFill:ga,FormSection:Qi,SelectedAnswerVariant:pn},Symbol.toStringTag,{value:"Module"}));let Em=class extends xe{constructor(){super(mn,"answer-variants")}};const Bm=new Em;let Nm=class extends xe{constructor(){super(Dn,"field-fills")}};const Vm=new Nm;let $m=class extends xe{constructor(){super(Gi,"fields")}};const Tm=new $m;let Mm=class extends xe{constructor(){super(ga,"form-fills")}};const Pm=new Mm;let Im=class extends xe{constructor(){super(Qi,"form-sections")}};const Rm=new Im;let Am=class extends xe{constructor(){super(ha,"forms")}};const zm=new Am;let Dm=class extends xe{constructor(){super(pn,"selected-answer-variants")}};const Fm=new Dm,Om=Object.freeze(Object.defineProperty({__proto__:null,C:xm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Bm,FieldFills:Vm,Fields:Tm,FormFills:Pm,FormSections:Rm,Forms:zm,SelectedAnswerVariants:Fm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Yi{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new Et);d(this,"iconName","");d(this,"svgCode","");K.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Lm=Object.defineProperty,_m=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Lm(t,i,r),r};class ar{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new Et);K.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(i=>{t.push(i.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Yi)}removeSubMenu(t){const i=this.subMenus[t].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=t[i],i=t.length-1?i=0:i++})}containPath(t){return this.link===t||!!this.subMenus.find(i=>i.link===t)}static GetClassName(){return"menu"}}_m([K.GetClassConstructor(Yi)],ar.prototype,"subMenus");const Hm=Object.freeze(Object.defineProperty({__proto__:null,Menu:ar,SubMenu:Yi},Symbol.toStringTag,{value:"Module"}));let Um=class extends z.H.BaseStore{constructor(){super(ar,"menus")}};const vm=new Um;let qm=class extends z.H.BaseStore{constructor(){super(Yi,"sub-menus")}};const jm=new qm,Wm=Object.freeze(Object.defineProperty({__proto__:null,C:Hm,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:vm,SubMenus:jm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ot{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});z.H.Classes.BuildClass(this,t)}static Create(t){const i=new Ot;return i.id=z.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}}var Gm=Object.defineProperty,Qm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Gm(t,i,r),r};const ya=class Wl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t){const i=new Wl;return i.id=z.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}};Qm([z.H.Classes.GetClassConstructor(Ot)],ya.prototype,"slots");let Fn=ya;var Ym=Object.defineProperty,wa=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Ym(t,i,r),r};const lr=class Gl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new Gl;return o.id=z.H.Id.UUID(),o.placeId=t,o.scheduleDayId=i,o}addSession(){const t=Fn.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ot.Create(this.id);return this.slots.push(t),t}};wa([z.H.Classes.GetClassConstructor(Fn)],lr.prototype,"sessions"),wa([z.H.Classes.GetClassConstructor(Ot)],lr.prototype,"slots");let fi=lr;var Xm=Object.defineProperty,Zm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Xm(t,i,r),r};const ba=class Ql{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);z.H.Classes.BuildClass(this,t)}static Create(t,i,o=new Date){const r=new Ql;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=i||"",r.date=o,r}};Zm([z.H.Classes.GetClassConstructor(fi)],ba.prototype,"schedules");let Xi=ba;class On{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");z.H.Classes.BuildClass(this,t)}static Create(){const t=new On;return t.id=z.H.Id.UUID(),t}}const Jm=Object.freeze(Object.defineProperty({__proto__:null,Schedule:fi,ScheduleDay:Xi,SchedulePlace:On,ScheduleSession:Fn,ScheduleSlot:Ot},Symbol.toStringTag,{value:"Module"})),ae=n=>n?z.H.Time.HMtoM(n):NaN,Xe=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),gn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},Ln=(n,t)=>z.H.Time.DiffM(n,t),bt=(n,t)=>z.H.Time.AddMtoHM(n,t),cr=(n,t)=>{const i=ae(n.startTime),o=ae(t.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},mi=(n,t)=>{const i=ae(n.startTime),o=ae(n.endTime),r=ae(t.startTime),s=ae(t.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},hi=(n,t)=>Math.round(n/t)*t,Ca=(n,t=8*60,i=20*60)=>{let o=t,r=i;for(const{item:c}of n){const l=ae(c.startTime),u=ae(c.endTime);isFinite(l)&&(o=Math.min(o,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Sa=(n,t)=>{const i=ae(n.item.startTime),o=ae(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-t.start)/t.total*100,s=Math.max((o-i)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},ka=(n,t)=>{const i=ae(n.startTime),o=ae(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=ae(t.startTime),a=ae(t.endTime),c=isFinite(s)?Math.max((s-i)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},xa=(n,t,i)=>n.some(o=>o.item.id===t.item.id||t.kind==="session"&&o.kind==="slot"&&o.item.sessionId===t.item.id?!1:i(t.item,o.item)),Ea=(n,t,i)=>n.some(o=>o.id!==t.id&&i(t,o)),Ba=(n,t,i,o)=>{if(!(!isFinite(t)||!isFinite(i)||i<=t))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&i<=a})},Na=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",dr={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Va={createDay(n){return Xi.Create(void 0,void 0,n)},createSchedule(n,t){return fi.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],i=t[t.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=Fn.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=z.H.Time.AddMtoHM(o,30),r},createSlot(n){return Ot.Create(n==null?void 0:n.id)},createPlace(n){const t=On.Create();return t.name=n||"",t}},Km={class:"schedule-admin"},eh={key:0,class:"no-days text-center text-grey q-py-xl"},th={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},nh={key:1,class:"row items-center q-gutter-xs zoom-control"},ih={key:0,class:"grid-view"},oh={key:0,class:"text-grey text-center q-py-lg"},rh={class:"grid-header"},sh={class:"row items-center justify-center q-gutter-xs"},ah={class:"ellipsis"},lh={class:"time-gutter"},ch=["data-schedule-id","onDblclick","onContextmenu"],dh=["title","onPointerdown","onClick","onContextmenu"],uh={class:"block-content"},fh={class:"block-time"},mh={class:"block-name ellipsis"},hh={key:0,class:"block-speakers ellipsis"},ph={key:0,class:"session-perfoms"},gh=["title","onPointerdown","onClick","onContextmenu"],yh={class:"nested-time"},wh={class:"nested-name ellipsis"},bh={key:0,class:"nested-speakers ellipsis"},Ch=["title","onPointerdown"],Sh={class:"block-actions"},kh=["title","onPointerdown"],xh=["title"],Eh={class:"session-spine-name"},Bh={class:"block-time"},Nh={key:0,class:"session-badge"},Vh={key:1,class:"conflict-badge"},$h={class:"block-name ellipsis"},Th={class:"text-caption text-grey-6 q-pa-xs"},Mh={key:1,class:"list-view"},Ph={class:"row items-center q-gutter-sm"},Ih={class:"text-subtitle2"},Rh={key:0,class:"sub-block"},Ah={class:"sub-title"},zh={class:"list-row session-row"},Dh={key:0,class:"nested-list"},Fh={class:"col-4 ellipsis"},Oh={class:"time-text"},Lh={class:"sub-block"},_h={class:"sub-title"},Hh={class:"list-row slot-row"},Uh={key:0,class:"text-grey text-center q-py-sm"},vh={class:"text-caption text-grey-6 q-mb-sm"},qh={class:"text-h6"},jh={class:"row items-center q-gutter-sm q-mb-md"},Wh={key:0,class:"text-grey text-center q-py-md"},Gh={class:"col ellipsis"},Qh={class:"text-h6"},Yh={class:"row q-col-gutter-sm q-mb-sm"},Xh={class:"col-6"},Zh={class:"col-6"},Jh=["onClick"],yn=15,$a=6,Ta=D(e.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},sessionsEnabled:{type:Boolean,default:!0}},setup(n){var Dl,Fl;const t=n,i=e.computed(()=>t.sessionsEnabled!==!1),o=e.computed(()=>({...dr,duplicate:"Дублировать",...t.labels})),r=e.computed(()=>({...Va,...t.factories})),s=m=>t.slotListOf?t.slotListOf(m):(m==null?void 0:m.slots)||[],a=m=>t.nestedSlotListOf?t.nestedSlotListOf(m):(m==null?void 0:m.slots)||[],c=m=>(m==null?void 0:m.name)||o.value.hall,l=m=>t.sessionName?t.sessionName(m):(m==null?void 0:m.name)||`${o.value.session} ${(m==null?void 0:m.startTime)||""}–${(m==null?void 0:m.endTime)||""}`.trim(),u=m=>t.slotName?t.slotName(m):(m==null?void 0:m.name)||o.value.slot,f=m=>t.slotSubtitle?t.slotSubtitle(m):"",h=e.ref("grid"),p=e.ref((Fl=(Dl=t.days)==null?void 0:Dl[0])==null?void 0:Fl.id),y=e.ref(!1),b=e.ref(""),N=e.ref(!1),E=e.ref(null),S=e.ref(null),P=e.ref(void 0),C=e.ref(null),$=e.ref(null),M=e.ref(!1),A=e.ref(0),G=e.ref(null),de=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],$e=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch($e,m=>localStorage.setItem("schedule-grid-zoom",String(m)));const Ee=e.computed(()=>Math.max(ue.value.total/60*$e.value,360)),De=e.computed(()=>Ee.value+"px"),Me=e.computed(()=>[...t.days||[]].sort((m,g)=>new Date(m.date).getTime()-new Date(g.date).getTime())),ge=e.computed(()=>Me.value.find(m=>m.id===p.value));e.watch(()=>Me.value.map(m=>m.id).join(","),()=>{var m;(!p.value||!Me.value.some(g=>g.id===p.value))&&(p.value=(m=Me.value[0])==null?void 0:m.id)});const Be=m=>{if(t.dayTitle)return t.dayTitle(m);const g=new Date(m.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Pt=m=>{const g=new Date(m);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},It=async(m,g)=>{g&&(m.date=new Date(g),await t.persist.updateDay(m),await t.persist.refresh())},Jt=async m=>{var w;if(!m)return;for(const T of lt(m))await We(T);await t.persist.removeDay(m);const g=(t.days||[]).indexOf(m);g>=0&&t.days.splice(g,1),await t.persist.refresh(),p.value=(w=Me.value[0])==null?void 0:w.id},bn=async()=>{var F,X;const m=Me.value,g=m[m.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let T;try{T=r.value.createDay(w)}catch{t.persist.notify("warning",o.value.saveEventFirst);return}try{await((X=(F=t.persist).createDay)==null?void 0:X.call(F,T));for(const fe of t.places||[])await Ze(fe,T);await t.persist.refresh()}catch{t.persist.notify("negative",o.value.createFailed);return}p.value=T.id,t.persist.notify("positive",`${o.value.dayAdded}: ${Be(T)}`)},lt=m=>((m==null?void 0:m.schedules)||[]).slice().sort((g,w)=>{const T=je(g),F=je(w);return T.localeCompare(F,"ru")}),je=m=>{if(t.hallName)return t.hallName(m);const g=m.place||(t.places||[]).find(w=>w.id===m.placeId);return(g==null?void 0:g.name)||o.value.hall},be=()=>{y.value=!0},Q=e.computed(()=>{const m=ge.value,g=new Set(((m==null?void 0:m.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),Ze=async(m,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(m,g,r.value.createSchedule);return}const w=r.value.createSchedule(m.id,g.id);await t.persist.createSchedule(w)},St=async m=>{y.value=!1;const g=ge.value;if(!g){t.persist.notify("warning",o.value.selectDayFirst);return}if(lt(g).some(w=>w.placeId===m.id)){t.persist.notify("warning",o.value.alreadyAdded);return}try{await Ze(m,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",o.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),p.value=g.id},ye=async()=>{var w,T,F;const m=(w=b.value)==null?void 0:w.trim();if(!m){t.persist.notify("warning",o.value.enterName);return}const g=r.value.createPlace(m);try{if(!await((F=(T=t.persist).createPlace)==null?void 0:F.call(T,g))){t.persist.notify("negative",o.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),t.persist.notify("negative",o.value.hallCreateFailed);return}b.value="",await St(g),t.persist.notify("positive",o.value.hallCreated.replace("{name}",m))},se=async m=>{await We(m);const g=vt(m);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==m.id)),await t.persist.refresh()},We=async m=>{for(const g of m.sessions||[]){for(const w of a(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of s(m))await t.persist.removeSlot(g);await t.persist.removeSchedule(m)},vt=m=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===m.id)),ct=m=>[...a(m)].sort(cr),rt=m=>(m.sessions||[]).some(g=>a(g).length>0),Kt=new WeakMap,Fe=m=>{const g=Kt.get(m),w=s(m);if(g&&g.src===w)return g.list;const T=new Set((m.sessions||[]).map(X=>X.id)),F=w.filter(X=>!X.sessionId||!T.has(X.sessionId));return Kt.set(m,{src:w,list:F}),F},Rt=m=>[...i.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],...Fe(m).map(g=>({kind:"slot",item:g}))],Cn=m=>i.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],ue=e.computed(()=>{var g,w;const m=(((g=ge.value)==null?void 0:g.schedules)||[]).flatMap(T=>Rt(T));for(const T of((w=ge.value)==null?void 0:w.schedules)||[])for(const F of T.sessions||[])m.push(...ct(F).map(X=>({kind:"slot",item:X})));return Ca(m)}),ee=e.computed(()=>{const m=[];for(let g=ue.value.start;g<=ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),Oe=e.computed(()=>{const m=[];for(let g=ue.value.start+30;g<ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),st=m=>Sa(m,ue.value),gt=e.computed(()=>{if(!C.value||!S.value)return{};const m=ue.value,g=(C.value.minutes-m.start)/m.total*100,w=Math.max(S.value.duration/m.total*100,2.5);return{top:g+"%",height:w+"%"}}),en=e.computed(()=>!C.value||!S.value?"":Xe(C.value.minutes+S.value.duration)),Sn=e.computed(()=>{if(!C.value)return{};const m=ue.value,g=(C.value.minutes-m.start)/m.total*100,w=Math.max(yn/m.total*100,1.5);return{top:g+"%",height:w+"%"}}),dt=e.computed(()=>{var F,X,fe,Te,Re;if(!C.value||!S.value||!S.value.id)return 0;const m=Gn(C.value.scheduleId);if(!m)return 0;const g={startTime:C.value.time,endTime:en.value},w=(F=C.value.session)==null?void 0:F.id;let T=0;for(const R of Rt(m))R.item.id!==((X=S.value)==null?void 0:X.id)&&(((fe=S.value)==null?void 0:fe.kind)==="slot"&&R.kind==="session"&&R.item.id===w||mi(g,R.item)&&T++);if(((Te=S.value)==null?void 0:Te.kind)==="slot"&&C.value.session)for(const R of ct(C.value.session))R.id!==((Re=S.value)==null?void 0:Re.id)&&mi(g,R)&&T++;return T}),fo=e.computed(()=>dt.value>0),mo=(m,g)=>xa(Rt(m),g,mi),_r=(m,g)=>Ea(ct(m),g,mi),kn=(m,g)=>ka(m,g),Hr=m=>{const g=ue.value,w=ae(m.item.startTime),T=ae(m.item.endTime);return!isFinite(w)||!isFinite(T)?48:(T-w)/g.total*Ee.value},Wn=m=>Na(Hr(m)),Ur=m=>{const g=t.slotName?t.slotName(m.item):m.item.name||(m.kind==="session"?o.value.session:o.value.slot);if(m.kind==="slot"&&Wn(m)!=="h-full"){const w=f(m.item);if(w)return`${g} — ${w}`}return g},wi=(m,g)=>{const w=u(m);if(g!=="h-full"){const T=f(m);if(T)return`${w} — ${T}`}return w},B=m=>{const g=`${m.item.startTime||"?"}–${m.item.endTime||"?"}`;if(m.kind==="slot"){const w=f(m.item);return[u(m.item),g,w?`${o.value.participants}: ${w}`:""].filter(Boolean).join(`
21
+ `,a+1),l=c===-1?"":s.slice(c+1);String(i.stack).endsWith(l)||(i.stack+=`
22
+ `+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=an(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&vo.assertOptions(i,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean),legacyInterceptorReqResOrdering:Qe.transitional(Qe.boolean),advertiseZstdAcceptEncoding:Qe.transitional(Qe.boolean),validateStatusUndefinedResolves:Qe.transitional(Qe.boolean)},!1),r!=null&&(S.isFunction(r)?o.paramsSerializer={serialize:r}:vo.assertOptions(r,{encode:Qe.function,serialize:Qe.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),vo.assertOptions(o,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&S.merge(s.common,s[o.method]);s&&S.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete s[C]}),o.headers=Ge.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(o)===!1)return;l=l&&N.synchronous;const E=o.transitional||zi;E&&E.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const u=[];this.interceptors.response.forEach(function(N){u.push(N.fulfilled,N.rejected)});let f,h=0,p;if(!l){const C=[qs.bind(this),void 0];for(C.unshift(...c),C.push(...u),p=C.length,f=Promise.resolve(o);h<p;)f=f.then(C[h++],C[h++]);return f}p=c.length;let k=o;for(;h<p;){const C=c[h++],N=c[h++];try{k=C(k)}catch(E){N.call(this,E);break}}try{f=qs.call(this,k)}catch(C){return Promise.reject(C)}for(h=0,p=u.length;h<p;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=an(this.defaults,t);const o=As(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Es(o,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){ln.prototype[t]=function(o,i){return this.request(an(i||{},{method:t,url:o,data:i&&S.hasOwnProp(i,"data")?i.data:void 0}))}}),S.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(an(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[t]=o(),t!=="query"&&(ln.prototype[t+"Form"]=o(!0))});let cu=class Hl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{i.subscribe(c),s=c}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,c){i.reason||(i.reason=new no(s,a,c),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Hl(function(r){t=r}),cancel:t}}};function du(n){return function(o){return n.apply(null,o)}}function uu(n){return S.isObject(n)&&n.isAxiosError===!0}const Ui={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ui).forEach(([n,t])=>{Ui[t]=n});function Ws(n){const t=new ln(n),o=as(ln.prototype.request,t);return S.extend(o,ln.prototype,t,{allOwnKeys:!0}),S.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Ws(an(n,r))},o}const Ve=Ws(to);Ve.Axios=ln,Ve.CanceledError=no,Ve.CancelToken=cu,Ve.isCancel=Ts,Ve.VERSION=Li,Ve.toFormData=Oo,Ve.AxiosError=_,Ve.Cancel=Ve.CanceledError,Ve.all=function(t){return Promise.all(t)},Ve.spread=du,Ve.isAxiosError=uu,Ve.mergeConfig=an,Ve.AxiosHeaders=Ge,Ve.formToJSON=n=>$s(S.isHTMLForm(n)?new FormData(n):n),Ve.getAdapter=vs.getAdapter,Ve.HttpStatusCode=Ui,Ve.default=Ve;const{Axios:$w,AxiosError:Tw,CanceledError:Mw,isCancel:Pw,CancelToken:Iw,VERSION:Rw,all:Aw,Cancel:zw,isAxiosError:Dw,spread:Fw,toFormData:Ow,AxiosHeaders:Lw,HttpStatusCode:_w,formToJSON:Hw,getAdapter:Uw,mergeConfig:vw,create:qw}=Ve;var oo=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(oo||{});const io=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function o(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function i(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!n())return;const u=io.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class vi{constructor(t){d(this,"code",400);d(this,"err","");K.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,o){const i=t.config;if(t.response){if(t.response.status===401&&!i._retry)return i._retry=!0,o.defaults.headers.common.token=io.getAccessToken(),t.config.headers.token=io.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Nn.Error("Неверный логин или пароль");return}Nn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new vi(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const Rn=Ve.create();Rn.interceptors.response.use(n=>n,async n=>await vi.Handle(n,Rn));class ro{static async Get(t,o,i){return await Rn({method:oo.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await Rn({method:oo.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await Rn({method:oo.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await Rn({method:oo.DELETE,url:t,headers:o})}}class qo{constructor(t){d(this,"name","");K.BuildClass(this,t)}static Set(){}static Get(t,o){const i=sessionStorage.getItem(t);if(i){const r=JSON.parse(i),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(o||10)?null:r.data}else return null}static async TryGet(t,o,i){let r;return r=qo.Get(t,i),r||(r=await o()),r}}var qi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(qi||{}),Gs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Gs||{});const pe=class pe{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ce.BuildSafeUrl(t,o,i),this.host=t,this.apiVersion=i}static newWebSocket(t){const o=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(o)}static download(t,o){const i=pe.getDownloadFileName(t,o.headers);if(!(o.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(o.data),s=document.createElement("a");s.href=r,s.setAttribute("download",i),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,o){if(t)return t;const i=o["content-disposition"];if(!i)return"file";const r=i.indexOf('"')+1,s=i.lastIndexOf('"'),a=i.substring(r,s);return a||"file"}static getHeaders(t){const o=xt.Get(ut.AccessToken);return t||(t=pe.headers),o&&(t[qi.Token]=o),t??pe.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?pe.download(t.downloadFileName,o):o.data}static async Get(t){return pe.returnResponse(t,await ro.Get(pe.buildUrl((t==null?void 0:t.query)??""),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return pe.returnResponse(t,await ro.Post(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.getResponseType(t.isBlob),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return pe.returnResponse(t,await ro.Put(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers),pe.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return pe.returnResponse(t,await ro.Delete(pe.buildUrl(t==null?void 0:t.query),pe.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(pe.buildUrl(o))}static buildUrl(t=""){try{return xi(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,o){const i=new FormData;if(i.append("form",JSON.stringify(t)),o)for(const r of o)r.file&&i.append(r.id??"files",r.file,r.originalName);return i}};d(pe,"baseUrl",""),d(pe,"apiVersion","api"),d(pe,"host",""),d(pe,"headers",{[qi.ContentType]:Gs.ApplicationJson});let ke=pe;const D=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},fu={},mu={style:{"text-align":"center"}};function hu(n,t){return e.openBlock(),e.createElementBlock("div",mu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Qs=D(fu,[["render",hu]]),pu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Qs}],pt=class pt{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(pu)}static Get(){return this.router}static AddRoutes(t){t.forEach(o=>{this.Get().addRoute(o)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return pt.GetStringParam("id")}static Slug(){return pt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return pt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const o=this.Get().resolve({path:t});window.open(o==null?void 0:o.href,"_blank")}static GetPath(){var o;const t=(o=pt.Route())==null?void 0:o.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let o=t;o[0]==="/"&&(o=t.substring(1)),await pt.To(`/admin/${o}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var o;return(o=this.Route())==null?void 0:o.params[t]}static SetQueryParam(t,o){const i=new URL(window.location);i.searchParams.set(t,String(o)),history.replaceState(null,"",i)}static Resolve(t){return this.Get().resolve(t)}};d(pt,"router"),d(pt,"title",""),d(pt,"ChangeDocumentTitle",(t="")=>{let o=pt.Route().meta.title??t;o&&(o=" | "+o),document.title=pt.title+o});let Bt=pt;class xe{constructor(t,o){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=o}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",o="id"){const i=`${this.getUrl()}/options/${t}/${o}`;try{const r=await ke.Get({query:i});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let o;const i=ke.Get;t&&t.withCache?o=await qo.TryGet(this.getUrl(),i):o=await i({query:this.getUrl()}),Array.isArray(o)?this.SetAll(o):this.SetAllWithCount(o)}catch(o){console.warn("GetAll failed:",o)}}async Get(t){try{t||(t=Bt.Id()),this.Set(await ke.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await z.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(o){console.warn("GetBySlug failed:",o)}}async FTSP(t){var o;try{const r=((t==null?void 0:t.ftsp)??Ft.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await ke.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((o=a.data)==null?void 0:o.items);return}this.SetAllWithCount(a.data)}}catch(i){console.warn("FTSP failed:",i)}}async Create(t){try{const o=t??this.item,i={payload:o,query:this.getUrl()};return o.getFileInfos&&(i.fileInfos=o.getFileInfos()),await ke.Post(i)}catch(o){console.warn("Create failed:",o)}}async CreateAndSet(t){const o=await this.Create(t);this.Set(o)}async CreateMany(t){if(!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Create(i)))}),Promise.all(o)}async Update(t){try{const o=t??this.item,i={query:this.getUrl(`${o.id}`),payload:o};return o.getFileInfos&&(i.fileInfos=o.getFileInfos(),i.fileInfos.forEach(r=>r.url="")),await ke.Put(i)}catch(o){console.warn("Update failed:",o)}}async UpdateAndSet(t){const o=await this.Update(t);this.Set(o)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await ke.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(o){console.warn("Remove failed:",o)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Update(i)))}),Promise.all(o)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(o=>new this.classConstructor(o)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const o=this.items.findIndex(i=>i.id===t);o<0||this.items.splice(o,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.push(...o);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){K.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.unshift(...o);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>z.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function gu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const yu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class wu{static GetRandColor(t){return Dt.GetRandEL(t??yu)}}function Ys(n,t){const o=[],i=t||ft.Asc,r=i===ft.Asc?ft.Desc:ft.Asc;return Object.values(n).forEach(s=>{o.push(s(i)),o.push(s(r))}),o.length>0&&!o.some(s=>s.default)&&(o[0].default=!0),t&&o.forEach(s=>{s.default&&(s.default=s.order===t)}),o}let bu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Vo[Qn.FiveMinutes])}startDrag(t,o){this.draggedStartTime=t,this.draggedEndTime=o,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vo[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const ji=n=>n===8||n===46,Cu=n=>n>46&&n<58,Su=n=>n>34&&n<41,ku=n=>n+".",xu=(n,t,o)=>{ji(t)||Su(t)||(!Cu(t)||o>9)&&n.preventDefault()};function Eu(n,t){if(t>8){let o=n.substring(0,2).replace(".","1");Number(o)>31&&(o="31");let i=n.substring(3,5).replace(".","1");Number(i)>12&&(i="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=o+"."+i+"."+r}return n}function Bu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;xu(n,t,i),!ji(t)&&(i===2||i===5)&&(o=ku(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(ji(t)){n.srcElement.value=o;return}o.length===0&&Number(r)>3&&(o="3",n.preventDefault()),o.length===1&&Number(r)>31&&(o="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(o=o.substring(0,3)+"12",n.preventDefault()),o=Eu(o,i),n.srcElement.value=o}const Nu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Vu="ru-RU";class Wt{constructor(){d(this,"locale","ru-RU")}static Format(t,o){if(!t)return"";const i={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return o&&(i.year=o.year||o.year===void 0?o.year:i.year,i.month=o.month||o.month===void 0?o.month:i.month,i.day=o.day||o.day===void 0?o.day:i.day,i.hour=o.hour??i.hour,i.minute=o.minute??i.minute),Intl.DateTimeFormat(Vu,i).format(new Date(t))}static FormatWithTime(t){return Wt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetPeriod(t,o,i){return`${this.Format(t,i)}-${this.Format(o,i)}`}static GetShortDayName(t){return t?Nu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate()-o.getDay()+1),r=new Date(o.getFullYear(),o.getMonth(),i.getDate()+7);return this.GetPeriod(i,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,o){const i=new Date,r=new Date,s=Wt.SplitHourTime(t),a=Wt.SplitHourTime(o);return i.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-i.getTime())/1e3/60}static HourTimeinMunutes(t){const o=Wt.SplitHourTime(t);return o[0]*60+o[1]}static SplitHourTime(t){const o=t.split(":");return[Number(o[0]),Number(o[1])]}static AddMinutesToHM(t,o){const i=new Date,r=Wt.SplitHourTime(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,o){return o.getMonth()-t.getMonth()+12*(o.getFullYear()-t.getFullYear())}static StringToDate(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,o,i){return new Date(t)>=new Date(o)&&new Date(t)<=new Date(i)}static GetDatesFromPeriod(t,o){const i=[new Date(t)];let r=t;for(;r<=o;)r=Wt.AddDays(r,1),i.push(r);return i}static AddDays(t,o){const i=new Date(t);return i.setDate(i.getDate()+o),i}static Eq(t,o){return t.getTime()===o.getTime()}}class $u{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Xs{static Get(t){const o=t.split(".");return o[o.length-1]}}const Tu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Mu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=Ys(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const cn=new Mu;function Pu(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Iu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),cn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Pu(),i=s=>Yl.onBeforeRouteLeave((a,c,l)=>{o((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function Zs(n,t){const o=[];if(n)for(let i=0;i<Math.ceil(n.length/t);i++)o[i]=n.slice(i*t,i*t+t);return o}class Wi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Bt.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const o=this.items.findIndex(i=>i.slug===t);o>-1&&this.Select(o)}static Create(t,o){const i=new Wi;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Bt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const ui=class ui{static Format(t){let o=t;if(!o)t=o;else{(o[0]==="7"||o[0]==="8")&&o.length!==1&&(o=o.slice(1));const i=o.replace(/\+7|[^\d]/g,""),r=i.length;switch(!0){case r===0:t="";break;case(r===1&&o.length===1&&i==="7"):case(r===1&&o.length===1&&i==="8"):t="+7 (";break;case r<4:t=`+7 (${i}`;break;case r<7:t=`+7 (${i.slice(0,3)}) ${i.slice(3)}`;break;case r<9:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}`;break;default:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}-${i.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(ui,"validatePhone",(t,o,i)=>{ui.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Gi=ui;class Ru{static Count(t){const o=t.filter(s=>s.rating!==0);let i=0;o.forEach(s=>i=i+s.rating);const r=i/o.length;return isNaN(r)?0:Number((i/o.length).toFixed(2))}}class Au{static async Auth(t){t&&t()}static Dev(){}}class zu{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Qn.FiveMinutes);d(this,"timelines",Vo[Qn.FiveMinutes])}periodIsCorrect(t,o){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vo[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,o,i,r){return r.filter(s=>s.id!==i).every(s=>!ie.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>ie.HMtoM(o.startTime)-ie.HMtoM(i.startTime))}}const Du=-68;function Fu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Du;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Ou{static Sort(t){t.forEach((o,i)=>o.order=i)}}class jo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return jo.Wait(ie.S(t),o)}static WaitM(t,o){return jo.Wait(ie.M(t),o)}}const so=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Lu=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const o of n){const i=o(t);if(i!==!0)return i}return!0},Email:(n="Некорректный email")=>t=>so(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>o=>so(o)||String(o).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>o=>so(o)||String(o).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>o=>so(o)||n.test(String(o))?!0:t,Required:(n="Обязательное поле")=>t=>so(t)?n:!0},Symbol.toStringTag,{value:"Module"})),_u=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const o=new MutationObserver(()=>{document.querySelector(n)&&(o.disconnect(),t(document.querySelector(n)))});o.observe(document.body,{childList:!0,subtree:!0})});class Wo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");K.BuildClass(this,t)}static Create(t,o,i,r){const s=new Wo;return s.id=jt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Wo;return t.type="ping",t.id=jt(),t}isMessage(){return this.type==="message"||this.type===""}}const Hu="";class Uu{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);K.BuildClass(this,{endpoint:t,query:o,mutation:i}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Wo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Hu.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}let vu=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",ro),d(re,"BaseStore",xe),d(re,"Cache",qo),d(re,"Classes",K),d(re,"CarouselSwipe",gu),d(re,"Color",wu),d(re,"CreateSortModels",Ys),d(re,"Cursor",bu),d(re,"DateMask",Bu),d(re,"Dates",Wt),d(re,"Dragger",$u),d(re,"Extension",Xs),d(re,"Favourite",Tu),d(re,"Hooks",Iu),d(re,"HttpClient",ke),d(re,"Id",Ke),d(re,"MakeCarousel",Zs),d(re,"Period",Si),d(re,"PhoneService",Gi),d(re,"Rating",Ru),d(re,"Router",Bt),d(re,"RouterGuard",Au),d(re,"Scheduler",zu),d(re,"Scroll",Fu),d(re,"Sorter",Ou),d(re,"Static",Ei),d(re,"Strings",Ce),d(re,"Time",ie),d(re,"Timer",jo),d(re,"Token",io),d(re,"Menus",Wi),d(re,"Validate",Lu),d(re,"WaitElement",_u),d(re,"WebSocketClient",Uu),re);class qu{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Js=new qu;var Ks=(n=>(n.TableList="tableList",n.Default="",n))(Ks||{}),Nt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Nt||{}),ea=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ea||{}),ta=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(ta||{}),Qi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Qi||{});const ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Ks,Animations:Nt,CalendarScale:ea,LocalStoreKeys:ut,SocialTypes:ta,ValueRelation:Qi},Symbol.toStringTag,{value:"Module"}));let Wu=class{async Login(t=_e.Form.GetValues()){const o=await ke.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";_e.Status.SetState(o)}async LoginAs(t){await ke.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=_e.Form.GetValues()){const o=await ke.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=_e.Form.GetValues()){await ke.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=_e.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await ke.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await ke.Post({query:"auth/refresh-token",payload:{refreshToken:io.getRefreshToken()}})}async CheckUuid(t){await ke.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await ke.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await ke.Get({query:`auth/email-is-confirm/${t}`})}};const Gu=new Wu;var Qu=Object.defineProperty,Go=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Qu(t,o,r),r};const ao=class Ul{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new $o]);d(this,"phones",[]);d(this,"websites",[]);K.BuildClass(this,t)}addEmail(){const t=Yn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=on.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Ul;return t.id=Ke.UUID(),t}removeEmail(t){K.RemoveFromClassById(t,this.emails)}removePhone(t){K.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new $o)}addWebsite(){this.websites.push(new Bi)}pushFirst(){this.emails.length||this.emails.push(new Yn),this.phones.length||this.phones.push(new on)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Go([K.GetClassConstructor(Yn)],ao.prototype,"emails"),Go([K.GetClassConstructor($o)],ao.prototype,"postAddresses"),Go([K.GetClassConstructor(on)],ao.prototype,"phones"),Go([K.GetClassConstructor(Bi)],ao.prototype,"websites");let Yu=ao,Xu=class extends xe{constructor(){super(Yu,"contacts")}};const Zu=new Xu;let Ju=class extends xe{constructor(){super(Yn,"emails")}};const Ku=new Ju;class Yi{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");K.BuildClass(this,t)}static Create(t){const o=new Yi;return o.id=Ke.UUID(),o.ftsp=JSON.stringify(t),o}}let ef=class extends xe{constructor(){super(Yi,"ftsp-presets")}};const tf=new ef;let nf=class extends xe{constructor(){super(is,"humans")}};const of=new nf;let rf=class extends xe{constructor(){super(on,"phones")}};const sf=new rf;class af{constructor(t){d(this,"id");d(this,"nameRus","");K.BuildClass(this,t)}}var lf=Object.defineProperty,cf=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&lf(t,o,r),r};class na{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);K.BuildClass(this,t)}}cf([K.GetClassConstructor(af)],na.prototype,"fields");let df=class extends xe{constructor(){super(na,"schemas")}};const uf=new df;class oa{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);K.BuildClass(this,t)}}class ff{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");K.BuildClass(this,t)}}var mf=Object.defineProperty,ia=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&mf(t,o,r),r};class An{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);K.BuildClass(this,t)}}ia([K.GetClassConstructor(oa)],An.prototype,"options"),ia([K.GetClassConstructor(ff)],An.prototype,"searchGroupMetaColumns");class Xi{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new An);d(this,"searchObjects",[]);d(this,"pagination",new Po);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new An(o))),t.searchGroup&&(this.searchGroup=new An(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new oa(o))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const o=this.searchGroups.find(i=>i.id===t);o?this.searchGroup=o:this.searchGroup=new An}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let hf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Xi));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await ke.Get({query:`search?key=${t.key}&query=${t.query}`});o&&o.searchGroup&&o.searchGroup.options.forEach(i=>{t.searchObjects.push({id:i.id,value:i.value,label:i.label,description:i.description})})}async mainSearch(t){this.SetSearchModel(await ke.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await ke.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Xi}SetSearchModel(t){t&&(this.searchModel=new Xi(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Zi=new hf;let pf=class extends xe{constructor(){super(To,"users-accounts")}};const gf=new pf;var Ye=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(Ye||{});class ra{constructor(t){d(this,"id");d(this,"name",Ye.String);d(this,"valueRelation",Qi.simple);K.BuildClass(this,t)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===Ye.Radio)return"RadioProp";if(this.name===Ye.Set)return"SetProp";if(this.name===Ye.Number)return"NumberProp";if(this.name===Ye.String)return"StringProp"}}let yf=class extends xe{constructor(){super(ra,"value-types")}};const wf=new yf;let sa=(at=class{},d(at,"Auth",Gu),d(at,"Contacts",Zu),d(at,"Emails",Ku),d(at,"FileInfos",new xe(Et,"file-infos")),d(at,"FTSPPresets",tf),d(at,"Humans",of),d(at,"Phones",sf),d(at,"Schemas",uf),d(at,"UserAccounts",gf),d(at,"ValueTypes",wf),d(at,"Search",Zi),at);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let bf=(Zt=class{},d(Zt,"Orders",ft),d(Zt,"Sizes",Gt),d(Zt,"Statuses",he),d(Zt,"DataTypes",Ae),d(Zt,"ValueTypes",Ye),d(Zt,"Operators",Se),Zt);class Cf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",o){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=o}}const Sf=new Cf;class kf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return Ce.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ce.SearchIn(i.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var o;return this.filterString?(o=t.children)==null?void 0:o.filter(i=>Ce.SearchIn(i.name,this.filterString)):t.children}}const xf=new kf;class Ef{constructor(){d(this,"Menu",e.reactive(xf));d(this,"Head",e.reactive(Sf))}}const Bf=new Ef,aa="Да",la="Нет";class Nf extends Bn{constructor(){super(...arguments);d(this,"confirmButtonText",aa);d(this,"cancelButtonText",la);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(o){const i=typeof o=="string"?{text:o}:o;return this.confirmButtonText=i.confirmButtonText??aa,this.cancelButtonText=i.cancelButtonText??la,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof x.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=x.Dialog.create({title:this.title||void 0,message:this.text,html:Bn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var o;return(o=this.resolve)==null?void 0:o.call(this,!0)})}Cancel(){this.Settle(()=>{var o;return(o=this.reject)==null?void 0:o.call(this)})}Settle(o){o==null||o(),this.resolve=void 0,this.reject=void 0}}const Vf=new Nf;class $f{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Tf extends $f{Show(){super.show()}Hide(){super.hide()}}const Mf=new Tf;class Qt{}d(Qt,"Admin",Bf),d(Qt,"Dialog",Vf),d(Qt,"Loading",Mf),d(Qt,"Notify",Nn),d(Qt,"Btn",nn),d(Qt,"Input",Xr);class z{}d(z,"Auth",e.reactive(_e)),d(z,"UI",e.reactive(Qt)),d(z,"Paginator",e.reactive(Js)),d(z,"S",sa),d(z,"H",vu),d(z,"C",hc),d(z,"T",bf),d(z,"I",ju),d(z,"F",bc);const lo=e.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const t=e.useAttrs(),o=e.computed(()=>{const i={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(i[r]=t[r]);return i});return(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QBadge),e.mergeProps(e.unref(o),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),oe=e.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:Gt.M,required:!1},type:{type:String,default:he.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const y={};for(const M of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(M)||(y[M]=o[M]);return y}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?he.Primary:t.type),l=e.computed(()=>{const y={};return t.margin&&(y.margin=t.margin),t.padding&&(y.padding=t.padding),t.width&&(y.maxWidth=t.width,y.minWidth=t.width),t.height&&(y.minHeight=t.height,y.maxHeight=t.height),t.fontSize&&(y.fontSize=t.fontSize),y}),u={[he.Primary]:"primary",[he.Success]:"positive",[he.Warning]:"warning",[he.Error]:"negative",[he.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),h={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:h[t.size]??"md"),k=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),C=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),N=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),E=e.computed(()=>o.disable??t.disabled);return(y,M)=>(e.openBlock(),e.createBlock(e.unref(x.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(k),outline:e.unref(C),unelevated:e.unref(N),disable:e.unref(E),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Pf=["innerHTML"],If={key:1},Ji=D(e.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,default:""},fontWeight:{type:String,required:!1,default:""},background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},justifyContent:{type:String,required:!1,default:"center"},isHtml:{type:Boolean,required:!1,default:!1}},emits:["click"],setup(n){const t=n,o={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:o,onClick:r[0]||(r[0]=s=>i.$emit("click"))},[e.createVNode(e.unref(x.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Pf)):(e.openBlock(),e.createElementBlock("span",If,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=D(e.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,required:!1},typeStyle:{type:String,default:"primary",required:!1},height:{type:String,default:"16px",required:!1},relPosition:{type:String,default:"right",required:!1},level:{type:String,default:"top",required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="delay"&&(l[u]=o[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(x.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(Ji,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(x.QTooltip),e.mergeProps({key:1},e.unref(i),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Vt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},et=D(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const C={};for(const N of Object.keys(s))N!=="id"&&N!=="disable"&&(C[N]=s[N]);return C}),l=n,u=e.computed(()=>s.disable??l.disabled),f=e.ref(null);function h(){var C;(C=f.value)==null||C.focus()}t({focus:h});const p=()=>{i("input",r.value)},k=e.computed(()=>{const C={};return l.margin&&(C.margin=l.margin),l.padding&&(C.padding=l.padding),l.width&&(C.width=l.width),l.borderColor&&(C["--p-border-color"]=l.borderColor),C});return(C,N)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=E=>r.value=E)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(k),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":p,onBlur:N[1]||(N[1]=E=>C.$emit("blur",r.value)),onFocus:N[2]||(N[2]=E=>C.$emit("focus",r.value)),onClear:N[3]||(N[3]=E=>C.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(C.$slots,"before",{},()=>[e.renderSlot(C.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(C.$slots,"append",{},()=>[e.renderSlot(C.$slots,"right",{},void 0,!0)],!0)]),_:2},[C.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,C.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,C.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,C.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,C.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,C.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-c4acf8be"]]),dn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:e.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>{const r={};for(const s of Object.keys(o))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=o[s]);return r});return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QDialog),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value=a)},e.unref(i),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Rf={class:"q-mb-md"},Af={class:"text-subtitle1 text-weight-medium text-grey-9"},zf={class:"text-caption text-grey-6 q-mt-xs"},co=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(dn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Rf,[e.createVNode(e.unref(x.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Af,e.toDisplayString(n.title),1),e.createElementVNode("div",zf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(oe,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Df={class:"q-mr-md"},Ff={class:"text-subtitle1 text-weight-medium text-grey-9"},uo=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(dn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Df,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Ff,e.toDisplayString(n.title),1),e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(oe,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(x.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(oe,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"]))}}),Of={class:"q-mt-sm"},Lf={class:"row items-center justify-between q-mb-xs q-px-xs"},_f={class:"row items-center q-gutter-xs"},Hf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Uf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},vf={style:{"min-width":"0"}},qf={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},jf={key:0,class:"text-caption text-grey-6 ellipsis"},Wf={class:"row items-center no-wrap q-gutter-xs"},Gf={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Qf={class:"text-body2 text-grey-7"},un=D(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),k=e.ref(-1),C=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(o.value.copiedEmail))},N=$=>{var P,A;s.value=$,a.value=i.value[$],c.value=t.adapter.emailValue(i.value[$]),l.value=((A=(P=t.adapter).emailDescription)==null?void 0:A.call(P,i.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},y=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},M=$=>{k.value=$,p.value=!0},b=async()=>{var $,P;h.value=!0;try{const A=i.value[k.value];await t.adapter.removeEmail((P=($=t.adapter).emailId)==null?void 0:P.call($,A)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,P)=>(e.openBlock(),e.createElementBlock("div",Of,[e.createElementVNode("div",Lf,[e.createElementVNode("div",_f,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Hf,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(lo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:y},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).emailId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Uf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",vf,[e.createElementVNode("div",qf,e.toDisplayString(n.adapter.emailValue(A)),1),(De=(Ee=n.adapter).emailDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",jf,e.toDisplayString((ge=(Me=n.adapter).emailDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Wf,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>C(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[4]||(P[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[5]||(P[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>M(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[6]||(P[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",Gf,[e.createVNode(e.unref(x.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Qf,e.toDisplayString(e.unref(o).noEmails),1),P[7]||(P[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(oe,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:y},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":P[2]||(P[2]=A=>e.isRef(r)?r.value=A:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":P[0]||(P[0]=A=>e.isRef(c)?c.value=A:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[A=>!!A||e.unref(o).enterEmail,A=>!A||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":P[1]||(P[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(co,{modelValue:e.unref(p),"onUpdate:modelValue":P[3]||(P[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),Yf={class:"q-mt-sm"},Xf={class:"row items-center justify-between q-mb-xs q-px-xs"},Zf={class:"row items-center q-gutter-xs"},Jf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Kf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},em={style:{"min-width":"0"}},tm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},nm={key:0,class:"text-caption text-grey-6 ellipsis"},om={class:"row items-center no-wrap q-gutter-xs"},im={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},rm={class:"text-body2 text-grey-7"},fn=D(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),h=e.ref(!1),p=e.ref(!1),k=e.ref(-1),C=async $=>{$&&(await navigator.clipboard.writeText($),z.UI.Notify.Success(o.value.copiedNumber))},N=$=>{var P,A;s.value=$,a.value=i.value[$],c.value=t.adapter.phoneNumber(i.value[$]),l.value=((A=(P=t.adapter).phoneDescription)==null?void 0:A.call(P,i.value[$]))??"",r.value=!0},E=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},y=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},M=$=>{k.value=$,p.value=!0},b=async()=>{var $,P;h.value=!0;try{const A=i.value[k.value];await t.adapter.removePhone((P=($=t.adapter).phoneId)==null?void 0:P.call($,A)),i.value.splice(k.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{h.value=!1}};return($,P)=>(e.openBlock(),e.createElementBlock("div",Yf,[e.createElementVNode("div",Xf,[e.createElementVNode("div",Zf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",Jf,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(lo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:y},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(A,G)=>{var de,$e,Ee,De,Me,ge;return e.openBlock(),e.createElementBlock("div",{key:(($e=(de=n.adapter).phoneId)==null?void 0:$e.call(de,A))??G,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",$.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Kf,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",em,[e.createElementVNode("div",tm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(De=(Ee=n.adapter).phoneDescription)!=null&&De.call(Ee,A)?(e.openBlock(),e.createElementBlock("div",nm,e.toDisplayString((ge=(Me=n.adapter).phoneDescription)==null?void 0:ge.call(Me,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",om,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:Be=>C(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[4]||(P[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:Be=>N(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[5]||(P[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),G>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:Be=>M(G)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...P[6]||(P[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",im,[e.createVNode(e.unref(x.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",rm,e.toDisplayString(e.unref(o).noPhones),1),P[7]||(P[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(oe,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:y},null,8,["loading"])])),e.createVNode(uo,{modelValue:e.unref(r),"onUpdate:modelValue":P[2]||(P[2]=A=>e.isRef(r)?r.value=A:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(et,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":P[0]||(P[0]=A=>e.isRef(c)?c.value=A:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[A=>!!A||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(et,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":P[1]||(P[1]=A=>e.isRef(l)?l.value=A:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(co,{modelValue:e.unref(p),"onUpdate:modelValue":P[3]||(P[3]=A=>e.isRef(p)?p.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(h),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),sm={class:"row items-center q-gutter-sm"},am={class:"text-weight-medium text-grey-9"},lm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Vt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),z.UI.Notify.Success(o.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",sm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(x.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",am,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(lo,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(x.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(x.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(x.QSeparator)),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(x.QSeparator),{class:"q-my-sm"}),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),Ki=D(lm,[["__scopeId","data-v-327b9235"]]),cm={class:"contact-edit-wrapper"},er=D(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",cm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),dm={class:"edit-emails-wrapper"},tr=D(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),um={class:"edit-phones-wrapper"},nr=D(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",um,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),fm={class:"contact-view-wrapper"},or=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(un,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function ca(n){n.component("PContactForm",Ki),n.component("PContactFormDeleteDialog",co),n.component("PContactFormEdit",er),n.component("PContactFormEditDialog",uo),n.component("PContactFormEditEmails",tr),n.component("PContactFormEditPhones",nr),n.component("PContactFormView",or),n.component("PContactFormViewEmails",un),n.component("PContactFormViewPhones",fn)}const mm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:Ki,PContactFormDeleteDialog:co,PContactFormEdit:er,PContactFormEditDialog:uo,PContactFormEditEmails:tr,PContactFormEditPhones:nr,PContactFormView:or,PContactFormViewEmails:un,PContactFormViewPhones:fn,default:ca,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class mn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new mn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}class da{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class ir{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class zn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new zn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}var hm=Object.defineProperty,fo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&hm(t,o,r),r};const hn=class yi{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new ra);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);z.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const o=new yi;return o.id=z.H.Id.UUID(),o.formSectionId=t,o}getRegisterPropertyRadioOriginalValue(t){const o=this.answerVariants.find(i=>i.id===t);return o?o.name:""}addRadioItem(t){const o=new mn(t);o.order=this.answerVariants.length,this.answerVariants.push(o)}removeRadioItem(t){const o=this.answerVariants[t].id;o&&this.answerVariantsForDelete.push(o),this.answerVariants.splice(t,1)}changeRelation(t){const o=t.find(i=>i.id===this.valueTypeId);if(o){if(o.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(o.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=o}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,o)=>t.order=o)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new ir(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new zn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=mn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=yi.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=zn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new yi(this);return t.id=z.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=z.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};fo([z.H.Classes.GetClassConstructor(mn)],hn.prototype,"answerVariants"),fo([z.H.Classes.GetClassConstructor(da)],hn.prototype,"fieldExamples"),fo([z.H.Classes.GetClassConstructor(zn)],hn.prototype,"fieldVariants"),fo([z.H.Classes.GetClassConstructor(ir)],hn.prototype,"fieldMeasures"),fo([z.H.Classes.GetClassConstructor(hn)],hn.prototype,"children");let Qo=hn;class rr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Et);z.H.Classes.BuildClass(this,t)}}class pn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new pn;return i.id=jt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var pm=Object.defineProperty,ua=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pm(t,o,r),r};const sr=class Qr{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Et);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);z.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new Qr;return i.id=jt(),i.fieldId=t.id,i.formFillId=o,i.order=t.order,i.valueNumber=0,i.valueString="",i.valueDate=new Date,i}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>Qr.Create(i,o))}addFile(){const t=new rr;return t.id=jt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(o=>t.push(o.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,o){const i=pn.Create(this.id,t);return i.answerVariantIdY=o,this.selectedAnswerVariants.push(i),this.filled=!0,i}getMatrixValue(t,o){return this.selectedAnswerVariants.find(i=>i.answerVariantId===t&&i.answerVariantIdY===o)}addSelectedAnswerVariant(t){const o=pn.Create(this.id,t);return this.selectedAnswerVariants.push(o),this.filled=!0,o}static GetClassName(){return"answer"}showOther(t){const o=t.find(i=>i.showOther);return o?this.answerVariantId===o.id||this.selectedAnswerVariants.some(i=>i.answerVariantId===o.id):!1}};ua([z.H.Classes.GetClassConstructor(pn)],sr.prototype,"selectedAnswerVariants"),ua([z.H.Classes.GetClassConstructor(rr)],sr.prototype,"answerFiles");let Dn=sr;class gm{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var ym=Object.defineProperty,wm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&ym(t,o,r),r};const fa=class vl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,o){return`${this.getFieldN(t)}.${o+1}`}static Create(t){const o=new vl;return o.id=z.H.Id.UUID(),o.formId=t,o}addField(){const t=Qo.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,o)=>t.order=o)}getAnswerVariants(){const t=[];return this.fields.forEach(o=>t.push(...o.answerVariants)),t}};wm([z.H.Classes.GetClassConstructor(Qo)],fa.prototype,"fields");let Yo=fa;var bm=Object.defineProperty,Cm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&bm(t,o,r),r};const ma=class ql{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);z.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new ql;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Yo.Create(this.id);return this.formSections.push(t),z.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(i=>i.fields).flat(),o=t.map(i=>i.children).flat();return t.concat(o).filter(i=>i.children.length===0)}};Cm([z.H.Classes.GetClassConstructor(Yo)],ma.prototype,"formSections");let ha=ma;var Sm=Object.defineProperty,km=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Sm(t,o,r),r};const pa=class jl{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new jl;return o.id=z.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...Dn.CreateMany(t.getFields(),o.id)),o}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var o;return(o=this.fieldFills)==null?void 0:o.find(i=>i.fieldId===t)}pushRegisterProperty(t){const o=new Dn;o.researchResultId=t,this.fieldFills.push(o)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(o=>o.researchResultId===t)}getOrCreateFieldFill(t){let o=this.getFieldFill(t.id);return o||(o=Dn.Create(t),this.addFieldFill(o)),o}getFileInfos(){const t=[];return this.fieldFills.forEach(o=>t.push(...o.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(i=>i.filled).length,o=this.fieldFills.length;this.fillingPercentage=Math.round(t/o*100)}getFieldFillByFieldId(t){return this.fieldFills.find(o=>o.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(o=>o.answerVariantId===t)}getFieldsFieldFillsMap(t){const o={};return t.forEach(i=>{var r;if(i.code){const s=(r=this.getFieldFillByFieldId(i.id))==null?void 0:r.valueNumber;o[i.code]=s}}),o}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};km([z.H.Classes.GetClassConstructor(Dn)],pa.prototype,"fieldFills");let ga=pa;const xm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:mn,Field:Qo,FieldExample:da,FieldFill:Dn,FieldFillFile:rr,FieldFilter:gm,FieldMeasure:ir,FieldVariant:zn,Form:ha,FormFill:ga,FormSection:Yo,SelectedAnswerVariant:pn},Symbol.toStringTag,{value:"Module"}));let Em=class extends xe{constructor(){super(mn,"answer-variants")}};const Bm=new Em;let Nm=class extends xe{constructor(){super(Dn,"field-fills")}};const Vm=new Nm;let $m=class extends xe{constructor(){super(Qo,"fields")}};const Tm=new $m;let Mm=class extends xe{constructor(){super(ga,"form-fills")}};const Pm=new Mm;let Im=class extends xe{constructor(){super(Yo,"form-sections")}};const Rm=new Im;let Am=class extends xe{constructor(){super(ha,"forms")}};const zm=new Am;let Dm=class extends xe{constructor(){super(pn,"selected-answer-variants")}};const Fm=new Dm,Om=Object.freeze(Object.defineProperty({__proto__:null,C:xm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Bm,FieldFills:Vm,Fields:Tm,FormFills:Pm,FormSections:Rm,Forms:zm,SelectedAnswerVariants:Fm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Xo{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new Et);d(this,"iconName","");d(this,"svgCode","");K.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Lm=Object.defineProperty,_m=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Lm(t,o,r),r};class ar{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new Et);K.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(o=>{t.push(o.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Ke.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Xo)}removeSubMenu(t){const o=this.subMenus[t].id;o&&this.subMenusForDelete.push(o),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let o=0;this.subMenus.forEach(i=>{i.color=t[o],o=t.length-1?o=0:o++})}containPath(t){return this.link===t||!!this.subMenus.find(o=>o.link===t)}static GetClassName(){return"menu"}}_m([K.GetClassConstructor(Xo)],ar.prototype,"subMenus");const Hm=Object.freeze(Object.defineProperty({__proto__:null,Menu:ar,SubMenu:Xo},Symbol.toStringTag,{value:"Module"}));let Um=class extends z.H.BaseStore{constructor(){super(ar,"menus")}};const vm=new Um;let qm=class extends z.H.BaseStore{constructor(){super(Xo,"sub-menus")}};const jm=new qm,Wm=Object.freeze(Object.defineProperty({__proto__:null,C:Hm,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:vm,SubMenus:jm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ot{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ot;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var Gm=Object.defineProperty,Qm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Gm(t,o,r),r};const ya=class Wl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Wl;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};Qm([z.H.Classes.GetClassConstructor(Ot)],ya.prototype,"slots");let Fn=ya;var Ym=Object.defineProperty,wa=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Ym(t,o,r),r};const lr=class Gl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new Gl;return i.id=z.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=Fn.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ot.Create(this.id);return this.slots.push(t),t}};wa([z.H.Classes.GetClassConstructor(Fn)],lr.prototype,"sessions"),wa([z.H.Classes.GetClassConstructor(Ot)],lr.prototype,"slots");let mo=lr;var Xm=Object.defineProperty,Zm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Xm(t,o,r),r};const ba=class Ql{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new Ql;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};Zm([z.H.Classes.GetClassConstructor(mo)],ba.prototype,"schedules");let Zo=ba;class On{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");z.H.Classes.BuildClass(this,t)}static Create(){const t=new On;return t.id=z.H.Id.UUID(),t}}const Jm=Object.freeze(Object.defineProperty({__proto__:null,Schedule:mo,ScheduleDay:Zo,SchedulePlace:On,ScheduleSession:Fn,ScheduleSlot:Ot},Symbol.toStringTag,{value:"Module"})),ae=n=>n?z.H.Time.HMtoM(n):NaN,Xe=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),gn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},Ln=(n,t)=>z.H.Time.DiffM(n,t),bt=(n,t)=>z.H.Time.AddMtoHM(n,t),cr=(n,t)=>{const o=ae(n.startTime),i=ae(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},ho=(n,t)=>{const o=ae(n.startTime),i=ae(n.endTime),r=ae(t.startTime),s=ae(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},po=(n,t)=>Math.round(n/t)*t,Ca=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ae(c.startTime),u=ae(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Sa=(n,t)=>{const o=ae(n.item.startTime),i=ae(n.item.endTime);if(!isFinite(o)||!isFinite(i))return{top:"0%",height:"48px"};const r=(o-t.start)/t.total*100,s=Math.max((i-o)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},ka=(n,t)=>{const o=ae(n.startTime),i=ae(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ae(t.startTime),a=ae(t.endTime),c=isFinite(s)?Math.max((s-o)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},xa=(n,t,o)=>n.some(i=>i.item.id===t.item.id||t.kind==="session"&&i.kind==="slot"&&i.item.sessionId===t.item.id?!1:o(t.item,i.item)),Ea=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Ba=(n,t,o,i)=>{if(!(!isFinite(t)||!isFinite(o)||o<=t))return(n||[]).find(r=>{const s=i(r.startTime),a=i(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&o<=a})},Na=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",dr={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Va={createDay(n){return Zo.Create(void 0,void 0,n)},createSchedule(n,t){return mo.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],o=t[t.length-1],i=(o==null?void 0:o.endTime)||"9:00",r=Fn.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=z.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ot.Create(n==null?void 0:n.id)},createPlace(n){const t=On.Create();return t.name=n||"",t}},Km={class:"schedule-admin"},eh={key:0,class:"no-days text-center text-grey q-py-xl"},th={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},nh={key:1,class:"row items-center q-gutter-xs zoom-control"},oh={key:0,class:"grid-view"},ih={key:0,class:"text-grey text-center q-py-lg"},rh={class:"grid-header"},sh={class:"row items-center justify-center q-gutter-xs"},ah={class:"ellipsis"},lh={class:"time-gutter"},ch=["data-schedule-id","onDblclick","onContextmenu"],dh=["title","onPointerdown","onClick","onContextmenu"],uh={class:"block-content"},fh={class:"block-time"},mh={class:"block-name ellipsis"},hh={key:0,class:"block-speakers ellipsis"},ph={key:0,class:"session-perfoms"},gh=["title","onPointerdown","onClick","onContextmenu"],yh={class:"nested-time"},wh={class:"nested-name ellipsis"},bh={key:0,class:"nested-speakers ellipsis"},Ch=["title","onPointerdown"],Sh={class:"block-actions"},kh=["title","onPointerdown"],xh=["title"],Eh={class:"session-spine-name"},Bh={class:"block-time"},Nh={key:0,class:"session-badge"},Vh={key:1,class:"conflict-badge"},$h={class:"block-name ellipsis"},Th={class:"text-caption text-grey-6 q-pa-xs"},Mh={key:1,class:"list-view"},Ph={class:"row items-center q-gutter-sm"},Ih={class:"text-subtitle2"},Rh={key:0,class:"sub-block"},Ah={class:"sub-title"},zh={class:"list-row session-row"},Dh={key:0,class:"nested-list"},Fh={class:"col-4 ellipsis"},Oh={class:"time-text"},Lh={class:"sub-block"},_h={class:"sub-title"},Hh={class:"list-row slot-row"},Uh={key:0,class:"text-grey text-center q-py-sm"},vh={class:"text-caption text-grey-6 q-mb-sm"},qh={class:"text-h6"},jh={class:"row items-center q-gutter-sm q-mb-md"},Wh={key:0,class:"text-grey text-center q-py-md"},Gh={class:"col ellipsis"},Qh={class:"text-h6"},Yh={class:"row q-col-gutter-sm q-mb-sm"},Xh={class:"col-6"},Zh={class:"col-6"},Jh=["onClick"],yn=15,$a=6,Ta=D(e.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},sessionsEnabled:{type:Boolean,default:!0}},setup(n){var Dl,Fl;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>({...dr,duplicate:"Дублировать",...t.labels})),r=e.computed(()=>({...Va,...t.factories})),s=m=>t.slotListOf?t.slotListOf(m):(m==null?void 0:m.slots)||[],a=m=>t.nestedSlotListOf?t.nestedSlotListOf(m):(m==null?void 0:m.slots)||[],c=m=>(m==null?void 0:m.name)||i.value.hall,l=m=>t.sessionName?t.sessionName(m):(m==null?void 0:m.name)||`${i.value.session} ${(m==null?void 0:m.startTime)||""}–${(m==null?void 0:m.endTime)||""}`.trim(),u=m=>t.slotName?t.slotName(m):(m==null?void 0:m.name)||i.value.slot,f=m=>t.slotSubtitle?t.slotSubtitle(m):"",h=e.ref("grid"),p=e.ref((Fl=(Dl=t.days)==null?void 0:Dl[0])==null?void 0:Fl.id),k=e.ref(!1),C=e.ref(""),N=e.ref(!1),E=e.ref(null),y=e.ref(null),M=e.ref(void 0),b=e.ref(null),$=e.ref(null),P=e.ref(!1),A=e.ref(0),G=e.ref(null),de=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],$e=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch($e,m=>localStorage.setItem("schedule-grid-zoom",String(m)));const Ee=e.computed(()=>Math.max(ue.value.total/60*$e.value,360)),De=e.computed(()=>Ee.value+"px"),Me=e.computed(()=>[...t.days||[]].sort((m,g)=>new Date(m.date).getTime()-new Date(g.date).getTime())),ge=e.computed(()=>Me.value.find(m=>m.id===p.value));e.watch(()=>Me.value.map(m=>m.id).join(","),()=>{var m;(!p.value||!Me.value.some(g=>g.id===p.value))&&(p.value=(m=Me.value[0])==null?void 0:m.id)});const Be=m=>{if(t.dayTitle)return t.dayTitle(m);const g=new Date(m.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Pt=m=>{const g=new Date(m);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},It=async(m,g)=>{g&&(m.date=new Date(g),await t.persist.updateDay(m),await t.persist.refresh())},Jt=async m=>{var w;if(!m)return;for(const T of lt(m))await We(T);await t.persist.removeDay(m);const g=(t.days||[]).indexOf(m);g>=0&&t.days.splice(g,1),await t.persist.refresh(),p.value=(w=Me.value[0])==null?void 0:w.id},bn=async()=>{var F,X;const m=Me.value,g=m[m.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let T;try{T=r.value.createDay(w)}catch{t.persist.notify("warning",i.value.saveEventFirst);return}try{await((X=(F=t.persist).createDay)==null?void 0:X.call(F,T));for(const fe of t.places||[])await Ze(fe,T);await t.persist.refresh()}catch{t.persist.notify("negative",i.value.createFailed);return}p.value=T.id,t.persist.notify("positive",`${i.value.dayAdded}: ${Be(T)}`)},lt=m=>((m==null?void 0:m.schedules)||[]).slice().sort((g,w)=>{const T=je(g),F=je(w);return T.localeCompare(F,"ru")}),je=m=>{if(t.hallName)return t.hallName(m);const g=m.place||(t.places||[]).find(w=>w.id===m.placeId);return(g==null?void 0:g.name)||i.value.hall},be=()=>{k.value=!0},Q=e.computed(()=>{const m=ge.value,g=new Set(((m==null?void 0:m.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),Ze=async(m,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(m,g,r.value.createSchedule);return}const w=r.value.createSchedule(m.id,g.id);await t.persist.createSchedule(w)},St=async m=>{k.value=!1;const g=ge.value;if(!g){t.persist.notify("warning",i.value.selectDayFirst);return}if(lt(g).some(w=>w.placeId===m.id)){t.persist.notify("warning",i.value.alreadyAdded);return}try{await Ze(m,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",i.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),p.value=g.id},ye=async()=>{var w,T,F;const m=(w=C.value)==null?void 0:w.trim();if(!m){t.persist.notify("warning",i.value.enterName);return}const g=r.value.createPlace(m);try{if(!await((F=(T=t.persist).createPlace)==null?void 0:F.call(T,g))){t.persist.notify("negative",i.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),t.persist.notify("negative",i.value.hallCreateFailed);return}C.value="",await St(g),t.persist.notify("positive",i.value.hallCreated.replace("{name}",m))},se=async m=>{await We(m);const g=vt(m);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==m.id)),await t.persist.refresh()},We=async m=>{for(const g of m.sessions||[]){for(const w of a(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of s(m))await t.persist.removeSlot(g);await t.persist.removeSchedule(m)},vt=m=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===m.id)),ct=m=>[...a(m)].sort(cr),rt=m=>(m.sessions||[]).some(g=>a(g).length>0),Kt=new WeakMap,Fe=m=>{const g=Kt.get(m),w=s(m);if(g&&g.src===w)return g.list;const T=new Set((m.sessions||[]).map(X=>X.id)),F=w.filter(X=>!X.sessionId||!T.has(X.sessionId));return Kt.set(m,{src:w,list:F}),F},Rt=m=>[...o.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],...Fe(m).map(g=>({kind:"slot",item:g}))],Cn=m=>o.value?(m.sessions||[]).map(g=>({kind:"session",item:g})):[],ue=e.computed(()=>{var g,w;const m=(((g=ge.value)==null?void 0:g.schedules)||[]).flatMap(T=>Rt(T));for(const T of((w=ge.value)==null?void 0:w.schedules)||[])for(const F of T.sessions||[])m.push(...ct(F).map(X=>({kind:"slot",item:X})));return Ca(m)}),ee=e.computed(()=>{const m=[];for(let g=ue.value.start;g<=ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),Oe=e.computed(()=>{const m=[];for(let g=ue.value.start+30;g<ue.value.end;g+=60)m.push({min:g,label:Xe(g)});return m}),st=m=>Sa(m,ue.value),gt=e.computed(()=>{if(!b.value||!y.value)return{};const m=ue.value,g=(b.value.minutes-m.start)/m.total*100,w=Math.max(y.value.duration/m.total*100,2.5);return{top:g+"%",height:w+"%"}}),en=e.computed(()=>!b.value||!y.value?"":Xe(b.value.minutes+y.value.duration)),Sn=e.computed(()=>{if(!b.value)return{};const m=ue.value,g=(b.value.minutes-m.start)/m.total*100,w=Math.max(yn/m.total*100,1.5);return{top:g+"%",height:w+"%"}}),dt=e.computed(()=>{var F,X,fe,Te,Re;if(!b.value||!y.value||!y.value.id)return 0;const m=Gn(b.value.scheduleId);if(!m)return 0;const g={startTime:b.value.time,endTime:en.value},w=(F=b.value.session)==null?void 0:F.id;let T=0;for(const R of Rt(m))R.item.id!==((X=y.value)==null?void 0:X.id)&&(((fe=y.value)==null?void 0:fe.kind)==="slot"&&R.kind==="session"&&R.item.id===w||ho(g,R.item)&&T++);if(((Te=y.value)==null?void 0:Te.kind)==="slot"&&b.value.session)for(const R of ct(b.value.session))R.id!==((Re=y.value)==null?void 0:Re.id)&&ho(g,R)&&T++;return T}),fi=e.computed(()=>dt.value>0),mi=(m,g)=>xa(Rt(m),g,ho),_r=(m,g)=>Ea(ct(m),g,ho),kn=(m,g)=>ka(m,g),Hr=m=>{const g=ue.value,w=ae(m.item.startTime),T=ae(m.item.endTime);return!isFinite(w)||!isFinite(T)?48:(T-w)/g.total*Ee.value},Wn=m=>Na(Hr(m)),Ur=m=>{const g=t.slotName?t.slotName(m.item):m.item.name||(m.kind==="session"?i.value.session:i.value.slot);if(m.kind==="slot"&&Wn(m)!=="h-full"){const w=f(m.item);if(w)return`${g} — ${w}`}return g},bo=(m,g)=>{const w=u(m);if(g!=="h-full"){const T=f(m);if(T)return`${w} — ${T}`}return w},B=m=>{const g=`${m.item.startTime||"?"}–${m.item.endTime||"?"}`;if(m.kind==="slot"){const w=f(m.item);return[u(m.item),g,w?`${i.value.participants}: ${w}`:""].filter(Boolean).join(`
23
23
  `)}return[l(m.item),g].filter(Boolean).join(`
24
- `)},V=m=>{const g=f(m);return[u(m),`${m.startTime}–${m.endTime}`,g?`${o.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},I=(m,g)=>{var w;return{conflict:_r(m.item,g),dragging:((w=yt.value)==null?void 0:w.perfom.id)===g.id,[Wn(m)]:!0}},O=e.ref(null),Y=(m,g)=>{const w=m.getBoundingClientRect(),T=Math.min(Math.max((g-w.top)/w.height,0),1);return ue.value.start+hi(T*ue.value.total,yn)},Pe=(m,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||M.value||(O.value={gi:m,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ne),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",me),window.addEventListener("keydown",we))},Ne=m=>{const g=O.value;if(g){if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0;const w=Ln(g.gi.item.startTime,g.gi.item.endTime);S.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?o.value.session:o.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}te(m.clientX,m.clientY),H(m.clientX,m.clientY)}},te=(m,g)=>{var Te,Re;const w=document.elementFromPoint(m,g),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id");if(!T||!F){P.value=void 0,C.value=null;return}const X=Gn(F);if(!X)return;P.value=X.id;const fe=Y(T,g);C.value={scheduleId:X.id,minutes:fe,time:Xe(fe),hallName:je(X),...((Te=S.value)==null?void 0:Te.kind)==="slot"&&i.value?{session:po(X.sessions,fe,fe+(((Re=S.value)==null?void 0:Re.duration)||30),ae)}:{}},$.value={x:m,y:g}},H=(m,g)=>{const w=G.value;if(!w)return;const T=w.getBoundingClientRect();g<T.top+48?w.scrollTop-=14:g>T.bottom-48&&(w.scrollTop+=14),m<T.left+48?w.scrollLeft-=14:m>T.right-48&&(w.scrollLeft+=14)},U=m=>{v(m)},v=async m=>{const g=O.value;if(q(),O.value=null,!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){const fe=Y(T,m.clientY);await xl(X,fe)}ne()},q=()=>{window.removeEventListener("pointermove",Ne),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",me),window.removeEventListener("keydown",we)},ne=()=>{O.value=null,S.value=null,P.value=void 0,C.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",A.value=Date.now()},me=()=>{q(),ne()},we=m=>{m.key==="Escape"&&me()};e.onBeforeUnmount(()=>{q(),jr(),uw(),document.body.style.userSelect="",document.body.style.cursor=""});const Je=m=>{if(!m)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const T=(w.sessions||[]).find(X=>X.id===m);if(T)return{kind:"session",item:T,schedule:w};const F=s(w).find(X=>X.id===m);if(F)return{kind:"slot",item:F,schedule:w}}return null},ho=()=>{var m;return Je((m=S.value)==null?void 0:m.id)},vr=(m,g)=>{g.preventDefault(),g.stopPropagation();const w=m.item,T=ae(w.startTime),F=ae(w.endTime);if(!isFinite(T)||!isFinite(F))return;const X=g.clientY;M.value=!0;const fe=R=>{const W=(R.clientY-X)/$e.value*60,J=hi(F+W,yn);w.endTime=Xe(Math.max(J,T+yn))},Te=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Re),M.value=!1,A.value=Date.now();const R=Je(w.id);R&&(await kt(w,R.kind),await t.persist.refresh())},Re=()=>{Te()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Re)},yt=e.ref(null),iw=(m,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||M.value)return;const T=w.target.closest(".session-perfoms"),F=ae(m.startTime),X=ae(m.endTime),fe=Ln(g.startTime,g.endTime);!T||!isFinite(F)||!isFinite(X)||X<=F||(yt.value={perfom:g,session:m,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:X-F,durMin:isFinite(fe)&&fe>0?fe:30,container:T},window.addEventListener("pointermove",Cl),window.addEventListener("pointerup",Sl),window.addEventListener("pointercancel",qr),window.addEventListener("keydown",kl))},Cl=m=>{const g=yt.value;if(!g)return;if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),T=Math.min(Math.max((m.clientY-w.top)/w.height,0),1);let F=g.sessionStart+hi(T*g.sessionDur,yn);const X=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=Xe(F),g.perfom.endTime=Xe(F+g.durMin),$.value={x:m.clientX,y:m.clientY}},Sl=m=>{ow(m)},ow=async m=>{var fe;const g=yt.value;if(jr(),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){S.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||o.value.slot,duration:g.durMin};const Te=Y(T,m.clientY),Re=Xe(Te),R=Ln(g.perfom.startTime,g.perfom.endTime),W=bt(Re,R>0?R:30),J=((fe=Nl(g.perfom))==null?void 0:fe.id)===X.id&&g.perfom.startTime===Re&&g.perfom.endTime===W;await xl(X,Te),J&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),S.value=null;return}g.perfom.startTime=gn(g.perfom.startTime),g.perfom.endTime=gn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},qr=()=>{const m=yt.value;jr(),m&&(m.perfom.startTime=m.savedStart,m.perfom.endTime=m.savedEnd),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor=""},jr=()=>{window.removeEventListener("pointermove",Cl),window.removeEventListener("pointerup",Sl),window.removeEventListener("pointercancel",qr),window.removeEventListener("keydown",kl)},kl=m=>{m.key==="Escape"&&qr()},rw=(m,g,w)=>{w.preventDefault(),w.stopPropagation();const T=ae(m.startTime),F=ae(m.endTime),X=ae(g.startTime),fe=w.target.closest(".nested-perfom"),Te=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Te||!isFinite(T)||!isFinite(F)||F<=T||!isFinite(X))return;const Re=Te.getBoundingClientRect(),R=F-T;M.value=!0;const W=qt=>{const ww=Math.min(Math.max((qt.clientY-Re.top)/Re.height,0),1),bw=Math.min(Math.max(X+yn,T+hi(ww*R,yn)),F);g.endTime=Xe(bw)},J=async()=>{window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",j),M.value=!1,A.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},j=()=>{J()};window.addEventListener("pointermove",W),window.addEventListener("pointerup",j)},xl=async(m,g)=>{var W;P.value=void 0,C.value=null,$.value=null;const w=ho();if(!w)return;const T=Xe(g),F=Ln(w.item.startTime,w.item.endTime),X=bt(T,F>0?F:30);if(((W=w.schedule)==null?void 0:W.id)===m.id&&w.item.startTime===T&&w.item.endTime===X)return;const fe=w.item.startTime;if(w.item.startTime=T,w.item.endTime=X,w.kind==="slot"&&i.value){const J=po(m.sessions,ae(T),ae(X),ae);J?w.item.sessionId=J.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const J=ae(T)-ae(fe);for(const j of ct(w.item))j.startTime&&(j.startTime=bt(j.startTime,J),j.endTime&&(j.endTime=bt(j.endTime,J)),j.scheduleId=m.id,await kt(j,"slot"))}const Te=w.schedule,Re=w.kind==="session"?m.sessions:s(m),R=w.item;if(Te&&Te.id!==m.id){R.scheduleId=m.id;const J=w.kind==="session"?Te.sessions:s(Te);z.H.Classes.RemoveFromClassById(R.id,J,[]),Re.push(R)}await kt(R,w.kind),await t.persist.refresh()},sw=async(m,g)=>{if(g.target.closest(".timeline-block"))return;const w=Y(g.currentTarget,g.clientY),T=r.value.createSlot(m);if(T.startTime=Xe(w),T.endTime=Xe(w+30),i.value){const X=po(m.sessions,w,w+30,ae);X!=null&&X.id&&(T.sessionId=X.id)}await t.persist.createSlot(T),await t.persist.refresh();const F=Je(T.id);F&&tn(F)},El=async(m,g,w)=>{if(m.added){if(m.added.element.scheduleId=g.id,w==="slot"&&m.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===m.added.element.sessionId)||delete m.added.element.sessionId),await kt(m.added.element,w),w==="session")for(const T of a(m.added.element))T.scheduleId=g.id,await t.persist.updateSlot(T);await t.persist.refresh()}},Gn=m=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(T=>T.id===m);if(w)return w}},po=(m,g,w,T)=>Ba(m,g,w,T),Bl=m=>i.value?((m==null?void 0:m.sessions)||[]).map(g=>({id:g.id,label:l(g)})):[],Nl=m=>{for(const g of t.days||[])for(const w of g.schedules||[])if(s(w).some(T=>T.id===m.id)||m.sessionId&&(w.sessions||[]).some(T=>T.id===m.sessionId))return w},Vl=e.computed(()=>{const m=E.value;if(m)return m.kind==="session"?Gn(m.item.scheduleId)||$l(m.item,"session"):Nl(m.item)}),aw=e.computed(()=>{const m=E.value;return!m||m.kind!=="slot"?[]:Bl(Vl.value)}),$l=(m,g)=>{for(const w of t.days||[])for(const T of w.schedules||[])if(g==="session"){if((T.sessions||[]).some(F=>F.id===m.id))return T}else if(s(T).some(F=>F.id===m.id))return T},Tl=async(m,g)=>{g?m.sessionId=g:delete m.sessionId,await t.persist.updateSlot(m),await t.persist.refresh()},Ml=async m=>{if(!i.value)return;const g=r.value.createSession(m);await t.persist.createSession(g),await t.persist.refresh()},lw=async(m,g)=>{const w=r.value.createSlot(m);if(w.startTime=Xe(g),w.endTime=bt(w.startTime,30),i.value){const F=po(m.sessions,g,g+30,ae);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const T=Je(w.id);T&&tn(T)},Pl=async m=>{const g=r.value.createSlot(m),w=[...s(m)].sort(cr).slice(-1)[0];g.startTime=gn(w==null?void 0:w.endTime)||"9:00",g.endTime=bt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),cw=m=>{At.value=null,m.action()},Wr=(m,g)=>{const w=g.length*34+12;At.value={x:Math.min(m.clientX,window.innerWidth-210),y:Math.min(m.clientY,window.innerHeight-w-8),items:g}},Il=()=>{At.value=null},Rl=()=>{At.value=null},Al=m=>{m.key==="Escape"&&(At.value=null)},go=()=>{At.value=null},Gr=e.ref(!1),dw=()=>{Gr.value||(window.addEventListener("click",Il),window.addEventListener("contextmenu",Rl),window.addEventListener("keydown",Al),window.addEventListener("scroll",go,!0),window.addEventListener("resize",go),Gr.value=!0)},uw=()=>{window.removeEventListener("click",Il),window.removeEventListener("contextmenu",Rl),window.removeEventListener("keydown",Al),window.removeEventListener("scroll",go,!0),window.removeEventListener("resize",go),Gr.value=!1};dw();const fw=(m,g)=>{const w=[{icon:"edit",label:o.value.edit,action:()=>tn(m)},{icon:"content_copy",label:o.value.duplicate,action:()=>void zl(m)},{icon:"delete",label:o.value.delete,danger:!0,action:()=>void bi(m.item,m.kind)}];Wr(g,w)},mw=(m,g)=>{const w={kind:"slot",item:m},T=[{icon:"edit",label:o.value.edit,action:()=>tn(w)},{icon:"content_copy",label:o.value.duplicate,action:()=>void zl(w)},{icon:"delete",label:o.value.delete,danger:!0,action:()=>void bi(m,"slot")}];Wr(g,T)},hw=(m,g)=>{const w=Y(g.currentTarget,g.clientY),T=Xe(w),F=[{icon:"mic",label:`${o.value.addSlot} · ${T}`,action:()=>void lw(m,w)}];i.value&&F.push({icon:"groups",label:`${o.value.addSession} · ${T}`,action:()=>void pw(m,w)}),Wr(g,F)},pw=async(m,g)=>{if(!i.value)return;const w=r.value.createSession(m);w.startTime=Xe(g),w.endTime=bt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},zl=async m=>{const g=Gn(m.item.scheduleId)||$l(m.item,m.kind);if(!g)return;const w=Ln(m.item.startTime,m.item.endTime)||30,T=gn(m.item.endTime)||"9:00";if(m.kind==="slot"){const F=r.value.createSlot(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.sessionId=m.item.sessionId,m.item.description&&(F.description=m.item.description),m.item.payload&&(F.payload={...m.item.payload}),await t.persist.createSlot(F)}else{const F=r.value.createSession(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},bi=async(m,g)=>{if(g==="slot")await t.persist.removeSlot(m);else{for(const w of a(m))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(m)}await t.persist.refresh()},kt=async(m,g)=>{const w=gn(m.startTime),T=gn(m.endTime);if(!w){t.persist.notify("warning",o.value.correctStartTime);return}m.startTime=w,m.endTime=T||bt(w,30),g==="slot"?await t.persist.updateSlot(m):await t.persist.updateSession(m)},tn=m=>{M.value||Date.now()-A.value<400||(E.value={kind:m.kind,item:m.item},N.value=!0)},gw=async()=>{const m=E.value;m&&(await kt(m.item,m.kind),N.value=!1,E.value=null,await t.persist.refresh())},yw=async()=>{const m=E.value;m&&(await bi(m.item,m.kind),N.value=!1,E.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(m,g)=>{var Te,Re;const w=e.resolveComponent("PButton"),T=e.resolveComponent("PInput"),F=e.resolveComponent("PTooltip"),X=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",Km,[(Te=n.days)!=null&&Te.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",th,[e.createVNode(e.unref(x.QTabs),{modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=R=>p.value=R),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,R=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:R.id,name:R.id,label:Be(R)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(x.QSpace)),ge.value?(e.openBlock(),e.createBlock(T,{key:0,"model-value":Pt(ge.value.date),label:o.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=R=>It(ge.value,R))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",color:"negative",outline:"",icon:"delete",label:o.value.deleteDay,disable:!ge.value,onClick:g[2]||(g[2]=R=>Jt(ge.value))},null,8,["label","disable"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"event",label:o.value.addDay,onClick:bn},null,8,["label"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"add",label:o.value.addHall,onClick:be},null,8,["label"]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(e.unref(x.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(x.QBtnToggle),{modelValue:$e.value,"onUpdate:modelValue":g[3]||(g[3]=R=>$e.value=R),"toggle-color":"primary",options:de,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QBtnToggle),{modelValue:h.value,"onUpdate:modelValue":g[4]||(g[4]=R=>h.value=R),"toggle-color":"primary",options:[{label:o.value.grid,value:"grid",icon:"calendar_view_week"},{label:o.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",ih,[lt(ge.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:G,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":lt(ge.value).length,"--hours":Math.max(ue.value.total/60,1),"--half-hours":Math.max(ue.value.total/60*2,2)})},[e.createElementVNode("div",rh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-head",{"drag-over":P.value===R.id}])},[e.createElementVNode("div",sh,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",ah,e.toDisplayString(je(R)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:W=>Pl(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),i.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:W=>Ml(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:De.value})},[e.createElementVNode("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"hour-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"half-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-col",{"drag-over":P.value===R.id}]),"data-schedule-id":R.id,onDblclick:W=>sw(R,W),onContextmenu:e.withModifiers(W=>hw(R,W),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:W.item.id,class:e.normalizeClass(["timeline-block",[W.kind,{conflict:mo(R,W),dragging:((J=S.value)==null?void 0:J.id)===W.item.id},Wn(W)]]),style:e.normalizeStyle(st(W)),title:B(W),onPointerdown:j=>Pe(W,j),onClick:j=>tn(W),onContextmenu:e.withModifiers(j=>fw(W,j),["prevent","stop"])},[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",uh,[e.createElementVNode("div",fh,e.toDisplayString(W.item.startTime)+"–"+e.toDisplayString(W.item.endTime),1),e.createElementVNode("div",mh,e.toDisplayString(Ur(W)),1),W.kind==="slot"&&f(W.item)?(e.openBlock(),e.createElementBlock("div",hh,e.toDisplayString(f(W.item)),1)):e.createCommentVNode("",!0)]),W.kind==="session"&&ct(W.item).length?(e.openBlock(),e.createElementBlock("div",ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(W.item),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:e.normalizeClass(["nested-perfom",I(W,j)]),style:e.normalizeStyle(kn(W.item,j)),title:V(j),onPointerdown:e.withModifiers(qt=>iw(W.item,j,qt),["stop"]),onClick:e.withModifiers(qt=>tn({kind:"slot",item:j}),["stop"]),onContextmenu:e.withModifiers(qt=>mw(j,qt),["prevent","stop"])},[e.createElementVNode("div",yh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createElementVNode("div",wh,e.toDisplayString(wi(j,Wn(W))),1),f(j)?(e.openBlock(),e.createElementBlock("div",bh,e.toDisplayString(f(j)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:o.value.changeDurationTitle,onPointerdown:e.withModifiers(qt=>rw(W.item,j,qt),["stop","prevent"])},null,40,Ch)],46,gh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Sh,[mo(R,W)?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(j=>tn(W),["stop"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:o.value.changeDurationTitle,onPointerdown:e.withModifiers(j=>vr(W,j),["stop","prevent"])},null,40,kh)],46,dh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+W.item.id,class:e.normalizeClass(["session-spine",{dragging:((J=S.value)==null?void 0:J.id)===W.item.id}]),style:e.normalizeStyle(st(W)),title:l(W.item)},[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Eh,e.toDisplayString(l(W.item)),1)],14,xh)}),128)),C.value&&C.value.scheduleId===R.id&&S.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:fo.value}]),style:e.normalizeStyle(Sn.value)},null,6)):e.createCommentVNode("",!0),C.value&&C.value.scheduleId===R.id&&S.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[S.value.kind,{conflict:fo.value}]]),style:e.normalizeStyle(gt.value)},[e.createElementVNode("div",Bh,[e.createTextVNode(e.toDisplayString(C.value.time)+"–"+e.toDisplayString(en.value)+" ",1),C.value.session?(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(o.value.intoSession),1)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock("span",Vh," ⚠ "+e.toDisplayString(o.value.conflictCount)+": "+e.toDisplayString(dt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",$h,e.toDisplayString(S.value.name),1)],6)):e.createCommentVNode("",!0)],42,ch))),128))],4),e.createElementVNode("div",Th,e.toDisplayString(o.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",oh,[e.createTextVNode(e.toDisplayString(o.value.noHalls)+" ",1),e.createVNode(w,{flat:"",color:"primary",size:"sm",label:o.value.addHall,onClick:be},null,8,["label"])])),$.value&&C.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(C.value.time)+" · "+e.toDisplayString(C.value.hallName)+" ",1),C.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(o.value.intoSession)+" «"+e.toDisplayString(l(C.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(dt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Re=yt.value)!=null&&Re.moved&&$.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(yt.value.perfom.startTime)+"–"+e.toDisplayString(yt.value.perfom.endTime)+" · "+e.toDisplayString(o.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{key:R.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Ph,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Ih,e.toDisplayString(je(R)),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:o.value.session,onClick:W=>Ml(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:o.value.slot,onClick:W=>Pl(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var W;return[i.value&&((W=R.sessions)!=null&&W.length)?(e.openBlock(),e.createElementBlock("div",Rh,[e.createElementVNode("div",Ah,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(o.value.sessionsTitle),1)]),e.createVNode(e.unref(wo),{list:R.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"session")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",zh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:o.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:o.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:o.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(m.$slots,"session-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>bi(J,"session")},null,8,["onClick"])]),ct(J).length?(e.openBlock(),e.createElementBlock("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(J),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:"list-row nested-row"},[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Fh,e.toDisplayString(u(j)),1),e.createElementVNode("div",Oh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:qt=>tn({kind:"slot",item:j})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Lh,[e.createElementVNode("div",_h,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(o.value.slotsTitle),1)]),e.createVNode(e.unref(wo),{list:Fe(R),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"slot")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Hh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:o.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:o.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:o.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),i.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":J.sessionId,label:o.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Bl(R),"option-value":"id","option-label":"label","onUpdate:modelValue":j=>Tl(J,j)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"slot-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>bi(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Fe(R).length&&!rt(R)?(e.openBlock(),e.createElementBlock("div",Uh,e.toDisplayString(o.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",vh,e.toDisplayString(o.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(e.unref(x.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(o.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:o.value.addDay,icon:"event",class:"q-mt-sm",onClick:bn},null,8,["label"])])),e.createVNode(fe,{modelValue:y.value,"onUpdate:modelValue":g[7]||(g[7]=R=>y.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",qh,e.toDisplayString(o.value.addHall),1)]),_:1}),e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",jh,[e.createVNode(T,{modelValue:b.value,"onUpdate:modelValue":g[5]||(g[5]=R=>b.value=R),label:o.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ye,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:o.value.create,icon:"add",dense:"",onClick:ye},null,8,["label"])]),e.renderSlot(m.$slots,"places-list",{day:ge.value,add:St},()=>[Q.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Wh,e.toDisplayString(o.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Gh,e.toDisplayString(c(R)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:o.value.addHall,icon:"add",dense:"",onClick:W=>St(R)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:o.value.close,color:"primary",onClick:g[6]||(g[6]=R=>y.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:N.value,"onUpdate:modelValue":g[14]||(g[14]=R=>N.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>{var R;return[e.createElementVNode("div",Qh,e.toDisplayString(((R=E.value)==null?void 0:R.kind)==="session"?o.value.session:o.value.slot),1)]}),_:1}),E.value?(e.openBlock(),e.createBlock(e.unref(x.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:E.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=R=>E.value.item.name=R),label:o.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",Yh,[e.createElementVNode("div",Xh,[e.createVNode(T,{modelValue:E.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=R=>E.value.item.startTime=R),label:o.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",Zh,[e.createVNode(T,{modelValue:E.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=R=>E.value.item.endTime=R),label:o.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),E.value.kind==="slot"&&i.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":E.value.item.sessionId,label:o.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:aw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=R=>Tl(E.value.item,R))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"edit-form",{kind:E.value.kind,item:E.value.item,schedule:Vl.value},void 0,!0),E.value.kind==="slot"?(e.openBlock(),e.createBlock(T,{key:1,modelValue:E.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=R=>E.value.item.description=R),label:o.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[E.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:o.value.delete,onClick:yw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{flat:"",label:o.value.cancel,color:"primary",onClick:g[13]||(g[13]=R=>N.value=!1)},null,8,["label"]),e.createVNode(w,{label:o.value.save,color:"primary",onClick:gw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(R,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":R.danger}]),onClick:J=>cw(R)},[e.createVNode(e.unref(x.QIcon),{name:R.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(R.label),1)],10,Jh))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9237bcac"]]),Kh={class:"schedule-timeline"},ep={key:0,class:"timeline-container"},tp={class:"day-header"},np={class:"day-title"},ip={class:"timeline"},op={key:0,class:"schedule-place"},rp={class:"events-column"},sp={key:0,class:"event-item session-item"},ap={class:"event-content"},lp={class:"event-time"},cp={class:"event-main"},dp={class:"event-name"},up={key:0,class:"speakers-list"},fp=["onClick"],mp={class:"speaker-details"},hp={class:"speaker-name"},pp={class:"bio-text"},gp=["onClick"],yp={key:0,class:"perfom-divider"},wp={class:"event-content"},bp={class:"event-time"},Cp={class:"event-main"},Sp={class:"event-name"},kp={class:"event-badges"},xp={key:0,class:"speakers-list"},Ep=["onClick"],Bp={class:"speaker-details"},Np={class:"speaker-name"},Vp={class:"bio-text"},$p={key:1,class:"no-program"},Ma=D(e.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:t}){const i=n,o=t,r=e.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=C=>{if(i.dayTitle)return i.dayTitle(C);const $=new Date(C.date);return isNaN($.getTime())||$.getFullYear()<2e3?"":$.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=C=>{var $;return i.placeName?i.placeName(C):(($=C.place)==null?void 0:$.name)||C.placeName||""},c=C=>i.slotName?i.slotName(C):(C==null?void 0:C.name)||"",l=C=>i.sessionName?i.sessionName(C):(C==null?void 0:C.name)||"",u=C=>i.slotParticipants?i.slotParticipants(C):(C==null?void 0:C.participants)||[],f=C=>i.sessionParticipants?i.sessionParticipants(C):(C==null?void 0:C.participants)||[],h=C=>{var $,M;return i.participantName?i.participantName(C):(C==null?void 0:C.name)||(C==null?void 0:C.fullName)||((M=($=C==null?void 0:C.human)==null?void 0:$.getFullName)==null?void 0:M.call($))||""},p=C=>i.participantBio?i.participantBio(C):(C==null?void 0:C.bio)||(C==null?void 0:C.regalias)||"",y=C=>i.slotListOf?i.slotListOf(C):(C==null?void 0:C.slots)||[],b=C=>i.nestedSlotListOf?i.nestedSlotListOf(C):(C==null?void 0:C.slots)||[],N=C=>C.schedules.filter($=>{var M;return y($).length>0||(((M=$.sessions)==null?void 0:M.length)||0)>0}),E=C=>{const $=[],M=new Set((C.sessions||[]).map(G=>G.id));for(const G of C.sessions||[]){$.push({kind:"session",item:G,nested:!1,index:0});for(const de of b(G))$.push({kind:"slot",item:de,nested:!0,index:0})}let A=0;for(const G of y(C).filter(de=>!de.sessionId||!M.has(de.sessionId)))$.push({kind:"slot",item:G,nested:!1,index:A++});return $},S=e.computed(()=>{var C;return(C=i.days)==null?void 0:C.some($=>{var M;return(M=$.schedules)==null?void 0:M.some(A=>{var G;return y(A).length>0||(((G=A.sessions)==null?void 0:G.length)||0)>0})})}),P=(C,$)=>`${C} - ${$}`;return(C,$)=>(e.openBlock(),e.createElementBlock("div",Kh,[S.value?(e.openBlock(),e.createElementBlock("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,M=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:"day-section"},[e.createElementVNode("div",tp,[e.createElementVNode("div",np,[e.createVNode(e.unref(x.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(M)),1)])]),e.createElementVNode("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(M),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",op,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",rp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E(A),G=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G.item.id},[G.kind==="session"?(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("div",ap,[e.createElementVNode("div",lp,e.toDisplayString(P(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",cp,[e.createElementVNode("div",dp,e.toDisplayString(l(G.item)),1),f(G.item).length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>o("open-participant",de)},[e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",pp,e.toDisplayString(p(de)),1)])],8,fp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":G.item.active,"nested-item":G.nested},{clickable:i.slotClickable}]]),onClick:de=>i.slotClickable&&o("slot-click",G.item)},[!G.nested&&G.index>0?(e.openBlock(),e.createElementBlock("div",yp)):e.createCommentVNode("",!0),e.createElementVNode("div",wp,[e.createElementVNode("div",bp,e.toDisplayString(P(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,e.toDisplayString(c(G.item)),1),e.createElementVNode("div",kp,[e.renderSlot(C.$slots,"badges",{item:G.item},void 0,!0)]),u(G.item).length?(e.openBlock(),e.createElementBlock("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>o("open-participant",de)},[e.createElementVNode("div",Bp,[e.createElementVNode("div",Np,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",Vp,e.toDisplayString(p(de)),1)])],8,Ep))),128))])):e.createCommentVNode("",!0)])])],10,gp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",$p,[e.createVNode(e.unref(x.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(C.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Ta,ScheduleTimeline:Ma},Symbol.toStringTag,{value:"Module"})),Mp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:bt,blockSizeClass:Na,blockStyle:Sa,byStart:cr,diffM:Ln,findEnclosingSession:Ba,fromMin:Xe,gridBounds:Ca,hasConflict:xa,intersects:mi,nestedConflict:Ea,nestedSlotStyle:ka,normTime:gn,snapMinutes:hi,toMin:ae},Symbol.toStringTag,{value:"Module"}));let Pp=class extends xe{constructor(){super(Xi,"schedule-days")}};const Ip=new Pp;let Rp=class extends xe{constructor(){super(On,"schedule-places")}};const Ap=new Rp;let zp=class extends xe{constructor(){super(Fn,"schedule-sessions")}};const Dp=new zp;let Fp=class extends xe{constructor(){super(Ot,"schedule-slots")}};const Op=new Fp;let Lp=class extends xe{constructor(){super(fi,"schedule-timetables")}};const _p=new Lp,Hp=Object.freeze(Object.defineProperty({__proto__:null,C:Jm,Components:Tp,H:Mp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Ip,SchedulePlacesStore:Ap,ScheduleSessionsStore:Dp,ScheduleSlotsStore:Op,SchedulesStore:_p},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Va,defaultScheduleLabels:dr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),ur=e.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:t}){const i=t,o=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QChip),e.mergeProps(e.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=c=>i("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Up={class:"tags-selector"},vp={key:0,class:"empty-state"},Zi=D(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const i=n,o=e.ref(""),r=i.store.Options,s=e.computed(()=>r.filter(l=>z.H.Strings.SearchIn(l.label,o.value))),a=t;e.onBeforeMount(async()=>{await i.store.GetOptions()});const c=async l=>{await i.store.Get(l.value),a("select",i.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",Up,[e.createVNode(et,{modelValue:e.unref(o),"onUpdate:modelValue":u[0]||(u[0]=h=>e.isRef(o)?o.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(x.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:p=>c(h)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vp,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),qp={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},jp={class:"edit-dialog-header"},Wp={class:"edit-dialog-title"},Gp={class:"edit-dialog-content"},Qp={key:0,class:"edit-dialog-actions"},_n=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},qp),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:i}){const o=n,r=i,s=e.ref(!1);e.watch(()=>o.modelValue,h=>{s.value=h},{immediate:!0});const a=async()=>{r("confirm"),c()},c=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},l=()=>{s.value&&c()};t({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await e.nextTick();const h=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');h&&"focus"in h&&h.focus()};return(h,p)=>{const y=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(dn,{modelValue:e.unref(s),"onUpdate:modelValue":[p[0]||(p[0]=b=>e.isRef(s)?s.value=b:null),c],position:"top",onKeydown:[e.withKeys(a,["enter"]),e.withKeys(l,["escape"])],onShow:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:o.width})},[e.createElementVNode("div",jp,[e.createElementVNode("div",Wp,e.toDisplayString(o.title),1),e.withDirectives(e.createVNode(ie,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[y]])]),e.createElementVNode("div",Gp,[e.renderSlot(h.$slots,"default",{},void 0,!0)]),o.showConfirm?(e.openBlock(),e.createElementBlock("div",Qp,[e.withDirectives(e.createVNode(ie,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[y]]),e.createVNode(ie,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),fr=D(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(),s=()=>{r.value.toggle(),o("click")},a=async c=>{i.row[i.prop]=c,await i.store.Update(i.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,h;return[e.createVNode(ur,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((h=n.row[n.prop])!=null&&h.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(x.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(_n,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(Zi,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),Yp={class:"tag-name"},Xp={key:0,class:"tag-extra"},mr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,i=e.ref(),o=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>o.value?(Array.isArray(o.value)?o.value:[o.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),i.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(h=>e.unref(s)?e.unref(i).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Yp,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",Xp,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=h=>e.unref(i).toggle())}))],2)]),_:1})),e.createVNode(_n,{ref_key:"edit",ref:i,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(Zi,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),Zp={key:0,class:"relation-label"},Jp={class:"relation-count"},hr=D(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const i=n,o=t,r=()=>{i.count!==0&&(i.to&&z.H.Router.To(i.to),o("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",Zp,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Jp,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),pr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ie,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:i[0]||(i[0]=o=>e.unref(z).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),Kp={class:"cell-text"},gr=D(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,i=e.ref(),o=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=o.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=o.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(i).toggle():void 0)},[e.createElementVNode("span",Kp,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:i,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),pi=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},value:{type:String,default:"",required:!1},readonly:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},clearable:{type:Boolean,required:!1,default:!0},width:{type:String,required:!1,default:""},borderColor:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},inPadding:{type:String,required:!1,default:""},options:{type:Array,required:!1,default:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>typeof r.id=="string"?r.id:void 0),a=e.computed(()=>{const p={};for(const y of Object.keys(r))y!=="id"&&y!=="disable"&&(p[y]=r[y]);return p}),c=n,l=e.computed(()=>r.disable??c.disabled),u=p=>{o("change",p)},f=()=>{o("clear",void 0)},h=e.computed(()=>{const p={};return c.margin&&(p.margin=c.margin),c.padding&&(p.padding=c.padding),c.width&&(p.width=c.width),c.inPadding&&(p.padding=c.inPadding),p});return(p,y)=>(e.openBlock(),e.createBlock(e.unref(x.QSelect),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(l),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(p.$slots,"before",{},()=>[e.renderSlot(p.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(p.$slots,"append",{},()=>[e.renderSlot(p.$slots,"right")])]),_:2},[p.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"prepend")]),key:"0"}:void 0,p.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after")]),key:"1"}:void 0,p.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),key:"2"}:void 0,p.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"label")]),key:"3"}:void 0,p.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"error")]),key:"4"}:void 0,p.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"hint")]),key:"5"}:void 0,p.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"counter")]),key:"6"}:void 0,p.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"loading")]),key:"7"}:void 0,p.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"selected")]),key:"8"}:void 0,p.$slots.option?{name:"option",fn:e.withCtx(b=>[e.renderSlot(p.$slots,"option",e.normalizeProps(e.guardReactiveProps(b)))]),key:"9"}:void 0,p.$slots["no-option"]?{name:"no-option",fn:e.withCtx(b=>[e.renderSlot(p.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(b)))]),key:"10"}:void 0,p.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"before-options")]),key:"11"}:void 0,p.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after-options")]),key:"12"}:void 0,p.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(b=>[e.renderSlot(p.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(b)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),yr=D(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,i=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(o,r)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(pi,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(i)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),eg={class:"cell-text"},wr=D(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,i=e.ref(),o=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=o.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=o.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(i).toggle():void 0)},[e.createElementVNode("span",eg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:i,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),br=D(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,i)=>`${n}-${t} из ${i}`}},emits:["request"],setup(n,{emit:t}){const i=n,o=t,r=e.ref({page:0,rowsNumber:i.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>i.store.Count,()=>{r.value.rowsNumber=i.store.Count});const s=c=>{z.F.FTSP.Get().p.page=c.pagination.page-1,z.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await i.store.FTSP(),o("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(x.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Pa(n){n.component("PTable",br),n.component("PTableBadge",fr),n.component("PTableBadges",mr),n.component("PTableCount",hr),n.component("PTableEdit",pr),n.component("PTableNumber",gr),n.component("PTableSelect",yr),n.component("PTableString",wr)}const tg=Object.freeze(Object.defineProperty({__proto__:null,PTable:br,PTableBadge:fr,PTableBadges:mr,PTableCount:hr,PTableEdit:pr,PTableNumber:gr,PTableSelect:yr,PTableString:wr,default:Pa},Symbol.toStringTag,{value:"Module"})),ng=["innerHTML"],Cr=D(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const i=n,o=t;e.onBeforeMount(()=>{i.tabsStore.Select()});const r=s=>{i.tabsStore.Select(s),o("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(x.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,ng)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(x.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),ig={class:"q-pa-md"},Sr=D(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const i=n,o=t,r=a=>{i.tabsStore.Select(a),o("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(x.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(x.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",ig,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(ie,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class Ji{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var i;const t=z.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((i=this.items[0])==null?void 0:i.value);return}this.Select(t)}static ToTab(t,i="",o=""){return{label:o,value:i,...t}}static Create(t,i){const o=new Ji;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(o=>o.value===t),this.value=t;const i=this.GetValue();i&&z.H.Router.SetQueryParam(this.key,i)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function Ia(n){n.component("PTabs",Cr),n.component("PTabsLeft",Sr)}const og=Object.freeze(Object.defineProperty({__proto__:null,Contacts:mm,Forms:Om,Menus:Wm,Schedule:Hp,Table:tg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Cr,PTabsLeft:Sr,TabsStore:Ji,default:Ia},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ra=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{o("change",i.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QCheckbox),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),rg={class:"row items-center justify-end"},Ki="DD.MM.YYYY",eo=e.defineComponent({__name:"PDateInput",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},modelType:{type:String,default:void 0,required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const i=n,o=t,r=e.useModel(n,"modelValue"),s=Ki.replace(/[DMY]/g,"#"),a=e.ref(null),c=b=>{if(i.modelType){a.value=i.modelType;return}b instanceof Date?a.value="date":(typeof b=="string"&&b||a.value===null)&&(a.value="string")},l=b=>{if(!b)return"";if(b instanceof Date)return Number.isNaN(b.getTime())?"":x.date.formatDate(b,Ki);const N=String(b).match(/^(\d{4})-(\d{2})-(\d{2})/);if(N)return`${N[3]}.${N[2]}.${N[1]}`;const E=new Date(b);return Number.isNaN(E.getTime())?"":x.date.formatDate(E,Ki)},u=b=>{const N=b.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!N)return null;const E=+N[1],S=+N[2],P=+N[3];if(E<1||E>31||S<1||S>12||P<1900||P>2100)return null;const C=new Date(P,S-1,E);return C.getFullYear()!==P||C.getMonth()!==S-1||C.getDate()!==E?null:C},f=e.ref(l(r.value));c(r.value),e.watch(r,b=>{c(b);const N=l(b);N!==f.value&&(f.value=N)});const h=b=>{const N=typeof b=="number"?String(b):b;if(!N){const S=a.value==="date"?null:"";r.value=S,o("input",S);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(N))return;const E=u(N);if(E)if(a.value==="date")r.value=E,o("input",E);else{const S=E.getFullYear(),P=String(E.getMonth()+1).padStart(2,"0"),C=String(E.getDate()).padStart(2,"0"),$=`${S}-${P}-${C}`;r.value=$,o("input",$)}},p=()=>{o("blur",r.value)},y={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(b,N)=>{const E=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(et,{modelValue:e.unref(f),"onUpdate:modelValue":[N[1]||(N[1]=S=>e.isRef(f)?f.value=S:null),h],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,inputmode:"numeric",onBlur:p},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(f),"onUpdate:modelValue":N[0]||(N[0]=S=>e.isRef(f)?f.value=S:null),mask:Ki,"today-btn":"",locale:y},{default:e.withCtx(()=>[e.createElementVNode("div",rg,[e.withDirectives(e.createVNode(ie,{label:"Готово",color:"primary",flat:""},null,512),[[E]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(b.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(b.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"])}}}),sg=e.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:e.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useModel(n,"modelValue"),r=c=>{const l=c.getFullYear(),u=String(c.getMonth()+1).padStart(2,"0"),f=String(c.getDate()).padStart(2,"0");return`${l}-${u}-${f}`},s=c=>{i("input",c instanceof Date?r(c):c??null)},a=()=>{i("blur")};return(c,l)=>(e.openBlock(),e.createBlock(eo,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),ag={class:"row items-center justify-end"},lg={class:"row items-center justify-end"},Aa=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=e.ref(""),o=e.ref(""),r=e.ref(""),s=y=>y?x.date.formatDate(y,"DD.MM.YYYY HH:mm"):"",a=y=>{if(!y||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(y))return null;const b=x.date.extractDate(y,"DD.MM.YYYY HH:mm");return Number.isNaN(b.getTime())?null:b},c=y=>{t.value=y},l=y=>{const b=String(y??"");i.value=b.replace(/[_\s]/g,"")===""?"":b},u=()=>{const y=a(i.value);y?c(y):i.value===""?c(null):i.value=s(t.value)},f=()=>{if(o.value){const y=t.value?x.date.formatDate(t.value,"HH:mm"):"00:00",b=`${o.value} ${y}`,N=a(b);N&&(i.value=s(N),c(N))}o.value=""},h=()=>{if(r.value){const y=t.value?x.date.formatDate(t.value,"DD.MM.YYYY"):"",b=x.date.formatDate(new Date,"DD.MM.YYYY"),N=y?`${y} ${r.value}`:`${b} ${r.value}`,E=a(N);E&&(i.value=s(E),c(E))}r.value=""};e.watch(t,y=>{y!==a(i.value)&&(i.value=s(y??null))},{immediate:!0});const p={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(y,b)=>{const N=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(et,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":l,onBlur:u},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(o),"onUpdate:modelValue":b[0]||(b[0]=E=>e.isRef(o)?o.value=E:null),mask:"DD.MM.YYYY",locale:p},{default:e.withCtx(()=>[e.createElementVNode("div",ag,[e.withDirectives(e.createVNode(ie,{label:"OK",color:"primary",flat:"",onClick:f},null,512),[[N]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTime),{modelValue:e.unref(r),"onUpdate:modelValue":b[1]||(b[1]=E=>e.isRef(r)?r.value=E:null),mask:"HH:mm",format24h:"",locale:p},{default:e.withCtx(()=>[e.createElementVNode("div",lg,[e.withDirectives(e.createVNode(ie,{label:"OK",color:"primary",flat:"",onClick:h},null,512),[[N]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"])}}}),cg=D(e.defineComponent({inheritAttrs:!1,__name:"PFlex",props:{margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},minWidth:{type:String,default:"",required:!1},maxWidth:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},justifyContent:{type:String,default:"",required:!1},background:{type:String,default:"",required:!1},alignItems:{type:String,default:"",required:!1}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),dg={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},ug=D(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:i}){const o=i,r=e.useModel(n,"valid"),s=e.ref(!0),a=S=>{s.value=S,r.value!==void 0&&(r.value=S)},c=e.ref(),l=()=>{a(!0),o("validation-success")},u=()=>{a(!1),o("validation-error")},f=S=>{o("submit",S)},h=()=>{var S;(S=c.value)==null||S.resetValidation(),a(!0),o("reset")},p=async()=>{var P;const S=await((P=c.value)==null?void 0:P.validate())??!1;return a(S),S},y=()=>{var S;(S=c.value)==null||S.resetValidation(),a(!0)};return t({validate:p,resetValidation:y,focus:()=>{var S;return(S=c.value)==null?void 0:S.focus()},submit:S=>{var P;return(P=c.value)==null?void 0:P.submit(S)},reset:S=>{var P;return(P=c.value)==null?void 0:P.reset(S)}}),(S,P)=>(e.openBlock(),e.createBlock(e.unref(x.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:h,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default",{},void 0,!0),S.$slots.actions?(e.openBlock(),e.createElementBlock("div",dg,[e.renderSlot(S.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:y},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),fg={class:"p-hint-popup"},kr=D(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(nt,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":o[1]||(o[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",fg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),mg=e.defineComponent({__name:"PInputDate",props:e.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useModel(n,"modelValue");let r=null;const s=c=>{i("input",c),r=c instanceof Date?c:null},a=()=>{r instanceof Date&&(i("beforeChange",r),i("change",r),r=null)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(eo,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),hg=D(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),pg=D(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),gg=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},max:{type:Number,default:Number.MAX_VALUE,required:!1},min:{type:Number,default:Number.NEGATIVE_INFINITY,required:!1},step:{type:Number,default:1,required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useAttrs(),r=e.computed(()=>typeof o.id=="string"?o.id:void 0),s=e.computed(()=>{const M={};for(const A of Object.keys(o))A!=="id"&&(M[A]=o[A]);return M}),a=n,c=()=>{const M=a.step.toString();return M.includes(".")?M.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),h=(M=>Math.min(Math.max(M,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const p=e.ref(h.toFixed(c())),y=e.computed(()=>{const M={};return a.margin&&(M.margin=a.margin),a.padding&&(M.padding=a.padding),M}),b=M=>{const A=Math.pow(10,l);return Math.round(M*A)/A},N=(M,...A)=>{u.value=b(M),p.value=b(M).toFixed(c()),A.forEach(G=>i(G,u.value))},E=(M,...A)=>{a.disabled||M>a.max||M<a.min||N(M,...A)},S=()=>E(+p.value+a.step,"change"),P=()=>E(+p.value-a.step,"change"),C=M=>E(Number(M),"input"),$=()=>E(+p.value,"change","blur");return(M,A)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(y),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onBlur:$}),{before:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:P},{default:e.withCtx(()=>[e.createVNode(hg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:S},{default:e.withCtx(()=>[e.createVNode(pg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),yg=D(gg,[["__scopeId","data-v-1aec76d0"]]),wg=D(e.defineComponent({__name:"PLeftSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть меню"},titleClose:{type:String,required:!1,default:"Показать меню"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),bg=e.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(x.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Cg=e.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(x.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),za=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,i=((c=t.storeOpts)==null?void 0:c.Options)??[],o=e.ref(i);async function r(l,u,f,h){var N,E;const y="set"+(((N=u[0])==null?void 0:N.toUpperCase())+u.slice(1)),b=l[y];typeof b=="function"?b(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((E=h==null?void 0:h.Update)==null?void 0:E.call(h,l))}const s=(l,u)=>{if(l===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>z.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{i.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(pi,{"use-input":"",options:e.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(kr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Sg=e.defineComponent({__name:"PRadio",props:e.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=n,s=()=>{o("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QRadio),{modelValue:i.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>i.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),kg=D(e.defineComponent({__name:"PRightSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть"},titleClose:{type:String,required:!1,default:"Показать"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),xg=D(e.defineComponent({__name:"PSticky",props:{shadow:{type:Boolean,default:!1},zIndex:{type:Number,default:0},background:{type:String,default:"inherit"},padding:{type:String,default:"0"},top:{type:String,default:"0"},divider:{type:Boolean,default:!1},dividerColor:{type:String,default:"rgba(0, 0, 0, 0.12)"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Da=D(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,i=e.computed(()=>t.row[t.prop]),o=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:o())},[e.createVNode(e.unref(x.QIcon),{name:e.unref(i)?"check_circle":"radio_button_unchecked",color:e.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(nt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Eg=D(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"0"},padding:{type:String,default:"0",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),i=e.useAttrs(),o=e.computed(()=>typeof i.id=="string"?i.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(i))u!=="id"&&(l[u]=i[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(o),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),Fa=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{o("change",i.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QToggle),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Bg={class:"top-slider-content"},Ng={class:"center"},Vg=D(e.defineComponent({__name:"PTopSlider",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},open:{type:Boolean,default:!1}},emits:["open"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Bg,[e.createElementVNode("div",Ng,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function $g(n){n.component("PButton",ie),n.component("PBadge",li),n.component("PCheckBox",Ra),n.component("PChip",ur),n.component("PDateInput",eo),n.component("PDatePicker",sg),n.component("PDateTimeInput",Aa),n.component("PDialog",dn),n.component("PFlex",cg),n.component("PForm",ug),n.component("PHint",kr),n.component("PInput",et),n.component("PInputDate",mg),n.component("PInputNumber",yg),n.component("PLeftSlider",wg),n.component("PList",bg),n.component("PListItem",Cg),n.component("POptionsListSingle",Zi),n.component("POpts",za),n.component("PRadio",Sg),n.component("PRightSlider",kg),n.component("PSelect",pi),n.component("PSticky",xg),n.component("PString",Jo),n.component("PTextarea",Eg),n.component("PTopSlider",Vg),n.component("PTableToggle",Da),n.component("PToggle",Fa),n.component("PTooltip",nt)}const Tg={key:0,class:"mainblock"},Mg={class:"mainblock-right"},Pg={class:"body"},Ig=D(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(e.openBlock(),e.createElementBlock("div",Tg,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(o)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Mg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Pg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Rg={class:"mainblock-right"},Ag={class:"body"},zg=D(e.defineComponent({__name:"AdaptiveContainerHorizontal",props:{menuWidth:{type:String,required:!1,default:"0px"},leftWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"},titleSticky:{type:Boolean,required:!1,default:!1}},setup(n){const t=n,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(o)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Rg,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Ag,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Oa=D(e.defineComponent({__name:"GridContainer",props:{maxWidth:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"100%"},background:{type:String,required:!1,default:"inherit"},gridGap:{type:String,required:!1,default:"10px"},gridTemplateColumns:{type:String,required:!1,default:"repeat(auto-fit, minmax(250px, 1fr))"},gridTemplateRows:{type:String,required:!1,default:"repeat(0 0px)"},margin:{type:String,required:!1,default:"10px 0 0 0"},customClass:{type:String,required:!1,default:""}},setup(n){return e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Dg={class:"container"},Fg={class:"slide-box"},Og={class:"image"},Lg={class:"image-box"},_g=["id","src","alt"],Hg={class:"link-number"},Ug=["id","onClick"],vg=D(e.defineComponent({__name:"CarouselImages",props:{events:{type:Array,required:!0},quantity:{type:Number,default:1,required:!1},animationTime:{type:Number,default:500},height:{type:String,default:"360px"},maxHeight:{type:String,default:"360px"},startActiveGroupIndex:{type:Number,default:0}},emits:["openModalWindow"],setup(n){e.useCssVars(y=>({v582c9d05:i}));const t=n,i=`${t.animationTime}ms`,o=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(Zs(t.events,t.quantity)),a=e.computed(()=>s.value[o.value]);e.onMounted(()=>{});const c=()=>o.value=o.value+1<s.value.length?o.value+1:0,l=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=y=>{r.value=y,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=y=>{y!=o.value&&(u(y<o.value?Nt.Prev:Nt.Next),setTimeout(()=>o.value=y,t.animationTime/2))},h=()=>{u(Nt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Nt.Prev),setTimeout(l,t.animationTime/2)};return(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Dg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:b[0]||(b[0]=e.withModifiers(N=>p(),["stop"]))},[...b[3]||(b[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Fg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Nt).Next,animationprev:e.unref(r)===e.unref(Nt).Prev})},[e.createElementVNode("div",Og,[e.createElementVNode("div",Lg,[e.createElementVNode("img",{id:N.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:N.fileInfo.getImageUrl(),alt:N.fileInfo.originalName,onClick:b[1]||(b[1]=S=>y.showImageInFullScreen())},null,12,_g)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:b[2]||(b[2]=e.withModifiers(N=>h(),["stop"]))},[...b[4]||(b[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Hg,[e.createVNode(Oa,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(N,E)=>(e.openBlock(),e.createElementBlock("div",{id:E.toString(),key:E,class:"number",style:e.normalizeStyle({background:E.toString()===e.unref(o).toString()?"#9D9D9D":""}),onClick:e.withModifiers(S=>f(E),["stop"])},e.toDisplayString(E+1),13,Ug))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),qg=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.x),s=e.ref(i.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{o("close")};return(u,f)=>{const h=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[h,l]])}}}),jg={class:"drop-item"},Wg={key:0,class:"drop-item-list"},Gg=D(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,i=e.ref(t.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>o())},[e.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",Wg,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Qg=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Vo,required:!0}},emits:["load"],setup(n,{emit:t}){const i=n,o=e.ref(!1),r=t,s=()=>{i.model.setBoolean(o.value),o.value?z.F.FTSP.Get().setF(i.model):z.F.FTSP.Get().removeF(i.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(o),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),Yg=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const i=t,o=e.ref(void 0),r=async a=>{Ft.Get().replaceF(a,o.value),o.value=a,Ft.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,c)=>{const l=e.resolveComponent("PString"),u=e.resolveComponent("PButton"),f=e.resolveComponent("GridContainer"),h=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...c[0]||(c[0]=[])]),default:e.withCtx(()=>[e.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(p,y)=>(e.openBlock(),e.createBlock(u,{key:y,color:"blue",height:"auto",text:p.label,"is-toggle":p.valueEq(e.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:b=>s(p.valueEq(e.unref(o))?void 0:p)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-949e92b5"]]),Xg=["value","label"],Zg=D(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const i=t,o=Ft.Get(),r=e.ref(void 0),s=async c=>{o.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),i("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,value:f,label:f.label},null,8,Xg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),Jg=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,i)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),Kg=D(e.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(i.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),e1={key:0,class:"blur"},t1={style:{display:"flex","justify-content":"center"}},n1=D(e.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(n,{emit:t}){const i=n,o=t,r=i.customClass!==""?i.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(i.close);e.watch(()=>i.close,()=>{a.value=!1});const u=$=>{$.stopPropagation(),$.key==="Escape"&&(i.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var $,M;await e.nextTick(),a.value?((M=($=document.getElementById("info-item-opened-content"))==null?void 0:$.querySelector("input"))==null||M.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,l.value!==i.close&&(a.value=!1,l.value=!l.value)},h=e.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&i.withOpenWindow),y=e.computed(()=>({background:i.background?i.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":i.padding,margin:i.margin,width:p.value?i.openWidth:i.width,height:p.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(i.withHover,"pointer")})),b=e.computed(()=>({height:p.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),N=e.computed(()=>({height:p.value?"auto":"0"})),E=e.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),S=()=>{i.showSaveDialog?c.value=!0:a.value=!1},P=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),c.value=!1},C=()=>{a.value=!1,c.value=!1};return($,M)=>{const A=e.resolveComponent("PString"),G=e.resolveComponent("PButton"),de=e.resolveComponent("PModal"),$e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",e1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(h)),onClick:M[2]||(M[2]=e.withModifiers(Ee=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(y)),onMouseenter:M[0]||(M[0]=Ee=>n.withHover?s.value=!0:s.value=!1),onMouseleave:M[1]||(M[1]=Ee=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(b))},[e.renderSlot($.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(N))},[e.renderSlot($.$slots,"open-inside-content",{},void 0,!0)],4)),[[$e,S,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(E))},[e.renderSlot($.$slots,"title",{},()=>[e.createVNode(A,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(de,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",t1,[e.createVNode(G,{text:"Не сохранять",onClick:C}),e.createVNode(G,{text:"Сохранять",onClick:P})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),i1=D(e.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(i),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),o1={class:"mainblock"},r1={class:"mainline"},s1=D(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",o1,[e.createElementVNode("div",r1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),La=D(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),a1={class:"search-list"},l1=["onClick"],_a=D(e.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]},width:{type:[Number,String],default:""},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"var(--box-shadow)"}},emits:["select","input"],setup(n,{emit:t}){const i=t,o=n,r=e.ref(o.modelValue),s=e.ref([]);async function a(){i("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function l(u){r.value="",i("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(et,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>e.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(La,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",a1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>(e.openBlock(),e.createElementBlock("li",{key:h.value,onClick:p=>l(h)},e.toDisplayString(h.label),9,l1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),c1=D(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=async()=>{};return(o,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:i},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),d1={style:{display:"flex","justify-content":"center",width:"100%"}},u1={class:"pag-number"},f1={class:"pag-ul"},m1={key:2},h1=D(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,i=h=>h?"active":"neutral",o=h=>h?"not-active":"neutral",r=e.ref(Js),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!t.showConfirm))return await l(h)},l=async(h,p)=>{r.value.setCurPage(h),Ft.Get().p.offset=(h-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const h=r.value.pagesCount();return h<8?Dt.GenerateNumsRange(2,h-1).filter(p=>p<h&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<h&&p>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");h?h.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{Ft.Get().p.drop()}),(h,p)=>{const y=e.resolveComponent("ArrowLeft"),b=e.resolveComponent("PButton"),N=e.resolveComponent("DoubleArrowLeft"),E=e.resolveComponent("EllipsisSvg"),S=e.resolveComponent("DoubleArrowRight"),P=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",d1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",u1,[e.createVNode(b,{skin:"pag",type:o(e.unref(r).curPage===1),onClick:p[0]||(p[0]=C=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(y)]),_:1},8,["type"]),e.createElementVNode("ul",f1,[e.createElementVNode("li",null,[e.createVNode(b,{skin:"pag",type:i(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=C=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=C=>s.value=!0),onMouseleave:p[4]||(p[4]=C=>s.value=!1)},[e.createVNode(b,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=C=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(N,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),C=>(e.openBlock(),e.createElementBlock("li",{key:C},[e.createVNode(b,{skin:"pag",type:i(C===e.unref(r).curPage),text:C,onClick:$=>c(C)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=C=>a.value=!0),onMouseleave:p[7]||(p[7]=C=>a.value=!1)},[e.createVNode(b,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=C=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(S,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",m1,[e.createVNode(b,{skin:"pag",type:i(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=C=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(b,{skin:"pag",type:o(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=C=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(P)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),p1=D(e.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},width:{type:[Number,String],default:"var(--input-width-default, 100%)"},focus:{type:Boolean,default:!1},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"rgba(0, 0, 0, 0.35) 0px 5px 5px"}},emits:["select","load","input"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.modelValue),s=e.ref();let a=Zo.SearchModel();e.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Zo.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const h=a.searchGroups.find(p=>p.key===i.keyValue);return h&&(a.searchGroup=h),await sa.Search.Search(a),a.searchObjects},l=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,h)=>(e.openBlock(),e.createBlock(_a,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=p=>e.isRef(r)?r.value=p:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-46a1d0c0"]]),g1={class:"mainblock-body"},y1={class:"mainblock-footer"},w1=D(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",g1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",y1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),b1={class:"right-slider-content"},C1={class:"right-slider-content-header"},S1={class:"right-slider-content-box"},k1={class:"right-slider-button"},x1=D(e.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(!1);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",b1,[e.createElementVNode("div",C1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",S1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),E1={class:"mainblock"},B1={class:"body-block"},N1={class:"tab-block"},V1=D(e.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{o("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",E1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[e.createElementVNode("div",{class:"slider-icon",style:e.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",B1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),$1=["label","value"],T1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const i={[Ye.String]:"Текстовый ответ",[Ye.Text]:"Развёрнутый текстовый ответ",[Ye.Number]:"Числовой ответ",[Ye.Date]:"Ответ в виде даты",[Ye.Radio]:"Выбор одного из вариантов",[Ye.Set]:"Выбор нескольких вариантов",[Ye.File]:"Ответ в виде файла",[Ye.MatrixRadio]:"Матрица с одним выбором",[Ye.MatrixSet]:"Матрица с несколькими выборами"},o=t,r=s=>{o("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,$1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),M1=["label","value"],P1=D(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=e.ref();e.onBeforeMount(()=>{i.value=!0,r.value=cn.GetDefault()});const s=async c=>{r.value=c??cn.GetDefault(),o("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(i)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>e.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=h=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(h,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:h.label,value:h},null,8,M1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),I1=["label","value"],R1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=t,o=e.ref();e.onBeforeMount(()=>{o.value=cn.GetDefault()});const r=async a=>{a||(o.value=cn.GetDefault()),Ft.Get().setSortModel(o.value),Ft.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(o),"onUpdate:modelValue":c[0]||(c[0]=f=>e.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:f.label,value:f},null,8,I1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-fd5da1fc"]]),A1={class:"switch-container"},z1={class:"line"},D1={class:"line"},F1=D(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,c=h=>{var y;return{color:(y=u.value)!=null&&y.valueEq(h)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async h=>{var p;(p=u.value)!=null&&p.valueEq(h)||(u.value=h,l("load"))};return(h,p)=>{const y=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",A1,[e.createElementVNode("div",z1,[e.createVNode(y,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=b=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(y,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=b=>f())},null,8,["style"]),e.createVNode(y,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=b=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",D1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=b=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=b=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=b=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),O1={},L1={class:"flex"};function _1(n,t){return e.openBlock(),e.createElementBlock("div",L1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const H1=D(O1,[["render",_1],["__scopeId","data-v-5023d414"]]),U1=D(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(i),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),v1={class:"top-slider-content"},q1={class:"center"},j1=D(e.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(!0);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",v1,[e.createElementVNode("div",q1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function W1(n){n.component("PageNotFound",Qs),n.component("AdaptiveContainer",Ig),n.component("AdaptiveContainerHorizontal",zg),n.component("CarouselImages",vg),n.component("ContextWindow",qg),n.component("DropList",Gg),n.component("FilterCheckbox",Qg),n.component("FiltersButtonsSelect",Yg),n.component("FilterSelect",Zg),n.component("FTSPPanel",Jg),n.component("GeneralItem",Kg),n.component("GridContainer",Oa),n.component("InfoItem",n1),n.component("InfoItemSelectButtons",i1),n.component("LeftRightContainer",s1),n.component("PAutocomplete",_a),n.component("PhoneForm",c1),n.component("PPagination",h1),n.component("RemoteSearch",p1),n.component("ResearcheContainer",w1),n.component("RightSliderContainer",x1),n.component("RightTabsContainer",V1),n.component("SelectValueType",T1),n.component("SortList",P1),n.component("SortSelect",R1),n.component("Switch3Pos",F1),n.component("ThemeWrapper",H1),n.component("ToggleInfoItem",U1),n.component("TopSliderContainer",j1)}const G1=D(e.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),e.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),Q1=D(e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),e.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),Y1=D(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),X1=D(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Ha=D(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),Z1=D(e.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),J1=D(e.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),K1=D(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),ey=D(e.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),ty=D(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),ny=D(e.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-46c690c8"]]),iy=D(e.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-b688738b"]]),oy=D(e.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-bd131770"]]),ry=D(e.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-db5832a2"]]),sy=D(e.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[3]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-5abed3e4></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-5abed3e4></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function ay(n){n.component("IconDownload",G1),n.component("IconFilter",Q1),n.component("ArrowLeft",ny),n.component("ArrowRight",iy),n.component("DoubleArrowLeft",oy),n.component("DoubleArrowRight",ry),n.component("EllipsisSvg",sy),n.component("IconArrowLeft",Y1),n.component("IconCheckDefault",X1),n.component("IconClose",Ha),n.component("IconEdit",Z1),n.component("IconEmail",J1),n.component("IconMove",K1),n.component("IconPhone",ey),n.component("IconSearch",La),n.component("IconSelectArrow",ty)}const ly=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),i=o=>{t.value=o};return e.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:t}}});function cy(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const dy=D(ly,[["render",cy]]),uy=e.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(n,{emit:t}){const i=e.ref(n.activeId==="0"),o=()=>{i.value=!i.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),fy=["for"],my={class:"inside-icon"};function hy(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",my,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,fy),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const py=D(uy,[["render",hy],["__scopeId","data-v-37d79495"]]),gy={class:"tab"},yy={class:"rotate"},wy=D(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),i=async()=>{t.value=!t.value};return(o,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gy,[e.renderSlot(o.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:i},[e.createElementVNode("div",yy,[e.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),by={class:"add-block_body"},Cy=D(e.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(t,i)=>{const o=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",by,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Sy=D(e.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),ky={class:"add-block_body"},xy=D(e.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(t,i)=>{const o=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",ky,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Ey={class:"select-dialog"},By={class:"select-dialog-header"},Ny={class:"select-dialog-title"},Vy={class:"select-dialog-content"},$y={class:"select-dialog-actions"},Ua=D(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:i}){const o=n,r=i,s=e.useModel(n,"modelValue"),a=e.ref([]),c=x.Ripple,l=async()=>{await o.store.GetOptions(),a.value=o.store.Options},u=async N=>{await o.store.Get(N.value);const E=o.store.Item,S=new E.constructor(E);r("add",S),f()},f=()=>{r("close"),s.value=!1},h=N=>{N||r("close")},p=()=>{s.value&&f()},y=()=>{s.value=!s.value},b=async()=>{await e.nextTick();const N=document.querySelector(".select-dialog-content .q-item");N&&"focus"in N&&N.focus()};return t({opened:s,toggle:y}),e.onBeforeMount(l),(N,E)=>{const S=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(dn,{modelValue:s.value,"onUpdate:modelValue":[E[0]||(E[0]=P=>s.value=P),h],position:"top",onKeydown:e.withKeys(p,["escape"]),onShow:b},{default:e.withCtx(()=>[e.createElementVNode("div",Ey,[e.createElementVNode("div",By,[e.createElementVNode("div",Ny,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ie,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[S]])]),e.createElementVNode("div",Vy,[e.createVNode(e.unref(x.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),P=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:P.value,clickable:"",class:"q-px-md q-py-sm",onClick:C=>u(P)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",$y,[e.withDirectives(e.createVNode(ie,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[S]])])])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-462df82a"]]),Ty=["src"],My={key:0,class:"header-row"},Py={class:"title-wrapper"},Iy={key:0,class:"title-icon"},Ry={class:"title-text"},Ay={class:"text-subtitle1 text-weight-medium"},zy={key:0,class:"caption-row"},Dy={class:"text-caption text-grey-6"},Fy=["innerHTML"],Oy={key:1,class:"card-footer"},va=D(e.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:t}){const i=e.ref(null),o=n,r=t,s=e.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=c=>{o.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,Ty)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",My,[e.createElementVNode("div",Py,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Iy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(x.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ry,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Ay,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",zy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Dy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(x.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Fy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Oy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),Ly={key:0,class:"list-title"},_y={class:"draggable-item"},Hy={class:"drag-handle"},Uy={class:"item-content"},vy={key:0,class:"item-actions"},qy={class:"item-content"},jy={key:0,class:"item-actions"},Wy={key:4,class:"add-button-container"},Gy=e.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:z.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const i=n,o=t,r=async()=>{const l=i.addFunc?await i.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(l),i.store&&await i.store.Create(l)),await c(),o("add",l)},s=async l=>{i.removeFromList&&z.H.Classes.RemoveFromClassById(l,i.list),i.store&&await i.store.Remove(l),await c(),o("remove",l)},a=async l=>{i.store&&await i.store.Update(l),o("update",l)},c=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(z.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",Ly,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(wo),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:h})=>[e.createElementVNode("div",_y,[e.createElementVNode("div",Hy,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",Uy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",vy,[e.createVNode(ie,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",qy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",jy,[e.createVNode(ie,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Wy,[e.createVNode(ie,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),qa=D(Gy,[["__scopeId","data-v-c87ed91c"]]),Qy={class:"del-block_title"},Yy={class:"del-block_body"},Xy=D(e.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",Qy,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",Yy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),ja=D(e.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},maxHeight:{type:String,default:"70vh"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(n,{emit:t}){const i=n,o=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function Zy(n){n.component("CollapseContainer",dy),n.component("CollapseItem",py),n.component("VerticalCollapseContainer",wy),n.component("PAdd",Cy),n.component("PAddDialog",Ua),n.component("PCard",va),n.component("PCrudList",qa),n.component("PEditDialog",_n),n.component("PModal",ja),n.component("PContainer",Sy),n.component("PContainerStickyHead",xy),n.component("PDel",Xy)}const Jy={class:"btn-group"},Wa=D(e.defineComponent({__name:"PAuthForm",props:{width:{type:String,default:"auto"},margin:{type:String,default:"auto"},padding:{type:String,default:"0"},background:{type:String,default:"inherit"}},emits:["submit"],setup(n,{emit:t}){const i=t,o=e.computed(()=>_e.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){_e.Form.SetChunk(c.GetChunk()),a();return}const l=_e.Form.Validate();if(l.length>0){Qt.Notify.Error(l.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{_e.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(Jo,{string:e.unref(_e).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e).Form.GetFields(),u=>(e.openBlock(),e.createBlock(et,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),e.createElementVNode("div",Jy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(u,f)=>(e.openBlock(),e.createBlock(ie,{id:u.id,key:u.GetChunk(),disabled:e.unref(_e).Form.IsBlock,type:f===0?e.unref(he).Success:e.unref(he).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:h=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),Ky=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{_e.Form.Reset(),_e.Modal.Close()};return(i,o)=>(e.openBlock(),e.createBlock(ja,{show:e.unref(_e).Modal.Visible,closable:e.unref(_e).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(Wa,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),e0=["onClick"],t0=D(e.defineComponent({__name:"PMenuTabs",props:{menus:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"},margin:{type:String,required:!1,default:"var(--tabs-margin, 0 10px 10px 10px)"},borderRadius:{type:String,required:!1,default:"var(--tabs-border-radius, 10px)"}},emits:["select"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("select")};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,y)=>(e.openBlock(),e.createElementBlock("div",{key:y},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":y===n.menus.idx,tab:y!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:b=>u(y)},e.toDisplayString(p.name),15,e0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),n0=["id"],i0=["for"],o0={class:"left-field"},r0=["href","download"],s0={key:1,class:"text-field__input"},a0={class:"right-field"},l0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Et},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(n,{emit:t}){const i=n,o=t,r=Ke.GUID(),s=Ke.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const h=new Et;h.setFile(f),h.url=URL.createObjectURL(f),o("upload",h)},c=()=>{o("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=Xs.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const h=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),y=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,n0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,i0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",o0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(h,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,r0),e.createVNode(y,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ha,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",s0,[e.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",a0,[e.createVNode(y,{id:e.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),c0=D(l0,[["__scopeId","data-v-8b73ee22"]]);function Ga(n,t){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function le(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?Ga(Object(i),!0).forEach(function(o){mt(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ga(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function mt(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function d0(n,t){if(n==null)return{};var i,o,r=function(a,c){if(a==null)return{};var l,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)l=h[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function wn(n){return function(t){if(Array.isArray(t))return xr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,i){if(t){if(typeof t=="string")return xr(t,i);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return xr(t,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xr(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=n[i];return o}var Qa,u0,to,Ie=(Qa=function(n){/*!
24
+ `)},V=m=>{const g=f(m);return[u(m),`${m.startTime}–${m.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
+ `)},I=(m,g)=>{var w;return{conflict:_r(m.item,g),dragging:((w=yt.value)==null?void 0:w.perfom.id)===g.id,[Wn(m)]:!0}},O=e.ref(null),Y=(m,g)=>{const w=m.getBoundingClientRect(),T=Math.min(Math.max((g-w.top)/w.height,0),1);return ue.value.start+po(T*ue.value.total,yn)},Pe=(m,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||P.value||(O.value={gi:m,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ne),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",me),window.addEventListener("keydown",we))},Ne=m=>{const g=O.value;if(g){if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0;const w=Ln(g.gi.item.startTime,g.gi.item.endTime);y.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?i.value.session:i.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}te(m.clientX,m.clientY),H(m.clientX,m.clientY)}},te=(m,g)=>{var Te,Re;const w=document.elementFromPoint(m,g),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id");if(!T||!F){M.value=void 0,b.value=null;return}const X=Gn(F);if(!X)return;M.value=X.id;const fe=Y(T,g);b.value={scheduleId:X.id,minutes:fe,time:Xe(fe),hallName:je(X),...((Te=y.value)==null?void 0:Te.kind)==="slot"&&o.value?{session:pi(X.sessions,fe,fe+(((Re=y.value)==null?void 0:Re.duration)||30),ae)}:{}},$.value={x:m,y:g}},H=(m,g)=>{const w=G.value;if(!w)return;const T=w.getBoundingClientRect();g<T.top+48?w.scrollTop-=14:g>T.bottom-48&&(w.scrollTop+=14),m<T.left+48?w.scrollLeft-=14:m>T.right-48&&(w.scrollLeft+=14)},U=m=>{v(m)},v=async m=>{const g=O.value;if(q(),O.value=null,!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){const fe=Y(T,m.clientY);await xl(X,fe)}ne()},q=()=>{window.removeEventListener("pointermove",Ne),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",me),window.removeEventListener("keydown",we)},ne=()=>{O.value=null,y.value=null,M.value=void 0,b.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",A.value=Date.now()},me=()=>{q(),ne()},we=m=>{m.key==="Escape"&&me()};e.onBeforeUnmount(()=>{q(),jr(),uw(),document.body.style.userSelect="",document.body.style.cursor=""});const Je=m=>{if(!m)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const T=(w.sessions||[]).find(X=>X.id===m);if(T)return{kind:"session",item:T,schedule:w};const F=s(w).find(X=>X.id===m);if(F)return{kind:"slot",item:F,schedule:w}}return null},hi=()=>{var m;return Je((m=y.value)==null?void 0:m.id)},vr=(m,g)=>{g.preventDefault(),g.stopPropagation();const w=m.item,T=ae(w.startTime),F=ae(w.endTime);if(!isFinite(T)||!isFinite(F))return;const X=g.clientY;P.value=!0;const fe=R=>{const W=(R.clientY-X)/$e.value*60,J=po(F+W,yn);w.endTime=Xe(Math.max(J,T+yn))},Te=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Re),P.value=!1,A.value=Date.now();const R=Je(w.id);R&&(await kt(w,R.kind),await t.persist.refresh())},Re=()=>{Te()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Re)},yt=e.ref(null),ow=(m,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||P.value)return;const T=w.target.closest(".session-perfoms"),F=ae(m.startTime),X=ae(m.endTime),fe=Ln(g.startTime,g.endTime);!T||!isFinite(F)||!isFinite(X)||X<=F||(yt.value={perfom:g,session:m,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:X-F,durMin:isFinite(fe)&&fe>0?fe:30,container:T},window.addEventListener("pointermove",Cl),window.addEventListener("pointerup",Sl),window.addEventListener("pointercancel",qr),window.addEventListener("keydown",kl))},Cl=m=>{const g=yt.value;if(!g)return;if(!g.moved){if(Math.hypot(m.clientX-g.startX,m.clientY-g.startY)<$a)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),T=Math.min(Math.max((m.clientY-w.top)/w.height,0),1);let F=g.sessionStart+po(T*g.sessionDur,yn);const X=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=Xe(F),g.perfom.endTime=Xe(F+g.durMin),$.value={x:m.clientX,y:m.clientY}},Sl=m=>{iw(m)},iw=async m=>{var fe;const g=yt.value;if(jr(),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;A.value=Date.now();const w=document.elementFromPoint(m.clientX,m.clientY),T=w==null?void 0:w.closest(".hall-col"),F=T==null?void 0:T.getAttribute("data-schedule-id"),X=F?Gn(F):void 0;if(T&&X){y.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const Te=Y(T,m.clientY),Re=Xe(Te),R=Ln(g.perfom.startTime,g.perfom.endTime),W=bt(Re,R>0?R:30),J=((fe=Nl(g.perfom))==null?void 0:fe.id)===X.id&&g.perfom.startTime===Re&&g.perfom.endTime===W;await xl(X,Te),J&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),y.value=null;return}g.perfom.startTime=gn(g.perfom.startTime),g.perfom.endTime=gn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},qr=()=>{const m=yt.value;jr(),m&&(m.perfom.startTime=m.savedStart,m.perfom.endTime=m.savedEnd),yt.value=null,$.value=null,document.body.style.userSelect="",document.body.style.cursor=""},jr=()=>{window.removeEventListener("pointermove",Cl),window.removeEventListener("pointerup",Sl),window.removeEventListener("pointercancel",qr),window.removeEventListener("keydown",kl)},kl=m=>{m.key==="Escape"&&qr()},rw=(m,g,w)=>{w.preventDefault(),w.stopPropagation();const T=ae(m.startTime),F=ae(m.endTime),X=ae(g.startTime),fe=w.target.closest(".nested-perfom"),Te=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Te||!isFinite(T)||!isFinite(F)||F<=T||!isFinite(X))return;const Re=Te.getBoundingClientRect(),R=F-T;P.value=!0;const W=qt=>{const ww=Math.min(Math.max((qt.clientY-Re.top)/Re.height,0),1),bw=Math.min(Math.max(X+yn,T+po(ww*R,yn)),F);g.endTime=Xe(bw)},J=async()=>{window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",j),P.value=!1,A.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},j=()=>{J()};window.addEventListener("pointermove",W),window.addEventListener("pointerup",j)},xl=async(m,g)=>{var W;M.value=void 0,b.value=null,$.value=null;const w=hi();if(!w)return;const T=Xe(g),F=Ln(w.item.startTime,w.item.endTime),X=bt(T,F>0?F:30);if(((W=w.schedule)==null?void 0:W.id)===m.id&&w.item.startTime===T&&w.item.endTime===X)return;const fe=w.item.startTime;if(w.item.startTime=T,w.item.endTime=X,w.kind==="slot"&&o.value){const J=pi(m.sessions,ae(T),ae(X),ae);J?w.item.sessionId=J.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const J=ae(T)-ae(fe);for(const j of ct(w.item))j.startTime&&(j.startTime=bt(j.startTime,J),j.endTime&&(j.endTime=bt(j.endTime,J)),j.scheduleId=m.id,await kt(j,"slot"))}const Te=w.schedule,Re=w.kind==="session"?m.sessions:s(m),R=w.item;if(Te&&Te.id!==m.id){R.scheduleId=m.id;const J=w.kind==="session"?Te.sessions:s(Te);z.H.Classes.RemoveFromClassById(R.id,J,[]),Re.push(R)}await kt(R,w.kind),await t.persist.refresh()},sw=async(m,g)=>{if(g.target.closest(".timeline-block"))return;const w=Y(g.currentTarget,g.clientY),T=r.value.createSlot(m);if(T.startTime=Xe(w),T.endTime=Xe(w+30),o.value){const X=pi(m.sessions,w,w+30,ae);X!=null&&X.id&&(T.sessionId=X.id)}await t.persist.createSlot(T),await t.persist.refresh();const F=Je(T.id);F&&tn(F)},El=async(m,g,w)=>{if(m.added){if(m.added.element.scheduleId=g.id,w==="slot"&&m.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===m.added.element.sessionId)||delete m.added.element.sessionId),await kt(m.added.element,w),w==="session")for(const T of a(m.added.element))T.scheduleId=g.id,await t.persist.updateSlot(T);await t.persist.refresh()}},Gn=m=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(T=>T.id===m);if(w)return w}},pi=(m,g,w,T)=>Ba(m,g,w,T),Bl=m=>o.value?((m==null?void 0:m.sessions)||[]).map(g=>({id:g.id,label:l(g)})):[],Nl=m=>{for(const g of t.days||[])for(const w of g.schedules||[])if(s(w).some(T=>T.id===m.id)||m.sessionId&&(w.sessions||[]).some(T=>T.id===m.sessionId))return w},Vl=e.computed(()=>{const m=E.value;if(m)return m.kind==="session"?Gn(m.item.scheduleId)||$l(m.item,"session"):Nl(m.item)}),aw=e.computed(()=>{const m=E.value;return!m||m.kind!=="slot"?[]:Bl(Vl.value)}),$l=(m,g)=>{for(const w of t.days||[])for(const T of w.schedules||[])if(g==="session"){if((T.sessions||[]).some(F=>F.id===m.id))return T}else if(s(T).some(F=>F.id===m.id))return T},Tl=async(m,g)=>{g?m.sessionId=g:delete m.sessionId,await t.persist.updateSlot(m),await t.persist.refresh()},Ml=async m=>{if(!o.value)return;const g=r.value.createSession(m);await t.persist.createSession(g),await t.persist.refresh()},lw=async(m,g)=>{const w=r.value.createSlot(m);if(w.startTime=Xe(g),w.endTime=bt(w.startTime,30),o.value){const F=pi(m.sessions,g,g+30,ae);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const T=Je(w.id);T&&tn(T)},Pl=async m=>{const g=r.value.createSlot(m),w=[...s(m)].sort(cr).slice(-1)[0];g.startTime=gn(w==null?void 0:w.endTime)||"9:00",g.endTime=bt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),cw=m=>{At.value=null,m.action()},Wr=(m,g)=>{const w=g.length*34+12;At.value={x:Math.min(m.clientX,window.innerWidth-210),y:Math.min(m.clientY,window.innerHeight-w-8),items:g}},Il=()=>{At.value=null},Rl=()=>{At.value=null},Al=m=>{m.key==="Escape"&&(At.value=null)},gi=()=>{At.value=null},Gr=e.ref(!1),dw=()=>{Gr.value||(window.addEventListener("click",Il),window.addEventListener("contextmenu",Rl),window.addEventListener("keydown",Al),window.addEventListener("scroll",gi,!0),window.addEventListener("resize",gi),Gr.value=!0)},uw=()=>{window.removeEventListener("click",Il),window.removeEventListener("contextmenu",Rl),window.removeEventListener("keydown",Al),window.removeEventListener("scroll",gi,!0),window.removeEventListener("resize",gi),Gr.value=!1};dw();const fw=(m,g)=>{const w=[{icon:"edit",label:i.value.edit,action:()=>tn(m)},{icon:"content_copy",label:i.value.duplicate,action:()=>void zl(m)},{icon:"delete",label:i.value.delete,danger:!0,action:()=>void Co(m.item,m.kind)}];Wr(g,w)},mw=(m,g)=>{const w={kind:"slot",item:m},T=[{icon:"edit",label:i.value.edit,action:()=>tn(w)},{icon:"content_copy",label:i.value.duplicate,action:()=>void zl(w)},{icon:"delete",label:i.value.delete,danger:!0,action:()=>void Co(m,"slot")}];Wr(g,T)},hw=(m,g)=>{const w=Y(g.currentTarget,g.clientY),T=Xe(w),F=[{icon:"mic",label:`${i.value.addSlot} · ${T}`,action:()=>void lw(m,w)}];o.value&&F.push({icon:"groups",label:`${i.value.addSession} · ${T}`,action:()=>void pw(m,w)}),Wr(g,F)},pw=async(m,g)=>{if(!o.value)return;const w=r.value.createSession(m);w.startTime=Xe(g),w.endTime=bt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},zl=async m=>{const g=Gn(m.item.scheduleId)||$l(m.item,m.kind);if(!g)return;const w=Ln(m.item.startTime,m.item.endTime)||30,T=gn(m.item.endTime)||"9:00";if(m.kind==="slot"){const F=r.value.createSlot(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.sessionId=m.item.sessionId,m.item.description&&(F.description=m.item.description),m.item.payload&&(F.payload={...m.item.payload}),await t.persist.createSlot(F)}else{const F=r.value.createSession(g);F.name=m.item.name?`${m.item.name} (копия)`:m.item.name,F.startTime=T,F.endTime=bt(T,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},Co=async(m,g)=>{if(g==="slot")await t.persist.removeSlot(m);else{for(const w of a(m))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(m)}await t.persist.refresh()},kt=async(m,g)=>{const w=gn(m.startTime),T=gn(m.endTime);if(!w){t.persist.notify("warning",i.value.correctStartTime);return}m.startTime=w,m.endTime=T||bt(w,30),g==="slot"?await t.persist.updateSlot(m):await t.persist.updateSession(m)},tn=m=>{P.value||Date.now()-A.value<400||(E.value={kind:m.kind,item:m.item},N.value=!0)},gw=async()=>{const m=E.value;m&&(await kt(m.item,m.kind),N.value=!1,E.value=null,await t.persist.refresh())},yw=async()=>{const m=E.value;m&&(await Co(m.item,m.kind),N.value=!1,E.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(m,g)=>{var Te,Re;const w=e.resolveComponent("PButton"),T=e.resolveComponent("PInput"),F=e.resolveComponent("PTooltip"),X=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",Km,[(Te=n.days)!=null&&Te.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",th,[e.createVNode(e.unref(x.QTabs),{modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=R=>p.value=R),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,R=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:R.id,name:R.id,label:Be(R)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(x.QSpace)),ge.value?(e.openBlock(),e.createBlock(T,{key:0,"model-value":Pt(ge.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=R=>It(ge.value,R))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!ge.value,onClick:g[2]||(g[2]=R=>Jt(ge.value))},null,8,["label","disable"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:bn},null,8,["label"]),e.createVNode(w,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:be},null,8,["label"]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(e.unref(x.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(x.QBtnToggle),{modelValue:$e.value,"onUpdate:modelValue":g[3]||(g[3]=R=>$e.value=R),"toggle-color":"primary",options:de,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QBtnToggle),{modelValue:h.value,"onUpdate:modelValue":g[4]||(g[4]=R=>h.value=R),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),h.value==="grid"?(e.openBlock(),e.createElementBlock("div",oh,[lt(ge.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:G,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":lt(ge.value).length,"--hours":Math.max(ue.value.total/60,1),"--half-hours":Math.max(ue.value.total/60*2,2)})},[e.createElementVNode("div",rh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-head",{"drag-over":M.value===R.id}])},[e.createElementVNode("div",sh,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",ah,e.toDisplayString(je(R)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:W=>Pl(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),o.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:W=>Ml(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:De.value})},[e.createElementVNode("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"hour-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.min,class:"half-label",style:e.normalizeStyle({top:(R.min-ue.value.start)/ue.value.total*100+"%"})},e.toDisplayString(R.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:e.normalizeClass(["hall-col",{"drag-over":M.value===R.id}]),"data-schedule-id":R.id,onDblclick:W=>sw(R,W),onContextmenu:e.withModifiers(W=>hw(R,W),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Rt(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:W.item.id,class:e.normalizeClass(["timeline-block",[W.kind,{conflict:mi(R,W),dragging:((J=y.value)==null?void 0:J.id)===W.item.id},Wn(W)]]),style:e.normalizeStyle(st(W)),title:B(W),onPointerdown:j=>Pe(W,j),onClick:j=>tn(W),onContextmenu:e.withModifiers(j=>fw(W,j),["prevent","stop"])},[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",uh,[e.createElementVNode("div",fh,e.toDisplayString(W.item.startTime)+"–"+e.toDisplayString(W.item.endTime),1),e.createElementVNode("div",mh,e.toDisplayString(Ur(W)),1),W.kind==="slot"&&f(W.item)?(e.openBlock(),e.createElementBlock("div",hh,e.toDisplayString(f(W.item)),1)):e.createCommentVNode("",!0)]),W.kind==="session"&&ct(W.item).length?(e.openBlock(),e.createElementBlock("div",ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(W.item),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:e.normalizeClass(["nested-perfom",I(W,j)]),style:e.normalizeStyle(kn(W.item,j)),title:V(j),onPointerdown:e.withModifiers(qt=>ow(W.item,j,qt),["stop"]),onClick:e.withModifiers(qt=>tn({kind:"slot",item:j}),["stop"]),onContextmenu:e.withModifiers(qt=>mw(j,qt),["prevent","stop"])},[e.createElementVNode("div",yh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createElementVNode("div",wh,e.toDisplayString(bo(j,Wn(W))),1),f(j)?(e.openBlock(),e.createElementBlock("div",bh,e.toDisplayString(f(j)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(qt=>rw(W.item,j,qt),["stop","prevent"])},null,40,Ch)],46,gh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Sh,[mi(R,W)?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(j=>tn(W),["stop"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(j=>vr(W,j),["stop","prevent"])},null,40,kh)],46,dh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn(R),W=>{var J;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+W.item.id,class:e.normalizeClass(["session-spine",{dragging:((J=y.value)==null?void 0:J.id)===W.item.id}]),style:e.normalizeStyle(st(W)),title:l(W.item)},[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Eh,e.toDisplayString(l(W.item)),1)],14,xh)}),128)),b.value&&b.value.scheduleId===R.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:fi.value}]),style:e.normalizeStyle(Sn.value)},null,6)):e.createCommentVNode("",!0),b.value&&b.value.scheduleId===R.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[y.value.kind,{conflict:fi.value}]]),style:e.normalizeStyle(gt.value)},[e.createElementVNode("div",Bh,[e.createTextVNode(e.toDisplayString(b.value.time)+"–"+e.toDisplayString(en.value)+" ",1),b.value.session?(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(i.value.intoSession),1)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock("span",Vh," ⚠ "+e.toDisplayString(i.value.conflictCount)+": "+e.toDisplayString(dt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",$h,e.toDisplayString(y.value.name),1)],6)):e.createCommentVNode("",!0)],42,ch))),128))],4),e.createElementVNode("div",Th,e.toDisplayString(i.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",ih,[e.createTextVNode(e.toDisplayString(i.value.noHalls)+" ",1),e.createVNode(w,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:be},null,8,["label"])])),$.value&&b.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(b.value.time)+" · "+e.toDisplayString(b.value.hallName)+" ",1),b.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(i.value.intoSession)+" «"+e.toDisplayString(l(b.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),dt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(x.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(dt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Re=yt.value)!=null&&Re.moved&&$.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:$.value.x+"px",top:$.value.y+"px"})},[e.createVNode(e.unref(x.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(yt.value.perfom.startTime)+"–"+e.toDisplayString(yt.value.perfom.endTime)+" · "+e.toDisplayString(i.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt(ge.value),R=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{key:R.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Ph,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Ih,e.toDisplayString(je(R)),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:W=>Ml(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:W=>Pl(R)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>se(R)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(x.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var W;return[o.value&&((W=R.sessions)!=null&&W.length)?(e.openBlock(),e.createElementBlock("div",Rh,[e.createElementVNode("div",Ah,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.sessionsTitle),1)]),e.createVNode(e.unref(wi),{list:R.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"session")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",zh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(m.$slots,"session-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>Co(J,"session")},null,8,["onClick"])]),ct(J).length?(e.openBlock(),e.createElementBlock("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct(J),j=>(e.openBlock(),e.createElementBlock("div",{key:j.id,class:"list-row nested-row"},[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Fh,e.toDisplayString(u(j)),1),e.createElementVNode("div",Oh,e.toDisplayString(j.startTime)+"–"+e.toDisplayString(j.endTime),1),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:qt=>tn({kind:"slot",item:j})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Lh,[e.createElementVNode("div",_h,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.slotsTitle),1)]),e.createVNode(e.unref(wi),{list:Fe(R),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,R,"slot")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Hh,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(T,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":j=>J.name=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.startTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(T,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":j=>J.endTime=j,onBlur:j=>kt(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),o.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":J.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Bl(R),"option-value":"id","option-label":"label","onUpdate:modelValue":j=>Tl(J,j)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"slot-row-extra",{element:J,schedule:R},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:j=>Co(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Fe(R).length&&!rt(R)?(e.openBlock(),e.createElementBlock("div",Uh,e.toDisplayString(i.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",vh,e.toDisplayString(i.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(e.unref(x.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(i.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:bn},null,8,["label"])])),e.createVNode(fe,{modelValue:k.value,"onUpdate:modelValue":g[7]||(g[7]=R=>k.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",qh,e.toDisplayString(i.value.addHall),1)]),_:1}),e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",jh,[e.createVNode(T,{modelValue:C.value,"onUpdate:modelValue":g[5]||(g[5]=R=>C.value=R),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ye,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:ye},null,8,["label"])]),e.renderSlot(m.$slots,"places-list",{day:ge.value,add:St},()=>[Q.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Wh,e.toDisplayString(i.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Gh,e.toDisplayString(c(R)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:W=>St(R)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=R=>k.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:N.value,"onUpdate:modelValue":g[14]||(g[14]=R=>N.value=R)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),null,{default:e.withCtx(()=>{var R;return[e.createElementVNode("div",Qh,e.toDisplayString(((R=E.value)==null?void 0:R.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),E.value?(e.openBlock(),e.createBlock(e.unref(x.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:E.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=R=>E.value.item.name=R),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",Yh,[e.createElementVNode("div",Xh,[e.createVNode(T,{modelValue:E.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=R=>E.value.item.startTime=R),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",Zh,[e.createVNode(T,{modelValue:E.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=R=>E.value.item.endTime=R),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),E.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(X,{key:0,"model-value":E.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:aw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=R=>Tl(E.value.item,R))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"edit-form",{kind:E.value.kind,item:E.value.item,schedule:Vl.value},void 0,!0),E.value.kind==="slot"?(e.openBlock(),e.createBlock(T,{key:1,modelValue:E.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=R=>E.value.item.description=R),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardActions),{align:"right"},{default:e.withCtx(()=>[E.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:yw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QSpace)),e.createVNode(w,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=R=>N.value=!1)},null,8,["label"]),e.createVNode(w,{label:i.value.save,color:"primary",onClick:gw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(R,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":R.danger}]),onClick:J=>cw(R)},[e.createVNode(e.unref(x.QIcon),{name:R.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(R.label),1)],10,Jh))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9237bcac"]]),Kh={class:"schedule-timeline"},ep={key:0,class:"timeline-container"},tp={class:"day-header"},np={class:"day-title"},op={class:"timeline"},ip={key:0,class:"schedule-place"},rp={class:"events-column"},sp={key:0,class:"event-item session-item"},ap={class:"event-content"},lp={class:"event-time"},cp={class:"event-main"},dp={class:"event-name"},up={key:0,class:"speakers-list"},fp=["onClick"],mp={class:"speaker-details"},hp={class:"speaker-name"},pp={class:"bio-text"},gp=["onClick"],yp={key:0,class:"perfom-divider"},wp={class:"event-content"},bp={class:"event-time"},Cp={class:"event-main"},Sp={class:"event-name"},kp={class:"event-badges"},xp={key:0,class:"speakers-list"},Ep=["onClick"],Bp={class:"speaker-details"},Np={class:"speaker-name"},Vp={class:"bio-text"},$p={key:1,class:"no-program"},Ma=D(e.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>({noProgram:o.noProgramText||"Программа пока не опубликована"})),s=b=>{if(o.dayTitle)return o.dayTitle(b);const $=new Date(b.date);return isNaN($.getTime())||$.getFullYear()<2e3?"":$.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=b=>{var $;return o.placeName?o.placeName(b):(($=b.place)==null?void 0:$.name)||b.placeName||""},c=b=>o.slotName?o.slotName(b):(b==null?void 0:b.name)||"",l=b=>o.sessionName?o.sessionName(b):(b==null?void 0:b.name)||"",u=b=>o.slotParticipants?o.slotParticipants(b):(b==null?void 0:b.participants)||[],f=b=>o.sessionParticipants?o.sessionParticipants(b):(b==null?void 0:b.participants)||[],h=b=>{var $,P;return o.participantName?o.participantName(b):(b==null?void 0:b.name)||(b==null?void 0:b.fullName)||((P=($=b==null?void 0:b.human)==null?void 0:$.getFullName)==null?void 0:P.call($))||""},p=b=>o.participantBio?o.participantBio(b):(b==null?void 0:b.bio)||(b==null?void 0:b.regalias)||"",k=b=>o.slotListOf?o.slotListOf(b):(b==null?void 0:b.slots)||[],C=b=>o.nestedSlotListOf?o.nestedSlotListOf(b):(b==null?void 0:b.slots)||[],N=b=>b.schedules.filter($=>{var P;return k($).length>0||(((P=$.sessions)==null?void 0:P.length)||0)>0}),E=b=>{const $=[],P=new Set((b.sessions||[]).map(G=>G.id));for(const G of b.sessions||[]){$.push({kind:"session",item:G,nested:!1,index:0});for(const de of C(G))$.push({kind:"slot",item:de,nested:!0,index:0})}let A=0;for(const G of k(b).filter(de=>!de.sessionId||!P.has(de.sessionId)))$.push({kind:"slot",item:G,nested:!1,index:A++});return $},y=e.computed(()=>{var b;return(b=o.days)==null?void 0:b.some($=>{var P;return(P=$.schedules)==null?void 0:P.some(A=>{var G;return k(A).length>0||(((G=A.sessions)==null?void 0:G.length)||0)>0})})}),M=(b,$)=>`${b} - ${$}`;return(b,$)=>(e.openBlock(),e.createElementBlock("div",Kh,[y.value?(e.openBlock(),e.createElementBlock("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,P=>(e.openBlock(),e.createElementBlock("div",{key:P.id,class:"day-section"},[e.createElementVNode("div",tp,[e.createElementVNode("div",np,[e.createVNode(e.unref(x.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(P)),1)])]),e.createElementVNode("div",op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(P),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",ip,[e.createVNode(e.unref(x.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",rp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E(A),G=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G.item.id},[G.kind==="session"?(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("div",ap,[e.createElementVNode("div",lp,e.toDisplayString(M(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",cp,[e.createElementVNode("div",dp,e.toDisplayString(l(G.item)),1),f(G.item).length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>i("open-participant",de)},[e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(e.unref(x.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",pp,e.toDisplayString(p(de)),1)])],8,fp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":G.item.active,"nested-item":G.nested},{clickable:o.slotClickable}]]),onClick:de=>o.slotClickable&&i("slot-click",G.item)},[!G.nested&&G.index>0?(e.openBlock(),e.createElementBlock("div",yp)):e.createCommentVNode("",!0),e.createElementVNode("div",wp,[e.createElementVNode("div",bp,e.toDisplayString(M(G.item.startTime,G.item.endTime)),1),e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,e.toDisplayString(c(G.item)),1),e.createElementVNode("div",kp,[e.renderSlot(b.$slots,"badges",{item:G.item},void 0,!0)]),u(G.item).length?(e.openBlock(),e.createElementBlock("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(G.item),de=>(e.openBlock(),e.createElementBlock("div",{key:de.id,class:"speaker-item",onClick:$e=>i("open-participant",de)},[e.createElementVNode("div",Bp,[e.createElementVNode("div",Np,[e.createVNode(e.unref(x.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(h(de)),1)]),e.createElementVNode("div",Vp,e.toDisplayString(p(de)),1)])],8,Ep))),128))])):e.createCommentVNode("",!0)])])],10,gp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",$p,[e.createVNode(e.unref(x.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(b.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Ta,ScheduleTimeline:Ma},Symbol.toStringTag,{value:"Module"})),Mp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:bt,blockSizeClass:Na,blockStyle:Sa,byStart:cr,diffM:Ln,findEnclosingSession:Ba,fromMin:Xe,gridBounds:Ca,hasConflict:xa,intersects:ho,nestedConflict:Ea,nestedSlotStyle:ka,normTime:gn,snapMinutes:po,toMin:ae},Symbol.toStringTag,{value:"Module"}));let Pp=class extends xe{constructor(){super(Zo,"schedule-days")}};const Ip=new Pp;let Rp=class extends xe{constructor(){super(On,"schedule-places")}};const Ap=new Rp;let zp=class extends xe{constructor(){super(Fn,"schedule-sessions")}};const Dp=new zp;let Fp=class extends xe{constructor(){super(Ot,"schedule-slots")}};const Op=new Fp;let Lp=class extends xe{constructor(){super(mo,"schedule-timetables")}};const _p=new Lp,Hp=Object.freeze(Object.defineProperty({__proto__:null,C:Jm,Components:Tp,H:Mp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Ip,SchedulePlacesStore:Ap,ScheduleSessionsStore:Dp,ScheduleSlotsStore:Op,SchedulesStore:_p},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Va,defaultScheduleLabels:dr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),ur=e.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(i))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=i[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QChip),e.mergeProps(e.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=c=>o("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Up={class:"tags-selector"},vp={key:0,class:"empty-state"},Jo=D(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const o=n,i=e.ref(""),r=o.store.Options,s=e.computed(()=>r.filter(l=>z.H.Strings.SearchIn(l.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const c=async l=>{await o.store.Get(l.value),a("select",o.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",Up,[e.createVNode(et,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=h=>e.isRef(i)?i.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(x.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:p=>c(h)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vp,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),qp={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},jp={class:"edit-dialog-header"},Wp={class:"edit-dialog-title"},Gp={class:"edit-dialog-content"},Qp={key:0,class:"edit-dialog-actions"},_n=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},qp),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=x.ClosePopup,r=n,s=o,a=e.ref(!1);e.watch(()=>r.modelValue,p=>{a.value=p},{immediate:!0});const c=async()=>{s("confirm"),l()},l=()=>{s("close"),a.value=!1,s("update:modelValue",!1)},u=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const h=async()=>{await e.nextTick();const p=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');p&&"focus"in p&&p.focus()};return(p,k)=>(e.openBlock(),e.createBlock(dn,{modelValue:e.unref(a),"onUpdate:modelValue":[k[0]||(k[0]=C=>e.isRef(a)?a.value=C:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:h},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",jp,[e.createElementVNode("div",Wp,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",Gp,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",Qp,[e.withDirectives(e.createVNode(oe,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(oe,{flat:"",label:r.confirmLabel,color:"primary",disable:r.disabled,size:"sm",onClick:c},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-4c8226ef"]]),fr=D(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(),s=()=>{r.value.toggle(),i("click")},a=async c=>{o.row[o.prop]=c,await o.store.Update(o.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,h;return[e.createVNode(ur,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((h=n.row[n.prop])!=null&&h.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(x.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(_n,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(Jo,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),Yp={class:"tag-name"},Xp={key:0,class:"tag-extra"},mr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>i.value?(Array.isArray(i.value)?i.value:[i.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),o.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(h=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Yp,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",Xp,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=h=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(_n,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(Jo,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),Zp={key:0,class:"relation-label"},Jp={class:"relation-count"},hr=D(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=()=>{o.count!==0&&(o.to&&z.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",Zp,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Jp,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),pr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(oe,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(z).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),Kp={class:"cell-text"},gr=D(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=i.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",Kp,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),go=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},value:{type:String,default:"",required:!1},readonly:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},clearable:{type:Boolean,required:!1,default:!0},width:{type:String,required:!1,default:""},borderColor:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},inPadding:{type:String,required:!1,default:""},options:{type:Array,required:!1,default:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>typeof r.id=="string"?r.id:void 0),a=e.computed(()=>{const p={};for(const k of Object.keys(r))k!=="id"&&k!=="disable"&&(p[k]=r[k]);return p}),c=n,l=e.computed(()=>r.disable??c.disabled),u=p=>{i("change",p)},f=()=>{i("clear",void 0)},h=e.computed(()=>{const p={};return c.margin&&(p.margin=c.margin),c.padding&&(p.padding=c.padding),c.width&&(p.width=c.width),c.inPadding&&(p.padding=c.inPadding),p});return(p,k)=>(e.openBlock(),e.createBlock(e.unref(x.QSelect),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=C=>o.value=C)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(l),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(p.$slots,"before",{},()=>[e.renderSlot(p.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(p.$slots,"append",{},()=>[e.renderSlot(p.$slots,"right")])]),_:2},[p.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"prepend")]),key:"0"}:void 0,p.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after")]),key:"1"}:void 0,p.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),key:"2"}:void 0,p.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"label")]),key:"3"}:void 0,p.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"error")]),key:"4"}:void 0,p.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"hint")]),key:"5"}:void 0,p.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"counter")]),key:"6"}:void 0,p.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"loading")]),key:"7"}:void 0,p.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"selected")]),key:"8"}:void 0,p.$slots.option?{name:"option",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"option",e.normalizeProps(e.guardReactiveProps(C)))]),key:"9"}:void 0,p.$slots["no-option"]?{name:"no-option",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(C)))]),key:"10"}:void 0,p.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"before-options")]),key:"11"}:void 0,p.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"after-options")]),key:"12"}:void 0,p.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(C=>[e.renderSlot(p.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(C)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),yr=D(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,o=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(i,r)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(go,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(o)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),eg={class:"cell-text"},wr=D(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=i.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",eg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(_n,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(et,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),br=D(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,o)=>`${n}-${t} из ${o}`}},emits:["request"],setup(n,{emit:t}){const o=n,i=t,r=e.ref({page:0,rowsNumber:o.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>o.store.Count,()=>{r.value.rowsNumber=o.store.Count});const s=c=>{z.F.FTSP.Get().p.page=c.pagination.page-1,z.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await o.store.FTSP(),i("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(x.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(x.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Pa(n){n.component("PTable",br),n.component("PTableBadge",fr),n.component("PTableBadges",mr),n.component("PTableCount",hr),n.component("PTableEdit",pr),n.component("PTableNumber",gr),n.component("PTableSelect",yr),n.component("PTableString",wr)}const tg=Object.freeze(Object.defineProperty({__proto__:null,PTable:br,PTableBadge:fr,PTableBadges:mr,PTableCount:hr,PTableEdit:pr,PTableNumber:gr,PTableSelect:yr,PTableString:wr,default:Pa},Symbol.toStringTag,{value:"Module"})),ng=["innerHTML"],Cr=D(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,i=t;e.onBeforeMount(()=>{o.tabsStore.Select()});const r=s=>{o.tabsStore.Select(s),i("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(x.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,ng)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(x.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),og={class:"q-pa-md"},Sr=D(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=a=>{o.tabsStore.Select(a),i("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(x.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(x.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(x.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",og,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(oe,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(x.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(x.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class Ko{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=z.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((o=this.items[0])==null?void 0:o.value);return}this.Select(t)}static ToTab(t,o="",i=""){return{label:i,value:o,...t}}static Create(t,o){const i=new Ko;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(i=>i.value===t),this.value=t;const o=this.GetValue();o&&z.H.Router.SetQueryParam(this.key,o)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function Ia(n){n.component("PTabs",Cr),n.component("PTabsLeft",Sr)}const ig=Object.freeze(Object.defineProperty({__proto__:null,Contacts:mm,Forms:Om,Menus:Wm,Schedule:Hp,Table:tg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Cr,PTabsLeft:Sr,TabsStore:Ko,default:Ia},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ra=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),rg={class:"row items-center justify-end"},ei="DD.MM.YYYY",ti=e.defineComponent({__name:"PDateInput",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},modelType:{type:String,default:void 0,required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=x.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=ei.replace(/[DMY]/g,"#"),c=e.ref(null),l=N=>{if(i.modelType){c.value=i.modelType;return}N instanceof Date?c.value="date":(typeof N=="string"&&N||c.value===null)&&(c.value="string")},u=N=>{if(!N)return"";if(N instanceof Date)return Number.isNaN(N.getTime())?"":x.date.formatDate(N,ei);const E=String(N).match(/^(\d{4})-(\d{2})-(\d{2})/);if(E)return`${E[3]}.${E[2]}.${E[1]}`;const y=new Date(N);return Number.isNaN(y.getTime())?"":x.date.formatDate(y,ei)},f=N=>{const E=N.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!E)return null;const y=+E[1],M=+E[2],b=+E[3];if(y<1||y>31||M<1||M>12||b<1900||b>2100)return null;const $=new Date(b,M-1,y);return $.getFullYear()!==b||$.getMonth()!==M-1||$.getDate()!==y?null:$},h=e.ref(u(s.value));l(s.value),e.watch(s,N=>{l(N);const E=u(N);E!==h.value&&(h.value=E)});const p=N=>{const E=typeof N=="number"?String(N):N;if(!E){const M=c.value==="date"?null:"";s.value=M,r("input",M);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(E))return;const y=f(E);if(y)if(c.value==="date")s.value=y,r("input",y);else{const M=y.getFullYear(),b=String(y.getMonth()+1).padStart(2,"0"),$=String(y.getDate()).padStart(2,"0"),P=`${M}-${b}-${$}`;s.value=P,r("input",P)}},k=()=>{r("blur",s.value)},C={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(N,E)=>(e.openBlock(),e.createBlock(et,{modelValue:e.unref(h),"onUpdate:modelValue":[E[1]||(E[1]=y=>e.isRef(h)?h.value=y:null),p],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(a),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,inputmode:"numeric",onBlur:k},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(h),"onUpdate:modelValue":E[0]||(E[0]=y=>e.isRef(h)?h.value=y:null),mask:ei,"today-btn":"",locale:C},{default:e.withCtx(()=>[e.createElementVNode("div",rg,[e.withDirectives(e.createVNode(oe,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(N.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(N.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"]))}}),sg=e.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:e.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue"),r=c=>{const l=c.getFullYear(),u=String(c.getMonth()+1).padStart(2,"0"),f=String(c.getDate()).padStart(2,"0");return`${l}-${u}-${f}`},s=c=>{o("input",c instanceof Date?r(c):c??null)},a=()=>{o("blur")};return(c,l)=>(e.openBlock(),e.createBlock(ti,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),ag={class:"row items-center justify-end"},lg={class:"row items-center justify-end"},Aa=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=x.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=C=>C?x.date.formatDate(C,"DD.MM.YYYY HH:mm"):"",c=C=>{if(!C||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(C))return null;const N=x.date.extractDate(C,"DD.MM.YYYY HH:mm");return Number.isNaN(N.getTime())?null:N},l=C=>{o.value=C},u=C=>{const N=String(C??"");i.value=N.replace(/[_\s]/g,"")===""?"":N},f=()=>{const C=c(i.value);C?l(C):i.value===""?l(null):i.value=a(o.value)},h=()=>{if(r.value){const C=o.value?x.date.formatDate(o.value,"HH:mm"):"00:00",N=`${r.value} ${C}`,E=c(N);E&&(i.value=a(E),l(E))}r.value=""},p=()=>{if(s.value){const C=o.value?x.date.formatDate(o.value,"DD.MM.YYYY"):"",N=x.date.formatDate(new Date,"DD.MM.YYYY"),E=C?`${C} ${s.value}`:`${N} ${s.value}`,y=c(E);y&&(i.value=a(y),l(y))}s.value=""};e.watch(o,C=>{C!==c(i.value)&&(i.value=a(C??null))},{immediate:!0});const k={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(C,N)=>(e.openBlock(),e.createBlock(et,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":u,onBlur:f},{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":N[0]||(N[0]=E=>e.isRef(r)?r.value=E:null),mask:"DD.MM.YYYY",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",ag,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:h},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":N[1]||(N[1]=E=>e.isRef(s)?s.value=E:null),mask:"HH:mm",format24h:"",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",lg,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:p},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"]))}}),cg=D(e.defineComponent({inheritAttrs:!1,__name:"PFlex",props:{margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},minWidth:{type:String,default:"",required:!1},maxWidth:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},justifyContent:{type:String,default:"",required:!1},background:{type:String,default:"",required:!1},alignItems:{type:String,default:"",required:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),dg={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},ug=D(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"valid"),s=e.ref(!0),a=y=>{s.value=y,r.value!==void 0&&(r.value=y)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=y=>{i("submit",y)},h=()=>{var y;(y=c.value)==null||y.resetValidation(),a(!0),i("reset")},p=async()=>{var M;const y=await((M=c.value)==null?void 0:M.validate())??!1;return a(y),y},k=()=>{var y;(y=c.value)==null||y.resetValidation(),a(!0)};return t({validate:p,resetValidation:k,focus:()=>{var y;return(y=c.value)==null?void 0:y.focus()},submit:y=>{var M;return(M=c.value)==null?void 0:M.submit(y)},reset:y=>{var M;return(M=c.value)==null?void 0:M.reset(y)}}),(y,M)=>(e.openBlock(),e.createBlock(e.unref(x.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:h,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default",{},void 0,!0),y.$slots.actions?(e.openBlock(),e.createElementBlock("div",dg,[e.renderSlot(y.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:k},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),fg={class:"p-hint-popup"},kr=D(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(x.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:i[0]||(i[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(nt,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":i[1]||(i[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",fg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),mg=e.defineComponent({__name:"PInputDate",props:e.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useModel(n,"modelValue");let r=null;const s=c=>{o("input",c),r=c instanceof Date?c:null},a=()=>{r instanceof Date&&(o("beforeChange",r),o("change",r),r=null)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(ti,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),hg=D(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),pg=D(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),gg=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},disabled:{type:Boolean,required:!1,default:!1},max:{type:Number,default:Number.MAX_VALUE,required:!1},min:{type:Number,default:Number.NEGATIVE_INFINITY,required:!1},step:{type:Number,default:1,required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>typeof i.id=="string"?i.id:void 0),s=e.computed(()=>{const P={};for(const A of Object.keys(i))A!=="id"&&(P[A]=i[A]);return P}),a=n,c=()=>{const P=a.step.toString();return P.includes(".")?P.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),h=(P=>Math.min(Math.max(P,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const p=e.ref(h.toFixed(c())),k=e.computed(()=>{const P={};return a.margin&&(P.margin=a.margin),a.padding&&(P.padding=a.padding),P}),C=P=>{const A=Math.pow(10,l);return Math.round(P*A)/A},N=(P,...A)=>{u.value=C(P),p.value=C(P).toFixed(c()),A.forEach(G=>o(G,u.value))},E=(P,...A)=>{a.disabled||P>a.max||P<a.min||N(P,...A)},y=()=>E(+p.value+a.step,"change"),M=()=>E(+p.value-a.step,"change"),b=P=>E(Number(P),"input"),$=()=>E(+p.value,"change","blur");return(P,A)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(k),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":b,onBlur:$}),{before:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:M},{default:e.withCtx(()=>[e.createVNode(hg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(x.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:y},{default:e.withCtx(()=>[e.createVNode(pg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),yg=D(gg,[["__scopeId","data-v-1aec76d0"]]),wg=D(e.defineComponent({__name:"PLeftSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть меню"},titleClose:{type:String,required:!1,default:"Показать меню"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),bg=e.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Cg=e.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(x.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),za=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,o=((c=t.storeOpts)==null?void 0:c.Options)??[],i=e.ref(o);async function r(l,u,f,h){var N,E;const k="set"+(((N=u[0])==null?void 0:N.toUpperCase())+u.slice(1)),C=l[k];typeof C=="function"?C(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((E=h==null?void 0:h.Update)==null?void 0:E.call(h,l))}const s=(l,u)=>{if(l===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>z.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{o.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(go,{"use-input":"",options:e.unref(i),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(kr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Sg=e.defineComponent({__name:"PRadio",props:e.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=n,s=()=>{i("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>o.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),kg=D(e.defineComponent({__name:"PRightSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть"},titleClose:{type:String,required:!1,default:"Показать"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),xg=D(e.defineComponent({__name:"PSticky",props:{shadow:{type:Boolean,default:!1},zIndex:{type:Number,default:0},background:{type:String,default:"inherit"},padding:{type:String,default:"0"},top:{type:String,default:"0"},divider:{type:Boolean,default:!1},dividerColor:{type:String,default:"rgba(0, 0, 0, 0.12)"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Da=D(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.row[t.prop]),i=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(x.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:i())},[e.createVNode(e.unref(x.QIcon),{name:e.unref(o)?"check_circle":"radio_button_unchecked",color:e.unref(o)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(nt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Eg=D(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"0"},padding:{type:String,default:"0",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>typeof o.id=="string"?o.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="id"&&(l[u]=o[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(x.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(i),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),Fa=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(x.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Bg={class:"top-slider-content"},Ng={class:"center"},Vg=D(e.defineComponent({__name:"PTopSlider",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},open:{type:Boolean,default:!1}},emits:["open"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Bg,[e.createElementVNode("div",Ng,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(x.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function $g(n){n.component("PButton",oe),n.component("PBadge",lo),n.component("PCheckBox",Ra),n.component("PChip",ur),n.component("PDateInput",ti),n.component("PDatePicker",sg),n.component("PDateTimeInput",Aa),n.component("PDialog",dn),n.component("PFlex",cg),n.component("PForm",ug),n.component("PHint",kr),n.component("PInput",et),n.component("PInputDate",mg),n.component("PInputNumber",yg),n.component("PLeftSlider",wg),n.component("PList",bg),n.component("PListItem",Cg),n.component("POptionsListSingle",Jo),n.component("POpts",za),n.component("PRadio",Sg),n.component("PRightSlider",kg),n.component("PSelect",go),n.component("PSticky",xg),n.component("PString",Ji),n.component("PTextarea",Eg),n.component("PTopSlider",Vg),n.component("PTableToggle",Da),n.component("PToggle",Fa),n.component("PTooltip",nt)}const Tg={key:0,class:"mainblock"},Mg={class:"mainblock-right"},Pg={class:"body"},Ig=D(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Tg,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(i)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Mg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Pg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Rg={class:"mainblock-right"},Ag={class:"body"},zg=D(e.defineComponent({__name:"AdaptiveContainerHorizontal",props:{menuWidth:{type:String,required:!1,default:"0px"},leftWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"},titleSticky:{type:Boolean,required:!1,default:!1}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(i)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Rg,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Ag,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Oa=D(e.defineComponent({__name:"GridContainer",props:{maxWidth:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"100%"},background:{type:String,required:!1,default:"inherit"},gridGap:{type:String,required:!1,default:"10px"},gridTemplateColumns:{type:String,required:!1,default:"repeat(auto-fit, minmax(250px, 1fr))"},gridTemplateRows:{type:String,required:!1,default:"repeat(0 0px)"},margin:{type:String,required:!1,default:"10px 0 0 0"},customClass:{type:String,required:!1,default:""}},setup(n){return e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Dg={class:"container"},Fg={class:"slide-box"},Og={class:"image"},Lg={class:"image-box"},_g=["id","src","alt"],Hg={class:"link-number"},Ug=["id","onClick"],vg=D(e.defineComponent({__name:"CarouselImages",props:{events:{type:Array,required:!0},quantity:{type:Number,default:1,required:!1},animationTime:{type:Number,default:500},height:{type:String,default:"360px"},maxHeight:{type:String,default:"360px"},startActiveGroupIndex:{type:Number,default:0}},emits:["openModalWindow"],setup(n){e.useCssVars(k=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(Zs(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const c=()=>i.value=i.value+1<s.value.length?i.value+1:0,l=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=k=>{r.value=k,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=k=>{k!=i.value&&(u(k<i.value?Nt.Prev:Nt.Next),setTimeout(()=>i.value=k,t.animationTime/2))},h=()=>{u(Nt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Nt.Prev),setTimeout(l,t.animationTime/2)};return(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Dg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:C[0]||(C[0]=e.withModifiers(N=>p(),["stop"]))},[...C[3]||(C[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Fg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(N,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Nt).Next,animationprev:e.unref(r)===e.unref(Nt).Prev})},[e.createElementVNode("div",Og,[e.createElementVNode("div",Lg,[e.createElementVNode("img",{id:N.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:N.fileInfo.getImageUrl(),alt:N.fileInfo.originalName,onClick:C[1]||(C[1]=y=>k.showImageInFullScreen())},null,12,_g)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:C[2]||(C[2]=e.withModifiers(N=>h(),["stop"]))},[...C[4]||(C[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Hg,[e.createVNode(Oa,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(N,E)=>(e.openBlock(),e.createElementBlock("div",{id:E.toString(),key:E,class:"number",style:e.normalizeStyle({background:E.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(y=>f(E),["stop"])},e.toDisplayString(E+1),13,Ug))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),qg=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.x),s=e.ref(o.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{i("close")};return(u,f)=>{const h=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[h,l]])}}}),jg={class:"drop-item"},Wg={key:0,class:"drop-item-list"},Gg=D(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,o=e.ref(t.rolledUp),i=async()=>{o.value=!o.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>i())},[e.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(o)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Wg,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Qg=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Vi,required:!0}},emits:["load"],setup(n,{emit:t}){const o=n,i=e.ref(!1),r=t,s=()=>{o.model.setBoolean(i.value),i.value?z.F.FTSP.Get().setF(o.model):z.F.FTSP.Get().removeF(o.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),Yg=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref(void 0),r=async a=>{Ft.Get().replaceF(a,i.value),i.value=a,Ft.Get().p.drop()},s=async a=>{await r(a),o("load")};return(a,c)=>{const l=e.resolveComponent("PString"),u=e.resolveComponent("PButton"),f=e.resolveComponent("GridContainer"),h=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...c[0]||(c[0]=[])]),default:e.withCtx(()=>[e.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(p,k)=>(e.openBlock(),e.createBlock(u,{key:k,color:"blue",height:"auto",text:p.label,"is-toggle":p.valueEq(e.unref(i)),"toggle-mode":!0,inverse:n.inverse,onClick:C=>s(p.valueEq(e.unref(i))?void 0:p)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-949e92b5"]]),Xg=["value","label"],Zg=D(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=Ft.Get(),r=e.ref(void 0),s=async c=>{i.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),o("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,value:f,label:f.label},null,8,Xg))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),Jg=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),Kg=D(e.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(o.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...i[2]||(i[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),e1={key:0,class:"blur"},t1={style:{display:"flex","justify-content":"center"}},n1=D(e.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(n,{emit:t}){const o=n,i=t,r=o.customClass!==""?o.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=$=>{$.stopPropagation(),$.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var $,P;await e.nextTick(),a.value?((P=($=document.getElementById("info-item-opened-content"))==null?void 0:$.querySelector("input"))==null||P.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&i("after-close")});const f=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},h=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&o.withOpenWindow),k=e.computed(()=>({background:o.background?o.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":o.padding,margin:o.margin,width:p.value?o.openWidth:o.width,height:p.value?o.openHeight:o.height,minHeight:"40px",maxWidth:o.maxWidth,minWidth:o.minWidth,borderColor:s.value||a.value?o.colorSelected:o.borderColor,color:s.value?o.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${o.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(o.withHover,"pointer")})),C=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),N=e.computed(()=>({height:p.value?"auto":"0"})),E=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),y=()=>{o.showSaveDialog?c.value=!0:a.value=!1},M=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},b=()=>{a.value=!1,c.value=!1};return($,P)=>{const A=e.resolveComponent("PString"),G=e.resolveComponent("PButton"),de=e.resolveComponent("PModal"),$e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",e1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(h)),onClick:P[2]||(P[2]=e.withModifiers(Ee=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(k)),onMouseenter:P[0]||(P[0]=Ee=>n.withHover?s.value=!0:s.value=!1),onMouseleave:P[1]||(P[1]=Ee=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(C))},[e.renderSlot($.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(N))},[e.renderSlot($.$slots,"open-inside-content",{},void 0,!0)],4)),[[$e,y,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(E))},[e.renderSlot($.$slots,"title",{},()=>[e.createVNode(A,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(de,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",t1,[e.createVNode(G,{text:"Не сохранять",onClick:b}),e.createVNode(G,{text:"Сохранять",onClick:M})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),o1=D(e.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=s=>{o.value=!o.value,i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(o),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),i1={class:"mainblock"},r1={class:"mainline"},s1=D(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",i1,[e.createElementVNode("div",r1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),La=D(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),a1={class:"search-list"},l1=["onClick"],_a=D(e.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]},width:{type:[Number,String],default:""},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"var(--box-shadow)"}},emits:["select","input"],setup(n,{emit:t}){const o=t,i=n,r=e.ref(i.modelValue),s=e.ref([]);async function a(){o("input",r.value),await c()}async function c(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function l(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(et,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>e.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(La,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",a1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),h=>(e.openBlock(),e.createElementBlock("li",{key:h.value,onClick:p=>l(h)},e.toDisplayString(h.label),9,l1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),c1=D(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=async()=>{};return(i,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:o},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:o},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),d1={style:{display:"flex","justify-content":"center",width:"100%"}},u1={class:"pag-number"},f1={class:"pag-ul"},m1={key:2},h1=D(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,o=h=>h?"active":"neutral",i=h=>h?"not-active":"neutral",r=e.ref(Js),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!t.showConfirm))return await l(h)},l=async(h,p)=>{r.value.setCurPage(h),Ft.Get().p.offset=(h-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const h=r.value.pagesCount();return h<8?Dt.GenerateNumsRange(2,h-1).filter(p=>p<h&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<h&&p>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");h?h.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{Ft.Get().p.drop()}),(h,p)=>{const k=e.resolveComponent("ArrowLeft"),C=e.resolveComponent("PButton"),N=e.resolveComponent("DoubleArrowLeft"),E=e.resolveComponent("EllipsisSvg"),y=e.resolveComponent("DoubleArrowRight"),M=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",d1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",u1,[e.createVNode(C,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=b=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["type"]),e.createElementVNode("ul",f1,[e.createElementVNode("li",null,[e.createVNode(C,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=b=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=b=>s.value=!0),onMouseleave:p[4]||(p[4]=b=>s.value=!1)},[e.createVNode(C,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=b=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(N,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),b=>(e.openBlock(),e.createElementBlock("li",{key:b},[e.createVNode(C,{skin:"pag",type:o(b===e.unref(r).curPage),text:b,onClick:$=>c(b)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=b=>a.value=!0),onMouseleave:p[7]||(p[7]=b=>a.value=!1)},[e.createVNode(C,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=b=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(y,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",m1,[e.createVNode(C,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=b=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(C,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=b=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(M)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),p1=D(e.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},width:{type:[Number,String],default:"var(--input-width-default, 100%)"},focus:{type:Boolean,default:!1},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"rgba(0, 0, 0, 0.35) 0px 5px 5px"}},emits:["select","load","input"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.modelValue),s=e.ref();let a=Zi.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Zi.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const h=a.searchGroups.find(p=>p.key===o.keyValue);return h&&(a.searchGroup=h),await sa.Search.Search(a),a.searchObjects},l=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,h)=>(e.openBlock(),e.createBlock(_a,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=p=>e.isRef(r)?r.value=p:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-46a1d0c0"]]),g1={class:"mainblock-body"},y1={class:"mainblock-footer"},w1=D(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",g1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",y1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),b1={class:"right-slider-content"},C1={class:"right-slider-content-header"},S1={class:"right-slider-content-box"},k1={class:"right-slider-button"},x1=D(e.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",b1,[e.createElementVNode("div",C1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",S1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),E1={class:"mainblock"},B1={class:"body-block"},N1={class:"tab-block"},V1=D(e.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{i("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(o.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",E1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[e.createElementVNode("div",{class:"slider-icon",style:e.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",B1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),$1=["label","value"],T1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[Ye.String]:"Текстовый ответ",[Ye.Text]:"Развёрнутый текстовый ответ",[Ye.Number]:"Числовой ответ",[Ye.Date]:"Ответ в виде даты",[Ye.Radio]:"Выбор одного из вариантов",[Ye.Set]:"Выбор нескольких вариантов",[Ye.File]:"Ответ в виде файла",[Ye.MatrixRadio]:"Матрица с одним выбором",[Ye.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,$1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),M1=["label","value"],P1=D(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=e.ref();e.onBeforeMount(()=>{o.value=!0,r.value=cn.GetDefault()});const s=async c=>{r.value=c??cn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>e.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=h=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(h,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:h.label,value:h},null,8,M1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),I1=["label","value"],R1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=t,i=e.ref();e.onBeforeMount(()=>{i.value=cn.GetDefault()});const r=async a=>{a||(i.value=cn.GetDefault()),Ft.Get().setSortModel(i.value),Ft.Get().p.drop(),o("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=f=>e.isRef(i)?i.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(i))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cn).Get(),(f,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:f.label,value:f},null,8,I1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-fd5da1fc"]]),A1={class:"switch-container"},z1={class:"line"},D1={class:"line"},F1=D(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const o=n,i={background:"inherit",border:"1px solid #c4c4c4"},r=()=>o.firstModel.valueEq(u.value)?void 0:i,s=()=>u.value?i:void 0,a=()=>o.secondModel.valueEq(u.value)?void 0:i,c=h=>{var k;return{color:(k=u.value)!=null&&k.valueEq(h)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async h=>{var p;(p=u.value)!=null&&p.valueEq(h)||(u.value=h,l("load"))};return(h,p)=>{const k=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",A1,[e.createElementVNode("div",z1,[e.createVNode(k,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=C=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(k,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=C=>f())},null,8,["style"]),e.createVNode(k,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=C=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",D1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=C=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=C=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=C=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),O1={},L1={class:"flex"};function _1(n,t){return e.openBlock(),e.createElementBlock("div",L1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const H1=D(O1,[["render",_1],["__scopeId","data-v-5023d414"]]),U1=D(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=async()=>{i("submit"),o.value=!o.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),v1={class:"top-slider-content"},q1={class:"center"},j1=D(e.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!0);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",v1,[e.createElementVNode("div",q1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function W1(n){n.component("PageNotFound",Qs),n.component("AdaptiveContainer",Ig),n.component("AdaptiveContainerHorizontal",zg),n.component("CarouselImages",vg),n.component("ContextWindow",qg),n.component("DropList",Gg),n.component("FilterCheckbox",Qg),n.component("FiltersButtonsSelect",Yg),n.component("FilterSelect",Zg),n.component("FTSPPanel",Jg),n.component("GeneralItem",Kg),n.component("GridContainer",Oa),n.component("InfoItem",n1),n.component("InfoItemSelectButtons",o1),n.component("LeftRightContainer",s1),n.component("PAutocomplete",_a),n.component("PhoneForm",c1),n.component("PPagination",h1),n.component("RemoteSearch",p1),n.component("ResearcheContainer",w1),n.component("RightSliderContainer",x1),n.component("RightTabsContainer",V1),n.component("SelectValueType",T1),n.component("SortList",P1),n.component("SortSelect",R1),n.component("Switch3Pos",F1),n.component("ThemeWrapper",H1),n.component("ToggleInfoItem",U1),n.component("TopSliderContainer",j1)}const G1=D(e.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),e.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),Q1=D(e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),e.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),Y1=D(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),X1=D(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Ha=D(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),Z1=D(e.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),J1=D(e.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),K1=D(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),ey=D(e.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),ty=D(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),ny=D(e.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-46c690c8"]]),oy=D(e.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-b688738b"]]),iy=D(e.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-bd131770"]]),ry=D(e.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-db5832a2"]]),sy=D(e.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),i[3]||(i[3]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-5abed3e4></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-5abed3e4></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function ay(n){n.component("IconDownload",G1),n.component("IconFilter",Q1),n.component("ArrowLeft",ny),n.component("ArrowRight",oy),n.component("DoubleArrowLeft",iy),n.component("DoubleArrowRight",ry),n.component("EllipsisSvg",sy),n.component("IconArrowLeft",Y1),n.component("IconCheckDefault",X1),n.component("IconClose",Ha),n.component("IconEdit",Z1),n.component("IconEmail",J1),n.component("IconMove",K1),n.component("IconPhone",ey),n.component("IconSearch",La),n.component("IconSelectArrow",ty)}const ly=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),o=i=>{t.value=i};return e.watch(()=>n.initActiveIdx,()=>{o(n.initActiveIdx)}),{changeActiveId:o,activeIdx:t}}});function cy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const dy=D(ly,[["render",cy]]),uy=e.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(n,{emit:t}){const o=e.ref(n.activeId==="0"),i=()=>{o.value=!o.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!1)}),{collapsed:o,handleItemClick:i}}}),fy=["for"],my={class:"inside-icon"};function hy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",my,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,fy),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const py=D(uy,[["render",hy],["__scopeId","data-v-37d79495"]]),gy={class:"tab"},yy={class:"rotate"},wy=D(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),o=async()=>{t.value=!t.value};return(i,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gy,[e.renderSlot(i.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(i.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:o},[e.createElementVNode("div",yy,[e.renderSlot(i.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(i.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),by={class:"add-block_body"},Cy=D(e.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(t,o)=>{const i=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",by,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Sy=D(e.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),ky={class:"add-block_body"},xy=D(e.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(n){return(t,o)=>{const i=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",ky,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Ey={class:"select-dialog"},By={class:"select-dialog-header"},Ny={class:"select-dialog-title"},Vy={class:"select-dialog-content"},$y={class:"select-dialog-actions"},Ua=D(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.useModel(n,"modelValue"),a=e.ref([]),c=x.Ripple,l=x.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async E=>{await i.store.Get(E.value);const y=i.store.Item,M=new y.constructor(y);r("add",M),h()},h=()=>{r("close"),s.value=!1},p=E=>{E||r("close")},k=()=>{s.value&&h()},C=()=>{s.value=!s.value},N=async()=>{await e.nextTick();const E=document.querySelector(".select-dialog-content .q-item");E&&"focus"in E&&E.focus()};return t({opened:s,toggle:C}),e.onBeforeMount(u),(E,y)=>(e.openBlock(),e.createBlock(dn,{modelValue:s.value,"onUpdate:modelValue":[y[0]||(y[0]=M=>s.value=M),p],position:"top",onKeydown:e.withKeys(k,["escape"]),onShow:N},{default:e.withCtx(()=>[e.createElementVNode("div",Ey,[e.createElementVNode("div",By,[e.createElementVNode("div",Ny,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",Vy,[e.createVNode(e.unref(x.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),M=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.QItem),{key:M.value,clickable:"",class:"q-px-md q-py-sm",onClick:b=>f(M)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",$y,[e.withDirectives(e.createVNode(oe,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Ty=["src"],My={key:0,class:"header-row"},Py={class:"title-wrapper"},Iy={key:0,class:"title-icon"},Ry={class:"title-text"},Ay={class:"text-subtitle1 text-weight-medium"},zy={key:0,class:"caption-row"},Dy={class:"text-caption text-grey-6"},Fy=["innerHTML"],Oy={key:1,class:"card-footer"},va=D(e.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:t}){const o=e.ref(null),i=n,r=t,s=e.computed(()=>i.img?i.isMain?"365px":"200px":"0"),a=c=>{i.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(x.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,Ty)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(x.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",My,[e.createElementVNode("div",Py,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Iy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(x.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ry,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Ay,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",zy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Dy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(x.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Fy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Oy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),Ly={key:0,class:"list-title"},_y={class:"draggable-item"},Hy={class:"drag-handle"},Uy={class:"item-content"},vy={key:0,class:"item-actions"},qy={class:"item-content"},jy={key:0,class:"item-actions"},Wy={key:4,class:"add-button-container"},Gy=e.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:z.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const o=n,i=t,r=async()=>{const l=o.addFunc?await o.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(l),o.store&&await o.store.Create(l)),await c(),i("add",l)},s=async l=>{o.removeFromList&&z.H.Classes.RemoveFromClassById(l,o.list),o.store&&await o.store.Remove(l),await c(),i("remove",l)},a=async l=>{o.store&&await o.store.Update(l),i("update",l)},c=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(z.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",Ly,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(wi),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:h})=>[e.createElementVNode("div",_y,[e.createElementVNode("div",Hy,[e.createVNode(e.unref(x.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",Uy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",vy,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",qy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:h},()=>[e.createVNode(et,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",jy,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Wy,[e.createVNode(oe,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),qa=D(Gy,[["__scopeId","data-v-c87ed91c"]]),Qy={class:"del-block_title"},Yy={class:"del-block_body"},Xy=D(e.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",Qy,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",Yy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),ja=D(e.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},maxHeight:{type:String,default:"70vh"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(n,{emit:t}){const o=n,i=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{o.closable&&i("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function Zy(n){n.component("CollapseContainer",dy),n.component("CollapseItem",py),n.component("VerticalCollapseContainer",wy),n.component("PAdd",Cy),n.component("PAddDialog",Ua),n.component("PCard",va),n.component("PCrudList",qa),n.component("PEditDialog",_n),n.component("PModal",ja),n.component("PContainer",Sy),n.component("PContainerStickyHead",xy),n.component("PDel",Xy)}const Jy={class:"btn-group"},Wa=D(e.defineComponent({__name:"PAuthForm",props:{width:{type:String,default:"auto"},margin:{type:String,default:"auto"},padding:{type:String,default:"0"},background:{type:String,default:"inherit"}},emits:["submit"],setup(n,{emit:t}){const o=t,i=e.computed(()=>_e.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){_e.Form.SetChunk(c.GetChunk()),a();return}const l=_e.Form.Validate();if(l.length>0){Qt.Notify.Error(l.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{_e.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(Ji,{string:e.unref(_e).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e).Form.GetFields(),u=>(e.openBlock(),e.createBlock(et,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),e.createElementVNode("div",Jy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(oe,{id:u.id,key:u.GetChunk(),disabled:e.unref(_e).Form.IsBlock,type:f===0?e.unref(he).Success:e.unref(he).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:h=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),Ky=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{_e.Form.Reset(),_e.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(ja,{show:e.unref(_e).Modal.Visible,closable:e.unref(_e).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(Wa,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),e0=["onClick"],t0=D(e.defineComponent({__name:"PMenuTabs",props:{menus:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"},margin:{type:String,required:!1,default:"var(--tabs-margin, 0 10px 10px 10px)"},borderRadius:{type:String,required:!1,default:"var(--tabs-border-radius, 10px)"}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(o.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{o.menus.Select()});const u=f=>{o.menus.Select(f),i("select")};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,k)=>(e.openBlock(),e.createElementBlock("div",{key:k},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":k===n.menus.idx,tab:k!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:C=>u(k)},e.toDisplayString(p.name),15,e0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),n0=["id"],o0=["for"],i0={class:"left-field"},r0=["href","download"],s0={key:1,class:"text-field__input"},a0={class:"right-field"},l0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Et},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(n,{emit:t}){const o=n,i=t,r=Ke.GUID(),s=Ke.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const h=new Et;h.setFile(f),h.url=URL.createObjectURL(f),i("upload",h)},c=()=>{i("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=Xs.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const h=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),k=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,n0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,o0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",i0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(h,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,r0),e.createVNode(k,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ha,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",s0,[e.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",a0,[e.createVNode(k,{id:e.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),c0=D(l0,[["__scopeId","data-v-8b73ee22"]]);function Ga(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,i)}return o}function le(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ga(Object(o),!0).forEach(function(i){mt(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ga(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function mt(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function d0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)l=h[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)o=s[i],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(r[o]=n[o])}return r}function wn(n){return function(t){if(Array.isArray(t))return xr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,o){if(t){if(typeof t=="string")return xr(t,o);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return xr(t,o)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xr(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=n[o];return i}var Qa,u0,ni,Ie=(Qa=function(n){/*!
27
27
  Copyright (c) 2018 Jed Watson.
28
28
  Licensed under the MIT License (MIT), see
29
29
  http://jedwatson.github.io/classnames
30
- */(function(){var t={}.hasOwnProperty;function i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var c=i.apply(null,s);c&&o.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&o.push(l);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},Qa(to={path:u0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&to.path)}},to.exports),to.exports),Ct=function(n){return function(t,i){if(!t)return n;var o;typeof t=="string"?o=t:i=t;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var c=i[a];return c&&(s+=" "+(typeof c=="boolean"?r+"--"+a:r+"--"+a+"_"+c)),s},""):"")}};function Er(n,t,i){var o,r,s,a,c;function l(){var f=Date.now()-a;f<t&&f>=0?o=setTimeout(l,t-f):(o=null,i||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(l,t)),f&&(c=n.apply(s,r),s=r=null),c};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(c=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}Er.debounce=Er;var Br=Er,Z=function(){return Z=Object.assign||function(n){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},Z.apply(this,arguments)};/*! *****************************************************************************
30
+ */(function(){var t={}.hasOwnProperty;function o(){for(var i=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")i.push(s);else if(Array.isArray(s)){if(s.length){var c=o.apply(null,s);c&&i.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&i.push(l);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},Qa(ni={path:u0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ni.path)}},ni.exports),ni.exports),Ct=function(n){return function(t,o){if(!t)return n;var i;typeof t=="string"?i=t:o=t;var r=n;return i&&(r+="__"+i),r+(o?Object.keys(o).reduce(function(s,a){var c=o[a];return c&&(s+=" "+(typeof c=="boolean"?r+"--"+a:r+"--"+a+"_"+c)),s},""):"")}};function Er(n,t,o){var i,r,s,a,c;function l(){var f=Date.now()-a;f<t&&f>=0?i=setTimeout(l,t-f):(i=null,o||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=o&&!i;return i||(i=setTimeout(l,t)),f&&(c=n.apply(s,r),s=r=null),c};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(c=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}Er.debounce=Er;var Br=Er,Z=function(){return Z=Object.assign||function(n){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},Z.apply(this,arguments)};/*! *****************************************************************************
31
31
  Copyright (c) Microsoft Corporation.
32
32
 
33
33
  Permission to use, copy, modify, and/or distribute this software for any
@@ -40,5 +40,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
40
40
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
41
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
42
  PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */function Ya(n,t){var i,o;return n&&t?(i=""+n+t[0].toUpperCase()+t.slice(1),o=n+"-"+t):(i=n||t,o=n||t),{name:i,classname:o}}function Xa(n){return/^blob:/.test(n)}function Za(n){return Xa(n)||function(t){return/^data:/.test(t)}(n)}function Hn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function ze(n){return n===void 0}function no(n){return typeof n=="object"&&n!==null}function Nr(n,t,i){var o={};return no(n)?(Object.keys(t).forEach(function(r){ze(n[r])?o[r]=t[r]:no(t[r])?no(n[r])?o[r]=Nr(n[r],t[r],i[r]):o[r]=n[r]?t[r]:i[r]:t[r]===!0||t[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?t:i}function io(n){var t=Number(n);return Number.isNaN(t)?n:t}function Ja(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!Ka(n)}function Ka(n){return n!=n}function el(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var gi=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},f0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Vr=function(n){this.type="move",this.directions=n},m0=function(){function n(t,i,o,r,s){this.type="drag",this.nativeEvent=t,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var t=this,i=t.element,o=t.anchor,r=t.position;if(i){var s=i.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},n}(),$r={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=wn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,i){return{clientX:t.clientX+i.clientX/n.touches.length,clientY:t.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.draggable.getBoundingClientRect(),i=t.left,o=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,t){var i=wn(t);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new m0(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};$r.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:i.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Tr=Ct("vue-handler-wrapper"),tl={name:"HandlerWrapper",components:{DraggableElement:$r},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,i=Ya(this.horizontalPosition,this.verticalPosition);n=Tr((mt(t={},i.classname,!0),mt(t,"disabled",this.disabled),t))}else n=Tr({disabled:this.disabled});return{root:n,draggable:Tr("draggable")}}},emits:["leave","enter","drag","drag-end"]};tl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var h0=Ct("vue-line-wrapper"),nl={name:"LineWrapper",components:{DraggableElement:$r},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return h0((mt(n={},this.position,!0),mt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};nl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var $t=["left","right","top","bottom"],p0=["left","right"],g0=["top","bottom"],y0=["left","top"],w0=["fill-area","fit-area","stencil","none"],il={left:0,top:0,width:0,height:0};function ol(n,t,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==t[o]})}function Tt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Un(n,t){return{left:n.left-t.left,top:n.top-t.top}}function ve(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function yi(n,t){var i={left:0,top:0,right:0,bottom:0};return $t.forEach(function(o){var r=t[o],s=Tt(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function Mt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function oo(n){return{left:-n.left,top:-n.top}}function it(n,t){return Z(Z({},n),{left:n.left+t.left,top:n.top+t.top})}function ht(n,t,i,o){if(t!==1){if(i){var r=ve(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(i.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(i.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ce(n){return n.width/n.height}function vn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function qn(n,t){var i={left:0,top:0},o=yi(n,t);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function Mr(n,t){var i;return t.minimum&&n<t.minimum?i=t.minimum:t.maximum&&n>t.maximum&&(i=t.maximum),i}function rl(n,t){var i=ce(n),o=ce(t);return t.width<1/0&&t.height<1/0?i>o?{width:t.width,height:t.width/i}:{width:t.height*i,height:t.height}:t.width<1/0?{width:t.width,height:t.width/i}:t.height<1/0?{width:t.height*i,height:t.height}:n}function sl(n,t){var i=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Yt(n,t){var i=t*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function ro(n,t){var i=yi(qe(n,t),t);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,vn(n,t)):Math.min((n.height+i.top+i.bottom)/n.height,vn(n,t)):1}function qe(n,t,i){i===void 0&&(i=!1);var o=qn(n,t);return it(n,i?oo(o):o)}function Pr(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function b0(n,t){return Z(Z({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function al(n,t,i){i===void 0&&(i=!0);var o={};return $t.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function so(n,t){return al(n,t,!0)}function ll(n){var t=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ce(t)>=i.minimum&&ce(t)<=i.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(o||t.height>=r.minHeight&&t.width>=r.minWidth))}function cl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Lt(n){var t=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,t)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,p){return ll({size:p,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!h||cl(p,{width:t,height:i})<cl(h,{width:t,height:i}))?p:h},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),ll({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ir(n){var t=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=it(i,t.directions);return it(s,qn(s,r))}function C0(n){var t=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,h){return Ir({coordinates:f,positionRestrictions:s,event:new Vr({left:h.left-f.left,top:h.top-f.top})})},u=Z({},t);return(Array.isArray(i)?i:[i]).forEach(function(f){var h={};ze((h=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:c}):f).width)&&ze(h.height)||(u=function(p,y){var b=Z(Z(Z({},p),Lt({width:y.width,height:y.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(b,{left:p.left,top:p.top})}(u,Z(Z({},u),h))),ze(h.left)&&ze(h.top)||(u=l(u,Z(Z({},u),h)))}),u}function S0(n){n.event;var t=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,h=Z({},o),p=Z({},r),y=Z({},s);l=ce(y),u=ce(h),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(h=Z(Z({},h),Lt({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:ce(y),maximum:ce(y)}})));var b=ro(p=ht(p,h.width*i.width/(p.width*y.width)),t({visibleArea:p,type:"resize"}));return b!==1&&(p=ht(p,b),h=ht(h,b)),p=qe(p=it(p,Un(ve(h),ve(p))),t({visibleArea:p,type:"move"})),{coordinates:h=qe(h,so(Tt(p),c)),visibleArea:p}}function k0(n){var t=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=Z({},r),l=Z({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,o.width,ce(o)>ce(c)?(u.height=.8*o.height,u.width=u.height*ce(c)):(u.width=.8*o.width,u.height=u.width*ce(c));var f=ro(l=ht(l,c.width*o.width/(l.width*u.width)),i({visibleArea:l,type:"resize"}));l=ht(l,f),f!==1&&(u.height/=f,u.width/=f),l=qe(l=it(l,Un(ve(c),ve(l))),i({visibleArea:l,type:"move"})),c=qe(c,so(Tt(l),a))}return{coordinates:c,visibleArea:l}}function x0(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=Z({},o),a=Z({},i);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=ht(s,Math.min(a.width/s.width,vn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=ht(s,Math.min(a.height/s.height,vn(s,r({visibleArea:s,type:"resize"}))))),s=qe(s=it(s,oo(qn(a,Tt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function E0(n){var t=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||t;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function B0(n){var t=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||t,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,ce(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Lt(Z(Z({},c),{aspectRatio:o,sizeRestrictions:r}))}function N0(n){var t,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||o;return ce(u)>ce(s)?i=(t=l.height*u.height/s.height)*ce(l):t=(i=l.width*u.width/s.width)/ce(l),Lt({width:i,height:t,aspectRatio:a,sizeRestrictions:c})}function V0(n){var t=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=ce(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=rl({width:ce(s)>r?s.width:s.height*r,height:ce(s)>r?s.width/r:s.height},Pr(t())),c={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},l=yi(i,Tt(Z({left:0,top:0},o))),u={};return!l.left&&!l.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!l.top&&!l.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),qe(c,u)}var f=ce(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function ao(n,t){return al(n,Tt(t))}function $0(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=Z({},o),h=Z({},i),p=1,y=1,b=l.factor&&Math.abs(l.factor-1)>.001;f=it(f,{left:u.left||0,top:u.top||0});var N={stencil:{minimum:Math.max(r.minWidth?r.minWidth/h.width:0,r.minHeight?r.minHeight/h.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/h.width:1/0,r.maxHeight?r.maxHeight/h.height:1/0,vn(h,a))},area:{maximum:vn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&b&&(l.factor<1?(y=Math.max(l.factor,N.stencil.minimum))>1&&(y=1):l.factor>1&&(y=Math.min(l.factor,Math.min(N.area.maximum,N.stencil.maximum)))<1&&(y=1)),y&&(f=ht(f,y,l.center));var E=i.left-o.left,S=o.width+o.left-(i.width+i.left),P=i.top-o.top,C=o.height+o.top-(i.height+i.top);return f=qe(f=it(f,qn(f,{left:a.left!==void 0?a.left-E*y:void 0,top:a.top!==void 0?a.top-P*y:void 0,bottom:a.bottom!==void 0?a.bottom+C*y:void 0,right:a.right!==void 0?a.right+S*y:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*y,h.height=h.height*y,h.left=f.left+E*y,h.top=f.top+P*y,h=qe(h,so(Tt(f),a)),l.factor&&b&&c&&(l.factor>1?p=Math.min(N.area.maximum,l.factor)/y:l.factor<1&&(p=Math.max(h.height/f.height,h.width/f.width,l.factor/y)),p!==1&&(f=it(f=qe(f=ht(f,p,l.factor>1?l.center:ve(h)),s({visibleArea:f,type:"move"})),oo(qn(h,Tt(f)))))),{coordinates:h,visibleArea:f}}function T0(n){var t=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=Z({},o),h=Z({},r),p=Yt(ve(Z({left:0,top:0},l)),u);return(f=Z(Z({},Lt({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Yt(ve(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,h=ht(h,ro(h,i({visibleArea:h,type:"resize"}))),{coordinates:f=qe(f,a),visibleArea:h=qe(h=it(h,Un(ve(f),ve(o))),i({visibleArea:h,type:"move"}))}}function M0(n){var t=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=Z({},s),u=Z({},a),f=i.horizontal!==t.horizontal,h=i.vertical!==t.vertical;if(f||h){var p=Yt({left:c.width/2,top:c.height/2},-o),y=Yt(ve(l),-o),b=Yt({left:f?p.left-(y.left-p.left):y.left,top:h?p.top-(y.top-p.top):y.top},o);l=it(l,Un(b,ve(l))),y=Yt(ve(u),-o),u=qe(u=it(u,Un(b=Yt({left:f?p.left-(y.left-p.left):y.left,top:h?p.top-(y.top-p.top):y.top},o),ve(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function dl(n){var t=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=Z({},t),u=Mt(i,l).width,f=Mt(i,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(i.width-s.minWidth)/(l.left/l.right),l.right=-(i.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(i.width-s.minWidth):l.right<0&&(l.right=-(i.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(i.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(i.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(i.height-s.minHeight):l.bottom<0&&(l.bottom=-(i.height-s.minHeight)));var h=yi(Mt(i,l),r);c&&(h.left&&h.left>0&&h.right===0?(l.right+=h.left,l.left-=h.left):h.right&&h.right>0&&h.left===0&&(l.left+=h.right,l.right-=h.right),h.top&&h.top>0&&h.bottom===0?(l.bottom+=h.top,l.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(l.top+=h.bottom,l.bottom-=h.bottom),h=yi(Mt(i,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if($t.forEach(function(N){var E=h[N];E&&l[N]&&(p[N]=Math.max(0,1-E/l[N]))}),a){var y=Math.min.apply(null,$t.map(function(N){return p[N]}));y!==1/0&&$t.forEach(function(N){l[N]*=y})}else $t.forEach(function(N){p[N]!==1/0&&(l[N]*=p[N])});if(u=Mt(i,l).width,f=Mt(i,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-i.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-i.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-i.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-i.height)/(l.bottom+l.top))),a){var b=Math.min(p.width,p.height);b!==1/0&&$t.forEach(function(N){l[N]*=b})}else p.width!==1/0&&p0.forEach(function(N){l[N]*=p.width}),p.height!==1/0&&g0.forEach(function(N){l[N]*=p.height});return l}function lo(n,t,i){return t==0&&i==0?n/2:t==0?0:i==0?n:n*Math.abs(t/(t+i))}var P0=Ct("vue-simple-handler"),I0=Ct("vue-simple-handler-wrapper"),Rr={name:"SimpleHandler",components:{HandlerWrapper:tl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var n,t=(mt(n={},this.horizontalPosition,!!this.horizontalPosition),mt(n,this.verticalPosition,!!this.verticalPosition),mt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),mt(n,"hover",this.hover),n);return{default:Ie(P0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(I0(t),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Rr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var R0=Ct("vue-simple-line"),A0=Ct("vue-simple-line-wrapper"),Ar={name:"SimpleLine",components:{LineWrapper:nl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Ie(R0(mt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(A0(mt({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ar.render=function(n,t,i,o,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var zr=Ct("vue-bounding-box"),z0=["east","west",null],D0=["south","north",null],ul={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Rr}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Ar}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return z0.forEach(function(t){D0.forEach(function(i){if(t!==i){var o=Ya(t,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,horizontalDirection:t})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,t=this.handlersWrappersClasses,i=this.linesClasses,o=this.linesWrappersClasses;return{root:zr(),handlers:n,handlersWrappers:t,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||t.push({name:i.name,component:n.linesComponent,class:Ie(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Ie(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Ie(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Ie(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(i&&o){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?i:a==="west"?0:i/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=zr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=zr("handler",mt({},r.classname,!0));t.push(s)}}),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(n,t,i){var o,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),i==="north"?c.top-=a:i==="south"&&(c.bottom+=a),!i&&t?o="width":i&&!t&&(o="height"),this.resizable&&this.$emit("resize",new f0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};ul.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var F0=Ct("vue-draggable-area"),fl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:F0()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(n){if(n.cancelable){var t=this.movable&&n.touches.length===1;t&&(this.touches=wn(n.touches)),(this.touchStarted||t)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):el({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.container.getBoundingClientRect(),i=t.left,o=t.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,t){var i=wn(t);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new Vr({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};fl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Dr(n){var t,i;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function O0(n){return new Promise(function(t,i){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,h=new ArrayBuffer(f),p=new Uint8Array(h),y=0;y<f;y++)p[y]=u.charCodeAt(y);return h}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(l){t(l.target.result)},s=n,a=function(l){o.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(l){i(l)}var s,a,c})}function ml(n){var t=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function L0(n){try{var t,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var c=i.byteLength,l=2;l+1<c;){if(i.getUint8(l)===255&&i.getUint8(l+1)===225){s=l;break}l++}if(s&&(o=s+10,function(y,b,N){var E,S="";for(E=b,N+=b;E<N;E++)S+=String.fromCharCode(y.getUint8(E));return S}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var h=i.getUint16(a,r),p=0;p<h;p++)if(l=a+12*p+2,i.getUint16(l,r)===274){l+=8,t=i.getUint16(l,r),i.setUint16(l,1,r);break}}return t}catch{return null}}function hl(n,t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-o)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=el({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var pl={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Br(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new gi({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=hl(t,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new gi({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var t=this.$refs.container,i=t.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=wn(n.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=hl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var i=wn(n.touches).filter(function(o){return!o.identifier||t.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var t=this.$refs.container.getBoundingClientRect(),i=t.left,o=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||Ka(c)?c:c>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new gi({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};pl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Fr={components:{TransformableImage:pl},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Fr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var co=Ct("vue-preview"),gl={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:co({fill:this.fill}),wrapper:co("wrapper"),imageWrapper:co("image-wrapper"),image:Ie(co("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,t=le(le({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=sl({width:i,height:o},t.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*t.scaleX/2,top:(o-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*i/2,top:(1-t.scaleY)*o/2}};return s.transform=`translate(
44
- `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+ml(t),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};gl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,i.image&&i.image.src]])],6)],6)};var yl={components:{Preview:gl},inheritAttrs:!1};yl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Or=Ct("vue-rectangle-stencil"),wl={name:"RectangleStencil",components:{StencilPreview:yl,BoundingBox:ul,DraggableArea:fl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ar}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Ie(Or({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ie(Or("preview"),this.previewClass),boundingBox:Ie(Or("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(t,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};wl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var _0=["transitions"],_t=Ct("vue-advanced-cropper"),bl={name:"Cropper",components:{BackgroundWrapper:Fr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return wl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Fr}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(n){return w0.indexOf(n)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(n){return!(typeof n=="string"&&n!=="fill"&&n!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(n){var t=n.event,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=Z(Z({},i),{right:i.left+i.width,bottom:i.top+i.height}),c=t.params||{},l=Z({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),$t.forEach(function($){u[$]||(l[$]=0)});var f=Mt(a,l=dl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,h=Mt(a,l).height,p=c.preserveRatio?ce(a):Mr(f/h,o);if(p){var y=c.respectDirection;if(y||(y=a.width>=a.height||p===1?"width":"height"),y==="width"){var b=f/p-a.height;if(u.top&&u.bottom){var N=l.top,E=l.bottom;l.bottom=lo(b,E,N),l.top=lo(b,N,E)}else u.bottom?l.bottom=b:u.top?l.top=b:u.right?l.right=0:u.left&&(l.left=0)}else if(y==="height"){var S=a.width-h*p;if(u.left&&u.right){var P=l.left,C=l.right;l.left=-lo(S,P,C),l.right=-lo(S,C,P)}else u.left?l.left=-S:u.right?l.right=-S:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=dl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Mt(a,l).width,h=Mt(a,l).height,(p=c.preserveRatio?ce(a):Mr(f/h,o))&&Math.abs(p-f/h)>.001&&$t.forEach(function($){u[$]||(l[$]=0)}),Ir({event:new Vr({left:-l.left,top:-l.top}),coordinates:{width:i.width+l.right+l.left,height:i.height+l.top+l.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,i=n.imageSize,o=ce(i);t.style.width=i.width+"px",t.style.height=t.clientWidth/o+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=Z(Z({},i),Lt({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=qe(a=it(a,Un(ve(i),ve(a))),so(Tt(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=Z({},t);s.height=s.width/ce(i),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ht(s,Math.max(r.height/s.height,r.width/s.width)));var a=oo(qn(r,Tt(s=ht(s,ro(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=qe(s=it(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(ce(i)>ce(o)?(a={top:0,bottom:o.height},t&&s==="move"&&(t.width>o.width?(a.left=-(t.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},t&&s==="move"&&(t.height>o.height?(a.top=-(t.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:t.width,bottom:t.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:le({},il)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var n=function(t){return t*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=Nr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Nr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ze(this.minWidth)?0:io(this.minWidth),minHeight:ze(this.minHeight)?0:io(this.minHeight),maxWidth:ze(this.maxWidth)?1/0:io(this.maxWidth),maxHeight:ze(this.maxHeight)?1/0:io(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,l=Z(Z({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Pr(r),f=rl(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),i=Pr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.height*t.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:_t(),image:Ie(_t("image"),this.imageClass),stencil:_t("stencil"),boundaries:Ie(_t("boundaries"),this.boundariesClass),stretcher:Ie(_t("stretcher")),background:Ie(_t("background"),this.backgroundClass),foreground:Ie(_t("foreground"),this.foregroundClass),imageWrapper:Ie(_t("image-wrapper")),cropperWrapper:Ie(_t("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,i=n.height,o=n.left,r=n.top;return{width:t/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=le(le({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-i.left-this.imageTransforms.translateX,"px, ").concat(-t.top-i.top-this.imageTransforms.translateY,"px)")+ml(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==t[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Br(this.update,this.debounce),this.debouncedDisableTransitions=Br(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var n=this.initialized?this.prepareResult(le({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:le({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,imageTransforms:t,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new gi({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new gi({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var i=t.coordinates,o=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),qe(s,r)}(le(le({},this.getPublicProperties()),{},{positionRestrictions:ao(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?S0:this.autoZoom?k0:x0);var s=r({event:{type:n,params:o},visibleArea:t,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return le(le({},s),{},{changed:!ol(s.visibleArea,t)||!ol(s.coordinates,i)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i!==void 0&&i,r=d0(t,_0),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;o&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var i=t.event,o=t.visibleArea,r=t.coefficient;if(i.type==="manipulateImage")return Z(Z({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=Z(Z({},i),{directions:Z({},i.directions)});return $t.forEach(function(c){s.directions[c]*=r}),s}if(i.type==="move"){var a=Z(Z({},i),{directions:Z({},i.directions)});return y0.forEach(function(c){a.directions[c]*=r}),a}return i}(le(le({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,h=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},y=sl(p,f),b=c.getContext("2d");c.height=y.height,c.width=y.width,b.save();var N=Yt(ve(Z({left:0,top:0},p)),f);return b.translate(-(N.left-y.width/2),-(N.top-y.height/2)),b.rotate(f*Math.PI/180),b.translate(h.horizontal?p.width:0,h.vertical?p.height:0),b.scale(h.horizontal?-1:1,h.vertical?-1:1),b.drawImage(l,0,0,p.width,p.height),b.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,o=le({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Lt({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,h){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),h&&(h.imageSmoothingEnabled&&(p.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(p.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(p.fillStyle=h.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var y=u.left<0?-u.left:0,b=u.top<0?-u.top:0;p.drawImage(l,u.left+y,u.top+b,u.width,u.height,y*(c.width/u.width),b*(c.height/u.height),c.width,c.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&t?b0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&t?ao(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return C0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?N0:B0);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=Hn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||E0,s=[o,function(a){var c=a.coordinates;return le({},Hn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,wn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var t=n.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,t=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(Hn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=le(le({},this.defaultImageTransforms),{},{flip:le({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,i,o,r,s,a,c=n.defaultVisibleArea||V0;n.visibleArea=Hn(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=t.visibleArea,o=t.boundaries,r=t.getAreaRestrictions,s=Z({},i),a=ce(o),s.width/s.height!==a&&(s.height=s.width/a),qe(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Za(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var i=ze(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){O0(n).then(function(s){var a=L0(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Xa(i)||!Za(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,Hn(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms()):no(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Dr({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=le(le({},this.appliedImageTransforms),{},{flip:le({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:ao(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=t.sizeRestrictions,o=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:ao(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,t.visibleArea.width),maxHeight:Math.min(i.maxHeight,t.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=t.transitions,o=i!==void 0&&i,r=t.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=$0(le(le({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:o})},getAspectRatio:function(n){var t,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,i=c.maximum}if(ze(t)&&(t=ze(r)?s:r),ze(i)&&(i=ze(r)?a:r),!n&&(ze(t)||ze(i))){var l=this.getStencilSize(),u=l?ce(l):null;ze(t)&&(t=Ja(u)?u:void 0),ze(i)&&(i=Ja(u)?u:void 0)}return{minimum:t,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=n.boundaries,i=n.stencilSize,o=n.aspectRatio,Mr(ce(r=Hn(i)?i({boundaries:t,aspectRatio:o}):i),o)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ce(r),maximum:ce(r)}})),r;var n,t,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return le({},il)},flip:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=le({},this.imageTransforms.flip),a=M0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=le({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=T0({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},H0={key:0,ref:"canvas",style:{display:"none"}},U0={key:1,ref:"sourceCanvas",style:{display:"none"}};bl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),i.canvas?(e.openBlock(),e.createBlock("canvas",H0,null,512)):e.createCommentVNode("",!0),i.canvas?(e.openBlock(),e.createBlock("canvas",U0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const v0={width:0,height:0,left:0,top:0};class Lr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",v0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,i=0,o){const r=new Lr;return r.src=t,r.ratio=i,r.id=o,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const q0={class:"cropper-wrapper"},j0={class:"row justify-end q-mt-md"},W0=D(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.ratio),s=e.ref(Lr.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var p;o("crop",{blob:h,src:(p=f.canvas)==null?void 0:p.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(e.openBlock(),e.createElementBlock("div",q0,[e.createVNode(pi,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=p=>r.value=p),h[1]||(h[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(bl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[2]||(h[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",j0,[e.createVNode(ie,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),G0={class:"uploader-content"},Q0={class:"uploader-icon"},Y0={class:"tools-button absolute-full column items-center justify-center"},X0={class:"row q-gutter-sm"},Z0=D(e.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:t}){const i=x.ClosePopup,o=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var C;const P=(C=a.value)==null?void 0:C.querySelector(".q-uploader__input");P&&!P.getAttribute("aria-label")&&P.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(o.ratio),h=e.ref(""),p=e.computed(()=>({width:`${o.height*f.value}px`,height:`${o.height}px`,maxWidth:"100%"})),y=e.computed(()=>({width:`${o.height*f.value}px`,height:`${o.height}px`,maxWidth:"100%"})),b=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},N=P=>{P.blob.src=P.src,o.fileInfo.setFile&&o.fileInfo.setFile(P.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),l.value=!1,r("crop")},E=P=>{h.value=P.url,l.value=!0},S=P=>{if(P.length===0)return;const C=P[0];C.url=URL.createObjectURL(C),s.value=C,o.fileInfo.setFile&&o.fileInfo.setFile(C),o.withCrop&&E(s.value)};return e.watch(f,P=>{r("update:ratio",P)}),e.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(P,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(x.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",Y0,[e.createElementVNode("div",X0,[e.createVNode(ie,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:C[0]||(C[0]=$=>E(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...C[5]||(C[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ie,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:b},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...C[6]||(C[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(x.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(y)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:S,onRemoved:b},{header:e.withCtx(()=>[e.createElementVNode("div",G0,[e.createVNode(e.unref(x.QUploaderAddTrigger)),e.createElementVNode("div",Q0,[e.createVNode(e.unref(x.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),C[4]||(C[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(dn,{modelValue:e.unref(l),"onUpdate:modelValue":C[3]||(C[3]=$=>e.isRef(l)?l.value=$:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(ie,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(i)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(W0,{ratio:e.unref(f),"onUpdate:ratio":C[1]||(C[1]=$=>e.isRef(f)?f.value=$:null),src:e.unref(h),onCrop:N,onClose:C[2]||(C[2]=$=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function J0(n){n.component("PMenuTabs",t0),n.component("PUploaderFile",c0),n.component("PUploaderImage",Z0),n.component("PAuthForm",Wa),n.component("PAuthModal",Ky)}const K0={install:function(n){$g(n),Zy(n),ay(n),J0(n),W1(n)}};function ew(n,t={}){const{quasarPlugins:i=!0}=t;i&&n.use(x.Quasar,{plugins:{Notify:x.Notify,Dialog:x.Dialog}}),K0.install(n),Ia(n),ca(n),Pa(n)}class tw extends xi{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new Zr);d(this,"method",En.Login);d(this,"id","field-auth-login")}}const nw=["PF","PFM"];L.AuthButtonLogin=bo,L.AuthButtonRefresh=Yr,L.AuthButtonRegister=Co,L.AuthButtonRestore=ki,L.AuthChunks=Le,L.AuthFieldsIds=zt,L.AuthFormSettings=Kr,L.AuthMethods=En,L.EmailField=Ei,L.LoginField=tw,L.PAddDialog=Ua,L.PBadge=li,L.PButton=ie,L.PCard=va,L.PCheckBox=Ra,L.PChip=ur,L.PContactForm=Ko,L.PContactFormDeleteDialog=ci,L.PContactFormEdit=er,L.PContactFormEditDialog=di,L.PContactFormEditEmails=tr,L.PContactFormEditPhones=nr,L.PContactFormView=ir,L.PContactFormViewEmails=un,L.PContactFormViewPhones=fn,L.PCrudList=qa,L.PDateInput=eo,L.PDateTimeInput=Aa,L.PDialog=dn,L.PEditDialog=_n,L.PF=z,L.PFM=og,L.PHint=kr,L.PInput=et,L.POptionsListSingle=Zi,L.POpts=za,L.PSelect=pi,L.PTable=br,L.PTableBadge=fr,L.PTableBadges=mr,L.PTableCount=hr,L.PTableEdit=pr,L.PTableNumber=gr,L.PTableSelect=yr,L.PTableString=wr,L.PTableToggle=Da,L.PTabs=Cr,L.PTabsLeft=Sr,L.PToggle=Fa,L.PasswordField=Bi,L.PasswordRepeatField=Jr,L.Schedule=fi,L.ScheduleDay=Xi,L.ScheduleDefaultLabels=dr,L.ScheduleGridEditor=Ta,L.SchedulePlace=On,L.ScheduleSession=Fn,L.ScheduleSlot=Ot,L.ScheduleTimeline=Ma,L.TabsStore=Ji,L.defaultContactsLabels=Vt,L.installSprof=ew,L.pfName=nw,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function Ya(n,t){var o,i;return n&&t?(o=""+n+t[0].toUpperCase()+t.slice(1),i=n+"-"+t):(o=n||t,i=n||t),{name:o,classname:i}}function Xa(n){return/^blob:/.test(n)}function Za(n){return Xa(n)||function(t){return/^data:/.test(t)}(n)}function Hn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function ze(n){return n===void 0}function oi(n){return typeof n=="object"&&n!==null}function Nr(n,t,o){var i={};return oi(n)?(Object.keys(t).forEach(function(r){ze(n[r])?i[r]=t[r]:oi(t[r])?oi(n[r])?i[r]=Nr(n[r],t[r],o[r]):i[r]=n[r]?t[r]:o[r]:t[r]===!0||t[r]===!1?i[r]=!!n[r]:i[r]=n[r]}),i):n?t:o}function ii(n){var t=Number(n);return Number.isNaN(t)?n:t}function Ja(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!Ka(n)}function Ka(n){return n!=n}function el(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var yo=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},f0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Vr=function(n){this.type="move",this.directions=n},m0=function(){function n(t,o,i,r,s){this.type="drag",this.nativeEvent=t,this.position=i,this.previousPosition=r,this.element=o,this.anchor=s}return n.prototype.shift=function(){var t=this,o=t.element,i=t.anchor,r=t.position;if(o){var s=o.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-i.left,top:r.top-c-i.top}}return{left:0,top:0}},n}(),$r={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=wn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,o){return{clientX:t.clientX+o.clientX/n.touches.length,clientY:t.clientY+o.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.draggable.getBoundingClientRect(),o=t.left,i=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-o,top:n.clientY-s,bottom:r-n.clientY,right:i-n.clientX}},processMove:function(n,t){var o=wn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new m0(n,i,{left:o[0].clientX,top:o[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=o}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};$r.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:o.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Tr=Ct("vue-handler-wrapper"),tl={name:"HandlerWrapper",components:{DraggableElement:$r},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,o=Ya(this.horizontalPosition,this.verticalPosition);n=Tr((mt(t={},o.classname,!0),mt(t,"disabled",this.disabled),t))}else n=Tr({disabled:this.disabled});return{root:n,draggable:Tr("draggable")}}},emits:["leave","enter","drag","drag-end"]};tl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var h0=Ct("vue-line-wrapper"),nl={name:"LineWrapper",components:{DraggableElement:$r},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return h0((mt(n={},this.position,!0),mt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};nl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var $t=["left","right","top","bottom"],p0=["left","right"],g0=["top","bottom"],y0=["left","top"],w0=["fill-area","fit-area","stencil","none"],ol={left:0,top:0,width:0,height:0};function il(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function Tt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Un(n,t){return{left:n.left-t.left,top:n.top-t.top}}function ve(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function wo(n,t){var o={left:0,top:0,right:0,bottom:0};return $t.forEach(function(i){var r=t[i],s=Tt(n)[i];o[i]=r!==void 0&&s!==void 0?i==="left"||i==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),o}function Mt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function ri(n){return{left:-n.left,top:-n.top}}function ot(n,t){return Z(Z({},n),{left:n.left+t.left,top:n.top+t.top})}function ht(n,t,o,i){if(t!==1){if(o){var r=ve(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(o.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(o.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ce(n){return n.width/n.height}function vn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function qn(n,t){var o={left:0,top:0},i=wo(n,t);return i.left&&i.left>0?o.left=i.left:i.right&&i.right>0&&(o.left=-i.right),i.top&&i.top>0?o.top=i.top:i.bottom&&i.bottom>0&&(o.top=-i.bottom),o}function Mr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function rl(n,t){var o=ce(n),i=ce(t);return t.width<1/0&&t.height<1/0?o>i?{width:t.width,height:t.width/o}:{width:t.height*o,height:t.height}:t.width<1/0?{width:t.width,height:t.width/o}:t.height<1/0?{width:t.height*o,height:t.height}:n}function sl(n,t){var o=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(o))+Math.abs(n.height*Math.sin(o)),height:Math.abs(n.width*Math.sin(o))+Math.abs(n.height*Math.cos(o))}}function Yt(n,t){var o=t*Math.PI/180;return{left:n.left*Math.cos(o)-n.top*Math.sin(o),top:n.left*Math.sin(o)+n.top*Math.cos(o)}}function si(n,t){var o=wo(qe(n,t),t);return o.left+o.right+o.top+o.bottom?o.left+o.right>o.top+o.bottom?Math.min((n.width+o.left+o.right)/n.width,vn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,vn(n,t)):1}function qe(n,t,o){o===void 0&&(o=!1);var i=qn(n,t);return ot(n,o?ri(i):i)}function Pr(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function b0(n,t){return Z(Z({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function al(n,t,o){o===void 0&&(o=!0);var i={};return $t.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?i[r]=r==="left"||r==="top"?o?Math.max(s,a):Math.min(s,a):o?Math.min(s,a):Math.max(s,a):a!==void 0?i[r]=a:s!==void 0&&(i[r]=s)}),i}function ai(n,t){return al(n,t,!0)}function ll(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ce(t)>=o.minimum&&ce(t)<=o.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(i||t.height>=r.minHeight&&t.width>=r.minWidth))}function cl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Lt(n){var t=n.width,o=n.height,i=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(i.minWidth,Math.min(i.maxWidth,t)),height:Math.max(i.minHeight,Math.min(i.maxHeight,o))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,p){return ll({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!h||cl(p,{width:t,height:o})<cl(h,{width:t,height:o}))?p:h},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),ll({size:s,aspectRatio:r,sizeRestrictions:i})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ir(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=ot(o,t.directions);return ot(s,qn(s,r))}function C0(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,h){return Ir({coordinates:f,positionRestrictions:s,event:new Vr({left:h.left-f.left,top:h.top-f.top})})},u=Z({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var h={};ze((h=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&ze(h.height)||(u=function(p,k){var C=Z(Z(Z({},p),Lt({width:k.width,height:k.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(C,{left:p.left,top:p.top})}(u,Z(Z({},u),h))),ze(h.left)&&ze(h.top)||(u=l(u,Z(Z({},u),h)))}),u}function S0(n){n.event;var t=n.getAreaRestrictions,o=n.boundaries,i=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,h=Z({},i),p=Z({},r),k=Z({},s);l=ce(k),u=ce(h),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(h=Z(Z({},h),Lt({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:ce(k),maximum:ce(k)}})));var C=si(p=ht(p,h.width*o.width/(p.width*k.width)),t({visibleArea:p,type:"resize"}));return C!==1&&(p=ht(p,C),h=ht(h,C)),p=qe(p=ot(p,Un(ve(h),ve(p))),t({visibleArea:p,type:"move"})),{coordinates:h=qe(h,ai(Tt(p),c)),visibleArea:p}}function k0(n){var t=n.event,o=n.getAreaRestrictions,i=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=Z({},r),l=Z({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ce(i)>ce(c)?(u.height=.8*i.height,u.width=u.height*ce(c)):(u.width=.8*i.width,u.height=u.width*ce(c));var f=si(l=ht(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=ht(l,f),f!==1&&(u.height/=f,u.width/=f),l=qe(l=ot(l,Un(ve(c),ve(l))),o({visibleArea:l,type:"move"})),c=qe(c,ai(Tt(l),a))}return{coordinates:c,visibleArea:l}}function x0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=Z({},i),a=Z({},o);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=ht(s,Math.min(a.width/s.width,vn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=ht(s,Math.min(a.height/s.height,vn(s,r({visibleArea:s,type:"resize"}))))),s=qe(s=ot(s,ri(qn(a,Tt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function E0(n){var t=n.imageSize,o=n.visibleArea,i=n.coordinates,r=o||t;return{left:(o?o.left:0)+r.width/2-i.width/2,top:(o?o.top:0)+r.height/2-i.height/2}}function B0(n){var t=n.imageSize,o=n.visibleArea,i=n.aspectRatio,r=n.sizeRestrictions,s=o||t,a=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ce(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Lt(Z(Z({},c),{aspectRatio:i,sizeRestrictions:r}))}function N0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||i;return ce(u)>ce(s)?o=(t=l.height*u.height/s.height)*ce(l):t=(o=l.width*u.width/s.width)/ce(l),Lt({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function V0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ce(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=rl({width:ce(s)>r?s.width:s.height*r,height:ce(s)>r?s.width/r:s.height},Pr(t())),c={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},l=wo(o,Tt(Z({left:0,top:0},i))),u={};return!l.left&&!l.right&&c.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(u.top=0,u.bottom=i.height),qe(c,u)}var f=ce(i);return a={height:f>r?i.height:i.width/r,width:f>r?i.height*r:i.width},{left:i.width/2-a.width/2,top:i.height/2-a.height/2,width:a.width,height:a.height}}function li(n,t){return al(n,Tt(t))}function $0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=Z({},i),h=Z({},o),p=1,k=1,C=l.factor&&Math.abs(l.factor-1)>.001;f=ot(f,{left:u.left||0,top:u.top||0});var N={stencil:{minimum:Math.max(r.minWidth?r.minWidth/h.width:0,r.minHeight?r.minHeight/h.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/h.width:1/0,r.maxHeight?r.maxHeight/h.height:1/0,vn(h,a))},area:{maximum:vn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&C&&(l.factor<1?(k=Math.max(l.factor,N.stencil.minimum))>1&&(k=1):l.factor>1&&(k=Math.min(l.factor,Math.min(N.area.maximum,N.stencil.maximum)))<1&&(k=1)),k&&(f=ht(f,k,l.center));var E=o.left-i.left,y=i.width+i.left-(o.width+o.left),M=o.top-i.top,b=i.height+i.top-(o.height+o.top);return f=qe(f=ot(f,qn(f,{left:a.left!==void 0?a.left-E*k:void 0,top:a.top!==void 0?a.top-M*k:void 0,bottom:a.bottom!==void 0?a.bottom+b*k:void 0,right:a.right!==void 0?a.right+y*k:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*k,h.height=h.height*k,h.left=f.left+E*k,h.top=f.top+M*k,h=qe(h,ai(Tt(f),a)),l.factor&&C&&c&&(l.factor>1?p=Math.min(N.area.maximum,l.factor)/k:l.factor<1&&(p=Math.max(h.height/f.height,h.width/f.width,l.factor/k)),p!==1&&(f=ot(f=qe(f=ht(f,p,l.factor>1?l.center:ve(h)),s({visibleArea:f,type:"move"})),ri(qn(h,Tt(f)))))),{coordinates:h,visibleArea:f}}function T0(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=Z({},i),h=Z({},r),p=Yt(ve(Z({left:0,top:0},l)),u);return(f=Z(Z({},Lt({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Yt(ve(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,h=ht(h,si(h,o({visibleArea:h,type:"resize"}))),{coordinates:f=qe(f,a),visibleArea:h=qe(h=ot(h,Un(ve(f),ve(i))),o({visibleArea:h,type:"move"}))}}function M0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=Z({},s),u=Z({},a),f=o.horizontal!==t.horizontal,h=o.vertical!==t.vertical;if(f||h){var p=Yt({left:c.width/2,top:c.height/2},-i),k=Yt(ve(l),-i),C=Yt({left:f?p.left-(k.left-p.left):k.left,top:h?p.top-(k.top-p.top):k.top},i);l=ot(l,Un(C,ve(l))),k=Yt(ve(u),-i),u=qe(u=ot(u,Un(C=Yt({left:f?p.left-(k.left-p.left):k.left,top:h?p.top-(k.top-p.top):k.top},i),ve(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function dl(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=Z({},t),u=Mt(o,l).width,f=Mt(o,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(o.width-s.minWidth)/(l.left/l.right),l.right=-(o.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(o.width-s.minWidth):l.right<0&&(l.right=-(o.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(o.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(o.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(o.height-s.minHeight):l.bottom<0&&(l.bottom=-(o.height-s.minHeight)));var h=wo(Mt(o,l),r);c&&(h.left&&h.left>0&&h.right===0?(l.right+=h.left,l.left-=h.left):h.right&&h.right>0&&h.left===0&&(l.left+=h.right,l.right-=h.right),h.top&&h.top>0&&h.bottom===0?(l.bottom+=h.top,l.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(l.top+=h.bottom,l.bottom-=h.bottom),h=wo(Mt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if($t.forEach(function(N){var E=h[N];E&&l[N]&&(p[N]=Math.max(0,1-E/l[N]))}),a){var k=Math.min.apply(null,$t.map(function(N){return p[N]}));k!==1/0&&$t.forEach(function(N){l[N]*=k})}else $t.forEach(function(N){p[N]!==1/0&&(l[N]*=p[N])});if(u=Mt(o,l).width,f=Mt(o,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var C=Math.min(p.width,p.height);C!==1/0&&$t.forEach(function(N){l[N]*=C})}else p.width!==1/0&&p0.forEach(function(N){l[N]*=p.width}),p.height!==1/0&&g0.forEach(function(N){l[N]*=p.height});return l}function ci(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var P0=Ct("vue-simple-handler"),I0=Ct("vue-simple-handler-wrapper"),Rr={name:"SimpleHandler",components:{HandlerWrapper:tl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var n,t=(mt(n={},this.horizontalPosition,!!this.horizontalPosition),mt(n,this.verticalPosition,!!this.verticalPosition),mt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),mt(n,"hover",this.hover),n);return{default:Ie(P0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(I0(t),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Rr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":o.verticalPosition,"horizontal-position":o.horizontalPosition,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var R0=Ct("vue-simple-line"),A0=Ct("vue-simple-line-wrapper"),Ar={name:"SimpleLine",components:{LineWrapper:nl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Ie(R0(mt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ie(A0(mt({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ar.render=function(n,t,o,i,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:o.position,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var zr=Ct("vue-bounding-box"),z0=["east","west",null],D0=["south","north",null],ul={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Rr}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Ar}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return z0.forEach(function(t){D0.forEach(function(o){if(t!==o){var i=Ya(t,o),r=i.name,s=i.classname;n.push({name:r,classname:s,verticalDirection:o,horizontalDirection:t})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,t=this.handlersWrappersClasses,o=this.linesClasses,i=this.linesWrappersClasses;return{root:zr(),handlers:n,handlersWrappers:t,lines:o,linesWrappers:i}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(o){o.horizontalDirection&&o.verticalDirection||!n.lines[o.name]||t.push({name:o.name,component:n.linesComponent,class:Ie(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Ie(n.classes.linesWrappers.default,n.classes.linesWrappers[o.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],o=this.width,i=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Ie(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Ie(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(o&&i){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?o:a==="west"?0:o/2,u=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=zr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=zr("handler",mt({},r.classname,!0));t.push(s)}}),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(n,t,o){var i,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),o==="north"?c.top-=a:o==="south"&&(c.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new f0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:o==="south"||!o,top:o==="north"||!o},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};ul.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var F0=Ct("vue-draggable-area"),fl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:F0()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(n){if(n.cancelable){var t=this.movable&&n.touches.length===1;t&&(this.touches=wn(n.touches)),(this.touchStarted||t)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):el({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top;this.anchor={x:n.clientX-o,y:n.clientY-i}},processMove:function(n,t){var o=wn(t);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,s=i.top;this.touches.length===1&&o.length===1&&this.$emit("move",new Vr({left:o[0].clientX-(r+this.anchor.x),top:o[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};fl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Dr(n){var t,o;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((o=n==null?void 0:n.flip)===null||o===void 0?void 0:o.vertical)||!1}}}function O0(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,h=new ArrayBuffer(f),p=new Uint8Array(h),k=0;k<f;k++)p[k]=u.charCodeAt(k);return h}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(l){t(l.target.result)},s=n,a=function(l){i.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):o("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else o("Error: the image is empty")}catch(l){o(l)}var s,a,c})}function ml(n){var t=n.rotate,o=n.flip,i=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+i*(o.horizontal?-1:1)+") ",s+=" scaleY("+r*(o.vertical?-1:1)+") "}function L0(n){try{var t,o=new DataView(n),i=void 0,r=void 0,s=void 0,a=void 0;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(var c=o.byteLength,l=2;l+1<c;){if(o.getUint8(l)===255&&o.getUint8(l+1)===225){s=l;break}l++}if(s&&(i=s+10,function(k,C,N){var E,y="";for(E=C,N+=C;E<N;E++)y+=String.fromCharCode(k.getUint8(E));return y}(o,s+4,4)==="Exif")){var u=o.getUint16(i);if(((r=u===18761)||u===19789)&&o.getUint16(i+2,r)===42){var f=o.getUint32(i+4,r);f>=8&&(a=i+f)}}if(a){for(var h=o.getUint16(a,r),p=0;p<h;p++)if(l=a+12*p+2,o.getUint16(l,r)===274){l+=8,t=o.getUint16(l,r),o.setUint16(l,1,r);break}}return t}catch{return null}}function hl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-i)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=el({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var pl={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Br(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new yo({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var o=hl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new yo({left:i.centerMass.left-o.centerMass.left,top:i.centerMass.top-o.centerMass.top},{factor:i.spread/o.spread,center:o.centerMass})),this.oldGeometricProperties=o}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var t=this.$refs.container,o=t.getBoundingClientRect(),i=o.left,r=o.top,s=o.bottom,a=o.right;this.touches=wn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=hl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var o=wn(n.touches).filter(function(i){return!i.identifier||t.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(n)&&(this.processMove(n,o),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||Ka(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new yo({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};pl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Fr={components:{TransformableImage:pl},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Fr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":o.touchMove,"touch-resize":o.touchResize,"mouse-move":o.mouseMove,"wheel-resize":o.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var di=Ct("vue-preview"),gl={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:di({fill:this.fill}),wrapper:di("wrapper"),imageWrapper:di("image-wrapper"),image:Ie(di("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,t=le(le({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),o=this.imageSize.width,i=this.imageSize.height,r=sl({width:o,height:i},t.rotate),s={width:"".concat(o,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},a={rotate:{left:(o-r.width)*t.scaleX/2,top:(i-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*o/2,top:(1-t.scaleY)*i/2}};return s.transform=`translate(
44
+ `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+ml(t),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};gl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:o.image&&o.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,o.image&&o.image.src]])],6)],6)};var yl={components:{Preview:gl},inheritAttrs:!1};yl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Or=Ct("vue-rectangle-stencil"),wl={name:"RectangleStencil",components:{StencilPreview:yl,BoundingBox:ul,DraggableArea:fl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Rr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Ar}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Ie(Or({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ie(Or("preview"),this.previewClass),boundingBox:Ie(Or("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,o=n.width,i=n.left,r=n.top,s={width:"".concat(o,"px"),height:"".concat(t,"px"),transform:"translate(".concat(i,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};wl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,transitions:o.transitions,class:s.classes.boundingBox,handlers:o.handlers,"handlers-component":o.handlersComponent,"handlers-classes":o.handlersClasses,"handlers-wrappers-classes":o.handlersWrappersClasses,lines:o.lines,"lines-component":o.linesComponent,"lines-classes":o.linesClasses,"lines-wrappers-classes":o.linesWrappersClasses,resizable:o.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:o.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:o.image,coordinates:o.coordinates,width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,class:s.classes.preview,transitions:o.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var _0=["transitions"],_t=Ct("vue-advanced-cropper"),bl={name:"Cropper",components:{BackgroundWrapper:Fr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return wl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Fr}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(n){return w0.indexOf(n)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(n){return!(typeof n=="string"&&n!=="fill"&&n!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(n){var t=n.event,o=n.coordinates,i=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=Z(Z({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=Z({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),$t.forEach(function($){u[$]||(l[$]=0)});var f=Mt(a,l=dl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,h=Mt(a,l).height,p=c.preserveRatio?ce(a):Mr(f/h,i);if(p){var k=c.respectDirection;if(k||(k=a.width>=a.height||p===1?"width":"height"),k==="width"){var C=f/p-a.height;if(u.top&&u.bottom){var N=l.top,E=l.bottom;l.bottom=ci(C,E,N),l.top=ci(C,N,E)}else u.bottom?l.bottom=C:u.top?l.top=C:u.right?l.right=0:u.left&&(l.left=0)}else if(k==="height"){var y=a.width-h*p;if(u.left&&u.right){var M=l.left,b=l.right;l.left=-ci(y,M,b),l.right=-ci(y,b,M)}else u.left?l.left=-y:u.right?l.right=-y:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=dl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Mt(a,l).width,h=Mt(a,l).height,(p=c.preserveRatio?ce(a):Mr(f/h,i))&&Math.abs(p-f/h)>.001&&$t.forEach(function($){u[$]||(l[$]=0)}),Ir({event:new Vr({left:-l.left,top:-l.top}),coordinates:{width:o.width+l.right+l.left,height:o.height+l.top+l.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ce(o);t.style.width=o.width+"px",t.style.height=t.clientWidth/i+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,o=n.coordinates,i=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=Z(Z({},o),Lt({width:o.width,height:o.height,aspectRatio:i,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=qe(a=ot(a,Un(ve(o),ve(a))),ai(Tt(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=Z({},t);s.height=s.width/ce(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ht(s,Math.max(r.height/s.height,r.width/s.width)));var a=ri(qn(r,Tt(s=ht(s,si(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=qe(s=ot(s,a),i({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ce(o)>ce(i)?(a={top:0,bottom:i.height},t&&s==="move"&&(t.width>i.width?(a.left=-(t.width-i.width)/2,a.right=i.width-a.left):(a.left=0,a.right=i.width))):(a={left:0,right:i.width},t&&s==="move"&&(t.height>i.height?(a.top=-(t.height-i.height)/2,a.bottom=i.height-a.top):(a.top=0,a.bottom=i.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,o={};return n.imageRestriction!=="none"&&(o={left:0,top:0,right:t.width,bottom:t.height}),o}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:le({},ol)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var n=function(t){return t*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=Nr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Nr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ze(this.minWidth)?0:ii(this.minWidth),minHeight:ze(this.minHeight)?0:ii(this.minHeight),maxWidth:ze(this.maxWidth)?1/0:ii(this.maxWidth),maxHeight:ze(this.maxHeight)?1/0:ii(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=Z(Z({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Pr(r),f=rl(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),o=Pr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,o.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,o.height*t.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:_t(),image:Ie(_t("image"),this.imageClass),stencil:_t("stencil"),boundaries:Ie(_t("boundaries"),this.boundariesClass),stretcher:Ie(_t("stretcher")),background:Ie(_t("background"),this.backgroundClass),foreground:Ie(_t("foreground"),this.foregroundClass),imageWrapper:Ie(_t("image-wrapper")),cropperWrapper:Ie(_t("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,o=n.height,i=n.left,r=n.top;return{width:t/this.coefficient,height:o/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},o={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},i=le(le({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-o.left-this.imageTransforms.translateX,"px, ").concat(-t.top-o.top-this.imageTransforms.translateY,"px)")+ml(i)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(o){return n[o]!==t[o]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Br(this.update,this.debounce),this.debouncedDisableTransitions=Br(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var n=this.initialized?this.prepareResult(le({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:le({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?le({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new yo({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new yo({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.autoZoom,r=i===void 0||i,s=o.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var o=t.coordinates,i=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(o.width),height:Math.round(o.height),left:Math.round(o.left),top:Math.round(o.top)};return s.width>i.maxWidth?s.width=Math.floor(o.width):s.width<i.minWidth&&(s.width=Math.ceil(o.width)),s.height>i.maxHeight?s.height=Math.floor(o.height):s.height<i.minHeight&&(s.height=Math.ceil(o.height)),qe(s,r)}(le(le({},this.getPublicProperties()),{},{positionRestrictions:li(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?S0:this.autoZoom?k0:x0);var s=r({event:{type:n,params:i},visibleArea:t,coordinates:o,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return le(le({},s),{},{changed:!il(s.visibleArea,t)||!il(s.coordinates,o)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o!==void 0&&o,r=d0(t,_0),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;i&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return Z(Z({},o),{move:{left:o.move&&o.move.left?r*o.move.left:0,top:o.move&&o.move.top?r*o.move.top:0},scale:{factor:o.scale&&o.scale.factor?o.scale.factor:1,center:o.scale&&o.scale.center?{left:o.scale.center.left*r+i.left,top:o.scale.center.top*r+i.top}:null}});if(o.type==="resize"){var s=Z(Z({},o),{directions:Z({},o.directions)});return $t.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=Z(Z({},o),{directions:Z({},o.directions)});return y0.forEach(function(c){a.directions[c]*=r}),a}return o}(le(le({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,o=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,h=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},k=sl(p,f),C=c.getContext("2d");c.height=k.height,c.width=k.width,C.save();var N=Yt(ve(Z({left:0,top:0},p)),f);return C.translate(-(N.left-k.width/2),-(N.top-k.height/2)),C.rotate(f*Math.PI/180),C.translate(h.horizontal?p.width:0,h.vertical?p.height:0),C.scale(h.horizontal?-1:1,h.vertical?-1:1),C.drawImage(l,0,0,p.width,p.height),C.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=le({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Lt({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(i.maxArea&&s.width*s.height>i.maxArea){var a=Math.sqrt(i.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,h){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),h&&(h.imageSmoothingEnabled&&(p.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(p.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(p.fillStyle=h.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var k=u.left<0?-u.left:0,C=u.top<0?-u.top:0;p.drawImage(l,u.left+k,u.top+C,u.width,u.height,k*(c.width/u.width),C*(c.height/u.height),c.width,c.height)}(n,o,this.coordinates,s,i),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=this.visibleArea&&t?b0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?li(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return C0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:o,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?N0:B0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=Hn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||E0,s=[i,function(a){var c=a.coordinates;return le({},Hn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,wn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var t=n.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,t=this.$refs.stretcher,o=this.$refs.cropper;return this.initStretcher({cropper:o,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:o,imageSize:n.imageSize};if(Hn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(i):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(i),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=le(le({},this.defaultImageTransforms),{},{flip:le({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,c=n.defaultVisibleArea||V0;n.visibleArea=Hn(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=Z({},o),a=ce(i),s.width/s.height!==a&&(s.height=s.width/a),qe(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Za(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var o=ze(this.crossOrigin)?this.canvas:this.crossOrigin;o===!0&&(o="anonymous"),this.imageAttributes.crossOrigin=o||null}if(this.checkOrientation){var i=(n=this.src,new Promise(function(r){O0(n).then(function(s){var a=L0(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){i.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,o=n.source,i=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?Xa(o)||!Za(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,Hn(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms()):oi(this.defaultTransforms)?this.appliedImageTransforms=Dr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Dr({});if(s)switch(s){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(r),this.defaultImageTransforms=le(le({},this.appliedImageTransforms),{},{flip:le({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:li(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var o=t.sizeRestrictions,i=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(le(le({},t.getPublicProperties()),{},{positionRestrictions:li(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(o.maxWidth,t.visibleArea.width),maxHeight:Math.min(o.maxHeight,t.visibleArea.height),minWidth:Math.max(o.minWidth,i),minHeight:Math.max(o.minHeight,i)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var o=t.transitions,i=o!==void 0&&o,r=t.normalize,s=r===void 0||r;i&&this.enableTransitions();var a=$0(le(le({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,o=n.type,i=o===void 0?"move":o;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:i})},getAspectRatio:function(n){var t,o,i=this.stencilProps,r=i.aspectRatio,s=i.minAspectRatio,a=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,o=c.maximum}if(ze(t)&&(t=ze(r)?s:r),ze(o)&&(o=ze(r)?a:r),!n&&(ze(t)||ze(o))){var l=this.getStencilSize(),u=l?ce(l):null;ze(t)&&(t=Ja(u)?u:void 0),ze(o)&&(o=Ja(u)?u:void 0)}return{minimum:t,maximum:o}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=n.boundaries,o=n.stencilSize,i=n.aspectRatio,Mr(ce(r=Hn(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Lt({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ce(r),maximum:ce(r)}})),r;var n,t,o,i,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return le({},ol)},flip:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var s=le({},this.imageTransforms.flip),a=M0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o===void 0||o;if(!this.transitionsActive){i&&this.enableTransitions();var r=le({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=T0({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},H0={key:0,ref:"canvas",style:{display:"none"}},U0={key:1,ref:"sourceCanvas",style:{display:"none"}};bl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},o.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),o.canvas?(e.openBlock(),e.createBlock("canvas",H0,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",U0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const v0={width:0,height:0,left:0,top:0};class Lr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",v0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Lr;return r.src=t,r.ratio=o,r.id=i,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const q0={class:"cropper-wrapper"},j0={class:"row justify-end q-mt-md"},W0=D(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.ratio),s=e.ref(Lr.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var p;i("crop",{blob:h,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(e.openBlock(),e.createElementBlock("div",q0,[e.createVNode(go,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=p=>r.value=p),h[1]||(h[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(bl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[2]||(h[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",j0,[e.createVNode(oe,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),G0={class:"uploader-content"},Q0={class:"uploader-icon"},Y0={class:"tools-button absolute-full column items-center justify-center"},X0={class:"row q-gutter-sm"},Z0=D(e.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:t}){const o=x.ClosePopup,i=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var b;const M=(b=a.value)==null?void 0:b.querySelector(".q-uploader__input");M&&!M.getAttribute("aria-label")&&M.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),h=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),k=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),C=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},N=M=>{M.blob.src=M.src,i.fileInfo.setFile&&i.fileInfo.setFile(M.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},E=M=>{h.value=M.url,l.value=!0},y=M=>{if(M.length===0)return;const b=M[0];b.url=URL.createObjectURL(b),s.value=b,i.fileInfo.setFile&&i.fileInfo.setFile(b),i.withCrop&&E(s.value)};return e.watch(f,M=>{r("update:ratio",M)}),e.watch(()=>[i.fileInfo.description,i.fileInfo.order,i.fileInfo.fileSystemPath],()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),(M,b)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(x.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",Y0,[e.createElementVNode("div",X0,[e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:b[0]||(b[0]=$=>E(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...b[5]||(b[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:C},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...b[6]||(b[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(x.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(k)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:y,onRemoved:C},{header:e.withCtx(()=>[e.createElementVNode("div",G0,[e.createVNode(e.unref(x.QUploaderAddTrigger)),e.createElementVNode("div",Q0,[e.createVNode(e.unref(x.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),b[4]||(b[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(dn,{modelValue:e.unref(l),"onUpdate:modelValue":b[3]||(b[3]=$=>e.isRef(l)?l.value=$:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.QSpace)),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(x.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(W0,{ratio:e.unref(f),"onUpdate:ratio":b[1]||(b[1]=$=>e.isRef(f)?f.value=$:null),src:e.unref(h),onCrop:N,onClose:b[2]||(b[2]=$=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function J0(n){n.component("PMenuTabs",t0),n.component("PUploaderFile",c0),n.component("PUploaderImage",Z0),n.component("PAuthForm",Wa),n.component("PAuthModal",Ky)}const K0={install:function(n){$g(n),Zy(n),ay(n),J0(n),W1(n)}};function ew(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(x.Quasar,{plugins:{Notify:x.Notify,Dialog:x.Dialog}}),K0.install(n),Ia(n),ca(n),Pa(n)}class tw extends Eo{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new Zr);d(this,"method",En.Login);d(this,"id","field-auth-login")}}const nw=["PF","PFM"];L.AuthButtonLogin=bi,L.AuthButtonRefresh=Yr,L.AuthButtonRegister=Ci,L.AuthButtonRestore=xo,L.AuthChunks=Le,L.AuthFieldsIds=zt,L.AuthFormSettings=Kr,L.AuthMethods=En,L.EmailField=Bo,L.LoginField=tw,L.PAddDialog=Ua,L.PBadge=lo,L.PButton=oe,L.PCard=va,L.PCheckBox=Ra,L.PChip=ur,L.PContactForm=Ki,L.PContactFormDeleteDialog=co,L.PContactFormEdit=er,L.PContactFormEditDialog=uo,L.PContactFormEditEmails=tr,L.PContactFormEditPhones=nr,L.PContactFormView=or,L.PContactFormViewEmails=un,L.PContactFormViewPhones=fn,L.PCrudList=qa,L.PDateInput=ti,L.PDateTimeInput=Aa,L.PDialog=dn,L.PEditDialog=_n,L.PF=z,L.PFM=ig,L.PHint=kr,L.PInput=et,L.POptionsListSingle=Jo,L.POpts=za,L.PSelect=go,L.PTable=br,L.PTableBadge=fr,L.PTableBadges=mr,L.PTableCount=hr,L.PTableEdit=pr,L.PTableNumber=gr,L.PTableSelect=yr,L.PTableString=wr,L.PTableToggle=Da,L.PTabs=Cr,L.PTabsLeft=Sr,L.PToggle=Fa,L.PasswordField=No,L.PasswordRepeatField=Jr,L.Schedule=mo,L.ScheduleDay=Zo,L.ScheduleDefaultLabels=dr,L.ScheduleGridEditor=Ta,L.SchedulePlace=On,L.ScheduleSession=Fn,L.ScheduleSlot=Ot,L.ScheduleTimeline=Ma,L.TabsStore=Ko,L.defaultContactsLabels=Vt,L.installSprof=ew,L.pfName=nw,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});