sprof 0.5.4 → 0.6.4

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(O,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],b):(O=typeof globalThis<"u"?globalThis:O||self,b(O.sprof={},O.Quasar,O.Vue,O.draggable,O.VueRouter))})(this,function(O,b,e,Si,ic){"use strict";var Fw=Object.defineProperty;var Ow=(O,b,e)=>b in O?Fw(O,b,{enumerable:!0,configurable:!0,writable:!0,value:e}):O[b]=e;var d=(O,b,e)=>Ow(O,typeof b!="symbol"?b+"":b,e);var Lt,_t,Je,Gn,re,at,Yt;var En=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),pe=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(pe||{});class on{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",pe.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 on(t,o,pe.Primary,i)}static Success(t,o,i){return new on(t,o,pe.Success,i)}static Warning(t,o,i){return new on(t,o,pe.Warning,i)}static Error(t,o,i){return new on(t,o,pe.Error,i)}}class Bo extends on{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Fe.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let ki=class extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Fe.Login)}};class ns extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Fe.Refresh)}}class xi extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Fe.Register)}}class Vo extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Fe.Restore)}}class os{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 At=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(At||{});class No extends os{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===At.Password||this.id===At.PasswordRepeat}}var Bn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(Bn||{});const rc=/\S+@\S+\.\S+/;class is{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),rc.test(t)||this.errors.push("Некорректный email"),this.errors}}let sc=class extends No{constructor(){super(...arguments);d(this,"id",At.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new is);d(this,"method",Bn.Email)}};const $o=new sc;class ac{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 lc=class extends No{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new ac);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",At.Password)}};const To=new lc;let cc=class extends No{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",At.PasswordRepeat)}};const rs=new cc,ss={allowRestore:!1,[Fe.Login]:{methods:[Bn.Email],title:"Вход в систему",action:"login",buttons:[new ki,new xi,new Vo],fields:[$o,To],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new xi,new ki,new Vo],fields:[$o,To,rs],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Vo],fields:[$o]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new ns],fields:[To]}};class dc{constructor(){d(this,"block",!1);d(this,"settings",ss);d(this,"chunk",Fe.Login);d(this,"selectedMethod",Bn.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(At.Password),o=this.GetField(At.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===Fe.Login}get IsRegister(){return this.chunk===Fe.Register}get IsRestore(){return this.chunk===Fe.Restore}get IsRefresh(){return this.chunk===Fe.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(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class fc{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 Vn{constructor(){d(this,"type",pe.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case pe.Success:return"positive";case pe.Warning:return"warning";case pe.Error:return"negative";case pe.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 Vn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,pe.Info)}Success(t){this.showMessage(t,pe.Success)}Error(t){this.showMessage(t,pe.Error)}Warning(t){this.showMessage(t,pe.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 Ei{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 as=1e3,ls=60*as,Bi=60*ls;var Zn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Zn||{});const Po={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 as*t}static M(t){return ls*t}static H(t){return Bi*t}static D(t){return Bi*t}static W(t){return Bi*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 Ei.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 Ei.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const uc="top";class mc extends Vn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof b.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;b.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Vn.ContainsHtml(this.text),position:uc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",pe.Warning)}Save(){this.showMessage("Изменения успешно сохранены",pe.Success)}}const Nn=new mc;class Ct{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 ct=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ct||{});class hc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return Ct.Get(ct.AccessToken)}getRefreshToken(){return Ct.Get(ct.RefreshToken)}setAccessToken(t){Ct.Set(ct.AccessToken,t)}setRefreshToken(t){Ct.Set(ct.RefreshToken,t)}reset(){Ct.Remove(ct.AccessToken),Ct.Remove(ct.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class pc{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),Ct.Set(ct.User,this.user))}reset(){this.user=void 0,Ct.Remove(ct.User)}actualize(){const t=Ct.Get(ct.User);t&&this.set(t)}}class gc{constructor(){d(this,"isAuth",!1);d(this,"user",new pc);d(this,"tokens",new hc);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 yc=(Lt=class{constructor(){d(this,"form",e.reactive(new dc));d(this,"status",e.reactive(new gc));d(this,"modal",e.reactive(new fc));if(Lt.instance)return Lt.instance;Lt.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(Lt,"instance"),Lt);const Oe=new yc;var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(O,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],C):(O=typeof globalThis<"u"?globalThis:O||self,C(O.sprof={},O.Quasar,O.Vue,O.draggable,O.VueRouter))})(this,function(O,C,e,ki,sc){"use strict";var qw=Object.defineProperty;var jw=(O,C,e)=>C in O?qw(O,C,{enumerable:!0,configurable:!0,writable:!0,value:e}):O[C]=e;var d=(O,C,e)=>jw(O,typeof C!="symbol"?C+"":C,e);var _t,Ut,Ke,Qn,oe,lt,Xt;var Bn=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),pe=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(pe||{});class rn{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",pe.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 rn(t,o,pe.Primary,i)}static Success(t,o,i){return new rn(t,o,pe.Success,i)}static Warning(t,o,i){return new rn(t,o,pe.Warning,i)}static Error(t,o,i){return new rn(t,o,pe.Error,i)}}class Bo extends rn{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Fe.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let xi=class extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Fe.Login)}};class os extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Fe.Refresh)}}class Ei extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Fe.Register)}}class Vo extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Fe.Restore)}}class is{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 No extends is{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 Vn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(Vn||{});const ac=/\S+@\S+\.\S+/;class rs{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),ac.test(t)||this.errors.push("Некорректный email"),this.errors}}let lc=class extends No{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new rs);d(this,"method",Vn.Email)}};const $o=new lc;class cc{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 dc=class extends No{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new cc);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const To=new dc;let uc=class extends No{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const ss=new uc,as={allowRestore:!1,[Fe.Login]:{methods:[Vn.Email],title:"Вход в систему",action:"login",buttons:[new xi,new Ei,new Vo],fields:[$o,To],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Ei,new xi,new Vo],fields:[$o,To,ss],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Vo],fields:[$o]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new os],fields:[To]}};class fc{constructor(){d(this,"block",!1);d(this,"settings",as);d(this,"chunk",Fe.Login);d(this,"selectedMethod",Vn.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===Fe.Login}get IsRegister(){return this.chunk===Fe.Register}get IsRestore(){return this.chunk===Fe.Restore}get IsRefresh(){return this.chunk===Fe.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(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class mc{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 Nn{constructor(){d(this,"type",pe.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case pe.Success:return"positive";case pe.Warning:return"warning";case pe.Error:return"negative";case pe.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 Nn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,pe.Info)}Success(t){this.showMessage(t,pe.Success)}Error(t){this.showMessage(t,pe.Error)}Warning(t){this.showMessage(t,pe.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 Bi{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 ls=1e3,cs=60*ls,Vi=60*cs;var Jn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Jn||{});const Po={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class re{static S(t){return ls*t}static M(t){return cs*t}static H(t){return Vi*t}static D(t){return Vi*t}static W(t){return Vi*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=re.SplitHM(t);return o.length>1?re.HtoM(o[0])+o[1]:re.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=re.SplitHM(t);return re.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=re.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 re.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${re.NormalizeTime(o)}`}static DiffM(t,o){return re.Gt(o,t)?re.HMtoM(o)-re.HMtoM(t):re.HMtoM(t)-re.HMtoM(o)}static GetPeriod(t,o){return Bi.Get(t,o)}static Gt(t,o){return re.HMtoM(t)>re.HMtoM(o)}static GtOrEq(t,o){return re.Gt(t,o)||re.Eq(t,o)}static Eq(t,o){return re.HMtoM(t)===re.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return re.HMtoM(t)>=re.HMtoM(i)&&re.HMtoM(o)<=re.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return Bi.Intersects(re.HMtoM(t),re.HMtoM(o),re.HMtoM(i),re.HMtoM(r))}}const hc="top";class pc extends Nn{constructor(){super(...arguments);d(this,"duration",re.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof C.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;C.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Nn.ContainsHtml(this.text),position:hc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",pe.Warning)}Save(){this.showMessage("Изменения успешно сохранены",pe.Success)}}const jt=new pc;class St{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 dt=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(dt||{});class gc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return St.Get(dt.AccessToken)}getRefreshToken(){return St.Get(dt.RefreshToken)}setAccessToken(t){St.Set(dt.AccessToken,t)}setRefreshToken(t){St.Set(dt.RefreshToken,t)}reset(){St.Remove(dt.AccessToken),St.Remove(dt.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class yc{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),St.Set(dt.User,this.user))}reset(){this.user=void 0,St.Remove(dt.User)}actualize(){const t=St.Get(dt.User);t&&this.set(t)}}class wc{constructor(){d(this,"isAuth",!1);d(this,"user",new yc);d(this,"tokens",new gc);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){jt.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 bc=(_t=class{constructor(){d(this,"form",e.reactive(new fc));d(this,"status",e.reactive(new wc));d(this,"modal",e.reactive(new mc));if(_t.instance)return _t.instance;_t.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(_t,"instance"),_t);const Oe=new bc;var ds=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 ds;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof cs=="object"?cs: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,f){return function(u,m){Object.defineProperty(l,u,{configurable:!0,writable:!0,value:m}),f&&f(u,m)}}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,f=!c&&!l,u={create:c?function(){return en(Object.create(null))}:l?function(){return en({__proto__:null})}:function(){return en({})},has:f?function(B,P){return i.call(B,P)}:function(B,P){return P in B},get:f?function(B,P){return i.call(B,P)?B[P]:void 0}:function(B,P){return B[P]}},m=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Gr(),k=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Qr(),E=typeof WeakMap=="function"?WeakMap:Yr(),V=r?Symbol.for("@reflect-metadata:registry"):void 0,N=Wr(),S=xn(N);function T(B,P,I,L){if(W(I)){if(!st(B))throw new TypeError;if(!Zt(P))throw new TypeError;return Ke(B,P)}else{if(!st(B))throw new TypeError;if(!we(P))throw new TypeError;if(!we(L)&&!W(L)&&!Qe(L))throw new TypeError;return Qe(L)&&(L=void 0),I=rt(I),ht(B,P,I,L)}}t("decorate",T);function y(B,P){function I(L,Z){if(!we(L))throw new TypeError;if(!W(Z)&&!Ht(Z))throw new TypeError;Qn(B,P,L,Z)}return I}t("metadata",y);function C(B,P,I,L){if(!we(I))throw new TypeError;return W(L)||(L=rt(L)),Qn(B,P,I,L)}t("defineMetadata",C);function $(B,P,I){if(!we(P))throw new TypeError;return W(I)||(I=rt(I)),ye(B,P,I)}t("hasMetadata",$);function R(B,P,I){if(!we(P))throw new TypeError;return W(I)||(I=rt(I)),Se(B,P,I)}t("hasOwnMetadata",R);function j(B,P,I){if(!we(P))throw new TypeError;return W(I)||(I=rt(I)),bt(B,P,I)}t("getMetadata",j);function se(B,P,I){if(!we(P))throw new TypeError;return W(I)||(I=rt(I)),Xt(B,P,I)}t("getOwnMetadata",se);function ze(B,P){if(!we(B))throw new TypeError;return W(P)||(P=rt(P)),Cn(B,P)}t("getMetadataKeys",ze);function Te(B,P){if(!we(B))throw new TypeError;return W(P)||(P=rt(P)),it(B,P)}t("getOwnMetadataKeys",Te);function Ne(B,P,I){if(!we(P))throw new TypeError;if(W(I)||(I=rt(I)),!we(P))throw new TypeError;W(I)||(I=rt(I));var L=Kt(P,I,!1);return W(L)?!1:L.OrdinaryDeleteMetadata(B,P,I)}t("deleteMetadata",Ne);function Ke(B,P){for(var I=B.length-1;I>=0;--I){var L=B[I],Z=L(P);if(!W(Z)&&!Qe(Z)){if(!Zt(Z))throw new TypeError;P=Z}}return P}function ht(B,P,I,L){for(var Z=B.length-1;Z>=0;--Z){var ke=B[Z],be=ke(P,I,L);if(!W(be)&&!Qe(be)){if(!we(be))throw new TypeError;L=be}}return L}function ye(B,P,I){var L=Se(B,P,I);if(L)return!0;var Z=kn(P);return Qe(Z)?!1:ye(B,Z,I)}function Se(B,P,I){var L=Kt(P,I,!1);return W(L)?!1:Pt(L.OrdinaryHasOwnMetadata(B,P,I))}function bt(B,P,I){var L=Se(B,P,I);if(L)return Xt(B,P,I);var Z=kn(P);if(!Qe(Z))return bt(B,Z,I)}function Xt(B,P,I){var L=Kt(P,I,!1);if(!W(L))return L.OrdinaryGetOwnMetadata(B,P,I)}function Qn(B,P,I,L){var Z=Kt(I,L,!0);Z.OrdinaryDefineOwnMetadata(B,P,I,L)}function Cn(B,P){var I=it(B,P),L=kn(B);if(L===null)return I;var Z=Cn(L,P);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var ke=new k,be=[],te=0,H=I;te<H.length;te++){var U=H[te],v=ke.has(U);v||(ke.add(U),be.push(U))}for(var q=0,oe=Z;q<oe.length;q++){var U=oe[q],v=ke.has(U);v||(ke.add(U),be.push(U))}return be}function it(B,P){var I=Kt(B,P,!1);return I?I.OrdinaryOwnMetadataKeys(B,P):[]}function he(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 W(B){return B===void 0}function Qe(B){return B===null}function Tt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function ae(B,P){switch(he(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",L=ee(B,s);if(L!==void 0){var Z=L.call(B,I);if(we(Z))throw new TypeError;return Z}return ve(B)}function ve(B,P){var I,L;{var Z=B.toString;if(Ye(Z)){var L=Z.call(B);if(!we(L))return L}var I=B.valueOf;if(Ye(I)){var L=I.call(B);if(!we(L))return L}}throw new TypeError}function Pt(B){return!!B}function Sn(B){return""+B}function rt(B){var P=ae(B);return Tt(P)?P:Sn(P)}function st(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Ye(B){return typeof B=="function"}function Zt(B){return typeof B=="function"}function Ht(B){switch(he(B)){case 3:return!0;case 4:return!0;default:return!1}}function De(B,P){return B===P||B!==B&&P!==P}function ee(B,P){var I=B[P];if(I!=null){if(!Ye(I))throw new TypeError;return I}}function le(B){var P=ee(B,a);if(!Ye(P))throw new TypeError;var I=P.call(B);if(!we(I))throw new TypeError;return I}function lt(B){return B.value}function pt(B){var P=B.next();return P.done?!1:P}function Jt(B){var P=B.return;P&&P.call(B)}function kn(B){var P=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||P!==m)return P;var I=B.prototype,L=I&&Object.getPrototypeOf(I);if(L==null||L===Object.prototype)return P;var Z=L.constructor;return typeof Z!="function"||Z===B?P:Z}function Mt(){var B;!W(V)&&typeof o.Reflect<"u"&&!(V in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=gi(o.Reflect));var P,I,L,Z=new E,ke={registerProvider:be,getProvider:H,setProvider:v};return ke;function be(q){if(!Object.isExtensible(ke))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case W(P):P=q;break;case P===q:break;case W(I):I=q;break;case I===q:break;default:L===void 0&&(L=new k),L.add(q);break}}function te(q,oe){if(!W(P)){if(P.isProviderFor(q,oe))return P;if(!W(I)){if(I.isProviderFor(q,oe))return P;if(!W(L))for(var me=le(L);;){var xe=pt(me);if(!xe)return;var et=lt(xe);if(et.isProviderFor(q,oe))return Jt(me),et}}}if(!W(B)&&B.isProviderFor(q,oe))return B}function H(q,oe){var me=Z.get(q),xe;return W(me)||(xe=me.get(oe)),W(xe)&&(xe=te(q,oe),W(xe)||(W(me)&&(me=new p,Z.set(q,me)),me.set(oe,xe))),xe}function U(q){if(W(q))throw new TypeError;return P===q||I===q||!W(L)&&L.has(q)}function v(q,oe,me){if(!U(me))throw new Error("Metadata provider not registered.");var xe=H(q,oe);if(xe!==me){if(!W(xe))return!1;var et=Z.get(q);W(et)&&(et=new p,Z.set(q,et)),et.set(oe,me)}return!0}}function Wr(){var B;return!W(V)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[V]),W(B)&&(B=Mt()),!W(V)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,V,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function xn(B){var P=new E,I={isProviderFor:function(U,v){var q=P.get(U);return W(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:be,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:ke,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return N.registerProvider(I),I;function L(U,v,q){var oe=P.get(U),me=!1;if(W(oe)){if(!q)return;oe=new p,P.set(U,oe),me=!0}var xe=oe.get(v);if(W(xe)){if(!q)return;if(xe=new p,oe.set(v,xe),!B.setProvider(U,v,I))throw oe.delete(v),me&&P.delete(U),new Error("Wrong provider for target.")}return xe}function Z(U,v,q){var oe=L(v,q,!1);return W(oe)?!1:Pt(oe.has(U))}function ke(U,v,q){var oe=L(v,q,!1);if(!W(oe))return oe.get(U)}function be(U,v,q,oe){var me=L(q,oe,!0);me.set(U,v)}function te(U,v){var q=[],oe=L(U,v,!1);if(W(oe))return q;for(var me=oe.keys(),xe=le(me),et=0;;){var ko=pt(xe);if(!ko)return q.length=et,q;var Yn=lt(ko);try{q[et]=Yn}catch(Xr){try{Jt(xe)}finally{throw Xr}}et++}}function H(U,v,q){var oe=L(v,q,!1);if(W(oe)||!oe.delete(U))return!1;if(oe.size===0){var me=P.get(v);W(me)||(me.delete(q),me.size===0&&P.delete(me))}return!0}}function gi(B){var P=B.defineMetadata,I=B.hasOwnMetadata,L=B.getOwnMetadata,Z=B.getOwnMetadataKeys,ke=B.deleteMetadata,be=new E,te={isProviderFor:function(H,U){var v=be.get(H);return!W(v)&&v.has(U)?!0:Z(H,U).length?(W(v)&&(v=new k,be.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:P,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:ke};return te}function Kt(B,P,I){var L=N.getProvider(B,P);if(!W(L))return L;if(I){if(N.setProvider(B,P,S))return S;throw new Error("Illegal state.")}}function Gr(){var B={},P=[],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=P,this._values=P):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=P,this._values=P),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=P,this._values=P),{value:H,done:!0}},te}(),L=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--,De(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,Z)},te.prototype.values=function(){return new I(this._keys,this._values,ke)},te.prototype.entries=function(){return new I(this._keys,this._values,be)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!De(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(De(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 L;function Z(te,H){return te}function ke(te,H){return H}function be(te,H){return[te,H]}}function Qr(){var B=function(){function P(){this._map=new p}return Object.defineProperty(P.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),P.prototype.has=function(I){return this._map.has(I)},P.prototype.add=function(I){return this._map.set(I,I),this},P.prototype.delete=function(I){return this._map.delete(I)},P.prototype.clear=function(){this._map.clear()},P.prototype.keys=function(){return this._map.keys()},P.prototype.values=function(){return this._map.keys()},P.prototype.entries=function(){return this._map.entries()},P.prototype["@@iterator"]=function(){return this.keys()},P.prototype[a]=function(){return this.keys()},P}();return B}function Yr(){var B=16,P=u.create(),I=L();return function(){function H(){this._key=L()}return H.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?u.has(v,this._key):!1},H.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?u.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=L()},H}();function L(){var H;do H="@@WeakMap@@"+te();while(u.has(P,H));return P[H]=!0,H}function Z(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:u.create()})}return H[I]}function ke(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function be(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):ke(U,H),U}return ke(new Array(H),H)}function te(){var H=be(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 en(B){return B.__=void 0,delete B.__,B}})})(ds||(ds={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function wc(n,t=0){return(Le[n[t+0]]+Le[n[t+1]]+Le[n[t+2]]+Le[n[t+3]]+"-"+Le[n[t+4]]+Le[n[t+5]]+"-"+Le[n[t+6]]+Le[n[t+7]]+"-"+Le[n[t+8]]+Le[n[t+9]]+"-"+Le[n[t+10]]+Le[n[t+11]]+Le[n[t+12]]+Le[n[t+13]]+Le[n[t+14]]+Le[n[t+15]]).toLowerCase()}const bc=new Uint8Array(16);function Cc(){return crypto.getRandomValues(bc)}function vt(n,t,o){return crypto.randomUUID?crypto.randomUUID():Sc(n)}function Sc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??Cc();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,wc(i)}class Xe{static UUID(){return vt()}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 kc(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 Vi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),kc(n)}class Ee{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()),Vi(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():Ee.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=Ee.Translit(i),a=Ee.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ee.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ee.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(Ee.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ee.Translit(t);return[t,Ee.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ee.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 Qt=class Qt{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){Qt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Qt.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 Qt.BuildClass(i),i.id=Xe.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Qt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Qt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ee.TrimText)(t)}};d(Qt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let J=Qt,Jn=class Gl{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new Gl;return t.id=Xe.UUID(),t}};class Ni{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ee.BuildSafeUrl(t,o,i),this.staticUrl=Vi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Ni,"staticUrl","");class St{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);J.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Ni.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new St;return i.id=o??Xe.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Xe.UUID(),i}setFile(t){this.id||(this.id=Xe.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Xe.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:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.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 fs{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);J.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=Ee.Capitalize(this.name),this.surname=Ee.Capitalize(this.surname),this.patronymic=Ee.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 rn{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new rn;return t.id=Xe.UUID(),t}}class Mo{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}class Io{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");J.BuildClass(this,t)}static Create(){const t=new Io;return t.id=Xe.UUID(),t}}class $i{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}let xc=(_t=class{},d(_t,"Phone",rn),d(_t,"FileInfo",St),d(_t,"Website",$i),d(_t,"Email",Jn),d(_t,"Human",fs),d(_t,"PostAddress",Mo),d(_t,"UserAccount",Io),_t);var Be=(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))(Be||{});class Ro{constructor(t){d(this,"field","");d(this,"operator",Be.Eq);d(this,"value","");J.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Ro({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetween(){return this.operator===Be.Btw}isSet(){return this.operator===Be.In}}class Ti{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);J.BuildClass(this,t)}static Create(t){const o=new Ti;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=Ro.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let us=class Ql{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);J.BuildClass(this,t)}static Create(t){const o=new Ql;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Ro.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=Ti.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 zt{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 Re=(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))(Re||{}),Ec=Object.defineProperty,Bc=(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&&Ec(t,o,r),r};const ms=class Eo{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Be.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Re.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","");J.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Re.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Be.In?o&&zt.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===Re.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Re.String?this.value1===(t==null?void 0:t.value1):this.type===Re.Join&&this.set.length?zt.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===Re.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Re.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Re.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",f=this.type===Re.Number?`"number":${this.number}`:"",u=this.type===Re.Set||this.operator===Be.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Re.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,f,u,m].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===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetweenFilter(){return this.operator===Be.Btw}isSetFilter(){return this.operator===Be.In}static Create(t,o,i){const r=new Eo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Re.Number&&(r.value1="0"),r.type===Re.String&&(r.value1=""),r.type===Re.Boolean&&(r.value1="false",r.operator=Be.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const f=new Eo;return f.id=vt(),f.joinTable=i,f.joinTablePk=r,f.joinTableFk=s,f.col=o,f.type=a,c&&(f.joinTableId=c),l&&(f.joinTableIdCol=l),f}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new Eo;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Re.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new Eo;return i.id=vt(),i.model=Ee.ToCamelCase(t.GetClassName()),i.joinTableModel=Ee.ToCamelCase(o.GetClassName()),i.type=Re.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=Be.Eq;return}this.setDate2(o),this.operator=Be.Btw}};Bc([J.GetClassConstructor(String)],ms.prototype,"set");let Pi=ms;class Vc{constructor(){d(this,"operation",Be.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 Ao{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new Vc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");J.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.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=Be.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,J.BuildClass(this)}}var dt=(n=>(n.Asc="asc",n.Desc="desc",n))(dt||{});class zo{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);J.BuildClass(this,t)}static Create(t,o,i=dt.Asc,r,s){const a=new zo;return a.model=t.GetClassName(),a.col=o??"",a.order=i??dt.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===dt.Asc}isDesc(){return this.order===dt.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=dt.Asc}desc(){this.order=dt.Desc}}class Do{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new Do;return i.model=t.GetClassName(),i.cols=o,i}}var Nc=Object.defineProperty,Kn=(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&&Nc(t,o,r),r};const $n=(Je=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Ao);d(this,"t",new Do);J.BuildClass(this,t)}static Get(){return this.instance||(this.instance=Je.create()),this.instance}static create(){return e.reactive(new Je)}createFrom(t){const o=new Je(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new Je(this);return t.f=this.f.map(o=>Je.EmptyEntiries(o)),t.f2=this.f2.map(o=>Je.EmptyEntiries(o)),t.s=this.s.map(o=>Je.EmptyEntiries(o)),t.p=Je.EmptyEntiries(this.p),t.t=Je.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 zt.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));J.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Ao}resetF(){this.f=[]}},d(Je,"instance"),Je);Kn([J.GetClassConstructor(Pi)],$n.prototype,"f"),Kn([J.GetClassConstructor(us)],$n.prototype,"f2"),Kn([J.GetClassConstructor(zo)],$n.prototype,"s"),Kn([J.GetClassConstructor(Ao)],$n.prototype,"p"),Kn([J.GetClassConstructor(Do)],$n.prototype,"t");let kt=$n,$c=(Gn=class{},d(Gn,"SortModel",zo),d(Gn,"FilterModel",Pi),d(Gn,"FilterModelV2",us),d(Gn,"FTSP",kt),Gn);function hs(n,t){return function(){return n.apply(t,arguments)}}const{toString:Tc}=Object.prototype,{getPrototypeOf:Tn}=Object,{iterator:eo,toStringTag:ps}=Symbol,Fo=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),to=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Fo(o,t))return!0;o=Tn(o)}return!1},Pc=(n,t)=>n!=null&&to(n,t)?n[t]:void 0,Mi=(n=>t=>{const o=Tc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),gt=n=>(n=n.toLowerCase(),t=>Mi(t)===n),Oo=n=>t=>typeof t===n,{isArray:sn}=Array,Pn=Oo("undefined");function Mn(n){return n!==null&&!Pn(n)&&n.constructor!==null&&!Pn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const gs=gt("ArrayBuffer");function Mc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&gs(n.buffer),t}const Ic=Oo("string"),tt=Oo("function"),ys=Oo("number"),In=n=>n!==null&&typeof n=="object",Rc=n=>n===!0||n===!1,Lo=n=>{if(!In(n))return!1;const t=Tn(n);return(t===null||t===Object.prototype||Tn(t)===null)&&!to(n,ps)&&!to(n,eo)},Ac=n=>{if(!In(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},zc=gt("Date"),Dc=gt("File"),Fc=n=>!!(n&&typeof n.uri<"u"),Oc=n=>n&&typeof n.getParts<"u",Lc=gt("Blob"),_c=gt("FileList"),Hc=n=>In(n)&&tt(n.pipe);function Uc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ws=Uc(),bs=typeof ws.FormData<"u"?ws.FormData:void 0,vc=n=>{if(!n)return!1;if(bs&&n instanceof bs)return!0;const t=Tn(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const o=Mi(n);return o==="formdata"||o==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},qc=gt("URLSearchParams"),[jc,Wc,Gc,Qc]=["ReadableStream","Request","Response","Headers"].map(gt),Yc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),sn(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 Cs(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 an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ss=n=>!Pn(n)&&n!==an;function Ii(...n){const{caseless:t,skipUndefined:o}=Ss(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&Cs(i,a)||a,l=Fo(i,c)?i[c]:void 0;Lo(l)&&Lo(s)?i[c]=Ii(l,s):Lo(s)?i[c]=Ii({},s):sn(s)?i[c]=s.slice():(!o||!Pn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(no(c,r),typeof c!="object"||sn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let f=0;f<l.length;f++){const u=l[f];ad.call(c,u)&&r(c[u],u)}}return i}const Xc=(n,t,o,{allOwnKeys:i}={})=>(no(t,(r,s)=>{o&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:hs(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),Zc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Jc=(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)},Kc=(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&&Tn(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},ed=(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},td=n=>{if(!n)return null;if(sn(n))return n;let t=n.length;if(!ys(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},nd=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Tn(Uint8Array)),od=(n,t)=>{const i=(n&&n[eo]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},id=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},rd=gt("HTMLFormElement"),sd=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:ad}=Object.prototype,ld=gt("RegExp"),ks=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};no(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},cd=n=>{ks(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+"'")})}})},dd=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return sn(n)?i(n):i(String(n).split(t)),o},fd=()=>{},ud=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function md(n){return!!(n&&tt(n.append)&&n[ps]==="FormData"&&n[eo])}const hd=n=>{const t=new WeakSet,o=i=>{if(In(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=sn(i)?[]:{};return no(i,(s,a)=>{const c=o(s);!Pn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},pd=gt("AsyncFunction"),gd=n=>n&&(In(n)||tt(n))&&tt(n.then)&&tt(n.catch),xs=((n,t)=>n?setImmediate:t?((o,i)=>(an.addEventListener("message",({source:r,data:s})=>{r===an&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),an.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tt(an.postMessage)),yd=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||xs,Es=n=>n!=null&&tt(n[eo]),x={isArray:sn,isArrayBuffer:gs,isBuffer:Mn,isFormData:vc,isArrayBufferView:Mc,isString:Ic,isNumber:ys,isBoolean:Rc,isObject:In,isPlainObject:Lo,isEmptyObject:Ac,isReadableStream:jc,isRequest:Wc,isResponse:Gc,isHeaders:Qc,isUndefined:Pn,isDate:zc,isFile:Dc,isReactNativeBlob:Fc,isReactNative:Oc,isBlob:Lc,isRegExp:ld,isFunction:tt,isStream:Hc,isURLSearchParams:qc,isTypedArray:nd,isFileList:_c,forEach:no,merge:Ii,extend:Xc,trim:Yc,stripBOM:Zc,inherits:Jc,toFlatObject:Kc,kindOf:Mi,kindOfTest:gt,endsWith:ed,toArray:td,forEachEntry:od,matchAll:id,isHTMLForm:rd,hasOwnProperty:Fo,hasOwnProp:Fo,hasOwnInPrototypeChain:to,getSafeProp:Pc,reduceDescriptors:ks,freezeMethods:cd,toObjectSet:dd,toCamelCase:sd,noop:fd,toFiniteNumber:ud,findKey:Cs,global:an,isContextDefined:Ss,isSpecCompliantForm:md,toJSONObject:hd,isAsyncFn:pd,isThenable:gd,setImmediate:xs,asap:yd,isIterable:Es,isSafeIterable:n=>n!=null&&to(n,eo)&&Es(n)},wd=x.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"]),bd=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]&&wd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function Cd(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 Sd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),kd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ri(n,t){return x.isArray(n)?n.map(o=>Ri(o,t)):Cd(String(n).replace(t,""))}const xd=n=>Ri(n,Sd),Ed=n=>Ri(n,kd);function Bs(n){const t=Object.create(null);return x.forEach(n.toJSON(),(o,i)=>{t[i]=Ed(o)}),t}const Vs=Symbol("internals");function oo(n){return n&&String(n).trim().toLowerCase()}function _o(n){return n===!1||n==null?n:x.isArray(n)?n.map(_o):xd(String(n))}function Bd(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 Vd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ai(n,t,o,i,r){if(x.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!x.isString(t)){if(x.isString(i))return t.indexOf(i)!==-1;if(x.isRegExp(i))return i.test(t)}}function Nd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function $d(n,t){const o=x.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 qe=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,f){const u=oo(l);if(!u)return;const m=x.findKey(r,u);(!m||r[m]===void 0||f===!0||f===void 0&&r[m]!==!1)&&(r[m||l]=_o(c))}const a=(c,l)=>x.forEach(c,(f,u)=>s(f,u,l));if(x.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(x.isString(t)&&(t=t.trim())&&!Vd(t))a(bd(t),o);else if(x.isObject(t)&&x.isSafeIterable(t)){let c=Object.create(null),l,f;for(const u of t){if(!x.isArray(u))throw new TypeError("Object iterator must return a key-value pair");f=u[0],x.hasOwnProp(c,f)?(l=c[f],c[f]=x.isArray(l)?[...l,u[1]]:[l,u[1]]):c[f]=u[1]}a(c,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=oo(t),t){const i=x.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return Bd(r);if(x.isFunction(o))return o.call(this,r,i);if(x.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=oo(t),t){const i=x.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Ai(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=oo(a),a){const c=x.findKey(i,a);c&&(!o||Ai(i,i[c],c,o))&&(delete i[c],r=!0)}}return x.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||Ai(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return x.forEach(this,(r,s)=>{const a=x.findKey(i,s);if(a){o[a]=_o(r),delete o[s];return}const c=t?Nd(s):String(s).trim();c!==s&&delete o[s],o[c]=_o(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return x.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&x.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[Vs]=this[Vs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=oo(a);i[c]||($d(r,a),i[c]=!0)}return x.isArray(t)?t.forEach(s):s(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(qe.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),x.freezeMethods(qe);const Td="[REDACTED ****]";function Pd(n){if(x.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(x.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Md(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||x.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof qe&&(s=s.toJSON()),i.push(s);let a;if(x.isArray(s))a=[],s.forEach((c,l)=>{const f=r(c);x.isUndefined(f)||(a[l]=f)});else{if(!x.isPlainObject(s)&&Pd(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const f=o.has(c.toLowerCase())?Td:r(l);x.isUndefined(f)||(a[c]=f)}}return i.pop(),a};return r(n)}let _=class Yl extends Error{static from(t,o,i,r,s,a){const c=new Yl(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&&x.hasOwnProp(t,"redact")?t.redact:void 0,i=x.isArray(o)&&o.length>0?Md(t,o):x.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 Id=null,Ns=100;function zi(n){return x.isPlainObject(n)||x.isArray(n)}function $s(n){return x.endsWith(n,"[]")?n.slice(0,-2):n}function Di(n,t,o){return n?n.concat(t).map(function(r,s){return r=$s(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Rd(n){return x.isArray(n)&&!n.some(zi)}const Ad=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Ho(n,t,o){if(!x.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=x.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,y){return!x.isUndefined(y[T])});const i=o.metaTokens,r=o.visitor||E,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Ns:o.maxDepth,f=c&&x.isSpecCompliantForm(t),u=[];if(!x.isFunction(r))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(x.isDate(S))return S.toISOString();if(x.isBoolean(S))return S.toString();if(!f&&x.isBlob(S))throw new _("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(S)||x.isTypedArray(S)){if(f&&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 k(S,T){if(l===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function($,R){if(!x.isObject(R))return R;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(R),p(T+y.length-1),R})}function E(S,T,y){let C=S;if(x.isReactNative(t)&&x.isReactNativeBlob(S))return t.append(Di(y,T,s),m(S)),!1;if(S&&!y&&typeof S=="object"){if(x.endsWith(T,"{}"))T=i?T:T.slice(0,-2),S=k(S,1);else if(x.isArray(S)&&Rd(S)||(x.isFileList(S)||x.endsWith(T,"[]"))&&(C=x.toArray(S)))return T=$s(T),C.forEach(function(R,j){!(x.isUndefined(R)||R===null)&&t.append(a===!0?Di([T],j,s):a===null?T:T+"[]",m(R))}),!1}return zi(S)?!0:(t.append(Di(y,T,s),m(S)),!1)}const V=Object.assign(Ad,{defaultVisitor:E,convertValue:m,isVisitable:zi});function N(S,T,y=0){if(!x.isUndefined(S)){if(p(y),u.indexOf(S)!==-1)throw new Error("Circular reference detected in "+T.join("."));u.push(S),x.forEach(S,function($,R){(!(x.isUndefined($)||$===null)&&r.call(t,$,x.isString(R)?R.trim():R,T,V))===!0&&N($,T?T.concat(R):[R],y+1)}),u.pop()}}if(!x.isObject(n))throw new TypeError("data must be an object");return N(n),t}function Ts(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Fi(n,t){this._pairs=[],n&&Ho(n,this,t)}const Ps=Fi.prototype;Ps.append=function(t,o){this._pairs.push([t,o])},Ps.toString=function(t){const o=t?i=>t.call(this,i,Ts):Ts;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function zd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ms(n,t,o){if(!t)return n;n=n||"";const i=x.isFunction(o)?{serialize:o}:o,r=x.getSafeProp(i,"encode")||zd,s=x.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=x.isURLSearchParams(t)?t.toString():new Fi(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Is{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){x.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Oi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Dd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Fi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Li=typeof window<"u"&&typeof document<"u",_i=typeof navigator=="object"&&navigator||void 0,Fd=Li&&(!_i||["ReactNative","NativeScript","NS"].indexOf(_i.product)<0),Od=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ld=Li&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Li,hasStandardBrowserEnv:Fd,hasStandardBrowserWebWorkerEnv:Od,navigator:_i,origin:Ld},Symbol.toStringTag,{value:"Module"})),...Dd};function _d(n,t){return Ho(n,new _e.classes.URLSearchParams,{visitor:function(o,i,r,s){return _e.isNode&&x.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Rs=Ns;function As(n){if(n>Rs)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Rs,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Hd(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)As(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function Ud(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 zs(n){function t(o,i,r,s){As(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&x.isArray(r)?r.length:a,l?(x.hasOwnProp(r,a)?r[a]=x.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!x.hasOwnProp(r,a)||!x.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&x.isArray(r[a])&&(r[a]=Ud(r[a])),!c)}if(x.isFormData(n)&&x.isFunction(n.entries)){const o={};return x.forEachEntry(n,(i,r)=>{t(Hd(i),r,o,0)}),o}return null}const Rn=(n,t)=>n!=null&&x.hasOwnProp(n,t)?n[t]:void 0;function vd(n,t,o){if(x.isString(n))try{return(t||JSON.parse)(n),x.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const io={transitional:Oi,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=x.isObject(t);if(s&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return r?JSON.stringify(zs(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=Rn(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return _d(t,l).toString();if((c=x.isFileList(t))||i.indexOf("multipart/form-data")>-1){const f=Rn(this,"env"),u=f&&f.FormData;return Ho(c?{"files[]":t}:t,u&&new u,l)}}return s||r?(o.setContentType("application/json",!1),vd(t)):t}],transformResponse:[function(t){const o=Rn(this,"transitional")||io.transitional,i=o&&o.forcedJSONParsing,r=Rn(this,"responseType"),s=r==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,Rn(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,Rn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],n=>{io.headers[n]={}});function Hi(n,t){const o=this||io,i=t||o,r=qe.from(i.headers);let s=i.data;return x.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Ds(n){return!!(n&&n.__CANCEL__)}let ro=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Fs(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 qd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function jd(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 f=Date.now(),u=i[s];a||(a=f),o[r]=l,i[r]=f;let m=s,p=0;for(;m!==r;)p+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),f-a<t)return;const k=u&&f-u;return k?Math.round(p*1e3/k):void 0}}function Wd(n,t){let o=0,i=1e3/t,r,s;const a=(f,u=Date.now())=>{o=u,r=null,s&&(clearTimeout(s),s=null),n(...f)};return[(...f)=>{const u=Date.now(),m=u-o;m>=i?a(f,u):(r=f,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const Uo=(n,t,o=3)=>{let i=0;const r=jd(50,250);return Wd(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,f=Math.max(0,l-i),u=r(f);i=Math.max(i,l);const m={loaded:l,total:c,progress:c?l/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c?(c-l)/u:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(m)},o)},Os=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Ls=n=>(...t)=>x.asap(()=>n(...t)),Gd=_e.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,_e.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,Qd=_e.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];x.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),x.isString(i)&&c.push(`path=${i}`),x.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),x.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 Yd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Xd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Zd=/^https?:(?!\/\/)/i,Jd=/[\t\n\r]/g;function Kd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function ef(n){return Kd(n).replace(Jd,"")}function _s(n,t){if(typeof n=="string"&&Zd.test(ef(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function Hs(n,t,o,i){_s(t,i);let r=!Yd(t);return n&&(r||o===!1)?(_s(n,i),Xd(n,t)):t}const Us=n=>n instanceof qe?{...n}:n;function ln(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(u,m,p,k){return x.isPlainObject(u)&&x.isPlainObject(m)?x.merge.call({caseless:k},u,m):x.isPlainObject(m)?x.merge({},m):x.isArray(m)?m.slice():m}function r(u,m,p,k){if(x.isUndefined(m)){if(!x.isUndefined(u))return i(void 0,u,p,k)}else return i(u,m,p,k)}function s(u,m){if(!x.isUndefined(m))return i(void 0,m)}function a(u,m){if(x.isUndefined(m)){if(!x.isUndefined(u))return i(void 0,u)}else return i(void 0,m)}function c(u){const m=x.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!x.isUndefined(m))if(x.isPlainObject(m)){if(x.hasOwnProp(m,u))return m[u]}else return;const p=x.hasOwnProp(n,"transitional")?n.transitional:void 0;if(x.isPlainObject(p)&&x.hasOwnProp(p,u))return p[u]}function l(u,m,p){if(x.hasOwnProp(t,p))return i(u,m);if(x.hasOwnProp(n,p))return i(void 0,u)}const f={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:(u,m,p)=>r(Us(u),Us(m),p,!0)};return x.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const p=x.hasOwnProp(f,m)?f[m]:r,k=x.hasOwnProp(n,m)?n[m]:void 0,E=x.hasOwnProp(t,m)?t[m]:void 0,V=p(k,E,m);x.isUndefined(V)&&p!==l||(o[m]=V)}),x.hasOwnProp(t,"validateStatus")&&x.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const tf=["content-type","content-length"];function nf(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{tf.includes(i.toLowerCase())&&n.set(i,r)})}const of=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function vs(n){const t=ln({},n),o=p=>x.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"),f=o("baseURL"),u=o("allowAbsoluteUrls"),m=o("url");if(t.headers=c=qe.from(c),t.url=Ms(Hs(f,m,u,t),o("params"),o("paramsSerializer")),l){const p=x.getSafeProp(l,"username")||"",k=x.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(k?of(k):"")))}catch(E){throw _.from(E,_.ERR_BAD_OPTION_VALUE,n)}}if(x.isFormData(i)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||x.isReactNative(i)?c.setContentType(void 0):x.isFunction(i.getHeaders)&&nf(c,i.getHeaders(),o("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(x.isFunction(r)&&(r=r(t)),r===!0||r==null&&Gd(t.url))){const k=s&&a&&Qd.read(a);k&&c.set(s,k)}return t}const rf=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=vs(n);let s=r.data;const a=qe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=r,u,m,p,k,E;function V(){k&&k(),E&&E(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let N=new XMLHttpRequest;N.open(r.method.toUpperCase(),r.url,!0),N.timeout=r.timeout;function S(){if(!N)return;const y=qe.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),$={data:!c||c==="text"||c==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:y,config:n,request:N};Fs(function(j){o(j),V()},function(j){i(j),V()},$),N=null}"onloadend"in N?N.onloadend=S:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.startsWith("file:"))||setTimeout(S)},N.onabort=function(){N&&(i(new _("Request aborted",_.ECONNABORTED,n,N)),V(),N=null)},N.onerror=function(C){const $=C&&C.message?C.message:"Network Error",R=new _($,_.ERR_NETWORK,n,N);R.event=C||null,i(R),V(),N=null},N.ontimeout=function(){let C=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const $=r.transitional||Oi;r.timeoutErrorMessage&&(C=r.timeoutErrorMessage),i(new _(C,$.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,N)),V(),N=null},s===void 0&&a.setContentType(null),"setRequestHeader"in N&&x.forEach(Bs(a),function(C,$){N.setRequestHeader($,C)}),x.isUndefined(r.withCredentials)||(N.withCredentials=!!r.withCredentials),c&&c!=="json"&&(N.responseType=r.responseType),f&&([p,E]=Uo(f,!0),N.addEventListener("progress",p)),l&&N.upload&&([m,k]=Uo(l),N.upload.addEventListener("progress",m),N.upload.addEventListener("loadend",k)),(r.cancelToken||r.signal)&&(u=y=>{N&&(i(!y||y.type?new ro(null,n,N):y),N.abort(),V(),N=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const T=qd(r.url);if(T&&!_e.protocols.includes(T)){i(new _("Unsupported protocol "+T+":",_.ERR_BAD_REQUEST,n)),V();return}N.send(s||null)})},sf=(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 f=l instanceof Error?l:this.reason;o.abort(f instanceof _?f:new ro(f instanceof Error?f.message:f))}};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=()=>x.asap(a),c},af=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},lf=async function*(n,t){for await(const o of cf(n))yield*af(o,t)},cf=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()}},qs=(n,t,o,i)=>{const r=lf(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await r.next();if(f){c(),l.close();return}let m=u.byteLength;if(o){let p=s+=m;o(p)}l.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},vo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,df=(n,t,o)=>t+2<o&&vo(n.charCodeAt(t+1))&&vo(n.charCodeAt(t+2));function ff(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 E=i.charCodeAt(k+1),V=i.charCodeAt(k+2);vo(E)&&vo(V)&&(a-=2,k+=2)}let l=0,f=c-1;const u=k=>k>=2&&i.charCodeAt(k-2)===37&&i.charCodeAt(k-1)===51&&(i.charCodeAt(k)===68||i.charCodeAt(k)===100);f>=0&&(i.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(i.charCodeAt(f)===61||u(f))&&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&&df(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 f=i.charCodeAt(a+1);f>=56320&&f<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Ui="1.18.1",js=64*1024,{isFunction:qo}=x,uf=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Ws=n=>{if(!x.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Gs=(n,...t)=>{try{return!!n(...t)}catch{return!1}},mf=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},hf=n=>{const t=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=x.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?qo(r):typeof fetch=="function",l=qo(s),f=qo(a);if(!c)return!1;const u=c&&qo(o),m=c&&(typeof i=="function"?(S=>T=>S.encode(T))(new i):async S=>new Uint8Array(await new s(S).arrayBuffer())),p=l&&u&&Gs(()=>{let S=!1;const T=new s(_e.origin,{body:new o,method:"POST",get duplex(){return S=!0,"half"}}),y=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),S&&!y}),k=f&&u&&Gs(()=>x.isReadableStream(new a("").body)),E={stream:k&&(S=>S.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!E[S]&&(E[S]=(T,y)=>{let C=T&&T[S];if(C)return C.call(T);throw new _(`Response type '${S}' is not supported`,_.ERR_NOT_SUPPORT,y)})});const V=async S=>{if(S==null)return 0;if(x.isBlob(S))return S.size;if(x.isSpecCompliantForm(S))return(await new s(_e.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(x.isArrayBufferView(S)||x.isArrayBuffer(S))return S.byteLength;if(x.isURLSearchParams(S)&&(S=S+""),x.isString(S))return(await m(S)).byteLength},N=async(S,T)=>{const y=x.toFiniteNumber(S.getContentLength());return y??V(T)};return async S=>{let{url:T,method:y,data:C,signal:$,cancelToken:R,timeout:j,onDownloadProgress:se,onUploadProgress:ze,responseType:Te,headers:Ne,withCredentials:Ke="same-origin",fetchOptions:ht,maxContentLength:ye,maxBodyLength:Se}=vs(S);const bt=x.isNumber(ye)&&ye>-1,Xt=x.isNumber(Se)&&Se>-1,Qn=ae=>x.hasOwnProp(S,ae)?S[ae]:void 0;let Cn=r||fetch;Te=Te?(Te+"").toLowerCase():"text";let it=sf([$,R&&R.toAbortSignal()],j),he=null;const W=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let Qe,Tt=null;const we=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,S,he);try{let ae;const ve=Qn("auth");if(ve){const ee=x.getSafeProp(ve,"username")||"",le=x.getSafeProp(ve,"password")||"";ae={username:ee,password:le}}if(mf(T)){const ee=new URL(T,_e.origin);if(!ae&&(ee.username||ee.password)){const le=Ws(ee.username),lt=Ws(ee.password);ae={username:le,password:lt}}(ee.username||ee.password)&&(ee.username="",ee.password="",T=ee.href)}if(ae&&(Ne.delete("authorization"),Ne.set("Authorization","Basic "+btoa(uf((ae.username||"")+":"+(ae.password||""))))),bt&&typeof T=="string"&&T.startsWith("data:")&&ff(T)>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,S,he);if(Xt&&y!=="get"&&y!=="head"){const ee=await V(C);if(typeof ee=="number"&&isFinite(ee)&&(Qe=ee,ee>Se))throw we()}const Pt=Xt&&(x.isReadableStream(C)||x.isStream(C)),Sn=(ee,le,lt)=>qs(ee,js,pt=>{if(Xt&&pt>Se)throw Tt=we();le&&le(pt)},lt);if(p&&y!=="get"&&y!=="head"&&(ze||Pt)){if(Qe=Qe??await N(Ne,C),Qe!==0||Pt){let ee=new s(T,{method:"POST",body:C,duplex:"half"}),le;if(x.isFormData(C)&&(le=ee.headers.get("content-type"))&&Ne.setContentType(le),ee.body){const[lt,pt]=ze&&Os(Qe,Uo(Ls(ze)))||[];C=Sn(ee.body,lt,pt)}}}else if(Pt&&!l&&u&&y!=="get"&&y!=="head")C=Sn(C);else if(Pt&&l&&!p&&y!=="get"&&y!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,S,he);x.isString(Ke)||(Ke=Ke?"include":"omit");const rt=l&&"credentials"in s.prototype;if(x.isFormData(C)){const ee=Ne.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ne.delete("content-type")}Ne.set("User-Agent","axios/"+Ui,!1);const st={...ht,signal:it,method:y.toUpperCase(),headers:Bs(Ne.normalize()),body:C,duplex:"half",credentials:rt?Ke:void 0};he=l&&new s(T,st);let Ye=await(l?Cn(he,ht):Cn(T,st));const Zt=qe.from(Ye.headers);if(bt){const ee=x.toFiniteNumber(Zt.getContentLength());if(ee!=null&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,S,he)}const Ht=k&&(Te==="stream"||Te==="response");if(k&&Ye.body&&(se||bt||Ht&&W)){const ee={};["status","statusText","headers"].forEach(Mt=>{ee[Mt]=Ye[Mt]});const le=x.toFiniteNumber(Zt.getContentLength()),[lt,pt]=se&&Os(le,Uo(Ls(se),!0))||[];let Jt=0;const kn=Mt=>{if(bt&&(Jt=Mt,Jt>ye))throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,S,he);lt&&lt(Mt)};Ye=new a(qs(Ye.body,js,kn,()=>{pt&&pt(),W&&W()}),ee)}Te=Te||"text";let De=await E[x.findKey(E,Te)||"text"](Ye,S);if(bt&&!k&&!Ht){let ee;if(De!=null&&(typeof De.byteLength=="number"?ee=De.byteLength:typeof De.size=="number"?ee=De.size:typeof De=="string"&&(ee=typeof i=="function"?new i().encode(De).byteLength:De.length)),typeof ee=="number"&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,S,he)}return!Ht&&W&&W(),await new Promise((ee,le)=>{Fs(ee,le,{data:De,headers:qe.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:S,request:he})})}catch(ae){if(W&&W(),it&&it.aborted&&it.reason instanceof _){const ve=it.reason;throw ve.config=S,he&&(ve.request=he),ae!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),ve}if(Tt)throw he&&!Tt.request&&(Tt.request=he),Tt;if(ae instanceof _)throw he&&!ae.request&&(ae.request=he),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const ve=new _("Network Error",_.ERR_NETWORK,S,he,ae&&ae.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),ve}throw _.from(ae,ae&&ae.code,S,he,ae&&ae.response)}}},pf=new Map,Qs=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,f,u=pf;for(;c--;)l=s[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:hf(t)),u=f;return f};Qs();const vi={http:Id,xhr:rf,fetch:{get:Qs}};x.forEach(vi,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Ys=n=>`- ${n}`,gf=n=>x.isFunction(n)||n===null||n===!1;function yf(n,t){n=x.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,!gf(i)&&(r=vi[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(x.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
17
- `+a.map(Ys).join(`
18
- `):" "+Ys(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const Xs={getAdapter:yf,adapters:vi};function qi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ro(null,n)}function Zs(n){return qi(n),n.headers=qe.from(n.headers),n.data=Hi.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Xs.getAdapter(n.adapter||io.adapter,n)(n).then(function(i){qi(n),n.response=i;try{i.data=Hi.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=qe.from(i.headers),i},function(i){if(!Ds(i)&&(qi(n),i&&i.response)){n.response=i.response;try{i.response.data=Hi.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=qe.from(i.response.headers)}return Promise.reject(i)})}const jo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{jo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const Js={};jo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+Ui+"] 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}},jo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function wf(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 Wo={assertOptions:wf,validators:jo},je=Wo.validators;let cn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Is,response:new Is}}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(`
14
+ ***************************************************************************** */var us;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof ds=="object"?ds: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,m){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:m}),u&&u(f,m)}}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 tn(Object.create(null))}:l?function(){return tn({__proto__:null})}:function(){return tn({})},has:u?function(V,T){return i.call(V,T)}:function(V,T){return T in V},get:u?function(V,T){return i.call(V,T)?V[T]:void 0}:function(V,T){return V[T]}},m=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Qr(),S=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Yr(),E=typeof WeakMap=="function"?WeakMap:Xr(),P=r?Symbol.for("@reflect-metadata:registry"):void 0,B=Gr(),k=En(B);function $(V,T,I,L){if(W(I)){if(!at(V))throw new TypeError;if(!Jt(T))throw new TypeError;return et(V,T)}else{if(!at(V))throw new TypeError;if(!we(T))throw new TypeError;if(!we(L)&&!W(L)&&!Qe(L))throw new TypeError;return Qe(L)&&(L=void 0),I=st(I),pt(V,T,I,L)}}t("decorate",$);function b(V,T){function I(L,Z){if(!we(L))throw new TypeError;if(!W(Z)&&!vt(Z))throw new TypeError;Yn(V,T,L,Z)}return I}t("metadata",b);function y(V,T,I,L){if(!we(I))throw new TypeError;return W(L)||(L=st(L)),Yn(V,T,I,L)}t("defineMetadata",y);function N(V,T,I){if(!we(T))throw new TypeError;return W(I)||(I=st(I)),ye(V,T,I)}t("hasMetadata",N);function R(V,T,I){if(!we(T))throw new TypeError;return W(I)||(I=st(I)),Se(V,T,I)}t("hasOwnMetadata",R);function j(V,T,I){if(!we(T))throw new TypeError;return W(I)||(I=st(I)),Ct(V,T,I)}t("getMetadata",j);function se(V,T,I){if(!we(T))throw new TypeError;return W(I)||(I=st(I)),Zt(V,T,I)}t("getOwnMetadata",se);function ze(V,T){if(!we(V))throw new TypeError;return W(T)||(T=st(T)),Sn(V,T)}t("getMetadataKeys",ze);function Te(V,T){if(!we(V))throw new TypeError;return W(T)||(T=st(T)),rt(V,T)}t("getOwnMetadataKeys",Te);function Ne(V,T,I){if(!we(T))throw new TypeError;if(W(I)||(I=st(I)),!we(T))throw new TypeError;W(I)||(I=st(I));var L=en(T,I,!1);return W(L)?!1:L.OrdinaryDeleteMetadata(V,T,I)}t("deleteMetadata",Ne);function et(V,T){for(var I=V.length-1;I>=0;--I){var L=V[I],Z=L(T);if(!W(Z)&&!Qe(Z)){if(!Jt(Z))throw new TypeError;T=Z}}return T}function pt(V,T,I,L){for(var Z=V.length-1;Z>=0;--Z){var ke=V[Z],be=ke(T,I,L);if(!W(be)&&!Qe(be)){if(!we(be))throw new TypeError;L=be}}return L}function ye(V,T,I){var L=Se(V,T,I);if(L)return!0;var Z=xn(T);return Qe(Z)?!1:ye(V,Z,I)}function Se(V,T,I){var L=en(T,I,!1);return W(L)?!1:Mt(L.OrdinaryHasOwnMetadata(V,T,I))}function Ct(V,T,I){var L=Se(V,T,I);if(L)return Zt(V,T,I);var Z=xn(T);if(!Qe(Z))return Ct(V,Z,I)}function Zt(V,T,I){var L=en(T,I,!1);if(!W(L))return L.OrdinaryGetOwnMetadata(V,T,I)}function Yn(V,T,I,L){var Z=en(I,L,!0);Z.OrdinaryDefineOwnMetadata(V,T,I,L)}function Sn(V,T){var I=rt(V,T),L=xn(V);if(L===null)return I;var Z=Sn(L,T);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var ke=new S,be=[],te=0,H=I;te<H.length;te++){var U=H[te],v=ke.has(U);v||(ke.add(U),be.push(U))}for(var q=0,ie=Z;q<ie.length;q++){var U=ie[q],v=ke.has(U);v||(ke.add(U),be.push(U))}return be}function rt(V,T){var I=en(V,T,!1);return I?I.OrdinaryOwnMetadataKeys(V,T):[]}function he(V){if(V===null)return 1;switch(typeof V){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return V===null?1:6;default:return 6}}function W(V){return V===void 0}function Qe(V){return V===null}function Pt(V){return typeof V=="symbol"}function we(V){return typeof V=="object"?V!==null:typeof V=="function"}function ae(V,T){switch(he(V)){case 0:return V;case 1:return V;case 2:return V;case 3:return V;case 4:return V;case 5:return V}var I="string",L=ee(V,s);if(L!==void 0){var Z=L.call(V,I);if(we(Z))throw new TypeError;return Z}return ve(V)}function ve(V,T){var I,L;{var Z=V.toString;if(Ye(Z)){var L=Z.call(V);if(!we(L))return L}var I=V.valueOf;if(Ye(I)){var L=I.call(V);if(!we(L))return L}}throw new TypeError}function Mt(V){return!!V}function kn(V){return""+V}function st(V){var T=ae(V);return Pt(T)?T:kn(T)}function at(V){return Array.isArray?Array.isArray(V):V instanceof Object?V instanceof Array:Object.prototype.toString.call(V)==="[object Array]"}function Ye(V){return typeof V=="function"}function Jt(V){return typeof V=="function"}function vt(V){switch(he(V)){case 3:return!0;case 4:return!0;default:return!1}}function De(V,T){return V===T||V!==V&&T!==T}function ee(V,T){var I=V[T];if(I!=null){if(!Ye(I))throw new TypeError;return I}}function le(V){var T=ee(V,a);if(!Ye(T))throw new TypeError;var I=T.call(V);if(!we(I))throw new TypeError;return I}function ct(V){return V.value}function gt(V){var T=V.next();return T.done?!1:T}function Kt(V){var T=V.return;T&&T.call(V)}function xn(V){var T=Object.getPrototypeOf(V);if(typeof V!="function"||V===m||T!==m)return T;var I=V.prototype,L=I&&Object.getPrototypeOf(I);if(L==null||L===Object.prototype)return T;var Z=L.constructor;return typeof Z!="function"||Z===V?T:Z}function Rt(){var V;!W(P)&&typeof o.Reflect<"u"&&!(P in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(V=yi(o.Reflect));var T,I,L,Z=new E,ke={registerProvider:be,getProvider:H,setProvider:v};return ke;function be(q){if(!Object.isExtensible(ke))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case V===q:break;case W(T):T=q;break;case T===q:break;case W(I):I=q;break;case I===q:break;default:L===void 0&&(L=new S),L.add(q);break}}function te(q,ie){if(!W(T)){if(T.isProviderFor(q,ie))return T;if(!W(I)){if(I.isProviderFor(q,ie))return T;if(!W(L))for(var me=le(L);;){var xe=gt(me);if(!xe)return;var tt=ct(xe);if(tt.isProviderFor(q,ie))return Kt(me),tt}}}if(!W(V)&&V.isProviderFor(q,ie))return V}function H(q,ie){var me=Z.get(q),xe;return W(me)||(xe=me.get(ie)),W(xe)&&(xe=te(q,ie),W(xe)||(W(me)&&(me=new p,Z.set(q,me)),me.set(ie,xe))),xe}function U(q){if(W(q))throw new TypeError;return T===q||I===q||!W(L)&&L.has(q)}function v(q,ie,me){if(!U(me))throw new Error("Metadata provider not registered.");var xe=H(q,ie);if(xe!==me){if(!W(xe))return!1;var tt=Z.get(q);W(tt)&&(tt=new p,Z.set(q,tt)),tt.set(ie,me)}return!0}}function Gr(){var V;return!W(P)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(V=o.Reflect[P]),W(V)&&(V=Rt()),!W(P)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,P,{enumerable:!1,configurable:!1,writable:!1,value:V}),V}function En(V){var T=new E,I={isProviderFor:function(U,v){var q=T.get(U);return W(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:be,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:ke,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return B.registerProvider(I),I;function L(U,v,q){var ie=T.get(U),me=!1;if(W(ie)){if(!q)return;ie=new p,T.set(U,ie),me=!0}var xe=ie.get(v);if(W(xe)){if(!q)return;if(xe=new p,ie.set(v,xe),!V.setProvider(U,v,I))throw ie.delete(v),me&&T.delete(U),new Error("Wrong provider for target.")}return xe}function Z(U,v,q){var ie=L(v,q,!1);return W(ie)?!1:Mt(ie.has(U))}function ke(U,v,q){var ie=L(v,q,!1);if(!W(ie))return ie.get(U)}function be(U,v,q,ie){var me=L(q,ie,!0);me.set(U,v)}function te(U,v){var q=[],ie=L(U,v,!1);if(W(ie))return q;for(var me=ie.keys(),xe=le(me),tt=0;;){var ko=gt(xe);if(!ko)return q.length=tt,q;var Xn=ct(ko);try{q[tt]=Xn}catch(Zr){try{Kt(xe)}finally{throw Zr}}tt++}}function H(U,v,q){var ie=L(v,q,!1);if(W(ie)||!ie.delete(U))return!1;if(ie.size===0){var me=T.get(v);W(me)||(me.delete(q),me.size===0&&T.delete(me))}return!0}}function yi(V){var T=V.defineMetadata,I=V.hasOwnMetadata,L=V.getOwnMetadata,Z=V.getOwnMetadataKeys,ke=V.deleteMetadata,be=new E,te={isProviderFor:function(H,U){var v=be.get(H);return!W(v)&&v.has(U)?!0:Z(H,U).length?(W(v)&&(v=new S,be.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:T,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:ke};return te}function en(V,T,I){var L=B.getProvider(V,T);if(!W(L))return L;if(I){if(B.setProvider(V,T,k))return k;throw new Error("Illegal state.")}}function Qr(){var V={},T=[],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=T,this._values=T):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=T,this._values=T),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=T,this._values=T),{value:H,done:!0}},te}(),L=function(){function te(){this._keys=[],this._values=[],this._cacheKey=V,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--,De(H,this._cacheKey)&&(this._cacheKey=V,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=V,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Z)},te.prototype.values=function(){return new I(this._keys,this._values,ke)},te.prototype.entries=function(){return new I(this._keys,this._values,be)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!De(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(De(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 L;function Z(te,H){return te}function ke(te,H){return H}function be(te,H){return[te,H]}}function Yr(){var V=function(){function T(){this._map=new p}return Object.defineProperty(T.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),T.prototype.has=function(I){return this._map.has(I)},T.prototype.add=function(I){return this._map.set(I,I),this},T.prototype.delete=function(I){return this._map.delete(I)},T.prototype.clear=function(){this._map.clear()},T.prototype.keys=function(){return this._map.keys()},T.prototype.values=function(){return this._map.keys()},T.prototype.entries=function(){return this._map.entries()},T.prototype["@@iterator"]=function(){return this.keys()},T.prototype[a]=function(){return this.keys()},T}();return V}function Xr(){var V=16,T=f.create(),I=L();return function(){function H(){this._key=L()}return H.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=L()},H}();function L(){var H;do H="@@WeakMap@@"+te();while(f.has(T,H));return T[H]=!0,H}function Z(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function ke(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function be(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):ke(U,H),U}return ke(new Array(H),H)}function te(){var H=be(V);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<V;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function tn(V){return V.__=void 0,delete V.__,V}})})(us||(us={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function Cc(n,t=0){return(Le[n[t+0]]+Le[n[t+1]]+Le[n[t+2]]+Le[n[t+3]]+"-"+Le[n[t+4]]+Le[n[t+5]]+"-"+Le[n[t+6]]+Le[n[t+7]]+"-"+Le[n[t+8]]+Le[n[t+9]]+"-"+Le[n[t+10]]+Le[n[t+11]]+Le[n[t+12]]+Le[n[t+13]]+Le[n[t+14]]+Le[n[t+15]]).toLowerCase()}const Sc=new Uint8Array(16);function kc(){return crypto.getRandomValues(Sc)}function Wt(n,t,o){return crypto.randomUUID?crypto.randomUUID():xc(n)}function xc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??kc();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 Xe{static UUID(){return Wt()}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 Ec(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 Ni(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),Ec(n)}class Ee{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()),Ni(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():Ee.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=Ee.Translit(i),a=Ee.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ee.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ee.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(Ee.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ee.Translit(t);return[t,Ee.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ee.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 Ht=class Ht{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r)){const s=t[i]instanceof Date||this.isDateProperty(t,i);r===""&&s?t[i]=void 0:s?t[i]=this.toValidDate(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 isDateProperty(t,o){return(Reflect.getMetadata("class:dateKeys",t.constructor)||[]).includes(o)}static toValidDate(t){const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?void 0:o}static RemoveFromClassByIndex(t,o,i){Ht.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Ht.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 Ht.BuildClass(i),i.id=Xe.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Ht.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Ht.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ee.TrimText)(t)}};d(Ht,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)}),d(Ht,"IsDate",(t,o)=>{const i=Reflect.getMetadata("class:dateKeys",t.constructor)||[];i.includes(o)||i.push(o),Reflect.defineMetadata("class:dateKeys",i,t.constructor)});let J=Ht,Kn=class Yl{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new Yl;return t.id=Xe.UUID(),t}};class $i{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ee.BuildSafeUrl(t,o,i),this.staticUrl=Ni(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d($i,"staticUrl","");class kt{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);J.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${$i.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bn&&Bn.tagName.toUpperCase()==="SCRIPT"&&Bn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new kt;return i.id=o??Xe.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Xe.UUID(),i}setFile(t){this.id||(this.id=Xe.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Xe.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:Bn&&Bn.tagName.toUpperCase()==="SCRIPT"&&Bn.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 fs{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);J.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=Ee.Capitalize(this.name),this.surname=Ee.Capitalize(this.surname),this.patronymic=Ee.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 sn{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new sn;return t.id=Xe.UUID(),t}}class Mo{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}class Ro{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");J.BuildClass(this,t)}static Create(){const t=new Ro;return t.id=Xe.UUID(),t}}class Ti{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}let Bc=(Ut=class{},d(Ut,"Phone",sn),d(Ut,"FileInfo",kt),d(Ut,"Website",Ti),d(Ut,"Email",Kn),d(Ut,"Human",fs),d(Ut,"PostAddress",Mo),d(Ut,"UserAccount",Ro),Ut);var Be=(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))(Be||{});class Io{constructor(t){d(this,"field","");d(this,"operator",Be.Eq);d(this,"value","");J.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Io({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetween(){return this.operator===Be.Btw}isSet(){return this.operator===Be.In}}class Pi{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);J.BuildClass(this,t)}static Create(t){const o=new Pi;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=Io.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let ms=class Xl{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);J.BuildClass(this,t)}static Create(t){const o=new Xl;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Io.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=Pi.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 Ie=(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))(Ie||{}),Vc=Object.defineProperty,Nc=(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&&Vc(t,o,r),r};const hs=class Eo{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Be.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Ie.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","");J.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ie.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Be.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===Ie.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Ie.String?this.value1===(t==null?void 0:t.value1):this.type===Ie.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===Ie.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Ie.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Ie.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Ie.Number?`"number":${this.number}`:"",f=this.type===Ie.Set||this.operator===Be.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Ie.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,m].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===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetweenFilter(){return this.operator===Be.Btw}isSetFilter(){return this.operator===Be.In}static Create(t,o,i){const r=new Eo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Ie.Number&&(r.value1="0"),r.type===Ie.String&&(r.value1=""),r.type===Ie.Boolean&&(r.value1="false",r.operator=Be.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new Eo;return u.id=Wt(),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 Eo;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Ie.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new Eo;return i.id=Wt(),i.model=Ee.ToCamelCase(t.GetClassName()),i.joinTableModel=Ee.ToCamelCase(o.GetClassName()),i.type=Ie.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=Be.Eq;return}this.setDate2(o),this.operator=Be.Btw}};Nc([J.GetClassConstructor(String)],hs.prototype,"set");let Mi=hs;class $c{constructor(){d(this,"operation",Be.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 Ao{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new $c);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");J.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.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=Be.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,J.BuildClass(this)}}var ut=(n=>(n.Asc="asc",n.Desc="desc",n))(ut||{});class zo{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);J.BuildClass(this,t)}static Create(t,o,i=ut.Asc,r,s){const a=new zo;return a.model=t.GetClassName(),a.col=o??"",a.order=i??ut.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ut.Asc}isDesc(){return this.order===ut.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=ut.Asc}desc(){this.order=ut.Desc}}class Do{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new Do;return i.model=t.GetClassName(),i.cols=o,i}}var Tc=Object.defineProperty,eo=(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&&Tc(t,o,r),r};const $n=(Ke=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Ao);d(this,"t",new Do);J.BuildClass(this,t)}static Get(){return this.instance||(this.instance=Ke.create()),this.instance}static create(){return e.reactive(new Ke)}createFrom(t){const o=new Ke(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new Ke(this);return t.f=this.f.map(o=>Ke.EmptyEntiries(o)),t.f2=this.f2.map(o=>Ke.EmptyEntiries(o)),t.s=this.s.map(o=>Ke.EmptyEntiries(o)),t.p=Ke.EmptyEntiries(this.p),t.t=Ke.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));J.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Ao}resetF(){this.f=[]}},d(Ke,"instance"),Ke);eo([J.GetClassConstructor(Mi)],$n.prototype,"f"),eo([J.GetClassConstructor(ms)],$n.prototype,"f2"),eo([J.GetClassConstructor(zo)],$n.prototype,"s"),eo([J.GetClassConstructor(Ao)],$n.prototype,"p"),eo([J.GetClassConstructor(Do)],$n.prototype,"t");let xt=$n,Pc=(Qn=class{},d(Qn,"SortModel",zo),d(Qn,"FilterModel",Mi),d(Qn,"FilterModelV2",ms),d(Qn,"FTSP",xt),Qn);function ps(n,t){return function(){return n.apply(t,arguments)}}const{toString:Mc}=Object.prototype,{getPrototypeOf:Tn}=Object,{iterator:to,toStringTag:gs}=Symbol,Fo=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),no=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Fo(o,t))return!0;o=Tn(o)}return!1},Rc=(n,t)=>n!=null&&no(n,t)?n[t]:void 0,Ri=(n=>t=>{const o=Mc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),yt=n=>(n=n.toLowerCase(),t=>Ri(t)===n),Oo=n=>t=>typeof t===n,{isArray:an}=Array,Pn=Oo("undefined");function Mn(n){return n!==null&&!Pn(n)&&n.constructor!==null&&!Pn(n.constructor)&&nt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ys=yt("ArrayBuffer");function Ic(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&ys(n.buffer),t}const Ac=Oo("string"),nt=Oo("function"),ws=Oo("number"),Rn=n=>n!==null&&typeof n=="object",zc=n=>n===!0||n===!1,Lo=n=>{if(!Rn(n))return!1;const t=Tn(n);return(t===null||t===Object.prototype||Tn(t)===null)&&!no(n,gs)&&!no(n,to)},Dc=n=>{if(!Rn(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Fc=yt("Date"),Oc=yt("File"),Lc=n=>!!(n&&typeof n.uri<"u"),_c=n=>n&&typeof n.getParts<"u",Hc=yt("Blob"),Uc=yt("FileList"),vc=n=>Rn(n)&&nt(n.pipe);function qc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const bs=qc(),Cs=typeof bs.FormData<"u"?bs.FormData:void 0,jc=n=>{if(!n)return!1;if(Cs&&n instanceof Cs)return!0;const t=Tn(n);if(!t||t===Object.prototype||!nt(n.append))return!1;const o=Ri(n);return o==="formdata"||o==="object"&&nt(n.toString)&&n.toString()==="[object FormData]"},Wc=yt("URLSearchParams"),[Gc,Qc,Yc,Xc]=["ReadableStream","Request","Response","Headers"].map(yt),Zc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oo(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),an(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 Ss(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 ln=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ks=n=>!Pn(n)&&n!==ln;function Ii(...n){const{caseless:t,skipUndefined:o}=ks(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&Ss(i,a)||a,l=Fo(i,c)?i[c]:void 0;Lo(l)&&Lo(s)?i[c]=Ii(l,s):Lo(s)?i[c]=Ii({},s):an(s)?i[c]=s.slice():(!o||!Pn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(oo(c,r),typeof c!="object"||an(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];cd.call(c,f)&&r(c[f],f)}}return i}const Jc=(n,t,o,{allOwnKeys:i}={})=>(oo(t,(r,s)=>{o&&nt(r)?Object.defineProperty(n,s,{__proto__:null,value:ps(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),Kc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),ed=(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)},td=(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&&Tn(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},nd=(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},od=n=>{if(!n)return null;if(an(n))return n;let t=n.length;if(!ws(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},id=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Tn(Uint8Array)),rd=(n,t)=>{const i=(n&&n[to]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},sd=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},ad=yt("HTMLFormElement"),ld=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:cd}=Object.prototype,dd=yt("RegExp"),xs=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};oo(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},ud=n=>{xs(n,(t,o)=>{if(nt(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(nt(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+"'")})}})},fd=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return an(n)?i(n):i(String(n).split(t)),o},md=()=>{},hd=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function pd(n){return!!(n&&nt(n.append)&&n[gs]==="FormData"&&n[to])}const gd=n=>{const t=new WeakSet,o=i=>{if(Rn(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=an(i)?[]:{};return oo(i,(s,a)=>{const c=o(s);!Pn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},yd=yt("AsyncFunction"),wd=n=>n&&(Rn(n)||nt(n))&&nt(n.then)&&nt(n.catch),Es=((n,t)=>n?setImmediate:t?((o,i)=>(ln.addEventListener("message",({source:r,data:s})=>{r===ln&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),ln.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",nt(ln.postMessage)),bd=typeof queueMicrotask<"u"?queueMicrotask.bind(ln):typeof process<"u"&&process.nextTick||Es,Bs=n=>n!=null&&nt(n[to]),x={isArray:an,isArrayBuffer:ys,isBuffer:Mn,isFormData:jc,isArrayBufferView:Ic,isString:Ac,isNumber:ws,isBoolean:zc,isObject:Rn,isPlainObject:Lo,isEmptyObject:Dc,isReadableStream:Gc,isRequest:Qc,isResponse:Yc,isHeaders:Xc,isUndefined:Pn,isDate:Fc,isFile:Oc,isReactNativeBlob:Lc,isReactNative:_c,isBlob:Hc,isRegExp:dd,isFunction:nt,isStream:vc,isURLSearchParams:Wc,isTypedArray:id,isFileList:Uc,forEach:oo,merge:Ii,extend:Jc,trim:Zc,stripBOM:Kc,inherits:ed,toFlatObject:td,kindOf:Ri,kindOfTest:yt,endsWith:nd,toArray:od,forEachEntry:rd,matchAll:sd,isHTMLForm:ad,hasOwnProperty:Fo,hasOwnProp:Fo,hasOwnInPrototypeChain:no,getSafeProp:Rc,reduceDescriptors:xs,freezeMethods:ud,toObjectSet:fd,toCamelCase:ld,noop:md,toFiniteNumber:hd,findKey:Ss,global:ln,isContextDefined:ks,isSpecCompliantForm:pd,toJSONObject:gd,isAsyncFn:yd,isThenable:wd,setImmediate:Es,asap:bd,isIterable:Bs,isSafeIterable:n=>n!=null&&no(n,to)&&Bs(n)},Cd=x.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"]),Sd=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 kd(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 xd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ed=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ai(n,t){return x.isArray(n)?n.map(o=>Ai(o,t)):kd(String(n).replace(t,""))}const Bd=n=>Ai(n,xd),Vd=n=>Ai(n,Ed);function Vs(n){const t=Object.create(null);return x.forEach(n.toJSON(),(o,i)=>{t[i]=Vd(o)}),t}const Ns=Symbol("internals");function io(n){return n&&String(n).trim().toLowerCase()}function _o(n){return n===!1||n==null?n:x.isArray(n)?n.map(_o):Bd(String(n))}function Nd(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 $d=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function zi(n,t,o,i,r){if(x.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!x.isString(t)){if(x.isString(i))return t.indexOf(i)!==-1;if(x.isRegExp(i))return i.test(t)}}function Td(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function Pd(n,t){const o=x.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 qe=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,u){const f=io(l);if(!f)return;const m=x.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||l]=_o(c))}const a=(c,l)=>x.forEach(c,(u,f)=>s(u,f,l));if(x.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(x.isString(t)&&(t=t.trim())&&!$d(t))a(Sd(t),o);else if(x.isObject(t)&&x.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!x.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],x.hasOwnProp(c,u)?(l=c[u],c[u]=x.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=io(t),t){const i=x.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return Nd(r);if(x.isFunction(o))return o.call(this,r,i);if(x.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=io(t),t){const i=x.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||zi(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=io(a),a){const c=x.findKey(i,a);c&&(!o||zi(i,i[c],c,o))&&(delete i[c],r=!0)}}return x.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||zi(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return x.forEach(this,(r,s)=>{const a=x.findKey(i,s);if(a){o[a]=_o(r),delete o[s];return}const c=t?Td(s):String(s).trim();c!==s&&delete o[s],o[c]=_o(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return x.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&x.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[Ns]=this[Ns]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=io(a);i[c]||(Pd(r,a),i[c]=!0)}return x.isArray(t)?t.forEach(s):s(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(qe.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),x.freezeMethods(qe);const Md="[REDACTED ****]";function Rd(n){if(x.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(x.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Id(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||x.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof qe&&(s=s.toJSON()),i.push(s);let a;if(x.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);x.isUndefined(u)||(a[l]=u)});else{if(!x.isPlainObject(s)&&Rd(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Md:r(l);x.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class Zl extends Error{static from(t,o,i,r,s,a){const c=new Zl(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&&x.hasOwnProp(t,"redact")?t.redact:void 0,i=x.isArray(o)&&o.length>0?Id(t,o):x.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 Ad=null,$s=100;function Di(n){return x.isPlainObject(n)||x.isArray(n)}function Ts(n){return x.endsWith(n,"[]")?n.slice(0,-2):n}function Fi(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ts(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function zd(n){return x.isArray(n)&&!n.some(Di)}const Dd=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Ho(n,t,o){if(!x.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=x.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function($,b){return!x.isUndefined(b[$])});const i=o.metaTokens,r=o.visitor||E,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?$s:o.maxDepth,u=c&&x.isSpecCompliantForm(t),f=[];if(!x.isFunction(r))throw new TypeError("visitor must be a function");function m(k){if(k===null)return"";if(x.isDate(k))return k.toISOString();if(x.isBoolean(k))return k.toString();if(!u&&x.isBlob(k))throw new _("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(k)||x.isTypedArray(k)){if(u&&typeof c=="function")return new c([k]);if(typeof Buffer<"u")return Buffer.from(k);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return k}function p(k){if(k>l)throw new _("Object is too deeply nested ("+k+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(k,$){if(l===1/0)return JSON.stringify(k);const b=[];return JSON.stringify(k,function(N,R){if(!x.isObject(R))return R;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(R),p($+b.length-1),R})}function E(k,$,b){let y=k;if(x.isReactNative(t)&&x.isReactNativeBlob(k))return t.append(Fi(b,$,s),m(k)),!1;if(k&&!b&&typeof k=="object"){if(x.endsWith($,"{}"))$=i?$:$.slice(0,-2),k=S(k,1);else if(x.isArray(k)&&zd(k)||(x.isFileList(k)||x.endsWith($,"[]"))&&(y=x.toArray(k)))return $=Ts($),y.forEach(function(R,j){!(x.isUndefined(R)||R===null)&&t.append(a===!0?Fi([$],j,s):a===null?$:$+"[]",m(R))}),!1}return Di(k)?!0:(t.append(Fi(b,$,s),m(k)),!1)}const P=Object.assign(Dd,{defaultVisitor:E,convertValue:m,isVisitable:Di});function B(k,$,b=0){if(!x.isUndefined(k)){if(p(b),f.indexOf(k)!==-1)throw new Error("Circular reference detected in "+$.join("."));f.push(k),x.forEach(k,function(N,R){(!(x.isUndefined(N)||N===null)&&r.call(t,N,x.isString(R)?R.trim():R,$,P))===!0&&B(N,$?$.concat(R):[R],b+1)}),f.pop()}}if(!x.isObject(n))throw new TypeError("data must be an object");return B(n),t}function Ps(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Oi(n,t){this._pairs=[],n&&Ho(n,this,t)}const Ms=Oi.prototype;Ms.append=function(t,o){this._pairs.push([t,o])},Ms.toString=function(t){const o=t?i=>t.call(this,i,Ps):Ps;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Fd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rs(n,t,o){if(!t)return n;n=n||"";const i=x.isFunction(o)?{serialize:o}:o,r=x.getSafeProp(i,"encode")||Fd,s=x.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=x.isURLSearchParams(t)?t.toString():new Oi(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Is{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){x.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Li={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Od={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Oi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_i=typeof window<"u"&&typeof document<"u",Hi=typeof navigator=="object"&&navigator||void 0,Ld=_i&&(!Hi||["ReactNative","NativeScript","NS"].indexOf(Hi.product)<0),_d=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hd=_i&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_i,hasStandardBrowserEnv:Ld,hasStandardBrowserWebWorkerEnv:_d,navigator:Hi,origin:Hd},Symbol.toStringTag,{value:"Module"})),...Od};function Ud(n,t){return Ho(n,new _e.classes.URLSearchParams,{visitor:function(o,i,r,s){return _e.isNode&&x.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const As=$s;function zs(n){if(n>As)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+As,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function vd(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)zs(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function qd(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 Ds(n){function t(o,i,r,s){zs(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&x.isArray(r)?r.length:a,l?(x.hasOwnProp(r,a)?r[a]=x.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!x.hasOwnProp(r,a)||!x.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&x.isArray(r[a])&&(r[a]=qd(r[a])),!c)}if(x.isFormData(n)&&x.isFunction(n.entries)){const o={};return x.forEachEntry(n,(i,r)=>{t(vd(i),r,o,0)}),o}return null}const In=(n,t)=>n!=null&&x.hasOwnProp(n,t)?n[t]:void 0;function jd(n,t,o){if(x.isString(n))try{return(t||JSON.parse)(n),x.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const ro={transitional:Li,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=x.isObject(t);if(s&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return r?JSON.stringify(Ds(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.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 Ud(t,l).toString();if((c=x.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return Ho(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),jd(t)):t}],transformResponse:[function(t){const o=In(this,"transitional")||ro.transitional,i=o&&o.forcedJSONParsing,r=In(this,"responseType"),s=r==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.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:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],n=>{ro.headers[n]={}});function Ui(n,t){const o=this||ro,i=t||o,r=qe.from(i.headers);let s=i.data;return x.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Fs(n){return!!(n&&n.__CANCEL__)}let so=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Os(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 Wd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Gd(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 m=s,p=0;for(;m!==r;)p+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const S=f&&u-f;return S?Math.round(p*1e3/S):void 0}}function Qd(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(),m=f-o;m>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const Uo=(n,t,o=3)=>{let i=0;const r=Gd(50,250);return Qd(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 m={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(m)},o)},Ls=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},_s=n=>(...t)=>x.asap(()=>n(...t)),Yd=_e.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,_e.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,Xd=_e.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];x.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),x.isString(i)&&c.push(`path=${i}`),x.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),x.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 Zd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Jd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Kd=/^https?:(?!\/\/)/i,eu=/[\t\n\r]/g;function tu(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function nu(n){return tu(n).replace(eu,"")}function Hs(n,t){if(typeof n=="string"&&Kd.test(nu(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function Us(n,t,o,i){Hs(t,i);let r=!Zd(t);return n&&(r||o===!1)?(Hs(n,i),Jd(n,t)):t}const vs=n=>n instanceof qe?{...n}:n;function cn(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,m,p,S){return x.isPlainObject(f)&&x.isPlainObject(m)?x.merge.call({caseless:S},f,m):x.isPlainObject(m)?x.merge({},m):x.isArray(m)?m.slice():m}function r(f,m,p,S){if(x.isUndefined(m)){if(!x.isUndefined(f))return i(void 0,f,p,S)}else return i(f,m,p,S)}function s(f,m){if(!x.isUndefined(m))return i(void 0,m)}function a(f,m){if(x.isUndefined(m)){if(!x.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function c(f){const m=x.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!x.isUndefined(m))if(x.isPlainObject(m)){if(x.hasOwnProp(m,f))return m[f]}else return;const p=x.hasOwnProp(n,"transitional")?n.transitional:void 0;if(x.isPlainObject(p)&&x.hasOwnProp(p,f))return p[f]}function l(f,m,p){if(x.hasOwnProp(t,p))return i(f,m);if(x.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,m,p)=>r(vs(f),vs(m),p,!0)};return x.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const p=x.hasOwnProp(u,m)?u[m]:r,S=x.hasOwnProp(n,m)?n[m]:void 0,E=x.hasOwnProp(t,m)?t[m]:void 0,P=p(S,E,m);x.isUndefined(P)&&p!==l||(o[m]=P)}),x.hasOwnProp(t,"validateStatus")&&x.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const ou=["content-type","content-length"];function iu(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{ou.includes(i.toLowerCase())&&n.set(i,r)})}const ru=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function qs(n){const t=cn({},n),o=p=>x.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"),m=o("url");if(t.headers=c=qe.from(c),t.url=Rs(Us(u,m,f,t),o("params"),o("paramsSerializer")),l){const p=x.getSafeProp(l,"username")||"",S=x.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(S?ru(S):"")))}catch(E){throw _.from(E,_.ERR_BAD_OPTION_VALUE,n)}}if(x.isFormData(i)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||x.isReactNative(i)?c.setContentType(void 0):x.isFunction(i.getHeaders)&&iu(c,i.getHeaders(),o("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(x.isFunction(r)&&(r=r(t)),r===!0||r==null&&Yd(t.url))){const S=s&&a&&Xd.read(a);S&&c.set(s,S)}return t}const su=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=qs(n);let s=r.data;const a=qe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,m,p,S,E;function P(){S&&S(),E&&E(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let B=new XMLHttpRequest;B.open(r.method.toUpperCase(),r.url,!0),B.timeout=r.timeout;function k(){if(!B)return;const b=qe.from("getAllResponseHeaders"in B&&B.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?B.responseText:B.response,status:B.status,statusText:B.statusText,headers:b,config:n,request:B};Os(function(j){o(j),P()},function(j){i(j),P()},N),B=null}"onloadend"in B?B.onloadend=k:B.onreadystatechange=function(){!B||B.readyState!==4||B.status===0&&!(B.responseURL&&B.responseURL.startsWith("file:"))||setTimeout(k)},B.onabort=function(){B&&(i(new _("Request aborted",_.ECONNABORTED,n,B)),P(),B=null)},B.onerror=function(y){const N=y&&y.message?y.message:"Network Error",R=new _(N,_.ERR_NETWORK,n,B);R.event=y||null,i(R),P(),B=null},B.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const N=r.transitional||Li;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),i(new _(y,N.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,B)),P(),B=null},s===void 0&&a.setContentType(null),"setRequestHeader"in B&&x.forEach(Vs(a),function(y,N){B.setRequestHeader(N,y)}),x.isUndefined(r.withCredentials)||(B.withCredentials=!!r.withCredentials),c&&c!=="json"&&(B.responseType=r.responseType),u&&([p,E]=Uo(u,!0),B.addEventListener("progress",p)),l&&B.upload&&([m,S]=Uo(l),B.upload.addEventListener("progress",m),B.upload.addEventListener("loadend",S)),(r.cancelToken||r.signal)&&(f=b=>{B&&(i(!b||b.type?new so(null,n,B):b),B.abort(),P(),B=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const $=Wd(r.url);if($&&!_e.protocols.includes($)){i(new _("Unsupported protocol "+$+":",_.ERR_BAD_REQUEST,n)),P();return}B.send(s||null)})},au=(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 so(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=()=>x.asap(a),c},lu=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},cu=async function*(n,t){for await(const o of du(n))yield*lu(o,t)},du=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()}},js=(n,t,o,i)=>{const r=cu(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 m=f.byteLength;if(o){let p=s+=m;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},vo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,uu=(n,t,o)=>t+2<o&&vo(n.charCodeAt(t+1))&&vo(n.charCodeAt(t+2));function fu(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 S=0;S<c;S++)if(i.charCodeAt(S)===37&&S+2<c){const E=i.charCodeAt(S+1),P=i.charCodeAt(S+2);vo(E)&&vo(P)&&(a-=2,S+=2)}let l=0,u=c-1;const f=S=>S>=2&&i.charCodeAt(S-2)===37&&i.charCodeAt(S-1)===51&&(i.charCodeAt(S)===68||i.charCodeAt(S)===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&&uu(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 vi="1.18.1",Ws=64*1024,{isFunction:qo}=x,mu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Gs=n=>{if(!x.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Qs=(n,...t)=>{try{return!!n(...t)}catch{return!1}},hu=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},pu=n=>{const t=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=x.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?qo(r):typeof fetch=="function",l=qo(s),u=qo(a);if(!c)return!1;const f=c&&qo(o),m=c&&(typeof i=="function"?(k=>$=>k.encode($))(new i):async k=>new Uint8Array(await new s(k).arrayBuffer())),p=l&&f&&Qs(()=>{let k=!1;const $=new s(_e.origin,{body:new o,method:"POST",get duplex(){return k=!0,"half"}}),b=$.headers.has("Content-Type");return $.body!=null&&$.body.cancel(),k&&!b}),S=u&&f&&Qs(()=>x.isReadableStream(new a("").body)),E={stream:S&&(k=>k.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!E[k]&&(E[k]=($,b)=>{let y=$&&$[k];if(y)return y.call($);throw new _(`Response type '${k}' is not supported`,_.ERR_NOT_SUPPORT,b)})});const P=async k=>{if(k==null)return 0;if(x.isBlob(k))return k.size;if(x.isSpecCompliantForm(k))return(await new s(_e.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(x.isArrayBufferView(k)||x.isArrayBuffer(k))return k.byteLength;if(x.isURLSearchParams(k)&&(k=k+""),x.isString(k))return(await m(k)).byteLength},B=async(k,$)=>{const b=x.toFiniteNumber(k.getContentLength());return b??P($)};return async k=>{let{url:$,method:b,data:y,signal:N,cancelToken:R,timeout:j,onDownloadProgress:se,onUploadProgress:ze,responseType:Te,headers:Ne,withCredentials:et="same-origin",fetchOptions:pt,maxContentLength:ye,maxBodyLength:Se}=qs(k);const Ct=x.isNumber(ye)&&ye>-1,Zt=x.isNumber(Se)&&Se>-1,Yn=ae=>x.hasOwnProp(k,ae)?k[ae]:void 0;let Sn=r||fetch;Te=Te?(Te+"").toLowerCase():"text";let rt=au([N,R&&R.toAbortSignal()],j),he=null;const W=rt&&rt.unsubscribe&&(()=>{rt.unsubscribe()});let Qe,Pt=null;const we=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,k,he);try{let ae;const ve=Yn("auth");if(ve){const ee=x.getSafeProp(ve,"username")||"",le=x.getSafeProp(ve,"password")||"";ae={username:ee,password:le}}if(hu($)){const ee=new URL($,_e.origin);if(!ae&&(ee.username||ee.password)){const le=Gs(ee.username),ct=Gs(ee.password);ae={username:le,password:ct}}(ee.username||ee.password)&&(ee.username="",ee.password="",$=ee.href)}if(ae&&(Ne.delete("authorization"),Ne.set("Authorization","Basic "+btoa(mu((ae.username||"")+":"+(ae.password||""))))),Ct&&typeof $=="string"&&$.startsWith("data:")&&fu($)>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,k,he);if(Zt&&b!=="get"&&b!=="head"){const ee=await P(y);if(typeof ee=="number"&&isFinite(ee)&&(Qe=ee,ee>Se))throw we()}const Mt=Zt&&(x.isReadableStream(y)||x.isStream(y)),kn=(ee,le,ct)=>js(ee,Ws,gt=>{if(Zt&&gt>Se)throw Pt=we();le&&le(gt)},ct);if(p&&b!=="get"&&b!=="head"&&(ze||Mt)){if(Qe=Qe??await B(Ne,y),Qe!==0||Mt){let ee=new s($,{method:"POST",body:y,duplex:"half"}),le;if(x.isFormData(y)&&(le=ee.headers.get("content-type"))&&Ne.setContentType(le),ee.body){const[ct,gt]=ze&&Ls(Qe,Uo(_s(ze)))||[];y=kn(ee.body,ct,gt)}}}else if(Mt&&!l&&f&&b!=="get"&&b!=="head")y=kn(y);else if(Mt&&l&&!p&&b!=="get"&&b!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,k,he);x.isString(et)||(et=et?"include":"omit");const st=l&&"credentials"in s.prototype;if(x.isFormData(y)){const ee=Ne.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ne.delete("content-type")}Ne.set("User-Agent","axios/"+vi,!1);const at={...pt,signal:rt,method:b.toUpperCase(),headers:Vs(Ne.normalize()),body:y,duplex:"half",credentials:st?et:void 0};he=l&&new s($,at);let Ye=await(l?Sn(he,pt):Sn($,at));const Jt=qe.from(Ye.headers);if(Ct){const ee=x.toFiniteNumber(Jt.getContentLength());if(ee!=null&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,k,he)}const vt=S&&(Te==="stream"||Te==="response");if(S&&Ye.body&&(se||Ct||vt&&W)){const ee={};["status","statusText","headers"].forEach(Rt=>{ee[Rt]=Ye[Rt]});const le=x.toFiniteNumber(Jt.getContentLength()),[ct,gt]=se&&Ls(le,Uo(_s(se),!0))||[];let Kt=0;const xn=Rt=>{if(Ct&&(Kt=Rt,Kt>ye))throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,k,he);ct&&ct(Rt)};Ye=new a(js(Ye.body,Ws,xn,()=>{gt&&gt(),W&&W()}),ee)}Te=Te||"text";let De=await E[x.findKey(E,Te)||"text"](Ye,k);if(Ct&&!S&&!vt){let ee;if(De!=null&&(typeof De.byteLength=="number"?ee=De.byteLength:typeof De.size=="number"?ee=De.size:typeof De=="string"&&(ee=typeof i=="function"?new i().encode(De).byteLength:De.length)),typeof ee=="number"&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,k,he)}return!vt&&W&&W(),await new Promise((ee,le)=>{Os(ee,le,{data:De,headers:qe.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:k,request:he})})}catch(ae){if(W&&W(),rt&&rt.aborted&&rt.reason instanceof _){const ve=rt.reason;throw ve.config=k,he&&(ve.request=he),ae!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),ve}if(Pt)throw he&&!Pt.request&&(Pt.request=he),Pt;if(ae instanceof _)throw he&&!ae.request&&(ae.request=he),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const ve=new _("Network Error",_.ERR_NETWORK,k,he,ae&&ae.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),ve}throw _.from(ae,ae&&ae.code,k,he,ae&&ae.response)}}},gu=new Map,Ys=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=gu;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:pu(t)),f=u;return u};Ys();const qi={http:Ad,xhr:su,fetch:{get:Ys}};x.forEach(qi,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Xs=n=>`- ${n}`,yu=n=>x.isFunction(n)||n===null||n===!1;function wu(n,t){n=x.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,!yu(i)&&(r=qi[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(x.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
+ `+a.map(Xs).join(`
18
+ `):" "+Xs(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const Zs={getAdapter:wu,adapters:qi};function ji(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new so(null,n)}function Js(n){return ji(n),n.headers=qe.from(n.headers),n.data=Ui.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Zs.getAdapter(n.adapter||ro.adapter,n)(n).then(function(i){ji(n),n.response=i;try{i.data=Ui.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=qe.from(i.headers),i},function(i){if(!Fs(i)&&(ji(n),i&&i.response)){n.response=i.response;try{i.response.data=Ui.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=qe.from(i.response.headers)}return Promise.reject(i)})}const jo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{jo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const Ks={};jo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+vi+"] 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&&!Ks[a]&&(Ks[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}},jo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function bu(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 Wo={assertOptions:bu,validators:jo},je=Wo.validators;let dn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Is,response:new Is}}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
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
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=ln(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&Wo.assertOptions(i,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),r!=null&&(x.isFunction(r)?o.paramsSerializer={serialize:r}:Wo.assertOptions(r,{encode:je.function,serialize:je.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Wo.assertOptions(o,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&x.merge(s.common,s[o.method]);s&&x.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete s[E]}),o.headers=qe.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(V){if(typeof V.runWhen=="function"&&V.runWhen(o)===!1)return;l=l&&V.synchronous;const N=o.transitional||Oi;N&&N.legacyInterceptorReqResOrdering?c.unshift(V.fulfilled,V.rejected):c.push(V.fulfilled,V.rejected)});const f=[];this.interceptors.response.forEach(function(V){f.push(V.fulfilled,V.rejected)});let u,m=0,p;if(!l){const E=[Zs.bind(this),void 0];for(E.unshift(...c),E.push(...f),p=E.length,u=Promise.resolve(o);m<p;)u=u.then(E[m++],E[m++]);return u}p=c.length;let k=o;for(;m<p;){const E=c[m++],V=c[m++];try{k=E(k)}catch(N){V.call(this,N);break}}try{u=Zs.call(this,k)}catch(E){return Promise.reject(E)}for(m=0,p=f.length;m<p;)u=u.then(f[m++],f[m++]);return u}getUri(t){t=ln(this.defaults,t);const o=Hs(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ms(o,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){cn.prototype[t]=function(o,i){return this.request(ln(i||{},{method:t,url:o,data:i&&x.hasOwnProp(i,"data")?i.data:void 0}))}}),x.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(ln(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[t]=o(),t!=="query"&&(cn.prototype[t+"Form"]=o(!0))});let bf=class Xl{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 ro(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 Xl(function(r){t=r}),cancel:t}}};function Cf(n){return function(o){return n.apply(null,o)}}function Sf(n){return x.isObject(n)&&n.isAxiosError===!0}const ji={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(ji).forEach(([n,t])=>{ji[t]=n});function Ks(n){const t=new cn(n),o=hs(cn.prototype.request,t);return x.extend(o,cn.prototype,t,{allOwnKeys:!0}),x.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Ks(ln(n,r))},o}const $e=Ks(io);$e.Axios=cn,$e.CanceledError=ro,$e.CancelToken=bf,$e.isCancel=Ds,$e.VERSION=Ui,$e.toFormData=Ho,$e.AxiosError=_,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=Cf,$e.isAxiosError=Sf,$e.mergeConfig=ln,$e.AxiosHeaders=qe,$e.formToJSON=n=>zs(x.isHTMLForm(n)?new FormData(n):n),$e.getAdapter=Xs.getAdapter,$e.HttpStatusCode=ji,$e.default=$e;const{Axios:jw,AxiosError:Ww,CanceledError:Gw,isCancel:Qw,CancelToken:Yw,VERSION:Xw,all:Zw,Cancel:Jw,isAxiosError:Kw,spread:eb,toFormData:tb,AxiosHeaders:nb,HttpStatusCode:ob,formToJSON:ib,getAdapter:rb,mergeConfig:sb,create:ab}=$e;var so=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(so||{});const ao=(()=>{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 f=ao.getUser();f&&(f.human=l,localStorage.setItem("user",JSON.stringify(f)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class Wi{constructor(t){d(this,"code",400);d(this,"err","");J.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=ao.getAccessToken(),t.config.headers.token=ao.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 Wi(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const An=$e.create();An.interceptors.response.use(n=>n,async n=>await Wi.Handle(n,An));class lo{static async Get(t,o,i){return await An({method:so.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await An({method:so.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await An({method:so.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await An({method:so.DELETE,url:t,headers:o})}}class Go{constructor(t){d(this,"name","");J.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=Go.Get(t,i),r||(r=await o()),r}}var Gi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Gi||{}),ea=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(ea||{});const ge=class ge{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ee.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=ge.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=Ct.Get(ct.AccessToken);return t||(t=ge.headers),o&&(t[Gi.Token]=o),t??ge.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ge.download(t.downloadFileName,o):o.data}static async Get(t){return ge.returnResponse(t,await lo.Get(ge.buildUrl((t==null?void 0:t.query)??""),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ge.returnResponse(t,await lo.Post(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t.isBlob),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ge.returnResponse(t,await lo.Put(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ge.returnResponse(t,await lo.Delete(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ge.buildUrl(o))}static buildUrl(t=""){try{return Vi(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(ge,"baseUrl",""),d(ge,"apiVersion","api"),d(ge,"host",""),d(ge,"headers",{[Gi.ContentType]:ea.ApplicationJson});let Ce=ge;const z=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},kf={},xf={style:{"text-align":"center"}};function Ef(n,t){return e.openBlock(),e.createElementBlock("div",xf,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const ta=z(kf,[["render",Ef]]),Bf=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ta}],mt=class mt{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(Bf)}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 mt.GetStringParam("id")}static Slug(){return mt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return mt.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=mt.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 mt.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(mt,"router"),d(mt,"title",""),d(mt,"ChangeDocumentTitle",(t="")=>{let o=mt.Route().meta.title??t;o&&(o=" | "+o),document.title=mt.title+o});let xt=mt;class Ve{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 Ce.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=Ce.Get;t&&t.withCache?o=await Go.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=xt.Id()),this.Set(await Ce.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=xt.Slug()),this.Set(await D.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)??kt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.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 Ce.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 Ce.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 Ce.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(){J.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=>D.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 Vf(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const Nf=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class $f{static GetRandColor(t){return zt.GetRandEL(t??Nf)}}function na(n,t){const o=[],i=t||dt.Asc,r=i===dt.Asc?dt.Desc:dt.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 Tf=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Zn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Po[Zn.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=Po[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return zt.GenerateNumsRange(this.startHour,this.endHour)}};const Qi=n=>n===8||n===46,Pf=n=>n>46&&n<58,Mf=n=>n>34&&n<41,If=n=>n+".",Rf=(n,t,o)=>{Qi(t)||Mf(t)||(!Pf(t)||o>9)&&n.preventDefault()};function Af(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 zf(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Rf(n,t,i),!Qi(t)&&(i===2||i===5)&&(o=If(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(Qi(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=Af(o,i),n.srcElement.value=o}const Df=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Ff="ru-RU";class qt{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(Ff,i).format(new Date(t))}static FormatWithTime(t){return qt.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?Df[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=qt.SplitHourTime(t),a=qt.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=qt.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=qt.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=qt.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 Of{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 oa{static Get(t){const o=t.split(".");return o[o.length-1]}}const Lf=(()=>{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(f=>f!==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 _f{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=na(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 dn=new _f;function Hf(){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 Uf=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{D.F.FTSP.Get().reset(),dn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Hf(),i=s=>ic.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 ia(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 Yi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=xt.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 Yi;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,xt.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 pi=class pi{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(pi,"validatePhone",(t,o,i)=>{pi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Xi=pi;class vf{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 qf{static async Auth(t){t&&t()}static Dev(){}}class jf{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",Zn.FiveMinutes);d(this,"timelines",Po[Zn.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=Po[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return zt.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 Wf=-68;function Gf(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Wf;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Qf{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Qo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Qo.Wait(ie.S(t),o)}static WaitM(t,o){return Qo.Wait(ie.M(t),o)}}const co=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Yf=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=>co(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>o=>co(o)||String(o).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>o=>co(o)||String(o).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>o=>co(o)||n.test(String(o))?!0:t,Required:(n="Обязательное поле")=>t=>co(t)?n:!0},Symbol.toStringTag,{value:"Module"})),Xf=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 Yo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");J.BuildClass(this,t)}static Create(t,o,i,r){const s=new Yo;return s.id=vt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Yo;return t.type="ping",t.id=vt(),t}isMessage(){return this.type==="message"||this.type===""}}const Zf="";class Jf{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);J.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(Yo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Zf.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 Kf=(re=class{},d(re,"Arrays",zt),d(re,"Axios",lo),d(re,"BaseStore",Ve),d(re,"Cache",Go),d(re,"Classes",J),d(re,"CarouselSwipe",Vf),d(re,"Color",$f),d(re,"CreateSortModels",na),d(re,"Cursor",Tf),d(re,"DateMask",zf),d(re,"Dates",qt),d(re,"Dragger",Of),d(re,"Extension",oa),d(re,"Favourite",Lf),d(re,"Hooks",Uf),d(re,"HttpClient",Ce),d(re,"Id",Xe),d(re,"MakeCarousel",ia),d(re,"Period",Ei),d(re,"PhoneService",Xi),d(re,"Rating",vf),d(re,"Router",xt),d(re,"RouterGuard",qf),d(re,"Scheduler",jf),d(re,"Scroll",Gf),d(re,"Sorter",Qf),d(re,"Static",Ni),d(re,"Strings",Ee),d(re,"Time",ie),d(re,"Timer",Qo),d(re,"Token",ao),d(re,"Menus",Yi),d(re,"Validate",Yf),d(re,"WaitElement",Xf),d(re,"WebSocketClient",Jf),re);class eu{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 ra=new eu;var sa=(n=>(n.TableList="tableList",n.Default="",n))(sa||{}),Et=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Et||{}),aa=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(aa||{}),la=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(la||{}),Zi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Zi||{});const tu=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:sa,Animations:Et,CalendarScale:aa,LocalStoreKeys:ct,SocialTypes:la,ValueRelation:Zi},Symbol.toStringTag,{value:"Module"}));let nu=class{async Login(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Ce.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=xt.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:ao.getRefreshToken()}})}async CheckUuid(t){await Ce.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ce.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ce.Get({query:`auth/email-is-confirm/${t}`})}};const ou=new nu;var iu=Object.defineProperty,Xo=(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&&iu(t,o,r),r};const fo=class Zl{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Mo]);d(this,"phones",[]);d(this,"websites",[]);J.BuildClass(this,t)}addEmail(){const t=Jn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=rn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Zl;return t.id=Xe.UUID(),t}removeEmail(t){J.RemoveFromClassById(t,this.emails)}removePhone(t){J.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Mo)}addWebsite(){this.websites.push(new $i)}pushFirst(){this.emails.length||this.emails.push(new Jn),this.phones.length||this.phones.push(new rn)}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}};Xo([J.GetClassConstructor(Jn)],fo.prototype,"emails"),Xo([J.GetClassConstructor(Mo)],fo.prototype,"postAddresses"),Xo([J.GetClassConstructor(rn)],fo.prototype,"phones"),Xo([J.GetClassConstructor($i)],fo.prototype,"websites");let ru=fo,su=class extends Ve{constructor(){super(ru,"contacts")}};const au=new su;let lu=class extends Ve{constructor(){super(Jn,"emails")}};const cu=new lu;class Ji{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");J.BuildClass(this,t)}static Create(t){const o=new Ji;return o.id=Xe.UUID(),o.ftsp=JSON.stringify(t),o}}let du=class extends Ve{constructor(){super(Ji,"ftsp-presets")}};const fu=new du;let uu=class extends Ve{constructor(){super(fs,"humans")}};const mu=new uu;let hu=class extends Ve{constructor(){super(rn,"phones")}};const pu=new hu;class gu{constructor(t){d(this,"id");d(this,"nameRus","");J.BuildClass(this,t)}}var yu=Object.defineProperty,wu=(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&&yu(t,o,r),r};class ca{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);J.BuildClass(this,t)}}wu([J.GetClassConstructor(gu)],ca.prototype,"fields");let bu=class extends Ve{constructor(){super(ca,"schemas")}};const Cu=new bu;class da{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);J.BuildClass(this,t)}}class Su{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");J.BuildClass(this,t)}}var ku=Object.defineProperty,fa=(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&&ku(t,o,r),r};class zn{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",[]);J.BuildClass(this,t)}}fa([J.GetClassConstructor(da)],zn.prototype,"options"),fa([J.GetClassConstructor(Su)],zn.prototype,"searchGroupMetaColumns");class Ki{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 zn);d(this,"searchObjects",[]);d(this,"pagination",new Ao);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new zn(o))),t.searchGroup&&(this.searchGroup=new zn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new da(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 zn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(xt.Route().query.groupId)}setQuery(){const t=xt.Route().query.query;t&&(this.query=t)}}let xu=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Ki));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await Ce.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 Ce.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Ki}SetSearchModel(t){t&&(this.searchModel=new Ki(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const er=new xu;let Eu=class extends Ve{constructor(){super(Io,"users-accounts")}};const Bu=new Eu;var We=(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))(We||{});class ua{constructor(t){d(this,"id");d(this,"name",We.String);d(this,"valueRelation",Zi.simple);J.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===We.Radio)return"RadioProp";if(this.name===We.Set)return"SetProp";if(this.name===We.Number)return"NumberProp";if(this.name===We.String)return"StringProp"}}let Vu=class extends Ve{constructor(){super(ua,"value-types")}};const Nu=new Vu;let ma=(at=class{},d(at,"Auth",ou),d(at,"Contacts",au),d(at,"Emails",cu),d(at,"FileInfos",new Ve(St,"file-infos")),d(at,"FTSPPresets",fu),d(at,"Humans",mu),d(at,"Phones",pu),d(at,"Schemas",Cu),d(at,"UserAccounts",Bu),d(at,"ValueTypes",Nu),d(at,"Search",er),at);var jt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(jt||{});let $u=(Yt=class{},d(Yt,"Orders",dt),d(Yt,"Sizes",jt),d(Yt,"Statuses",pe),d(Yt,"DataTypes",Re),d(Yt,"ValueTypes",We),d(Yt,"Operators",Be),Yt);class Tu{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 Pu=new Tu;class Mu{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 Ee.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ee.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=>Ee.SearchIn(i.name,this.filterString)):t.children}}const Iu=new Mu;class Ru{constructor(){d(this,"Menu",e.reactive(Iu));d(this,"Head",e.reactive(Pu))}}const Au=new Ru,ha="Да",pa="Нет";class zu extends Vn{constructor(){super(...arguments);d(this,"confirmButtonText",ha);d(this,"cancelButtonText",pa);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??ha,this.cancelButtonText=i.cancelButtonText??pa,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof b.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=b.Dialog.create({title:this.title||void 0,message:this.text,html:Vn.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 Du=new zu;class Fu{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Ou extends Fu{Show(){super.show()}Hide(){super.hide()}}const Lu=new Ou;class Wt{}d(Wt,"Admin",Au),d(Wt,"Dialog",Du),d(Wt,"Loading",Lu),d(Wt,"Notify",Nn),d(Wt,"Btn",on),d(Wt,"Input",os);class D{}d(D,"Auth",e.reactive(Oe)),d(D,"UI",e.reactive(Wt)),d(D,"Paginator",e.reactive(ra)),d(D,"S",ma),d(D,"H",Kf),d(D,"C",xc),d(D,"T",$u),d(D,"I",tu),d(D,"F",$c);const uo=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(b.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"]))}}),ne=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:jt.M,required:!1},type:{type:String,default:pe.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 S={};for(const T of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(T)||(S[T]=o[T]);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?pe.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}),f={[pe.Primary]:"primary",[pe.Success]:"positive",[pe.Warning]:"warning",[pe.Error]:"negative",[pe.Info]:"info"},u=e.computed(()=>o.color!==void 0?o.color:f[c.value]??"primary"),m={[jt.XS]:"xs",[jt.S]:"sm",[jt.M]:"md",[jt.L]:"lg",[jt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),k=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),E=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),V=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),N=e.computed(()=>o.disable??t.disabled);return(S,T)=>(e.openBlock(),e.createBlock(e.unref(b.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(u),size:e.unref(p),flat:e.unref(k),outline:e.unref(E),unelevated:e.unref(V),disable:e.unref(N),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"]))}}),_u=["innerHTML"],Hu={key:1},tr=z(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(b.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,_u)):(e.openBlock(),e.createElementBlock("span",Hu,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=z(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 f of Object.keys(o))f!=="delay"&&(l[f]=o[f]);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,f)=>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(b.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(tr,{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(b.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"]]),Bt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},Ze=z(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 y={};for(const C of Object.keys(s))C!=="id"&&C!=="disable"&&(y[C]=s[C]);return y}),l=n,f=e.computed(()=>s.disable??l.disabled),u=e.ref(null);function m(){var y;(y=u.value)==null||y.focus()}function p(){var y;(y=u.value)==null||y.blur()}function k(){var y;(y=u.value)==null||y.select()}function E(){var y;return(y=u.value)==null?void 0:y.getNativeElement()}async function V(){var y;return await((y=u.value)==null?void 0:y.validate())??!0}function N(){var y;(y=u.value)==null||y.resetValidation()}t({focus:m,blur:p,select:k,getNativeElement:E,validate:V,resetValidation:N});const S=()=>{i("input",r.value)},T=e.computed(()=>{const y={};return l.margin&&(y.margin=l.margin),l.padding&&(y.padding=l.padding),l.width&&(y.width=l.width),l.borderColor&&(y["--p-border-color"]=l.borderColor),y});return(y,C)=>(e.openBlock(),e.createBlock(e.unref(b.QInput),e.mergeProps({ref_key:"input",ref:u,modelValue:r.value,"onUpdate:modelValue":C[0]||(C[0]=$=>r.value=$)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(f),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(T),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":S,onBlur:C[1]||(C[1]=$=>y.$emit("blur",r.value)),onFocus:C[2]||(C[2]=$=>y.$emit("focus",r.value)),onClear:C[3]||(C[3]=$=>y.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-661f4aa7"]]),fn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:{modelValue:{type:Boolean,default:!1,required:!1},persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},emits:["update:modelValue"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(i.modelValue);e.watch(()=>i.modelValue,p=>{s.value=p},{immediate:!0});const a=p=>{s.value=p,r("update:modelValue",p)};t({show:()=>a(!0),hide:()=>a(!1),toggle:()=>a(!s.value),opened:s});const u=e.useAttrs(),m=e.computed(()=>{const p={};for(const k of Object.keys(u))["modelValue","persistent","maximized","transition-show","transition-hide","onUpdate:modelValue"].includes(k)||(p[k]=u[k]);return p});return(p,k)=>(e.openBlock(),e.createBlock(e.unref(b.QDialog),e.mergeProps({modelValue:e.unref(s),"onUpdate:modelValue":k[0]||(k[0]=E=>e.isRef(s)?s.value=E:null)},e.unref(m),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide,"onUpdate:modelValue":a}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),key:"0"}:void 0,p.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),key:"1"}:void 0,p.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"body")]),key:"2"}:void 0,p.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Uu={class:"q-mb-md"},vu={class:"text-subtitle1 text-weight-medium text-grey-9"},qu={class:"text-caption text-grey-6 q-mt-xs"},mo=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=b.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(fn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(e.unref(b.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",vu,e.toDisplayString(n.title),1),e.createElementVNode("div",qu,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(b.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{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"]))}}),ju={class:"q-mr-md"},Wu={class:"text-subtitle1 text-weight-medium text-grey-9"},ho=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=b.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(fn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",ju,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Wu,e.toDisplayString(n.title),1),e.createVNode(e.unref(b.QSpace)),e.withDirectives(e.createVNode(ne,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(b.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(b.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{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"]))}}),Gu={class:"q-mt-sm"},Qu={class:"row items-center justify-between q-mb-xs q-px-xs"},Yu={class:"row items-center q-gutter-xs"},Xu={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Zu={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},Ju={style:{"min-width":"0"}},Ku={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},em={key:0,class:"text-caption text-grey-6 ellipsis"},tm={class:"row items-center no-wrap q-gutter-xs"},nm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},om={class:"text-body2 text-grey-7"},un=z(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Bt,...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(""),f=e.ref(!1),u=e.ref(!1),m=e.ref(!1),p=e.ref(!1),k=e.ref(-1),E=async C=>{C&&(await navigator.clipboard.writeText(C),D.UI.Notify.Success(o.value.copiedEmail))},V=C=>{var $,R;s.value=C,a.value=i.value[C],c.value=t.adapter.emailValue(i.value[C]),l.value=((R=($=t.adapter).emailDescription)==null?void 0:R.call($,i.value[C]))??"",r.value=!0},N=async()=>{if(!a.value||!c.value){D.UI.Notify.Warning(o.value.enterEmail);return}f.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,D.UI.Notify.Success(o.value.saved)}catch{D.UI.Notify.Error("Ошибка при сохранении")}finally{f.value=!1}},S=async()=>{u.value=!0;try{await t.adapter.addEmail(t.contact),V(i.value.length-1)}catch{D.UI.Notify.Error("Ошибка при добавлении")}finally{u.value=!1}},T=C=>{k.value=C,p.value=!0},y=async()=>{var C,$;m.value=!0;try{const R=i.value[k.value];await t.adapter.removeEmail(($=(C=t.adapter).emailId)==null?void 0:$.call(C,R)),i.value.splice(k.value,1),p.value=!1,D.UI.Notify.Success(o.value.deleted)}catch{D.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(C,$)=>(e.openBlock(),e.createElementBlock("div",Gu,[e.createElementVNode("div",Qu,[e.createElementVNode("div",Yu,[e.createVNode(e.unref(b.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Xu,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(u),onClick:S},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),(R,j)=>{var se,ze,Te,Ne,Ke,ht;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).emailId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",C.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Zu,[e.createVNode(e.unref(b.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",Ju,[e.createElementVNode("div",Ku,e.toDisplayString(n.adapter.emailValue(R)),1),(Ne=(Te=n.adapter).emailDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",em,e.toDisplayString((ht=(Ke=n.adapter).emailDescription)==null?void 0:ht.call(Ke,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",tm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.emailValue(R))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>V(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",nm,[e.createVNode(e.unref(b.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",om,e.toDisplayString(e.unref(o).noEmails),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ne,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(u),onClick:S},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"email",title:"Редактирование email",saving:e.unref(f),onSave:N},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterEmail,R=>!R||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),im={class:"q-mt-sm"},rm={class:"row items-center justify-between q-mb-xs q-px-xs"},sm={class:"row items-center q-gutter-xs"},am={class:"text-uppercase text-caption text-weight-medium text-grey-7"},lm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},cm={style:{"min-width":"0"}},dm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},fm={key:0,class:"text-caption text-grey-6 ellipsis"},um={class:"row items-center no-wrap q-gutter-xs"},mm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},hm={class:"text-body2 text-grey-7"},mn=z(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Bt,...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(""),f=e.ref(!1),u=e.ref(!1),m=e.ref(!1),p=e.ref(!1),k=e.ref(-1),E=async C=>{C&&(await navigator.clipboard.writeText(C),D.UI.Notify.Success(o.value.copiedNumber))},V=C=>{var $,R;s.value=C,a.value=i.value[C],c.value=t.adapter.phoneNumber(i.value[C]),l.value=((R=($=t.adapter).phoneDescription)==null?void 0:R.call($,i.value[C]))??"",r.value=!0},N=async()=>{if(!a.value||!c.value){D.UI.Notify.Warning(o.value.enterPhone);return}f.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,D.UI.Notify.Success(o.value.saved)}catch{D.UI.Notify.Error("Ошибка при сохранении")}finally{f.value=!1}},S=async()=>{u.value=!0;try{await t.adapter.addPhone(t.contact),V(i.value.length-1)}catch{D.UI.Notify.Error("Ошибка при добавлении")}finally{u.value=!1}},T=C=>{k.value=C,p.value=!0},y=async()=>{var C,$;m.value=!0;try{const R=i.value[k.value];await t.adapter.removePhone(($=(C=t.adapter).phoneId)==null?void 0:$.call(C,R)),i.value.splice(k.value,1),p.value=!1,D.UI.Notify.Success(o.value.deleted)}catch{D.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(C,$)=>(e.openBlock(),e.createElementBlock("div",im,[e.createElementVNode("div",rm,[e.createElementVNode("div",sm,[e.createVNode(e.unref(b.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",am,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(u),onClick:S},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),(R,j)=>{var se,ze,Te,Ne,Ke,ht;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).phoneId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",C.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",lm,[e.createVNode(e.unref(b.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",cm,[e.createElementVNode("div",dm,e.toDisplayString(n.adapter.phoneNumber(R)),1),(Ne=(Te=n.adapter).phoneDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",fm,e.toDisplayString((ht=(Ke=n.adapter).phoneDescription)==null?void 0:ht.call(Ke,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",um,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.phoneNumber(R))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>V(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",mm,[e.createVNode(e.unref(b.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",hm,e.toDisplayString(e.unref(o).noPhones),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ne,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(u),onClick:S},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(f),onSave:N},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.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(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),pm={class:"row items-center q-gutter-sm"},gm={class:"text-weight-medium text-grey-9"},ym=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Bt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Bt,...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 f=s.value;f&&(await navigator.clipboard.writeText(f),D.UI.Notify.Success(o.value.copied))};return(f,u)=>(e.openBlock(),e.createBlock(e.unref(b.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",pm,[e.createVNode(ne,{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(b.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",gm,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(uo,{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(b.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(ne,{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(()=>[...u[1]||(u[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(b.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(b.QSeparator)),e.createVNode(e.unref(b.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(b.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"]))}}),nr=z(ym,[["__scopeId","data-v-327b9235"]]),wm={class:"contact-edit-wrapper"},or=z(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Bt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",wm,[e.createVNode(mn,{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"]]),bm={class:"edit-emails-wrapper"},ir=z(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Bt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",bm,[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"]]),Cm={class:"edit-phones-wrapper"},rr=z(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Bt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Cm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),Sm={class:"contact-view-wrapper"},sr=z(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Bt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Sm,[e.createVNode(mn,{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 ga(n){n.component("PContactForm",nr),n.component("PContactFormDeleteDialog",mo),n.component("PContactFormEdit",or),n.component("PContactFormEditDialog",ho),n.component("PContactFormEditEmails",ir),n.component("PContactFormEditPhones",rr),n.component("PContactFormView",sr),n.component("PContactFormViewEmails",un),n.component("PContactFormViewPhones",mn)}const km=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:nr,PContactFormDeleteDialog:mo,PContactFormEdit:or,PContactFormEditDialog:ho,PContactFormEditEmails:ir,PContactFormEditPhones:rr,PContactFormView:sr,PContactFormViewEmails:un,PContactFormViewPhones:mn,default:ga,defaultContactsLabels:Bt},Symbol.toStringTag,{value:"Module"}));class hn{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);D.H.Classes.BuildClass(this,t)}static Create(t){const o=new hn;return o.id=D.H.Id.UUID(),o.fieldId=t,o}}class ya{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");D.H.Classes.BuildClass(this,t)}}class ar{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);D.H.Classes.BuildClass(this,t)}}class Dn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");D.H.Classes.BuildClass(this,t)}static Create(t){const o=new Dn;return o.id=D.H.Id.UUID(),o.fieldId=t,o}}var xm=Object.defineProperty,po=(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 pn=class Ci{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 ua);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);D.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 Ci;return o.id=D.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 hn(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 ar(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new Dn)}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=hn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=Ci.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=Dn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new Ci(this);return t.id=D.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=D.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};po([D.H.Classes.GetClassConstructor(hn)],pn.prototype,"answerVariants"),po([D.H.Classes.GetClassConstructor(ya)],pn.prototype,"fieldExamples"),po([D.H.Classes.GetClassConstructor(Dn)],pn.prototype,"fieldVariants"),po([D.H.Classes.GetClassConstructor(ar)],pn.prototype,"fieldMeasures"),po([D.H.Classes.GetClassConstructor(pn)],pn.prototype,"children");let Zo=pn;class lr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new St);D.H.Classes.BuildClass(this,t)}}class gn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");D.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new gn;return i.id=vt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var Em=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&&Em(t,o,r),r};const cr=class ts{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new St);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",[]);D.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new ts;return i.id=vt(),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=>ts.Create(i,o))}addFile(){const t=new lr;return t.id=vt(),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=gn.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=gn.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}};wa([D.H.Classes.GetClassConstructor(gn)],cr.prototype,"selectedAnswerVariants"),wa([D.H.Classes.GetClassConstructor(lr)],cr.prototype,"answerFiles");let Fn=cr;class Bm{constructor(t){d(this,"id");d(this,"fieldId");D.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Vm=Object.defineProperty,Nm=(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&&Vm(t,o,r),r};const ba=class Jl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");D.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 Jl;return o.id=D.H.Id.UUID(),o.formId=t,o}addField(){const t=Zo.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}};Nm([D.H.Classes.GetClassConstructor(Zo)],ba.prototype,"fields");let Jo=ba;var $m=Object.defineProperty,Tm=(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&&$m(t,o,r),r};const Ca=class Kl{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);D.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new Kl;return t.id=D.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Jo.Create(this.id);return this.formSections.push(t),D.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)}};Tm([D.H.Classes.GetClassConstructor(Jo)],Ca.prototype,"formSections");let Sa=Ca;var Pm=Object.defineProperty,Mm=(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 ka=class ec{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");D.H.Classes.BuildClass(this,t)}static Create(t){const o=new ec;return o.id=D.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...Fn.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 Fn;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=Fn.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,""):""}};Mm([D.H.Classes.GetClassConstructor(Fn)],ka.prototype,"fieldFills");let xa=ka;const Im=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:hn,Field:Zo,FieldExample:ya,FieldFill:Fn,FieldFillFile:lr,FieldFilter:Bm,FieldMeasure:ar,FieldVariant:Dn,Form:Sa,FormFill:xa,FormSection:Jo,SelectedAnswerVariant:gn},Symbol.toStringTag,{value:"Module"}));let Rm=class extends Ve{constructor(){super(hn,"answer-variants")}};const Am=new Rm;let zm=class extends Ve{constructor(){super(Fn,"field-fills")}};const Dm=new zm;let Fm=class extends Ve{constructor(){super(Zo,"fields")}};const Om=new Fm;let Lm=class extends Ve{constructor(){super(xa,"form-fills")}};const _m=new Lm;let Hm=class extends Ve{constructor(){super(Jo,"form-sections")}};const Um=new Hm;let vm=class extends Ve{constructor(){super(Sa,"forms")}};const qm=new vm;let jm=class extends Ve{constructor(){super(gn,"selected-answer-variants")}};const Wm=new jm,Gm=Object.freeze(Object.defineProperty({__proto__:null,C:Im,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Am,FieldFills:Dm,Fields:Om,FormFills:_m,FormSections:Um,Forms:qm,SelectedAnswerVariants:Wm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ko{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 St);d(this,"iconName","");d(this,"svgCode","");J.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Qm=Object.defineProperty,Ym=(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&&Qm(t,o,r),r};class dr{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 St);J.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=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Ko)}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"}}Ym([J.GetClassConstructor(Ko)],dr.prototype,"subMenus");const Xm=Object.freeze(Object.defineProperty({__proto__:null,Menu:dr,SubMenu:Ko},Symbol.toStringTag,{value:"Module"}));let Zm=class extends D.H.BaseStore{constructor(){super(dr,"menus")}};const Jm=new Zm;let Km=class extends D.H.BaseStore{constructor(){super(Ko,"sub-menus")}};const eh=new Km,th=Object.freeze(Object.defineProperty({__proto__:null,C:Xm,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Jm,SubMenus:eh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Dt{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",{});D.H.Classes.BuildClass(this,t)}static Create(t){const o=new Dt;return o.id=D.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var nh=Object.defineProperty,oh=(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&&nh(t,o,r),r};const Ea=class tc{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);D.H.Classes.BuildClass(this,t)}static Create(t){const o=new tc;return o.id=D.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};oh([D.H.Classes.GetClassConstructor(Dt)],Ea.prototype,"slots");let On=Ea;var ih=Object.defineProperty,Ba=(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&&ih(t,o,r),r};const fr=class nc{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);D.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new nc;return i.id=D.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=On.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Dt.Create(this.id);return this.slots.push(t),t}};Ba([D.H.Classes.GetClassConstructor(On)],fr.prototype,"sessions"),Ba([D.H.Classes.GetClassConstructor(Dt)],fr.prototype,"slots");let go=fr;var rh=Object.defineProperty,sh=(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&&rh(t,o,r),r};const Va=class oc{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);D.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new oc;return r.id=D.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};sh([D.H.Classes.GetClassConstructor(go)],Va.prototype,"schedules");let ei=Va;class Ln{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");D.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=D.H.Id.UUID(),t}}const ah=Object.freeze(Object.defineProperty({__proto__:null,Schedule:go,ScheduleDay:ei,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Dt},Symbol.toStringTag,{value:"Module"})),ce=n=>n?D.H.Time.HMtoM(n):NaN,Ge=n=>D.H.Time.ConcatHM(Math.floor(n/60),n%60),yn=n=>{if(!n)return"";const t=D.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},_n=(n,t)=>D.H.Time.DiffM(n,t),yt=(n,t)=>D.H.Time.AddMtoHM(n,t),ur=(n,t)=>{const o=ce(n.startTime),i=ce(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},yo=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime),r=ce(t.startTime),s=ce(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},wo=(n,t)=>Math.round(n/t)*t,Na=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ce(c.startTime),f=ce(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(f)&&(r=Math.max(r,f))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},$a=(n,t)=>{const o=ce(n.item.startTime),i=ce(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+"%"}},Ta=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ce(t.startTime),a=ce(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+"%"}},Pa=(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)),Ma=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Ia=(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})},Ra=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",mr={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:"пересечение"},Aa={createDay(n){return ei.Create(void 0,void 0,n)},createSchedule(n,t){return go.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=On.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=D.H.Time.AddMtoHM(i,30),r},createSlot(n){return Dt.Create(n==null?void 0:n.id)},createPlace(n){const t=Ln.Create();return t.name=n||"",t}},lh={class:"date-field"},ch=z(e.defineComponent({__name:"DateField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(""),a=e.computed(()=>{if(!o.modelValue)return"";const f=new Date(`${o.modelValue}T00:00:00`);return isNaN(f.getTime())?o.modelValue:f.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})});e.watch(r,f=>{f&&(s.value=o.modelValue||"")});const c=()=>{i("update:modelValue",s.value),r.value=!1},l=()=>{r.value=!1};return(f,u)=>(e.openBlock(),e.createElementBlock("div",lh,[e.createVNode(e.unref(b.QInput),{"model-value":a.value,label:n.label,dense:"",outlined:"",readonly:"",class:"date-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"event",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=m=>r.value=m),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{class:"date-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QDate),{modelValue:s.value,"onUpdate:modelValue":u[0]||(u[0]=m=>s.value=m),mask:"YYYY-MM-DD",color:"primary",navigation:"","today-btn":""},null,8,["modelValue"]),e.createVNode(e.unref(b.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:l}),e.createVNode(e.unref(b.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:c})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5eaf00e0"]]),dh={class:"time-field"},Hn=z(e.defineComponent({__name:"TimeField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref("09:00"),a=m=>{const p=/^(\d{1,2}):(\d{2})$/.exec((m??"").trim());return p?`${p[1].padStart(2,"0")}:${p[2]}`:"09:00"},c=m=>{const p=/^(\d{2}):(\d{2})$/.exec(m??"");return p?`${Number(p[1])}:${p[2]}`:m},l=e.computed(()=>o.modelValue||"");e.watch(r,m=>{m&&(s.value=a(o.modelValue))});const f=()=>{i("update:modelValue",c(s.value)),r.value=!1},u=()=>{r.value=!1};return(m,p)=>(e.openBlock(),e.createElementBlock("div",dh,[e.createVNode(e.unref(b.QInput),{"model-value":l.value,label:n.label,dense:"",outlined:"",readonly:"",class:"time-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"schedule",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=k=>r.value=k),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{class:"time-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QTime),{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=k=>s.value=k),format24h:"",color:"primary",class:"q-pa-sm"},null,8,["modelValue"]),e.createVNode(e.unref(b.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:u}),e.createVNode(e.unref(b.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:f})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5c1e0137"]]),fh={class:"schedule-admin"},uh={key:0,class:"no-days text-center text-grey q-py-xl"},mh={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},hh={key:5,class:"row items-center q-gutter-xs zoom-control"},ph={key:0,class:"grid-view"},gh={key:0,class:"text-grey text-center q-py-lg"},yh={class:"grid-header"},wh={class:"row items-center justify-center q-gutter-xs"},bh={class:"ellipsis"},Ch={class:"time-gutter"},Sh=["data-schedule-id","onDblclick","onContextmenu"],kh=["title","onPointerdown","onClick","onContextmenu"],xh={class:"block-content"},Eh={class:"block-time"},Bh={class:"block-name ellipsis"},Vh={key:0,class:"block-speakers ellipsis"},Nh={key:0,class:"session-perfoms"},$h=["title","onPointerdown","onClick","onContextmenu"],Th={class:"nested-time"},Ph={class:"nested-name ellipsis"},Mh={key:0,class:"nested-speakers ellipsis"},Ih=["title","onPointerdown"],Rh={class:"block-actions"},Ah=["title","onPointerdown"],zh=["title"],Dh={class:"session-spine-name"},Fh={class:"block-time"},Oh={key:0,class:"session-badge"},Lh={key:1,class:"conflict-badge"},_h={class:"block-name ellipsis"},Hh={class:"text-caption text-grey-6 q-pa-xs"},Uh={key:1,class:"list-view"},vh={class:"row items-center q-gutter-sm"},qh={class:"text-subtitle2"},jh={key:0,class:"sub-block"},Wh={class:"sub-title"},Gh={class:"list-row session-row"},Qh={key:0,class:"nested-list"},Yh={class:"col-4 ellipsis"},Xh={class:"time-text"},Zh={class:"sub-block"},Jh={class:"sub-title"},Kh={class:"list-row slot-row"},ep={key:0,class:"text-grey text-center q-py-sm"},tp={class:"text-caption text-grey-6 q-mb-sm"},np={class:"text-h6"},op={class:"row items-center q-gutter-sm q-mb-md"},ip={key:0,class:"text-grey text-center q-py-md"},rp={class:"col ellipsis"},sp={class:"text-h6"},ap={class:"row q-col-gutter-sm q-mb-sm"},lp={class:"col-6"},cp={class:"col-6"},dp=["onClick"],wn=15,za=6,Da=z(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},daysEnabled:{type:Boolean,default:!0},placesEnabled:{type:Boolean,default:!0}},setup(n){var jl,Wl;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>t.daysEnabled!==!1),r=e.computed(()=>t.placesEnabled!==!1),s=e.computed(()=>({...mr,duplicate:"Дублировать",...t.labels})),a=e.computed(()=>({...Aa,...t.factories})),c=h=>t.slotListOf?t.slotListOf(h):(h==null?void 0:h.slots)||[],l=h=>t.nestedSlotListOf?t.nestedSlotListOf(h):(h==null?void 0:h.slots)||[],f=h=>(h==null?void 0:h.name)||s.value.hall,u=h=>t.sessionName?t.sessionName(h):(h==null?void 0:h.name)||`${s.value.session} ${(h==null?void 0:h.startTime)||""}–${(h==null?void 0:h.endTime)||""}`.trim(),m=h=>t.slotName?t.slotName(h):(h==null?void 0:h.name)||s.value.slot,p=h=>t.slotSubtitle?t.slotSubtitle(h):"",k=e.ref("grid"),E=e.ref((Wl=(jl=t.days)==null?void 0:jl[0])==null?void 0:Wl.id),V=e.ref(!1),N=e.ref(""),S=e.ref(!1),T=e.ref(null),y=e.ref(null),C=e.ref(void 0),$=e.ref(null),R=e.ref(null),j=e.ref(!1),se=e.ref(0),ze=e.ref(null),Te=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],Ne=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(Ne,h=>localStorage.setItem("schedule-grid-zoom",String(h)));const Ke=e.computed(()=>Math.max(le.value.total/60*Ne.value,360)),ht=e.computed(()=>Ke.value+"px"),ye=e.computed(()=>[...t.days||[]].sort((h,g)=>new Date(h.date).getTime()-new Date(g.date).getTime())),Se=e.computed(()=>ye.value.find(h=>h.id===E.value));e.watch(()=>ye.value.map(h=>h.id).join(","),()=>{var h;(!E.value||!ye.value.some(g=>g.id===E.value))&&(E.value=(h=ye.value[0])==null?void 0:h.id)});const bt=h=>{if(t.dayTitle)return t.dayTitle(h);const g=new Date(h.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Xt=h=>{const g=new Date(h);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Qn=async(h,g)=>{g&&(h.date=new Date(g),await t.persist.updateDay(h),await t.persist.refresh())},Cn=async h=>{var w;if(!h)return;for(const M of he(h))await Sn(M);await t.persist.removeDay(h);const g=(t.days||[]).indexOf(h);g>=0&&t.days.splice(g,1),await t.persist.refresh(),E.value=(w=ye.value[0])==null?void 0:w.id},it=async()=>{var F,Y;const h=ye.value,g=h[h.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let M;try{M=a.value.createDay(w)}catch{t.persist.notify("warning",s.value.saveEventFirst);return}try{await((Y=(F=t.persist).createDay)==null?void 0:Y.call(F,M));for(const ue of t.places||[])await we(ue,M);await t.persist.refresh()}catch{t.persist.notify("negative",s.value.createFailed);return}E.value=M.id,t.persist.notify("positive",`${s.value.dayAdded}: ${bt(M)}`)},he=h=>((h==null?void 0:h.schedules)||[]).slice().sort((g,w)=>{const M=W(g),F=W(w);return M.localeCompare(F,"ru")}),W=h=>{if(t.hallName)return t.hallName(h);const g=h.place||(t.places||[]).find(w=>w.id===h.placeId);return(g==null?void 0:g.name)||s.value.hall},Qe=()=>{V.value=!0},Tt=e.computed(()=>{const h=Se.value,g=new Set(((h==null?void 0:h.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),we=async(h,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(h,g,a.value.createSchedule);return}const w=a.value.createSchedule(h.id,g.id);await t.persist.createSchedule(w)},ae=async h=>{V.value=!1;const g=Se.value;if(!g){t.persist.notify("warning",s.value.selectDayFirst);return}if(he(g).some(w=>w.placeId===h.id)){t.persist.notify("warning",s.value.alreadyAdded);return}try{await we(h,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",s.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),E.value=g.id},ve=async()=>{var w,M,F;const h=(w=N.value)==null?void 0:w.trim();if(!h){t.persist.notify("warning",s.value.enterName);return}const g=a.value.createPlace(h);try{if(!await((F=(M=t.persist).createPlace)==null?void 0:F.call(M,g))){t.persist.notify("negative",s.value.hallCreateFailed);return}}catch(Y){console.warn("createPlace failed:",Y),t.persist.notify("negative",s.value.hallCreateFailed);return}N.value="",await ae(g),t.persist.notify("positive",s.value.hallCreated.replace("{name}",h))},Pt=async h=>{await Sn(h);const g=rt(h);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==h.id)),await t.persist.refresh()},Sn=async h=>{for(const g of h.sessions||[]){for(const w of l(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of c(h))await t.persist.removeSlot(g);await t.persist.removeSchedule(h)},rt=h=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===h.id)),st=h=>[...l(h)].sort(ur),Ye=h=>(h.sessions||[]).some(g=>l(g).length>0),Zt=new WeakMap,Ht=h=>{const g=Zt.get(h),w=c(h);if(g&&g.src===w)return g.list;const M=new Set((h.sessions||[]).map(Y=>Y.id)),F=w.filter(Y=>!Y.sessionId||!M.has(Y.sessionId));return Zt.set(h,{src:w,list:F}),F},De=h=>[...o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],...Ht(h).map(g=>({kind:"slot",item:g}))],ee=h=>o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],le=e.computed(()=>{var g,w;const h=(((g=Se.value)==null?void 0:g.schedules)||[]).flatMap(M=>De(M));for(const M of((w=Se.value)==null?void 0:w.schedules)||[])for(const F of M.sessions||[])h.push(...st(F).map(Y=>({kind:"slot",item:Y})));return Na(h)}),lt=e.computed(()=>{const h=[];for(let g=le.value.start;g<=le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),pt=e.computed(()=>{const h=[];for(let g=le.value.start+30;g<le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),Jt=h=>$a(h,le.value),kn=e.computed(()=>{if(!$.value||!y.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(y.value.duration/h.total*100,2.5);return{top:g+"%",height:w+"%"}}),Mt=e.computed(()=>!$.value||!y.value?"":Ge($.value.minutes+y.value.duration)),Wr=e.computed(()=>{if(!$.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(wn/h.total*100,1.5);return{top:g+"%",height:w+"%"}}),xn=e.computed(()=>{var F,Y,ue,Pe,Ie;if(!$.value||!y.value||!y.value.id)return 0;const h=Xn($.value.scheduleId);if(!h)return 0;const g={startTime:$.value.time,endTime:Mt.value},w=(F=$.value.session)==null?void 0:F.id;let M=0;for(const A of De(h))A.item.id!==((Y=y.value)==null?void 0:Y.id)&&(((ue=y.value)==null?void 0:ue.kind)==="slot"&&A.kind==="session"&&A.item.id===w||yo(g,A.item)&&M++);if(((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&$.value.session)for(const A of st($.value.session))A.id!==((Ie=y.value)==null?void 0:Ie.id)&&yo(g,A)&&M++;return M}),gi=e.computed(()=>xn.value>0),Kt=(h,g)=>Pa(De(h),g,yo),Gr=(h,g)=>Ma(st(h),g,yo),Qr=(h,g)=>Ta(h,g),Yr=h=>{const g=le.value,w=ce(h.item.startTime),M=ce(h.item.endTime);return!isFinite(w)||!isFinite(M)?48:(M-w)/g.total*Ke.value},en=h=>Ra(Yr(h)),B=h=>{const g=t.slotName?t.slotName(h.item):h.item.name||(h.kind==="session"?s.value.session:s.value.slot);if(h.kind==="slot"&&en(h)!=="h-full"){const w=p(h.item);if(w)return`${g} — ${w}`}return g},P=(h,g)=>{const w=m(h);if(g!=="h-full"){const M=p(h);if(M)return`${w} — ${M}`}return w},I=h=>{const g=`${h.item.startTime||"?"}–${h.item.endTime||"?"}`;if(h.kind==="slot"){const w=p(h.item);return[m(h.item),g,w?`${s.value.participants}: ${w}`:""].filter(Boolean).join(`
23
- `)}return[u(h.item),g].filter(Boolean).join(`
22
+ `+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=cn(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&Wo.assertOptions(i,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),r!=null&&(x.isFunction(r)?o.paramsSerializer={serialize:r}:Wo.assertOptions(r,{encode:je.function,serialize:je.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Wo.assertOptions(o,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&x.merge(s.common,s[o.method]);s&&x.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete s[E]}),o.headers=qe.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(o)===!1)return;l=l&&P.synchronous;const B=o.transitional||Li;B&&B.legacyInterceptorReqResOrdering?c.unshift(P.fulfilled,P.rejected):c.push(P.fulfilled,P.rejected)});const u=[];this.interceptors.response.forEach(function(P){u.push(P.fulfilled,P.rejected)});let f,m=0,p;if(!l){const E=[Js.bind(this),void 0];for(E.unshift(...c),E.push(...u),p=E.length,f=Promise.resolve(o);m<p;)f=f.then(E[m++],E[m++]);return f}p=c.length;let S=o;for(;m<p;){const E=c[m++],P=c[m++];try{S=E(S)}catch(B){P.call(this,B);break}}try{f=Js.call(this,S)}catch(E){return Promise.reject(E)}for(m=0,p=u.length;m<p;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=cn(this.defaults,t);const o=Us(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Rs(o,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){dn.prototype[t]=function(o,i){return this.request(cn(i||{},{method:t,url:o,data:i&&x.hasOwnProp(i,"data")?i.data:void 0}))}}),x.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(cn(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}dn.prototype[t]=o(),t!=="query"&&(dn.prototype[t+"Form"]=o(!0))});let Cu=class Jl{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 so(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 Jl(function(r){t=r}),cancel:t}}};function Su(n){return function(o){return n.apply(null,o)}}function ku(n){return x.isObject(n)&&n.isAxiosError===!0}const Wi={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(Wi).forEach(([n,t])=>{Wi[t]=n});function ea(n){const t=new dn(n),o=ps(dn.prototype.request,t);return x.extend(o,dn.prototype,t,{allOwnKeys:!0}),x.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return ea(cn(n,r))},o}const $e=ea(ro);$e.Axios=dn,$e.CanceledError=so,$e.CancelToken=Cu,$e.isCancel=Fs,$e.VERSION=vi,$e.toFormData=Ho,$e.AxiosError=_,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=Su,$e.isAxiosError=ku,$e.mergeConfig=cn,$e.AxiosHeaders=qe,$e.formToJSON=n=>Ds(x.isHTMLForm(n)?new FormData(n):n),$e.getAdapter=Zs.getAdapter,$e.HttpStatusCode=Wi,$e.default=$e;const{Axios:Jw,AxiosError:Kw,CanceledError:eb,isCancel:tb,CancelToken:nb,VERSION:ob,all:ib,Cancel:rb,isAxiosError:sb,spread:ab,toFormData:lb,AxiosHeaders:cb,HttpStatusCode:db,formToJSON:ub,getAdapter:fb,mergeConfig:mb,create:hb}=$e;var ao=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ao||{});const lo=(()=>{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=lo.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 Gi{constructor(t){d(this,"code",400);d(this,"err","");J.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=lo.getAccessToken(),t.config.headers.token=lo.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){jt.Error("Неверный логин или пароль");return}jt.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new Gi(t.response.data).getErr();r&&jt.Error(r)}return Promise.reject(t)}}}const An=$e.create();An.interceptors.response.use(n=>n,async n=>await Gi.Handle(n,An));class co{static async Get(t,o,i){return await An({method:ao.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await An({method:ao.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await An({method:ao.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await An({method:ao.DELETE,url:t,headers:o})}}class Go{constructor(t){d(this,"name","");J.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=Go.Get(t,i),r||(r=await o()),r}}var Qi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Qi||{}),ta=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(ta||{});const ge=class ge{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ee.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=ge.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=St.Get(dt.AccessToken);return t||(t=ge.headers),o&&(t[Qi.Token]=o),t??ge.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ge.download(t.downloadFileName,o):o.data}static async Get(t){return ge.returnResponse(t,await co.Get(ge.buildUrl((t==null?void 0:t.query)??""),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ge.returnResponse(t,await co.Post(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t.isBlob),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ge.returnResponse(t,await co.Put(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ge.returnResponse(t,await co.Delete(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ge.buildUrl(o))}static buildUrl(t=""){try{return Ni(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(ge,"baseUrl",""),d(ge,"apiVersion","api"),d(ge,"host",""),d(ge,"headers",{[Qi.ContentType]:ta.ApplicationJson});let Ce=ge;const D=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},xu={},Eu={style:{"text-align":"center"}};function Bu(n,t){return e.openBlock(),e.createElementBlock("div",Eu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const na=D(xu,[["render",Bu]]),Vu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:na}],ht=class ht{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(Vu)}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 ht.GetStringParam("id")}static Slug(){return ht.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ht.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=ht.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 ht.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(ht,"router"),d(ht,"title",""),d(ht,"ChangeDocumentTitle",(t="")=>{let o=ht.Route().meta.title??t;o&&(o=" | "+o),document.title=ht.title+o});let Et=ht;class Ve{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 Ce.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=Ce.Get;t&&t.withCache?o=await Go.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=Et.Id()),this.Set(await Ce.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Et.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)??xt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.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 Ce.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 Ce.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 Ce.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(){J.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 Nu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const $u=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Tu{static GetRandColor(t){return Dt.GetRandEL(t??$u)}}function oa(n,t){const o=[],i=t||ut.Asc,r=i===ut.Asc?ut.Desc:ut.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 Pu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Jn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Po[Jn.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=Po[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 Yi=n=>n===8||n===46,Mu=n=>n>46&&n<58,Ru=n=>n>34&&n<41,Iu=n=>n+".",Au=(n,t,o)=>{Yi(t)||Ru(t)||(!Mu(t)||o>9)&&n.preventDefault()};function zu(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 Du(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Au(n,t,i),!Yi(t)&&(i===2||i===5)&&(o=Iu(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(Yi(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=zu(o,i),n.srcElement.value=o}const Fu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Ou="ru-RU";class Ze{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(Ou,i).format(new Date(t))}static FormatWithTime(t){return Ze.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?Fu[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=Ze.SplitHourTime(t),a=Ze.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=Ze.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=Ze.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=Ze.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()}static ParseRu(t){if(!t)return null;const o=String(t).match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!o)return null;const i=+o[1],r=+o[2],s=+o[3];if(i<1||i>31||r<1||r>12||s<1900||s>2100)return null;const a=new Date(s,r-1,i);return a.getFullYear()!==s||a.getMonth()!==r-1||a.getDate()!==i?null:a}static ToRu(t){if(!t||Number.isNaN(t.getTime()))return"";const o=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0");return`${o}.${i}.${t.getFullYear()}`}static RuToIso(t){const o=Ze.ParseRu(t);if(!o)return"";const i=String(o.getMonth()+1).padStart(2,"0"),r=String(o.getDate()).padStart(2,"0");return`${o.getFullYear()}-${i}-${r}`}static IsoToRu(t){if(!t)return"";const o=String(t).match(/^(\d{4})-(\d{2})-(\d{2})/);if(o)return`${o[3]}.${o[2]}.${o[1]}`;const i=new Date(t);return Number.isNaN(i.getTime())?"":Ze.ToRu(i)}}class Lu{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 ia{static Get(t){const o=t.split(".");return o[o.length-1]}}const _u=(()=>{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 Hu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=oa(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 un=new Hu;function Uu(){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 vu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),un.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Uu(),i=s=>sc.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 ra(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 Xi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Et.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 Xi;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,Et.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 gi=class gi{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(gi,"validatePhone",(t,o,i)=>{gi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Zi=gi;class qu{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 ju{static async Auth(t){t&&t()}static Dev(){}}class Wu{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",Jn.FiveMinutes);d(this,"timelines",Po[Jn.FiveMinutes])}periodIsCorrect(t,o){return re.GtOrEq(t,this.startHM)&&re.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Po[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=>!re.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>re.HMtoM(o.startTime)-re.HMtoM(i.startTime))}}const Gu=-68;function Qu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Gu;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Yu{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Qo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Qo.Wait(re.S(t),o)}static WaitM(t,o){return Qo.Wait(re.M(t),o)}}class Yo{static Message(t){var i;const o=(i=t==null?void 0:t.response)==null?void 0:i.data;if(typeof o=="string"&&o)return o;if(o&&typeof o=="object"){const r=o;if(r.error)return r.error;if(r.message)return r.message}return t instanceof Error&&t.message?t.message:""}static async Run(t,o={}){var i,r;try{const s=await t();return!o.silent&&o.success&&jt.Success(o.success),(i=o.onSuccess)==null||i.call(o,s),{ok:!0,data:s}}catch(s){return o.silent||jt.Error(o.message||Yo.Message(s)||"Произошла ошибка"),(r=o.onError)==null||r.call(o,s),{ok:!1,error:s}}}static async Silent(t){return Yo.Run(t,{silent:!0})}}const zn=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Xu=(n="Обязательное поле")=>t=>zn(t)?n:!0,Zu=(n="Некорректный email")=>t=>zn(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,Ju=(n,t=`Минимум ${n} символов`)=>o=>zn(o)||String(o).length>=n?!0:t,Ku=(n,t=`Максимум ${n} символов`)=>o=>zn(o)||String(o).length<=n?!0:t,ef=(n,t="Некорректное значение")=>o=>zn(o)||n.test(String(o))?!0:t,sa=(n="Некорректная дата",t=!1)=>o=>zn(o)?t?n:!0:Ze.ParseRu(String(o))?!0:n,tf=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},DateRu:sa,Email:Zu,MaxLen:Ku,MinLen:Ju,Regex:ef,Required:Xu},Symbol.toStringTag,{value:"Module"})),nf=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 Xo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");J.BuildClass(this,t)}static Create(t,o,i,r){const s=new Xo;return s.id=Wt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Xo;return t.type="ping",t.id=Wt(),t}isMessage(){return this.type==="message"||this.type===""}}const of="";class rf{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);J.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(Xo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,of.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 sf=(oe=class{},d(oe,"Arrays",Dt),d(oe,"Axios",co),d(oe,"BaseStore",Ve),d(oe,"Cache",Go),d(oe,"Classes",J),d(oe,"CarouselSwipe",Nu),d(oe,"Color",Tu),d(oe,"CreateSortModels",oa),d(oe,"Cursor",Pu),d(oe,"DateMask",Du),d(oe,"Dates",Ze),d(oe,"Dragger",Lu),d(oe,"Extension",ia),d(oe,"Favourite",_u),d(oe,"Hooks",vu),d(oe,"HttpClient",Ce),d(oe,"Id",Xe),d(oe,"MakeCarousel",ra),d(oe,"Period",Bi),d(oe,"PhoneService",Zi),d(oe,"Rating",qu),d(oe,"Router",Et),d(oe,"RouterGuard",ju),d(oe,"Scheduler",Wu),d(oe,"Scroll",Qu),d(oe,"Sorter",Yu),d(oe,"Static",$i),d(oe,"Strings",Ee),d(oe,"Time",re),d(oe,"Timer",Qo),d(oe,"Token",lo),d(oe,"Try",Yo),d(oe,"Menus",Xi),d(oe,"Validate",tf),d(oe,"WaitElement",nf),d(oe,"WebSocketClient",rf),oe);class af{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 aa=new af;var la=(n=>(n.TableList="tableList",n.Default="",n))(la||{}),Bt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Bt||{}),ca=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ca||{}),da=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(da||{}),Ji=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Ji||{});const lf=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:la,Animations:Bt,CalendarScale:ca,LocalStoreKeys:dt,SocialTypes:da,ValueRelation:Ji},Symbol.toStringTag,{value:"Module"}));let cf=class{async Login(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Ce.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Et.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:lo.getRefreshToken()}})}async CheckUuid(t){await Ce.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ce.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ce.Get({query:`auth/email-is-confirm/${t}`})}};const df=new cf;var uf=Object.defineProperty,Zo=(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&&uf(t,o,r),r};const uo=class Kl{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Mo]);d(this,"phones",[]);d(this,"websites",[]);J.BuildClass(this,t)}addEmail(){const t=Kn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=sn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Kl;return t.id=Xe.UUID(),t}removeEmail(t){J.RemoveFromClassById(t,this.emails)}removePhone(t){J.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Mo)}addWebsite(){this.websites.push(new Ti)}pushFirst(){this.emails.length||this.emails.push(new Kn),this.phones.length||this.phones.push(new sn)}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}};Zo([J.GetClassConstructor(Kn)],uo.prototype,"emails"),Zo([J.GetClassConstructor(Mo)],uo.prototype,"postAddresses"),Zo([J.GetClassConstructor(sn)],uo.prototype,"phones"),Zo([J.GetClassConstructor(Ti)],uo.prototype,"websites");let ff=uo,mf=class extends Ve{constructor(){super(ff,"contacts")}};const hf=new mf;let pf=class extends Ve{constructor(){super(Kn,"emails")}};const gf=new pf;class Ki{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");J.BuildClass(this,t)}static Create(t){const o=new Ki;return o.id=Xe.UUID(),o.ftsp=JSON.stringify(t),o}}let yf=class extends Ve{constructor(){super(Ki,"ftsp-presets")}};const wf=new yf;let bf=class extends Ve{constructor(){super(fs,"humans")}};const Cf=new bf;let Sf=class extends Ve{constructor(){super(sn,"phones")}};const kf=new Sf;class xf{constructor(t){d(this,"id");d(this,"nameRus","");J.BuildClass(this,t)}}var Ef=Object.defineProperty,Bf=(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&&Ef(t,o,r),r};class ua{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);J.BuildClass(this,t)}}Bf([J.GetClassConstructor(xf)],ua.prototype,"fields");let Vf=class extends Ve{constructor(){super(ua,"schemas")}};const Nf=new Vf;class fa{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);J.BuildClass(this,t)}}class $f{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");J.BuildClass(this,t)}}var Tf=Object.defineProperty,ma=(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&&Tf(t,o,r),r};class Dn{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",[]);J.BuildClass(this,t)}}ma([J.GetClassConstructor(fa)],Dn.prototype,"options"),ma([J.GetClassConstructor($f)],Dn.prototype,"searchGroupMetaColumns");class er{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 Dn);d(this,"searchObjects",[]);d(this,"pagination",new Ao);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new Dn(o))),t.searchGroup&&(this.searchGroup=new Dn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new fa(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 Dn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Et.Route().query.groupId)}setQuery(){const t=Et.Route().query.query;t&&(this.query=t)}}let Pf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new er));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await Ce.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 Ce.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new er}SetSearchModel(t){t&&(this.searchModel=new er(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const tr=new Pf;let Mf=class extends Ve{constructor(){super(Ro,"users-accounts")}};const Rf=new Mf;var We=(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))(We||{});class ha{constructor(t){d(this,"id");d(this,"name",We.String);d(this,"valueRelation",Ji.simple);J.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===We.Radio)return"RadioProp";if(this.name===We.Set)return"SetProp";if(this.name===We.Number)return"NumberProp";if(this.name===We.String)return"StringProp"}}let If=class extends Ve{constructor(){super(ha,"value-types")}};const Af=new If;let pa=(lt=class{},d(lt,"Auth",df),d(lt,"Contacts",hf),d(lt,"Emails",gf),d(lt,"FileInfos",new Ve(kt,"file-infos")),d(lt,"FTSPPresets",wf),d(lt,"Humans",Cf),d(lt,"Phones",kf),d(lt,"Schemas",Nf),d(lt,"UserAccounts",Rf),d(lt,"ValueTypes",Af),d(lt,"Search",tr),lt);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let zf=(Xt=class{},d(Xt,"Orders",ut),d(Xt,"Sizes",Gt),d(Xt,"Statuses",pe),d(Xt,"DataTypes",Ie),d(Xt,"ValueTypes",We),d(Xt,"Operators",Be),Xt);class Df{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 Ff=new Df;class Of{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 Ee.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ee.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=>Ee.SearchIn(i.name,this.filterString)):t.children}}const Lf=new Of;class _f{constructor(){d(this,"Menu",e.reactive(Lf));d(this,"Head",e.reactive(Ff))}}const Hf=new _f,ga="Да",ya="Нет";class Uf extends Nn{constructor(){super(...arguments);d(this,"confirmButtonText",ga);d(this,"cancelButtonText",ya);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??ga,this.cancelButtonText=i.cancelButtonText??ya,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof C.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=C.Dialog.create({title:this.title||void 0,message:this.text,html:Nn.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 Uf;class qf{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class jf extends qf{Show(){super.show()}Hide(){super.hide()}}const Wf=new jf;class Qt{}d(Qt,"Admin",Hf),d(Qt,"Dialog",vf),d(Qt,"Loading",Wf),d(Qt,"Notify",jt),d(Qt,"Btn",rn),d(Qt,"Input",is);class z{}d(z,"Auth",e.reactive(Oe)),d(z,"UI",e.reactive(Qt)),d(z,"Paginator",e.reactive(aa)),d(z,"S",pa),d(z,"H",sf),d(z,"C",Bc),d(z,"T",zf),d(z,"I",lf),d(z,"F",Pc);const fo=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(C.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"]))}}),ne=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:pe.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 k={};for(const $ of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes($)||(k[$]=o[$]);return k}),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?pe.Primary:t.type),l=e.computed(()=>{const k={};return t.margin&&(k.margin=t.margin),t.padding&&(k.padding=t.padding),t.width&&(k.maxWidth=t.width,k.minWidth=t.width),t.height&&(k.minHeight=t.height,k.maxHeight=t.height),t.fontSize&&(k.fontSize=t.fontSize),k}),u={[pe.Primary]:"primary",[pe.Success]:"positive",[pe.Warning]:"warning",[pe.Error]:"negative",[pe.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),m={[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:m[t.size]??"md"),S=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),E=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),P=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),B=e.computed(()=>o.disable??t.disabled);return(k,$)=>(e.openBlock(),e.createBlock(e.unref(C.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(S),outline:e.unref(E),unelevated:e.unref(P),disable:e.unref(B),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Gf=["innerHTML"],Qf={key:1},nr=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(C.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Gf)):(e.openBlock(),e.createElementBlock("span",Qf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),ot=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(C.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(nr,{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(C.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 адрес"},Je=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},error:{type:Boolean,default:!1},errorMessage:{type:String,default:"",required:!1}},{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 y={};for(const N of Object.keys(s))N!=="id"&&N!=="disable"&&(y[N]=s[N]);return y}),l=n,u=e.computed(()=>{var y;return!!((y=l.rules)!=null&&y.length)}),f=e.computed(()=>s.disable??l.disabled),m=e.ref(null);function p(){var y;(y=m.value)==null||y.focus()}function S(){var y;(y=m.value)==null||y.blur()}function E(){var y;(y=m.value)==null||y.select()}function P(){var y;return(y=m.value)==null?void 0:y.getNativeElement()}async function B(){var y;return await((y=m.value)==null?void 0:y.validate())??!0}function k(){var y;(y=m.value)==null||y.resetValidation()}t({focus:p,blur:S,select:E,getNativeElement:P,validate:B,resetValidation:k});const $=()=>{i("input",r.value)},b=e.computed(()=>{const y={};return l.margin&&(y.margin=l.margin),l.padding&&(y.padding=l.padding),l.width&&(y.width=l.width),l.borderColor&&(y["--p-border-color"]=l.borderColor),y});return(y,N)=>(e.openBlock(),e.createBlock(e.unref(C.QInput),e.mergeProps({ref_key:"input",ref:m,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=R=>r.value=R)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(f),rules:n.rules,error:n.error,"error-message":n.errorMessage,"hide-bottom-space":!n.error&&!n.errorMessage&&!e.unref(u),"input-style":{color:n.color||void 0},style:e.unref(b),class:"p-input",outlined:"",dense:"","onUpdate:modelValue":$,onBlur:N[1]||(N[1]=R=>y.$emit("blur",r.value)),onFocus:N[2]||(N[2]=R=>y.$emit("focus",r.value)),onClear:N[3]||(N[3]=R=>y.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","error","error-message","hide-bottom-space","input-style","style"]))}}),[["__scopeId","data-v-7c6dfabd"]]),fn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:{modelValue:{type:Boolean,default:!1,required:!1},persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},emits:["update:modelValue"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(i.modelValue);e.watch(()=>i.modelValue,p=>{s.value=p},{immediate:!0});const a=p=>{s.value=p,r("update:modelValue",p)};t({show:()=>a(!0),hide:()=>a(!1),toggle:()=>a(!s.value),opened:s});const f=e.useAttrs(),m=e.computed(()=>{const p={};for(const S of Object.keys(f))["modelValue","persistent","maximized","transition-show","transition-hide","onUpdate:modelValue"].includes(S)||(p[S]=f[S]);return p});return(p,S)=>(e.openBlock(),e.createBlock(e.unref(C.QDialog),e.mergeProps({modelValue:e.unref(s),"onUpdate:modelValue":S[0]||(S[0]=E=>e.isRef(s)?s.value=E:null)},e.unref(m),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide,"onUpdate:modelValue":a}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),key:"0"}:void 0,p.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),key:"1"}:void 0,p.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"body")]),key:"2"}:void 0,p.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Yf={class:"q-mb-md"},Xf={class:"text-subtitle1 text-weight-medium text-grey-9"},Zf={class:"text-caption text-grey-6 q-mt-xs"},mo=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=C.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(fn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Yf,[e.createVNode(e.unref(C.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Xf,e.toDisplayString(n.title),1),e.createElementVNode("div",Zf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(C.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{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"]))}}),Jf={class:"q-mr-md"},Kf={class:"text-subtitle1 text-weight-medium text-grey-9"},ho=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=C.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(fn,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Jf,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Kf,e.toDisplayString(n.title),1),e.createVNode(e.unref(C.QSpace)),e.withDirectives(e.createVNode(ne,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(C.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{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"]))}}),em={class:"q-mt-sm"},tm={class:"row items-center justify-between q-mb-xs q-px-xs"},nm={class:"row items-center q-gutter-xs"},om={class:"text-uppercase text-caption text-weight-medium text-grey-7"},im={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},rm={style:{"min-width":"0"}},sm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},am={key:0,class:"text-caption text-grey-6 ellipsis"},lm={class:"row items-center no-wrap q-gutter-xs"},cm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},dm={class:"text-body2 text-grey-7"},mn=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),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),E=async y=>{y&&(await navigator.clipboard.writeText(y),z.UI.Notify.Success(o.value.copiedEmail))},P=y=>{var N,R;s.value=y,a.value=i.value[y],c.value=t.adapter.emailValue(i.value[y]),l.value=((R=(N=t.adapter).emailDescription)==null?void 0:R.call(N,i.value[y]))??"",r.value=!0},B=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}},k=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),P(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},$=y=>{S.value=y,p.value=!0},b=async()=>{var y,N;m.value=!0;try{const R=i.value[S.value];await t.adapter.removeEmail((N=(y=t.adapter).emailId)==null?void 0:N.call(y,R)),i.value.splice(S.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(y,N)=>(e.openBlock(),e.createElementBlock("div",em,[e.createElementVNode("div",tm,[e.createElementVNode("div",nm,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",om,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(fo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:k},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),(R,j)=>{var se,ze,Te,Ne,et,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).emailId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",y.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",im,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",rm,[e.createElementVNode("div",sm,e.toDisplayString(n.adapter.emailValue(R)),1),(Ne=(Te=n.adapter).emailDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",am,e.toDisplayString((pt=(et=n.adapter).emailDescription)==null?void 0:pt.call(et,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",lm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.emailValue(R))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[4]||(N[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>P(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[5]||(N[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>$(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[6]||(N[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",cm,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",dm,e.toDisplayString(e.unref(o).noEmails),1),N[7]||(N[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ne,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:k},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":N[2]||(N[2]=R=>e.isRef(r)?r.value=R:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:B},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":N[0]||(N[0]=R=>e.isRef(c)?c.value=R:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterEmail,R=>!R||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":N[1]||(N[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":N[3]||(N[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),um={class:"q-mt-sm"},fm={class:"row items-center justify-between q-mb-xs q-px-xs"},mm={class:"row items-center q-gutter-xs"},hm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},pm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},gm={style:{"min-width":"0"}},ym={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},wm={key:0,class:"text-caption text-grey-6 ellipsis"},bm={class:"row items-center no-wrap q-gutter-xs"},Cm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Sm={class:"text-body2 text-grey-7"},hn=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),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),E=async y=>{y&&(await navigator.clipboard.writeText(y),z.UI.Notify.Success(o.value.copiedNumber))},P=y=>{var N,R;s.value=y,a.value=i.value[y],c.value=t.adapter.phoneNumber(i.value[y]),l.value=((R=(N=t.adapter).phoneDescription)==null?void 0:R.call(N,i.value[y]))??"",r.value=!0},B=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}},k=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),P(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},$=y=>{S.value=y,p.value=!0},b=async()=>{var y,N;m.value=!0;try{const R=i.value[S.value];await t.adapter.removePhone((N=(y=t.adapter).phoneId)==null?void 0:N.call(y,R)),i.value.splice(S.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(y,N)=>(e.openBlock(),e.createElementBlock("div",um,[e.createElementVNode("div",fm,[e.createElementVNode("div",mm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",hm,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(fo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:k},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),(R,j)=>{var se,ze,Te,Ne,et,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).phoneId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",y.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",pm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",gm,[e.createElementVNode("div",ym,e.toDisplayString(n.adapter.phoneNumber(R)),1),(Ne=(Te=n.adapter).phoneDescription)!=null&&Ne.call(Te,R)?(e.openBlock(),e.createElementBlock("div",wm,e.toDisplayString((pt=(et=n.adapter).phoneDescription)==null?void 0:pt.call(et,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",bm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.phoneNumber(R))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[4]||(N[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>P(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[5]||(N[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>$(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[6]||(N[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",Cm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Sm,e.toDisplayString(e.unref(o).noPhones),1),N[7]||(N[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ne,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:k},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":N[2]||(N[2]=R=>e.isRef(r)?r.value=R:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:B},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":N[0]||(N[0]=R=>e.isRef(c)?c.value=R:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.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(Je,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":N[1]||(N[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":N[3]||(N[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),km={class:"row items-center q-gutter-sm"},xm={class:"text-weight-medium text-grey-9"},Em=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(C.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",km,[e.createVNode(ne,{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(C.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",xm,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(fo,{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(C.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(ne,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(C.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(C.QSeparator)),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(hn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(C.QSeparator),{class:"q-my-sm"}),e.createVNode(mn,{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"]))}}),or=D(Em,[["__scopeId","data-v-327b9235"]]),Bm={class:"contact-edit-wrapper"},ir=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",Bm,[e.createVNode(hn,{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(mn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),Vm={class:"edit-emails-wrapper"},rr=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",Vm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),Nm={class:"edit-phones-wrapper"},sr=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",Nm,[e.createVNode(hn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),$m={class:"contact-view-wrapper"},ar=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",$m,[e.createVNode(hn,{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(mn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function wa(n){n.component("PContactForm",or),n.component("PContactFormDeleteDialog",mo),n.component("PContactFormEdit",ir),n.component("PContactFormEditDialog",ho),n.component("PContactFormEditEmails",rr),n.component("PContactFormEditPhones",sr),n.component("PContactFormView",ar),n.component("PContactFormViewEmails",mn),n.component("PContactFormViewPhones",hn)}const Tm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:or,PContactFormDeleteDialog:mo,PContactFormEdit:ir,PContactFormEditDialog:ho,PContactFormEditEmails:rr,PContactFormEditPhones:sr,PContactFormView:ar,PContactFormViewEmails:mn,PContactFormViewPhones:hn,default:wa,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class pn{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 pn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}class ba{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class lr{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class Fn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Fn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}var Pm=Object.defineProperty,po=(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 gn=class Si{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 ha);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 Si;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 pn(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 lr(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new Fn)}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=pn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=Si.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=Fn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new Si(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}};po([z.H.Classes.GetClassConstructor(pn)],gn.prototype,"answerVariants"),po([z.H.Classes.GetClassConstructor(ba)],gn.prototype,"fieldExamples"),po([z.H.Classes.GetClassConstructor(Fn)],gn.prototype,"fieldVariants"),po([z.H.Classes.GetClassConstructor(lr)],gn.prototype,"fieldMeasures"),po([z.H.Classes.GetClassConstructor(gn)],gn.prototype,"children");let Jo=gn;class cr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new kt);z.H.Classes.BuildClass(this,t)}}class yn{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 yn;return i.id=Wt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var Mm=Object.defineProperty,dr=(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&&Mm(t,o,r),r};const Ko=class ns{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new kt);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 ns;return i.id=Wt(),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=!!t}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>ns.Create(i,o))}addFile(){const t=new cr;return t.id=Wt(),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=yn.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=yn.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}};dr([z.H.Classes.IsDate],Ko.prototype,"valueDate"),dr([z.H.Classes.GetClassConstructor(yn)],Ko.prototype,"selectedAnswerVariants"),dr([z.H.Classes.GetClassConstructor(cr)],Ko.prototype,"answerFiles");let On=Ko;class Rm{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Im=Object.defineProperty,Am=(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&&Im(t,o,r),r};const Ca=class ec{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 ec;return o.id=z.H.Id.UUID(),o.formId=t,o}addField(){const t=Jo.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}};Am([z.H.Classes.GetClassConstructor(Jo)],Ca.prototype,"fields");let ei=Ca;var zm=Object.defineProperty,Dm=(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&&zm(t,o,r),r};const Sa=class tc{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 tc;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=ei.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)}};Dm([z.H.Classes.GetClassConstructor(ei)],Sa.prototype,"formSections");let ka=Sa;var Fm=Object.defineProperty,Om=(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&&Fm(t,o,r),r};const xa=class nc{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 nc;return o.id=z.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...On.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 On;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=On.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,""):""}};Om([z.H.Classes.GetClassConstructor(On)],xa.prototype,"fieldFills");let Ea=xa;const Lm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:pn,Field:Jo,FieldExample:ba,FieldFill:On,FieldFillFile:cr,FieldFilter:Rm,FieldMeasure:lr,FieldVariant:Fn,Form:ka,FormFill:Ea,FormSection:ei,SelectedAnswerVariant:yn},Symbol.toStringTag,{value:"Module"}));let _m=class extends Ve{constructor(){super(pn,"answer-variants")}};const Hm=new _m;let Um=class extends Ve{constructor(){super(On,"field-fills")}};const vm=new Um;let qm=class extends Ve{constructor(){super(Jo,"fields")}};const jm=new qm;let Wm=class extends Ve{constructor(){super(Ea,"form-fills")}};const Gm=new Wm;let Qm=class extends Ve{constructor(){super(ei,"form-sections")}};const Ym=new Qm;let Xm=class extends Ve{constructor(){super(ka,"forms")}};const Zm=new Xm;let Jm=class extends Ve{constructor(){super(yn,"selected-answer-variants")}};const Km=new Jm,eh=Object.freeze(Object.defineProperty({__proto__:null,C:Lm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Hm,FieldFills:vm,Fields:jm,FormFills:Gm,FormSections:Ym,Forms:Zm,SelectedAnswerVariants:Km},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class ti{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 kt);d(this,"iconName","");d(this,"svgCode","");J.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var th=Object.defineProperty,nh=(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&&th(t,o,r),r};class ur{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 kt);J.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=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new ti)}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"}}nh([J.GetClassConstructor(ti)],ur.prototype,"subMenus");const oh=Object.freeze(Object.defineProperty({__proto__:null,Menu:ur,SubMenu:ti},Symbol.toStringTag,{value:"Module"}));let ih=class extends z.H.BaseStore{constructor(){super(ur,"menus")}};const rh=new ih;let sh=class extends z.H.BaseStore{constructor(){super(ti,"sub-menus")}};const ah=new sh,lh=Object.freeze(Object.defineProperty({__proto__:null,C:oh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:rh,SubMenus:ah},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{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 Ft;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var ch=Object.defineProperty,dh=(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&&ch(t,o,r),r};const Ba=class oc{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 oc;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};dh([z.H.Classes.GetClassConstructor(Ft)],Ba.prototype,"slots");let Ln=Ba;var uh=Object.defineProperty,Va=(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&&uh(t,o,r),r};const fr=class ic{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 ic;return i.id=z.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=Ln.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ft.Create(this.id);return this.slots.push(t),t}};Va([z.H.Classes.GetClassConstructor(Ln)],fr.prototype,"sessions"),Va([z.H.Classes.GetClassConstructor(Ft)],fr.prototype,"slots");let go=fr;var fh=Object.defineProperty,mh=(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&&fh(t,o,r),r};const Na=class rc{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 rc;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};mh([z.H.Classes.GetClassConstructor(go)],Na.prototype,"schedules");let ni=Na;class _n{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 _n;return t.id=z.H.Id.UUID(),t}}const hh=Object.freeze(Object.defineProperty({__proto__:null,Schedule:go,ScheduleDay:ni,SchedulePlace:_n,ScheduleSession:Ln,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),ce=n=>n?z.H.Time.HMtoM(n):NaN,Ge=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),wn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},Hn=(n,t)=>z.H.Time.DiffM(n,t),wt=(n,t)=>z.H.Time.AddMtoHM(n,t),mr=(n,t)=>{const o=ce(n.startTime),i=ce(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},yo=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime),r=ce(t.startTime),s=ce(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},wo=(n,t)=>Math.round(n/t)*t,$a=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ce(c.startTime),u=ce(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}},Ta=(n,t)=>{const o=ce(n.item.startTime),i=ce(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+"%"}},Pa=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ce(t.startTime),a=ce(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+"%"}},Ma=(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)),Ra=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Ia=(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})},Aa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",hr={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:"пересечение"},za={createDay(n){return ni.Create(void 0,void 0,n)},createSchedule(n,t){return go.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=Ln.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=z.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=_n.Create();return t.name=n||"",t}},ph={class:"date-field"},gh=D(e.defineComponent({__name:"DateField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(""),a=e.computed(()=>{if(!o.modelValue)return"";const u=new Date(`${o.modelValue}T00:00:00`);return isNaN(u.getTime())?o.modelValue:u.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})});e.watch(r,u=>{u&&(s.value=o.modelValue||"")});const c=()=>{i("update:modelValue",s.value),r.value=!1},l=()=>{r.value=!1};return(u,f)=>(e.openBlock(),e.createElementBlock("div",ph,[e.createVNode(e.unref(C.QInput),{"model-value":a.value,label:n.label,dense:"",outlined:"",readonly:"",class:"date-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"event",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":f[1]||(f[1]=m=>r.value=m),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"date-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),mask:"YYYY-MM-DD",color:"primary",navigation:"","today-btn":""},null,8,["modelValue"]),e.createVNode(e.unref(C.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:l}),e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:c})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5eaf00e0"]]),yh={class:"time-field"},Un=D(e.defineComponent({__name:"TimeField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref("09:00"),a=m=>{const p=/^(\d{1,2}):(\d{2})$/.exec((m??"").trim());return p?`${p[1].padStart(2,"0")}:${p[2]}`:"09:00"},c=m=>{const p=/^(\d{2}):(\d{2})$/.exec(m??"");return p?`${Number(p[1])}:${p[2]}`:m},l=e.computed(()=>o.modelValue||"");e.watch(r,m=>{m&&(s.value=a(o.modelValue))});const u=()=>{i("update:modelValue",c(s.value)),r.value=!1},f=()=>{r.value=!1};return(m,p)=>(e.openBlock(),e.createElementBlock("div",yh,[e.createVNode(e.unref(C.QInput),{"model-value":l.value,label:n.label,dense:"",outlined:"",readonly:"",class:"time-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=S=>r.value=S),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"time-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTime),{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=S=>s.value=S),format24h:"",color:"primary",class:"q-pa-sm"},null,8,["modelValue"]),e.createVNode(e.unref(C.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:f}),e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:u})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5c1e0137"]]),wh={class:"schedule-admin"},bh={key:0,class:"no-days text-center text-grey q-py-xl"},Ch={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},Sh={key:5,class:"row items-center q-gutter-xs zoom-control"},kh={key:0,class:"grid-view"},xh={key:0,class:"text-grey text-center q-py-lg"},Eh={class:"grid-header"},Bh={class:"row items-center justify-center q-gutter-xs"},Vh={class:"ellipsis"},Nh={class:"time-gutter"},$h=["data-schedule-id","onDblclick","onContextmenu"],Th=["title","onPointerdown","onClick","onContextmenu"],Ph={class:"block-content"},Mh={class:"block-time"},Rh={class:"block-name ellipsis"},Ih={key:0,class:"block-speakers ellipsis"},Ah={key:0,class:"session-perfoms"},zh=["title","onPointerdown","onClick","onContextmenu"],Dh={class:"nested-time"},Fh={class:"nested-name ellipsis"},Oh={key:0,class:"nested-speakers ellipsis"},Lh=["title","onPointerdown"],_h={class:"block-actions"},Hh=["title","onPointerdown"],Uh=["title"],vh={class:"session-spine-name"},qh={class:"block-time"},jh={key:0,class:"session-badge"},Wh={key:1,class:"conflict-badge"},Gh={class:"block-name ellipsis"},Qh={class:"text-caption text-grey-6 q-pa-xs"},Yh={key:1,class:"list-view"},Xh={class:"row items-center q-gutter-sm"},Zh={class:"text-subtitle2"},Jh={key:0,class:"sub-block"},Kh={class:"sub-title"},ep={class:"list-row session-row"},tp={key:0,class:"nested-list"},np={class:"col-4 ellipsis"},op={class:"time-text"},ip={class:"sub-block"},rp={class:"sub-title"},sp={class:"list-row slot-row"},ap={key:0,class:"text-grey text-center q-py-sm"},lp={class:"text-caption text-grey-6 q-mb-sm"},cp={class:"text-h6"},dp={class:"row items-center q-gutter-sm q-mb-md"},up={key:0,class:"text-grey text-center q-py-md"},fp={class:"col ellipsis"},mp={class:"text-h6"},hp={class:"row q-col-gutter-sm q-mb-sm"},pp={class:"col-6"},gp={class:"col-6"},yp=["onClick"],bn=15,Da=6,Fa=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},daysEnabled:{type:Boolean,default:!0},placesEnabled:{type:Boolean,default:!0}},setup(n){var Gl,Ql;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>t.daysEnabled!==!1),r=e.computed(()=>t.placesEnabled!==!1),s=e.computed(()=>({...hr,duplicate:"Дублировать",...t.labels})),a=e.computed(()=>({...za,...t.factories})),c=h=>t.slotListOf?t.slotListOf(h):(h==null?void 0:h.slots)||[],l=h=>t.nestedSlotListOf?t.nestedSlotListOf(h):(h==null?void 0:h.slots)||[],u=h=>(h==null?void 0:h.name)||s.value.hall,f=h=>t.sessionName?t.sessionName(h):(h==null?void 0:h.name)||`${s.value.session} ${(h==null?void 0:h.startTime)||""}–${(h==null?void 0:h.endTime)||""}`.trim(),m=h=>t.slotName?t.slotName(h):(h==null?void 0:h.name)||s.value.slot,p=h=>t.slotSubtitle?t.slotSubtitle(h):"",S=e.ref("grid"),E=e.ref((Ql=(Gl=t.days)==null?void 0:Gl[0])==null?void 0:Ql.id),P=e.ref(!1),B=e.ref(""),k=e.ref(!1),$=e.ref(null),b=e.ref(null),y=e.ref(void 0),N=e.ref(null),R=e.ref(null),j=e.ref(!1),se=e.ref(0),ze=e.ref(null),Te=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],Ne=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(Ne,h=>localStorage.setItem("schedule-grid-zoom",String(h)));const et=e.computed(()=>Math.max(le.value.total/60*Ne.value,360)),pt=e.computed(()=>et.value+"px"),ye=e.computed(()=>[...t.days||[]].sort((h,g)=>new Date(h.date).getTime()-new Date(g.date).getTime())),Se=e.computed(()=>ye.value.find(h=>h.id===E.value));e.watch(()=>ye.value.map(h=>h.id).join(","),()=>{var h;(!E.value||!ye.value.some(g=>g.id===E.value))&&(E.value=(h=ye.value[0])==null?void 0:h.id)});const Ct=h=>{if(t.dayTitle)return t.dayTitle(h);const g=new Date(h.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Zt=h=>{const g=new Date(h);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Yn=async(h,g)=>{g&&(h.date=new Date(g),await t.persist.updateDay(h),await t.persist.refresh())},Sn=async h=>{var w;if(!h)return;for(const M of he(h))await kn(M);await t.persist.removeDay(h);const g=(t.days||[]).indexOf(h);g>=0&&t.days.splice(g,1),await t.persist.refresh(),E.value=(w=ye.value[0])==null?void 0:w.id},rt=async()=>{var F,Y;const h=ye.value,g=h[h.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let M;try{M=a.value.createDay(w)}catch{t.persist.notify("warning",s.value.saveEventFirst);return}try{await((Y=(F=t.persist).createDay)==null?void 0:Y.call(F,M));for(const fe of t.places||[])await we(fe,M);await t.persist.refresh()}catch{t.persist.notify("negative",s.value.createFailed);return}E.value=M.id,t.persist.notify("positive",`${s.value.dayAdded}: ${Ct(M)}`)},he=h=>((h==null?void 0:h.schedules)||[]).slice().sort((g,w)=>{const M=W(g),F=W(w);return M.localeCompare(F,"ru")}),W=h=>{if(t.hallName)return t.hallName(h);const g=h.place||(t.places||[]).find(w=>w.id===h.placeId);return(g==null?void 0:g.name)||s.value.hall},Qe=()=>{P.value=!0},Pt=e.computed(()=>{const h=Se.value,g=new Set(((h==null?void 0:h.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),we=async(h,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(h,g,a.value.createSchedule);return}const w=a.value.createSchedule(h.id,g.id);await t.persist.createSchedule(w)},ae=async h=>{P.value=!1;const g=Se.value;if(!g){t.persist.notify("warning",s.value.selectDayFirst);return}if(he(g).some(w=>w.placeId===h.id)){t.persist.notify("warning",s.value.alreadyAdded);return}try{await we(h,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",s.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),E.value=g.id},ve=async()=>{var w,M,F;const h=(w=B.value)==null?void 0:w.trim();if(!h){t.persist.notify("warning",s.value.enterName);return}const g=a.value.createPlace(h);try{if(!await((F=(M=t.persist).createPlace)==null?void 0:F.call(M,g))){t.persist.notify("negative",s.value.hallCreateFailed);return}}catch(Y){console.warn("createPlace failed:",Y),t.persist.notify("negative",s.value.hallCreateFailed);return}B.value="",await ae(g),t.persist.notify("positive",s.value.hallCreated.replace("{name}",h))},Mt=async h=>{await kn(h);const g=st(h);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==h.id)),await t.persist.refresh()},kn=async h=>{for(const g of h.sessions||[]){for(const w of l(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of c(h))await t.persist.removeSlot(g);await t.persist.removeSchedule(h)},st=h=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===h.id)),at=h=>[...l(h)].sort(mr),Ye=h=>(h.sessions||[]).some(g=>l(g).length>0),Jt=new WeakMap,vt=h=>{const g=Jt.get(h),w=c(h);if(g&&g.src===w)return g.list;const M=new Set((h.sessions||[]).map(Y=>Y.id)),F=w.filter(Y=>!Y.sessionId||!M.has(Y.sessionId));return Jt.set(h,{src:w,list:F}),F},De=h=>[...o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],...vt(h).map(g=>({kind:"slot",item:g}))],ee=h=>o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],le=e.computed(()=>{var g,w;const h=(((g=Se.value)==null?void 0:g.schedules)||[]).flatMap(M=>De(M));for(const M of((w=Se.value)==null?void 0:w.schedules)||[])for(const F of M.sessions||[])h.push(...at(F).map(Y=>({kind:"slot",item:Y})));return $a(h)}),ct=e.computed(()=>{const h=[];for(let g=le.value.start;g<=le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),gt=e.computed(()=>{const h=[];for(let g=le.value.start+30;g<le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),Kt=h=>Ta(h,le.value),xn=e.computed(()=>{if(!N.value||!b.value)return{};const h=le.value,g=(N.value.minutes-h.start)/h.total*100,w=Math.max(b.value.duration/h.total*100,2.5);return{top:g+"%",height:w+"%"}}),Rt=e.computed(()=>!N.value||!b.value?"":Ge(N.value.minutes+b.value.duration)),Gr=e.computed(()=>{if(!N.value)return{};const h=le.value,g=(N.value.minutes-h.start)/h.total*100,w=Math.max(bn/h.total*100,1.5);return{top:g+"%",height:w+"%"}}),En=e.computed(()=>{var F,Y,fe,Pe,Re;if(!N.value||!b.value||!b.value.id)return 0;const h=Zn(N.value.scheduleId);if(!h)return 0;const g={startTime:N.value.time,endTime:Rt.value},w=(F=N.value.session)==null?void 0:F.id;let M=0;for(const A of De(h))A.item.id!==((Y=b.value)==null?void 0:Y.id)&&(((fe=b.value)==null?void 0:fe.kind)==="slot"&&A.kind==="session"&&A.item.id===w||yo(g,A.item)&&M++);if(((Pe=b.value)==null?void 0:Pe.kind)==="slot"&&N.value.session)for(const A of at(N.value.session))A.id!==((Re=b.value)==null?void 0:Re.id)&&yo(g,A)&&M++;return M}),yi=e.computed(()=>En.value>0),en=(h,g)=>Ma(De(h),g,yo),Qr=(h,g)=>Ra(at(h),g,yo),Yr=(h,g)=>Pa(h,g),Xr=h=>{const g=le.value,w=ce(h.item.startTime),M=ce(h.item.endTime);return!isFinite(w)||!isFinite(M)?48:(M-w)/g.total*et.value},tn=h=>Aa(Xr(h)),V=h=>{const g=t.slotName?t.slotName(h.item):h.item.name||(h.kind==="session"?s.value.session:s.value.slot);if(h.kind==="slot"&&tn(h)!=="h-full"){const w=p(h.item);if(w)return`${g} — ${w}`}return g},T=(h,g)=>{const w=m(h);if(g!=="h-full"){const M=p(h);if(M)return`${w} — ${M}`}return w},I=h=>{const g=`${h.item.startTime||"?"}–${h.item.endTime||"?"}`;if(h.kind==="slot"){const w=p(h.item);return[m(h.item),g,w?`${s.value.participants}: ${w}`:""].filter(Boolean).join(`
23
+ `)}return[f(h.item),g].filter(Boolean).join(`
24
24
  `)},L=h=>{const g=p(h);return[m(h),`${h.startTime}–${h.endTime}`,g?`${s.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},Z=(h,g)=>{var w;return{conflict:Gr(h.item,g),dragging:((w=It.value)==null?void 0:w.perfom.id)===g.id,[en(h)]:!0}},ke=e.ref(null),be=(h,g)=>{const w=h.getBoundingClientRect(),M=Math.min(Math.max((g-w.top)/w.height,0),1);return le.value.start+wo(M*le.value.total,wn)},te=(h,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||j.value||(ke.value={gi:h,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",H),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",et),window.addEventListener("keydown",ko))},H=h=>{const g=ke.value;if(g){if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<za)return;g.moved=!0;const w=_n(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"?s.value.session:s.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}U(h.clientX,h.clientY),v(h.clientX,h.clientY)}},U=(h,g)=>{var Pe,Ie;const w=document.elementFromPoint(h,g),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id");if(!M||!F){C.value=void 0,$.value=null;return}const Y=Xn(F);if(!Y)return;C.value=Y.id;const ue=be(M,g);$.value={scheduleId:Y.id,minutes:ue,time:Ge(ue),hallName:W(Y),...((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&o.value?{session:yi(Y.sessions,ue,ue+(((Ie=y.value)==null?void 0:Ie.duration)||30),ce)}:{}},R.value={x:h,y:g}},v=(h,g)=>{const w=ze.value;if(!w)return;const M=w.getBoundingClientRect();g<M.top+48?w.scrollTop-=14:g>M.bottom-48&&(w.scrollTop+=14),h<M.left+48?w.scrollLeft-=14:h>M.right-48&&(w.scrollLeft+=14)},q=h=>{oe(h)},oe=async h=>{const g=ke.value;if(me(),ke.value=null,!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Xn(F):void 0;if(M&&Y){const ue=be(M,h.clientY);await Il(Y,ue)}xe()},me=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",et),window.removeEventListener("keydown",ko)},xe=()=>{ke.value=null,y.value=null,C.value=void 0,$.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",se.value=Date.now()},et=()=>{me(),xe()},ko=h=>{h.key==="Escape"&&et()};e.onBeforeUnmount(()=>{me(),Jr(),$w(),document.body.style.userSelect="",document.body.style.cursor=""});const Yn=h=>{if(!h)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const M=(w.sessions||[]).find(Y=>Y.id===h);if(M)return{kind:"session",item:M,schedule:w};const F=c(w).find(Y=>Y.id===h);if(F)return{kind:"slot",item:F,schedule:w}}return null},Xr=()=>{var h;return Yn((h=y.value)==null?void 0:h.id)},bw=(h,g)=>{g.preventDefault(),g.stopPropagation();const w=h.item,M=ce(w.startTime),F=ce(w.endTime);if(!isFinite(M)||!isFinite(F))return;const Y=g.clientY;j.value=!0;const ue=A=>{const G=(A.clientY-Y)/Ne.value*60,K=wo(F+G,wn);w.endTime=Ge(Math.max(K,M+wn))},Pe=async()=>{window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",Ie),j.value=!1,se.value=Date.now();const A=Yn(w.id);A&&(await tn(w,A.kind),await t.persist.refresh())},Ie=()=>{Pe()};window.addEventListener("pointermove",ue),window.addEventListener("pointerup",Ie)},It=e.ref(null),Cw=(h,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||j.value)return;const M=w.target.closest(".session-perfoms"),F=ce(h.startTime),Y=ce(h.endTime),ue=_n(g.startTime,g.endTime);!M||!isFinite(F)||!isFinite(Y)||Y<=F||(It.value={perfom:g,session:h,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:Y-F,durMin:isFinite(ue)&&ue>0?ue:30,container:M},window.addEventListener("pointermove",Tl),window.addEventListener("pointerup",Pl),window.addEventListener("pointercancel",Zr),window.addEventListener("keydown",Ml))},Tl=h=>{const g=It.value;if(!g)return;if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<za)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),M=Math.min(Math.max((h.clientY-w.top)/w.height,0),1);let F=g.sessionStart+wo(M*g.sessionDur,wn);const Y=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(Y,g.sessionStart)),g.perfom.startTime=Ge(F),g.perfom.endTime=Ge(F+g.durMin),R.value={x:h.clientX,y:h.clientY}},Pl=h=>{Sw(h)},Sw=async h=>{var ue;const g=It.value;if(Jr(),It.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Xn(F):void 0;if(M&&Y){y.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||s.value.slot,duration:g.durMin};const Pe=be(M,h.clientY),Ie=Ge(Pe),A=_n(g.perfom.startTime,g.perfom.endTime),G=yt(Ie,A>0?A:30),K=((ue=zl(g.perfom))==null?void 0:ue.id)===Y.id&&g.perfom.startTime===Ie&&g.perfom.endTime===G;await Il(Y,Pe),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),y.value=null;return}g.perfom.startTime=yn(g.perfom.startTime),g.perfom.endTime=yn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Zr=()=>{const h=It.value;Jr(),h&&(h.perfom.startTime=h.savedStart,h.perfom.endTime=h.savedEnd),It.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Jr=()=>{window.removeEventListener("pointermove",Tl),window.removeEventListener("pointerup",Pl),window.removeEventListener("pointercancel",Zr),window.removeEventListener("keydown",Ml)},Ml=h=>{h.key==="Escape"&&Zr()},kw=(h,g,w)=>{w.preventDefault(),w.stopPropagation();const M=ce(h.startTime),F=ce(h.endTime),Y=ce(g.startTime),ue=w.target.closest(".nested-perfom"),Pe=ue==null?void 0:ue.closest(".session-perfoms");if(!ue||!Pe||!isFinite(M)||!isFinite(F)||F<=M||!isFinite(Y))return;const Ie=Pe.getBoundingClientRect(),A=F-M;j.value=!0;const G=Ut=>{const zw=Math.min(Math.max((Ut.clientY-Ie.top)/Ie.height,0),1),Dw=Math.min(Math.max(Y+wn,M+wo(zw*A,wn)),F);g.endTime=Ge(Dw)},K=async()=>{window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",Q),j.value=!1,se.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},Q=()=>{K()};window.addEventListener("pointermove",G),window.addEventListener("pointerup",Q)},Il=async(h,g)=>{var G;C.value=void 0,$.value=null,R.value=null;const w=Xr();if(!w)return;const M=Ge(g),F=_n(w.item.startTime,w.item.endTime),Y=yt(M,F>0?F:30);if(((G=w.schedule)==null?void 0:G.id)===h.id&&w.item.startTime===M&&w.item.endTime===Y)return;const ue=w.item.startTime;if(w.item.startTime=M,w.item.endTime=Y,w.kind==="slot"&&o.value){const K=yi(h.sessions,ce(M),ce(Y),ce);K?w.item.sessionId=K.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const K=ce(M)-ce(ue);for(const Q of st(w.item))Q.startTime&&(Q.startTime=yt(Q.startTime,K),Q.endTime&&(Q.endTime=yt(Q.endTime,K)),Q.scheduleId=h.id,await tn(Q,"slot"))}const Pe=w.schedule,Ie=w.kind==="session"?h.sessions:c(h),A=w.item;if(Pe&&Pe.id!==h.id){A.scheduleId=h.id;const K=w.kind==="session"?Pe.sessions:c(Pe);D.H.Classes.RemoveFromClassById(A.id,K,[]),Ie.push(A)}await tn(A,w.kind),await t.persist.refresh()},xw=async(h,g)=>{if(g.target.closest(".timeline-block"))return;const w=be(g.currentTarget,g.clientY),M=a.value.createSlot(h);if(M.startTime=Ge(w),M.endTime=Ge(w+30),o.value){const Y=yi(h.sessions,w,w+30,ce);Y!=null&&Y.id&&(M.sessionId=Y.id)}await t.persist.createSlot(M),await t.persist.refresh();const F=Yn(M.id);F&&nn(F)},Rl=async(h,g,w)=>{if(h.added){if(h.added.element.scheduleId=g.id,w==="slot"&&h.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===h.added.element.sessionId)||delete h.added.element.sessionId),await tn(h.added.element,w),w==="session")for(const M of l(h.added.element))M.scheduleId=g.id,await t.persist.updateSlot(M);await t.persist.refresh()}},Xn=h=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(M=>M.id===h);if(w)return w}},yi=(h,g,w,M)=>Ia(h,g,w,M),Al=h=>o.value?((h==null?void 0:h.sessions)||[]).map(g=>({id:g.id,label:u(g)})):[],zl=h=>{for(const g of t.days||[])for(const w of g.schedules||[])if(c(w).some(M=>M.id===h.id)||h.sessionId&&(w.sessions||[]).some(M=>M.id===h.sessionId))return w},Dl=e.computed(()=>{const h=T.value;if(h)return h.kind==="session"?Xn(h.item.scheduleId)||Fl(h.item,"session"):zl(h.item)}),Ew=e.computed(()=>{const h=T.value;return!h||h.kind!=="slot"?[]:Al(Dl.value)}),Fl=(h,g)=>{for(const w of t.days||[])for(const M of w.schedules||[])if(g==="session"){if((M.sessions||[]).some(F=>F.id===h.id))return M}else if(c(M).some(F=>F.id===h.id))return M},Ol=async(h,g)=>{g?h.sessionId=g:delete h.sessionId,await t.persist.updateSlot(h),await t.persist.refresh()},Ll=async h=>{if(!o.value)return;const g=a.value.createSession(h);await t.persist.createSession(g),await t.persist.refresh()},Bw=async(h,g)=>{const w=a.value.createSlot(h);if(w.startTime=Ge(g),w.endTime=yt(w.startTime,30),o.value){const F=yi(h.sessions,g,g+30,ce);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const M=Yn(w.id);M&&nn(M)},_l=async h=>{const g=a.value.createSlot(h),w=[...c(h)].sort(ur).slice(-1)[0];g.startTime=yn(w==null?void 0:w.endTime)||"9:00",g.endTime=yt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},Rt=e.ref(null),Vw=h=>{Rt.value=null,h.action()},Kr=(h,g)=>{const w=g.length*34+12;Rt.value={x:Math.min(h.clientX,window.innerWidth-210),y:Math.min(h.clientY,window.innerHeight-w-8),items:g}},Hl=()=>{Rt.value=null},Ul=()=>{Rt.value=null},vl=h=>{h.key==="Escape"&&(Rt.value=null)},wi=()=>{Rt.value=null},es=e.ref(!1),Nw=()=>{es.value||(window.addEventListener("click",Hl),window.addEventListener("contextmenu",Ul),window.addEventListener("keydown",vl),window.addEventListener("scroll",wi,!0),window.addEventListener("resize",wi),es.value=!0)},$w=()=>{window.removeEventListener("click",Hl),window.removeEventListener("contextmenu",Ul),window.removeEventListener("keydown",vl),window.removeEventListener("scroll",wi,!0),window.removeEventListener("resize",wi),es.value=!1};Nw();const Tw=(h,g)=>{const w=[{icon:"edit",label:s.value.edit,action:()=>nn(h)},{icon:"content_copy",label:s.value.duplicate,action:()=>void ql(h)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h.item,h.kind)}];Kr(g,w)},Pw=(h,g)=>{const w={kind:"slot",item:h},M=[{icon:"edit",label:s.value.edit,action:()=>nn(w)},{icon:"content_copy",label:s.value.duplicate,action:()=>void ql(w)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h,"slot")}];Kr(g,M)},Mw=(h,g)=>{const w=be(g.currentTarget,g.clientY),M=Ge(w),F=[{icon:"mic",label:`${s.value.addSlot} · ${M}`,action:()=>void Bw(h,w)}];o.value&&F.push({icon:"groups",label:`${s.value.addSession} · ${M}`,action:()=>void Iw(h,w)}),Kr(g,F)},Iw=async(h,g)=>{if(!o.value)return;const w=a.value.createSession(h);w.startTime=Ge(g),w.endTime=yt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},ql=async h=>{const g=Xn(h.item.scheduleId)||Fl(h.item,h.kind);if(!g)return;const w=_n(h.item.startTime,h.item.endTime)||30,M=yn(h.item.endTime)||"9:00";if(h.kind==="slot"){const F=a.value.createSlot(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=yt(M,w),F.sessionId=h.item.sessionId,h.item.description&&(F.description=h.item.description),h.item.payload&&(F.payload={...h.item.payload}),await t.persist.createSlot(F)}else{const F=a.value.createSession(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=yt(M,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},xo=async(h,g)=>{if(g==="slot")await t.persist.removeSlot(h);else{for(const w of l(h))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(h)}await t.persist.refresh()},tn=async(h,g)=>{const w=yn(h.startTime),M=yn(h.endTime);if(!w){t.persist.notify("warning",s.value.correctStartTime);return}h.startTime=w,h.endTime=M||yt(w,30),g==="slot"?await t.persist.updateSlot(h):await t.persist.updateSession(h)},nn=h=>{j.value||Date.now()-se.value<400||(T.value={kind:h.kind,item:h.item},S.value=!0)},Rw=async()=>{const h=T.value;h&&(await tn(h.item,h.kind),S.value=!1,T.value=null,await t.persist.refresh())},Aw=async()=>{const h=T.value;h&&(await xo(h.item,h.kind),S.value=!1,T.value=null)},bi=(h,g,w,M)=>{h[g]=w,tn(h,M)};return t.persist.loadOptions&&t.persist.loadOptions(),(h,g)=>{var Pe,Ie;const w=e.resolveComponent("PButton"),M=e.resolveComponent("PTooltip"),F=e.resolveComponent("PInput"),Y=e.resolveComponent("PSelect"),ue=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",fh,[(Pe=n.days)!=null&&Pe.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",mh,[i.value?(e.openBlock(),e.createBlock(e.unref(b.QTabs),{key:0,modelValue:E.value,"onUpdate:modelValue":g[0]||(g[0]=A=>E.value=A),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,A=>(e.openBlock(),e.createBlock(e.unref(b.QTab),{key:A.id,name:A.id,label:bt(A)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QSpace)),i.value&&Se.value?(e.openBlock(),e.createBlock(ch,{key:1,"model-value":Xt(Se.value.date),label:s.value.date,class:"date-input","onUpdate:modelValue":g[1]||(g[1]=A=>Qn(Se.value,A))},null,8,["model-value","label"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:2,size:"sm",color:"negative",outline:"",icon:"delete",label:s.value.deleteDay,disable:!Se.value,onClick:g[2]||(g[2]=A=>Cn(Se.value))},null,8,["label","disable"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:3,size:"sm",color:"primary",outline:"",icon:"event",label:s.value.addDay,onClick:it},null,8,["label"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:4,size:"sm",color:"primary",outline:"",icon:"add",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0),k.value==="grid"?(e.openBlock(),e.createElementBlock("div",hh,[e.createVNode(e.unref(b.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(b.QBtnToggle),{modelValue:Ne.value,"onUpdate:modelValue":g[3]||(g[3]=A=>Ne.value=A),"toggle-color":"primary",options:Te,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QBtnToggle),{modelValue:k.value,"onUpdate:modelValue":g[4]||(g[4]=A=>k.value=A),"toggle-color":"primary",options:[{label:s.value.grid,value:"grid",icon:"calendar_view_week"},{label:s.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),k.value==="grid"?(e.openBlock(),e.createElementBlock("div",ph,[he(Se.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:ze,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":he(Se.value).length,"--hours":Math.max(le.value.total/60,1),"--half-hours":Math.max(le.value.total/60*2,2)})},[e.createElementVNode("div",yh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-head",{"drag-over":C.value===A.id}])},[e.createElementVNode("div",wh,[e.createVNode(e.unref(b.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",bh,e.toDisplayString(W(A)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:G=>_l(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.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:G=>Ll(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:1,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Pt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:ht.value})},[e.createElementVNode("div",Ch,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"hour-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"half-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-col",{"drag-over":C.value===A.id}]),"data-schedule-id":A.id,onDblclick:G=>xw(A,G),onContextmenu:e.withModifiers(G=>Mw(A,G),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:G.item.id,class:e.normalizeClass(["timeline-block",[G.kind,{conflict:Kt(A,G),dragging:((K=y.value)==null?void 0:K.id)===G.item.id},en(G)]]),style:e.normalizeStyle(Jt(G)),title:I(G),onPointerdown:Q=>te(G,Q),onClick:Q=>nn(G),onContextmenu:e.withModifiers(Q=>Tw(G,Q),["prevent","stop"])},[e.createVNode(e.unref(b.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",xh,[e.createElementVNode("div",Eh,e.toDisplayString(G.item.startTime)+"–"+e.toDisplayString(G.item.endTime),1),e.createElementVNode("div",Bh,e.toDisplayString(B(G)),1),G.kind==="slot"&&p(G.item)?(e.openBlock(),e.createElementBlock("div",Vh,e.toDisplayString(p(G.item)),1)):e.createCommentVNode("",!0)]),G.kind==="session"&&st(G.item).length?(e.openBlock(),e.createElementBlock("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(G.item),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:e.normalizeClass(["nested-perfom",Z(G,Q)]),style:e.normalizeStyle(Qr(G.item,Q)),title:L(Q),onPointerdown:e.withModifiers(Ut=>Cw(G.item,Q,Ut),["stop"]),onClick:e.withModifiers(Ut=>nn({kind:"slot",item:Q}),["stop"]),onContextmenu:e.withModifiers(Ut=>Pw(Q,Ut),["prevent","stop"])},[e.createElementVNode("div",Th,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createElementVNode("div",Ph,e.toDisplayString(P(Q,en(G))),1),p(Q)?(e.openBlock(),e.createElementBlock("div",Mh,e.toDisplayString(p(Q)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(Ut=>kw(G.item,Q,Ut),["stop","prevent"])},null,40,Ih)],46,$h))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Rh,[Kt(A,G)?(e.openBlock(),e.createBlock(e.unref(b.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(Q=>nn(G),["stop"])},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(Q=>bw(G,Q),["stop","prevent"])},null,40,Ah)],46,kh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+G.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=y.value)==null?void 0:K.id)===G.item.id}]),style:e.normalizeStyle(Jt(G)),title:u(G.item)},[e.createVNode(e.unref(b.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Dh,e.toDisplayString(u(G.item)),1)],14,zh)}),128)),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:gi.value}]),style:e.normalizeStyle(Wr.value)},null,6)):e.createCommentVNode("",!0),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[y.value.kind,{conflict:gi.value}]]),style:e.normalizeStyle(kn.value)},[e.createElementVNode("div",Fh,[e.createTextVNode(e.toDisplayString($.value.time)+"–"+e.toDisplayString(Mt.value)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock("span",Oh,e.toDisplayString(s.value.intoSession),1)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock("span",Lh," ⚠ "+e.toDisplayString(s.value.conflictCount)+": "+e.toDisplayString(xn.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",_h,e.toDisplayString(y.value.name),1)],6)):e.createCommentVNode("",!0)],42,Sh))),128))],4),e.createElementVNode("div",Hh,e.toDisplayString(s.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",gh,[e.createTextVNode(e.toDisplayString(s.value.noHalls)+" ",1),r.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"primary",size:"sm",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0)])),R.value&&$.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(b.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString($.value.time)+" · "+e.toDisplayString($.value.hallName)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(b.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(s.value.intoSession)+" «"+e.toDisplayString(u($.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(b.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(xn.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Ie=It.value)!=null&&Ie.moved&&R.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(b.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(It.value.perfom.startTime)+"–"+e.toDisplayString(It.value.perfom.endTime)+" · "+e.toDisplayString(s.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Uh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createBlock(e.unref(b.QCard),{key:A.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",vh,[e.createVNode(e.unref(b.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",qh,e.toDisplayString(W(A)),1),e.createVNode(e.unref(b.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.session,onClick:G=>Ll(A)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.slot,onClick:G=>_l(A)},null,8,["label","onClick"]),r.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Pt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(e.unref(b.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var G;return[o.value&&((G=A.sessions)!=null&&G.length)?(e.openBlock(),e.createElementBlock("div",jh,[e.createElementVNode("div",Wh,[e.createVNode(e.unref(b.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.sessionsTitle),1)]),e.createVNode(e.unref(Si),{list:A.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>Rl(K,A,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Gh,[e.createVNode(e.unref(b.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>tn(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Hn,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>bi(K,"startTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Hn,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>bi(K,"endTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.renderSlot(h.$slots,"session-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"session")},null,8,["onClick"])]),st(K).length?(e.openBlock(),e.createElementBlock("div",Qh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(K),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:"list-row nested-row"},[e.createVNode(e.unref(b.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Yh,e.toDisplayString(m(Q)),1),e.createElementVNode("div",Xh,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createVNode(e.unref(b.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:Ut=>nn({kind:"slot",item:Q})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Zh,[e.createElementVNode("div",Jh,[e.createVNode(e.unref(b.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.slotsTitle),1)]),e.createVNode(e.unref(Si),{list:Ht(A),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>Rl(K,A,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Kh,[e.createVNode(e.unref(b.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>tn(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Hn,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>bi(K,"startTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Hn,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>bi(K,"endTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":K.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Al(A),"option-value":"id","option-label":"label","onUpdate:modelValue":Q=>Ol(K,Q)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"slot-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Ht(A).length&&!Ye(A)?(e.openBlock(),e.createElementBlock("div",ep,e.toDisplayString(s.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",tp,e.toDisplayString(s.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",uh,[e.createVNode(e.unref(b.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(s.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:s.value.addDay,icon:"event",class:"q-mt-sm",onClick:it},null,8,["label"])])),e.createVNode(ue,{modelValue:V.value,"onUpdate:modelValue":g[7]||(g[7]=A=>V.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",np,e.toDisplayString(s.value.addHall),1)]),_:1}),e.createVNode(e.unref(b.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",op,[e.createVNode(F,{modelValue:N.value,"onUpdate:modelValue":g[5]||(g[5]=A=>N.value=A),label:s.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ve,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:s.value.create,icon:"add",dense:"",onClick:ve},null,8,["label"])]),e.renderSlot(h.$slots,"places-list",{day:Se.value,add:ae},()=>[Tt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ip,e.toDisplayString(s.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(b.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",rp,e.toDisplayString(f(A)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:s.value.addHall,icon:"add",dense:"",onClick:G=>ae(A)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(b.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:s.value.close,color:"primary",onClick:g[6]||(g[6]=A=>V.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(ue,{modelValue:S.value,"onUpdate:modelValue":g[14]||(g[14]=A=>S.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),null,{default:e.withCtx(()=>{var A;return[e.createElementVNode("div",sp,e.toDisplayString(((A=T.value)==null?void 0:A.kind)==="session"?s.value.session:s.value.slot),1)]}),_:1}),T.value?(e.openBlock(),e.createBlock(e.unref(b.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(F,{modelValue:T.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=A=>T.value.item.name=A),label:s.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",ap,[e.createElementVNode("div",lp,[e.createVNode(Hn,{modelValue:T.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=A=>T.value.item.startTime=A),label:s.value.startTime,dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",cp,[e.createVNode(Hn,{modelValue:T.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=A=>T.value.item.endTime=A),label:s.value.endTime,dense:"",outlined:""},null,8,["modelValue","label"])])]),T.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":T.value.item.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Ew.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=A=>Ol(T.value.item,A))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"edit-form",{kind:T.value.kind,item:T.value.item,schedule:Dl.value},void 0,!0),T.value.kind==="slot"?(e.openBlock(),e.createBlock(F,{key:1,modelValue:T.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=A=>T.value.item.description=A),label:s.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QCardActions),{align:"right"},{default:e.withCtx(()=>[T.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:s.value.delete,onClick:Aw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b.QSpace)),e.createVNode(w,{flat:"",label:s.value.cancel,color:"primary",onClick:g[13]||(g[13]=A=>S.value=!1)},null,8,["label"]),e.createVNode(w,{label:s.value.save,color:"primary",onClick:Rw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),Rt.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:Rt.value.x+"px",top:Rt.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(Rt.value.items,(A,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":A.danger}]),onClick:K=>Vw(A)},[e.createVNode(e.unref(b.QIcon),{name:A.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A.label),1)],10,dp))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-35db9279"]]),fp={class:"schedule-timeline"},up={key:0,class:"timeline-container"},mp={class:"day-header"},hp={class:"day-title"},pp={class:"timeline"},gp={key:0,class:"schedule-place"},yp={class:"events-column"},wp={key:0,class:"event-item session-item"},bp={class:"event-content"},Cp={class:"event-time"},Sp={class:"event-main"},kp={class:"event-name"},xp={key:0,class:"speakers-list"},Ep=["onClick"],Bp={class:"speaker-details"},Vp={class:"speaker-name"},Np={class:"bio-text"},$p=["onClick"],Tp={key:0,class:"perfom-divider"},Pp={class:"event-content"},Mp={class:"event-time"},Ip={class:"event-main"},Rp={class:"event-name"},Ap={class:"event-badges"},zp={key:0,class:"speakers-list"},Dp=["onClick"],Fp={class:"speaker-details"},Op={class:"speaker-name"},Lp={class:"bio-text"},_p={key:1,class:"no-program"},Fa=z(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=y=>{if(o.dayTitle)return o.dayTitle(y);const C=new Date(y.date);return isNaN(C.getTime())||C.getFullYear()<2e3?"":C.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=y=>{var C;return o.placeName?o.placeName(y):((C=y.place)==null?void 0:C.name)||y.placeName||""},c=y=>o.slotName?o.slotName(y):(y==null?void 0:y.name)||"",l=y=>o.sessionName?o.sessionName(y):(y==null?void 0:y.name)||"",f=y=>o.slotParticipants?o.slotParticipants(y):(y==null?void 0:y.participants)||[],u=y=>o.sessionParticipants?o.sessionParticipants(y):(y==null?void 0:y.participants)||[],m=y=>{var C,$;return o.participantName?o.participantName(y):(y==null?void 0:y.name)||(y==null?void 0:y.fullName)||(($=(C=y==null?void 0:y.human)==null?void 0:C.getFullName)==null?void 0:$.call(C))||""},p=y=>o.participantBio?o.participantBio(y):(y==null?void 0:y.bio)||(y==null?void 0:y.regalias)||"",k=y=>o.slotListOf?o.slotListOf(y):(y==null?void 0:y.slots)||[],E=y=>o.nestedSlotListOf?o.nestedSlotListOf(y):(y==null?void 0:y.slots)||[],V=y=>y.schedules.filter(C=>{var $;return k(C).length>0||((($=C.sessions)==null?void 0:$.length)||0)>0}),N=y=>{const C=[],$=new Set((y.sessions||[]).map(j=>j.id));for(const j of y.sessions||[]){C.push({kind:"session",item:j,nested:!1,index:0});for(const se of E(j))C.push({kind:"slot",item:se,nested:!0,index:0})}let R=0;for(const j of k(y).filter(se=>!se.sessionId||!$.has(se.sessionId)))C.push({kind:"slot",item:j,nested:!1,index:R++});return C},S=e.computed(()=>{var y;return(y=o.days)==null?void 0:y.some(C=>{var $;return($=C.schedules)==null?void 0:$.some(R=>{var j;return k(R).length>0||(((j=R.sessions)==null?void 0:j.length)||0)>0})})}),T=(y,C)=>`${y} - ${C}`;return(y,C)=>(e.openBlock(),e.createElementBlock("div",fp,[S.value?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,$=>(e.openBlock(),e.createElementBlock("div",{key:$.id,class:"day-section"},[e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(e.unref(b.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s($)),1)])]),e.createElementVNode("div",pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V($),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"time-slot"},[a(R)?(e.openBlock(),e.createElementBlock("div",gp,[e.createVNode(e.unref(b.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(R)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",yp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(R),j=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j.item.id},[j.kind==="session"?(e.openBlock(),e.createElementBlock("div",wp,[e.createElementVNode("div",bp,[e.createElementVNode("div",Cp,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Sp,[e.createElementVNode("div",kp,e.toDisplayString(l(j.item)),1),u(j.item).length?(e.openBlock(),e.createElementBlock("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Bp,[e.createElementVNode("div",Vp,[e.createVNode(e.unref(b.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Np,e.toDisplayString(p(se)),1)])],8,Ep))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":j.item.active,"nested-item":j.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",j.item)},[!j.nested&&j.index>0?(e.openBlock(),e.createElementBlock("div",Tp)):e.createCommentVNode("",!0),e.createElementVNode("div",Pp,[e.createElementVNode("div",Mp,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Ip,[e.createElementVNode("div",Rp,e.toDisplayString(c(j.item)),1),e.createElementVNode("div",Ap,[e.renderSlot(y.$slots,"badges",{item:j.item},void 0,!0)]),f(j.item).length?(e.openBlock(),e.createElementBlock("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Fp,[e.createElementVNode("div",Op,[e.createVNode(e.unref(b.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Lp,e.toDisplayString(p(se)),1)])],8,Dp))),128))])):e.createCommentVNode("",!0)])])],10,$p))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",_p,[e.createVNode(e.unref(b.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(y.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Hp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Da,ScheduleTimeline:Fa},Symbol.toStringTag,{value:"Module"})),Up=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:yt,blockSizeClass:Ra,blockStyle:$a,byStart:ur,diffM:_n,findEnclosingSession:Ia,fromMin:Ge,gridBounds:Na,hasConflict:Pa,intersects:yo,nestedConflict:Ma,nestedSlotStyle:Ta,normTime:yn,snapMinutes:wo,toMin:ce},Symbol.toStringTag,{value:"Module"}));let vp=class extends Ve{constructor(){super(ei,"schedule-days")}};const qp=new vp;let jp=class extends Ve{constructor(){super(Ln,"schedule-places")}};const Wp=new jp;let Gp=class extends Ve{constructor(){super(On,"schedule-sessions")}};const Qp=new Gp;let Yp=class extends Ve{constructor(){super(Dt,"schedule-slots")}};const Xp=new Yp;let Zp=class extends Ve{constructor(){super(go,"schedule-timetables")}};const Jp=new Zp,Kp=Object.freeze(Object.defineProperty({__proto__:null,C:ah,Components:Hp,H:Up,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:qp,SchedulePlacesStore:Wp,ScheduleSessionsStore:Qp,ScheduleSlotsStore:Xp,SchedulesStore:Jp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Aa,defaultScheduleLabels:mr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),hr=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(b.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"]))}}),eg={class:"tags-selector"},tg={key:0,class:"empty-state"},ti=z(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=>D.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,f)=>{const u=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",eg,[e.createVNode(Ze,{modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=m=>e.isRef(i)?i.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(b.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(b.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:p=>c(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[u]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tg,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),ng={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},og={class:"edit-dialog-header"},ig={class:"edit-dialog-title"},rg={class:"edit-dialog-content"},sg={key:0,class:"edit-dialog-actions"},Un=z(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},ng),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=b.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)},f=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const m=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(fn,{modelValue:e.unref(a),"onUpdate:modelValue":[k[0]||(k[0]=E=>e.isRef(a)?a.value=E:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(f,["escape"])],onShow:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",og,[e.createElementVNode("div",ig,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",rg,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",sg,[e.withDirectives(e.createVNode(ne,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(ne,{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"]]),pr=z(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(b.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var f,u,m;return[e.createVNode(hr,{color:(f=n.row[n.prop])!=null&&f.id?"primary":"grey-3","text-color":(u=n.row[n.prop])!=null&&u.id?"white":"grey-6",outline:!((m=n.row[n.prop])!=null&&m.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(b.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(Un,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(ti,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),ag={class:"tag-name"},lg={key:0,class:"tag-extra"},gr=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(u=>u==null?void 0:u.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var f;return((f=r.value[0])==null?void 0:f[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async f=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=f,await t.store.Update(t.row)),o.value.toggle()};return(f,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(b.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:u[1]||(u[1]=e.withModifiers(m=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",ag,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",lg,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(b.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:u[0]||(u[0]=m=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(Un,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(ti,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),cg={key:0,class:"relation-label"},dg={class:"relation-count"},yr=z(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&&D.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(b.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",cg,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",dg,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),wr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(b.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ne,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(D).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),fg={class:"cell-text"},br=z(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,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(b.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:f[0]||(f[0]=u=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",fg,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(Un,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":f[1]||(f[1]=u=>n.row[n.prop]=u),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"]]),bo=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,{expose:t,emit:o}){const i=e.useModel(n,"modelValue"),r=o,s=e.ref(null);function a(){var C;(C=s.value)==null||C.focus()}function c(){var C;(C=s.value)==null||C.blur()}function l(){var C;(C=s.value)==null||C.showPopup()}function f(){var C;(C=s.value)==null||C.hidePopup()}async function u(){var C;return await((C=s.value)==null?void 0:C.validate())??!0}function m(){var C;(C=s.value)==null||C.resetValidation()}t({focus:a,blur:c,showPopup:l,hidePopup:f,validate:u,resetValidation:m});const p=e.useAttrs(),k=e.computed(()=>typeof p.id=="string"?p.id:void 0),E=e.computed(()=>{const C={};for(const $ of Object.keys(p))$!=="id"&&$!=="disable"&&(C[$]=p[$]);return C}),V=n,N=e.computed(()=>p.disable??V.disabled),S=C=>{r("change",C)},T=()=>{r("clear",void 0)},y=e.computed(()=>{const C={};return V.margin&&(C.margin=V.margin),V.padding&&(C.padding=V.padding),V.width&&(C.width=V.width),V.inPadding&&(C.padding=V.inPadding),C});return(C,$)=>(e.openBlock(),e.createBlock(e.unref(b.QSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":$[0]||($[0]=R=>i.value=R)},e.unref(E),{for:e.unref(k),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(N),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(y),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":S,onClear:T}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(C.$slots,"before",{},()=>[e.renderSlot(C.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(C.$slots,"append",{},()=>[e.renderSlot(C.$slots,"right")])]),_:2},[C.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"prepend")]),key:"0"}:void 0,C.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"after")]),key:"1"}:void 0,C.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"default")]),key:"2"}:void 0,C.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"label")]),key:"3"}:void 0,C.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"error")]),key:"4"}:void 0,C.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"hint")]),key:"5"}:void 0,C.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"counter")]),key:"6"}:void 0,C.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"loading")]),key:"7"}:void 0,C.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"selected")]),key:"8"}:void 0,C.$slots.option?{name:"option",fn:e.withCtx(R=>[e.renderSlot(C.$slots,"option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"9"}:void 0,C.$slots["no-option"]?{name:"no-option",fn:e.withCtx(R=>[e.renderSlot(C.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"10"}:void 0,C.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"before-options")]),key:"11"}:void 0,C.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"after-options")]),key:"12"}:void 0,C.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(R=>[e.renderSlot(C.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(R)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),Cr=z(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(b.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(bo,{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"]]),ug={class:"cell-text"},Sr=z(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,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(b.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:f[0]||(f[0]=u=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",ug,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(Un,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":f[1]||(f[1]=u=>n.row[n.prop]=u),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"]]),kr=z(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=>{D.F.FTSP.Get().p.page=c.pagination.page-1,D.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(b.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=f=>e.isRef(r)?r.value=f: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(f=>[e.createVNode(e.unref(b.QTr),{props:f},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.cols,u=>(e.openBlock(),e.createBlock(e.unref(b.QTh),{key:u.name,props:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(f=>[e.createVNode(e.unref(b.QTr),{props:f},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:f.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 Oa(n){n.component("PTable",kr),n.component("PTableBadge",pr),n.component("PTableBadges",gr),n.component("PTableCount",yr),n.component("PTableEdit",wr),n.component("PTableNumber",br),n.component("PTableSelect",Cr),n.component("PTableString",Sr)}const mg=Object.freeze(Object.defineProperty({__proto__:null,PTable:kr,PTableBadge:pr,PTableBadges:gr,PTableCount:yr,PTableEdit:wr,PTableNumber:br,PTableSelect:Cr,PTableString:Sr,default:Oa},Symbol.toStringTag,{value:"Module"})),hg=["innerHTML"],xr=z(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(b.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(b.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,hg)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(b.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(b.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(b.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"]]),pg={class:"q-pa-md"},Er=z(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(b.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(b.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(b.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",pg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,f)=>(e.openBlock(),e.createBlock(ne,{key:f,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:u=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(b.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(b.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 ni{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=D.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 ni;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&&D.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 La(n){n.component("PTabs",xr),n.component("PTabsLeft",Er)}const gg=Object.freeze(Object.defineProperty({__proto__:null,Contacts:km,Forms:Gm,Menus:th,Schedule:Kp,Table:mg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:xr,PTabsLeft:Er,TabsStore:ni,default:La},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),_a=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(b.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=f=>o.value=f)},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))}}),yg={class:"row items-center justify-end"},oi="DD.MM.YYYY",Ha=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=b.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=oi.replace(/[DMY]/g,"#"),c=e.ref(null),l=V=>{if(i.modelType){c.value=i.modelType;return}V instanceof Date?c.value="date":(typeof V=="string"&&V||c.value===null)&&(c.value="string")},f=V=>{if(!V)return"";if(V instanceof Date)return Number.isNaN(V.getTime())?"":b.date.formatDate(V,oi);const N=String(V).match(/^(\d{4})-(\d{2})-(\d{2})/);if(N)return`${N[3]}.${N[2]}.${N[1]}`;const S=new Date(V);return Number.isNaN(S.getTime())?"":b.date.formatDate(S,oi)},u=V=>{const N=V.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!N)return null;const S=+N[1],T=+N[2],y=+N[3];if(S<1||S>31||T<1||T>12||y<1900||y>2100)return null;const C=new Date(y,T-1,S);return C.getFullYear()!==y||C.getMonth()!==T-1||C.getDate()!==S?null:C},m=e.ref(f(s.value));l(s.value),e.watch(s,V=>{l(V);const N=f(V);N!==m.value&&(m.value=N)});const p=V=>{const N=typeof V=="number"?String(V):V;if(!N){const T=c.value==="date"?null:"";s.value=T,r("input",T);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(N))return;const S=u(N);if(S)if(c.value==="date")s.value=S,r("input",S);else{const T=S.getFullYear(),y=String(S.getMonth()+1).padStart(2,"0"),C=String(S.getDate()).padStart(2,"0"),$=`${T}-${y}-${C}`;s.value=$,r("input",$)}},k=()=>{r("blur",s.value)},E={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(V,N)=>(e.openBlock(),e.createBlock(Ze,{modelValue:e.unref(m),"onUpdate:modelValue":[N[1]||(N[1]=S=>e.isRef(m)?m.value=S: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(b.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QDate),{modelValue:e.unref(m),"onUpdate:modelValue":N[0]||(N[0]=S=>e.isRef(m)?m.value=S:null),mask:oi,"today-btn":"",locale:E},{default:e.withCtx(()=>[e.createElementVNode("div",yg,[e.withDirectives(e.createVNode(ne,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(V.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(V.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"]))}}),wg={class:"row items-center justify-end"},bg={class:"row items-center justify-end"},Ua=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=b.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=E=>E?b.date.formatDate(E,"DD.MM.YYYY HH:mm"):"",c=E=>{if(!E||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(E))return null;const V=b.date.extractDate(E,"DD.MM.YYYY HH:mm");return Number.isNaN(V.getTime())?null:V},l=E=>{o.value=E},f=E=>{const V=String(E??"");i.value=V.replace(/[_\s]/g,"")===""?"":V},u=()=>{const E=c(i.value);E?l(E):i.value===""?l(null):i.value=a(o.value)},m=()=>{if(r.value){const E=o.value?b.date.formatDate(o.value,"HH:mm"):"00:00",V=`${r.value} ${E}`,N=c(V);N&&(i.value=a(N),l(N))}r.value=""},p=()=>{if(s.value){const E=o.value?b.date.formatDate(o.value,"DD.MM.YYYY"):"",V=b.date.formatDate(new Date,"DD.MM.YYYY"),N=E?`${E} ${s.value}`:`${V} ${s.value}`,S=c(N);S&&(i.value=a(S),l(S))}s.value=""};e.watch(o,E=>{E!==c(i.value)&&(i.value=a(E??null))},{immediate:!0});const k={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(E,V)=>(e.openBlock(),e.createBlock(Ze,{"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":f,onBlur:u},{prepend:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":V[0]||(V[0]=N=>e.isRef(r)?r.value=N:null),mask:"DD.MM.YYYY",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",wg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(b.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":V[1]||(V[1]=N=>e.isRef(s)?s.value=N:null),mask:"HH:mm",format24h:"",locale:k},{default:e.withCtx(()=>[e.createElementVNode("div",bg,[e.withDirectives(e.createVNode(ne,{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=z(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"]]),Sg={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},kg=z(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=S=>{s.value=S,r.value!==void 0&&(r.value=S)},c=e.ref(),l=()=>{a(!0),i("validation-success")},f=()=>{a(!1),i("validation-error")},u=S=>{i("submit",S)},m=()=>{var S;(S=c.value)==null||S.resetValidation(),a(!0),i("reset")},p=async()=>{var T;const S=await((T=c.value)==null?void 0:T.validate())??!1;return a(S),S},k=()=>{var S;(S=c.value)==null||S.resetValidation(),a(!0)};return t({validate:p,resetValidation:k,focus:()=>{var S;return(S=c.value)==null?void 0:S.focus()},submit:S=>{var T;return(T=c.value)==null?void 0:T.submit(S)},reset:S=>{var T;return(T=c.value)==null?void 0:T.reset(S)}}),(S,T)=>(e.openBlock(),e.createBlock(e.unref(b.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:u,onReset:m,onValidationSuccess:l,onValidationError:f},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default",{},void 0,!0),S.$slots.actions?(e.openBlock(),e.createElementBlock("div",Sg,[e.renderSlot(S.$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"]]),xg={class:"p-hint-popup"},Br=z(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(b.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(b.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",xg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),Eg=z(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"]]),Bg=z(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"]]),Vg=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 $={};for(const R of Object.keys(i))R!=="id"&&($[R]=i[R]);return $}),a=n,c=()=>{const $=a.step.toString();return $.includes(".")?$.split(".")[1].length:0},l=c(),f=e.useModel(n,"modelValue"),m=($=>Math.min(Math.max($,a.min),a.max))(f.value);m!==f.value&&(f.value=m);const p=e.ref(m.toFixed(c())),k=e.computed(()=>{const $={};return a.margin&&($.margin=a.margin),a.padding&&($.padding=a.padding),$}),E=$=>{const R=Math.pow(10,l);return Math.round($*R)/R},V=($,...R)=>{f.value=E($),p.value=E($).toFixed(c()),R.forEach(j=>o(j,f.value))},N=($,...R)=>{a.disabled||$>a.max||$<a.min||V($,...R)},S=()=>N(+p.value+a.step,"change"),T=()=>N(+p.value-a.step,"change"),y=$=>N(Number($),"input"),C=()=>N(+p.value,"change","blur");return($,R)=>(e.openBlock(),e.createBlock(e.unref(b.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":y,onBlur:C}),{before:e.withCtx(()=>[e.createVNode(e.unref(b.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:T},{default:e.withCtx(()=>[e.createVNode(Eg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(b.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:S},{default:e.withCtx(()=>[e.createVNode(Bg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),Ng=z(Vg,[["__scopeId","data-v-1aec76d0"]]),$g=z(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(b.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]=f=>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"]]),Tg=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(b.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"]))}}),Pg=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(b.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"]))}}),va=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,f,u,m){var V,N;const k="set"+(((V=f[0])==null?void 0:V.toUpperCase())+f.slice(1)),E=l[k];typeof E=="function"?E(u):(l[f]=u,l[f+"Id"]=u==null?void 0:u.id),await((N=m==null?void 0:m.Update)==null?void 0:N.call(m,l))}const s=(l,f)=>{if(l===""){f(()=>{i.value=o});return}f(()=>{i.value=o.filter(u=>D.H.Strings.SearchInFields(l,[u.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,f)=>(e.openBlock(),e.createBlock(bo,{"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(Br,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Mg=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(b.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))}}),Ig=z(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(b.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]=f=>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"]]),Rg=z(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"]]),qa=z(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(b.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(b.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"]]),Ag=z(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 f of Object.keys(o))f!=="id"&&(l[f]=o[f]);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,f)=>(e.openBlock(),e.createBlock(e.unref(b.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":f[0]||(f[0]=u=>t.value=u)},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":f[1]||(f[1]=u=>l.$emit("input",t.value)),onBlur:f[2]||(f[2]=u=>l.$emit("blur",t.value)),onFocus:f[3]||(f[3]=u=>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"]]),ja=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(b.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=f=>o.value=f)},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))}}),zg={class:"top-slider-content"},Dg={class:"center"},Fg=z(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",zg,[e.createElementVNode("div",Dg,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(b.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 Og(n){n.component("PButton",ne),n.component("PBadge",uo),n.component("PCheckBox",_a),n.component("PChip",hr),n.component("PDateInput",Ha),n.component("PDateTimeInput",Ua),n.component("PDialog",fn),n.component("PFlex",Cg),n.component("PForm",kg),n.component("PHint",Br),n.component("PInput",Ze),n.component("PInputNumber",Ng),n.component("PLeftSlider",$g),n.component("PList",Tg),n.component("PListItem",Pg),n.component("POptionsListSingle",ti),n.component("POpts",va),n.component("PRadio",Mg),n.component("PRightSlider",Ig),n.component("PSelect",bo),n.component("PSticky",Rg),n.component("PString",tr),n.component("PTextarea",Ag),n.component("PTopSlider",Fg),n.component("PTableToggle",qa),n.component("PToggle",ja),n.component("PTooltip",nt)}const Lg={key:0,class:"mainblock"},_g={class:"mainblock-right"},Hg={class:"body"},Ug=z(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",Lg,[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",_g,[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",Hg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),vg={class:"mainblock-right"},qg={class:"body"},jg=z(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",vg,[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",qg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Wa=z(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"]]),Wg={class:"container"},Gg={class:"slide-box"},Qg={class:"image"},Yg={class:"image-box"},Xg=["id","src","alt"],Zg={class:"link-number"},Jg=["id","onClick"],Kg=z(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(Et.None),s=e.ref(ia(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,f=k=>{r.value=k,setTimeout(()=>r.value=Et.None,t.animationTime)},u=k=>{k!=i.value&&(f(k<i.value?Et.Prev:Et.Next),setTimeout(()=>i.value=k,t.animationTime/2))},m=()=>{f(Et.Next),setTimeout(c,t.animationTime/2)},p=()=>{f(Et.Prev),setTimeout(l,t.animationTime/2)};return(k,E)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Wg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[0]||(E[0]=e.withModifiers(V=>p(),["stop"]))},[...E[3]||(E[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Gg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(V,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Et).Next,animationprev:e.unref(r)===e.unref(Et).Prev})},[e.createElementVNode("div",Qg,[e.createElementVNode("div",Yg,[e.createElementVNode("img",{id:V.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:V.fileInfo.getImageUrl(),alt:V.fileInfo.originalName,onClick:E[1]||(E[1]=S=>k.showImageInFullScreen())},null,12,Xg)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[2]||(E[2]=e.withModifiers(V=>m(),["stop"]))},[...E[4]||(E[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Zg,[e.createVNode(Wa,{"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),(V,N)=>(e.openBlock(),e.createElementBlock("div",{id:N.toString(),key:N,class:"number",style:e.normalizeStyle({background:N.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(S=>u(N),["stop"])},e.toDisplayString(N+1),13,Jg))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),e1=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(f,u)=>{const m=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(f.$slots,"default")],4)),[[m,l]])}}}),t1={class:"drop-item"},n1={key:0,class:"drop-item-list"},o1=z(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",t1,[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",n1,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),i1=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Pi,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?D.F.FTSP.Get().setF(o.model):D.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]=f=>e.isRef(i)?i.value=f:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),r1=z(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??kt.Get()),s=e.ref(void 0),a=async l=>{r.value.replaceF(l,s.value),s.value=l,r.value.p.drop()},c=async l=>{await a(l),i("load")};return(l,f)=>{const u=e.resolveComponent("PString"),m=e.resolveComponent("PButton"),p=e.resolveComponent("GridContainer"),k=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(u,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(k,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...f[0]||(f[0]=[])]),default:e.withCtx(()=>[e.createVNode(p,{"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,(E,V)=>(e.openBlock(),e.createBlock(m,{key:V,color:"blue",height:"auto",text:E.label,"is-toggle":E.valueEq(e.unref(s)),"toggle-mode":!0,inverse:n.inverse,onClick:N=>c(E.valueEq(e.unref(s))?void 0:E)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-22f3c81d"]]),s1=["value","label"],a1=z(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=kt.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 f=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=u=>e.isRef(r)?r.value=u: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,(u,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,value:u,label:u.label},null,8,s1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),l1=z(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),c1=z(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"]]),d1={key:0,class:"blur"},f1={style:{display:"flex","justify-content":"center"}},u1=z(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 f=C=>{C.stopPropagation(),C.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var C,$;await e.nextTick(),a.value?(($=(C=document.getElementById("info-item-opened-content"))==null?void 0:C.querySelector("input"))==null||$.focus(),document.body.addEventListener("keydown",f)):document.body.removeEventListener("keydown",f,!1),a.value===!1&&i("after-close")});const u=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},m=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")})),E=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),V=e.computed(()=>({height:p.value?"auto":"0"})),N=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),S=()=>{o.showSaveDialog?c.value=!0:a.value=!1},T=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},y=()=>{a.value=!1,c.value=!1};return(C,$)=>{const R=e.resolveComponent("PString"),j=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),ze=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",d1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:$[2]||($[2]=e.withModifiers(Te=>u(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(k)),onMouseenter:$[0]||($[0]=Te=>n.withHover?s.value=!0:s.value=!1),onMouseleave:$[1]||($[1]=Te=>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(E))},[e.renderSlot(C.$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(V))},[e.renderSlot(C.$slots,"open-inside-content",{},void 0,!0)],4)),[[ze,S,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(N))},[e.renderSlot(C.$slots,"title",{},()=>[e.createVNode(R,{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(se,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",f1,[e.createVNode(j,{text:"Не сохранять",onClick:y}),e.createVNode(j,{text:"Сохранять",onClick:T})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),m1=z(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"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{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,u=>(e.openBlock(),e.createBlock(l,{key:u,type:"admin",color:"blue",text:u,onClick:m=>r(u)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=u=>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"]]),h1={class:"mainblock"},p1={class:"mainline"},g1=z(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",h1,[e.createElementVNode("div",p1,[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"]]),Ga=z(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"]]),y1={class:"search-list"},w1=["onClick"],Qa=z(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(f){r.value="",o("select",f)}return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(Ze,{modelValue:e.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(r)?r.value=m:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(Ga,{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",y1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:p=>l(m)},e.toDisplayString(m.label),9,w1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),b1=z(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"]]),C1={style:{display:"flex","justify-content":"center",width:"100%"}},S1={class:"pag-number"},k1={class:"pag-ul"},x1={key:2},E1=z(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=m=>m?"active":"neutral",i=m=>m?"not-active":"neutral",r=e.ref(ra),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 m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await l(m)},l=async(m,p)=>{r.value.setCurPage(m),kt.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),u()},f=e.computed(()=>{const m=r.value.pagesCount();return m<8?zt.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):zt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<m&&p>1)}),u=()=>{const m=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");m?m.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{kt.Get().p.drop()}),(m,p)=>{const k=e.resolveComponent("ArrowLeft"),E=e.resolveComponent("PButton"),V=e.resolveComponent("DoubleArrowLeft"),N=e.resolveComponent("EllipsisSvg"),S=e.resolveComponent("DoubleArrowRight"),T=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",C1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",S1,[e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=y=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["type"]),e.createElementVNode("ul",k1,[e.createElementVNode("li",null,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=y=>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]=y=>s.value=!0),onMouseleave:p[4]||(p[4]=y=>s.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=y=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(V,{key:0})):(e.openBlock(),e.createBlock(N,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),y=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createVNode(E,{skin:"pag",type:o(y===e.unref(r).curPage),text:y,onClick:C=>c(y)},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]=y=>a.value=!0),onMouseleave:p[7]||(p[7]=y=>a.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=y=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(S,{key:0})):(e.openBlock(),e.createBlock(N,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",x1,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=y=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=y=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(T)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),B1=z(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=er.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async u=>{if(u.length<2)return;s.value.activated=!0,a=er.SearchModel(),a.searchObjects=[],a.query=u,a.key=o.keyValue;const m=a.searchGroups.find(p=>p.key===o.keyValue);return m&&(a.searchGroup=m),await ma.Search.Search(a),a.searchObjects},l=async u=>{i("select",u),r.value=""},f=u=>{i("input",u),u.length===0&&i("input","")};return(u,m)=>(e.openBlock(),e.createBlock(Qa,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[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:f},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"]]),V1={class:"mainblock-body"},N1={class:"mainblock-footer"},$1=z(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",V1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),T1={class:"right-slider-content"},P1={class:"right-slider-content-header"},M1={class:"right-slider-content-box"},I1={class:"right-slider-button"},R1=z(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]=f=>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",T1,[e.createElementVNode("div",P1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",M1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",I1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),A1={class:"mainblock"},z1={class:"body-block"},D1={class:"tab-block"},F1=z(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,f)=>(e.openBlock(),e.createElementBlock("div",A1,[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:f[0]||(f[0]=u=>a(!n.isToggle)),onMouseenter:f[1]||(f[1]=u=>c.value=!0),onMouseleave:f[2]||(f[2]=u=>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",z1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",D1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),O1=["label","value"],L1=z(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[We.String]:"Текстовый ответ",[We.Text]:"Развёрнутый текстовый ответ",[We.Number]:"Числовой ответ",[We.Date]:"Ответ в виде даты",[We.Radio]:"Выбор одного из вариантов",[We.Set]:"Выбор нескольких вариантов",[We.File]:"Ответ в виде файла",[We.MatrixRadio]:"Матрица с одним выбором",[We.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,(f,u)=>e.createElementVNode("option",{key:f,label:f,value:u},null,8,O1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),_1=["label","value"],H1=z(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=dn.GetDefault()});const s=async c=>{r.value=c??dn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var u;const f=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(f,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=m=>e.isRef(r)?r.value=m:null),"popper-append-to-body":!1,clearable:!((u=e.unref(r))!=null&&u.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(m,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:m.label,value:m},null,8,_1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),U1=["label","value"],v1=z(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??kt.Get()),s=e.ref();e.onBeforeMount(()=>{s.value=dn.GetDefault()});const a=async l=>{l||(s.value=dn.GetDefault()),r.value.setSortModel(s.value),r.value.p.drop(),i("load")},c=async l=>{await a(l)};return(l,f)=>{var m;const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(s),"onUpdate:modelValue":f[0]||(f[0]=p=>e.isRef(s)?s.value=p:null),"popper-append-to-body":!1,clearable:!((m=e.unref(s))!=null&&m.default),"value-key":"label",onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(p,k)=>(e.openBlock(),e.createElementBlock("option",{key:k,label:p.label,value:p},null,8,U1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-1e73245e"]]),q1={class:"switch-container"},j1={class:"line"},W1={class:"line"},G1=z(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(f.value)?void 0:i,s=()=>f.value?i:void 0,a=()=>o.secondModel.valueEq(f.value)?void 0:i,c=m=>{var k;return{color:(k=f.value)!=null&&k.valueEq(m)?"#006bb4":"#B0A4C0"}},l=t,f=e.ref(void 0),u=async m=>{var p;(p=f.value)!=null&&p.valueEq(m)||(f.value=m,l("load"))};return(m,p)=>{const k=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",q1,[e.createElementVNode("div",j1,[e.createVNode(k,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=E=>u(n.firstModel))},null,8,["string","style"]),e.createVNode(k,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=E=>u())},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]=E=>u(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",W1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(f))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=E=>u(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(f)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=E=>u())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(f))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=E=>u(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"]]),Q1={},Y1={class:"flex"};function X1(n,t){return e.openBlock(),e.createElementBlock("div",Y1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const Z1=z(Q1,[["render",X1],["__scopeId","data-v-5023d414"]]),J1=z(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"),f=e.resolveComponent("GridContainer"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(f,{"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"]]),K1={class:"top-slider-content"},ey={class:"center"},ty=z(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",K1,[e.createElementVNode("div",ey,[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 ny(n){n.component("PageNotFound",ta),n.component("AdaptiveContainer",Ug),n.component("AdaptiveContainerHorizontal",jg),n.component("CarouselImages",Kg),n.component("ContextWindow",e1),n.component("DropList",o1),n.component("FilterCheckbox",i1),n.component("FiltersButtonsSelect",r1),n.component("FilterSelect",a1),n.component("FTSPPanel",l1),n.component("GeneralItem",c1),n.component("GridContainer",Wa),n.component("InfoItem",u1),n.component("InfoItemSelectButtons",m1),n.component("LeftRightContainer",g1),n.component("PAutocomplete",Qa),n.component("PhoneForm",b1),n.component("PPagination",E1),n.component("RemoteSearch",B1),n.component("ResearcheContainer",$1),n.component("RightSliderContainer",R1),n.component("RightTabsContainer",F1),n.component("SelectValueType",L1),n.component("SortList",H1),n.component("SortSelect",v1),n.component("Switch3Pos",G1),n.component("ThemeWrapper",Z1),n.component("ToggleInfoItem",J1),n.component("TopSliderContainer",ty)}const oy=z(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"]]),iy=z(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"]]),ry=z(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"]]),sy=z(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"]]),Ya=z(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"]]),ay=z(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"]]),ly=z(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"]]),cy=z(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"]]),dy=z(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"]]),fy=z(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"]]),uy=z(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"]]),my=z(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"]]),hy=z(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"]]),py=z(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"]]),gy=z(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 yy(n){n.component("IconDownload",oy),n.component("IconFilter",iy),n.component("ArrowLeft",uy),n.component("ArrowRight",my),n.component("DoubleArrowLeft",hy),n.component("DoubleArrowRight",py),n.component("EllipsisSvg",gy),n.component("IconArrowLeft",ry),n.component("IconCheckDefault",sy),n.component("IconClose",Ya),n.component("IconEdit",ay),n.component("IconEmail",ly),n.component("IconMove",cy),n.component("IconPhone",dy),n.component("IconSearch",Ga),n.component("IconSelectArrow",fy)}const wy=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 by(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 Cy=z(wy,[["render",by]]),Sy=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}}}),ky=["for"],xy={class:"inside-icon"};function Ey(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",xy,[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,ky),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 By=z(Sy,[["render",Ey],["__scopeId","data-v-37d79495"]]),Vy={class:"tab"},Ny={class:"rotate"},$y=z(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",Vy,[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",Ny,[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"]]),Ty={class:"add-block_body"},Py=z(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",Ty,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),My=z(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"]]),Iy={class:"add-block_body"},Ry=z(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",Iy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Ay={class:"select-dialog"},zy={class:"select-dialog-header"},Dy={class:"select-dialog-title"},Fy={class:"select-dialog-content"},Oy={class:"select-dialog-actions"},Xa=z(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=b.Ripple,l=b.ClosePopup,f=async()=>{await i.store.GetOptions(),a.value=i.store.Options},u=async N=>{await i.store.Get(N.value);const S=i.store.Item,T=new S.constructor(S);r("add",T),m()},m=()=>{r("close"),s.value=!1},p=N=>{N||r("close")},k=()=>{s.value&&m()},E=()=>{s.value=!s.value},V=async()=>{await e.nextTick();const N=document.querySelector(".select-dialog-content .q-item");N&&"focus"in N&&N.focus()};return t({opened:s,toggle:E}),e.onBeforeMount(f),(N,S)=>(e.openBlock(),e.createBlock(fn,{modelValue:s.value,"onUpdate:modelValue":[S[0]||(S[0]=T=>s.value=T),p],position:"top",onKeydown:e.withKeys(k,["escape"]),onShow:V},{default:e.withCtx(()=>[e.createElementVNode("div",Ay,[e.createElementVNode("div",zy,[e.createElementVNode("div",Dy,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",Fy,[e.createVNode(e.unref(b.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),T=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(b.QItem),{key:T.value,clickable:"",class:"q-px-md q-py-sm",onClick:y=>u(T)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(b.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",Oy,[e.withDirectives(e.createVNode(ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Ly=["src"],_y={key:0,class:"header-row"},Hy={class:"title-wrapper"},Uy={key:0,class:"title-icon"},vy={class:"title-text"},qy={class:"text-subtitle1 text-weight-medium"},jy={key:0,class:"caption-row"},Wy={class:"text-caption text-grey-6"},Gy=["innerHTML"],Qy={key:1,class:"card-footer"},Za=z(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(b.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,Ly)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(b.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",_y,[e.createElementVNode("div",Hy,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Uy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(b.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",vy,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",qy,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",jy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Wy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(b.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,Gy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Qy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),Yy={key:0,class:"list-title"},Xy={class:"draggable-item"},Zy={class:"drag-handle"},Jy={class:"item-content"},Ky={key:0,class:"item-actions"},e0={class:"item-content"},t0={key:0,class:"item-actions"},n0={key:4,class:"add-button-container"},o0=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:D.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&&D.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"||(D.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,f)=>(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",Yy,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(Si),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:u,index:m})=>[e.createElementVNode("div",Xy,[e.createElementVNode("div",Zy,[e.createVNode(e.unref(b.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",Jy,[e.renderSlot(l.$slots,"default",{item:u,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:u.name,"onUpdate:modelValue":p=>u.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(u)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Ky,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(u.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(u,m)=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",e0,[e.renderSlot(l.$slots,"default",{item:u,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:u.name,"onUpdate:modelValue":p=>u.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(u)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",t0,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(u.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",n0,[e.createVNode(ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),Ja=z(o0,[["__scopeId","data-v-c87ed91c"]]),i0={class:"del-block_title"},r0={class:"del-block_body"},s0=z(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",i0,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",r0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Ka=z(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 a0(n){n.component("CollapseContainer",Cy),n.component("CollapseItem",By),n.component("VerticalCollapseContainer",$y),n.component("PAdd",Py),n.component("PAddDialog",Xa),n.component("PCard",Za),n.component("PCrudList",Ja),n.component("PEditDialog",Un),n.component("PModal",Ka),n.component("PContainer",My),n.component("PContainerStickyHead",Ry),n.component("PDel",s0)}const l0={class:"btn-group"},el=z(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(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){Oe.Form.SetChunk(c.GetChunk()),a();return}const l=Oe.Form.Validate();if(l.length>0){Wt.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(()=>{Oe.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(tr,{string:e.unref(Oe).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Oe).Form.GetFields(),f=>(e.openBlock(),e.createBlock(Ze,{id:f.id,key:f.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:f.value,"onUpdate:modelValue":u=>f.value=u,autocomplete:"nope",type:f.IsPassword?"password":"text",placeholder:f.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),e.createElementVNode("div",l0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(f,u)=>(e.openBlock(),e.createBlock(ne,{id:f.id,key:f.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:u===0?e.unref(pe).Success:e.unref(pe).Primary,skin:"base",text:f.text,margin:"10px 0 0 0",width:"100%",onClick:m=>s(f)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),c0=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=()=>{Oe.Form.Reset(),Oe.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(Ka,{show:e.unref(Oe).Modal.Visible,closable:e.unref(Oe).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(el,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),d0=["onClick"],f0=z(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 f=u=>{o.menus.Select(u),i("select")};return(u,m)=>(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:E=>f(k)},e.toDisplayString(p.name),15,d0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(u.$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"]]),u0=["id"],m0=["for"],h0={class:"left-field"},p0=["href","download"],g0={key:1,class:"text-field__input"},y0={class:"right-field"},w0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new St},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=Xe.GUID(),s=Xe.GUID(),a=()=>{const f=document.getElementById(r);if(!f.files)return;const u=f.files[0];if(!u)return;if(!l(u.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new St;m.setFile(u),m.url=URL.createObjectURL(u),i("upload",m)},c=()=>{i("remove")};e.onMounted(()=>{const f=document.getElementById(s);f&&(f.onclick=()=>{var u;return(u=document.getElementById(r))==null?void 0:u.click()})});const l=f=>{let u=oa.Get(f);return!!o.formats.includes(u.toLowerCase())};return(f,u)=>{const m=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,u0),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,m0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",h0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),e.createVNode(m,{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,p0),e.createVNode(k,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ya,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",g0,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",y0,[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)}}}),b0=z(w0,[["__scopeId","data-v-8b73ee22"]]);function tl(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 de(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?tl(Object(o),!0).forEach(function(i){ft(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):tl(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ft(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function C0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,f,u={},m=Object.keys(a);for(f=0;f<m.length;f++)l=m[f],c.indexOf(l)>=0||(u[l]=a[l]);return u}(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 bn(n){return function(t){if(Array.isArray(t))return Vr(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 Vr(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 Vr(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 Vr(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 nl,S0,ii,Me=(nl=function(n){/*!
25
+ `)},Z=(h,g)=>{var w;return{conflict:Qr(h.item,g),dragging:((w=It.value)==null?void 0:w.perfom.id)===g.id,[tn(h)]:!0}},ke=e.ref(null),be=(h,g)=>{const w=h.getBoundingClientRect(),M=Math.min(Math.max((g-w.top)/w.height,0),1);return le.value.start+wo(M*le.value.total,bn)},te=(h,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||j.value||(ke.value={gi:h,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",H),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",tt),window.addEventListener("keydown",ko))},H=h=>{const g=ke.value;if(g){if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Da)return;g.moved=!0;const w=Hn(g.gi.item.startTime,g.gi.item.endTime);b.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?s.value.session:s.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}U(h.clientX,h.clientY),v(h.clientX,h.clientY)}},U=(h,g)=>{var Pe,Re;const w=document.elementFromPoint(h,g),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id");if(!M||!F){y.value=void 0,N.value=null;return}const Y=Zn(F);if(!Y)return;y.value=Y.id;const fe=be(M,g);N.value={scheduleId:Y.id,minutes:fe,time:Ge(fe),hallName:W(Y),...((Pe=b.value)==null?void 0:Pe.kind)==="slot"&&o.value?{session:wi(Y.sessions,fe,fe+(((Re=b.value)==null?void 0:Re.duration)||30),ce)}:{}},R.value={x:h,y:g}},v=(h,g)=>{const w=ze.value;if(!w)return;const M=w.getBoundingClientRect();g<M.top+48?w.scrollTop-=14:g>M.bottom-48&&(w.scrollTop+=14),h<M.left+48?w.scrollLeft-=14:h>M.right-48&&(w.scrollLeft+=14)},q=h=>{ie(h)},ie=async h=>{const g=ke.value;if(me(),ke.value=null,!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Zn(F):void 0;if(M&&Y){const fe=be(M,h.clientY);await Al(Y,fe)}xe()},me=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",tt),window.removeEventListener("keydown",ko)},xe=()=>{ke.value=null,b.value=null,y.value=void 0,N.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",se.value=Date.now()},tt=()=>{me(),xe()},ko=h=>{h.key==="Escape"&&tt()};e.onBeforeUnmount(()=>{me(),Kr(),zw(),document.body.style.userSelect="",document.body.style.cursor=""});const Xn=h=>{if(!h)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const M=(w.sessions||[]).find(Y=>Y.id===h);if(M)return{kind:"session",item:M,schedule:w};const F=c(w).find(Y=>Y.id===h);if(F)return{kind:"slot",item:F,schedule:w}}return null},Zr=()=>{var h;return Xn((h=b.value)==null?void 0:h.id)},Vw=(h,g)=>{g.preventDefault(),g.stopPropagation();const w=h.item,M=ce(w.startTime),F=ce(w.endTime);if(!isFinite(M)||!isFinite(F))return;const Y=g.clientY;j.value=!0;const fe=A=>{const G=(A.clientY-Y)/Ne.value*60,K=wo(F+G,bn);w.endTime=Ge(Math.max(K,M+bn))},Pe=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Re),j.value=!1,se.value=Date.now();const A=Xn(w.id);A&&(await nn(w,A.kind),await t.persist.refresh())},Re=()=>{Pe()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Re)},It=e.ref(null),Nw=(h,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||j.value)return;const M=w.target.closest(".session-perfoms"),F=ce(h.startTime),Y=ce(h.endTime),fe=Hn(g.startTime,g.endTime);!M||!isFinite(F)||!isFinite(Y)||Y<=F||(It.value={perfom:g,session:h,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:Y-F,durMin:isFinite(fe)&&fe>0?fe:30,container:M},window.addEventListener("pointermove",Ml),window.addEventListener("pointerup",Rl),window.addEventListener("pointercancel",Jr),window.addEventListener("keydown",Il))},Ml=h=>{const g=It.value;if(!g)return;if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Da)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),M=Math.min(Math.max((h.clientY-w.top)/w.height,0),1);let F=g.sessionStart+wo(M*g.sessionDur,bn);const Y=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(Y,g.sessionStart)),g.perfom.startTime=Ge(F),g.perfom.endTime=Ge(F+g.durMin),R.value={x:h.clientX,y:h.clientY}},Rl=h=>{$w(h)},$w=async h=>{var fe;const g=It.value;if(Kr(),It.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Zn(F):void 0;if(M&&Y){b.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||s.value.slot,duration:g.durMin};const Pe=be(M,h.clientY),Re=Ge(Pe),A=Hn(g.perfom.startTime,g.perfom.endTime),G=wt(Re,A>0?A:30),K=((fe=Fl(g.perfom))==null?void 0:fe.id)===Y.id&&g.perfom.startTime===Re&&g.perfom.endTime===G;await Al(Y,Pe),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),b.value=null;return}g.perfom.startTime=wn(g.perfom.startTime),g.perfom.endTime=wn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Jr=()=>{const h=It.value;Kr(),h&&(h.perfom.startTime=h.savedStart,h.perfom.endTime=h.savedEnd),It.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Kr=()=>{window.removeEventListener("pointermove",Ml),window.removeEventListener("pointerup",Rl),window.removeEventListener("pointercancel",Jr),window.removeEventListener("keydown",Il)},Il=h=>{h.key==="Escape"&&Jr()},Tw=(h,g,w)=>{w.preventDefault(),w.stopPropagation();const M=ce(h.startTime),F=ce(h.endTime),Y=ce(g.startTime),fe=w.target.closest(".nested-perfom"),Pe=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Pe||!isFinite(M)||!isFinite(F)||F<=M||!isFinite(Y))return;const Re=Pe.getBoundingClientRect(),A=F-M;j.value=!0;const G=qt=>{const Uw=Math.min(Math.max((qt.clientY-Re.top)/Re.height,0),1),vw=Math.min(Math.max(Y+bn,M+wo(Uw*A,bn)),F);g.endTime=Ge(vw)},K=async()=>{window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",Q),j.value=!1,se.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},Q=()=>{K()};window.addEventListener("pointermove",G),window.addEventListener("pointerup",Q)},Al=async(h,g)=>{var G;y.value=void 0,N.value=null,R.value=null;const w=Zr();if(!w)return;const M=Ge(g),F=Hn(w.item.startTime,w.item.endTime),Y=wt(M,F>0?F:30);if(((G=w.schedule)==null?void 0:G.id)===h.id&&w.item.startTime===M&&w.item.endTime===Y)return;const fe=w.item.startTime;if(w.item.startTime=M,w.item.endTime=Y,w.kind==="slot"&&o.value){const K=wi(h.sessions,ce(M),ce(Y),ce);K?w.item.sessionId=K.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const K=ce(M)-ce(fe);for(const Q of at(w.item))Q.startTime&&(Q.startTime=wt(Q.startTime,K),Q.endTime&&(Q.endTime=wt(Q.endTime,K)),Q.scheduleId=h.id,await nn(Q,"slot"))}const Pe=w.schedule,Re=w.kind==="session"?h.sessions:c(h),A=w.item;if(Pe&&Pe.id!==h.id){A.scheduleId=h.id;const K=w.kind==="session"?Pe.sessions:c(Pe);z.H.Classes.RemoveFromClassById(A.id,K,[]),Re.push(A)}await nn(A,w.kind),await t.persist.refresh()},Pw=async(h,g)=>{if(g.target.closest(".timeline-block"))return;const w=be(g.currentTarget,g.clientY),M=a.value.createSlot(h);if(M.startTime=Ge(w),M.endTime=Ge(w+30),o.value){const Y=wi(h.sessions,w,w+30,ce);Y!=null&&Y.id&&(M.sessionId=Y.id)}await t.persist.createSlot(M),await t.persist.refresh();const F=Xn(M.id);F&&on(F)},zl=async(h,g,w)=>{if(h.added){if(h.added.element.scheduleId=g.id,w==="slot"&&h.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===h.added.element.sessionId)||delete h.added.element.sessionId),await nn(h.added.element,w),w==="session")for(const M of l(h.added.element))M.scheduleId=g.id,await t.persist.updateSlot(M);await t.persist.refresh()}},Zn=h=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(M=>M.id===h);if(w)return w}},wi=(h,g,w,M)=>Ia(h,g,w,M),Dl=h=>o.value?((h==null?void 0:h.sessions)||[]).map(g=>({id:g.id,label:f(g)})):[],Fl=h=>{for(const g of t.days||[])for(const w of g.schedules||[])if(c(w).some(M=>M.id===h.id)||h.sessionId&&(w.sessions||[]).some(M=>M.id===h.sessionId))return w},Ol=e.computed(()=>{const h=$.value;if(h)return h.kind==="session"?Zn(h.item.scheduleId)||Ll(h.item,"session"):Fl(h.item)}),Mw=e.computed(()=>{const h=$.value;return!h||h.kind!=="slot"?[]:Dl(Ol.value)}),Ll=(h,g)=>{for(const w of t.days||[])for(const M of w.schedules||[])if(g==="session"){if((M.sessions||[]).some(F=>F.id===h.id))return M}else if(c(M).some(F=>F.id===h.id))return M},_l=async(h,g)=>{g?h.sessionId=g:delete h.sessionId,await t.persist.updateSlot(h),await t.persist.refresh()},Hl=async h=>{if(!o.value)return;const g=a.value.createSession(h);await t.persist.createSession(g),await t.persist.refresh()},Rw=async(h,g)=>{const w=a.value.createSlot(h);if(w.startTime=Ge(g),w.endTime=wt(w.startTime,30),o.value){const F=wi(h.sessions,g,g+30,ce);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const M=Xn(w.id);M&&on(M)},Ul=async h=>{const g=a.value.createSlot(h),w=[...c(h)].sort(mr).slice(-1)[0];g.startTime=wn(w==null?void 0:w.endTime)||"9:00",g.endTime=wt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),Iw=h=>{At.value=null,h.action()},es=(h,g)=>{const w=g.length*34+12;At.value={x:Math.min(h.clientX,window.innerWidth-210),y:Math.min(h.clientY,window.innerHeight-w-8),items:g}},vl=()=>{At.value=null},ql=()=>{At.value=null},jl=h=>{h.key==="Escape"&&(At.value=null)},bi=()=>{At.value=null},ts=e.ref(!1),Aw=()=>{ts.value||(window.addEventListener("click",vl),window.addEventListener("contextmenu",ql),window.addEventListener("keydown",jl),window.addEventListener("scroll",bi,!0),window.addEventListener("resize",bi),ts.value=!0)},zw=()=>{window.removeEventListener("click",vl),window.removeEventListener("contextmenu",ql),window.removeEventListener("keydown",jl),window.removeEventListener("scroll",bi,!0),window.removeEventListener("resize",bi),ts.value=!1};Aw();const Dw=(h,g)=>{const w=[{icon:"edit",label:s.value.edit,action:()=>on(h)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Wl(h)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h.item,h.kind)}];es(g,w)},Fw=(h,g)=>{const w={kind:"slot",item:h},M=[{icon:"edit",label:s.value.edit,action:()=>on(w)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Wl(w)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h,"slot")}];es(g,M)},Ow=(h,g)=>{const w=be(g.currentTarget,g.clientY),M=Ge(w),F=[{icon:"mic",label:`${s.value.addSlot} · ${M}`,action:()=>void Rw(h,w)}];o.value&&F.push({icon:"groups",label:`${s.value.addSession} · ${M}`,action:()=>void Lw(h,w)}),es(g,F)},Lw=async(h,g)=>{if(!o.value)return;const w=a.value.createSession(h);w.startTime=Ge(g),w.endTime=wt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},Wl=async h=>{const g=Zn(h.item.scheduleId)||Ll(h.item,h.kind);if(!g)return;const w=Hn(h.item.startTime,h.item.endTime)||30,M=wn(h.item.endTime)||"9:00";if(h.kind==="slot"){const F=a.value.createSlot(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.sessionId=h.item.sessionId,h.item.description&&(F.description=h.item.description),h.item.payload&&(F.payload={...h.item.payload}),await t.persist.createSlot(F)}else{const F=a.value.createSession(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},xo=async(h,g)=>{if(g==="slot")await t.persist.removeSlot(h);else{for(const w of l(h))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(h)}await t.persist.refresh()},nn=async(h,g)=>{const w=wn(h.startTime),M=wn(h.endTime);if(!w){t.persist.notify("warning",s.value.correctStartTime);return}h.startTime=w,h.endTime=M||wt(w,30),g==="slot"?await t.persist.updateSlot(h):await t.persist.updateSession(h)},on=h=>{j.value||Date.now()-se.value<400||($.value={kind:h.kind,item:h.item},k.value=!0)},_w=async()=>{const h=$.value;h&&(await nn(h.item,h.kind),k.value=!1,$.value=null,await t.persist.refresh())},Hw=async()=>{const h=$.value;h&&(await xo(h.item,h.kind),k.value=!1,$.value=null)},Ci=(h,g,w,M)=>{h[g]=w,nn(h,M)};return t.persist.loadOptions&&t.persist.loadOptions(),(h,g)=>{var Pe,Re;const w=e.resolveComponent("PButton"),M=e.resolveComponent("PTooltip"),F=e.resolveComponent("PInput"),Y=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",wh,[(Pe=n.days)!=null&&Pe.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Ch,[i.value?(e.openBlock(),e.createBlock(e.unref(C.QTabs),{key:0,modelValue:E.value,"onUpdate:modelValue":g[0]||(g[0]=A=>E.value=A),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,A=>(e.openBlock(),e.createBlock(e.unref(C.QTab),{key:A.id,name:A.id,label:Ct(A)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QSpace)),i.value&&Se.value?(e.openBlock(),e.createBlock(gh,{key:1,"model-value":Zt(Se.value.date),label:s.value.date,class:"date-input","onUpdate:modelValue":g[1]||(g[1]=A=>Yn(Se.value,A))},null,8,["model-value","label"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:2,size:"sm",color:"negative",outline:"",icon:"delete",label:s.value.deleteDay,disable:!Se.value,onClick:g[2]||(g[2]=A=>Sn(Se.value))},null,8,["label","disable"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:3,size:"sm",color:"primary",outline:"",icon:"event",label:s.value.addDay,onClick:rt},null,8,["label"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:4,size:"sm",color:"primary",outline:"",icon:"add",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",Sh,[e.createVNode(e.unref(C.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(C.QBtnToggle),{modelValue:Ne.value,"onUpdate:modelValue":g[3]||(g[3]=A=>Ne.value=A),"toggle-color":"primary",options:Te,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QBtnToggle),{modelValue:S.value,"onUpdate:modelValue":g[4]||(g[4]=A=>S.value=A),"toggle-color":"primary",options:[{label:s.value.grid,value:"grid",icon:"calendar_view_week"},{label:s.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",kh,[he(Se.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:ze,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":he(Se.value).length,"--hours":Math.max(le.value.total/60,1),"--half-hours":Math.max(le.value.total/60*2,2)})},[e.createElementVNode("div",Eh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-head",{"drag-over":y.value===A.id}])},[e.createElementVNode("div",Bh,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",Vh,e.toDisplayString(W(A)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:G=>Ul(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.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:G=>Hl(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:1,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:pt.value})},[e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"hour-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"half-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-col",{"drag-over":y.value===A.id}]),"data-schedule-id":A.id,onDblclick:G=>Pw(A,G),onContextmenu:e.withModifiers(G=>Ow(A,G),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:G.item.id,class:e.normalizeClass(["timeline-block",[G.kind,{conflict:en(A,G),dragging:((K=b.value)==null?void 0:K.id)===G.item.id},tn(G)]]),style:e.normalizeStyle(Kt(G)),title:I(G),onPointerdown:Q=>te(G,Q),onClick:Q=>on(G),onContextmenu:e.withModifiers(Q=>Dw(G,Q),["prevent","stop"])},[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",Ph,[e.createElementVNode("div",Mh,e.toDisplayString(G.item.startTime)+"–"+e.toDisplayString(G.item.endTime),1),e.createElementVNode("div",Rh,e.toDisplayString(V(G)),1),G.kind==="slot"&&p(G.item)?(e.openBlock(),e.createElementBlock("div",Ih,e.toDisplayString(p(G.item)),1)):e.createCommentVNode("",!0)]),G.kind==="session"&&at(G.item).length?(e.openBlock(),e.createElementBlock("div",Ah,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(at(G.item),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:e.normalizeClass(["nested-perfom",Z(G,Q)]),style:e.normalizeStyle(Yr(G.item,Q)),title:L(Q),onPointerdown:e.withModifiers(qt=>Nw(G.item,Q,qt),["stop"]),onClick:e.withModifiers(qt=>on({kind:"slot",item:Q}),["stop"]),onContextmenu:e.withModifiers(qt=>Fw(Q,qt),["prevent","stop"])},[e.createElementVNode("div",Dh,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createElementVNode("div",Fh,e.toDisplayString(T(Q,tn(G))),1),p(Q)?(e.openBlock(),e.createElementBlock("div",Oh,e.toDisplayString(p(Q)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(qt=>Tw(G.item,Q,qt),["stop","prevent"])},null,40,Lh)],46,zh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",_h,[en(A,G)?(e.openBlock(),e.createBlock(e.unref(C.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(Q=>on(G),["stop"])},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(Q=>Vw(G,Q),["stop","prevent"])},null,40,Hh)],46,Th)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+G.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=b.value)==null?void 0:K.id)===G.item.id}]),style:e.normalizeStyle(Kt(G)),title:f(G.item)},[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",vh,e.toDisplayString(f(G.item)),1)],14,Uh)}),128)),N.value&&N.value.scheduleId===A.id&&b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:yi.value}]),style:e.normalizeStyle(Gr.value)},null,6)):e.createCommentVNode("",!0),N.value&&N.value.scheduleId===A.id&&b.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[b.value.kind,{conflict:yi.value}]]),style:e.normalizeStyle(xn.value)},[e.createElementVNode("div",qh,[e.createTextVNode(e.toDisplayString(N.value.time)+"–"+e.toDisplayString(Rt.value)+" ",1),N.value.session?(e.openBlock(),e.createElementBlock("span",jh,e.toDisplayString(s.value.intoSession),1)):e.createCommentVNode("",!0),En.value?(e.openBlock(),e.createElementBlock("span",Wh," ⚠ "+e.toDisplayString(s.value.conflictCount)+": "+e.toDisplayString(En.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Gh,e.toDisplayString(b.value.name),1)],6)):e.createCommentVNode("",!0)],42,$h))),128))],4),e.createElementVNode("div",Qh,e.toDisplayString(s.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",xh,[e.createTextVNode(e.toDisplayString(s.value.noHalls)+" ",1),r.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"primary",size:"sm",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0)])),R.value&&N.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(N.value.time)+" · "+e.toDisplayString(N.value.hallName)+" ",1),N.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(C.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(s.value.intoSession)+" «"+e.toDisplayString(f(N.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),En.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(C.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(En.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Re=It.value)!=null&&Re.moved&&R.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(It.value.perfom.startTime)+"–"+e.toDisplayString(It.value.perfom.endTime)+" · "+e.toDisplayString(s.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createBlock(e.unref(C.QCard),{key:A.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Xh,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Zh,e.toDisplayString(W(A)),1),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.session,onClick:G=>Hl(A)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.slot,onClick:G=>Ul(A)},null,8,["label","onClick"]),r.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var G;return[o.value&&((G=A.sessions)!=null&&G.length)?(e.openBlock(),e.createElementBlock("div",Jh,[e.createElementVNode("div",Kh,[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.sessionsTitle),1)]),e.createVNode(e.unref(ki),{list:A.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>zl(K,A,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",ep,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>nn(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Un,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>Ci(K,"startTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Un,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>Ci(K,"endTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.renderSlot(h.$slots,"session-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"session")},null,8,["onClick"])]),at(K).length?(e.openBlock(),e.createElementBlock("div",tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(at(K),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:"list-row nested-row"},[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",np,e.toDisplayString(m(Q)),1),e.createElementVNode("div",op,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:qt=>on({kind:"slot",item:Q})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ip,[e.createElementVNode("div",rp,[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.slotsTitle),1)]),e.createVNode(e.unref(ki),{list:vt(A),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>zl(K,A,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",sp,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>nn(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Un,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>Ci(K,"startTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Un,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>Ci(K,"endTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":K.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Dl(A),"option-value":"id","option-label":"label","onUpdate:modelValue":Q=>_l(K,Q)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"slot-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!vt(A).length&&!Ye(A)?(e.openBlock(),e.createElementBlock("div",ap,e.toDisplayString(s.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",lp,e.toDisplayString(s.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",bh,[e.createVNode(e.unref(C.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(s.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:s.value.addDay,icon:"event",class:"q-mt-sm",onClick:rt},null,8,["label"])])),e.createVNode(fe,{modelValue:P.value,"onUpdate:modelValue":g[7]||(g[7]=A=>P.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",cp,e.toDisplayString(s.value.addHall),1)]),_:1}),e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",dp,[e.createVNode(F,{modelValue:B.value,"onUpdate:modelValue":g[5]||(g[5]=A=>B.value=A),label:s.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ve,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:s.value.create,icon:"add",dense:"",onClick:ve},null,8,["label"])]),e.renderSlot(h.$slots,"places-list",{day:Se.value,add:ae},()=>[Pt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",up,e.toDisplayString(s.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",fp,e.toDisplayString(u(A)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:s.value.addHall,icon:"add",dense:"",onClick:G=>ae(A)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(C.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:s.value.close,color:"primary",onClick:g[6]||(g[6]=A=>P.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:k.value,"onUpdate:modelValue":g[14]||(g[14]=A=>k.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>{var A;return[e.createElementVNode("div",mp,e.toDisplayString(((A=$.value)==null?void 0:A.kind)==="session"?s.value.session:s.value.slot),1)]}),_:1}),$.value?(e.openBlock(),e.createBlock(e.unref(C.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(F,{modelValue:$.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=A=>$.value.item.name=A),label:s.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",hp,[e.createElementVNode("div",pp,[e.createVNode(Un,{modelValue:$.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=A=>$.value.item.startTime=A),label:s.value.startTime,dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",gp,[e.createVNode(Un,{modelValue:$.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=A=>$.value.item.endTime=A),label:s.value.endTime,dense:"",outlined:""},null,8,["modelValue","label"])])]),$.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":$.value.item.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Mw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=A=>_l($.value.item,A))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"edit-form",{kind:$.value.kind,item:$.value.item,schedule:Ol.value},void 0,!0),$.value.kind==="slot"?(e.openBlock(),e.createBlock(F,{key:1,modelValue:$.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=A=>$.value.item.description=A),label:s.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QCardActions),{align:"right"},{default:e.withCtx(()=>[$.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:s.value.delete,onClick:Hw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{flat:"",label:s.value.cancel,color:"primary",onClick:g[13]||(g[13]=A=>k.value=!1)},null,8,["label"]),e.createVNode(w,{label:s.value.save,color:"primary",onClick:_w},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,(A,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":A.danger}]),onClick:K=>Iw(A)},[e.createVNode(e.unref(C.QIcon),{name:A.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A.label),1)],10,yp))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-35db9279"]]),wp={class:"schedule-timeline"},bp={key:0,class:"timeline-container"},Cp={class:"day-header"},Sp={class:"day-title"},kp={class:"timeline"},xp={key:0,class:"schedule-place"},Ep={class:"events-column"},Bp={key:0,class:"event-item session-item"},Vp={class:"event-content"},Np={class:"event-time"},$p={class:"event-main"},Tp={class:"event-name"},Pp={key:0,class:"speakers-list"},Mp=["onClick"],Rp={class:"speaker-details"},Ip={class:"speaker-name"},Ap={class:"bio-text"},zp=["onClick"],Dp={key:0,class:"perfom-divider"},Fp={class:"event-content"},Op={class:"event-time"},Lp={class:"event-main"},_p={class:"event-name"},Hp={class:"event-badges"},Up={key:0,class:"speakers-list"},vp=["onClick"],qp={class:"speaker-details"},jp={class:"speaker-name"},Wp={class:"bio-text"},Gp={key:1,class:"no-program"},Oa=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 y=new Date(b.date);return isNaN(y.getTime())||y.getFullYear()<2e3?"":y.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=b=>{var y;return o.placeName?o.placeName(b):((y=b.place)==null?void 0:y.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)||[],m=b=>{var y,N;return o.participantName?o.participantName(b):(b==null?void 0:b.name)||(b==null?void 0:b.fullName)||((N=(y=b==null?void 0:b.human)==null?void 0:y.getFullName)==null?void 0:N.call(y))||""},p=b=>o.participantBio?o.participantBio(b):(b==null?void 0:b.bio)||(b==null?void 0:b.regalias)||"",S=b=>o.slotListOf?o.slotListOf(b):(b==null?void 0:b.slots)||[],E=b=>o.nestedSlotListOf?o.nestedSlotListOf(b):(b==null?void 0:b.slots)||[],P=b=>b.schedules.filter(y=>{var N;return S(y).length>0||(((N=y.sessions)==null?void 0:N.length)||0)>0}),B=b=>{const y=[],N=new Set((b.sessions||[]).map(j=>j.id));for(const j of b.sessions||[]){y.push({kind:"session",item:j,nested:!1,index:0});for(const se of E(j))y.push({kind:"slot",item:se,nested:!0,index:0})}let R=0;for(const j of S(b).filter(se=>!se.sessionId||!N.has(se.sessionId)))y.push({kind:"slot",item:j,nested:!1,index:R++});return y},k=e.computed(()=>{var b;return(b=o.days)==null?void 0:b.some(y=>{var N;return(N=y.schedules)==null?void 0:N.some(R=>{var j;return S(R).length>0||(((j=R.sessions)==null?void 0:j.length)||0)>0})})}),$=(b,y)=>`${b} - ${y}`;return(b,y)=>(e.openBlock(),e.createElementBlock("div",wp,[k.value?(e.openBlock(),e.createElementBlock("div",bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"day-section"},[e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,[e.createVNode(e.unref(C.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(N)),1)])]),e.createElementVNode("div",kp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P(N),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"time-slot"},[a(R)?(e.openBlock(),e.createElementBlock("div",xp,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(R)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B(R),j=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j.item.id},[j.kind==="session"?(e.openBlock(),e.createElementBlock("div",Bp,[e.createElementVNode("div",Vp,[e.createElementVNode("div",Np,e.toDisplayString($(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",$p,[e.createElementVNode("div",Tp,e.toDisplayString(l(j.item)),1),f(j.item).length?(e.openBlock(),e.createElementBlock("div",Pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Rp,[e.createElementVNode("div",Ip,[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Ap,e.toDisplayString(p(se)),1)])],8,Mp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":j.item.active,"nested-item":j.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",j.item)},[!j.nested&&j.index>0?(e.openBlock(),e.createElementBlock("div",Dp)):e.createCommentVNode("",!0),e.createElementVNode("div",Fp,[e.createElementVNode("div",Op,e.toDisplayString($(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Lp,[e.createElementVNode("div",_p,e.toDisplayString(c(j.item)),1),e.createElementVNode("div",Hp,[e.renderSlot(b.$slots,"badges",{item:j.item},void 0,!0)]),u(j.item).length?(e.openBlock(),e.createElementBlock("div",Up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",qp,[e.createElementVNode("div",jp,[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Wp,e.toDisplayString(p(se)),1)])],8,vp))),128))])):e.createCommentVNode("",!0)])])],10,zp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(e.unref(C.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"]]),Qp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Fa,ScheduleTimeline:Oa},Symbol.toStringTag,{value:"Module"})),Yp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:wt,blockSizeClass:Aa,blockStyle:Ta,byStart:mr,diffM:Hn,findEnclosingSession:Ia,fromMin:Ge,gridBounds:$a,hasConflict:Ma,intersects:yo,nestedConflict:Ra,nestedSlotStyle:Pa,normTime:wn,snapMinutes:wo,toMin:ce},Symbol.toStringTag,{value:"Module"}));let Xp=class extends Ve{constructor(){super(ni,"schedule-days")}};const Zp=new Xp;let Jp=class extends Ve{constructor(){super(_n,"schedule-places")}};const Kp=new Jp;let eg=class extends Ve{constructor(){super(Ln,"schedule-sessions")}};const tg=new eg;let ng=class extends Ve{constructor(){super(Ft,"schedule-slots")}};const og=new ng;let ig=class extends Ve{constructor(){super(go,"schedule-timetables")}};const rg=new ig,sg=Object.freeze(Object.defineProperty({__proto__:null,C:hh,Components:Qp,H:Yp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Zp,SchedulePlacesStore:Kp,ScheduleSessionsStore:tg,ScheduleSlotsStore:og,SchedulesStore:rg},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:za,defaultScheduleLabels:hr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),pr=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(C.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"]))}}),ag={class:"tags-selector"},lg={key:0,class:"empty-state"},oi=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",ag,[e.createVNode(Je,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(i)?i.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(C.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(C.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:p=>c(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",lg,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),cg={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},dg={class:"edit-dialog-header"},ug={class:"edit-dialog-title"},fg={class:"edit-dialog-content"},mg={key:0,class:"edit-dialog-actions"},vn=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},cg),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=C.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 m=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,S)=>(e.openBlock(),e.createBlock(fn,{modelValue:e.unref(a),"onUpdate:modelValue":[S[0]||(S[0]=E=>e.isRef(a)?a.value=E:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",dg,[e.createElementVNode("div",ug,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",fg,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",mg,[e.withDirectives(e.createVNode(ne,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(ne,{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"]]),gr=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(C.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,m;return[e.createVNode(pr,{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:!((m=n.row[n.prop])!=null&&m.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(C.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(vn,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(oi,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),hg={class:"tag-name"},pg={key:0,class:"tag-extra"},yr=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(C.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(m=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",hg,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",pg,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(C.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=m=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(vn,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(oi,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),gg={key:0,class:"relation-label"},yg={class:"relation-count"},wr=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(C.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",gg,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",yg,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),br=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(C.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ne,{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}))}}),wg={class:"cell-text"},Cr=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(C.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",wg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(ot,{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(vn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Je,{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"]]),bo=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:()=>[]},emitValue:{type:Boolean,default:!0},mapOptions:{type:Boolean,default:!0},optionValue:{type:String,default:"value"},optionLabel:{type:String,default:"label"},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=e.useModel(n,"modelValue"),r=o,s=e.ref(null);function a(){var y;(y=s.value)==null||y.focus()}function c(){var y;(y=s.value)==null||y.blur()}function l(){var y;(y=s.value)==null||y.showPopup()}function u(){var y;(y=s.value)==null||y.hidePopup()}async function f(){var y;return await((y=s.value)==null?void 0:y.validate())??!0}function m(){var y;(y=s.value)==null||y.resetValidation()}t({focus:a,blur:c,showPopup:l,hidePopup:u,validate:f,resetValidation:m});const p=e.useAttrs(),S=e.computed(()=>typeof p.id=="string"?p.id:void 0),E=e.computed(()=>{const y={};for(const N of Object.keys(p))N!=="id"&&N!=="disable"&&(y[N]=p[N]);return y}),P=n,B=e.computed(()=>p.disable??P.disabled),k=y=>{r("change",y)},$=()=>{r("clear",void 0)},b=e.computed(()=>{const y={};return P.margin&&(y.margin=P.margin),P.padding&&(y.padding=P.padding),P.width&&(y.width=P.width),P.inPadding&&(y.padding=P.inPadding),y});return(y,N)=>(e.openBlock(),e.createBlock(e.unref(C.QSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=R=>i.value=R)},e.unref(E),{for:e.unref(S),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(B),readonly:n.readonly,"emit-value":n.emitValue,"map-options":n.mapOptions,"option-value":n.optionValue,"option-label":n.optionLabel,"input-style":{color:n.color||void 0},style:e.unref(b),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onClear:$}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right")])]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend")]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after")]),key:"1"}:void 0,y.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),key:"2"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label")]),key:"3"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error")]),key:"4"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint")]),key:"5"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter")]),key:"6"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading")]),key:"7"}:void 0,y.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"selected")]),key:"8"}:void 0,y.$slots.option?{name:"option",fn:e.withCtx(R=>[e.renderSlot(y.$slots,"option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"9"}:void 0,y.$slots["no-option"]?{name:"no-option",fn:e.withCtx(R=>[e.renderSlot(y.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"10"}:void 0,y.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"before-options")]),key:"11"}:void 0,y.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after-options")]),key:"12"}:void 0,y.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(R=>[e.renderSlot(y.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(R)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","emit-value","map-options","option-value","option-label","input-style","style"]))}}),Sr=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(C.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(bo,{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"]]),bg={class:"cell-text"},kr=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(C.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",bg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(ot,{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(vn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Je,{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"]]),xr=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(C.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(C.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(C.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(C.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 La(n){n.component("PTable",xr),n.component("PTableBadge",gr),n.component("PTableBadges",yr),n.component("PTableCount",wr),n.component("PTableEdit",br),n.component("PTableNumber",Cr),n.component("PTableSelect",Sr),n.component("PTableString",kr)}const Cg=Object.freeze(Object.defineProperty({__proto__:null,PTable:xr,PTableBadge:gr,PTableBadges:yr,PTableCount:wr,PTableEdit:br,PTableNumber:Cr,PTableSelect:Sr,PTableString:kr,default:La},Symbol.toStringTag,{value:"Module"})),Sg=["innerHTML"],Er=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(C.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(C.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,Sg)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(C.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(C.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(C.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"]]),kg={class:"q-pa-md"},Br=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(C.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(C.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(C.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",kg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(ne,{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(C.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(C.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 ii{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 ii;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 _a(n){n.component("PTabs",Er),n.component("PTabsLeft",Br)}const xg=Object.freeze(Object.defineProperty({__proto__:null,Contacts:Tm,Forms:eh,Menus:lh,Schedule:sg,Table:Cg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Er,PTabsLeft:Br,TabsStore:ii,default:_a},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Ha=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(C.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))}}),Eg={class:"row items-center justify-end"},Ua="DD.MM.YYYY",va=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},invalidMessage:{type:String,default:"Некорректная дата",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=C.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=Ua.replace(/[DMY]/g,"#"),c=e.ref(null),l=B=>{if(i.modelType){c.value=i.modelType;return}B instanceof Date?c.value="date":(typeof B=="string"&&B||c.value===null)&&(c.value="string")},u=B=>B?B instanceof Date?Ze.ToRu(B):Ze.IsoToRu(String(B)):"",f=B=>Ze.ParseRu(B),m=e.ref(u(s.value));l(s.value);const p=e.computed(()=>{const B=m.value;return!B||B.length<10||sa(i.invalidMessage,!0)(B)===!0?"":i.invalidMessage});e.watch(s,B=>{l(B);const k=u(B);k!==m.value&&(m.value=k)});const S=B=>{const k=typeof B=="number"?String(B):B;if(!k){const b=c.value==="date"?null:"";s.value=b,r("input",b);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(k))return;const $=f(k);if($)if(c.value==="date")s.value=$,r("input",$);else{const b=Ze.RuToIso(k);if(!b)return;s.value=b,r("input",b)}},E=()=>{const B=m.value;!B||B.length===10&&!!f(B)||(m.value=u(s.value)),r("blur",s.value)},P={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(B,k)=>(e.openBlock(),e.createBlock(Je,{modelValue:e.unref(m),"onUpdate:modelValue":[k[1]||(k[1]=$=>e.isRef(m)?m.value=$:null),S],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,error:!!e.unref(p),"error-message":e.unref(p),inputmode:"numeric",onBlur:E},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:e.unref(m),"onUpdate:modelValue":k[0]||(k[0]=$=>e.isRef(m)?m.value=$:null),mask:Ua,"today-btn":"",locale:P},{default:e.withCtx(()=>[e.createElementVNode("div",Eg,[e.withDirectives(e.createVNode(ne,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_: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","error","error-message"]))}}),Bg={class:"row items-center justify-end"},Vg={class:"row items-center justify-end"},qa=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=C.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=E=>E?C.date.formatDate(E,"DD.MM.YYYY HH:mm"):"",c=E=>{if(!E||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(E))return null;const P=C.date.extractDate(E,"DD.MM.YYYY HH:mm");return Number.isNaN(P.getTime())?null:P},l=E=>{o.value=E},u=E=>{const P=String(E??"");i.value=P.replace(/[_\s]/g,"")===""?"":P},f=()=>{const E=c(i.value);E?l(E):i.value===""?l(null):i.value=a(o.value)},m=()=>{if(r.value){const E=o.value?C.date.formatDate(o.value,"HH:mm"):"00:00",P=`${r.value} ${E}`,B=c(P);B&&(i.value=a(B),l(B))}r.value=""},p=()=>{if(s.value){const E=o.value?C.date.formatDate(o.value,"DD.MM.YYYY"):"",P=C.date.formatDate(new Date,"DD.MM.YYYY"),B=E?`${E} ${s.value}`:`${P} ${s.value}`,k=c(B);k&&(i.value=a(k),l(k))}s.value=""};e.watch(o,E=>{E!==c(i.value)&&(i.value=a(E??null))},{immediate:!0});const S={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(E,P)=>(e.openBlock(),e.createBlock(Je,{"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(C.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":P[0]||(P[0]=B=>e.isRef(r)?r.value=B:null),mask:"DD.MM.YYYY",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",Bg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":P[1]||(P[1]=B=>e.isRef(s)?s.value=B:null),mask:"HH:mm",format24h:"",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",Vg,[e.withDirectives(e.createVNode(ne,{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"]))}}),Ng=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"]]),$g={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},Tg=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=k=>{s.value=k,r.value!==void 0&&(r.value=k)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=k=>{i("submit",k)},m=()=>{var k;(k=c.value)==null||k.resetValidation(),a(!0),i("reset")},p=async()=>{var $;const k=await(($=c.value)==null?void 0:$.validate())??!1;return a(k),k},S=()=>{var k;(k=c.value)==null||k.resetValidation(),a(!0)};return t({validate:p,resetValidation:S,focus:()=>{var k;return(k=c.value)==null?void 0:k.focus()},submit:k=>{var $;return($=c.value)==null?void 0:$.submit(k)},reset:k=>{var $;return($=c.value)==null?void 0:$.reset(k)}}),(k,$)=>(e.openBlock(),e.createBlock(e.unref(C.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:m,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default",{},void 0,!0),k.$slots.actions?(e.openBlock(),e.createElementBlock("div",$g,[e.renderSlot(k.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:S},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),Pg={class:"p-hint-popup"},Vr=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(C.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(ot,{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(C.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",Pg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),Mg=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"]]),Rg=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"]]),Ig=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 N={};for(const R of Object.keys(i))R!=="id"&&(N[R]=i[R]);return N}),a=n,c=()=>{const N=a.step.toString();return N.includes(".")?N.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),m=(N=>Math.min(Math.max(N,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const p=e.ref(m.toFixed(c())),S=e.computed(()=>{const N={};return a.margin&&(N.margin=a.margin),a.padding&&(N.padding=a.padding),N}),E=N=>{const R=Math.pow(10,l);return Math.round(N*R)/R},P=(N,...R)=>{u.value=E(N),p.value=E(N).toFixed(c()),R.forEach(j=>o(j,u.value))},B=(N,...R)=>{a.disabled||N>a.max||N<a.min||P(N,...R)},k=()=>B(+p.value+a.step,"change"),$=()=>B(+p.value-a.step,"change"),b=N=>B(Number(N),"input"),y=()=>B(+p.value,"change","blur");return(N,R)=>(e.openBlock(),e.createBlock(e.unref(C.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(S),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":b,onBlur:y}),{before:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:$},{default:e.withCtx(()=>[e.createVNode(Mg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:k},{default:e.withCtx(()=>[e.createVNode(Rg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),Ag=D(Ig,[["__scopeId","data-v-1aec76d0"]]),zg=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(C.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"]]),Dg=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(C.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"]))}}),Fg=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(C.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"]))}}),ja=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,m){var P,B;const S="set"+(((P=u[0])==null?void 0:P.toUpperCase())+u.slice(1)),E=l[S];typeof E=="function"?E(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((B=m==null?void 0:m.Update)==null?void 0:B.call(m,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(bo,{"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(Vr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Og=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(C.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))}}),Lg=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(C.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"]]),_g=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"]]),Wa=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(C.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(C.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(ot,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Hg=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(C.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"]]),Ga=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(C.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))}}),Ug={class:"top-slider-content"},vg={class:"center"},qg=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",Ug,[e.createElementVNode("div",vg,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(C.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 jg(n){n.component("PButton",ne),n.component("PBadge",fo),n.component("PCheckBox",Ha),n.component("PChip",pr),n.component("PDateInput",va),n.component("PDateTimeInput",qa),n.component("PDialog",fn),n.component("PFlex",Ng),n.component("PForm",Tg),n.component("PHint",Vr),n.component("PInput",Je),n.component("PInputNumber",Ag),n.component("PLeftSlider",zg),n.component("PList",Dg),n.component("PListItem",Fg),n.component("POptionsListSingle",oi),n.component("POpts",ja),n.component("PRadio",Og),n.component("PRightSlider",Lg),n.component("PSelect",bo),n.component("PSticky",_g),n.component("PString",nr),n.component("PTextarea",Hg),n.component("PTopSlider",qg),n.component("PTableToggle",Wa),n.component("PToggle",Ga),n.component("PTooltip",ot)}const Wg={key:0,class:"mainblock"},Gg={class:"mainblock-right"},Qg={class:"body"},Yg=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",Wg,[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",Gg,[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",Qg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Xg={class:"mainblock-right"},Zg={class:"body"},Jg=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",Xg,[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",Zg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Qa=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"]]),Kg={class:"container"},e1={class:"slide-box"},t1={class:"image"},n1={class:"image-box"},o1=["id","src","alt"],i1={class:"link-number"},r1=["id","onClick"],s1=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(S=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Bt.None),s=e.ref(ra(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=S=>{r.value=S,setTimeout(()=>r.value=Bt.None,t.animationTime)},f=S=>{S!=i.value&&(u(S<i.value?Bt.Prev:Bt.Next),setTimeout(()=>i.value=S,t.animationTime/2))},m=()=>{u(Bt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Bt.Prev),setTimeout(l,t.animationTime/2)};return(S,E)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Kg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[0]||(E[0]=e.withModifiers(P=>p(),["stop"]))},[...E[3]||(E[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",e1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(P,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Bt).Next,animationprev:e.unref(r)===e.unref(Bt).Prev})},[e.createElementVNode("div",t1,[e.createElementVNode("div",n1,[e.createElementVNode("img",{id:P.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:P.fileInfo.getImageUrl(),alt:P.fileInfo.originalName,onClick:E[1]||(E[1]=k=>S.showImageInFullScreen())},null,12,o1)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[2]||(E[2]=e.withModifiers(P=>m(),["stop"]))},[...E[4]||(E[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",i1,[e.createVNode(Qa,{"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),(P,B)=>(e.openBlock(),e.createElementBlock("div",{id:B.toString(),key:B,class:"number",style:e.normalizeStyle({background:B.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(k=>f(B),["stop"])},e.toDisplayString(B+1),13,r1))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),a1=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 m=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)),[[m,l]])}}}),l1={class:"drop-item"},c1={key:0,class:"drop-item-list"},d1=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",l1,[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",c1,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),u1=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Mi,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"])}}}),f1=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref(void 0),a=async l=>{r.value.replaceF(l,s.value),s.value=l,r.value.p.drop()},c=async l=>{await a(l),i("load")};return(l,u)=>{const f=e.resolveComponent("PString"),m=e.resolveComponent("PButton"),p=e.resolveComponent("GridContainer"),S=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(S,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...u[0]||(u[0]=[])]),default:e.withCtx(()=>[e.createVNode(p,{"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,(E,P)=>(e.openBlock(),e.createBlock(m,{key:P,color:"blue",height:"auto",text:E.label,"is-toggle":E.valueEq(e.unref(s)),"toggle-mode":!0,inverse:n.inverse,onClick:B=>c(E.valueEq(e.unref(s))?void 0:E)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-22f3c81d"]]),m1=["value","label"],h1=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=xt.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,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,value:f,label:f.label},null,8,m1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),p1=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),g1=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"]]),y1={key:0,class:"blur"},w1={style:{display:"flex","justify-content":"center"}},b1=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=y=>{y.stopPropagation(),y.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var y,N;await e.nextTick(),a.value?((N=(y=document.getElementById("info-item-opened-content"))==null?void 0:y.querySelector("input"))==null||N.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)},m=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),S=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")})),E=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),P=e.computed(()=>({height:p.value?"auto":"0"})),B=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),k=()=>{o.showSaveDialog?c.value=!0:a.value=!1},$=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},b=()=>{a.value=!1,c.value=!1};return(y,N)=>{const R=e.resolveComponent("PString"),j=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),ze=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",y1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:N[2]||(N[2]=e.withModifiers(Te=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(S)),onMouseenter:N[0]||(N[0]=Te=>n.withHover?s.value=!0:s.value=!1),onMouseleave:N[1]||(N[1]=Te=>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(E))},[e.renderSlot(y.$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(P))},[e.renderSlot(y.$slots,"open-inside-content",{},void 0,!0)],4)),[[ze,k,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(B))},[e.renderSlot(y.$slots,"title",{},()=>[e.createVNode(R,{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(se,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",w1,[e.createVNode(j,{text:"Не сохранять",onClick:b}),e.createVNode(j,{text:"Сохранять",onClick:$})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),C1=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:m=>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"]]),S1={class:"mainblock"},k1={class:"mainline"},x1=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",S1,[e.createElementVNode("div",k1,[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"]]),Ya=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"]]),E1={class:"search-list"},B1=["onClick"],Xa=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(Je,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=m=>e.isRef(r)?r.value=m:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(Ya,{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",E1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:p=>l(m)},e.toDisplayString(m.label),9,B1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),V1=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"]]),N1={style:{display:"flex","justify-content":"center",width:"100%"}},$1={class:"pag-number"},T1={class:"pag-ul"},P1={key:2},M1=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=m=>m?"active":"neutral",i=m=>m?"not-active":"neutral",r=e.ref(aa),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 m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await l(m)},l=async(m,p)=>{r.value.setCurPage(m),xt.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?Dt.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(p=>p<m&&p>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");m?m.scrollTo({top:0}):p&&p.scrollTo({top:0})};return e.onBeforeUnmount(()=>{xt.Get().p.drop()}),(m,p)=>{const S=e.resolveComponent("ArrowLeft"),E=e.resolveComponent("PButton"),P=e.resolveComponent("DoubleArrowLeft"),B=e.resolveComponent("EllipsisSvg"),k=e.resolveComponent("DoubleArrowRight"),$=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",N1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",$1,[e.createVNode(E,{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(S)]),_:1},8,["type"]),e.createElementVNode("ul",T1,[e.createElementVNode("li",null,[e.createVNode(E,{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(E,{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(P,{key:0})):(e.openBlock(),e.createBlock(B,{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(E,{skin:"pag",type:o(b===e.unref(r).curPage),text:b,onClick:y=>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(E,{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(k,{key:0})):(e.openBlock(),e.createBlock(B,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",P1,[e.createVNode(E,{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(E,{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($)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),R1=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=tr.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=tr.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const m=a.searchGroups.find(p=>p.key===o.keyValue);return m&&(a.searchGroup=m),await pa.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,m)=>(e.openBlock(),e.createBlock(Xa,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[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"]]),I1={class:"mainblock-body"},A1={class:"mainblock-footer"},z1=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",I1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",A1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),D1={class:"right-slider-content"},F1={class:"right-slider-content-header"},O1={class:"right-slider-content-box"},L1={class:"right-slider-button"},_1=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",D1,[e.createElementVNode("div",F1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",O1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",L1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),H1={class:"mainblock"},U1={class:"body-block"},v1={class:"tab-block"},q1=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",H1,[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",U1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",v1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),j1=["label","value"],W1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[We.String]:"Текстовый ответ",[We.Text]:"Развёрнутый текстовый ответ",[We.Number]:"Числовой ответ",[We.Date]:"Ответ в виде даты",[We.Radio]:"Выбор одного из вариантов",[We.Set]:"Выбор нескольких вариантов",[We.File]:"Ответ в виде файла",[We.MatrixRadio]:"Матрица с одним выбором",[We.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,j1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),G1=["label","value"],Q1=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=un.GetDefault()});const s=async c=>{r.value=c??un.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]=m=>e.isRef(r)?r.value=m:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(un).Get(),(m,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:m.label,value:m},null,8,G1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),Y1=["label","value"],X1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref();e.onBeforeMount(()=>{s.value=un.GetDefault()});const a=async l=>{l||(s.value=un.GetDefault()),r.value.setSortModel(s.value),r.value.p.drop(),i("load")},c=async l=>{await a(l)};return(l,u)=>{var m;const f=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(s),"onUpdate:modelValue":u[0]||(u[0]=p=>e.isRef(s)?s.value=p:null),"popper-append-to-body":!1,clearable:!((m=e.unref(s))!=null&&m.default),"value-key":"label",onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(un).Get(),(p,S)=>(e.openBlock(),e.createElementBlock("option",{key:S,label:p.label,value:p},null,8,Y1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-1e73245e"]]),Z1={class:"switch-container"},J1={class:"line"},K1={class:"line"},ey=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=m=>{var S;return{color:(S=u.value)!=null&&S.valueEq(m)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async m=>{var p;(p=u.value)!=null&&p.valueEq(m)||(u.value=m,l("load"))};return(m,p)=>{const S=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",Z1,[e.createElementVNode("div",J1,[e.createVNode(S,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=E=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(S,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=E=>f())},null,8,["style"]),e.createVNode(S,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=E=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",K1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=E=>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]=E=>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]=E=>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"]]),ty={},ny={class:"flex"};function oy(n,t){return e.openBlock(),e.createElementBlock("div",ny,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const iy=D(ty,[["render",oy],["__scopeId","data-v-5023d414"]]),ry=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"]]),sy={class:"top-slider-content"},ay={class:"center"},ly=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",sy,[e.createElementVNode("div",ay,[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 cy(n){n.component("PageNotFound",na),n.component("AdaptiveContainer",Yg),n.component("AdaptiveContainerHorizontal",Jg),n.component("CarouselImages",s1),n.component("ContextWindow",a1),n.component("DropList",d1),n.component("FilterCheckbox",u1),n.component("FiltersButtonsSelect",f1),n.component("FilterSelect",h1),n.component("FTSPPanel",p1),n.component("GeneralItem",g1),n.component("GridContainer",Qa),n.component("InfoItem",b1),n.component("InfoItemSelectButtons",C1),n.component("LeftRightContainer",x1),n.component("PAutocomplete",Xa),n.component("PhoneForm",V1),n.component("PPagination",M1),n.component("RemoteSearch",R1),n.component("ResearcheContainer",z1),n.component("RightSliderContainer",_1),n.component("RightTabsContainer",q1),n.component("SelectValueType",W1),n.component("SortList",Q1),n.component("SortSelect",X1),n.component("Switch3Pos",ey),n.component("ThemeWrapper",iy),n.component("ToggleInfoItem",ry),n.component("TopSliderContainer",ly)}const dy=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"]]),uy=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"]]),fy=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"]]),my=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"]]),Za=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"]]),hy=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"]]),py=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"]]),gy=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"]]),yy=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"]]),wy=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"]]),by=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"]]),Cy=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"]]),Sy=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"]]),ky=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"]]),xy=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 Ey(n){n.component("IconDownload",dy),n.component("IconFilter",uy),n.component("ArrowLeft",by),n.component("ArrowRight",Cy),n.component("DoubleArrowLeft",Sy),n.component("DoubleArrowRight",ky),n.component("EllipsisSvg",xy),n.component("IconArrowLeft",fy),n.component("IconCheckDefault",my),n.component("IconClose",Za),n.component("IconEdit",hy),n.component("IconEmail",py),n.component("IconMove",gy),n.component("IconPhone",yy),n.component("IconSearch",Ya),n.component("IconSelectArrow",wy)}const By=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 Vy(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 Ny=D(By,[["render",Vy]]),$y=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}}}),Ty=["for"],Py={class:"inside-icon"};function My(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",Py,[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,Ty),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 Ry=D($y,[["render",My],["__scopeId","data-v-37d79495"]]),Iy={class:"tab"},Ay={class:"rotate"},zy=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",Iy,[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",Ay,[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"]]),Dy={class:"add-block_body"},Fy=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",Dy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Oy=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"]]),Ly={class:"add-block_body"},_y=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",Ly,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Hy={class:"select-dialog"},Uy={class:"select-dialog-header"},vy={class:"select-dialog-title"},qy={class:"select-dialog-content"},jy={class:"select-dialog-actions"},Ja=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=C.Ripple,l=C.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async B=>{await i.store.Get(B.value);const k=i.store.Item,$=new k.constructor(k);r("add",$),m()},m=()=>{r("close"),s.value=!1},p=B=>{B||r("close")},S=()=>{s.value&&m()},E=()=>{s.value=!s.value},P=async()=>{await e.nextTick();const B=document.querySelector(".select-dialog-content .q-item");B&&"focus"in B&&B.focus()};return t({opened:s,toggle:E}),e.onBeforeMount(u),(B,k)=>(e.openBlock(),e.createBlock(fn,{modelValue:s.value,"onUpdate:modelValue":[k[0]||(k[0]=$=>s.value=$),p],position:"top",onKeydown:e.withKeys(S,["escape"]),onShow:P},{default:e.withCtx(()=>[e.createElementVNode("div",Hy,[e.createElementVNode("div",Uy,[e.createElementVNode("div",vy,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",qy,[e.createVNode(e.unref(C.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),$=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(C.QItem),{key:$.value,clickable:"",class:"q-px-md q-py-sm",onClick:b=>f($)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",jy,[e.withDirectives(e.createVNode(ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Wy=["src"],Gy={key:0,class:"header-row"},Qy={class:"title-wrapper"},Yy={key:0,class:"title-icon"},Xy={class:"title-text"},Zy={class:"text-subtitle1 text-weight-medium"},Jy={key:0,class:"caption-row"},Ky={class:"text-caption text-grey-6"},e0=["innerHTML"],t0={key:1,class:"card-footer"},Ka=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(C.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,Wy)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(C.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",Gy,[e.createElementVNode("div",Qy,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Yy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(C.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Xy,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Zy,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",Jy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Ky,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(C.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,e0)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",t0,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),n0={key:0,class:"list-title"},o0={class:"draggable-item"},i0={class:"drag-handle"},r0={class:"item-content"},s0={key:0,class:"item-actions"},a0={class:"item-content"},l0={key:0,class:"item-actions"},c0={key:4,class:"add-button-container"},d0=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",n0,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(ki),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",o0,[e.createElementVNode("div",i0,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",r0,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{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",s0,[e.createVNode(ne,{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,m)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",a0,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{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",l0,[e.createVNode(ne,{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",c0,[e.createVNode(ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),el=D(d0,[["__scopeId","data-v-c87ed91c"]]),u0={class:"del-block_title"},f0={class:"del-block_body"},m0=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",u0,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",f0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),tl=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 h0(n){n.component("CollapseContainer",Ny),n.component("CollapseItem",Ry),n.component("VerticalCollapseContainer",zy),n.component("PAdd",Fy),n.component("PAddDialog",Ja),n.component("PCard",Ka),n.component("PCrudList",el),n.component("PEditDialog",vn),n.component("PModal",tl),n.component("PContainer",Oy),n.component("PContainerStickyHead",_y),n.component("PDel",m0)}const p0={class:"btn-group"},nl=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(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){Oe.Form.SetChunk(c.GetChunk()),a();return}const l=Oe.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(()=>{Oe.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(nr,{string:e.unref(Oe).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Oe).Form.GetFields(),u=>(e.openBlock(),e.createBlock(Je,{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",p0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(ne,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(pe).Success:e.unref(pe).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:m=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),g0=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=()=>{Oe.Form.Reset(),Oe.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(tl,{show:e.unref(Oe).Modal.Visible,closable:e.unref(Oe).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(nl,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),y0=["onClick"],w0=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,m)=>(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,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":S===n.menus.idx,tab:S!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:E=>u(S)},e.toDisplayString(p.name),15,y0)]))),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"]]),b0=["id"],C0=["for"],S0={class:"left-field"},k0=["href","download"],x0={key:1,class:"text-field__input"},E0={class:"right-field"},B0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new kt},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=Xe.GUID(),s=Xe.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){jt.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new kt;m.setFile(f),m.url=URL.createObjectURL(f),i("upload",m)},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=ia.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),S=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,b0),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,C0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",S0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(m,{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,k0),e.createVNode(S,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Za,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",x0,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",E0,[e.createVNode(S,{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)}}}),V0=D(B0,[["__scopeId","data-v-8b73ee22"]]);function ol(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 de(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ol(Object(o),!0).forEach(function(i){ft(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ol(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ft(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function N0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)l=m[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 Cn(n){return function(t){if(Array.isArray(t))return Nr(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 Nr(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 Nr(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 Nr(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 il,$0,ri,Me=(il=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 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})()},nl(ii={path:S0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ii.path)}},ii.exports),ii.exports),wt=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 Nr(n,t,o){var i,r,s,a,c;function l(){var u=Date.now()-a;u<t&&u>=0?i=setTimeout(l,t-u):(i=null,o||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var f=function(){s=this,r=arguments,a=Date.now();var u=o&&!i;return i||(i=setTimeout(l,t)),u&&(c=n.apply(s,r),s=r=null),c};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(c=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}Nr.debounce=Nr;var $r=Nr,X=function(){return X=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},X.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})()},il(ri={path:$0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ri.path)}},ri.exports),ri.exports),bt=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 $r(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}$r.debounce=$r;var Tr=$r,X=function(){return X=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},X.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 ol(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 il(n){return/^blob:/.test(n)}function rl(n){return il(n)||function(t){return/^data:/.test(t)}(n)}function vn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function ri(n){return typeof n=="object"&&n!==null}function Tr(n,t,o){var i={};return ri(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:ri(t[r])?ri(n[r])?i[r]=Tr(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 si(n){var t=Number(n);return Number.isNaN(t)?n:t}function sl(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!al(n)}function al(n){return n!=n}function ll(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var Co=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},k0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Pr=function(n){this.type="move",this.directions=n},x0=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}(),Mr={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=bn(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=bn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new x0(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"]};Mr.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 Ir=wt("vue-handler-wrapper"),cl={name:"HandlerWrapper",components:{DraggableElement:Mr},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=ol(this.horizontalPosition,this.verticalPosition);n=Ir((ft(t={},o.classname,!0),ft(t,"disabled",this.disabled),t))}else n=Ir({disabled:this.disabled});return{root:n,draggable:Ir("draggable")}}},emits:["leave","enter","drag","drag-end"]};cl.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 E0=wt("vue-line-wrapper"),dl={name:"LineWrapper",components:{DraggableElement:Mr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return E0((ft(n={},this.position,!0),ft(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};dl.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 Vt=["left","right","top","bottom"],B0=["left","right"],V0=["top","bottom"],N0=["left","top"],$0=["fill-area","fit-area","stencil","none"],fl={left:0,top:0,width:0,height:0};function ul(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function Nt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function qn(n,t){return{left:n.left-t.left,top:n.top-t.top}}function He(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function So(n,t){var o={left:0,top:0,right:0,bottom:0};return Vt.forEach(function(i){var r=t[i],s=Nt(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 $t(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 ai(n){return{left:-n.left,top:-n.top}}function ot(n,t){return X(X({},n),{left:n.left+t.left,top:n.top+t.top})}function ut(n,t,o,i){if(t!==1){if(o){var r=He(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 fe(n){return n.width/n.height}function jn(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 Wn(n,t){var o={left:0,top:0},i=So(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 Rr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function ml(n,t){var o=fe(n),i=fe(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 hl(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 Gt(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 li(n,t){var o=So(Ue(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,jn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,jn(n,t)):1}function Ue(n,t,o){o===void 0&&(o=!1);var i=Wn(n,t);return ot(n,o?ai(i):i)}function Ar(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 T0(n,t){return X(X({},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 pl(n,t,o){o===void 0&&(o=!0);var i={};return Vt.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 ci(n,t){return pl(n,t,!0)}function gl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||fe(t)>=o.minimum&&fe(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 yl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ft(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(f,u){return u===void 0&&(u=!1),f.reduce(function(m,p){return gl({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:u})&&(!m||yl(p,{width:t,height:o})<yl(m,{width:t,height:o}))?p:m},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(f){f&&c.push({width:s.width,height:s.width/f,correctRatio:!0},{width:s.height*f,height:s.height,correctRatio:!0})}),gl({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 zr(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=ot(o,t.directions);return ot(s,Wn(s,r))}function P0(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(u,m){return zr({coordinates:u,positionRestrictions:s,event:new Pr({left:m.left-u.left,top:m.top-u.top})})},f=X({},t);return(Array.isArray(o)?o:[o]).forEach(function(u){var m={};Ae((m=typeof u=="function"?u({coordinates:f,imageSize:i,visibleArea:c}):u).width)&&Ae(m.height)||(f=function(p,k){var E=X(X(X({},p),Ft({width:k.width,height:k.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(E,{left:p.left,top:p.top})}(f,X(X({},f),m))),Ae(m.left)&&Ae(m.top)||(f=l(f,X(X({},f),m)))}),f}function M0(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,f,u,m=X({},i),p=X({},r),k=X({},s);l=fe(k),f=fe(m),u===void 0&&(u=.001),(l===0||f===0?Math.abs(f-l)<u:Math.abs(f/l)<1+u&&Math.abs(f/l)>1-u)||(m=X(X({},m),Ft({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:fe(k),maximum:fe(k)}})));var E=li(p=ut(p,m.width*o.width/(p.width*k.width)),t({visibleArea:p,type:"resize"}));return E!==1&&(p=ut(p,E),m=ut(m,E)),p=Ue(p=ot(p,qn(He(m),He(p))),t({visibleArea:p,type:"move"})),{coordinates:m=Ue(m,ci(Nt(p),c)),visibleArea:p}}function I0(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=X({},r),l=X({},s);if(r&&s&&t.type!=="manipulateImage"){var f={width:0,height:0};l.width,i.width,fe(i)>fe(c)?(f.height=.8*i.height,f.width=f.height*fe(c)):(f.width=.8*i.width,f.height=f.width*fe(c));var u=li(l=ut(l,c.width*i.width/(l.width*f.width)),o({visibleArea:l,type:"resize"}));l=ut(l,u),u!==1&&(f.height/=u,f.width/=u),l=Ue(l=ot(l,qn(He(c),He(l))),o({visibleArea:l,type:"move"})),c=Ue(c,ci(Nt(l),a))}return{coordinates:c,visibleArea:l}}function R0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=X({},i),a=X({},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=ut(s,Math.min(a.width/s.width,jn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=ut(s,Math.min(a.height/s.height,jn(s,r({visibleArea:s,type:"resize"}))))),s=Ue(s=ot(s,ai(Wn(a,Nt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function A0(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 z0(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,fe(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 Ft(X(X({},c),{aspectRatio:i,sizeRestrictions:r}))}function D0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,f=r||i;return fe(f)>fe(s)?o=(t=l.height*f.height/s.height)*fe(l):t=(o=l.width*f.width/s.width)/fe(l),Ft({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function F0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=fe(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=ml({width:fe(s)>r?s.width:s.height*r,height:fe(s)>r?s.width/r:s.height},Ar(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=So(o,Nt(X({left:0,top:0},i))),f={};return!l.left&&!l.right&&c.width<=i.width&&(f.left=0,f.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(f.top=0,f.bottom=i.height),Ue(c,f)}var u=fe(i);return a={height:u>r?i.height:i.width/r,width:u>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 di(n,t){return pl(n,Nt(t))}function O0(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,f=t.move,u=X({},i),m=X({},o),p=1,k=1,E=l.factor&&Math.abs(l.factor-1)>.001;u=ot(u,{left:f.left||0,top:f.top||0});var V={stencil:{minimum:Math.max(r.minWidth?r.minWidth/m.width:0,r.minHeight?r.minHeight/m.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/m.width:1/0,r.maxHeight?r.maxHeight/m.height:1/0,jn(m,a))},area:{maximum:jn(u,s({visibleArea:u,type:"resize"}))}};l.factor&&E&&(l.factor<1?(k=Math.max(l.factor,V.stencil.minimum))>1&&(k=1):l.factor>1&&(k=Math.min(l.factor,Math.min(V.area.maximum,V.stencil.maximum)))<1&&(k=1)),k&&(u=ut(u,k,l.center));var N=o.left-i.left,S=i.width+i.left-(o.width+o.left),T=o.top-i.top,y=i.height+i.top-(o.height+o.top);return u=Ue(u=ot(u,Wn(u,{left:a.left!==void 0?a.left-N*k:void 0,top:a.top!==void 0?a.top-T*k:void 0,bottom:a.bottom!==void 0?a.bottom+y*k:void 0,right:a.right!==void 0?a.right+S*k:void 0})),s({visibleArea:u,type:"move"})),m.width=m.width*k,m.height=m.height*k,m.left=u.left+N*k,m.top=u.top+T*k,m=Ue(m,ci(Nt(u),a)),l.factor&&E&&c&&(l.factor>1?p=Math.min(V.area.maximum,l.factor)/k:l.factor<1&&(p=Math.max(m.height/u.height,m.width/u.width,l.factor/k)),p!==1&&(u=ot(u=Ue(u=ut(u,p,l.factor>1?l.center:He(m)),s({visibleArea:u,type:"move"})),ai(Wn(m,Nt(u)))))),{coordinates:m,visibleArea:u}}function L0(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,f=n.angle,u=X({},i),m=X({},r),p=Gt(He(X({left:0,top:0},l)),f);return(u=X(X({},Ft({sizeRestrictions:s,aspectRatio:t,width:u.width,height:u.height})),Gt(He(u),f))).left-=p.left-c.width/2+u.width/2,u.top-=p.top-c.height/2+u.height/2,m=ut(m,li(m,o({visibleArea:m,type:"resize"}))),{coordinates:u=Ue(u,a),visibleArea:m=Ue(m=ot(m,qn(He(u),He(i))),o({visibleArea:m,type:"move"}))}}function _0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=X({},s),f=X({},a),u=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(u||m){var p=Gt({left:c.width/2,top:c.height/2},-i),k=Gt(He(l),-i),E=Gt({left:u?p.left-(k.left-p.left):k.left,top:m?p.top-(k.top-p.top):k.top},i);l=ot(l,qn(E,He(l))),k=Gt(He(f),-i),f=Ue(f=ot(f,qn(E=Gt({left:u?p.left-(k.left-p.left):k.left,top:m?p.top-(k.top-p.top):k.top},i),He(f))),r({visibleArea:f,type:"move"}))}return{coordinates:l,visibleArea:f}}function wl(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=X({},t),f=$t(o,l).width,u=$t(o,l).height;f<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))),u<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 m=So($t(o,l),r);c&&(m.left&&m.left>0&&m.right===0?(l.right+=m.left,l.left-=m.left):m.right&&m.right>0&&m.left===0&&(l.left+=m.right,l.right-=m.right),m.top&&m.top>0&&m.bottom===0?(l.bottom+=m.top,l.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(l.top+=m.bottom,l.bottom-=m.bottom),m=So($t(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Vt.forEach(function(V){var N=m[V];N&&l[V]&&(p[V]=Math.max(0,1-N/l[V]))}),a){var k=Math.min.apply(null,Vt.map(function(V){return p[V]}));k!==1/0&&Vt.forEach(function(V){l[V]*=k})}else Vt.forEach(function(V){p[V]!==1/0&&(l[V]*=p[V])});if(f=$t(o,l).width,u=$t(o,l).height,l.right+l.left&&(f>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):f<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(u>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):u<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var E=Math.min(p.width,p.height);E!==1/0&&Vt.forEach(function(V){l[V]*=E})}else p.width!==1/0&&B0.forEach(function(V){l[V]*=p.width}),p.height!==1/0&&V0.forEach(function(V){l[V]*=p.height});return l}function fi(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var H0=wt("vue-simple-handler"),U0=wt("vue-simple-handler-wrapper"),Dr={name:"SimpleHandler",components:{HandlerWrapper:cl},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=(ft(n={},this.horizontalPosition,!!this.horizontalPosition),ft(n,this.verticalPosition,!!this.verticalPosition),ft(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ft(n,"hover",this.hover),n);return{default:Me(H0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(U0(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"]};Dr.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 v0=wt("vue-simple-line"),q0=wt("vue-simple-line-wrapper"),Fr={name:"SimpleLine",components:{LineWrapper:dl},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:Me(v0(ft({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(q0(ft({},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"]};Fr.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 Or=wt("vue-bounding-box"),j0=["east","west",null],W0=["south","north",null],bl={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 Dr}},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 Fr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return j0.forEach(function(t){W0.forEach(function(o){if(t!==o){var i=ol(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:Or(),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:Me(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(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:Me(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Me(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,f=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=Or("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(f,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Or("handler",ft({},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 k0(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"]};bl.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 G0=wt("vue-draggable-area"),Cl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:G0()}}},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=bn(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()):ll({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=bn(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 Pr({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"]};Cl.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 Lr(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 Q0(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 f=atob(l),u=f.length,m=new ArrayBuffer(u),p=new Uint8Array(m),k=0;k<u;k++)p[k]=f.charCodeAt(k);return m}(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 Sl(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 Y0(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,E,V){var N,S="";for(N=E,V+=E;N<V;N++)S+=String.fromCharCode(k.getUint8(N));return S}(o,s+4,4)==="Exif")){var f=o.getUint16(i);if(((r=f===18761)||f===19789)&&o.getUint16(i+2,r)===42){var u=o.getUint32(i+4,r);u>=8&&(a=i+u)}}if(a){for(var m=o.getUint16(a,r),p=0;p<m;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 kl(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+=ll({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var xl={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=$r(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 Co({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=kl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new Co({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=bn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=kl(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=bn(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||al(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new Co({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};xl.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 _r={components:{TransformableImage:xl},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"]};_r.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 ui=wt("vue-preview"),El={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:ui({fill:this.fill}),wrapper:ui("wrapper"),imageWrapper:ui("image-wrapper"),image:Me(ui("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=de(de({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=hl({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) ")+Sl(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()}}};El.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 Bl={components:{Preview:El},inheritAttrs:!1};Bl.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 Hr=wt("vue-rectangle-stencil"),Vl={name:"RectangleStencil",components:{StencilPreview:Bl,BoundingBox:bl,DraggableArea:Cl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Dr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Fr}},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:Me(Hr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(Hr("preview"),this.previewClass),boundingBox:Me(Hr("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"]};Vl.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 X0=["transitions"],Ot=wt("vue-advanced-cropper"),Nl={name:"Cropper",components:{BackgroundWrapper:_r},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Vl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return _r}},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 $0.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=X(X({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=X({},t.directions),f=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),Vt.forEach(function(C){f[C]||(l[C]=0)});var u=$t(a,l=wl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,m=$t(a,l).height,p=c.preserveRatio?fe(a):Rr(u/m,i);if(p){var k=c.respectDirection;if(k||(k=a.width>=a.height||p===1?"width":"height"),k==="width"){var E=u/p-a.height;if(f.top&&f.bottom){var V=l.top,N=l.bottom;l.bottom=fi(E,N,V),l.top=fi(E,V,N)}else f.bottom?l.bottom=E:f.top?l.top=E:f.right?l.right=0:f.left&&(l.left=0)}else if(k==="height"){var S=a.width-m*p;if(f.left&&f.right){var T=l.left,y=l.right;l.left=-fi(S,T,y),l.right=-fi(S,y,T)}else f.left?l.left=-S:f.right?l.right=-S:f.top?l.top=0:f.bottom&&(l.bottom=0)}l=wl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return u=$t(a,l).width,m=$t(a,l).height,(p=c.preserveRatio?fe(a):Rr(u/m,i))&&Math.abs(p-u/m)>.001&&Vt.forEach(function(C){f[C]||(l[C]=0)}),zr({event:new Pr({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:zr},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=fe(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=X(X({},o),Ft({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=Ue(a=ot(a,qn(He(o),He(a))),ci(Nt(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=X({},t);s.height=s.width/fe(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ut(s,Math.max(r.height/s.height,r.width/s.width)));var a=ai(Wn(r,Nt(s=ut(s,li(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Ue(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"&&(fe(o)>fe(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:de({},fl)}},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=Tr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Tr(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:Ae(this.minWidth)?0:si(this.minWidth),minHeight:Ae(this.minHeight)?0:si(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:si(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:si(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=X(X({},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 f=Ar(r),u=ml(a,f);return f.width<1/0&&(!l.maxWidth||l.maxWidth>u.width)&&(l.maxWidth=Math.min(l.maxWidth,u.width)),f.height<1/0&&(!l.maxHeight||l.maxHeight>u.height)&&(l.maxHeight=Math.min(l.maxHeight,u.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=Ar(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:Ot(),image:Me(Ot("image"),this.imageClass),stencil:Ot("stencil"),boundaries:Me(Ot("boundaries"),this.boundariesClass),stretcher:Me(Ot("stretcher")),background:Me(Ot("background"),this.backgroundClass),foreground:Me(Ot("foreground"),this.foregroundClass),imageWrapper:Me(Ot("image-wrapper")),cropperWrapper:Me(Ot("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=de(de({},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)")+Sl(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=$r(this.update,this.debounce),this.debouncedDisableTransitions=$r(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(de({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:de({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},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 Co({},{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 Co({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)),Ue(s,r)}(de(de({},this.getPublicProperties()),{},{positionRestrictions:di(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?M0:this.autoZoom?I0:R0);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 de(de({},s),{},{changed:!ul(s.visibleArea,t)||!ul(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=C0(t,X0),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 X(X({},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=X(X({},o),{directions:X({},o.directions)});return Vt.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=X(X({},o),{directions:X({},o.directions)});return N0.forEach(function(c){a.directions[c]*=r}),a}return o}(de(de({},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,f){var u=f.rotate,m=f.flip,p={width:l.naturalWidth,height:l.naturalHeight},k=hl(p,u),E=c.getContext("2d");c.height=k.height,c.width=k.width,E.save();var V=Gt(He(X({left:0,top:0},p)),u);return E.translate(-(V.left-k.width/2),-(V.top-k.height/2)),E.rotate(u*Math.PI/180),E.translate(m.horizontal?p.width:0,m.vertical?p.height:0),E.scale(m.horizontal?-1:1,m.vertical?-1:1),E.drawImage(l,0,0,p.width,p.height),E.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=de({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 f=l,!Number.isNaN(parseFloat(f))&&isFinite(f);var f})},s=Ft({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,f,u,m){c.width=u?u.width:f.width,c.height=u?u.height:f.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),m&&(m.imageSmoothingEnabled&&(p.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(p.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(p.fillStyle=m.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var k=f.left<0?-f.left:0,E=f.top<0?-f.top:0;p.drawImage(l,f.left+k,f.top+E,f.width,f.height,k*(c.width/f.width),E*(c.height/f.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?T0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?di(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return P0({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?D0:z0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=vn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||A0,s=[i,function(a){var c=a.coordinates;return de({},vn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,bn(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(vn(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,f=c,u=a.width*c/a.height;return u>l&&(u=l,f=a.height*l/a.width),{width:u,height:f}}(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=de(de({},this.defaultImageTransforms),{},{flip:de({},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||F0;n.visibleArea=vn(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=X({},o),a=fe(i),s.width/s.height!==a&&(s.height=s.width/a),Ue(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(rl(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(f){return f.port||((f.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=Ae(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){Q0(n).then(function(s){var a=Y0(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?il(o)||!rl(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,vn(this.defaultTransforms)?this.appliedImageTransforms=Lr(this.defaultTransforms()):ri(this.defaultTransforms)?this.appliedImageTransforms=Lr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Lr({});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=de(de({},this.appliedImageTransforms),{},{flip:de({},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(de(de({},t.getPublicProperties()),{},{positionRestrictions:di(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(de(de({},t.getPublicProperties()),{},{positionRestrictions:di(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=O0(de(de({},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(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var l=this.getStencilSize(),f=l?fe(l):null;Ae(t)&&(t=sl(f)?f:void 0),Ae(o)&&(o=sl(f)?f: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,Rr(fe(r=vn(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Ft({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=Ft({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:fe(r),maximum:fe(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 de({},fl)},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=de({},this.imageTransforms.flip),a=_0({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=de({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=L0({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"]},Z0={key:0,ref:"canvas",style:{display:"none"}},J0={key:1,ref:"sourceCanvas",style:{display:"none"}};Nl.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",Z0,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",J0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const K0={width:0,height:0,left:0,top:0};class Ur{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",K0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Ur;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 ew={class:"cropper-wrapper"},tw={class:"row justify-end q-mt-md"},nw=z(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(Ur.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=u=>{s.value.setRatio(u)},f=async()=>{const u=a.value.getResult();u&&u.canvas.toBlob(m=>{var p;i("crop",{blob:m,src:(p=u.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(u,m)=>(e.openBlock(),e.createElementBlock("div",ew,[e.createVNode(bo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[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(Nl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",tw,[e.createVNode(ne,{flat:"",label:"Сохранить",color:"primary",onClick:f})])]))}}),[["__scopeId","data-v-be2e2071"]]),ow={class:"uploader-content"},iw={class:"uploader-icon"},rw={class:"tools-button absolute-full column items-center justify-center"},sw={class:"row q-gutter-sm"},aw=z(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=b.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),f=e.ref();e.onMounted(()=>{e.nextTick(()=>{var y;const T=(y=a.value)==null?void 0:y.querySelector(".q-uploader__input");T&&!T.getAttribute("aria-label")&&T.setAttribute("aria-label","Добавить изображение")})});const u=e.ref(i.ratio),m=e.ref(""),p=e.computed(()=>({width:`${i.height*u.value}px`,height:`${i.height}px`,maxWidth:"100%"})),k=e.computed(()=>({width:`${i.height*u.value}px`,height:`${i.height}px`,maxWidth:"100%"})),E=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},V=T=>{T.blob.src=T.src,i.fileInfo.setFile&&i.fileInfo.setFile(T.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},N=T=>{m.value=T.url,l.value=!0},S=T=>{if(T.length===0)return;const y=T[0];y.url=URL.createObjectURL(y),s.value=y,i.fileInfo.setFile&&i.fileInfo.setFile(y),i.withCrop&&N(s.value)};return e.watch(u,T=>{r("update:ratio",T)}),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()))}),(T,y)=>(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(b.QImg),{src:e.unref(s).url,ratio:e.unref(u),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",rw,[e.createElementVNode("div",sw,[e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:y[0]||(y[0]=C=>N(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:E},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(b.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:f,class:"img-uploader",style:e.normalizeStyle(e.unref(k)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:S,onRemoved:E},{header:e.withCtx(()=>[e.createElementVNode("div",ow,[e.createVNode(e.unref(b.QUploaderAddTrigger)),e.createElementVNode("div",iw,[e.createVNode(e.unref(b.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),y[4]||(y[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(fn,{modelValue:e.unref(l),"onUpdate:modelValue":y[3]||(y[3]=C=>e.isRef(l)?l.value=C:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.QSpace)),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(b.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(nw,{ratio:e.unref(u),"onUpdate:ratio":y[1]||(y[1]=C=>e.isRef(u)?u.value=C:null),src:e.unref(m),onCrop:V,onClose:y[2]||(y[2]=C=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function lw(n){n.component("PMenuTabs",f0),n.component("PUploaderFile",b0),n.component("PUploaderImage",aw),n.component("PAuthForm",el),n.component("PAuthModal",c0)}const cw={install:function(n){Og(n),a0(n),yy(n),lw(n),ny(n)}};function dw(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(b.Quasar,{plugins:{Notify:b.Notify,Dialog:b.Dialog}}),cw.install(n),La(n),ga(n),Oa(n)}class fw extends No{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new is);d(this,"method",Bn.Login);d(this,"id","field-auth-login")}}function uw(n,t={}){const o=t.ftsp??kt.Get(),i=e.ref(!1),r=e.computed(()=>n.Items),s=e.computed(()=>n.Count.value),a=e.computed(()=>n.Item),c=e.computed({get:()=>n.searchStr.value,set:E=>{n.searchStr.value=E}});return{loading:i,items:r,count:s,item:a,searchStr:c,ftsp:o,load:async()=>{i.value=!0;try{await n.FTSP({ftsp:o})}finally{i.value=!1}},get:E=>n.Get(E),create:E=>n.Create(E),update:E=>n.Update(E),remove:E=>n.Remove(E),reset:()=>{o.reset(),n.ResetState()}}}function mw(n=kt.Get()){const t=e.reactive(n),o=e.computed(()=>t.f),i=e.computed(()=>t.f.length);return{filters:o,count:i,add:u=>{t.setF(u)},addV2:u=>{t.setF2(u)},replace:(u,m)=>{t.replaceF(u,m)},remove:u=>{t.removeF(u)},has:u=>!!t.findFilterModel(u),clear:()=>{t.resetF()}}}function hw(n=kt.Get()){const t=e.reactive(n),o=e.computed({get:()=>t.p.getPageNum(),set:E=>{t.p.page=(Math.max(1,Math.round(E))-1)*t.p.rowsPerPage}}),i=e.computed({get:()=>t.p.rowsPerPage,set:E=>{t.p.rowsPerPage=E,t.p.page=0}}),r=e.computed(()=>t.p.rowsNumber),s=e.computed(()=>({page:o.value,rowsPerPage:i.value,rowsNumber:r.value}));return{page:o,rowsPerPage:i,rowsNumber:r,goTo:E=>{o.value=E},next:()=>{t.p.page+=t.p.rowsPerPage},prev:()=>{t.p.page=Math.max(0,t.p.page-t.p.rowsPerPage)},reset:()=>{t.p.page=0},drop:()=>{t.p.drop()},setLoadMore:(E,V,N)=>{t.p.setLoadMore(E,V,N)},setLoadMoreV2:(E,V,N)=>{t.p.setLoadMoreV2(E,V,N)},setAllLoaded:E=>{t.p.setAllLoaded(E)},pagination:s}}const pw=5*60*1e3,gw=5*1e3;let $l=!1,vr=0,mi=!1,qr=!1;function hi(n,t,o="",i=!1){const r=n.UserInfo(),s={operation:t,reason:o,userName:(r==null?void 0:r.username)||(r==null?void 0:r.email)||"",userId:(r==null?void 0:r.id)||"",roleCode:((r==null?void 0:r.roles)||[])[0]||"",accessToken:n.getToken()||""};try{const a=JSON.stringify(s);if(!Ce.baseUrl){fetch("/api/auth/log",{method:"POST",headers:{"Content-Type":"application/json",...n.getToken()?{token:n.getToken()}:{}},body:a,keepalive:!0}).catch(c=>console.warn("[AuthLog] Ранний запрос не отправлен",t,c));return}if(i&&typeof navigator.sendBeacon=="function"){navigator.sendBeacon("/api/auth/log",new Blob([a],{type:"application/json"}));return}Ce.Post({query:"auth/log",payload:s})}catch(a){console.warn("[AuthLog] Не удалось отправить событие",t,a)}}function jr(n,t,o=!1){mi||(mi=!0,hi(n,"logout",t,o))}function yw(n){if($l)return;$l=!0,n.on("login",()=>{const o=Date.now();o-vr<gw||(vr=o,mi=!1,qr=!1,hi(n,"login"))}),n.on("logout",()=>{qr=!0,jr(n,"user")}),n.on("session-expired",()=>jr(n,"token-expired")),n.isAuth()&&(vr=Date.now(),mi=!1,hi(n,"login"));const t=()=>{n.isAuth()&&jr(n,qr?"user":"tab-close",!0)};window.addEventListener("pagehide",t),window.addEventListener("beforeunload",t),window.setInterval(()=>{n.isAuth()&&hi(n,"heartbeat")},pw)}const ww=["PF","PFM"];O.AuthButtonLogin=ki,O.AuthButtonRefresh=ns,O.AuthButtonRegister=xi,O.AuthButtonRestore=Vo,O.AuthChunks=Fe,O.AuthFieldsIds=At,O.AuthFormSettings=ss,O.AuthMethods=Bn,O.EmailField=$o,O.LoginField=fw,O.PAddDialog=Xa,O.PBadge=uo,O.PButton=ne,O.PCard=Za,O.PCheckBox=_a,O.PChip=hr,O.PContactForm=nr,O.PContactFormDeleteDialog=mo,O.PContactFormEdit=or,O.PContactFormEditDialog=ho,O.PContactFormEditEmails=ir,O.PContactFormEditPhones=rr,O.PContactFormView=sr,O.PContactFormViewEmails=un,O.PContactFormViewPhones=mn,O.PCrudList=Ja,O.PDateInput=Ha,O.PDateTimeInput=Ua,O.PDialog=fn,O.PEditDialog=Un,O.PF=D,O.PFM=gg,O.PHint=Br,O.PInput=Ze,O.POptionsListSingle=ti,O.POpts=va,O.PSelect=bo,O.PTable=kr,O.PTableBadge=pr,O.PTableBadges=gr,O.PTableCount=yr,O.PTableEdit=wr,O.PTableNumber=br,O.PTableSelect=Cr,O.PTableString=Sr,O.PTableToggle=qa,O.PTabs=xr,O.PTabsLeft=Er,O.PToggle=ja,O.PasswordField=To,O.PasswordRepeatField=rs,O.Schedule=go,O.ScheduleDay=ei,O.ScheduleDefaultLabels=mr,O.ScheduleGridEditor=Da,O.SchedulePlace=Ln,O.ScheduleSession=On,O.ScheduleSlot=Dt,O.ScheduleTimeline=Fa,O.TabsStore=ni,O.defaultContactsLabels=Bt,O.initAuthLog=yw,O.installSprof=dw,O.pfName=ww,O.useCrud=uw,O.useFilters=mw,O.usePagination=hw,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function rl(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 sl(n){return/^blob:/.test(n)}function al(n){return sl(n)||function(t){return/^data:/.test(t)}(n)}function qn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function si(n){return typeof n=="object"&&n!==null}function Pr(n,t,o){var i={};return si(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:si(t[r])?si(n[r])?i[r]=Pr(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 ai(n){var t=Number(n);return Number.isNaN(t)?n:t}function ll(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!cl(n)}function cl(n){return n!=n}function dl(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var Co=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},T0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Mr=function(n){this.type="move",this.directions=n},P0=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}(),Rr={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=Cn(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=Cn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new P0(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"]};Rr.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 Ir=bt("vue-handler-wrapper"),ul={name:"HandlerWrapper",components:{DraggableElement:Rr},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=rl(this.horizontalPosition,this.verticalPosition);n=Ir((ft(t={},o.classname,!0),ft(t,"disabled",this.disabled),t))}else n=Ir({disabled:this.disabled});return{root:n,draggable:Ir("draggable")}}},emits:["leave","enter","drag","drag-end"]};ul.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 M0=bt("vue-line-wrapper"),fl={name:"LineWrapper",components:{DraggableElement:Rr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return M0((ft(n={},this.position,!0),ft(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};fl.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 Nt=["left","right","top","bottom"],R0=["left","right"],I0=["top","bottom"],A0=["left","top"],z0=["fill-area","fit-area","stencil","none"],ml={left:0,top:0,width:0,height:0};function hl(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function $t(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function jn(n,t){return{left:n.left-t.left,top:n.top-t.top}}function He(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function So(n,t){var o={left:0,top:0,right:0,bottom:0};return Nt.forEach(function(i){var r=t[i],s=$t(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 Tt(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 li(n){return{left:-n.left,top:-n.top}}function it(n,t){return X(X({},n),{left:n.left+t.left,top:n.top+t.top})}function mt(n,t,o,i){if(t!==1){if(o){var r=He(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 ue(n){return n.width/n.height}function Wn(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 Gn(n,t){var o={left:0,top:0},i=So(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 Ar(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function pl(n,t){var o=ue(n),i=ue(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 gl(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 ci(n,t){var o=So(Ue(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,Wn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,Wn(n,t)):1}function Ue(n,t,o){o===void 0&&(o=!1);var i=Gn(n,t);return it(n,o?li(i):i)}function zr(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 D0(n,t){return X(X({},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 yl(n,t,o){o===void 0&&(o=!0);var i={};return Nt.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 di(n,t){return yl(n,t,!0)}function wl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ue(t)>=o.minimum&&ue(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 bl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(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(m,p){return wl({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!m||bl(p,{width:t,height:o})<bl(m,{width:t,height:o}))?p:m},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})}),wl({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 Dr(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=it(o,t.directions);return it(s,Gn(s,r))}function F0(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,m){return Dr({coordinates:f,positionRestrictions:s,event:new Mr({left:m.left-f.left,top:m.top-f.top})})},u=X({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var m={};Ae((m=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&Ae(m.height)||(u=function(p,S){var E=X(X(X({},p),Ot({width:S.width,height:S.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(E,{left:p.left,top:p.top})}(u,X(X({},u),m))),Ae(m.left)&&Ae(m.top)||(u=l(u,X(X({},u),m)))}),u}function O0(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,m=X({},i),p=X({},r),S=X({},s);l=ue(S),u=ue(m),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)||(m=X(X({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:ue(S),maximum:ue(S)}})));var E=ci(p=mt(p,m.width*o.width/(p.width*S.width)),t({visibleArea:p,type:"resize"}));return E!==1&&(p=mt(p,E),m=mt(m,E)),p=Ue(p=it(p,jn(He(m),He(p))),t({visibleArea:p,type:"move"})),{coordinates:m=Ue(m,di($t(p),c)),visibleArea:p}}function L0(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=X({},r),l=X({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ue(i)>ue(c)?(u.height=.8*i.height,u.width=u.height*ue(c)):(u.width=.8*i.width,u.height=u.width*ue(c));var f=ci(l=mt(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=mt(l,f),f!==1&&(u.height/=f,u.width/=f),l=Ue(l=it(l,jn(He(c),He(l))),o({visibleArea:l,type:"move"})),c=Ue(c,di($t(l),a))}return{coordinates:c,visibleArea:l}}function _0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=X({},i),a=X({},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=mt(s,Math.min(a.width/s.width,Wn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=mt(s,Math.min(a.height/s.height,Wn(s,r({visibleArea:s,type:"resize"}))))),s=Ue(s=it(s,li(Gn(a,$t(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function H0(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 U0(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,ue(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 Ot(X(X({},c),{aspectRatio:i,sizeRestrictions:r}))}function v0(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 ue(u)>ue(s)?o=(t=l.height*u.height/s.height)*ue(l):t=(o=l.width*u.width/s.width)/ue(l),Ot({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function q0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ue(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=pl({width:ue(s)>r?s.width:s.height*r,height:ue(s)>r?s.width/r:s.height},zr(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=So(o,$t(X({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),Ue(c,u)}var f=ue(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 ui(n,t){return yl(n,$t(t))}function j0(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=X({},i),m=X({},o),p=1,S=1,E=l.factor&&Math.abs(l.factor-1)>.001;f=it(f,{left:u.left||0,top:u.top||0});var P={stencil:{minimum:Math.max(r.minWidth?r.minWidth/m.width:0,r.minHeight?r.minHeight/m.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/m.width:1/0,r.maxHeight?r.maxHeight/m.height:1/0,Wn(m,a))},area:{maximum:Wn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&E&&(l.factor<1?(S=Math.max(l.factor,P.stencil.minimum))>1&&(S=1):l.factor>1&&(S=Math.min(l.factor,Math.min(P.area.maximum,P.stencil.maximum)))<1&&(S=1)),S&&(f=mt(f,S,l.center));var B=o.left-i.left,k=i.width+i.left-(o.width+o.left),$=o.top-i.top,b=i.height+i.top-(o.height+o.top);return f=Ue(f=it(f,Gn(f,{left:a.left!==void 0?a.left-B*S:void 0,top:a.top!==void 0?a.top-$*S:void 0,bottom:a.bottom!==void 0?a.bottom+b*S:void 0,right:a.right!==void 0?a.right+k*S:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*S,m.height=m.height*S,m.left=f.left+B*S,m.top=f.top+$*S,m=Ue(m,di($t(f),a)),l.factor&&E&&c&&(l.factor>1?p=Math.min(P.area.maximum,l.factor)/S:l.factor<1&&(p=Math.max(m.height/f.height,m.width/f.width,l.factor/S)),p!==1&&(f=it(f=Ue(f=mt(f,p,l.factor>1?l.center:He(m)),s({visibleArea:f,type:"move"})),li(Gn(m,$t(f)))))),{coordinates:m,visibleArea:f}}function W0(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=X({},i),m=X({},r),p=Yt(He(X({left:0,top:0},l)),u);return(f=X(X({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Yt(He(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,m=mt(m,ci(m,o({visibleArea:m,type:"resize"}))),{coordinates:f=Ue(f,a),visibleArea:m=Ue(m=it(m,jn(He(f),He(i))),o({visibleArea:m,type:"move"}))}}function G0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=X({},s),u=X({},a),f=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(f||m){var p=Yt({left:c.width/2,top:c.height/2},-i),S=Yt(He(l),-i),E=Yt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i);l=it(l,jn(E,He(l))),S=Yt(He(u),-i),u=Ue(u=it(u,jn(E=Yt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i),He(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function Cl(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=X({},t),u=Tt(o,l).width,f=Tt(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 m=So(Tt(o,l),r);c&&(m.left&&m.left>0&&m.right===0?(l.right+=m.left,l.left-=m.left):m.right&&m.right>0&&m.left===0&&(l.left+=m.right,l.right-=m.right),m.top&&m.top>0&&m.bottom===0?(l.bottom+=m.top,l.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(l.top+=m.bottom,l.bottom-=m.bottom),m=So(Tt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Nt.forEach(function(P){var B=m[P];B&&l[P]&&(p[P]=Math.max(0,1-B/l[P]))}),a){var S=Math.min.apply(null,Nt.map(function(P){return p[P]}));S!==1/0&&Nt.forEach(function(P){l[P]*=S})}else Nt.forEach(function(P){p[P]!==1/0&&(l[P]*=p[P])});if(u=Tt(o,l).width,f=Tt(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 E=Math.min(p.width,p.height);E!==1/0&&Nt.forEach(function(P){l[P]*=E})}else p.width!==1/0&&R0.forEach(function(P){l[P]*=p.width}),p.height!==1/0&&I0.forEach(function(P){l[P]*=p.height});return l}function fi(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var Q0=bt("vue-simple-handler"),Y0=bt("vue-simple-handler-wrapper"),Fr={name:"SimpleHandler",components:{HandlerWrapper:ul},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=(ft(n={},this.horizontalPosition,!!this.horizontalPosition),ft(n,this.verticalPosition,!!this.verticalPosition),ft(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ft(n,"hover",this.hover),n);return{default:Me(Q0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(Y0(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"]};Fr.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 X0=bt("vue-simple-line"),Z0=bt("vue-simple-line-wrapper"),Or={name:"SimpleLine",components:{LineWrapper:fl},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:Me(X0(ft({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(Z0(ft({},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"]};Or.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 Lr=bt("vue-bounding-box"),J0=["east","west",null],K0=["south","north",null],Sl={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 Fr}},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 Or}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return J0.forEach(function(t){K0.forEach(function(o){if(t!==o){var i=rl(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:Lr(),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:Me(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(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:Me(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Me(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=Lr("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=Lr("handler",ft({},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 T0(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"]};Sl.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 ew=bt("vue-draggable-area"),kl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:ew()}}},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=Cn(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()):dl({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=Cn(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 Mr({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"]};kl.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 _r(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 tw(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,m=new ArrayBuffer(f),p=new Uint8Array(m),S=0;S<f;S++)p[S]=u.charCodeAt(S);return m}(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 xl(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 nw(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(S,E,P){var B,k="";for(B=E,P+=E;B<P;B++)k+=String.fromCharCode(S.getUint8(B));return k}(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 m=o.getUint16(a,r),p=0;p<m;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 El(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+=dl({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var Bl={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=Tr(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 Co({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=El(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new Co({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=Cn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=El(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=Cn(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||cl(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new Co({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};Bl.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 Hr={components:{TransformableImage:Bl},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"]};Hr.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 mi=bt("vue-preview"),Vl={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:mi({fill:this.fill}),wrapper:mi("wrapper"),imageWrapper:mi("image-wrapper"),image:Me(mi("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=de(de({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=gl({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) ")+xl(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()}}};Vl.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 Nl={components:{Preview:Vl},inheritAttrs:!1};Nl.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 Ur=bt("vue-rectangle-stencil"),$l={name:"RectangleStencil",components:{StencilPreview:Nl,BoundingBox:Sl,DraggableArea:kl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Fr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Or}},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:Me(Ur({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(Ur("preview"),this.previewClass),boundingBox:Me(Ur("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"]};$l.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 ow=["transitions"],Lt=bt("vue-advanced-cropper"),Tl={name:"Cropper",components:{BackgroundWrapper:Hr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return $l}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Hr}},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 z0.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=X(X({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=X({},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),Nt.forEach(function(y){u[y]||(l[y]=0)});var f=Tt(a,l=Cl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,m=Tt(a,l).height,p=c.preserveRatio?ue(a):Ar(f/m,i);if(p){var S=c.respectDirection;if(S||(S=a.width>=a.height||p===1?"width":"height"),S==="width"){var E=f/p-a.height;if(u.top&&u.bottom){var P=l.top,B=l.bottom;l.bottom=fi(E,B,P),l.top=fi(E,P,B)}else u.bottom?l.bottom=E:u.top?l.top=E:u.right?l.right=0:u.left&&(l.left=0)}else if(S==="height"){var k=a.width-m*p;if(u.left&&u.right){var $=l.left,b=l.right;l.left=-fi(k,$,b),l.right=-fi(k,b,$)}else u.left?l.left=-k:u.right?l.right=-k:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=Cl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Tt(a,l).width,m=Tt(a,l).height,(p=c.preserveRatio?ue(a):Ar(f/m,i))&&Math.abs(p-f/m)>.001&&Nt.forEach(function(y){u[y]||(l[y]=0)}),Dr({event:new Mr({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:Dr},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ue(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=X(X({},o),Ot({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=Ue(a=it(a,jn(He(o),He(a))),di($t(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=X({},t);s.height=s.width/ue(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=mt(s,Math.max(r.height/s.height,r.width/s.width)));var a=li(Gn(r,$t(s=mt(s,ci(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Ue(s=it(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"&&(ue(o)>ue(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:de({},ml)}},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=Pr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Pr(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:Ae(this.minWidth)?0:ai(this.minWidth),minHeight:Ae(this.minHeight)?0:ai(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:ai(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:ai(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=X(X({},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=zr(r),f=pl(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=zr(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:Lt(),image:Me(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Me(Lt("boundaries"),this.boundariesClass),stretcher:Me(Lt("stretcher")),background:Me(Lt("background"),this.backgroundClass),foreground:Me(Lt("foreground"),this.foregroundClass),imageWrapper:Me(Lt("image-wrapper")),cropperWrapper:Me(Lt("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=de(de({},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)")+xl(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=Tr(this.update,this.debounce),this.debouncedDisableTransitions=Tr(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(de({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:de({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},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 Co({},{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 Co({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)),Ue(s,r)}(de(de({},this.getPublicProperties()),{},{positionRestrictions:ui(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?O0:this.autoZoom?L0:_0);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 de(de({},s),{},{changed:!hl(s.visibleArea,t)||!hl(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=N0(t,ow),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 X(X({},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=X(X({},o),{directions:X({},o.directions)});return Nt.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=X(X({},o),{directions:X({},o.directions)});return A0.forEach(function(c){a.directions[c]*=r}),a}return o}(de(de({},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,m=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},S=gl(p,f),E=c.getContext("2d");c.height=S.height,c.width=S.width,E.save();var P=Yt(He(X({left:0,top:0},p)),f);return E.translate(-(P.left-S.width/2),-(P.top-S.height/2)),E.rotate(f*Math.PI/180),E.translate(m.horizontal?p.width:0,m.vertical?p.height:0),E.scale(m.horizontal?-1:1,m.vertical?-1:1),E.drawImage(l,0,0,p.width,p.height),E.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=de({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=Ot({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,m){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),m&&(m.imageSmoothingEnabled&&(p.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(p.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(p.fillStyle=m.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var S=u.left<0?-u.left:0,E=u.top<0?-u.top:0;p.drawImage(l,u.left+S,u.top+E,u.width,u.height,S*(c.width/u.width),E*(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?D0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?ui(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return F0({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?v0:U0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=qn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||H0,s=[i,function(a){var c=a.coordinates;return de({},qn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,Cn(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(qn(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=de(de({},this.defaultImageTransforms),{},{flip:de({},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||q0;n.visibleArea=qn(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=X({},o),a=ue(i),s.width/s.height!==a&&(s.height=s.width/a),Ue(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(al(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=Ae(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){tw(n).then(function(s){var a=nw(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?sl(o)||!al(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,qn(this.defaultTransforms)?this.appliedImageTransforms=_r(this.defaultTransforms()):si(this.defaultTransforms)?this.appliedImageTransforms=_r(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=_r({});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=de(de({},this.appliedImageTransforms),{},{flip:de({},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(de(de({},t.getPublicProperties()),{},{positionRestrictions:ui(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(de(de({},t.getPublicProperties()),{},{positionRestrictions:ui(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=j0(de(de({},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(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var l=this.getStencilSize(),u=l?ue(l):null;Ae(t)&&(t=ll(u)?u:void 0),Ae(o)&&(o=ll(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,Ar(ue(r=qn(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Ot({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=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ue(r),maximum:ue(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 de({},ml)},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=de({},this.imageTransforms.flip),a=G0({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=de({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=W0({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"]},iw={key:0,ref:"canvas",style:{display:"none"}},rw={key:1,ref:"sourceCanvas",style:{display:"none"}};Tl.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",iw,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",rw,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const sw={width:0,height:0,left:0,top:0};class vr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",sw)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new vr;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 aw={class:"cropper-wrapper"},lw={class:"row justify-end q-mt-md"},cw=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(vr.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(m=>{var p;i("crop",{blob:m,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",aw,[e.createVNode(bo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[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(Tl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",lw,[e.createVNode(ne,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),dw={class:"uploader-content"},uw={class:"uploader-icon"},fw={class:"tools-button absolute-full column items-center justify-center"},mw={class:"row q-gutter-sm"},hw=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=C.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 $=(b=a.value)==null?void 0:b.querySelector(".q-uploader__input");$&&!$.getAttribute("aria-label")&&$.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),m=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),S=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),E=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},P=$=>{$.blob.src=$.src,i.fileInfo.setFile&&i.fileInfo.setFile($.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},B=$=>{m.value=$.url,l.value=!0},k=$=>{if($.length===0)return;const b=$[0];b.url=URL.createObjectURL(b),s.value=b,i.fileInfo.setFile&&i.fileInfo.setFile(b),i.withCrop&&B(s.value)};return e.watch(f,$=>{r("update:ratio",$)}),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()))}),($,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(C.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",fw,[e.createElementVNode("div",mw,[e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:b[0]||(b[0]=y=>B(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...b[5]||(b[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:E},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...b[6]||(b[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(C.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(S)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:k,onRemoved:E},{header:e.withCtx(()=>[e.createElementVNode("div",dw,[e.createVNode(e.unref(C.QUploaderAddTrigger)),e.createElementVNode("div",uw,[e.createVNode(e.unref(C.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(fn,{modelValue:e.unref(l),"onUpdate:modelValue":b[3]||(b[3]=y=>e.isRef(l)?l.value=y:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QSpace)),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(C.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(cw,{ratio:e.unref(f),"onUpdate:ratio":b[1]||(b[1]=y=>e.isRef(f)?f.value=y:null),src:e.unref(m),onCrop:P,onClose:b[2]||(b[2]=y=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function pw(n){n.component("PMenuTabs",w0),n.component("PUploaderFile",V0),n.component("PUploaderImage",hw),n.component("PAuthForm",nl),n.component("PAuthModal",g0)}const gw={install:function(n){jg(n),h0(n),Ey(n),pw(n),cy(n)}};function yw(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(C.Quasar,{plugins:{Notify:C.Notify,Dialog:C.Dialog}}),gw.install(n),_a(n),wa(n),La(n)}class ww extends No{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new rs);d(this,"method",Vn.Login);d(this,"id","field-auth-login")}}function bw(n,t={}){const o=t.ftsp??xt.Get(),i=e.ref(!1),r=e.computed(()=>n.Items),s=e.computed(()=>n.Count.value),a=e.computed(()=>n.Item),c=e.computed({get:()=>n.searchStr.value,set:E=>{n.searchStr.value=E}});return{loading:i,items:r,count:s,item:a,searchStr:c,ftsp:o,load:async()=>{i.value=!0;try{await n.FTSP({ftsp:o})}finally{i.value=!1}},get:E=>n.Get(E),create:E=>n.Create(E),update:E=>n.Update(E),remove:E=>n.Remove(E),reset:()=>{o.reset(),n.ResetState()}}}function Cw(n=xt.Get()){const t=e.reactive(n),o=e.computed(()=>t.f),i=e.computed(()=>t.f.length);return{filters:o,count:i,add:f=>{t.setF(f)},addV2:f=>{t.setF2(f)},replace:(f,m)=>{t.replaceF(f,m)},remove:f=>{t.removeF(f)},has:f=>!!t.findFilterModel(f),clear:()=>{t.resetF()}}}function Sw(n=xt.Get()){const t=e.reactive(n),o=e.computed({get:()=>t.p.getPageNum(),set:E=>{t.p.page=(Math.max(1,Math.round(E))-1)*t.p.rowsPerPage}}),i=e.computed({get:()=>t.p.rowsPerPage,set:E=>{t.p.rowsPerPage=E,t.p.page=0}}),r=e.computed(()=>t.p.rowsNumber),s=e.computed(()=>({page:o.value,rowsPerPage:i.value,rowsNumber:r.value}));return{page:o,rowsPerPage:i,rowsNumber:r,goTo:E=>{o.value=E},next:()=>{t.p.page+=t.p.rowsPerPage},prev:()=>{t.p.page=Math.max(0,t.p.page-t.p.rowsPerPage)},reset:()=>{t.p.page=0},drop:()=>{t.p.drop()},setLoadMore:(E,P,B)=>{t.p.setLoadMore(E,P,B)},setLoadMoreV2:(E,P,B)=>{t.p.setLoadMoreV2(E,P,B)},setAllLoaded:E=>{t.p.setAllLoaded(E)},pagination:s}}const kw=5*60*1e3,xw=5*1e3;let Pl=!1,qr=0,hi=!1,jr=!1;function pi(n,t,o="",i=!1){const r=n.UserInfo(),s={operation:t,reason:o,userName:(r==null?void 0:r.username)||(r==null?void 0:r.email)||"",userId:(r==null?void 0:r.id)||"",roleCode:((r==null?void 0:r.roles)||[])[0]||"",accessToken:n.getToken()||""};try{const a=JSON.stringify(s);if(!Ce.baseUrl){fetch("/api/auth/log",{method:"POST",headers:{"Content-Type":"application/json",...n.getToken()?{token:n.getToken()}:{}},body:a,keepalive:!0}).catch(c=>console.warn("[AuthLog] Ранний запрос не отправлен",t,c));return}if(i&&typeof navigator.sendBeacon=="function"){navigator.sendBeacon("/api/auth/log",new Blob([a],{type:"application/json"}));return}Ce.Post({query:"auth/log",payload:s})}catch(a){console.warn("[AuthLog] Не удалось отправить событие",t,a)}}function Wr(n,t,o=!1){hi||(hi=!0,pi(n,"logout",t,o))}function Ew(n){if(Pl)return;Pl=!0,n.on("login",()=>{const o=Date.now();o-qr<xw||(qr=o,hi=!1,jr=!1,pi(n,"login"))}),n.on("logout",()=>{jr=!0,Wr(n,"user")}),n.on("session-expired",()=>Wr(n,"token-expired")),n.isAuth()&&(qr=Date.now(),hi=!1,pi(n,"login"));const t=()=>{n.isAuth()&&Wr(n,jr?"user":"tab-close",!0)};window.addEventListener("pagehide",t),window.addEventListener("beforeunload",t),window.setInterval(()=>{n.isAuth()&&pi(n,"heartbeat")},kw)}const Bw=["PF","PFM"];O.AuthButtonLogin=xi,O.AuthButtonRefresh=os,O.AuthButtonRegister=Ei,O.AuthButtonRestore=Vo,O.AuthChunks=Fe,O.AuthFieldsIds=zt,O.AuthFormSettings=as,O.AuthMethods=Vn,O.EmailField=$o,O.LoginField=ww,O.PAddDialog=Ja,O.PBadge=fo,O.PButton=ne,O.PCard=Ka,O.PCheckBox=Ha,O.PChip=pr,O.PContactForm=or,O.PContactFormDeleteDialog=mo,O.PContactFormEdit=ir,O.PContactFormEditDialog=ho,O.PContactFormEditEmails=rr,O.PContactFormEditPhones=sr,O.PContactFormView=ar,O.PContactFormViewEmails=mn,O.PContactFormViewPhones=hn,O.PCrudList=el,O.PDateInput=va,O.PDateTimeInput=qa,O.PDialog=fn,O.PEditDialog=vn,O.PF=z,O.PFM=xg,O.PHint=Vr,O.PInput=Je,O.POptionsListSingle=oi,O.POpts=ja,O.PSelect=bo,O.PTable=xr,O.PTableBadge=gr,O.PTableBadges=yr,O.PTableCount=wr,O.PTableEdit=br,O.PTableNumber=Cr,O.PTableSelect=Sr,O.PTableString=kr,O.PTableToggle=Wa,O.PTabs=Er,O.PTabsLeft=Br,O.PToggle=Ga,O.PasswordField=To,O.PasswordRepeatField=ss,O.Schedule=go,O.ScheduleDay=ni,O.ScheduleDefaultLabels=hr,O.ScheduleGridEditor=Fa,O.SchedulePlace=_n,O.ScheduleSession=Ln,O.ScheduleSlot=Ft,O.ScheduleTimeline=Oa,O.TabsStore=ii,O.defaultContactsLabels=Vt,O.initAuthLog=Ew,O.installSprof=yw,O.pfName=Bw,O.useCrud=bw,O.useFilters=Cw,O.usePagination=Sw,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});