sprof 0.2.17 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{ExtractsList-DkhnDpSu.js → ExtractsList-DTe91TQH.js} +1 -1
  2. package/dist/core/components/CarouselImages.vue.d.ts +1 -1
  3. package/dist/core/components/GeneralItem.vue.d.ts +2 -2
  4. package/dist/core/components/GridContainer.vue.d.ts +2 -2
  5. package/dist/core/components/InfoItem.vue.d.ts +2 -2
  6. package/dist/core/components/atoms/PButton/PButton.stories.d.ts +6 -6
  7. package/dist/core/components/atoms/PButton/PButton.vue.d.ts +1 -1
  8. package/dist/core/components/atoms/PCheckbox/PCheckBox.stories.d.ts +2 -2
  9. package/dist/core/components/atoms/PCheckbox/PCheckBox.vue.d.ts +1 -1
  10. package/dist/core/components/atoms/PDateInput/PDateInput.stories.d.ts +12 -12
  11. package/dist/core/components/atoms/PDateInput/PDateInput.vue.d.ts +1 -1
  12. package/dist/core/components/atoms/PDialog/PDialog.stories.d.ts +6 -6
  13. package/dist/core/components/atoms/PDialog/PDialog.vue.d.ts +1 -1
  14. package/dist/core/components/atoms/PFlex/PFlex.stories.d.ts +12 -12
  15. package/dist/core/components/atoms/PFlex/PFlex.vue.d.ts +2 -2
  16. package/dist/core/components/atoms/PInput/PInput.stories.d.ts +6 -6
  17. package/dist/core/components/atoms/PInput/PInput.vue.d.ts +1 -1
  18. package/dist/core/components/atoms/PInputDate/PInputDate.stories.d.ts +2 -2
  19. package/dist/core/components/atoms/PInputDate/PInputDate.vue.d.ts +1 -1
  20. package/dist/core/components/atoms/PLabelField/PLabelField.stories.d.ts +18 -18
  21. package/dist/core/components/atoms/PLabelField/PLabelField.vue.d.ts +3 -3
  22. package/dist/core/components/atoms/PList/PList.stories.d.ts +6 -6
  23. package/dist/core/components/atoms/PList/PList.vue.d.ts +1 -1
  24. package/dist/core/components/atoms/PRadio/PRadio.stories.d.ts +2 -2
  25. package/dist/core/components/atoms/PRadio/PRadio.vue.d.ts +1 -1
  26. package/dist/core/components/atoms/PSelect/PSelect.stories.d.ts +6 -6
  27. package/dist/core/components/atoms/PSelect/PSelect.vue.d.ts +1 -1
  28. package/dist/core/components/atoms/PString/PString.stories.d.ts +6 -6
  29. package/dist/core/components/atoms/PString/PString.vue.d.ts +3 -3
  30. package/dist/core/components/atoms/PTable/PTable.stories.d.ts +6 -6
  31. package/dist/core/components/atoms/PTable/PTable.vue.d.ts +1 -1
  32. package/dist/core/components/atoms/PToggle/PToggle.stories.d.ts +3 -3
  33. package/dist/core/components/atoms/PToggle/PToggle.vue.d.ts +1 -1
  34. package/dist/core/components/molecules/PCard/PCard.stories.d.ts +12 -12
  35. package/dist/core/components/molecules/PCard/PCard.vue.d.ts +1 -1
  36. package/dist/core/components/molecules/PCrudList/PCrudList.stories.d.ts +9 -9
  37. package/dist/core/components/molecules/PCrudList/PCrudList.vue.d.ts +1 -1
  38. package/dist/core/components/molecules/PEditDialog/PEditDialog.stories.d.ts +9 -9
  39. package/dist/core/components/molecules/PEditDialog/PEditDialog.vue.d.ts +1 -1
  40. package/dist/core/components/molecules/PModal/PModal.vue.d.ts +3 -3
  41. package/dist/core/components/organisms/PAuthForm/PAuthForm.stories.d.ts +14 -14
  42. package/dist/core/components/organisms/PAuthForm/PAuthForm.vue.d.ts +7 -7
  43. package/dist/core/components/organisms/PAuthModal/PAuthModal.stories.d.ts +2 -2
  44. package/dist/core/components/organisms/PAuthModal/PAuthModal.vue.d.ts +1 -1
  45. package/dist/core/components/organisms/PMenuTabs/PMenuTabs.stories.d.ts +6 -6
  46. package/dist/core/components/organisms/PMenuTabs/PMenuTabs.vue.d.ts +1 -1
  47. package/dist/core/components/organisms/PUploaderFile/PUploaderFile.stories.d.ts +9 -9
  48. package/dist/core/components/organisms/PUploaderFile/PUploaderFile.vue.d.ts +1 -1
  49. package/dist/core/components/organisms/PUploaderImage/ImageCropper.vue.d.ts +2 -2
  50. package/dist/core/helpers/Arrays.test.d.ts +1 -0
  51. package/dist/core/helpers/Classes.test.d.ts +1 -0
  52. package/dist/core/helpers/Dates.test.d.ts +1 -0
  53. package/dist/core/helpers/Id.test.d.ts +1 -0
  54. package/dist/core/helpers/Numbers.test.d.ts +1 -0
  55. package/dist/global-components.d.ts +11 -0
  56. package/dist/{index-DN5Lq9Ib.js → index-DpENpoCA.js} +6807 -5877
  57. package/dist/index.d.ts +3 -0
  58. package/dist/modules/contacts/components/PContactForm.test.d.ts +1 -0
  59. package/dist/modules/contacts/components/PContactForm.vue.d.ts +95 -0
  60. package/dist/modules/contacts/components/PContactFormDeleteDialog.vue.d.ts +44 -0
  61. package/dist/modules/contacts/components/PContactFormEdit.vue.d.ts +89 -0
  62. package/dist/modules/contacts/components/PContactFormEditDialog.vue.d.ts +51 -0
  63. package/dist/modules/contacts/components/PContactFormEditEmails.vue.d.ts +86 -0
  64. package/dist/modules/contacts/components/PContactFormEditPhones.vue.d.ts +86 -0
  65. package/dist/modules/contacts/components/PContactFormView.vue.d.ts +83 -0
  66. package/dist/modules/contacts/components/PContactFormViewEmails.vue.d.ts +86 -0
  67. package/dist/modules/contacts/components/PContactFormViewPhones.vue.d.ts +86 -0
  68. package/dist/modules/contacts/index.d.ts +14 -0
  69. package/dist/modules/contacts/types.d.ts +57 -0
  70. package/dist/modules/index.d.ts +1 -0
  71. package/dist/sprof.js +54 -44
  72. package/dist/sprof.umd.cjs +13 -13
  73. package/dist/style.css +1 -1
  74. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
- (function(j,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],t):(j=typeof globalThis<"u"?globalThis:j||self,t(j.sprof={},j.Vue,j.Quasar,j.draggable,j.VueRouter))})(this,function(j,t,M,po,jl){"use strict";var zw=Object.defineProperty;var Dw=(j,t,M)=>t in j?zw(j,t,{enumerable:!0,configurable:!0,writable:!0,value:M}):j[t]=M;var l=(j,t,M)=>Dw(j,typeof t!="symbol"?t+"":t,M);var Ft,_t,tt,Ln,oe,ot,Yt,$r;var yn=typeof document<"u"?document.currentScript:null,ze=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(ze||{}),me=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(me||{});class Xt{constructor(e,i,o,r){l(this,"text","Сохранить");l(this,"type",me.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=e,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(e,i,o){return new Xt(e,i,me.Primary,o)}static Success(e,i,o){return new Xt(e,i,me.Success,o)}static Warning(e,i,o){return new Xt(e,i,me.Warning,o)}static Error(e,i,o){return new Xt(e,i,me.Error,o)}}class yi extends Xt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",ze.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let go=class extends yi{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",ze.Login)}};class Fr extends yi{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",ze.Refresh)}}class yo extends yi{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",ze.Register)}}class wi extends yi{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",ze.Restore)}}class _r{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var Tt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(Tt||{});class bi extends _r{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===Tt.Password||this.id===Tt.PasswordRepeat}}var wn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(wn||{});const ql=/\S+@\S+\.\S+/;class Or{constructor(){l(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),ql.test(e)||this.errors.push("Некорректный email"),this.errors}}let Wl=class extends bi{constructor(){super(...arguments);l(this,"id",Tt.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new Or);l(this,"method",wn.Email)}};const Si=new Wl;class Gl{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Ql=class extends bi{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new Gl);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",Tt.Password)}};const Ci=new Ql;let Yl=class extends bi{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",Tt.PasswordRepeat)}};const Lr=new Yl,Hr={allowRestore:!1,[ze.Login]:{methods:[wn.Email],title:"Вход в систему",action:"login",buttons:[new go,new yo,new wi],fields:[Si,Ci],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[ze.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new yo,new go,new wi],fields:[Si,Ci,Lr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[ze.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new wi],fields:[Si]},[ze.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Fr],fields:[Ci]}};class Xl{constructor(){l(this,"block",!1);l(this,"settings",Hr);l(this,"chunk",ze.Login);l(this,"selectedMethod",wn.Email)}async Block(e){this.block=!0,await e(),this.block=!1}get IsBlock(){return this.block}GetValues(){const e=this.GetFields(),i=new Map;return e.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const e=this.GetField(Tt.Password),i=this.GetField(Tt.PasswordRepeat);if((e==null?void 0:e.value)!==(i==null?void 0:i.value))return["Пароли не совпадают"]}return this.GetFields().map(e=>e.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.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===ze.Login}get IsRegister(){return this.chunk===ze.Register}get IsRestore(){return this.chunk===ze.Restore}get IsRefresh(){return this.chunk===ze.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(i=>{i.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.SetChunk(ze.Login),this.ResetFields()}GetField(e){return this.GetFields().find(i=>i.id===e)}}class Zl{constructor(){l(this,"visible",!1);l(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class bn{constructor(){l(this,"type",me.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(e){switch(e){case me.Success:return"positive";case me.Warning:return"warning";case me.Error:return"negative";case me.Info:return"info";default:return"primary"}}static ContainsHtml(e){return/<[a-z][\s\S]*>/i.test(e)}showMessage(e,i){this.type=i,typeof e=="string"?(this.text=e,this.title=""):(this.text=e.text,this.title=e.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return bn.ToQuasarColor(this.type)}Info(e){this.showMessage(e,me.Info)}Success(e){this.showMessage(e,me.Success)}Error(e){this.showMessage(e,me.Error)}Warning(e){this.showMessage(e,me.Warning)}FormMessage(e){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(e))e[o][0]&&e[o][0].message&&(i+=`<li>${e[o][0].message}</li>`);return i+="</ul>",i}}class wo{static Get(e,i,o="-"){return!e||!i?"":`${e}${o}${i}`}static In(e,i,o){return e>=i&&e<=o}static Intersects(e,i,o,r){return e===o||i===r||e>o&&e<r||i>o&&i<r||i>r&&e<o}}const Ur=1e3,jr=60*Ur,bo=60*jr;var jn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(jn||{});const ki={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(e){return Ur*e}static M(e){return jr*e}static H(e){return bo*e}static D(e){return bo*e}static W(e){return bo*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const i=ie.SplitHM(e);return i.length>1?ie.HtoM(i[0])+i[1]:ie.HtoM(i[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const i=e.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(e){const i=ie.SplitHM(e);return ie.ConcatHM(i[0],i[1])}static AddMtoHM(e,i){const o=new Date,r=ie.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return ie.ConcatHM(a,d)}static ConcatHM(e,i){return`${e}:${ie.NormalizeTime(i)}`}static DiffM(e,i){return ie.Gt(i,e)?ie.HMtoM(i)-ie.HMtoM(e):ie.HMtoM(e)-ie.HMtoM(i)}static GetPeriod(e,i){return wo.Get(e,i)}static Gt(e,i){return ie.HMtoM(e)>ie.HMtoM(i)}static GtOrEq(e,i){return ie.Gt(e,i)||ie.Eq(e,i)}static Eq(e,i){return ie.HMtoM(e)===ie.HMtoM(i)}static PeriodInPeriod(e,i,o,r){return ie.HMtoM(e)>=ie.HMtoM(o)&&ie.HMtoM(i)<=ie.HMtoM(r)}static PeriodsIntersects(e,i,o,r){return wo.Intersects(ie.HMtoM(e),ie.HMtoM(i),ie.HMtoM(o),ie.HMtoM(r))}}const Jl="top";class Kl extends bn{constructor(){super(...arguments);l(this,"duration",ie.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof M.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;M.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:bn.ContainsHtml(this.text),position:Jl})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",me.Warning)}Save(){this.showMessage("Изменения успешно сохранены",me.Success)}}const Sn=new Kl;class Ct{static Get(e){const i=localStorage.getItem(e);if(i)return JSON.parse(i)}static Set(e,i){i&&localStorage.setItem(e,JSON.stringify(i))}static Remove(e){localStorage.removeItem(e)}}var lt=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(lt||{});class ec{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Ct.Get(lt.AccessToken)}getRefreshToken(){return Ct.Get(lt.RefreshToken)}setAccessToken(e){Ct.Set(lt.AccessToken,e)}setRefreshToken(e){Ct.Set(lt.RefreshToken,e)}reset(){Ct.Remove(lt.AccessToken),Ct.Remove(lt.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class tc{constructor(){l(this,"user");l(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Ct.Set(lt.User,this.user))}reset(){this.user=void 0,Ct.Remove(lt.User)}actualize(){const e=Ct.Get(lt.User);e&&this.set(e)}}class nc{constructor(){l(this,"isAuth",!1);l(this,"user",new tc);l(this,"tokens",new ec);l(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetUser(e){this.user.set(e)}SetState(e){this.SetUser(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Sn.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 ic=(Ft=class{constructor(){l(this,"form",t.reactive(new Xl));l(this,"status",t.reactive(new nc));l(this,"modal",t.reactive(new Zl));if(Ft.instance)return Ft.instance;Ft.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(Ft,"instance"),Ft);const De=new ic;var qr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("quasar"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","quasar","vuedraggable","vue-router"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.sprof={},L.Vue,L.Quasar,L.draggable,L.VueRouter))})(this,function(L,e,N,Co,tc){"use strict";var $b=Object.defineProperty;var Vb=(L,e,N)=>e in L?$b(L,e,{enumerable:!0,configurable:!0,writable:!0,value:N}):L[e]=N;var l=(L,e,N)=>Vb(L,typeof e!="symbol"?e+"":e,N);var vt,Ht,nt,Wn,re,st,Jt,_r;var kn=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),ge=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(ge||{});class Kt{constructor(t,i,o,r){l(this,"text","Сохранить");l(this,"type",ge.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=t,this.type=o,this.action=i,r!==void 0&&(this.condition=r)}static Primary(t,i,o){return new Kt(t,i,ge.Primary,o)}static Success(t,i,o){return new Kt(t,i,ge.Success,o)}static Warning(t,i,o){return new Kt(t,i,ge.Warning,o)}static Error(t,i,o){return new Kt(t,i,ge.Error,o)}}class xi extends Kt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",Fe.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let ko=class extends xi{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",Fe.Login)}};class Yr extends xi{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",Fe.Refresh)}}class xo extends xi{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",Fe.Register)}}class Ei extends xi{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",Fe.Restore)}}class Xr{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(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 Bi extends Xr{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===At.Password||this.id===At.PasswordRepeat}}var xn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(xn||{});const nc=/\S+@\S+\.\S+/;class Zr{constructor(){l(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),nc.test(t)||this.errors.push("Некорректный email"),this.errors}}let ic=class extends Bi{constructor(){super(...arguments);l(this,"id",At.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new Zr);l(this,"method",xn.Email)}};const Ni=new ic;class oc{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let rc=class extends Bi{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new oc);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",At.Password)}};const $i=new rc;let sc=class extends Bi{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",At.PasswordRepeat)}};const Jr=new sc,Kr={allowRestore:!1,[Fe.Login]:{methods:[xn.Email],title:"Вход в систему",action:"login",buttons:[new ko,new xo,new Ei],fields:[Ni,$i],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new xo,new ko,new Ei],fields:[Ni,$i,Jr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Ei],fields:[Ni]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Yr],fields:[$i]}};class ac{constructor(){l(this,"block",!1);l(this,"settings",Kr);l(this,"chunk",Fe.Login);l(this,"selectedMethod",xn.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),i=new Map;return t.forEach(o=>{o.value&&i.set(o.name,o.value)}),Object.fromEntries(i)}Validate(){if(this.IsRegister){const t=this.GetField(At.Password),i=this.GetField(At.PasswordRepeat);if((t==null?void 0:t.value)!==(i==null?void 0:i.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===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(i=>{i.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(i=>i.id===t)}}class lc{constructor(){l(this,"visible",!1);l(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 En{constructor(){l(this,"type",ge.Success);l(this,"text","");l(this,"title","")}static ToQuasarColor(t){switch(t){case ge.Success:return"positive";case ge.Warning:return"warning";case ge.Error:return"negative";case ge.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,i){this.type=i,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return En.ToQuasarColor(this.type)}Info(t){this.showMessage(t,ge.Info)}Success(t){this.showMessage(t,ge.Success)}Error(t){this.showMessage(t,ge.Error)}Warning(t){this.showMessage(t,ge.Warning)}FormMessage(t){let i="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const o of Object.keys(t))t[o][0]&&t[o][0].message&&(i+=`<li>${t[o][0].message}</li>`);return i+="</ul>",i}}class Eo{static Get(t,i,o="-"){return!t||!i?"":`${t}${o}${i}`}static In(t,i,o){return t>=i&&t<=o}static Intersects(t,i,o,r){return t===o||i===r||t>o&&t<r||i>o&&i<r||i>r&&t<o}}const es=1e3,ts=60*es,Bo=60*ts;var Yn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Yn||{});const Vi={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(t){return es*t}static M(t){return ts*t}static H(t){return Bo*t}static D(t){return Bo*t}static W(t){return Bo*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const i=ie.SplitHM(t);return i.length>1?ie.HtoM(i[0])+i[1]:ie.HtoM(i[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const i=t.split(":");return[Number(i[0]),Number(i[1])]}static HmsToHm(t){const i=ie.SplitHM(t);return ie.ConcatHM(i[0],i[1])}static AddMtoHM(t,i){const o=new Date,r=ie.SplitHM(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return ie.ConcatHM(a,d)}static ConcatHM(t,i){return`${t}:${ie.NormalizeTime(i)}`}static DiffM(t,i){return ie.Gt(i,t)?ie.HMtoM(i)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(i)}static GetPeriod(t,i){return Eo.Get(t,i)}static Gt(t,i){return ie.HMtoM(t)>ie.HMtoM(i)}static GtOrEq(t,i){return ie.Gt(t,i)||ie.Eq(t,i)}static Eq(t,i){return ie.HMtoM(t)===ie.HMtoM(i)}static PeriodInPeriod(t,i,o,r){return ie.HMtoM(t)>=ie.HMtoM(o)&&ie.HMtoM(i)<=ie.HMtoM(r)}static PeriodsIntersects(t,i,o,r){return Eo.Intersects(ie.HMtoM(t),ie.HMtoM(i),ie.HMtoM(o),ie.HMtoM(r))}}const cc="top";class dc extends En{constructor(){super(...arguments);l(this,"duration",ie.S(3))}showMessage(i,o){if(super.showMessage(i,o),typeof N.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof i=="string"?{}:i;N.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:En.ContainsHtml(this.text),position:cc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",ge.Warning)}Save(){this.showMessage("Изменения успешно сохранены",ge.Success)}}const Bn=new dc;class Et{static Get(t){const i=localStorage.getItem(t);if(i)return JSON.parse(i)}static Set(t,i){i&&localStorage.setItem(t,JSON.stringify(i))}static Remove(t){localStorage.removeItem(t)}}var ut=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ut||{});class uc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return Et.Get(ut.AccessToken)}getRefreshToken(){return Et.Get(ut.RefreshToken)}setAccessToken(t){Et.Set(ut.AccessToken,t)}setRefreshToken(t){Et.Set(ut.RefreshToken,t)}reset(){Et.Remove(ut.AccessToken),Et.Remove(ut.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class fc{constructor(){l(this,"user");l(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),Et.Set(ut.User,this.user))}reset(){this.user=void 0,Et.Remove(ut.User)}actualize(){const t=Et.Get(ut.User);t&&this.set(t)}}class mc{constructor(){l(this,"isAuth",!1);l(this,"user",new fc);l(this,"tokens",new uc);l(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){Bn.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 hc=(vt=class{constructor(){l(this,"form",e.reactive(new ac));l(this,"status",e.reactive(new mc));l(this,"modal",e.reactive(new lc));if(vt.instance)return vt.instance;vt.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(vt,"instance"),vt);const Oe=new hc;var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,23 +11,23 @@
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var Wr;(function(n){(function(e){var i=typeof globalThis=="object"?globalThis:typeof qr=="object"?qr:typeof self=="object"?self:typeof this=="object"?this:d(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),e(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(c,u){return function(f,h){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:h}),u&&u(f,h)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function d(){return s()||a()}})(function(e,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return hi(Object.create(null))}:c?function(){return hi({__proto__:null})}:function(){return hi({})},has:u?function(x,$){return o.call(x,$)}:function(x,$){return $ in x},get:u?function(x,$){return o.call(x,$)?x[$]:void 0}:function(x,$){return x[$]}},h=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Un(),w=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Vr(),y=typeof WeakMap=="function"?WeakMap:Ir(),C=r?Symbol.for("@reflect-metadata:registry"):void 0,B=fo(),E=Nr(B);function N(x,$,V,z){if(W(V)){if(!Lt(x))throw new TypeError;if(!hn($))throw new TypeError;return ke(x,$)}else{if(!Lt(x))throw new TypeError;if(!ge($))throw new TypeError;if(!ge(z)&&!W(z)&&!He(z))throw new TypeError;return He(z)&&(z=void 0),V=Ze(V),fn(x,$,V,z)}}e("decorate",N);function k(x,$){function V(z,Y){if(!ge(z))throw new TypeError;if(!W(Y)&&!be(Y))throw new TypeError;mt(x,$,z,Y)}return V}e("metadata",k);function R(x,$,V,z){if(!ge(V))throw new TypeError;return W(z)||(z=Ze(z)),mt(x,$,V,z)}e("defineMetadata",R);function v(x,$,V){if(!ge($))throw new TypeError;return W(V)||(V=Ze(V)),Xe(x,$,V)}e("hasMetadata",v);function Z(x,$,V){if(!ge($))throw new TypeError;return W(V)||(V=Ze(V)),Nt(x,$,V)}e("hasOwnMetadata",Z);function K(x,$,V){if(!ge($))throw new TypeError;return W(V)||(V=Ze(V)),Mt(x,$,V)}e("getMetadata",K);function fe(x,$,V){if(!ge($))throw new TypeError;return W(V)||(V=Ze(V)),Ot(x,$,V)}e("getOwnMetadata",fe);function ht(x,$){if(!ge(x))throw new TypeError;return W($)||($=Ze($)),wt(x,$)}e("getMetadataKeys",ht);function Ye(x,$){if(!ge(x))throw new TypeError;return W($)||($=Ze($)),nt(x,$)}e("getOwnMetadataKeys",Ye);function Ae(x,$,V){if(!ge($))throw new TypeError;if(W(V)||(V=Ze(V)),!ge($))throw new TypeError;W(V)||(V=Ze(V));var z=pn($,V,!1);return W(z)?!1:z.OrdinaryDeleteMetadata(x,$,V)}e("deleteMetadata",Ae);function ke(x,$){for(var V=x.length-1;V>=0;--V){var z=x[V],Y=z($);if(!W(Y)&&!He(Y)){if(!hn(Y))throw new TypeError;$=Y}}return $}function fn(x,$,V,z){for(var Y=x.length-1;Y>=0;--Y){var Ee=x[Y],Be=Ee($,V,z);if(!W(Be)&&!He(Be)){if(!ge(Be))throw new TypeError;z=Be}}return z}function Xe(x,$,V){var z=Nt(x,$,V);if(z)return!0;var Y=bt($);return He(Y)?!1:Xe(x,Y,V)}function Nt(x,$,V){var z=pn($,V,!1);return W(z)?!1:Ge(z.OrdinaryHasOwnMetadata(x,$,V))}function Mt(x,$,V){var z=Nt(x,$,V);if(z)return Ot(x,$,V);var Y=bt($);if(!He(Y))return Mt(x,Y,V)}function Ot(x,$,V){var z=pn($,V,!1);if(!W(z))return z.OrdinaryGetOwnMetadata(x,$,V)}function mt(x,$,V,z){var Y=pn(V,z,!0);Y.OrdinaryDefineOwnMetadata(x,$,V,z)}function wt(x,$){var V=nt(x,$),z=bt(x);if(z===null)return V;var Y=wt(z,$);if(Y.length<=0)return V;if(V.length<=0)return Y;for(var Ee=new w,Be=[],ne=0,F=V;ne<F.length;ne++){var O=F[ne],L=Ee.has(O);L||(Ee.add(O),Be.push(O))}for(var U=0,te=Y;U<te.length;U++){var O=te[U],L=Ee.has(O);L||(Ee.add(O),Be.push(O))}return Be}function nt(x,$){var V=pn(x,$,!1);return V?V.OrdinaryOwnMetadataKeys(x,$):[]}function we(x){if(x===null)return 1;switch(typeof x){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return x===null?1:6;default:return 6}}function W(x){return x===void 0}function He(x){return x===null}function Vt(x){return typeof x=="symbol"}function ge(x){return typeof x=="object"?x!==null:typeof x=="function"}function se(x,$){switch(we(x)){case 0:return x;case 1:return x;case 2:return x;case 3:return x;case 4:return x;case 5:return x}var V="string",z=ee(x,s);if(z!==void 0){var Y=z.call(x,V);if(ge(Y))throw new TypeError;return Y}return We(x)}function We(x,$){var V,z;{var Y=x.toString;if(Ve(Y)){var z=Y.call(x);if(!ge(z))return z}var V=x.valueOf;if(Ve(V)){var z=V.call(x);if(!ge(z))return z}}throw new TypeError}function Ge(x){return!!x}function Hn(x){return""+x}function Ze(x){var $=se(x);return Vt($)?$:Hn($)}function Lt(x){return Array.isArray?Array.isArray(x):x instanceof Object?x instanceof Array:Object.prototype.toString.call(x)==="[object Array]"}function Ve(x){return typeof x=="function"}function hn(x){return typeof x=="function"}function be(x){switch(we(x)){case 3:return!0;case 4:return!0;default:return!1}}function Je(x,$){return x===$||x!==x&&$!==$}function ee(x,$){var V=x[$];if(V!=null){if(!Ve(V))throw new TypeError;return V}}function Ie(x){var $=ee(x,a);if(!Ve($))throw new TypeError;var V=$.call(x);if(!ge(V))throw new TypeError;return V}function rt(x){return x.value}function st(x){var $=x.next();return $.done?!1:$}function mn(x){var $=x.return;$&&$.call(x)}function bt(x){var $=Object.getPrototypeOf(x);if(typeof x!="function"||x===h||$!==h)return $;var V=x.prototype,z=V&&Object.getPrototypeOf(V);if(z==null||z===Object.prototype)return $;var Y=z.constructor;return typeof Y!="function"||Y===x?$:Y}function It(){var x;!W(C)&&typeof i.Reflect<"u"&&!(C in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(x=Mr(i.Reflect));var $,V,z,Y=new y,Ee={registerProvider:Be,getProvider:F,setProvider:L};return Ee;function Be(U){if(!Object.isExtensible(Ee))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case x===U:break;case W($):$=U;break;case $===U:break;case W(V):V=U;break;case V===U:break;default:z===void 0&&(z=new w),z.add(U);break}}function ne(U,te){if(!W($)){if($.isProviderFor(U,te))return $;if(!W(V)){if(V.isProviderFor(U,te))return $;if(!W(z))for(var he=Ie(z);;){var ye=st(he);if(!ye)return;var at=rt(ye);if(at.isProviderFor(U,te))return mn(he),at}}}if(!W(x)&&x.isProviderFor(U,te))return x}function F(U,te){var he=Y.get(U),ye;return W(he)||(ye=he.get(te)),W(ye)&&(ye=ne(U,te),W(ye)||(W(he)&&(he=new m,Y.set(U,he)),he.set(te,ye))),ye}function O(U){if(W(U))throw new TypeError;return $===U||V===U||!W(z)&&z.has(U)}function L(U,te,he){if(!O(he))throw new Error("Metadata provider not registered.");var ye=F(U,te);if(ye!==he){if(!W(ye))return!1;var at=Y.get(U);W(at)&&(at=new m,Y.set(U,at)),at.set(te,he)}return!0}}function fo(){var x;return!W(C)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&(x=i.Reflect[C]),W(x)&&(x=It()),!W(C)&&ge(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,C,{enumerable:!1,configurable:!1,writable:!1,value:x}),x}function Nr(x){var $=new y,V={isProviderFor:function(O,L){var U=$.get(O);return W(U)?!1:U.has(L)},OrdinaryDefineOwnMetadata:Be,OrdinaryHasOwnMetadata:Y,OrdinaryGetOwnMetadata:Ee,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:F};return B.registerProvider(V),V;function z(O,L,U){var te=$.get(O),he=!1;if(W(te)){if(!U)return;te=new m,$.set(O,te),he=!0}var ye=te.get(L);if(W(ye)){if(!U)return;if(ye=new m,te.set(L,ye),!x.setProvider(O,L,V))throw te.delete(L),he&&$.delete(O),new Error("Wrong provider for target.")}return ye}function Y(O,L,U){var te=z(L,U,!1);return W(te)?!1:Ge(te.has(O))}function Ee(O,L,U){var te=z(L,U,!1);if(!W(te))return te.get(O)}function Be(O,L,U,te){var he=z(U,te,!0);he.set(O,L)}function ne(O,L){var U=[],te=z(O,L,!1);if(W(te))return U;for(var he=te.keys(),ye=Ie(he),at=0;;){var ho=st(ye);if(!ho)return U.length=at,U;var pt=rt(ho);try{U[at]=pt}catch(Tr){try{mn(ye)}finally{throw Tr}}at++}}function F(O,L,U){var te=z(L,U,!1);if(W(te)||!te.delete(O))return!1;if(te.size===0){var he=$.get(L);W(he)||(he.delete(U),he.size===0&&$.delete(he))}return!0}}function Mr(x){var $=x.defineMetadata,V=x.hasOwnMetadata,z=x.getOwnMetadata,Y=x.getOwnMetadataKeys,Ee=x.deleteMetadata,Be=new y,ne={isProviderFor:function(F,O){var L=Be.get(F);return!W(L)&&L.has(O)?!0:Y(F,O).length?(W(L)&&(L=new w,Be.set(F,L)),L.add(O),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:V,OrdinaryGetOwnMetadata:z,OrdinaryOwnMetadataKeys:Y,OrdinaryDeleteMetadata:Ee};return ne}function pn(x,$,V){var z=B.getProvider(x,$);if(!W(z))return z;if(V){if(B.setProvider(x,$,E))return E;throw new Error("Illegal state.")}}function Un(){var x={},$=[],V=function(){function ne(F,O,L){this._index=0,this._keys=F,this._values=O,this._selector=L}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var F=this._index;if(F>=0&&F<this._keys.length){var O=this._selector(this._keys[F],this._values[F]);return F+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:O,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(F){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),F},ne.prototype.return=function(F){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:F,done:!0}},ne}(),z=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=x,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(F){return this._find(F,!1)>=0},ne.prototype.get=function(F){var O=this._find(F,!1);return O>=0?this._values[O]:void 0},ne.prototype.set=function(F,O){var L=this._find(F,!0);return this._values[L]=O,this},ne.prototype.delete=function(F){var O=this._find(F,!1);if(O>=0){for(var L=this._keys.length,U=O+1;U<L;U++)this._keys[U-1]=this._keys[U],this._values[U-1]=this._values[U];return this._keys.length--,this._values.length--,Je(F,this._cacheKey)&&(this._cacheKey=x,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=x,this._cacheIndex=-2},ne.prototype.keys=function(){return new V(this._keys,this._values,Y)},ne.prototype.values=function(){return new V(this._keys,this._values,Ee)},ne.prototype.entries=function(){return new V(this._keys,this._values,Be)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(F,O){if(!Je(this._cacheKey,F)){this._cacheIndex=-1;for(var L=0;L<this._keys.length;L++)if(Je(this._keys[L],F)){this._cacheIndex=L;break}}return this._cacheIndex<0&&O&&(this._cacheIndex=this._keys.length,this._keys.push(F),this._values.push(void 0)),this._cacheIndex},ne}();return z;function Y(ne,F){return ne}function Ee(ne,F){return F}function Be(ne,F){return[ne,F]}}function Vr(){var x=function(){function $(){this._map=new m}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(V){return this._map.has(V)},$.prototype.add=function(V){return this._map.set(V,V),this},$.prototype.delete=function(V){return this._map.delete(V)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[a]=function(){return this.keys()},$}();return x}function Ir(){var x=16,$=f.create(),V=z();return function(){function F(){this._key=z()}return F.prototype.has=function(O){var L=Y(O,!1);return L!==void 0?f.has(L,this._key):!1},F.prototype.get=function(O){var L=Y(O,!1);return L!==void 0?f.get(L,this._key):void 0},F.prototype.set=function(O,L){var U=Y(O,!0);return U[this._key]=L,this},F.prototype.delete=function(O){var L=Y(O,!1);return L!==void 0?delete L[this._key]:!1},F.prototype.clear=function(){this._key=z()},F}();function z(){var F;do F="@@WeakMap@@"+ne();while(f.has($,F));return $[F]=!0,F}function Y(F,O){if(!o.call(F,V)){if(!O)return;Object.defineProperty(F,V,{value:f.create()})}return F[V]}function Ee(F,O){for(var L=0;L<O;++L)F[L]=Math.random()*255|0;return F}function Be(F){if(typeof Uint8Array=="function"){var O=new Uint8Array(F);return typeof crypto<"u"?crypto.getRandomValues(O):typeof msCrypto<"u"?msCrypto.getRandomValues(O):Ee(O,F),O}return Ee(new Array(F),F)}function ne(){var F=Be(x);F[6]=F[6]&79|64,F[8]=F[8]&191|128;for(var O="",L=0;L<x;++L){var U=F[L];(L===4||L===6||L===8)&&(O+="-"),U<16&&(O+="0"),O+=U.toString(16).toLowerCase()}return O}}function hi(x){return x.__=void 0,delete x.__,x}})})(Wr||(Wr={}));const ve=[];for(let n=0;n<256;++n)ve.push((n+256).toString(16).slice(1));function oc(n,e=0){return(ve[n[e+0]]+ve[n[e+1]]+ve[n[e+2]]+ve[n[e+3]]+"-"+ve[n[e+4]]+ve[n[e+5]]+"-"+ve[n[e+6]]+ve[n[e+7]]+"-"+ve[n[e+8]]+ve[n[e+9]]+"-"+ve[n[e+10]]+ve[n[e+11]]+ve[n[e+12]]+ve[n[e+13]]+ve[n[e+14]]+ve[n[e+15]]).toLowerCase()}const rc=new Uint8Array(16);function sc(){return crypto.getRandomValues(rc)}function Ht(n,e,i){return crypto.randomUUID?crypto.randomUUID():ac(n)}function ac(n,e,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??sc();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,oc(o)}class Fe{static UUID(){return Ht()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}function lc(n){var e=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),e.push(r))}var s=e.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function So(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),lc(n)}class re{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static BuildSafeUrl(e,i,o){try{const r=new URL(e);return i&&(r.port=i.toString()),So(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${e}`)}}static ToCamelCase(e){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(i).map((r,s)=>s===0?r.toLowerCase():re.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,i,o){return e.substring(e.indexOf(i)+2,e.lastIndexOf(o))}static Translit(e,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(d=>o[d]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(i,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,i){const o=e.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=re.Translit(o),a=re.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,i){return re.StringsEquals(e,i)}static SearchInFields(e,i){let o=!1;for(let r=0;r<i.length;r++)if(re.SearchIn(i[r],e)){o=!0;break}return o}static FormatToPercentage(e){return`${e}%`}static ApplyClassToSubStr(e,i,o){const r=o??"highlight-text",s=new RegExp(re.GetVariants(i).join("|"),"gi");return e.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(e){const i=re.Translit(e);return[e,re.Capitalize(e),e.toLowerCase(),e.toUpperCase(),i,re.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,i){const o=[2,0,1,1,1,2];return e.length+" "+i[e.length%100>4&&e.length%100<20?2:o[e.length%10<5?e.length%10:5]]}static TrimText(e){return typeof e=="string"?e.trim():e}}const Qt=class Qt{static BuildClass(e,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))e[o]instanceof Date?e[o]=new Date(r):e[o]=r;else if(r!=null&&!Array.isArray(r))if(e[o]&&e[o].constructor)e[o]=new e[o].constructor(r);else{const s=Reflect.getMetadata(o,e);s&&(e[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,e);r.length!==0&&!s&&(e[o]=r),s&&(e[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,i,o){Qt.RemoveFromClass(e,i,o)}static RemoveFromClassById(e,i,o){if(!e)return;const r=i.findIndex(s=>s.id===e);Qt.RemoveFromClass(r,i,o)}static RemoveFromClass(e,i,o){if(e<0)return;const r=i[e].id;r&&o&&o.push(r),i.splice(e,1)}static GetPropertyName(e){const i=new e;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(e,i){const o=e.constructor(i);return Qt.BuildClass(o),o.id=Fe.UUID(),o}static ExistsWithId(e,i){return e.some(o=>o.id===i)}static DeepMap(e){return i=>Array.isArray(i)?i.map(Qt.DeepMap(e)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Qt.DeepMap(e)(r)])):e(i)}static DeepTrim(e){return this.DeepMap(re.TrimText)(e)}};l(Qt,"GetClassConstructor",e=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=e,Reflect.defineMetadata(o,r,i)});let _=Qt;class Zt{constructor(e){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");_.BuildClass(this,e)}static Create(){const e=new Zt;return e.id=Fe.UUID(),e}}class Co{static Setup(e="http://localhost",i="9000",o="api"){this.staticUrl=re.BuildSafeUrl(e,i,o),this.staticUrl=So(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l(Co,"staticUrl","");class Qe{constructor(e){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);_.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${Co.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:yn&&yn.tagName.toUpperCase()==="SCRIPT"&&yn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,i){const o=new Qe;return o.id=i??Fe.UUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=Fe.UUID(),o}setFile(e){this.id||(this.id=Fe.UUID()),this.originalName=e.name,this.file=e,this.fileSystemPath=Fe.UUID(),this.url=e.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,i){if(e.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:yn&&yn.tagName.toUpperCase()==="SCRIPT"&&yn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const i=e.split(".");return i[i.length-1]}}class Gr{constructor(e){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);_.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}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(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=re.Capitalize(this.name),this.surname=re.Capitalize(this.surname),this.patronymic=re.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(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class Jt{constructor(e){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");_.BuildClass(this,e)}static Create(){const e=new Jt;return e.id=Fe.UUID(),e}}class xi{constructor(e){l(this,"id");l(this,"address");l(this,"description");_.BuildClass(this,e)}}class Ei{constructor(e){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");_.BuildClass(this,e)}static Create(){const e=new Ei;return e.id=Fe.UUID(),e}}class ko{constructor(e){l(this,"id");l(this,"address");l(this,"description");_.BuildClass(this,e)}}let cc=(_t=class{},l(_t,"Phone",Jt),l(_t,"FileInfo",Qe),l(_t,"Website",ko),l(_t,"Email",Zt),l(_t,"Human",Gr),l(_t,"PostAddress",xi),l(_t,"UserAccount",Ei),_t);var Se=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Se||{});class Bi{constructor(e){l(this,"field","");l(this,"operator",Se.Eq);l(this,"value","");_.BuildClass(this,e)}setValue(e){this.value=e}static Create(e,i){return new Bi({operator:i,field:e})}eq(e){return this.field===e.field&&this.operator===e.operator}isUnary(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetween(){return this.operator===Se.Btw}isSet(){return this.operator===Se.In}}class xo{constructor(e){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);_.BuildClass(this,e)}static Create(e){const i=new xo;return i.model=e.GetClassName(),i}eq(e){return e.model===this.model&&e.field===this.field}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Bi.Create(e,i);return this.wheres.push(r),r}findWhere(e){return this.wheres.find(i=>i.eq(e))}}let Qr=class Rl{constructor(e){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);_.BuildClass(this,e)}static Create(e){const i=new Rl;return i.model=e.GetClassName(),i}addWhere(e,i){const o=this.findWhere({field:e,operator:i});if(o)return o;const r=Bi.Create(e,i);return this.wheres.push(r),r}removeWhere(e){const i=this.wheres.findIndex(o=>o.eq(e));i>-1&&this.wheres.splice(i,1)}addJoin(e){const i=this.findJoin({model:e.GetClassName()});if(i)return i;const o=xo.Create(e);return this.joins.push(o),o}findJoin(e){return this.joins.find(i=>i.eq(e))}findWhere(e){return this.wheres.find(i=>i.eq(e))}toRef(){return t.ref(this)}};class Pt{static Shuffle(e){for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[e[i],e[o]]=[e[o],e[i]]}}static GenerateNumsRange(e,i,o=1){return Array.from({length:(i-e)/o+1},(r,s)=>e+s*o)}static GetLast(e){return e[e.length-1]}static GetFirst(e){return e[0]}static GetRandEL(e){return e[Math.floor(Math.random()*e.length)]}static Sort(e){e.forEach((i,o)=>i.order=o)}static Refill(e,i){e.splice(0,e.length),e.push(...i)}static Eq(e,i){return e.length===i.length&&(e==null?void 0:e.every((o,r)=>e[r]==i[r]))}static SwipeById(e,i,o){const r=e.findIndex(a=>i.id===a.id),s=e.findIndex(a=>o.id===a.id);r||s||([e[r],e[s]]=[e[s],e[r]])}static Swap(e,i,o){if(i<0||i>=e.length||o<0||o>=e.length)return;const r=e[i];e[i]=e[o],e[o]=r}static MoveUp(e,i){e[i].order=i-1,e[i-1]&&(e[i-1].order=i),[e[i],e[i-1]]=[e[i-1],e[i]]}static MoveDown(e,i){e[i].order=i+1,e[i+1]&&(e[i+1].order=i),[e[i],e[i+1]]=[e[i+1],e[i]]}}var Pe=(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))(Pe||{}),dc=Object.defineProperty,uc=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&dc(e,i,r),r};const Yr=class gi{constructor(e){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",Se.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",Pe.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");_.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===Pe.Join){const i=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===Se.In?i&&Pt.Eq(this.set,e.set):i}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===Pe.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===Pe.String?this.value1===(e==null?void 0:e.value1):this.type===Pe.Join&&this.set.length?Pt.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Pe.Boolean?`"boolean":${this.boolean}`:"",d=this.type===Pe.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=this.type===Pe.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Pe.Number?`"number":${this.number}`:"",f=this.type===Pe.Set||this.operator===Se.In?`"set":${JSON.stringify(this.set)}`:"",h=this.type===Pe.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,i,o,r,s,a,d,c,u,f,h].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Se.Eq||this.operator===Se.Gt||this.operator===Se.Lt}isBetweenFilter(){return this.operator===Se.Btw}isSetFilter(){return this.operator===Se.In}static Create(e,i,o){const r=new gi;return r.model=e.GetClassName(),r.col=i??"",r.type=o,r.type===Pe.Number&&(r.value1="0"),r.type===Pe.String&&(r.value1=""),r.type===Pe.Boolean&&(r.value1="false",r.operator=Se.Eq),r}static CreateFilterModelWithJoin(e,i,o,r,s,a,d,c){const u=new gi;return u.id=Ht(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(e,i,o,r,s,a,d){const c=new gi;return c.model=e,c.joinTableModel=o,c.joinTablePk=r,c.joinTableFk=s,c.col=i,c.type=Pe.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(e,i){const o=new gi;return o.id=Ht(),o.model=re.ToCamelCase(e.GetClassName()),o.joinTableModel=re.ToCamelCase(i.GetClassName()),o.type=Pe.Join,o}addToSet(...e){e.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...e){e.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return t.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,i){if(!e&&!i){this.dropDates();return}if(!i){this.setDate1(e),this.operator=Se.Eq;return}this.setDate2(i),this.operator=Se.Btw}};uc([_.GetClassConstructor(String)],Yr.prototype,"set");let Eo=Yr;class fc{constructor(){l(this,"operation",Se.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,i,r,s,a].filter(d=>d!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class $i{constructor(e){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new fc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");_.BuildClass(this,e)}setLoadMore(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,i,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=Se.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.page=e}toUrlQuery(){const e=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,i,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,_.BuildClass(this)}}var ct=(n=>(n.Asc="asc",n.Desc="desc",n))(ct||{});class Ni{constructor(e){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);_.BuildClass(this,e)}static Create(e,i,o=ct.Asc,r,s){const a=new Ni;return a.model=e.GetClassName(),a.col=i??"",a.order=o??ct.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ct.Asc}isDesc(){return this.order===ct.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,i,o].toString()}async fromUrlQuery(){const e=window.location.search,i=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ct.Asc}desc(){this.order=ct.Desc}}class Mi{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(e,i){const o=new Mi;return o.model=e.GetClassName(),o.cols=i,o}}var hc=Object.defineProperty,qn=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&hc(e,i,r),r};const Cn=(tt=class{constructor(e){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new $i);l(this,"t",new Mi);_.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new tt),this.instance}createFrom(e){const i=new tt(JSON.parse(e));this.f=i.f}clearForHTTP(){const e=new tt(this);return e.f=this.f.map(i=>tt.EmptyEntiries(i)),e.f2=this.f2.map(i=>tt.EmptyEntiries(i)),e.s=this.s.map(i=>tt.EmptyEntiries(i)),e.p=tt.EmptyEntiries(this.p),e.t=tt.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const o=Object.entries(e).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(e){return this.f.find(i=>e.id===i.id)}getFirstSortModel(){return Pt.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}setF2(e){this.f2.push(e)}replaceF(e,i){this.removeF(i),e&&this.setF(e)}removeF(e){const i=this.f.findIndex(o=>o.eq(e));_.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new $i}resetF(){this.f=[]}},l(tt,"instance"),tt);qn([_.GetClassConstructor(Eo)],Cn.prototype,"f"),qn([_.GetClassConstructor(Qr)],Cn.prototype,"f2"),qn([_.GetClassConstructor(Ni)],Cn.prototype,"s"),qn([_.GetClassConstructor($i)],Cn.prototype,"p"),qn([_.GetClassConstructor(Mi)],Cn.prototype,"t");let Rt=Cn,mc=(Ln=class{},l(Ln,"SortModel",Ni),l(Ln,"FilterModel",Eo),l(Ln,"FilterModelV2",Qr),l(Ln,"FTSP",Rt),Ln);function Xr(n,e){return function(){return n.apply(e,arguments)}}const{toString:pc}=Object.prototype,{getPrototypeOf:kn}=Object,{iterator:Wn,toStringTag:Zr}=Symbol,Vi=(({hasOwnProperty:n})=>(e,i)=>n.call(e,i))(Object.prototype),Gn=(n,e)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Vi(i,e))return!0;i=kn(i)}return!1},gc=(n,e)=>n!=null&&Gn(n,e)?n[e]:void 0,Bo=(n=>e=>{const i=pc.call(e);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),gt=n=>(n=n.toLowerCase(),e=>Bo(e)===n),Ii=n=>e=>typeof e===n,{isArray:Kt}=Array,xn=Ii("undefined");function En(n){return n!==null&&!xn(n)&&n.constructor!==null&&!xn(n.constructor)&&Ke(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Jr=gt("ArrayBuffer");function yc(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Jr(n.buffer),e}const wc=Ii("string"),Ke=Ii("function"),Kr=Ii("number"),Bn=n=>n!==null&&typeof n=="object",bc=n=>n===!0||n===!1,Ti=n=>{if(!Bn(n))return!1;const e=kn(n);return(e===null||e===Object.prototype||kn(e)===null)&&!Gn(n,Zr)&&!Gn(n,Wn)},Sc=n=>{if(!Bn(n)||En(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Cc=gt("Date"),kc=gt("File"),xc=n=>!!(n&&typeof n.uri<"u"),Ec=n=>n&&typeof n.getParts<"u",Bc=gt("Blob"),$c=gt("FileList"),Nc=n=>Bn(n)&&Ke(n.pipe);function Mc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const es=Mc(),ts=typeof es.FormData<"u"?es.FormData:void 0,Vc=n=>{if(!n)return!1;if(ts&&n instanceof ts)return!0;const e=kn(n);if(!e||e===Object.prototype||!Ke(n.append))return!1;const i=Bo(n);return i==="formdata"||i==="object"&&Ke(n.toString)&&n.toString()==="[object FormData]"},Ic=gt("URLSearchParams"),[Tc,Pc,Rc,Ac]=["ReadableStream","Request","Response","Headers"].map(gt),zc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qn(n,e,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),Kt(n))for(o=0,r=n.length;o<r;o++)e.call(null,n[o],o,n);else{if(En(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(o=0;o<a;o++)d=s[o],e.call(null,n[d],d,n)}}function ns(n,e){if(En(n))return null;e=e.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],e===r.toLowerCase())return r;return null}const en=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,is=n=>!xn(n)&&n!==en;function $o(...n){const{caseless:e,skipUndefined:i}=is(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=e&&typeof a=="string"&&ns(o,a)||a,c=Vi(o,d)?o[d]:void 0;Ti(c)&&Ti(s)?o[d]=$o(c,s):Ti(s)?o[d]=$o({},s):Kt(s)?o[d]=s.slice():(!i||!xn(s))&&(o[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||En(d)||(Qn(d,r),typeof d!="object"||Kt(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];Gc.call(d,f)&&r(d[f],f)}}return o}const Dc=(n,e,i,{allOwnKeys:o}={})=>(Qn(e,(r,s)=>{i&&Ke(r)?Object.defineProperty(n,s,{__proto__:null,value:Xr(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),vc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Fc=(n,e,i,o)=>{n.prototype=Object.create(e.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:e.prototype}),i&&Object.assign(n.prototype,i)},_c=(n,e,i,o)=>{let r,s,a;const d={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,e))&&!d[a]&&(e[a]=n[a],d[a]=!0);n=i!==!1&&kn(n)}while(n&&(!i||i(n,e))&&n!==Object.prototype);return e},Oc=(n,e,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=e.length;const o=n.indexOf(e,i);return o!==-1&&o===i},Lc=n=>{if(!n)return null;if(Kt(n))return n;let e=n.length;if(!Kr(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=n[e];return i},Hc=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&kn(Uint8Array)),Uc=(n,e)=>{const o=(n&&n[Wn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(n,s[0],s[1])}},jc=(n,e)=>{let i;const o=[];for(;(i=n.exec(e))!==null;)o.push(i);return o},qc=gt("HTMLFormElement"),Wc=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:Gc}=Object.prototype,Qc=gt("RegExp"),os=(n,e)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Qn(i,(r,s)=>{let a;(a=e(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},Yc=n=>{os(n,(e,i)=>{if(Ke(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(Ke(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Xc=(n,e)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return Kt(n)?o(n):o(String(n).split(e)),i},Zc=()=>{},Jc=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Kc(n){return!!(n&&Ke(n.append)&&n[Zr]==="FormData"&&n[Wn])}const ed=n=>{const e=new WeakSet,i=o=>{if(Bn(o)){if(e.has(o))return;if(En(o))return o;if(!("toJSON"in o)){e.add(o);const r=Kt(o)?[]:{};return Qn(o,(s,a)=>{const d=i(s);!xn(d)&&(r[a]=d)}),e.delete(o),r}}return o};return i(n)},td=gt("AsyncFunction"),nd=n=>n&&(Bn(n)||Ke(n))&&Ke(n.then)&&Ke(n.catch),rs=((n,e)=>n?setImmediate:e?((i,o)=>(en.addEventListener("message",({source:r,data:s})=>{r===en&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),en.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ke(en.postMessage)),id=typeof queueMicrotask<"u"?queueMicrotask.bind(en):typeof process<"u"&&process.nextTick||rs,ss=n=>n!=null&&Ke(n[Wn]),b={isArray:Kt,isArrayBuffer:Jr,isBuffer:En,isFormData:Vc,isArrayBufferView:yc,isString:wc,isNumber:Kr,isBoolean:bc,isObject:Bn,isPlainObject:Ti,isEmptyObject:Sc,isReadableStream:Tc,isRequest:Pc,isResponse:Rc,isHeaders:Ac,isUndefined:xn,isDate:Cc,isFile:kc,isReactNativeBlob:xc,isReactNative:Ec,isBlob:Bc,isRegExp:Qc,isFunction:Ke,isStream:Nc,isURLSearchParams:Ic,isTypedArray:Hc,isFileList:$c,forEach:Qn,merge:$o,extend:Dc,trim:zc,stripBOM:vc,inherits:Fc,toFlatObject:_c,kindOf:Bo,kindOfTest:gt,endsWith:Oc,toArray:Lc,forEachEntry:Uc,matchAll:jc,isHTMLForm:qc,hasOwnProperty:Vi,hasOwnProp:Vi,hasOwnInPrototypeChain:Gn,getSafeProp:gc,reduceDescriptors:os,freezeMethods:Yc,toObjectSet:Xc,toCamelCase:Wc,noop:Zc,toFiniteNumber:Jc,findKey:ns,global:en,isContextDefined:is,isSpecCompliantForm:Kc,toJSONObject:ed,isAsyncFn:td,isThenable:nd,setImmediate:rs,asap:id,isIterable:ss,isSafeIterable:n=>n!=null&&Gn(n,Wn)&&ss(n)},od=b.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"]),rd=n=>{const e={};let i,o,r;return n&&n.split(`
15
- `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||e[i]&&od[i])&&(i==="set-cookie"?e[i]?e[i].push(o):e[i]=[o]:e[i]=e[i]?e[i]+", "+o:o)}),e};function sd(n){let e=0,i=n.length;for(;e<i;){const o=n.charCodeAt(e);if(o!==9&&o!==32)break;e+=1}for(;i>e;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return e===0&&i===n.length?n:n.slice(e,i)}const ad=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ld=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function No(n,e){return b.isArray(n)?n.map(i=>No(i,e)):sd(String(n).replace(e,""))}const cd=n=>No(n,ad),dd=n=>No(n,ld);function as(n){const e=Object.create(null);return b.forEach(n.toJSON(),(i,o)=>{e[o]=dd(i)}),e}const ls=Symbol("internals");function Yn(n){return n&&String(n).trim().toLowerCase()}function Pi(n){return n===!1||n==null?n:b.isArray(n)?n.map(Pi):cd(String(n))}function ud(n){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)e[o[1]]=o[2];return e}const fd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Mo(n,e,i,o,r){if(b.isFunction(o))return o.call(this,e,i);if(r&&(e=i),!!b.isString(e)){if(b.isString(o))return e.indexOf(o)!==-1;if(b.isRegExp(o))return o.test(e)}}function hd(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,o)=>i.toUpperCase()+o)}function md(n,e){const i=b.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}let Ue=class{constructor(e){e&&this.set(e)}set(e,i,o){const r=this;function s(d,c,u){const f=Yn(c);if(!f)return;const h=b.findKey(r,f);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||c]=Pi(d))}const a=(d,c)=>b.forEach(d,(u,f)=>s(u,f,c));if(b.isPlainObject(e)||e instanceof this.constructor)a(e,i);else if(b.isString(e)&&(e=e.trim())&&!fd(e))a(rd(e),i);else if(b.isObject(e)&&b.isSafeIterable(e)){let d=Object.create(null),c,u;for(const f of e){if(!b.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],b.hasOwnProp(d,u)?(c=d[u],d[u]=b.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,i)}else e!=null&&s(i,e,o);return this}get(e,i){if(e=Yn(e),e){const o=b.findKey(this,e);if(o){const r=this[o];if(!i)return r;if(i===!0)return ud(r);if(b.isFunction(i))return i.call(this,r,o);if(b.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=Yn(e),e){const o=b.findKey(this,e);return!!(o&&this[o]!==void 0&&(!i||Mo(this,this[o],o,i)))}return!1}delete(e,i){const o=this;let r=!1;function s(a){if(a=Yn(a),a){const d=b.findKey(o,a);d&&(!i||Mo(o,o[d],d,i))&&(delete o[d],r=!0)}}return b.isArray(e)?e.forEach(s):s(e),r}clear(e){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!e||Mo(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const i=this,o={};return b.forEach(this,(r,s)=>{const a=b.findKey(o,s);if(a){i[a]=Pi(r),delete i[s];return}const d=e?hd(s):String(s).trim();d!==s&&delete i[s],i[d]=Pi(r),o[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return b.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=e&&b.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const o=new this(e);return i.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[ls]=this[ls]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=Yn(a);o[d]||(md(r,a),o[d]=!0)}return b.isArray(e)?e.forEach(s):s(e),this}};Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(Ue.prototype,({value:n},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(o){this[i]=o}}}),b.freezeMethods(Ue);const pd="[REDACTED ****]";function gd(n){if(b.hasOwnProp(n,"toJSON"))return!0;let e=Object.getPrototypeOf(n);for(;e&&e!==Object.prototype;){if(b.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function yd(n,e){const i=new Set(e.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||b.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof Ue&&(s=s.toJSON()),o.push(s);let a;if(b.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);b.isUndefined(u)||(a[c]=u)});else{if(!b.isPlainObject(s)&&gd(s))return o.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=i.has(d.toLowerCase())?pd:r(c);b.isUndefined(u)||(a[d]=u)}}return o.pop(),a};return r(n)}let D=class Al extends Error{static from(e,i,o,r,s,a){const d=new Al(e.message,i||e.code,o,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),a&&Object.assign(d,a),d}constructor(e,i,o,r,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,i=e&&b.hasOwnProp(e,"redact")?e.redact:void 0,o=b.isArray(i)&&i.length>0?yd(e,i):b.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};D.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",D.ERR_BAD_OPTION="ERR_BAD_OPTION",D.ECONNABORTED="ECONNABORTED",D.ETIMEDOUT="ETIMEDOUT",D.ECONNREFUSED="ECONNREFUSED",D.ERR_NETWORK="ERR_NETWORK",D.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",D.ERR_DEPRECATED="ERR_DEPRECATED",D.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",D.ERR_BAD_REQUEST="ERR_BAD_REQUEST",D.ERR_CANCELED="ERR_CANCELED",D.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",D.ERR_INVALID_URL="ERR_INVALID_URL",D.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const wd=null,cs=100;function Vo(n){return b.isPlainObject(n)||b.isArray(n)}function ds(n){return b.endsWith(n,"[]")?n.slice(0,-2):n}function Io(n,e,i){return n?n.concat(e).map(function(r,s){return r=ds(r),!i&&s?"["+r+"]":r}).join(i?".":""):e}function bd(n){return b.isArray(n)&&!n.some(Vo)}const Sd=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function Ri(n,e,i){if(!b.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,i=b.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,k){return!b.isUndefined(k[N])});const o=i.metaTokens,r=i.visitor||y,s=i.dots,a=i.indexes,d=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?cs:i.maxDepth,u=d&&b.isSpecCompliantForm(e),f=[];if(!b.isFunction(r))throw new TypeError("visitor must be a function");function h(E){if(E===null)return"";if(b.isDate(E))return E.toISOString();if(b.isBoolean(E))return E.toString();if(!u&&b.isBlob(E))throw new D("Blob is not supported. Use a Buffer instead.");if(b.isArrayBuffer(E)||b.isTypedArray(E)){if(u&&typeof d=="function")return new d([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new D("Blob is not supported. Use a Buffer instead.",D.ERR_NOT_SUPPORT)}return E}function m(E){if(E>c)throw new D("Object is too deeply nested ("+E+" levels). Max depth: "+c,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(E,N){if(c===1/0)return JSON.stringify(E);const k=[];return JSON.stringify(E,function(v,Z){if(!b.isObject(Z))return Z;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(Z),m(N+k.length-1),Z})}function y(E,N,k){let R=E;if(b.isReactNative(e)&&b.isReactNativeBlob(E))return e.append(Io(k,N,s),h(E)),!1;if(E&&!k&&typeof E=="object"){if(b.endsWith(N,"{}"))N=o?N:N.slice(0,-2),E=w(E,1);else if(b.isArray(E)&&bd(E)||(b.isFileList(E)||b.endsWith(N,"[]"))&&(R=b.toArray(E)))return N=ds(N),R.forEach(function(Z,K){!(b.isUndefined(Z)||Z===null)&&e.append(a===!0?Io([N],K,s):a===null?N:N+"[]",h(Z))}),!1}return Vo(E)?!0:(e.append(Io(k,N,s),h(E)),!1)}const C=Object.assign(Sd,{defaultVisitor:y,convertValue:h,isVisitable:Vo});function B(E,N,k=0){if(!b.isUndefined(E)){if(m(k),f.indexOf(E)!==-1)throw new Error("Circular reference detected in "+N.join("."));f.push(E),b.forEach(E,function(v,Z){(!(b.isUndefined(v)||v===null)&&r.call(e,v,b.isString(Z)?Z.trim():Z,N,C))===!0&&B(v,N?N.concat(Z):[Z],k+1)}),f.pop()}}if(!b.isObject(n))throw new TypeError("data must be an object");return B(n),e}function us(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return e[o]})}function To(n,e){this._pairs=[],n&&Ri(n,this,e)}const fs=To.prototype;fs.append=function(e,i){this._pairs.push([e,i])},fs.toString=function(e){const i=e?o=>e.call(this,o,us):us;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function Cd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hs(n,e,i){if(!e)return n;n=n||"";const o=b.isFunction(i)?{serialize:i}:i,r=b.getSafeProp(o,"encode")||Cd,s=b.getSafeProp(o,"serialize");let a;if(s?a=s(e,o):a=b.isURLSearchParams(e)?e.toString():new To(e,o).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class ms{constructor(){this.handlers=[]}use(e,i,o){return this.handlers.push({fulfilled:e,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Po={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},kd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:To,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ro=typeof window<"u"&&typeof document<"u",Ao=typeof navigator=="object"&&navigator||void 0,xd=Ro&&(!Ao||["ReactNative","NativeScript","NS"].indexOf(Ao.product)<0),Ed=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bd=Ro&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ro,hasStandardBrowserEnv:xd,hasStandardBrowserWebWorkerEnv:Ed,navigator:Ao,origin:Bd},Symbol.toStringTag,{value:"Module"})),...kd};function $d(n,e){return Ri(n,new _e.classes.URLSearchParams,{visitor:function(i,o,r,s){return _e.isNode&&b.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}const ps=cs;function gs(n){if(n>ps)throw new D("FormData field is too deeply nested ("+n+" levels). Max depth: "+ps,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Nd(n){const e=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)gs(e.length),e.push(o[0]==="[]"?"":o[1]||o[0]);return e}function Md(n){const e={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],e[s]=n[s];return e}function ys(n){function e(i,o,r,s){gs(s);let a=i[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=i.length;return a=!a&&b.isArray(r)?r.length:a,c?(b.hasOwnProp(r,a)?r[a]=b.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!d):((!b.hasOwnProp(r,a)||!b.isObject(r[a]))&&(r[a]=[]),e(i,o,r[a],s)&&b.isArray(r[a])&&(r[a]=Md(r[a])),!d)}if(b.isFormData(n)&&b.isFunction(n.entries)){const i={};return b.forEachEntry(n,(o,r)=>{e(Nd(o),r,i,0)}),i}return null}const $n=(n,e)=>n!=null&&b.hasOwnProp(n,e)?n[e]:void 0;function Vd(n,e,i){if(b.isString(n))try{return(e||JSON.parse)(n),b.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const Xn={transitional:Po,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=b.isObject(e);if(s&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return r?JSON.stringify(ys(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e)||b.isReadableStream(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){const c=$n(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return $d(e,c).toString();if((d=b.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=$n(this,"env"),f=u&&u.FormData;return Ri(d?{"files[]":e}:e,f&&new f,c)}}return s||r?(i.setContentType("application/json",!1),Vd(e)):e}],transformResponse:[function(e){const i=$n(this,"transitional")||Xn.transitional,o=i&&i.forcedJSONParsing,r=$n(this,"responseType"),s=r==="json";if(b.isResponse(e)||b.isReadableStream(e))return e;if(e&&b.isString(e)&&(o&&!r||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(e,$n(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,$n(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch","query"],n=>{Xn.headers[n]={}});function zo(n,e){const i=this||Xn,o=e||i,r=Ue.from(o.headers);let s=o.data;return b.forEach(n,function(d){s=d.call(i,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function ws(n){return!!(n&&n.__CANCEL__)}let Zn=class extends D{constructor(e,i,o){super(e??"canceled",D.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function bs(n,e,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):e(new D("Request failed with status code "+i.status,i.status>=400&&i.status<500?D.ERR_BAD_REQUEST:D.ERR_BAD_RESPONSE,i.config,i.request,i))}function Id(n){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return e&&e[1]||""}function Td(n,e){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),f=o[s];a||(a=u),i[r]=c,o[r]=u;let h=s,m=0;for(;h!==r;)m+=i[h++],h=h%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<e)return;const w=f&&u-f;return w?Math.round(m*1e3/w):void 0}}function Pd(n,e){let i=0,o=1e3/e,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),h=f-i;h>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-h)))},()=>r&&a(r)]}const Ai=(n,e,i=3)=>{let o=0;const r=Td(50,250);return Pd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-o),f=r(u);o=Math.max(o,c);const h={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(h)},i)},Ss=(n,e)=>{const i=n!=null;return[o=>e[0]({lengthComputable:i,total:n,loaded:o}),e[1]]},Cs=n=>(...e)=>b.asap(()=>n(...e)),Rd=_e.hasStandardBrowserEnv?((n,e)=>i=>(i=new URL(i,_e.origin),n.protocol===i.protocol&&n.host===i.host&&(e||n.port===i.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,Ad=_e.hasStandardBrowserEnv?{write(n,e,i,o,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(e)}`];b.isNumber(i)&&d.push(`expires=${new Date(i).toUTCString()}`),b.isString(o)&&d.push(`path=${o}`),b.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),b.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let i=0;i<e.length;i++){const o=e[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function zd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Dd(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}const vd=/^https?:(?!\/\/)/i,Fd=/[\t\n\r]/g;function _d(n){let e=0;for(;e<n.length&&n.charCodeAt(e)<=32;)e++;return n.slice(e)}function Od(n){return _d(n).replace(Fd,"")}function ks(n,e){if(typeof n=="string"&&vd.test(Od(n)))throw new D('Invalid URL: missing "//" after protocol',D.ERR_INVALID_URL,e)}function xs(n,e,i,o){ks(e,o);let r=!zd(e);return n&&(r||i===!1)?(ks(n,o),Dd(n,e)):e}const Es=n=>n instanceof Ue?{...n}:n;function tn(n,e){n=n||{},e=e||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,h,m,w){return b.isPlainObject(f)&&b.isPlainObject(h)?b.merge.call({caseless:w},f,h):b.isPlainObject(h)?b.merge({},h):b.isArray(h)?h.slice():h}function r(f,h,m,w){if(b.isUndefined(h)){if(!b.isUndefined(f))return o(void 0,f,m,w)}else return o(f,h,m,w)}function s(f,h){if(!b.isUndefined(h))return o(void 0,h)}function a(f,h){if(b.isUndefined(h)){if(!b.isUndefined(f))return o(void 0,f)}else return o(void 0,h)}function d(f){const h=b.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!b.isUndefined(h))if(b.isPlainObject(h)){if(b.hasOwnProp(h,f))return h[f]}else return;const m=b.hasOwnProp(n,"transitional")?n.transitional:void 0;if(b.isPlainObject(m)&&b.hasOwnProp(m,f))return m[f]}function c(f,h,m){if(b.hasOwnProp(e,m))return o(f,h);if(b.hasOwnProp(n,m))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,h,m)=>r(Es(f),Es(h),m,!0)};return b.forEach(Object.keys({...n,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const m=b.hasOwnProp(u,h)?u[h]:r,w=b.hasOwnProp(n,h)?n[h]:void 0,y=b.hasOwnProp(e,h)?e[h]:void 0,C=m(w,y,h);b.isUndefined(C)&&m!==c||(i[h]=C)}),b.hasOwnProp(e,"validateStatus")&&b.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(b.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Ld=["content-type","content-length"];function Hd(n,e,i){if(i!=="content-only"){n.set(e);return}Object.entries(e||{}).forEach(([o,r])=>{Ld.includes(o.toLowerCase())&&n.set(o,r)})}const Ud=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16)));function Bs(n){const e=tn({},n),i=m=>b.hasOwnProp(e,m)?e[m]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let d=i("headers");const c=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),h=i("url");if(e.headers=d=Ue.from(d),e.url=hs(xs(u,h,f,e),i("params"),i("paramsSerializer")),c){const m=b.getSafeProp(c,"username")||"",w=b.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(m+":"+(w?Ud(w):"")))}catch(y){throw D.from(y,D.ERR_BAD_OPTION_VALUE,n)}}if(b.isFormData(o)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||b.isReactNative(o)?d.setContentType(void 0):b.isFunction(o.getHeaders)&&Hd(d,o.getHeaders(),i("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(b.isFunction(r)&&(r=r(e)),r===!0||r==null&&Rd(e.url))){const w=s&&a&&Ad.read(a);w&&d.set(s,w)}return e}const jd=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=Bs(n);let s=r.data;const a=Ue.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,h,m,w,y;function C(){w&&w(),y&&y(),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 E(){if(!B)return;const k=Ue.from("getAllResponseHeaders"in B&&B.getAllResponseHeaders()),v={data:!d||d==="text"||d==="json"?B.responseText:B.response,status:B.status,statusText:B.statusText,headers:k,config:n,request:B};bs(function(K){i(K),C()},function(K){o(K),C()},v),B=null}"onloadend"in B?B.onloadend=E:B.onreadystatechange=function(){!B||B.readyState!==4||B.status===0&&!(B.responseURL&&B.responseURL.startsWith("file:"))||setTimeout(E)},B.onabort=function(){B&&(o(new D("Request aborted",D.ECONNABORTED,n,B)),C(),B=null)},B.onerror=function(R){const v=R&&R.message?R.message:"Network Error",Z=new D(v,D.ERR_NETWORK,n,B);Z.event=R||null,o(Z),C(),B=null},B.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const v=r.transitional||Po;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),o(new D(R,v.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,n,B)),C(),B=null},s===void 0&&a.setContentType(null),"setRequestHeader"in B&&b.forEach(as(a),function(R,v){B.setRequestHeader(v,R)}),b.isUndefined(r.withCredentials)||(B.withCredentials=!!r.withCredentials),d&&d!=="json"&&(B.responseType=r.responseType),u&&([m,y]=Ai(u,!0),B.addEventListener("progress",m)),c&&B.upload&&([h,w]=Ai(c),B.upload.addEventListener("progress",h),B.upload.addEventListener("loadend",w)),(r.cancelToken||r.signal)&&(f=k=>{B&&(o(!k||k.type?new Zn(null,n,B):k),B.abort(),C(),B=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const N=Id(r.url);if(N&&!_e.protocols.includes(N)){o(new D("Unsupported protocol "+N+":",D.ERR_BAD_REQUEST,n)),C();return}B.send(s||null)})},qd=(n,e)=>{if(n=n?n.filter(Boolean):[],!e&&!n.length)return;const i=new AbortController;let o=!1;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof D?u:new Zn(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,r(new D(`timeout of ${e}ms exceeded`,D.ETIMEDOUT))},e);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=i;return d.unsubscribe=()=>b.asap(a),d},Wd=function*(n,e){let i=n.byteLength;if(i<e){yield n;return}let o=0,r;for(;o<i;)r=o+e,yield n.slice(o,r),o=r},Gd=async function*(n,e){for await(const i of Qd(n))yield*Wd(i,e)},Qd=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:i,value:o}=await e.read();if(i)break;yield o}}finally{await e.cancel()}},$s=(n,e,i,o)=>{const r=Gd(n,e);let s=0,a,d=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let h=f.byteLength;if(i){let m=s+=h;i(m)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},zi=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,Yd=(n,e,i)=>e+2<i&&zi(n.charCodeAt(e+1))&&zi(n.charCodeAt(e+2));function Xd(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const e=n.indexOf(",");if(e<0)return 0;const i=n.slice(5,e),o=n.slice(e+1);if(/;base64/i.test(i)){let a=o.length;const d=o.length;for(let w=0;w<d;w++)if(o.charCodeAt(w)===37&&w+2<d){const y=o.charCodeAt(w+1),C=o.charCodeAt(w+2);zi(y)&&zi(C)&&(a-=2,w+=2)}let c=0,u=d-1;const f=w=>w>=2&&o.charCodeAt(w-2)===37&&o.charCodeAt(w-1)===51&&(o.charCodeAt(w)===68||o.charCodeAt(w)===100);u>=0&&(o.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&c++;const m=Math.floor(a/4)*3-(c||0);return m>0?m:0}let s=0;for(let a=0,d=o.length;a<d;a++){const c=o.charCodeAt(a);if(c===37&&Yd(o,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Do="1.18.1",Ns=64*1024,{isFunction:Di}=b,Zd=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16))),Ms=n=>{if(!b.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Vs=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Jd=n=>{const e=n.indexOf("://");let i=n;return e!==-1&&(i=i.slice(e+3)),i.includes("@")||i.includes(":")},Kd=n=>{const e=b.global!==void 0&&b.global!==null?b.global:globalThis,{ReadableStream:i,TextEncoder:o}=e;n=b.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?Di(r):typeof fetch=="function",c=Di(s),u=Di(a);if(!d)return!1;const f=d&&Di(i),h=d&&(typeof o=="function"?(E=>N=>E.encode(N))(new o):async E=>new Uint8Array(await new s(E).arrayBuffer())),m=c&&f&&Vs(()=>{let E=!1;const N=new s(_e.origin,{body:new i,method:"POST",get duplex(){return E=!0,"half"}}),k=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),E&&!k}),w=u&&f&&Vs(()=>b.isReadableStream(new a("").body)),y={stream:w&&(E=>E.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!y[E]&&(y[E]=(N,k)=>{let R=N&&N[E];if(R)return R.call(N);throw new D(`Response type '${E}' is not supported`,D.ERR_NOT_SUPPORT,k)})});const C=async E=>{if(E==null)return 0;if(b.isBlob(E))return E.size;if(b.isSpecCompliantForm(E))return(await new s(_e.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(b.isArrayBufferView(E)||b.isArrayBuffer(E))return E.byteLength;if(b.isURLSearchParams(E)&&(E=E+""),b.isString(E))return(await h(E)).byteLength},B=async(E,N)=>{const k=b.toFiniteNumber(E.getContentLength());return k??C(N)};return async E=>{let{url:N,method:k,data:R,signal:v,cancelToken:Z,timeout:K,onDownloadProgress:fe,onUploadProgress:ht,responseType:Ye,headers:Ae,withCredentials:ke="same-origin",fetchOptions:fn,maxContentLength:Xe,maxBodyLength:Nt}=Bs(E);const Mt=b.isNumber(Xe)&&Xe>-1,Ot=b.isNumber(Nt)&&Nt>-1,mt=se=>b.hasOwnProp(E,se)?E[se]:void 0;let wt=r||fetch;Ye=Ye?(Ye+"").toLowerCase():"text";let nt=qd([v,Z&&Z.toAbortSignal()],K),we=null;const W=nt&&nt.unsubscribe&&(()=>{nt.unsubscribe()});let He,Vt=null;const ge=()=>new D("Request body larger than maxBodyLength limit",D.ERR_BAD_REQUEST,E,we);try{let se;const We=mt("auth");if(We){const ee=b.getSafeProp(We,"username")||"",Ie=b.getSafeProp(We,"password")||"";se={username:ee,password:Ie}}if(Jd(N)){const ee=new URL(N,_e.origin);if(!se&&(ee.username||ee.password)){const Ie=Ms(ee.username),rt=Ms(ee.password);se={username:Ie,password:rt}}(ee.username||ee.password)&&(ee.username="",ee.password="",N=ee.href)}if(se&&(Ae.delete("authorization"),Ae.set("Authorization","Basic "+btoa(Zd((se.username||"")+":"+(se.password||""))))),Mt&&typeof N=="string"&&N.startsWith("data:")&&Xd(N)>Xe)throw new D("maxContentLength size of "+Xe+" exceeded",D.ERR_BAD_RESPONSE,E,we);if(Ot&&k!=="get"&&k!=="head"){const ee=await C(R);if(typeof ee=="number"&&isFinite(ee)&&(He=ee,ee>Nt))throw ge()}const Ge=Ot&&(b.isReadableStream(R)||b.isStream(R)),Hn=(ee,Ie,rt)=>$s(ee,Ns,st=>{if(Ot&&st>Nt)throw Vt=ge();Ie&&Ie(st)},rt);if(m&&k!=="get"&&k!=="head"&&(ht||Ge)){if(He=He??await B(Ae,R),He!==0||Ge){let ee=new s(N,{method:"POST",body:R,duplex:"half"}),Ie;if(b.isFormData(R)&&(Ie=ee.headers.get("content-type"))&&Ae.setContentType(Ie),ee.body){const[rt,st]=ht&&Ss(He,Ai(Cs(ht)))||[];R=Hn(ee.body,rt,st)}}}else if(Ge&&!c&&f&&k!=="get"&&k!=="head")R=Hn(R);else if(Ge&&c&&!m&&k!=="get"&&k!=="head")throw new D("Stream request bodies are not supported by the current fetch implementation",D.ERR_NOT_SUPPORT,E,we);b.isString(ke)||(ke=ke?"include":"omit");const Ze=c&&"credentials"in s.prototype;if(b.isFormData(R)){const ee=Ae.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ae.delete("content-type")}Ae.set("User-Agent","axios/"+Do,!1);const Lt={...fn,signal:nt,method:k.toUpperCase(),headers:as(Ae.normalize()),body:R,duplex:"half",credentials:Ze?ke:void 0};we=c&&new s(N,Lt);let Ve=await(c?wt(we,fn):wt(N,Lt));const hn=Ue.from(Ve.headers);if(Mt){const ee=b.toFiniteNumber(hn.getContentLength());if(ee!=null&&ee>Xe)throw new D("maxContentLength size of "+Xe+" exceeded",D.ERR_BAD_RESPONSE,E,we)}const be=w&&(Ye==="stream"||Ye==="response");if(w&&Ve.body&&(fe||Mt||be&&W)){const ee={};["status","statusText","headers"].forEach(It=>{ee[It]=Ve[It]});const Ie=b.toFiniteNumber(hn.getContentLength()),[rt,st]=fe&&Ss(Ie,Ai(Cs(fe),!0))||[];let mn=0;const bt=It=>{if(Mt&&(mn=It,mn>Xe))throw new D("maxContentLength size of "+Xe+" exceeded",D.ERR_BAD_RESPONSE,E,we);rt&&rt(It)};Ve=new a($s(Ve.body,Ns,bt,()=>{st&&st(),W&&W()}),ee)}Ye=Ye||"text";let Je=await y[b.findKey(y,Ye)||"text"](Ve,E);if(Mt&&!w&&!be){let ee;if(Je!=null&&(typeof Je.byteLength=="number"?ee=Je.byteLength:typeof Je.size=="number"?ee=Je.size:typeof Je=="string"&&(ee=typeof o=="function"?new o().encode(Je).byteLength:Je.length)),typeof ee=="number"&&ee>Xe)throw new D("maxContentLength size of "+Xe+" exceeded",D.ERR_BAD_RESPONSE,E,we)}return!be&&W&&W(),await new Promise((ee,Ie)=>{bs(ee,Ie,{data:Je,headers:Ue.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:E,request:we})})}catch(se){if(W&&W(),nt&&nt.aborted&&nt.reason instanceof D){const We=nt.reason;throw We.config=E,we&&(We.request=we),se!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),We}if(Vt)throw we&&!Vt.request&&(Vt.request=we),Vt;if(se instanceof D)throw we&&!se.request&&(se.request=we),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const We=new D("Network Error",D.ERR_NETWORK,E,we,se&&se.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),We}throw D.from(se,se&&se.code,E,we,se&&se.response)}}},eu=new Map,Is=n=>{let e=n&&n.env||{};const{fetch:i,Request:o,Response:r}=e,s=[o,r,i];let a=s.length,d=a,c,u,f=eu;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:Kd(e)),f=u;return u};Is();const vo={http:wd,xhr:jd,fetch:{get:Is}};b.forEach(vo,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:e})}});const Ts=n=>`- ${n}`,tu=n=>b.isFunction(n)||n===null||n===!1;function nu(n,e){n=b.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let d;if(r=o,!tu(o)&&(r=vo[(d=String(o)).toLowerCase()],r===void 0))throw new D(`Unknown adapter '${d}'`);if(r&&(b.isFunction(r)||(r=r.get(e))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=i?a.length>1?`since :
17
- `+a.map(Ts).join(`
18
- `):" "+Ts(a[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+d,D.ERR_NOT_SUPPORT)}return r}const Ps={getAdapter:nu,adapters:vo};function Fo(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Zn(null,n)}function Rs(n){return Fo(n),n.headers=Ue.from(n.headers),n.data=zo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ps.getAdapter(n.adapter||Xn.adapter,n)(n).then(function(o){Fo(n),n.response=o;try{o.data=zo.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=Ue.from(o.headers),o},function(o){if(!ws(o)&&(Fo(n),o&&o.response)){n.response=o.response;try{o.response.data=zo.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=Ue.from(o.response.headers)}return Promise.reject(o)})}const vi={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{vi[n]=function(o){return typeof o===n||"a"+(e<1?"n ":" ")+n}});const As={};vi.transitional=function(e,i,o){function r(s,a){return"[Axios v"+Do+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,d)=>{if(e===!1)throw new D(r(a," has been removed"+(i?" in "+i:"")),D.ERR_DEPRECATED);return i&&!As[a]&&(As[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(s,a,d):!0}},vi.spelling=function(e){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function iu(n,e,i){if(typeof n!="object"||n===null)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(e,s)?e[s]:void 0;if(a){const d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new D("option "+s+" must be "+c,D.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new D("Unknown option "+s,D.ERR_BAD_OPTION)}}const Fi={assertOptions:iu,validators:vi},je=Fi.validators;let nn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ms,response:new ms}}async request(e,i){try{return await this._request(e,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
14
+ ***************************************************************************** */var is;(function(n){(function(t){var i=typeof globalThis=="object"?globalThis:typeof ns=="object"?ns:typeof self=="object"?self:typeof this=="object"?this:d(),o=r(n);typeof i.Reflect<"u"&&(o=r(i.Reflect,o)),t(o,i),typeof i.Reflect>"u"&&(i.Reflect=n);function r(c,u){return function(f,m){Object.defineProperty(c,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 d(){return s()||a()}})(function(t,i){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!d&&!c,f={create:d?function(){return bi(Object.create(null))}:c?function(){return bi({__proto__:null})}:function(){return bi({})},has:u?function(B,$){return o.call(B,$)}:function(B,$){return $ in B},get:u?function(B,$){return o.call(B,$)?B[$]:void 0}:function(B,$){return B[$]}},m=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Qn(),w=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Lr(),y=typeof WeakMap=="function"?WeakMap:vr(),S=r?Symbol.for("@reflect-metadata:registry"):void 0,E=wo(),x=Fr(E);function V(B,$,I,_){if(G(I)){if(!qt(B))throw new TypeError;if(!wn($))throw new TypeError;return he(B,$)}else{if(!qt(B))throw new TypeError;if(!we($))throw new TypeError;if(!we(_)&&!G(_)&&!je(_))throw new TypeError;return je(_)&&(_=void 0),I=Je(I),at(B,$,I,_)}}t("decorate",V);function k(B,$){function I(_,Z){if(!we(_))throw new TypeError;if(!G(Z)&&!ke(Z))throw new TypeError;yt(B,$,_,Z)}return I}t("metadata",k);function T(B,$,I,_){if(!we(I))throw new TypeError;return G(_)||(_=Je(_)),yt(B,$,I,_)}t("defineMetadata",T);function M(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),$e(B,$,I)}t("hasMetadata",M);function A(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Pt(B,$,I)}t("hasOwnMetadata",A);function Q(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Tt(B,$,I)}t("getMetadata",Q);function se(B,$,I){if(!we($))throw new TypeError;return G(I)||(I=Je(I)),Ut(B,$,I)}t("getOwnMetadata",se);function _e(B,$){if(!we(B))throw new TypeError;return G($)||($=Je($)),Ct(B,$)}t("getMetadataKeys",_e);function Ne(B,$){if(!we(B))throw new TypeError;return G($)||($=Je($)),it(B,$)}t("getOwnMetadataKeys",Ne);function Se(B,$,I){if(!we($))throw new TypeError;if(G(I)||(I=Je(I)),!we($))throw new TypeError;G(I)||(I=Je(I));var _=Sn($,I,!1);return G(_)?!1:_.OrdinaryDeleteMetadata(B,$,I)}t("deleteMetadata",Se);function he(B,$){for(var I=B.length-1;I>=0;--I){var _=B[I],Z=_($);if(!G(Z)&&!je(Z)){if(!wn(Z))throw new TypeError;$=Z}}return $}function at(B,$,I,_){for(var Z=B.length-1;Z>=0;--Z){var Ve=B[Z],Ie=Ve($,I,_);if(!G(Ie)&&!je(Ie)){if(!we(Ie))throw new TypeError;_=Ie}}return _}function $e(B,$,I){var _=Pt(B,$,I);if(_)return!0;var Z=kt($);return je(Z)?!1:$e(B,Z,I)}function Pt(B,$,I){var _=Sn($,I,!1);return G(_)?!1:Xe(_.OrdinaryHasOwnMetadata(B,$,I))}function Tt(B,$,I){var _=Pt(B,$,I);if(_)return Ut(B,$,I);var Z=kt($);if(!je(Z))return Tt(B,Z,I)}function Ut(B,$,I){var _=Sn($,I,!1);if(!G(_))return _.OrdinaryGetOwnMetadata(B,$,I)}function yt(B,$,I,_){var Z=Sn(I,_,!0);Z.OrdinaryDefineOwnMetadata(B,$,I,_)}function Ct(B,$){var I=it(B,$),_=kt(B);if(_===null)return I;var Z=Ct(_,$);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var Ve=new w,Ie=[],ne=0,O=I;ne<O.length;ne++){var H=O[ne],U=Ve.has(H);U||(Ve.add(H),Ie.push(H))}for(var j=0,te=Z;j<te.length;j++){var H=te[j],U=Ve.has(H);U||(Ve.add(H),Ie.push(H))}return Ie}function it(B,$){var I=Sn(B,$,!1);return I?I.OrdinaryOwnMetadataKeys(B,$):[]}function Ce(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 G(B){return B===void 0}function je(B){return B===null}function Rt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function le(B,$){switch(Ce(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",_=ee(B,s);if(_!==void 0){var Z=_.call(B,I);if(we(Z))throw new TypeError;return Z}return Ye(B)}function Ye(B,$){var I,_;{var Z=B.toString;if(Te(Z)){var _=Z.call(B);if(!we(_))return _}var I=B.valueOf;if(Te(I)){var _=I.call(B);if(!we(_))return _}}throw new TypeError}function Xe(B){return!!B}function Gn(B){return""+B}function Je(B){var $=le(B);return Rt($)?$:Gn($)}function qt(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Te(B){return typeof B=="function"}function wn(B){return typeof B=="function"}function ke(B){switch(Ce(B)){case 3:return!0;case 4:return!0;default:return!1}}function Ke(B,$){return B===$||B!==B&&$!==$}function ee(B,$){var I=B[$];if(I!=null){if(!Te(I))throw new TypeError;return I}}function Re(B){var $=ee(B,a);if(!Te($))throw new TypeError;var I=$.call(B);if(!we(I))throw new TypeError;return I}function lt(B){return B.value}function ct(B){var $=B.next();return $.done?!1:$}function bn(B){var $=B.return;$&&$.call(B)}function kt(B){var $=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||$!==m)return $;var I=B.prototype,_=I&&Object.getPrototypeOf(I);if(_==null||_===Object.prototype)return $;var Z=_.constructor;return typeof Z!="function"||Z===B?$:Z}function Dt(){var B;!G(S)&&typeof i.Reflect<"u"&&!(S in i.Reflect)&&typeof i.Reflect.defineMetadata=="function"&&(B=Or(i.Reflect));var $,I,_,Z=new y,Ve={registerProvider:Ie,getProvider:O,setProvider:U};return Ve;function Ie(j){if(!Object.isExtensible(Ve))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===j:break;case G($):$=j;break;case $===j:break;case G(I):I=j;break;case I===j:break;default:_===void 0&&(_=new w),_.add(j);break}}function ne(j,te){if(!G($)){if($.isProviderFor(j,te))return $;if(!G(I)){if(I.isProviderFor(j,te))return $;if(!G(_))for(var pe=Re(_);;){var be=ct(pe);if(!be)return;var dt=lt(be);if(dt.isProviderFor(j,te))return bn(pe),dt}}}if(!G(B)&&B.isProviderFor(j,te))return B}function O(j,te){var pe=Z.get(j),be;return G(pe)||(be=pe.get(te)),G(be)&&(be=ne(j,te),G(be)||(G(pe)&&(pe=new h,Z.set(j,pe)),pe.set(te,be))),be}function H(j){if(G(j))throw new TypeError;return $===j||I===j||!G(_)&&_.has(j)}function U(j,te,pe){if(!H(pe))throw new Error("Metadata provider not registered.");var be=O(j,te);if(be!==pe){if(!G(be))return!1;var dt=Z.get(j);G(dt)&&(dt=new h,Z.set(j,dt)),dt.set(te,pe)}return!0}}function wo(){var B;return!G(S)&&we(i.Reflect)&&Object.isExtensible(i.Reflect)&&(B=i.Reflect[S]),G(B)&&(B=Dt()),!G(S)&&we(i.Reflect)&&Object.isExtensible(i.Reflect)&&Object.defineProperty(i.Reflect,S,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function Fr(B){var $=new y,I={isProviderFor:function(H,U){var j=$.get(H);return G(j)?!1:j.has(U)},OrdinaryDefineOwnMetadata:Ie,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:Ve,OrdinaryOwnMetadataKeys:ne,OrdinaryDeleteMetadata:O};return E.registerProvider(I),I;function _(H,U,j){var te=$.get(H),pe=!1;if(G(te)){if(!j)return;te=new h,$.set(H,te),pe=!0}var be=te.get(U);if(G(be)){if(!j)return;if(be=new h,te.set(U,be),!B.setProvider(H,U,I))throw te.delete(U),pe&&$.delete(H),new Error("Wrong provider for target.")}return be}function Z(H,U,j){var te=_(U,j,!1);return G(te)?!1:Xe(te.has(H))}function Ve(H,U,j){var te=_(U,j,!1);if(!G(te))return te.get(H)}function Ie(H,U,j,te){var pe=_(j,te,!0);pe.set(H,U)}function ne(H,U){var j=[],te=_(H,U,!1);if(G(te))return j;for(var pe=te.keys(),be=Re(pe),dt=0;;){var bo=ct(be);if(!bo)return j.length=dt,j;var wt=lt(bo);try{j[dt]=wt}catch(Hr){try{bn(be)}finally{throw Hr}}dt++}}function O(H,U,j){var te=_(U,j,!1);if(G(te)||!te.delete(H))return!1;if(te.size===0){var pe=$.get(U);G(pe)||(pe.delete(j),pe.size===0&&$.delete(pe))}return!0}}function Or(B){var $=B.defineMetadata,I=B.hasOwnMetadata,_=B.getOwnMetadata,Z=B.getOwnMetadataKeys,Ve=B.deleteMetadata,Ie=new y,ne={isProviderFor:function(O,H){var U=Ie.get(O);return!G(U)&&U.has(H)?!0:Z(O,H).length?(G(U)&&(U=new w,Ie.set(O,U)),U.add(H),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:Ve};return ne}function Sn(B,$,I){var _=E.getProvider(B,$);if(!G(_))return _;if(I){if(E.setProvider(B,$,x))return x;throw new Error("Illegal state.")}}function Qn(){var B={},$=[],I=function(){function ne(O,H,U){this._index=0,this._keys=O,this._values=H,this._selector=U}return ne.prototype["@@iterator"]=function(){return this},ne.prototype[a]=function(){return this},ne.prototype.next=function(){var O=this._index;if(O>=0&&O<this._keys.length){var H=this._selector(this._keys[O],this._values[O]);return O+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:H,done:!1}}return{value:void 0,done:!0}},ne.prototype.throw=function(O){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),O},ne.prototype.return=function(O){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:O,done:!0}},ne}(),_=function(){function ne(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(ne.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ne.prototype.has=function(O){return this._find(O,!1)>=0},ne.prototype.get=function(O){var H=this._find(O,!1);return H>=0?this._values[H]:void 0},ne.prototype.set=function(O,H){var U=this._find(O,!0);return this._values[U]=H,this},ne.prototype.delete=function(O){var H=this._find(O,!1);if(H>=0){for(var U=this._keys.length,j=H+1;j<U;j++)this._keys[j-1]=this._keys[j],this._values[j-1]=this._values[j];return this._keys.length--,this._values.length--,Ke(O,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},ne.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},ne.prototype.keys=function(){return new I(this._keys,this._values,Z)},ne.prototype.values=function(){return new I(this._keys,this._values,Ve)},ne.prototype.entries=function(){return new I(this._keys,this._values,Ie)},ne.prototype["@@iterator"]=function(){return this.entries()},ne.prototype[a]=function(){return this.entries()},ne.prototype._find=function(O,H){if(!Ke(this._cacheKey,O)){this._cacheIndex=-1;for(var U=0;U<this._keys.length;U++)if(Ke(this._keys[U],O)){this._cacheIndex=U;break}}return this._cacheIndex<0&&H&&(this._cacheIndex=this._keys.length,this._keys.push(O),this._values.push(void 0)),this._cacheIndex},ne}();return _;function Z(ne,O){return ne}function Ve(ne,O){return O}function Ie(ne,O){return[ne,O]}}function Lr(){var B=function(){function $(){this._map=new h}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(I){return this._map.has(I)},$.prototype.add=function(I){return this._map.set(I,I),this},$.prototype.delete=function(I){return this._map.delete(I)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[a]=function(){return this.keys()},$}();return B}function vr(){var B=16,$=f.create(),I=_();return function(){function O(){this._key=_()}return O.prototype.has=function(H){var U=Z(H,!1);return U!==void 0?f.has(U,this._key):!1},O.prototype.get=function(H){var U=Z(H,!1);return U!==void 0?f.get(U,this._key):void 0},O.prototype.set=function(H,U){var j=Z(H,!0);return j[this._key]=U,this},O.prototype.delete=function(H){var U=Z(H,!1);return U!==void 0?delete U[this._key]:!1},O.prototype.clear=function(){this._key=_()},O}();function _(){var O;do O="@@WeakMap@@"+ne();while(f.has($,O));return $[O]=!0,O}function Z(O,H){if(!o.call(O,I)){if(!H)return;Object.defineProperty(O,I,{value:f.create()})}return O[I]}function Ve(O,H){for(var U=0;U<H;++U)O[U]=Math.random()*255|0;return O}function Ie(O){if(typeof Uint8Array=="function"){var H=new Uint8Array(O);return typeof crypto<"u"?crypto.getRandomValues(H):typeof msCrypto<"u"?msCrypto.getRandomValues(H):Ve(H,O),H}return Ve(new Array(O),O)}function ne(){var O=Ie(B);O[6]=O[6]&79|64,O[8]=O[8]&191|128;for(var H="",U=0;U<B;++U){var j=O[U];(U===4||U===6||U===8)&&(H+="-"),j<16&&(H+="0"),H+=j.toString(16).toLowerCase()}return H}}function bi(B){return B.__=void 0,delete B.__,B}})})(is||(is={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function pc(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 gc=new Uint8Array(16);function yc(){return crypto.getRandomValues(gc)}function jt(n,t,i){return crypto.randomUUID?crypto.randomUUID():wc(n)}function wc(n,t,i){var r;n=n||{};const o=n.random??((r=n.rng)==null?void 0:r.call(n))??yc();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,pc(o)}class ve{static UUID(){return jt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function bc(n){var t=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var i=n.shift();n[0]=i+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var r=n[o];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(o>0&&(r=r.replace(/^[\/]+/,"")),o<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function No(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),bc(n)}class ae{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,i,o){try{const r=new URL(t);return i&&(r.port=i.toString()),No(r.toString(),o)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const i=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(i).map((r,s)=>s===0?r.toLowerCase():ae.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,i,o){return t.substring(t.indexOf(i)+2,t.lastIndexOf(o))}static Translit(t,i){const o={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return i&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(d=>o[d]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const i=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(i,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,i){const o=t.toLowerCase().replaceAll(/\s/g,""),r=i.toLowerCase().replaceAll(/\s/g,""),s=ae.Translit(o),a=ae.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(t,i){return ae.StringsEquals(t,i)}static SearchInFields(t,i){let o=!1;for(let r=0;r<i.length;r++)if(ae.SearchIn(i[r],t)){o=!0;break}return o}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,i,o){const r=o??"highlight-text",s=new RegExp(ae.GetVariants(i).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const i=ae.Translit(t);return[t,ae.Capitalize(t),t.toLowerCase(),t.toUpperCase(),i,ae.Capitalize(i),i.toLowerCase(),i.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,i){const o=[2,0,1,1,1,2];return t.length+" "+i[t.length%100>4&&t.length%100<20?2:o[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Zt=class Zt{static BuildClass(t,i){i&&Object.keys(i).forEach(o=>{const r=i[o];if(this.isPrimitive(r))t[o]instanceof Date?t[o]=new Date(r):t[o]=r;else if(r!=null&&!Array.isArray(r))if(t[o]&&t[o].constructor)t[o]=new t[o].constructor(r);else{const s=Reflect.getMetadata(o,t);s&&(t[o]=new s[o](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(o,t);r.length!==0&&!s&&(t[o]=r),s&&(t[o]=r.map(a=>new s[o](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,i,o){Zt.RemoveFromClass(t,i,o)}static RemoveFromClassById(t,i,o){if(!t)return;const r=i.findIndex(s=>s.id===t);if(!(r<0))return Zt.RemoveFromClass(r,i,o),t}static RemoveFromClass(t,i,o){if(t<0)return;const r=i[t].id;r&&o&&o.push(r),i.splice(t,1)}static GetPropertyName(t){const i=new t;return new Proxy(i,{get(o,r){return r}})}static InitClassInstance(t,i){const o=t.constructor(i);return Zt.BuildClass(o),o.id=ve.UUID(),o}static ExistsWithId(t,i){return t.some(o=>o.id===i)}static DeepMap(t){return i=>Array.isArray(i)?i.map(Zt.DeepMap(t)):Object(i)===i?Object.fromEntries(Object.entries(i).map(([o,r])=>[o,Zt.DeepMap(t)(r)])):t(i)}static DeepTrim(t){return this.DeepMap(ae.TrimText)(t)}};l(Zt,"GetClassConstructor",t=>(i,o)=>{const r=Reflect.getMetadata(`property:${o}`,i)||{};r[o]=t,Reflect.defineMetadata(o,r,i)});let v=Zt;class en{constructor(t){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");v.BuildClass(this,t)}static Create(){const t=new en;return t.id=ve.UUID(),t}}class $o{static Setup(t="http://localhost",i="9000",o="api"){this.staticUrl=ae.BuildSafeUrl(t,i,o),this.staticUrl=No(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l($o,"staticUrl","");class Ze{constructor(t){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);v.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${$o.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,i){const o=new Ze;return o.id=i??ve.UUID(),o.originalName=t.name,o.file=t.blob,o.fileSystemPath=ve.UUID(),o}setFile(t){this.id||(this.id=ve.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=ve.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,i){if(t.target){let o="";return i&&(o=`@/assets/img/${i}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:kn&&kn.tagName.toUpperCase()==="SCRIPT"&&kn.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const i=t.split(".");return i[i.length-1]}}class os{constructor(t){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);v.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=ae.Capitalize(this.name),this.surname=ae.Capitalize(this.surname),this.patronymic=ae.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 tn{constructor(t){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");v.BuildClass(this,t)}static Create(){const t=new tn;return t.id=ve.UUID(),t}}class Ii{constructor(t){l(this,"id");l(this,"address");l(this,"description");v.BuildClass(this,t)}}class Mi{constructor(t){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");v.BuildClass(this,t)}static Create(){const t=new Mi;return t.id=ve.UUID(),t}}class Vo{constructor(t){l(this,"id");l(this,"address");l(this,"description");v.BuildClass(this,t)}}let Sc=(Ht=class{},l(Ht,"Phone",tn),l(Ht,"FileInfo",Ze),l(Ht,"Website",Vo),l(Ht,"Email",en),l(Ht,"Human",os),l(Ht,"PostAddress",Ii),l(Ht,"UserAccount",Mi),Ht);var xe=(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))(xe||{});class Pi{constructor(t){l(this,"field","");l(this,"operator",xe.Eq);l(this,"value","");v.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,i){return new Pi({operator:i,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetween(){return this.operator===xe.Btw}isSet(){return this.operator===xe.In}}class Io{constructor(t){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);v.BuildClass(this,t)}static Create(t){const i=new Io;return i.model=t.GetClassName(),i}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Pi.Create(t,i);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(i=>i.eq(t))}}let rs=class ql{constructor(t){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);v.BuildClass(this,t)}static Create(t){const i=new ql;return i.model=t.GetClassName(),i}addWhere(t,i){const o=this.findWhere({field:t,operator:i});if(o)return o;const r=Pi.Create(t,i);return this.wheres.push(r),r}removeWhere(t){const i=this.wheres.findIndex(o=>o.eq(t));i>-1&&this.wheres.splice(i,1)}addJoin(t){const i=this.findJoin({model:t.GetClassName()});if(i)return i;const o=Io.Create(t);return this.joins.push(o),o}findJoin(t){return this.joins.find(i=>i.eq(t))}findWhere(t){return this.wheres.find(i=>i.eq(t))}toRef(){return e.ref(this)}};class zt{static Shuffle(t){for(let i=t.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[t[i],t[o]]=[t[o],t[i]]}}static GenerateNumsRange(t,i,o=1){return Array.from({length:(i-t)/o+1},(r,s)=>t+s*o)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((i,o)=>i.order=o)}static Refill(t,i){t.splice(0,t.length),t.push(...i)}static Eq(t,i){return t.length===i.length&&(t==null?void 0:t.every((o,r)=>t[r]==i[r]))}static SwipeById(t,i,o){const r=t.findIndex(a=>i.id===a.id),s=t.findIndex(a=>o.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,i,o){if(i<0||i>=t.length||o<0||o>=t.length)return;const r=t[i];t[i]=t[o],t[o]=r}static MoveUp(t,i){t[i].order=i-1,t[i-1]&&(t[i-1].order=i),[t[i],t[i-1]]=[t[i-1],t[i]]}static MoveDown(t,i){t[i].order=i+1,t[i+1]&&(t[i+1].order=i),[t[i],t[i+1]]=[t[i+1],t[i]]}}var Ae=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Ae||{}),Cc=Object.defineProperty,kc=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Cc(t,i,r),r};const ss=class ki{constructor(t){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",xe.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",Ae.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");v.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Ae.Join){const i=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===xe.In?i&&zt.Eq(this.set,t.set):i}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Ae.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Ae.String?this.value1===(t==null?void 0:t.value1):this.type===Ae.Join&&this.set.length?zt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",i=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Ae.Boolean?`"boolean":${this.boolean}`:"",d=this.type===Ae.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",c=this.type===Ae.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Ae.Number?`"number":${this.number}`:"",f=this.type===Ae.Set||this.operator===xe.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Ae.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,i,o,r,s,a,d,c,u,f,m].filter(h=>h!=="").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===xe.Eq||this.operator===xe.Gt||this.operator===xe.Lt}isBetweenFilter(){return this.operator===xe.Btw}isSetFilter(){return this.operator===xe.In}static Create(t,i,o){const r=new ki;return r.model=t.GetClassName(),r.col=i??"",r.type=o,r.type===Ae.Number&&(r.value1="0"),r.type===Ae.String&&(r.value1=""),r.type===Ae.Boolean&&(r.value1="false",r.operator=xe.Eq),r}static CreateFilterModelWithJoin(t,i,o,r,s,a,d,c){const u=new ki;return u.id=jt(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=i,u.type=a,d&&(u.joinTableId=d),c&&(u.joinTableIdCol=c),u}static CreateFilterModelWithJoinV2(t,i,o,r,s,a,d){const c=new ki;return c.model=t,c.joinTableModel=o,c.joinTablePk=r,c.joinTableFk=s,c.col=i,c.type=Ae.Join,a&&(c.joinTableId=a),d&&(c.joinTableIdCol=d),c}static OnlyIfSecondModelExists(t,i){const o=new ki;return o.id=jt(),o.model=ae.ToCamelCase(t.GetClassName()),o.joinTableModel=ae.ToCamelCase(i.GetClassName()),o.type=Ae.Join,o}addToSet(...t){t.forEach(i=>{if(this.set.indexOf(i)===-1){this.set.push(i);return}this.set=this.set.filter(o=>o!==i)})}pushToSet(...t){t.forEach(i=>{this.set.indexOf(i)===-1&&this.set.push(i)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,i){if(!t&&!i){this.dropDates();return}if(!i){this.setDate1(t),this.operator=xe.Eq;return}this.setDate2(i),this.operator=xe.Btw}};kc([v.GetClassConstructor(String)],ss.prototype,"set");let Mo=ss;class xc{constructor(){l(this,"operation",xe.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",i=this.column?`"column":"${this.column}"`:"",o=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=o?`"value":"${o}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,i,r,s,a].filter(d=>d!=="").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 Ti{constructor(t){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new xc);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");v.BuildClass(this,t)}setLoadMore(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=xe.Gt,this.cursor.column=i,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(t,i,o){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=xe.Gt,this.cursor.column=i,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,i=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,i,o,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.page=Number(o.get("offset")),this.rowsPerPage=Number(o.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,v.BuildClass(this)}}var ft=(n=>(n.Asc="asc",n.Desc="desc",n))(ft||{});class Ri{constructor(t){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);v.BuildClass(this,t)}static Create(t,i,o=ft.Asc,r,s){const a=new Ri;return a.model=t.GetClassName(),a.col=i??"",a.order=o??ft.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ft.Asc}isDesc(){return this.order===ft.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[t,i,o].toString()}async fromUrlQuery(){const t=window.location.search,i=t.substring(t.indexOf("s=")+2,t.indexOf("|")),o=new URLSearchParams(decodeURIComponent(i));this.model=o.get("model")??"",this.col=o.get("col")??"",this.label=o.get("label")??"",this.default=!!o.get("default"),this.order=o.get("order")??""}asc(){this.order=ft.Asc}desc(){this.order=ft.Desc}}class Di{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(t,i){const o=new Di;return o.model=t.GetClassName(),o.cols=i,o}}var Ec=Object.defineProperty,Xn=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Ec(t,i,r),r};const Nn=(nt=class{constructor(t){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new Ti);l(this,"t",new Di);v.BuildClass(this,t)}static Get(){return this.instance||(this.instance=new nt),this.instance}createFrom(t){const i=new nt(JSON.parse(t));this.f=i.f}clearForHTTP(){const t=new nt(this);return t.f=this.f.map(i=>nt.EmptyEntiries(i)),t.f2=this.f2.map(i=>nt.EmptyEntiries(i)),t.s=this.s.map(i=>nt.EmptyEntiries(i)),t.p=nt.EmptyEntiries(this.p),t.t=nt.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const o=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(o)}findFilterModel(t){return this.f.find(i=>t.id===i.id)}getFirstSortModel(){return 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,i){this.removeF(i),t&&this.setF(t)}removeF(t){const i=this.f.findIndex(o=>o.eq(t));v.RemoveFromClassByIndex(i,this.f)}reset(){this.f=[],this.s=[],this.p=new Ti}resetF(){this.f=[]}},l(nt,"instance"),nt);Xn([v.GetClassConstructor(Mo)],Nn.prototype,"f"),Xn([v.GetClassConstructor(rs)],Nn.prototype,"f2"),Xn([v.GetClassConstructor(Ri)],Nn.prototype,"s"),Xn([v.GetClassConstructor(Ti)],Nn.prototype,"p"),Xn([v.GetClassConstructor(Di)],Nn.prototype,"t");let _t=Nn,Bc=(Wn=class{},l(Wn,"SortModel",Ri),l(Wn,"FilterModel",Mo),l(Wn,"FilterModelV2",rs),l(Wn,"FTSP",_t),Wn);function as(n,t){return function(){return n.apply(t,arguments)}}const{toString:Nc}=Object.prototype,{getPrototypeOf:$n}=Object,{iterator:Zn,toStringTag:ls}=Symbol,Ai=(({hasOwnProperty:n})=>(t,i)=>n.call(t,i))(Object.prototype),Jn=(n,t)=>{let i=n;const o=[];for(;i!=null&&i!==Object.prototype;){if(o.indexOf(i)!==-1)return!1;if(o.push(i),Ai(i,t))return!0;i=$n(i)}return!1},$c=(n,t)=>n!=null&&Jn(n,t)?n[t]:void 0,Po=(n=>t=>{const i=Nc.call(t);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),bt=n=>(n=n.toLowerCase(),t=>Po(t)===n),zi=n=>t=>typeof t===n,{isArray:nn}=Array,Vn=zi("undefined");function In(n){return n!==null&&!Vn(n)&&n.constructor!==null&&!Vn(n.constructor)&&et(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cs=bt("ArrayBuffer");function Vc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&cs(n.buffer),t}const Ic=zi("string"),et=zi("function"),ds=zi("number"),Mn=n=>n!==null&&typeof n=="object",Mc=n=>n===!0||n===!1,_i=n=>{if(!Mn(n))return!1;const t=$n(n);return(t===null||t===Object.prototype||$n(t)===null)&&!Jn(n,ls)&&!Jn(n,Zn)},Pc=n=>{if(!Mn(n)||In(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Tc=bt("Date"),Rc=bt("File"),Dc=n=>!!(n&&typeof n.uri<"u"),Ac=n=>n&&typeof n.getParts<"u",zc=bt("Blob"),_c=bt("FileList"),Fc=n=>Mn(n)&&et(n.pipe);function Oc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Oc(),fs=typeof us.FormData<"u"?us.FormData:void 0,Lc=n=>{if(!n)return!1;if(fs&&n instanceof fs)return!0;const t=$n(n);if(!t||t===Object.prototype||!et(n.append))return!1;const i=Po(n);return i==="formdata"||i==="object"&&et(n.toString)&&n.toString()==="[object FormData]"},vc=bt("URLSearchParams"),[Hc,Uc,qc,jc]=["ReadableStream","Request","Response","Headers"].map(bt),Wc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kn(n,t,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let o,r;if(typeof n!="object"&&(n=[n]),nn(n))for(o=0,r=n.length;o<r;o++)t.call(null,n[o],o,n);else{if(In(n))return;const s=i?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let d;for(o=0;o<a;o++)d=s[o],t.call(null,n[d],d,n)}}function ms(n,t){if(In(n))return null;t=t.toLowerCase();const i=Object.keys(n);let o=i.length,r;for(;o-- >0;)if(r=i[o],t===r.toLowerCase())return r;return null}const on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=n=>!Vn(n)&&n!==on;function To(...n){const{caseless:t,skipUndefined:i}=hs(this)&&this||{},o={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const d=t&&typeof a=="string"&&ms(o,a)||a,c=Ai(o,d)?o[d]:void 0;_i(c)&&_i(s)?o[d]=To(c,s):_i(s)?o[d]=To({},s):nn(s)?o[d]=s.slice():(!i||!Vn(s))&&(o[d]=s)};for(let s=0,a=n.length;s<a;s++){const d=n[s];if(!d||In(d)||(Kn(d,r),typeof d!="object"||nn(d)))continue;const c=Object.getOwnPropertySymbols(d);for(let u=0;u<c.length;u++){const f=c[u];od.call(d,f)&&r(d[f],f)}}return o}const Gc=(n,t,i,{allOwnKeys:o}={})=>(Kn(t,(r,s)=>{i&&et(r)?Object.defineProperty(n,s,{__proto__:null,value:as(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),Qc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Yc=(n,t,i,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),i&&Object.assign(n.prototype,i)},Xc=(n,t,i,o)=>{let r,s,a;const d={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!o||o(a,n,t))&&!d[a]&&(t[a]=n[a],d[a]=!0);n=i!==!1&&$n(n)}while(n&&(!i||i(n,t))&&n!==Object.prototype);return t},Zc=(n,t,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=t.length;const o=n.indexOf(t,i);return o!==-1&&o===i},Jc=n=>{if(!n)return null;if(nn(n))return n;let t=n.length;if(!ds(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=n[t];return i},Kc=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$n(Uint8Array)),ed=(n,t)=>{const o=(n&&n[Zn]).call(n);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},td=(n,t)=>{let i;const o=[];for(;(i=n.exec(t))!==null;)o.push(i);return o},nd=bt("HTMLFormElement"),id=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:od}=Object.prototype,rd=bt("RegExp"),ps=(n,t)=>{const i=Object.getOwnPropertyDescriptors(n),o={};Kn(i,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(o[s]=a||r)}),Object.defineProperties(n,o)},sd=n=>{ps(n,(t,i)=>{if(et(n)&&["arguments","caller","callee"].includes(i))return!1;const o=n[i];if(et(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},ad=(n,t)=>{const i={},o=r=>{r.forEach(s=>{i[s]=!0})};return nn(n)?o(n):o(String(n).split(t)),i},ld=()=>{},cd=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function dd(n){return!!(n&&et(n.append)&&n[ls]==="FormData"&&n[Zn])}const ud=n=>{const t=new WeakSet,i=o=>{if(Mn(o)){if(t.has(o))return;if(In(o))return o;if(!("toJSON"in o)){t.add(o);const r=nn(o)?[]:{};return Kn(o,(s,a)=>{const d=i(s);!Vn(d)&&(r[a]=d)}),t.delete(o),r}}return o};return i(n)},fd=bt("AsyncFunction"),md=n=>n&&(Mn(n)||et(n))&&et(n.then)&&et(n.catch),gs=((n,t)=>n?setImmediate:t?((i,o)=>(on.addEventListener("message",({source:r,data:s})=>{r===on&&s===i&&o.length&&o.shift()()},!1),r=>{o.push(r),on.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",et(on.postMessage)),hd=typeof queueMicrotask<"u"?queueMicrotask.bind(on):typeof process<"u"&&process.nextTick||gs,ys=n=>n!=null&&et(n[Zn]),b={isArray:nn,isArrayBuffer:cs,isBuffer:In,isFormData:Lc,isArrayBufferView:Vc,isString:Ic,isNumber:ds,isBoolean:Mc,isObject:Mn,isPlainObject:_i,isEmptyObject:Pc,isReadableStream:Hc,isRequest:Uc,isResponse:qc,isHeaders:jc,isUndefined:Vn,isDate:Tc,isFile:Rc,isReactNativeBlob:Dc,isReactNative:Ac,isBlob:zc,isRegExp:rd,isFunction:et,isStream:Fc,isURLSearchParams:vc,isTypedArray:Kc,isFileList:_c,forEach:Kn,merge:To,extend:Gc,trim:Wc,stripBOM:Qc,inherits:Yc,toFlatObject:Xc,kindOf:Po,kindOfTest:bt,endsWith:Zc,toArray:Jc,forEachEntry:ed,matchAll:td,isHTMLForm:nd,hasOwnProperty:Ai,hasOwnProp:Ai,hasOwnInPrototypeChain:Jn,getSafeProp:$c,reduceDescriptors:ps,freezeMethods:sd,toObjectSet:ad,toCamelCase:id,noop:ld,toFiniteNumber:cd,findKey:ms,global:on,isContextDefined:hs,isSpecCompliantForm:dd,toJSONObject:ud,isAsyncFn:fd,isThenable:md,setImmediate:gs,asap:hd,isIterable:ys,isSafeIterable:n=>n!=null&&Jn(n,Zn)&&ys(n)},pd=b.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"]),gd=n=>{const t={};let i,o,r;return n&&n.split(`
15
+ `).forEach(function(a){r=a.indexOf(":"),i=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!i||t[i]&&pd[i])&&(i==="set-cookie"?t[i]?t[i].push(o):t[i]=[o]:t[i]=t[i]?t[i]+", "+o:o)}),t};function yd(n){let t=0,i=n.length;for(;t<i;){const o=n.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;i>t;){const o=n.charCodeAt(i-1);if(o!==9&&o!==32)break;i-=1}return t===0&&i===n.length?n:n.slice(t,i)}const wd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ro(n,t){return b.isArray(n)?n.map(i=>Ro(i,t)):yd(String(n).replace(t,""))}const Sd=n=>Ro(n,wd),Cd=n=>Ro(n,bd);function ws(n){const t=Object.create(null);return b.forEach(n.toJSON(),(i,o)=>{t[o]=Cd(i)}),t}const bs=Symbol("internals");function ei(n){return n&&String(n).trim().toLowerCase()}function Fi(n){return n===!1||n==null?n:b.isArray(n)?n.map(Fi):Sd(String(n))}function kd(n){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(n);)t[o[1]]=o[2];return t}const xd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Do(n,t,i,o,r){if(b.isFunction(o))return o.call(this,t,i);if(r&&(t=i),!!b.isString(t)){if(b.isString(o))return t.indexOf(o)!==-1;if(b.isRegExp(o))return o.test(t)}}function Ed(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,o)=>i.toUpperCase()+o)}function Bd(n,t){const i=b.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+i,{__proto__:null,value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}let We=class{constructor(t){t&&this.set(t)}set(t,i,o){const r=this;function s(d,c,u){const f=ei(c);if(!f)return;const m=b.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||c]=Fi(d))}const a=(d,c)=>b.forEach(d,(u,f)=>s(u,f,c));if(b.isPlainObject(t)||t instanceof this.constructor)a(t,i);else if(b.isString(t)&&(t=t.trim())&&!xd(t))a(gd(t),i);else if(b.isObject(t)&&b.isSafeIterable(t)){let d=Object.create(null),c,u;for(const f of t){if(!b.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],b.hasOwnProp(d,u)?(c=d[u],d[u]=b.isArray(c)?[...c,f[1]]:[c,f[1]]):d[u]=f[1]}a(d,i)}else t!=null&&s(i,t,o);return this}get(t,i){if(t=ei(t),t){const o=b.findKey(this,t);if(o){const r=this[o];if(!i)return r;if(i===!0)return kd(r);if(b.isFunction(i))return i.call(this,r,o);if(b.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=ei(t),t){const o=b.findKey(this,t);return!!(o&&this[o]!==void 0&&(!i||Do(this,this[o],o,i)))}return!1}delete(t,i){const o=this;let r=!1;function s(a){if(a=ei(a),a){const d=b.findKey(o,a);d&&(!i||Do(o,o[d],d,i))&&(delete o[d],r=!0)}}return b.isArray(t)?t.forEach(s):s(t),r}clear(t){const i=Object.keys(this);let o=i.length,r=!1;for(;o--;){const s=i[o];(!t||Do(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const i=this,o={};return b.forEach(this,(r,s)=>{const a=b.findKey(o,s);if(a){i[a]=Fi(r),delete i[s];return}const d=t?Ed(s):String(s).trim();d!==s&&delete i[s],i[d]=Fi(r),o[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return b.forEach(this,(o,r)=>{o!=null&&o!==!1&&(i[r]=t&&b.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const o=new this(t);return i.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[bs]=this[bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const d=ei(a);o[d]||(Bd(r,a),o[d]=!0)}return b.isArray(t)?t.forEach(s):s(t),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(We.prototype,({value:n},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[i]=o}}}),b.freezeMethods(We);const Nd="[REDACTED ****]";function $d(n){if(b.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(b.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Vd(n,t){const i=new Set(t.map(s=>String(s).toLowerCase())),o=[],r=s=>{if(s===null||typeof s!="object"||b.isBuffer(s))return s;if(o.indexOf(s)!==-1)return;s instanceof We&&(s=s.toJSON()),o.push(s);let a;if(b.isArray(s))a=[],s.forEach((d,c)=>{const u=r(d);b.isUndefined(u)||(a[c]=u)});else{if(!b.isPlainObject(s)&&$d(s))return o.pop(),s;a=Object.create(null);for(const[d,c]of Object.entries(s)){const u=i.has(d.toLowerCase())?Nd:r(c);b.isUndefined(u)||(a[d]=u)}}return o.pop(),a};return r(n)}let F=class jl extends Error{static from(t,i,o,r,s,a){const d=new jl(t.message,i||t.code,o,r,s);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),a&&Object.assign(d,a),d}constructor(t,i,o,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),o&&(this.config=o),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,i=t&&b.hasOwnProp(t,"redact")?t.redact:void 0,o=b.isArray(i)&&i.length>0?Vd(t,i):b.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",F.ERR_BAD_OPTION="ERR_BAD_OPTION",F.ECONNABORTED="ECONNABORTED",F.ETIMEDOUT="ETIMEDOUT",F.ECONNREFUSED="ECONNREFUSED",F.ERR_NETWORK="ERR_NETWORK",F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",F.ERR_DEPRECATED="ERR_DEPRECATED",F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",F.ERR_BAD_REQUEST="ERR_BAD_REQUEST",F.ERR_CANCELED="ERR_CANCELED",F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",F.ERR_INVALID_URL="ERR_INVALID_URL",F.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Id=null,Ss=100;function Ao(n){return b.isPlainObject(n)||b.isArray(n)}function Cs(n){return b.endsWith(n,"[]")?n.slice(0,-2):n}function zo(n,t,i){return n?n.concat(t).map(function(r,s){return r=Cs(r),!i&&s?"["+r+"]":r}).join(i?".":""):t}function Md(n){return b.isArray(n)&&!n.some(Ao)}const Pd=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function Oi(n,t,i){if(!b.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,i=b.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(V,k){return!b.isUndefined(k[V])});const o=i.metaTokens,r=i.visitor||y,s=i.dots,a=i.indexes,d=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?Ss:i.maxDepth,u=d&&b.isSpecCompliantForm(t),f=[];if(!b.isFunction(r))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(b.isDate(x))return x.toISOString();if(b.isBoolean(x))return x.toString();if(!u&&b.isBlob(x))throw new F("Blob is not supported. Use a Buffer instead.");if(b.isArrayBuffer(x)||b.isTypedArray(x)){if(u&&typeof d=="function")return new d([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new F("Blob is not supported. Use a Buffer instead.",F.ERR_NOT_SUPPORT)}return x}function h(x){if(x>c)throw new F("Object is too deeply nested ("+x+" levels). Max depth: "+c,F.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(x,V){if(c===1/0)return JSON.stringify(x);const k=[];return JSON.stringify(x,function(M,A){if(!b.isObject(A))return A;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(A),h(V+k.length-1),A})}function y(x,V,k){let T=x;if(b.isReactNative(t)&&b.isReactNativeBlob(x))return t.append(zo(k,V,s),m(x)),!1;if(x&&!k&&typeof x=="object"){if(b.endsWith(V,"{}"))V=o?V:V.slice(0,-2),x=w(x,1);else if(b.isArray(x)&&Md(x)||(b.isFileList(x)||b.endsWith(V,"[]"))&&(T=b.toArray(x)))return V=Cs(V),T.forEach(function(A,Q){!(b.isUndefined(A)||A===null)&&t.append(a===!0?zo([V],Q,s):a===null?V:V+"[]",m(A))}),!1}return Ao(x)?!0:(t.append(zo(k,V,s),m(x)),!1)}const S=Object.assign(Pd,{defaultVisitor:y,convertValue:m,isVisitable:Ao});function E(x,V,k=0){if(!b.isUndefined(x)){if(h(k),f.indexOf(x)!==-1)throw new Error("Circular reference detected in "+V.join("."));f.push(x),b.forEach(x,function(M,A){(!(b.isUndefined(M)||M===null)&&r.call(t,M,b.isString(A)?A.trim():A,V,S))===!0&&E(M,V?V.concat(A):[A],k+1)}),f.pop()}}if(!b.isObject(n))throw new TypeError("data must be an object");return E(n),t}function ks(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return t[o]})}function _o(n,t){this._pairs=[],n&&Oi(n,this,t)}const xs=_o.prototype;xs.append=function(t,i){this._pairs.push([t,i])},xs.toString=function(t){const i=t?o=>t.call(this,o,ks):ks;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};function Td(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Es(n,t,i){if(!t)return n;n=n||"";const o=b.isFunction(i)?{serialize:i}:i,r=b.getSafeProp(o,"encode")||Td,s=b.getSafeProp(o,"serialize");let a;if(s?a=s(t,o):a=b.isURLSearchParams(t)?t.toString():new _o(t,o).toString(r),a){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Bs{constructor(){this.handlers=[]}use(t,i,o){return this.handlers.push({fulfilled:t,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){b.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Fo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Rd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_o,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Oo=typeof window<"u"&&typeof document<"u",Lo=typeof navigator=="object"&&navigator||void 0,Dd=Oo&&(!Lo||["ReactNative","NativeScript","NS"].indexOf(Lo.product)<0),Ad=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zd=Oo&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oo,hasStandardBrowserEnv:Dd,hasStandardBrowserWebWorkerEnv:Ad,navigator:Lo,origin:zd},Symbol.toStringTag,{value:"Module"})),...Rd};function _d(n,t){return Oi(n,new He.classes.URLSearchParams,{visitor:function(i,o,r,s){return He.isNode&&b.isBuffer(i)?(this.append(o,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ns=Ss;function $s(n){if(n>Ns)throw new F("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ns,F.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Fd(n){const t=[],i=/\w+|\[(\w*)]/g;let o;for(;(o=i.exec(n))!==null;)$s(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Od(n){const t={},i=Object.keys(n);let o;const r=i.length;let s;for(o=0;o<r;o++)s=i[o],t[s]=n[s];return t}function Vs(n){function t(i,o,r,s){$s(s);let a=i[s++];if(a==="__proto__")return!0;const d=Number.isFinite(+a),c=s>=i.length;return a=!a&&b.isArray(r)?r.length:a,c?(b.hasOwnProp(r,a)?r[a]=b.isArray(r[a])?r[a].concat(o):[r[a],o]:r[a]=o,!d):((!b.hasOwnProp(r,a)||!b.isObject(r[a]))&&(r[a]=[]),t(i,o,r[a],s)&&b.isArray(r[a])&&(r[a]=Od(r[a])),!d)}if(b.isFormData(n)&&b.isFunction(n.entries)){const i={};return b.forEachEntry(n,(o,r)=>{t(Fd(o),r,i,0)}),i}return null}const Pn=(n,t)=>n!=null&&b.hasOwnProp(n,t)?n[t]:void 0;function Ld(n,t,i){if(b.isString(n))try{return(t||JSON.parse)(n),b.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(n)}const ti={transitional:Fo,adapter:["xhr","http","fetch"],transformRequest:[function(t,i){const o=i.getContentType()||"",r=o.indexOf("application/json")>-1,s=b.isObject(t);if(s&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return r?JSON.stringify(Vs(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(s){const c=Pn(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return _d(t,c).toString();if((d=b.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=Pn(this,"env"),f=u&&u.FormData;return Oi(d?{"files[]":t}:t,f&&new f,c)}}return s||r?(i.setContentType("application/json",!1),Ld(t)):t}],transformResponse:[function(t){const i=Pn(this,"transitional")||ti.transitional,o=i&&i.forcedJSONParsing,r=Pn(this,"responseType"),s=r==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(o&&!r||s)){const d=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(t,Pn(this,"parseReviver"))}catch(c){if(d)throw c.name==="SyntaxError"?F.from(c,F.ERR_BAD_RESPONSE,this,null,Pn(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch","query"],n=>{ti.headers[n]={}});function vo(n,t){const i=this||ti,o=t||i,r=We.from(o.headers);let s=o.data;return b.forEach(n,function(d){s=d.call(i,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Is(n){return!!(n&&n.__CANCEL__)}let ni=class extends F{constructor(t,i,o){super(t??"canceled",F.ERR_CANCELED,i,o),this.name="CanceledError",this.__CANCEL__=!0}};function Ms(n,t,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):t(new F("Request failed with status code "+i.status,i.status>=400&&i.status<500?F.ERR_BAD_REQUEST:F.ERR_BAD_RESPONSE,i.config,i.request,i))}function vd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Hd(n,t){n=n||10;const i=new Array(n),o=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=o[s];a||(a=u),i[r]=c,o[r]=u;let m=s,h=0;for(;m!==r;)h+=i[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const w=f&&u-f;return w?Math.round(h*1e3/w):void 0}}function Ud(n,t){let i=0,o=1e3/t,r,s;const a=(u,f=Date.now())=>{i=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),m=f-i;m>=o?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-m)))},()=>r&&a(r)]}const Li=(n,t,i=3)=>{let o=0;const r=Hd(50,250);return Ud(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,d=s.lengthComputable?s.total:void 0,c=d!=null?Math.min(a,d):a,u=Math.max(0,c-o),f=r(u);o=Math.max(o,c);const m={loaded:c,total:d,progress:d?c/d:void 0,bytes:u,rate:f||void 0,estimated:f&&d?(d-c)/f:void 0,event:s,lengthComputable:d!=null,[t?"download":"upload"]:!0};n(m)},i)},Ps=(n,t)=>{const i=n!=null;return[o=>t[0]({lengthComputable:i,total:n,loaded:o}),t[1]]},Ts=n=>(...t)=>b.asap(()=>n(...t)),qd=He.hasStandardBrowserEnv?((n,t)=>i=>(i=new URL(i,He.origin),n.protocol===i.protocol&&n.host===i.host&&(t||n.port===i.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,jd=He.hasStandardBrowserEnv?{write(n,t,i,o,r,s,a){if(typeof document>"u")return;const d=[`${n}=${encodeURIComponent(t)}`];b.isNumber(i)&&d.push(`expires=${new Date(i).toUTCString()}`),b.isString(o)&&d.push(`path=${o}`),b.isString(r)&&d.push(`domain=${r}`),s===!0&&d.push("secure"),b.isString(a)&&d.push(`SameSite=${a}`),document.cookie=d.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let i=0;i<t.length;i++){const o=t[i].replace(/^\s+/,""),r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===n)try{return decodeURIComponent(o.slice(r+1))}catch{return o.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Wd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Gd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Qd=/^https?:(?!\/\/)/i,Yd=/[\t\n\r]/g;function Xd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function Zd(n){return Xd(n).replace(Yd,"")}function Rs(n,t){if(typeof n=="string"&&Qd.test(Zd(n)))throw new F('Invalid URL: missing "//" after protocol',F.ERR_INVALID_URL,t)}function Ds(n,t,i,o){Rs(t,o);let r=!Wd(t);return n&&(r||i===!1)?(Rs(n,o),Gd(n,t)):t}const As=n=>n instanceof We?{...n}:n;function rn(n,t){n=n||{},t=t||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(f,m,h,w){return b.isPlainObject(f)&&b.isPlainObject(m)?b.merge.call({caseless:w},f,m):b.isPlainObject(m)?b.merge({},m):b.isArray(m)?m.slice():m}function r(f,m,h,w){if(b.isUndefined(m)){if(!b.isUndefined(f))return o(void 0,f,h,w)}else return o(f,m,h,w)}function s(f,m){if(!b.isUndefined(m))return o(void 0,m)}function a(f,m){if(b.isUndefined(m)){if(!b.isUndefined(f))return o(void 0,f)}else return o(void 0,m)}function d(f){const m=b.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!b.isUndefined(m))if(b.isPlainObject(m)){if(b.hasOwnProp(m,f))return m[f]}else return;const h=b.hasOwnProp(n,"transitional")?n.transitional:void 0;if(b.isPlainObject(h)&&b.hasOwnProp(h,f))return h[f]}function c(f,m,h){if(b.hasOwnProp(t,h))return o(f,m);if(b.hasOwnProp(n,h))return o(void 0,f)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,m,h)=>r(As(f),As(m),h,!0)};return b.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=b.hasOwnProp(u,m)?u[m]:r,w=b.hasOwnProp(n,m)?n[m]:void 0,y=b.hasOwnProp(t,m)?t[m]:void 0,S=h(w,y,m);b.isUndefined(S)&&h!==c||(i[m]=S)}),b.hasOwnProp(t,"validateStatus")&&b.isUndefined(t.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(b.hasOwnProp(n,"validateStatus")?i.validateStatus=o(void 0,n.validateStatus):delete i.validateStatus),i}const Jd=["content-type","content-length"];function Kd(n,t,i){if(i!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,r])=>{Jd.includes(o.toLowerCase())&&n.set(o,r)})}const eu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16)));function zs(n){const t=rn({},n),i=h=>b.hasOwnProp(t,h)?t[h]:void 0,o=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),a=i("xsrfCookieName");let d=i("headers");const c=i("auth"),u=i("baseURL"),f=i("allowAbsoluteUrls"),m=i("url");if(t.headers=d=We.from(d),t.url=Es(Ds(u,m,f,t),i("params"),i("paramsSerializer")),c){const h=b.getSafeProp(c,"username")||"",w=b.getSafeProp(c,"password")||"";try{d.set("Authorization","Basic "+btoa(h+":"+(w?eu(w):"")))}catch(y){throw F.from(y,F.ERR_BAD_OPTION_VALUE,n)}}if(b.isFormData(o)&&(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv||b.isReactNative(o)?d.setContentType(void 0):b.isFunction(o.getHeaders)&&Kd(d,o.getHeaders(),i("formDataHeaderPolicy"))),He.hasStandardBrowserEnv&&(b.isFunction(r)&&(r=r(t)),r===!0||r==null&&qd(t.url))){const w=s&&a&&jd.read(a);w&&d.set(s,w)}return t}const tu=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(i,o){const r=zs(n);let s=r.data;const a=We.from(r.headers).normalize();let{responseType:d,onUploadProgress:c,onDownloadProgress:u}=r,f,m,h,w,y;function S(){w&&w(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function x(){if(!E)return;const k=We.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),M={data:!d||d==="text"||d==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:k,config:n,request:E};Ms(function(Q){i(Q),S()},function(Q){o(Q),S()},M),E=null}"onloadend"in E?E.onloadend=x:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(x)},E.onabort=function(){E&&(o(new F("Request aborted",F.ECONNABORTED,n,E)),S(),E=null)},E.onerror=function(T){const M=T&&T.message?T.message:"Network Error",A=new F(M,F.ERR_NETWORK,n,E);A.event=T||null,o(A),S(),E=null},E.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||Fo;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),o(new F(T,M.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,n,E)),S(),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&b.forEach(ws(a),function(T,M){E.setRequestHeader(M,T)}),b.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),d&&d!=="json"&&(E.responseType=r.responseType),u&&([h,y]=Li(u,!0),E.addEventListener("progress",h)),c&&E.upload&&([m,w]=Li(c),E.upload.addEventListener("progress",m),E.upload.addEventListener("loadend",w)),(r.cancelToken||r.signal)&&(f=k=>{E&&(o(!k||k.type?new ni(null,n,E):k),E.abort(),S(),E=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const V=vd(r.url);if(V&&!He.protocols.includes(V)){o(new F("Unsupported protocol "+V+":",F.ERR_BAD_REQUEST,n)),S();return}E.send(s||null)})},nu=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const i=new AbortController;let o=!1;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof F?u:new ni(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new F(`timeout of ${t}ms exceeded`,F.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r,{once:!0}));const{signal:d}=i;return d.unsubscribe=()=>b.asap(a),d},iu=function*(n,t){let i=n.byteLength;if(i<t){yield n;return}let o=0,r;for(;o<i;)r=o+t,yield n.slice(o,r),o=r},ou=async function*(n,t){for await(const i of ru(n))yield*iu(i,t)},ru=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:i,value:o}=await t.read();if(i)break;yield o}}finally{await t.cancel()}},_s=(n,t,i,o)=>{const r=ou(n,t);let s=0,a,d=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await r.next();if(u){d(),c.close();return}let m=f.byteLength;if(i){let h=s+=m;i(h)}c.enqueue(new Uint8Array(f))}catch(u){throw d(u),u}},cancel(c){return d(c),r.return()}},{highWaterMark:2})},vi=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,su=(n,t,i)=>t+2<i&&vi(n.charCodeAt(t+1))&&vi(n.charCodeAt(t+2));function au(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const i=n.slice(5,t),o=n.slice(t+1);if(/;base64/i.test(i)){let a=o.length;const d=o.length;for(let w=0;w<d;w++)if(o.charCodeAt(w)===37&&w+2<d){const y=o.charCodeAt(w+1),S=o.charCodeAt(w+2);vi(y)&&vi(S)&&(a-=2,w+=2)}let c=0,u=d-1;const f=w=>w>=2&&o.charCodeAt(w-2)===37&&o.charCodeAt(w-1)===51&&(o.charCodeAt(w)===68||o.charCodeAt(w)===100);u>=0&&(o.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(o.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(a/4)*3-(c||0);return h>0?h:0}let s=0;for(let a=0,d=o.length;a<d;a++){const c=o.charCodeAt(a);if(c===37&&su(o,a,d))s+=1,a+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&a+1<d){const u=o.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Ho="1.18.1",Fs=64*1024,{isFunction:Hi}=b,lu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,i)=>String.fromCharCode(parseInt(i,16))),Os=n=>{if(!b.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Ls=(n,...t)=>{try{return!!n(...t)}catch{return!1}},cu=n=>{const t=n.indexOf("://");let i=n;return t!==-1&&(i=i.slice(t+3)),i.includes("@")||i.includes(":")},du=n=>{const t=b.global!==void 0&&b.global!==null?b.global:globalThis,{ReadableStream:i,TextEncoder:o}=t;n=b.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,d=r?Hi(r):typeof fetch=="function",c=Hi(s),u=Hi(a);if(!d)return!1;const f=d&&Hi(i),m=d&&(typeof o=="function"?(x=>V=>x.encode(V))(new o):async x=>new Uint8Array(await new s(x).arrayBuffer())),h=c&&f&&Ls(()=>{let x=!1;const V=new s(He.origin,{body:new i,method:"POST",get duplex(){return x=!0,"half"}}),k=V.headers.has("Content-Type");return V.body!=null&&V.body.cancel(),x&&!k}),w=u&&f&&Ls(()=>b.isReadableStream(new a("").body)),y={stream:w&&(x=>x.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!y[x]&&(y[x]=(V,k)=>{let T=V&&V[x];if(T)return T.call(V);throw new F(`Response type '${x}' is not supported`,F.ERR_NOT_SUPPORT,k)})});const S=async x=>{if(x==null)return 0;if(b.isBlob(x))return x.size;if(b.isSpecCompliantForm(x))return(await new s(He.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(b.isArrayBufferView(x)||b.isArrayBuffer(x))return x.byteLength;if(b.isURLSearchParams(x)&&(x=x+""),b.isString(x))return(await m(x)).byteLength},E=async(x,V)=>{const k=b.toFiniteNumber(x.getContentLength());return k??S(V)};return async x=>{let{url:V,method:k,data:T,signal:M,cancelToken:A,timeout:Q,onDownloadProgress:se,onUploadProgress:_e,responseType:Ne,headers:Se,withCredentials:he="same-origin",fetchOptions:at,maxContentLength:$e,maxBodyLength:Pt}=zs(x);const Tt=b.isNumber($e)&&$e>-1,Ut=b.isNumber(Pt)&&Pt>-1,yt=le=>b.hasOwnProp(x,le)?x[le]:void 0;let Ct=r||fetch;Ne=Ne?(Ne+"").toLowerCase():"text";let it=nu([M,A&&A.toAbortSignal()],Q),Ce=null;const G=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let je,Rt=null;const we=()=>new F("Request body larger than maxBodyLength limit",F.ERR_BAD_REQUEST,x,Ce);try{let le;const Ye=yt("auth");if(Ye){const ee=b.getSafeProp(Ye,"username")||"",Re=b.getSafeProp(Ye,"password")||"";le={username:ee,password:Re}}if(cu(V)){const ee=new URL(V,He.origin);if(!le&&(ee.username||ee.password)){const Re=Os(ee.username),lt=Os(ee.password);le={username:Re,password:lt}}(ee.username||ee.password)&&(ee.username="",ee.password="",V=ee.href)}if(le&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(lu((le.username||"")+":"+(le.password||""))))),Tt&&typeof V=="string"&&V.startsWith("data:")&&au(V)>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce);if(Ut&&k!=="get"&&k!=="head"){const ee=await S(T);if(typeof ee=="number"&&isFinite(ee)&&(je=ee,ee>Pt))throw we()}const Xe=Ut&&(b.isReadableStream(T)||b.isStream(T)),Gn=(ee,Re,lt)=>_s(ee,Fs,ct=>{if(Ut&&ct>Pt)throw Rt=we();Re&&Re(ct)},lt);if(h&&k!=="get"&&k!=="head"&&(_e||Xe)){if(je=je??await E(Se,T),je!==0||Xe){let ee=new s(V,{method:"POST",body:T,duplex:"half"}),Re;if(b.isFormData(T)&&(Re=ee.headers.get("content-type"))&&Se.setContentType(Re),ee.body){const[lt,ct]=_e&&Ps(je,Li(Ts(_e)))||[];T=Gn(ee.body,lt,ct)}}}else if(Xe&&!c&&f&&k!=="get"&&k!=="head")T=Gn(T);else if(Xe&&c&&!h&&k!=="get"&&k!=="head")throw new F("Stream request bodies are not supported by the current fetch implementation",F.ERR_NOT_SUPPORT,x,Ce);b.isString(he)||(he=he?"include":"omit");const Je=c&&"credentials"in s.prototype;if(b.isFormData(T)){const ee=Se.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+Ho,!1);const qt={...at,signal:it,method:k.toUpperCase(),headers:ws(Se.normalize()),body:T,duplex:"half",credentials:Je?he:void 0};Ce=c&&new s(V,qt);let Te=await(c?Ct(Ce,at):Ct(V,qt));const wn=We.from(Te.headers);if(Tt){const ee=b.toFiniteNumber(wn.getContentLength());if(ee!=null&&ee>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce)}const ke=w&&(Ne==="stream"||Ne==="response");if(w&&Te.body&&(se||Tt||ke&&G)){const ee={};["status","statusText","headers"].forEach(Dt=>{ee[Dt]=Te[Dt]});const Re=b.toFiniteNumber(wn.getContentLength()),[lt,ct]=se&&Ps(Re,Li(Ts(se),!0))||[];let bn=0;const kt=Dt=>{if(Tt&&(bn=Dt,bn>$e))throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce);lt&&lt(Dt)};Te=new a(_s(Te.body,Fs,kt,()=>{ct&&ct(),G&&G()}),ee)}Ne=Ne||"text";let Ke=await y[b.findKey(y,Ne)||"text"](Te,x);if(Tt&&!w&&!ke){let ee;if(Ke!=null&&(typeof Ke.byteLength=="number"?ee=Ke.byteLength:typeof Ke.size=="number"?ee=Ke.size:typeof Ke=="string"&&(ee=typeof o=="function"?new o().encode(Ke).byteLength:Ke.length)),typeof ee=="number"&&ee>$e)throw new F("maxContentLength size of "+$e+" exceeded",F.ERR_BAD_RESPONSE,x,Ce)}return!ke&&G&&G(),await new Promise((ee,Re)=>{Ms(ee,Re,{data:Ke,headers:We.from(Te.headers),status:Te.status,statusText:Te.statusText,config:x,request:Ce})})}catch(le){if(G&&G(),it&&it.aborted&&it.reason instanceof F){const Ye=it.reason;throw Ye.config=x,Ce&&(Ye.request=Ce),le!==Ye&&Object.defineProperty(Ye,"cause",{__proto__:null,value:le,writable:!0,enumerable:!1,configurable:!0}),Ye}if(Rt)throw Ce&&!Rt.request&&(Rt.request=Ce),Rt;if(le instanceof F)throw Ce&&!le.request&&(le.request=Ce),le;if(le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)){const Ye=new F("Network Error",F.ERR_NETWORK,x,Ce,le&&le.response);throw Object.defineProperty(Ye,"cause",{__proto__:null,value:le.cause||le,writable:!0,enumerable:!1,configurable:!0}),Ye}throw F.from(le,le&&le.code,x,Ce,le&&le.response)}}},uu=new Map,vs=n=>{let t=n&&n.env||{};const{fetch:i,Request:o,Response:r}=t,s=[o,r,i];let a=s.length,d=a,c,u,f=uu;for(;d--;)c=s[d],u=f.get(c),u===void 0&&f.set(c,u=d?new Map:du(t)),f=u;return u};vs();const Uo={http:Id,xhr:tu,fetch:{get:vs}};b.forEach(Uo,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Hs=n=>`- ${n}`,fu=n=>b.isFunction(n)||n===null||n===!1;function mu(n,t){n=b.isArray(n)?n:[n];const{length:i}=n;let o,r;const s={};for(let a=0;a<i;a++){o=n[a];let d;if(r=o,!fu(o)&&(r=Uo[(d=String(o)).toLowerCase()],r===void 0))throw new F(`Unknown adapter '${d}'`);if(r&&(b.isFunction(r)||(r=r.get(t))))break;s[d||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let d=i?a.length>1?`since :
17
+ `+a.map(Hs).join(`
18
+ `):" "+Hs(a[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+d,F.ERR_NOT_SUPPORT)}return r}const Us={getAdapter:mu,adapters:Uo};function qo(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ni(null,n)}function qs(n){return qo(n),n.headers=We.from(n.headers),n.data=vo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Us.getAdapter(n.adapter||ti.adapter,n)(n).then(function(o){qo(n),n.response=o;try{o.data=vo.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=We.from(o.headers),o},function(o){if(!Is(o)&&(qo(n),o&&o.response)){n.response=o.response;try{o.response.data=vo.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=We.from(o.response.headers)}return Promise.reject(o)})}const Ui={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ui[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const js={};Ui.transitional=function(t,i,o){function r(s,a){return"[Axios v"+Ho+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,d)=>{if(t===!1)throw new F(r(a," has been removed"+(i?" in "+i:"")),F.ERR_DEPRECATED);return i&&!js[a]&&(js[a]=!0,console.warn(r(a," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(s,a,d):!0}},Ui.spelling=function(t){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function hu(n,t,i){if(typeof n!="object"||n===null)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let r=o.length;for(;r-- >0;){const s=o[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const d=n[s],c=d===void 0||a(d,s,n);if(c!==!0)throw new F("option "+s+" must be "+c,F.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}}const qi={assertOptions:hu,validators:Ui},Ge=qi.validators;let sn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Bs,response:new Bs}}async request(t,i){try{return await this._request(t,i)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
19
19
  `);return a===-1?"":r.stack.slice(a+1)})();try{if(!o.stack)o.stack=s;else if(s){const a=s.indexOf(`
20
20
  `),d=a===-1?-1:s.indexOf(`
21
21
  `,a+1),c=d===-1?"":s.slice(d+1);String(o.stack).endsWith(c)||(o.stack+=`
22
- `+s)}}catch{}}throw o}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=tn(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&Fi.assertOptions(o,{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&&(b.isFunction(r)?i.paramsSerializer={serialize:r}:Fi.assertOptions(r,{encode:je.function,serialize:je.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Fi.assertOptions(i,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&b.merge(s.common,s[i.method]);s&&b.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete s[y]}),i.headers=Ue.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(C){if(typeof C.runWhen=="function"&&C.runWhen(i)===!1)return;c=c&&C.synchronous;const B=i.transitional||Po;B&&B.legacyInterceptorReqResOrdering?d.unshift(C.fulfilled,C.rejected):d.push(C.fulfilled,C.rejected)});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let f,h=0,m;if(!c){const y=[Rs.bind(this),void 0];for(y.unshift(...d),y.push(...u),m=y.length,f=Promise.resolve(i);h<m;)f=f.then(y[h++],y[h++]);return f}m=d.length;let w=i;for(;h<m;){const y=d[h++],C=d[h++];try{w=y(w)}catch(B){C.call(this,B);break}}try{f=Rs.call(this,w)}catch(y){return Promise.reject(y)}for(h=0,m=u.length;h<m;)f=f.then(u[h++],u[h++]);return f}getUri(e){e=tn(this.defaults,e);const i=xs(e.baseURL,e.url,e.allowAbsoluteUrls,e);return hs(i,e.params,e.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(e){nn.prototype[e]=function(i,o){return this.request(tn(o||{},{method:e,url:i,data:o&&b.hasOwnProp(o,"data")?o.data:void 0}))}}),b.forEach(["post","put","patch","query"],function(e){function i(o){return function(s,a,d){return this.request(tn(d||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}nn.prototype[e]=i(),e!=="query"&&(nn.prototype[e+"Form"]=i(!0))});let ou=class zl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(d=>{o.subscribe(d),s=d}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,d){o.reason||(o.reason=new Zn(s,a,d),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const e=new AbortController,i=o=>{e.abort(o)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new zl(function(r){e=r}),cancel:e}}};function ru(n){return function(i){return n.apply(null,i)}}function su(n){return b.isObject(n)&&n.isAxiosError===!0}const _o={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(_o).forEach(([n,e])=>{_o[e]=n});function zs(n){const e=new nn(n),i=Xr(nn.prototype.request,e);return b.extend(i,nn.prototype,e,{allOwnKeys:!0}),b.extend(i,e,null,{allOwnKeys:!0}),i.create=function(r){return zs(tn(n,r))},i}const xe=zs(Xn);xe.Axios=nn,xe.CanceledError=Zn,xe.CancelToken=ou,xe.isCancel=ws,xe.VERSION=Do,xe.toFormData=Ri,xe.AxiosError=D,xe.Cancel=xe.CanceledError,xe.all=function(e){return Promise.all(e)},xe.spread=ru,xe.isAxiosError=su,xe.mergeConfig=tn,xe.AxiosHeaders=Ue,xe.formToJSON=n=>ys(b.isHTMLForm(n)?new FormData(n):n),xe.getAdapter=Ps.getAdapter,xe.HttpStatusCode=_o,xe.default=xe;const{Axios:Uw,AxiosError:jw,CanceledError:qw,isCancel:Ww,CancelToken:Gw,VERSION:Qw,all:Yw,Cancel:Xw,isAxiosError:Zw,spread:Jw,toFormData:Kw,AxiosHeaders:eb,HttpStatusCode:tb,formToJSON:nb,getAdapter:ib,mergeConfig:ob,create:rb}=xe;var Jn=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(Jn||{});const Kn=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function e(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function i(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function o(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}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 d(c){if(!n())return;const u=Kn.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:e,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:d}})();class Oo{constructor(e){l(this,"code",400);l(this,"err","");_.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,i){const o=e.config;if(e.response){if(e.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=Kn.getAccessToken(),e.config.headers.token=Kn.getAccessToken(),e.config.baseURL=void 0,i.request(o);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){Sn.Error("Неверный логин или пароль");return}Sn.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const r=new Oo(e.response.data).getErr();r&&Sn.Error(r)}return Promise.reject(e)}}}const Nn=xe.create();Nn.interceptors.response.use(n=>n,async n=>await Oo.Handle(n,Nn));class ei{static async Get(e,i,o){return await Nn({method:Jn.GET,url:e,headers:i,responseType:o})}static async Post(e,i,o,r){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.POST,url:e,headers:i,responseType:o,data:r})}static async Put(e,i,o){return i["Content-Type"]="multipart/form-data",await Nn({method:Jn.PUT,url:e,headers:i,data:o})}static async Delete(e,i){return await Nn({method:Jn.DELETE,url:e,headers:i})}}class _i{constructor(e){l(this,"name","");_.BuildClass(this,e)}static Set(){}static Get(e,i){const o=sessionStorage.getItem(e);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),d=s.getTime()-a.getTime();return Math.round(d/6e4)>(i||10)?null:r.data}else return null}static async TryGet(e,i,o){let r;return r=_i.Get(e,o),r||(r=await i()),r}}var Lo=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Lo||{}),Ds=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Ds||{});const pe=class pe{static Setup(e="http://localhost",i,o="api"){this.baseUrl=re.BuildSafeUrl(e,i,o),this.host=e,this.apiVersion=o}static newWebSocket(e){const i=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(i)}static download(e,i){const o=pe.getDownloadFileName(e,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(e,i){if(e)return e;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(e){const i=Ct.Get(lt.AccessToken);return e||(e=pe.headers),i&&(e[Lo.Token]=i),e??pe.headers}static returnResponse(e,i){if(i)return e!=null&&e.isBlob?pe.download(e.downloadFileName,i):i.data}static async Get(e){return pe.returnResponse(e,await ei.Get(pe.buildUrl((e==null?void 0:e.query)??""),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return pe.returnResponse(e,await ei.Post(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.getResponseType(e.isBlob),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return pe.returnResponse(e,await ei.Put(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers),pe.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return pe.returnResponse(e,await ei.Delete(pe.buildUrl(e==null?void 0:e.query),pe.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:i}=e;return new EventSource(pe.buildUrl(i))}static buildUrl(e=""){try{return So(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,i){const o=new FormData;if(o.append("form",JSON.stringify(e)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};l(pe,"baseUrl",""),l(pe,"apiVersion","api"),l(pe,"host",""),l(pe,"headers",{[Lo.ContentType]:Ds.ApplicationJson});let Ce=pe;const A=(n,e)=>{const i=n.__vccOpts||n;for(const[o,r]of e)i[o]=r;return i},au={},lu={style:{"text-align":"center"}};function cu(n,e){return t.openBlock(),t.createElementBlock("div",lu,[...e[0]||(e[0]=[t.createElementVNode("h1",null,"Страница не найдена",-1)])])}const vs=A(au,[["render",cu]]),du=[{path:"/:pathMatch(.*)*",name:"NotFound",component:vs}],ft=class ft{static Setup(e,i=""){this.router=e,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(du)}static Get(){return this.router}static AddRoutes(e){e.forEach(i=>{this.Get().addRoute(i)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return ft.GetStringParam("id")}static Slug(){return ft.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ft.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const i=this.Get().resolve({path:e});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const e=(i=ft.Route())==null?void 0:i.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let i=e;i[0]==="/"&&(i=e.substring(1)),await ft.To(`/admin/${i}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var i;return(i=this.Route())==null?void 0:i.params[e]}static SetQueryParam(e,i){const o=new URL(window.location);o.searchParams.set(e,String(i)),history.replaceState(null,"",o)}static Resolve(e){return this.Get().resolve(e)}};l(ft,"router"),l(ft,"title",""),l(ft,"ChangeDocumentTitle",(e="")=>{let i=ft.Route().meta.title??e;i&&(i=" | "+i),document.title=ft.title+i});let kt=ft;class ce{constructor(e,i){l(this,"items",t.reactive([]));l(this,"item");l(this,"options",t.reactive([]));l(this,"count",t.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",t.ref(""));this.classConstructor=e,this.item=t.reactive(new this.classConstructor),this.url=i}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",i="id"){const o=`${this.getUrl()}/options/${e}/${i}`;try{const r=await Ce.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(e){try{let i;const o=Ce.Get;e&&e.withCache?i=await _i.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(e){try{e||(e=kt.Id()),this.Set(await Ce.Get({query:this.getUrl(e)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(e){try{e||(e=kt.Slug()),this.Set(await T.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(e){var i;try{const r=((e==null?void 0:e.ftsp)??Rt.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((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(e){try{const i=e??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await Ce.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(e){const i=await this.Create(e);this.Set(i)}async CreateMany(e){if(!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(e){try{const i=e??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await Ce.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(e){const i=await this.Update(e);this.Set(i)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(e)try{await Ce.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(e){if(e||(e=this.items),!e)return;const i=[];e.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(e){this.items.splice(0,this.items.length),e&&this.items.push(...e.map(i=>new this.classConstructor(i)))}SetAllWithCount(e){this.SetAll(e.items),this.count.value=e.count}RemoveItem(e){const i=this.items.findIndex(o=>o.id===e);i<0||this.items.splice(i,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){_.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const i=e.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>T.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function uu(n,e){n=="left"&&e.next(),n=="right"&&e.prev()}const fu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class hu{static GetRandColor(e){return Pt.GetRandEL(e??fu)}}function Fs(n,e){const i=[],o=e||ct.Asc,r=o===ct.Asc?ct.Desc:ct.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),e&&i.forEach(s=>{s.default&&(s.default=s.order===e)}),i}let mu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",jn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",ki[jn.FiveMinutes])}startDrag(e,i){this.draggedStartTime=e,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=ki[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Pt.GenerateNumsRange(this.startHour,this.endHour)}};const Ho=n=>n===8||n===46,pu=n=>n>46&&n<58,gu=n=>n>34&&n<41,yu=n=>n+".",wu=(n,e,i)=>{Ho(e)||gu(e)||(!pu(e)||i>9)&&n.preventDefault()};function bu(n,e){if(e>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function Su(n){const e=n.keyCode;let i=n.srcElement.value;const o=i.length;wu(n,e,o),!Ho(e)&&(o===2||o===5)&&(i=yu(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(Ho(e)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=bu(i,o),n.srcElement.value=i}const Cu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],ku="ru-RU";class Ut{constructor(){l(this,"locale","ru-RU")}static Format(e,i){if(!e)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(ku,o).format(new Date(e))}static FormatWithTime(e){return Ut.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(e,i,o){return`${this.Format(e,o)}-${this.Format(i,o)}`}static GetShortDayName(e){return e?Cu[e.getDay()]:""}static GetCurrentWeekPeriod(e){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,i){const o=new Date,r=new Date,s=Ut.SplitHourTime(e),a=Ut.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(e){const i=Ut.SplitHourTime(e);return i[0]*60+i[1]}static SplitHourTime(e){const i=e.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(e,i){const o=new Date,r=Ut.SplitHourTime(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return`${a}:${d}`}static GetMonthsDiff(e,i){return i.getMonth()-e.getMonth()+12*(i.getFullYear()-e.getFullYear())}static StringToDate(e){const i=e.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,i,o){return new Date(e)>=new Date(i)&&new Date(e)<=new Date(o)}static GetDatesFromPeriod(e,i){const o=[new Date(e)];let r=e;for(;r<=i;)r=Ut.AddDays(r,1),o.push(r);return o}static AddDays(e,i){const o=new Date(e);return o.setDate(o.getDate()+i),o}static Eq(e,i){return e.getTime()===i.getTime()}}class xu{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class _s{static Get(e){const i=e.split(".");return i[i.length-1]}}const Eu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:e,clearFavourite:r}})();class Bu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=Fs(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const on=new Bu;function $u(){const n=t.ref(!1),e=t.ref(!1);return{confirmLeave:n,saveButtonClick:e,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!e.value?s():a()}}}const Nu=(()=>{const n=(s,a)=>t.onBeforeMount(async()=>{T.F.FTSP.Get().reset(),on.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:e,showConfirmModal:i}=$u(),o=s=>jl.onBeforeRouteLeave((a,d,c)=>{i((s||r)(),c)}),r=s=>async()=>{e.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function Os(n,e){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/e);o++)i[o]=n.slice(o*e,o*e+e);return i}class Uo{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const e=kt.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===e);i>-1&&this.Select(i)}static Create(e,i){const o=new Uo;return o.key=e,o.items=i,o.items.length&&o.preSelect(),o}Select(e){if(this.items.length){if(e===void 0)return this.preSelect();this.idx=e,kt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const uo=class uo{static Format(e){let i=e;if(!i)e=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(uo,"validatePhone",(e,i,o)=>{uo.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let jo=uo;class Mu{static Count(e){const i=e.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class Vu{static async Auth(e){e&&e()}static Dev(){}}class Iu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",jn.FiveMinutes);l(this,"timelines",ki[jn.FiveMinutes])}periodIsCorrect(e,i){return ie.GtOrEq(e,this.startHM)&&ie.GtOrEq(this.endHM,i)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=ki[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Pt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,i,o,r){return r.filter(s=>s.id!==o).every(s=>!ie.PeriodsIntersects(e,i,s.startTime,s.endTime))}sortByStartTime(e){e.sort((i,o)=>ie.HMtoM(i.startTime)-ie.HMtoM(o.startTime))}}const Tu=-68;function Pu(n,e){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=e??Tu;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Ru{static Sort(e){e.forEach((i,o)=>i.order=o)}}class Oi{static Wait(e,i){return new Promise(o=>setTimeout(()=>o(i),e))}static WaitS(e,i){return Oi.Wait(ie.S(e),i)}static WaitM(e,i){return Oi.Wait(ie.M(e),i)}}function Au(n,e){let i=!0;return n.value.validate(o=>(o||(i=!1),i)),i}const zu=n=>new Promise(e=>{if(document.querySelector(n))return e(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),e(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});let Du=class Dr{constructor(e){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");_.BuildClass(this,e)}static Create(e,i,o,r){const s=new Dr;return s.id=Ht(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new Dr;return e.type="ping",e.id=Ht(),e}isMessage(){return this.type==="message"||this.type===""}};const vu="";class Fu{constructor(e="",i="",o="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);_.BuildClass(this,{endpoint:e,query:i,mutation:o}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Du.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,vu.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 _u=(oe=class{},l(oe,"Arrays",Pt),l(oe,"Axios",ei),l(oe,"BaseStore",ce),l(oe,"Cache",_i),l(oe,"Classes",_),l(oe,"CarouselSwipe",uu),l(oe,"Color",hu),l(oe,"CreateSortModels",Fs),l(oe,"Cursor",mu),l(oe,"DateMask",Su),l(oe,"Dates",Ut),l(oe,"Dragger",xu),l(oe,"Extension",_s),l(oe,"Favourite",Eu),l(oe,"Hooks",Nu),l(oe,"HttpClient",Ce),l(oe,"Id",Fe),l(oe,"MakeCarousel",Os),l(oe,"Period",wo),l(oe,"PhoneService",jo),l(oe,"Rating",Mu),l(oe,"Router",kt),l(oe,"RouterGuard",Vu),l(oe,"Scheduler",Iu),l(oe,"Scroll",Pu),l(oe,"Sorter",Ru),l(oe,"Static",Co),l(oe,"Strings",re),l(oe,"Time",ie),l(oe,"Timer",Oi),l(oe,"Token",Kn),l(oe,"Menus",Uo),l(oe,"validate",Au),l(oe,"WaitElement",zu),l(oe,"WebSocketClient",Fu),oe);class Ou{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Ls=new Ou;var Hs=(n=>(n.TableList="tableList",n.Default="",n))(Hs||{}),xt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(xt||{}),Us=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(Us||{}),js=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(js||{}),qo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(qo||{});const Lu=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Hs,Animations:xt,CalendarScale:Us,LocalStoreKeys:lt,SocialTypes:js,ValueRelation:qo},Symbol.toStringTag,{value:"Module"}));let Hu=class{async Login(e=De.Form.GetValues()){const i=await Ce.Post({query:"auth/login",payload:e});if(!i)throw"Ошибка авторизации";De.Status.SetState(i)}async LoginAs(e){await Ce.Post({query:"auth/login-as",payload:{email:e}})}async Register(e=De.Form.GetValues()){const i=await Ce.Post({query:"auth/register",payload:e});if(!i)throw i}async RestorePassword(e=De.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:e})}async PasswordChange(e=De.Form.GetValues()){e.id=kt.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:e})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:Kn.getRefreshToken()}})}async CheckUuid(e){await Ce.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}async ConfirmEmail(e){await Ce.Get({query:`auth/confirm-email/${e}`})}async EmailIsConfirm(e){await Ce.Get({query:`auth/email-is-confirm/${e}`})}};const Uu=new Hu;var ju=Object.defineProperty,Li=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ju(e,i,r),r};const ti=class Dl{constructor(e){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new xi]);l(this,"phones",[]);l(this,"websites",[]);_.BuildClass(this,e)}addEmail(){const e=Zt.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Jt.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new Dl;return e.id=Fe.UUID(),e}removeEmail(e){_.RemoveFromClassById(e,this.emails)}removePhone(e){_.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new xi)}addWebsite(){this.websites.push(new ko)}pushFirst(){this.emails.length||this.emails.push(new Zt),this.phones.length||this.phones.push(new Jt)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};Li([_.GetClassConstructor(Zt)],ti.prototype,"emails"),Li([_.GetClassConstructor(xi)],ti.prototype,"postAddresses"),Li([_.GetClassConstructor(Jt)],ti.prototype,"phones"),Li([_.GetClassConstructor(ko)],ti.prototype,"websites");let qs=ti,qu=class extends ce{constructor(){super(qs,"contacts")}};const Wu=new qu;let Gu=class extends ce{constructor(){super(Zt,"emails")}};const Qu=new Gu;class Wo{constructor(e){l(this,"id");l(this,"ftsp");l(this,"name","");_.BuildClass(this,e)}static Create(e){const i=new Wo;return i.id=Fe.UUID(),i.ftsp=JSON.stringify(e),i}}let Yu=class extends ce{constructor(){super(Wo,"ftsp-presets")}};const Xu=new Yu;let Zu=class extends ce{constructor(){super(Gr,"humans")}};const Ju=new Zu;let Ku=class extends ce{constructor(){super(Jt,"phones")}};const ef=new Ku;class tf{constructor(e){l(this,"id");l(this,"nameRus","");_.BuildClass(this,e)}}var nf=Object.defineProperty,of=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&nf(e,i,r),r};class Ws{constructor(e){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);_.BuildClass(this,e)}}of([_.GetClassConstructor(tf)],Ws.prototype,"fields");let rf=class extends ce{constructor(){super(Ws,"schemas")}};const sf=new rf;class Gs{constructor(e){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);_.BuildClass(this,e)}}class af{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");_.BuildClass(this,e)}}var lf=Object.defineProperty,Qs=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&lf(e,i,r),r};class Mn{constructor(e){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);_.BuildClass(this,e)}}Qs([_.GetClassConstructor(Gs)],Mn.prototype,"options"),Qs([_.GetClassConstructor(af)],Mn.prototype,"searchGroupMetaColumns");class Go{constructor(e){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Mn);l(this,"searchObjects",[]);l(this,"pagination",new $i);l(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(i=>new Mn(i))),e.searchGroup&&(this.searchGroup=new Mn(e.searchGroup)),e.options&&(this.options=e.options.map(i=>new Gs(i))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const i=this.searchGroups.find(o=>o.id===e);i?this.searchGroup=i:this.searchGroup=new Mn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(kt.Route().query.groupId)}setQuery(){const e=kt.Route().query.query;e&&(this.query=e)}}let cf=class{constructor(){l(this,"isSearchDrawerOpen",t.ref(!1));l(this,"searchModel",t.reactive(new Go));l(this,"searchGroups",t.reactive([]));l(this,"count",0)}async Search(e){const i=await Ce.Get({query:`search?key=${e.key}&query=${e.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.options=[]});const i=await Ce.Get({query:`search/main?searchModel=${e.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new Go}SetSearchModel(e){e&&(this.searchModel=new Go(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Qo=new cf;let df=class extends ce{constructor(){super(Ei,"users-accounts")}};const uf=new df;var qe=(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))(qe||{});class Ys{constructor(e){l(this,"id");l(this,"name",qe.String);l(this,"valueRelation",qo.simple);_.BuildClass(this,e)}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===qe.Radio)return"RadioProp";if(this.name===qe.Set)return"SetProp";if(this.name===qe.Number)return"NumberProp";if(this.name===qe.String)return"StringProp"}}let ff=class extends ce{constructor(){super(Ys,"value-types")}};const hf=new ff;let Xs=(ot=class{},l(ot,"Auth",Uu),l(ot,"Contacts",Wu),l(ot,"Emails",Qu),l(ot,"FileInfos",new ce(Qe,"file-infos")),l(ot,"FTSPPresets",Xu),l(ot,"Humans",Ju),l(ot,"Phones",ef),l(ot,"Schemas",sf),l(ot,"UserAccounts",uf),l(ot,"ValueTypes",hf),l(ot,"Search",Qo),ot);var jt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(jt||{});let mf=(Yt=class{},l(Yt,"Orders",ct),l(Yt,"Sizes",jt),l(Yt,"Statuses",me),l(Yt,"DataTypes",Pe),l(Yt,"ValueTypes",qe),l(Yt,"Operators",Se),Yt);class pf{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",t.ref(!1));l(this,"showEdit",t.ref(!1))}Set(e="",i){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=i}}const gf=new pf;class yf{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var i;return re.SearchIn(e.name,this.filterString)||((i=e.children)==null?void 0:i.some(o=>re.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var i;return this.filterString?(i=e.children)==null?void 0:i.filter(o=>re.SearchIn(o.name,this.filterString)):e.children}}const wf=new yf;class bf{constructor(){l(this,"Menu",t.reactive(wf));l(this,"Head",t.reactive(gf))}}const Sf=new bf,Zs="Да",Js="Нет";class Cf extends bn{constructor(){super(...arguments);l(this,"confirmButtonText",Zs);l(this,"cancelButtonText",Js);l(this,"persistent",!0);l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??Zs,this.cancelButtonText=o.cancelButtonText??Js,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof M.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=M.Dialog.create({title:this.title||void 0,message:this.text,html:bn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const kf=new Cf;class xf{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Ef extends xf{Show(){super.show()}Hide(){super.hide()}}const Bf=new Ef;class qt{}l(qt,"Admin",Sf),l(qt,"Dialog",kf),l(qt,"Loading",Bf),l(qt,"Notify",Sn),l(qt,"Btn",Xt),l(qt,"Input",_r);class T{}l(T,"Auth",t.reactive(De)),l(T,"UI",t.reactive(qt)),l(T,"Paginator",t.reactive(Ls)),l(T,"S",Xs),l(T,"H",_u),l(T,"C",cc),l(T,"T",mf),l(T,"I",Lu),l(T,"F",mc);class Ks{constructor(e){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");T.H.Classes.BuildClass(this,e),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var e;return String((e=this.building)==null?void 0:e.number)}getEntranceNumber(){return String(this.number)}}class ea{constructor(e){l(this,"id");l(this,"number");l(this,"buildingId");T.H.Classes.BuildClass(this,e)}}var $f=Object.defineProperty,ta=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&$f(e,i,r),r};class Hi{constructor(e){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);T.H.Classes.BuildClass(this,e)}}ta([T.H.Classes.GetClassConstructor(ea)],Hi.prototype,"floors"),ta([T.H.Classes.GetClassConstructor(Ks)],Hi.prototype,"entrances");const Nf=Object.freeze(Object.defineProperty({__proto__:null,Building:Hi,Entrance:Ks,Floor:ea},Symbol.toStringTag,{value:"Module"}));let Mf=class extends ce{constructor(){super(Hi,"buildings")}};const Vf=new Mf,If=Object.freeze(Object.defineProperty({__proto__:null,C:Nf,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:Vf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Vn=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(Vn||{});class rn{constructor(e){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new T.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",Vn.Message);_.BuildClass(this,e)}static Create(e,i,o){const r=new rn;return r.id=T.H.Id.UUID(),r.chatId=i,r.userId=o,r.message=e,r}static CreatePingMessage(){const e=new rn;return e.type=Vn.Ping,e.id=T.H.Id.UUID(),e}isMessage(){return this.type===Vn.Message||this.type===Vn.Empty}}var Tf=Object.defineProperty,Pf=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Tf(e,i,r),r};const na=class vl{constructor(e){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);T.H.Classes.BuildClass(this,e)}static Create(){const e=new vl;return e.id=T.H.Id.UUID(),e}addMessage(){if(this.newMesage==="")return;const e=rn.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(e),this.newMesage="",e}};Pf([T.H.Classes.GetClassConstructor(rn)],na.prototype,"chatMessages");let ia=na;const Rf=Object.freeze(Object.defineProperty({__proto__:null,Chat:ia,ChatMessage:rn},Symbol.toStringTag,{value:"Module"}));let Af=class extends ce{constructor(){super(rn,"chat-messages")}};const zf=new Af;let Df=class extends ce{constructor(){super(ia,"chats")}};const vf=new Df,Ff=Object.freeze(Object.defineProperty({__proto__:null,C:Rf,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:zf,Chats:vf},Symbol.toStringTag,{value:"Module"})),T:($r=class{},l($r,"ChatMessage",Vn),$r)},Symbol.toStringTag,{value:"Module"}));class oa{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Qe);T.H.Classes.BuildClass(this,e)}}class ni{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new T.C.FileInfo);l(this,"order",0);_.BuildClass(this,e)}static Create(e){const i=new ni;return i.id=T.H.Id.UUID(),i.passportId=e,i}}var _f=Object.defineProperty,Of=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&_f(e,i,r),r};class Yo{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);_.BuildClass(this,e)}}Of([_.GetClassConstructor(ni)],Yo.prototype,"passportScans");class ra{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Qe);T.H.Classes.BuildClass(this,e)}}const Lf=Object.freeze(Object.defineProperty({__proto__:null,Inn:oa,Passport:Yo,PassportScan:ni,Snils:ra},Symbol.toStringTag,{value:"Module"}));let Hf=class extends ce{constructor(){super(oa,"inns")}};const Uf=new Hf;let jf=class extends ce{constructor(){super(ni,"passport-scans")}};const qf=new jf;let Wf=class extends ce{constructor(){super(Yo,"passports")}};const Gf=new Wf;let Qf=class extends ce{constructor(){super(ra,"snilss")}};const Yf=new Qf,Xf=Object.freeze(Object.defineProperty({__proto__:null,C:Lf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Uf,PassportScans:qf,Passports:Gf,Snilss:Yf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Xo{constructor(e){l(this,"id");l(this,"name","");T.H.Classes.BuildClass(this,e)}static Create(e){const i=new Xo;return i.id=T.H.Id.UUID(),i.name=e,i}}const Zf=Object.freeze(Object.defineProperty({__proto__:null,Extract:Xo},Symbol.toStringTag,{value:"Module"})),Jf=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>Bw)}];class ii{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");T.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new ii;return o.id=T.H.Id.UUID(),o.name=e,o.label=i,o}}let Kf=class extends ce{constructor(){super(ii,"extracts")}};const eh=new Kf,th=Object.freeze(Object.defineProperty({__proto__:null,C:Zf,R:Jf,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:eh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class sn{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);T.H.Classes.BuildClass(this,e)}static Create(e){const i=new sn;return i.id=T.H.Id.UUID(),i.fieldId=e,i}}class sa{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");T.H.Classes.BuildClass(this,e)}}class Zo{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);T.H.Classes.BuildClass(this,e)}}class In{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");T.H.Classes.BuildClass(this,e)}static Create(e){const i=new In;return i.id=T.H.Id.UUID(),i.fieldId=e,i}}var nh=Object.defineProperty,oi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&nh(e,i,r),r};const an=class mo{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new Ys);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);T.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const i=new mo;return i.id=T.H.Id.UUID(),i.formSectionId=e,i}getRegisterPropertyRadioOriginalValue(e){const i=this.answerVariants.find(o=>o.id===e);return i?i.name:""}addRadioItem(e){const i=new sn(e);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(e){const i=this.answerVariants[e].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(e,1)}changeRelation(e){const i=e.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,i)=>e.order=i)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Zo(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new In)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=sn.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=mo.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=In.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new mo(this);return e.id=T.H.Id.UUID(),e.answerVariants.forEach(i=>{i.id=T.H.Id.UUID(),i.fieldId=e.id}),e.children=e.children.map(i=>{const o=i.copy();return o.parentId=e.id,o}),e}};oi([T.H.Classes.GetClassConstructor(sn)],an.prototype,"answerVariants"),oi([T.H.Classes.GetClassConstructor(sa)],an.prototype,"fieldExamples"),oi([T.H.Classes.GetClassConstructor(In)],an.prototype,"fieldVariants"),oi([T.H.Classes.GetClassConstructor(Zo)],an.prototype,"fieldMeasures"),oi([T.H.Classes.GetClassConstructor(an)],an.prototype,"children");let Ui=an;class Jo{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Qe);T.H.Classes.BuildClass(this,e)}}class ln{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");T.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new ln;return o.id=Ht(),o.fieldFillId=e,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var ih=Object.defineProperty,aa=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ih(e,i,r),r};const Ko=class vr{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Qe);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);T.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,i){const o=new vr;return o.id=Ht(),o.fieldId=e.id,o.formFillId=i,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,i){return e.map(o=>vr.Create(o,i))}addFile(){const e=new Jo;return e.id=Ht(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(i=>e.push(i.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,i){const o=ln.Create(this.id,e);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.answerVariantIdY===i)}addSelectedAnswerVariant(e){const i=ln.Create(this.id,e);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(e){const i=e.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};aa([T.H.Classes.GetClassConstructor(ln)],Ko.prototype,"selectedAnswerVariants"),aa([T.H.Classes.GetClassConstructor(Jo)],Ko.prototype,"answerFiles");let Tn=Ko;class oh{constructor(e){l(this,"id");l(this,"fieldId");T.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var rh=Object.defineProperty,sh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&rh(e,i,r),r};const la=class Fl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");T.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,i){return`${this.getFieldN(e)}.${i+1}`}static Create(e){const i=new Fl;return i.id=T.H.Id.UUID(),i.formId=e,i}addField(){const e=Ui.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,i)=>e.order=i)}getAnswerVariants(){const e=[];return this.fields.forEach(i=>e.push(...i.answerVariants)),e}};sh([T.H.Classes.GetClassConstructor(Ui)],la.prototype,"fields");let ji=la;var ah=Object.defineProperty,lh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ah(e,i,r),r};const ca=class _l{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);T.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new _l;return e.id=T.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=ji.Create(this.id);return this.formSections.push(e),T.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(o=>o.fields).flat(),i=e.map(o=>o.children).flat();return e.concat(i).filter(o=>o.children.length===0)}};lh([T.H.Classes.GetClassConstructor(ji)],ca.prototype,"formSections");let da=ca;var ch=Object.defineProperty,dh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&ch(e,i,r),r};const ua=class Ol{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");T.H.Classes.BuildClass(this,e)}static Create(e){const i=new Ol;return i.id=T.H.Id.UUID(),i.formId=e.id,i.fieldFills.push(...Tn.CreateMany(e.getFields(),i.id)),i}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===e)}pushRegisterProperty(e){const i=new Tn;i.researchResultId=e,this.fieldFills.push(i)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(i=>i.researchResultId===e)}getOrCreateFieldFill(e){let i=this.getFieldFill(e.id);return i||(i=Tn.Create(e),this.addFieldFill(i)),i}getFileInfos(){const e=[];return this.fieldFills.forEach(i=>e.push(...i.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(e/i*100)}getFieldFillByFieldId(e){return this.fieldFills.find(i=>i.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(i=>i.answerVariantId===e)}getFieldsFieldFillsMap(e){const i={};return e.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};dh([T.H.Classes.GetClassConstructor(Tn)],ua.prototype,"fieldFills");let fa=ua;const uh=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:sn,Field:Ui,FieldExample:sa,FieldFill:Tn,FieldFillFile:Jo,FieldFilter:oh,FieldMeasure:Zo,FieldVariant:In,Form:da,FormFill:fa,FormSection:ji,SelectedAnswerVariant:ln},Symbol.toStringTag,{value:"Module"}));let fh=class extends ce{constructor(){super(sn,"answer-variants")}};const hh=new fh;let mh=class extends ce{constructor(){super(Tn,"field-fills")}};const ph=new mh;let gh=class extends ce{constructor(){super(Ui,"fields")}};const yh=new gh;let wh=class extends ce{constructor(){super(fa,"form-fills")}};const bh=new wh;let Sh=class extends ce{constructor(){super(ji,"form-sections")}};const Ch=new Sh;let kh=class extends ce{constructor(){super(da,"forms")}};const xh=new kh;let Eh=class extends ce{constructor(){super(ln,"selected-answer-variants")}};const Bh=new Eh,$h=Object.freeze(Object.defineProperty({__proto__:null,C:uh,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:hh,FieldFills:ph,Fields:yh,FormFills:bh,FormSections:Ch,Forms:xh,SelectedAnswerVariants:Bh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class qi{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Qe);l(this,"iconName","");l(this,"svgCode","");_.BuildClass(this,e)}addFile(e){this.icon.id||(this.icon.id=Fe.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}}var Nh=Object.defineProperty,Mh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Nh(e,i,r),r};class er{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Qe);_.BuildClass(this,e)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const e=[];return e.push(this.icon),this.subMenus.forEach(i=>{e.push(i.icon)}),e}addFile(e){this.icon.id||(this.icon.id=Fe.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}addSubMenu(){this.subMenus.push(new qi)}removeSubMenu(e){const i=this.subMenus[e].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(e,1)}setColorsForSubMenus(){const e=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=e[i],i=e.length-1?i=0:i++})}containPath(e){return this.link===e||!!this.subMenus.find(i=>i.link===e)}static GetClassName(){return"menu"}}Mh([_.GetClassConstructor(qi)],er.prototype,"subMenus");const Vh=Object.freeze(Object.defineProperty({__proto__:null,Menu:er,SubMenu:qi},Symbol.toStringTag,{value:"Module"}));let Ih=class extends T.H.BaseStore{constructor(){super(er,"menus")}};const Th=new Ih;let Ph=class extends T.H.BaseStore{constructor(){super(qi,"sub-menus")}};const Rh=new Ph,Ah=Object.freeze(Object.defineProperty({__proto__:null,C:Vh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Th,SubMenus:Rh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Wi{constructor(e){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);_.BuildClass(this,e)}static Create(e,i,o,r,s){const a=new Wi;return a.id=e,a.name=i,a.component=o,a.order=r,a.active=!!s,a}}var ha=(n=>(n.User="USER",n.Admin="ADMIN",n))(ha||{});class zh{constructor(e){l(this,"id");l(this,"name",ha.User);l(this,"label","");l(this,"startPage","");_.BuildClass(this,e)}}class tr{constructor(e){l(this,"id");l(this,"document",new Qe);l(this,"documentId");l(this,"pageId");_.BuildClass(this,e)}}var Dh=Object.defineProperty,vh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Dh(e,i,r),r};class Gi{constructor(e){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");_.BuildClass(this,e)}}vh([_.GetClassConstructor(Qe)],Gi.prototype,"fileInfo");class Qi{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Qe);l(this,"scanId");_.BuildClass(this,e)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Fh=Object.defineProperty,_h=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Fh(e,i,r),r};class Pn{constructor(e){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);_.BuildClass(this,e),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const e=new Qi;e.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(e)}getFileInfos(){const e=[];return this.pageSectionDocuments.forEach(i=>{e.push(...i.getFileInfos())}),e}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getDocuments(e);return i||o||r.length>0}getDocuments(e){return this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}getDescription(e){return e?re.WrapSubStr(this.description,e):this.description}filter(e){if(!e){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):"",this.documents=this.pageSectionDocuments.filter(i=>re.SearchIn(i.name,e))}}_h([_.GetClassConstructor(Qi)],Pn.prototype,"pageSectionDocuments");var Oh=Object.defineProperty,Lh=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Oh(e,i,r),r};class Wt{constructor(e){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");_.BuildClass(this,e),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const e=[];return this.pageSections.forEach(i=>{e.push(...i.getFileInfos())}),e}addPageSection(){const e=new Pn;e.order=this.pageSections.length+1,e.name=`Новой раздел ${e.order}`,e.id=Fe.UUID(),this.pageSections.push(e)}infoExists(e){const i=re.SearchIn(this.name,e),o=re.SearchIn(this.description,e),r=this.getPageSections(e).length>0;return i||o||r}getPageSections(e){return e.length?this.pageSections.filter(i=>i.infoExists(e)):this.pageSections}filter(e){e.length?(this.sections=this.pageSections.filter(i=>i.infoExists(e)),this.text=re.SearchIn(this.description,e)?re.WrapSubStr(this.description,e):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(i=>i.filter(e))}}Lh([_.GetClassConstructor(Pn)],Wt.prototype,"pageSections");var Hh=Object.defineProperty,Yi=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&Hh(e,i,r),r};class Rn{constructor(e){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new qs);l(this,"contactId");l(this,"role",new zh);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");_.BuildClass(this,e),this.menus=this.pageSideMenus}getActiveMenu(){const e=this.pageSideMenus.find(i=>i.id===this.activeMenuId);return e||this.pageSideMenus[0]}setActiveMenuId(e){this.activeMenuId=e}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const e=[];return this.pageSideMenus.forEach(i=>{e.push(...i.getFileInfos())}),this.pageImages.forEach(i=>{i.fileInfo&&e.push(i.fileInfo)}),e}addSideMenu(){const e=new Wt;return e.order=this.pageSideMenus.length+1,e.name=`Новое меню ${e.order}`,e.id=Fe.UUID(),this.pageSideMenus.push(e),e.id}selectSideMenu(e,i){if(!e&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(o=>{i?o.selected=o.id===e:o.selected=o.slug===e})}getSelectedSideMenu(){const e=this.pageSideMenus.find(i=>i.selected);return e||new Wt}addCustomSectionsToSideMenu(e){e.forEach(i=>{const o=new Wt;o.id=i.id,o.name=i.name,typeof i.order<"u"?this.pageSideMenus.splice(i.order,0,o):this.pageSideMenus.push(o)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(e=>e.id==="contacts")){const e=new Wt;e.id="contacts",e.name="Контакты",this.pageSideMenus.push(e)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(e=>e.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(e=>e.infoExists(this.filterStr)),this.menus.forEach(e=>e.filter(this.filterStr))}static GetClassName(){return"page"}}Yi([_.GetClassConstructor(Gi)],Rn.prototype,"pageImages"),Yi([_.GetClassConstructor(Wt)],Rn.prototype,"pageSideMenus"),Yi([_.GetClassConstructor(Pn)],Rn.prototype,"pageSections"),Yi([_.GetClassConstructor(tr)],Rn.prototype,"pageDocuments");const Uh=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:Wi,Page:Rn,PageDocument:tr,PageImage:Gi,PageSection:Pn,PageSectionDocument:Qi,PageSideMenu:Wt},Symbol.toStringTag,{value:"Module"}));let jh=class extends T.H.BaseStore{constructor(){super(Wi,"custom-sections")}};const qh=new jh;let Wh=class extends T.H.BaseStore{constructor(){super(tr,"page-documents")}};const Gh=new Wh;let Qh=class extends T.H.BaseStore{constructor(){super(Gi,"page-images")}};const Yh=new Qh;let Xh=class extends T.H.BaseStore{constructor(){super(Qi,"page-section-documents")}};const Zh=new Xh;let Jh=class extends T.H.BaseStore{constructor(){super(Pn,"page-sections")}};const Kh=new Jh;let em=class extends T.H.BaseStore{constructor(){super(Wt,"page-side-menus")}};const tm=new em;let nm=class extends T.H.BaseStore{constructor(){super(Rn,"pages")}};const im=new nm,om=Object.freeze(Object.defineProperty({__proto__:null,C:Uh,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:qh,PageDocuments:Gh,PageImages:Yh,PageSectionDocuments:Zh,PageSections:Kh,PageSideMenus:tm,Pages:im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class At{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});T.H.Classes.BuildClass(this,e)}static Create(e){const i=new At;return i.id=T.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}}var rm=Object.defineProperty,sm=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&rm(e,i,r),r};const ma=class Ll{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);T.H.Classes.BuildClass(this,e)}static Create(e){const i=new Ll;return i.id=T.H.Id.UUID(),i.scheduleId=e,i.startTime="9:00",i.endTime="9:30",i}};sm([T.H.Classes.GetClassConstructor(At)],ma.prototype,"slots");let An=ma;var am=Object.defineProperty,pa=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&am(e,i,r),r};const nr=class Hl{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);T.H.Classes.BuildClass(this,e)}static Create(e,i){const o=new Hl;return o.id=T.H.Id.UUID(),o.placeId=e,o.scheduleDayId=i,o}addSession(){const e=An.Create(this.id);return this.sessions.push(e),e}addSlot(){const e=At.Create(this.id);return this.slots.push(e),e}};pa([T.H.Classes.GetClassConstructor(An)],nr.prototype,"sessions"),pa([T.H.Classes.GetClassConstructor(At)],nr.prototype,"slots");let ri=nr;var lm=Object.defineProperty,cm=(n,e,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(e,i,r)||r);return r&&lm(e,i,r),r};const ga=class Ul{constructor(e){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);T.H.Classes.BuildClass(this,e)}static Create(e,i,o=new Date){const r=new Ul;return r.id=T.H.Id.UUID(),r.ownerId=e,r.ownerType=i||"",r.date=o,r}};cm([T.H.Classes.GetClassConstructor(ri)],ga.prototype,"schedules");let Xi=ga;class zn{constructor(e){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");T.H.Classes.BuildClass(this,e)}static Create(){const e=new zn;return e.id=T.H.Id.UUID(),e}}const dm=Object.freeze(Object.defineProperty({__proto__:null,Schedule:ri,ScheduleDay:Xi,SchedulePlace:zn,ScheduleSession:An,ScheduleSlot:At},Symbol.toStringTag,{value:"Module"})),de=n=>n?T.H.Time.HMtoM(n):NaN,it=n=>T.H.Time.ConcatHM(Math.floor(n/60),n%60),Dn=n=>{if(!n)return"";const e=T.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(e)?e:""},si=(n,e)=>T.H.Time.DiffM(n,e),cn=(n,e)=>T.H.Time.AddMtoHM(n,e),ir=(n,e)=>{const i=de(n.startTime),o=de(e.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},ai=(n,e)=>{const i=de(n.startTime),o=de(n.endTime),r=de(e.startTime),s=de(e.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},li=(n,e)=>Math.round(n/e)*e,ya=(n,e=8*60,i=20*60)=>{let o=e,r=i;for(const{item:d}of n){const c=de(d.startTime),u=de(d.endTime);isFinite(c)&&(o=Math.min(o,c)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},wa=(n,e)=>{const i=de(n.item.startTime),o=de(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-e.start)/e.total*100,s=Math.max((o-i)/e.total*100,2.5);return{top:r+"%",height:s+"%"}},ba=(n,e)=>{const i=de(n.startTime),o=de(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=de(e.startTime),a=de(e.endTime),d=isFinite(s)?Math.max((s-i)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},Sa=(n,e,i)=>n.some(o=>o.item.id===e.item.id||e.kind==="session"&&o.kind==="slot"&&o.item.sessionId===e.item.id?!1:i(e.item,o.item)),Ca=(n,e,i)=>n.some(o=>o.id!==e.id&&i(e,o)),ka=(n,e,i,o)=>{if(!(!isFinite(e)||!isFinite(i)||i<=e))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&e>=s&&i<=a})},xa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",or={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:"пересечение"},Ea={createDay(n){return Xi.Create(void 0,void 0,n)},createSchedule(n,e){return ri.Create(n,e)},createSession(n){const e=(n==null?void 0:n.sessions)||[],i=e[e.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=An.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=T.H.Time.AddMtoHM(o,30),r},createSlot(n){return At.Create(n==null?void 0:n.id)},createPlace(n){const e=zn.Create();return e.name=n||"",e}},um={class:"schedule-admin"},fm={key:0,class:"no-days text-center text-grey q-py-xl"},hm={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},mm={key:1,class:"row items-center q-gutter-xs zoom-control"},pm={key:0,class:"grid-view"},gm={key:0,class:"text-grey text-center q-py-lg"},ym={class:"grid-header"},wm={class:"row items-center justify-center q-gutter-xs"},bm={class:"ellipsis"},Sm={class:"time-gutter"},Cm=["data-schedule-id","onDblclick"],km=["title","onPointerdown","onClick"],xm={class:"block-content"},Em={class:"block-time"},Bm={class:"block-name ellipsis"},$m={key:0,class:"block-speakers ellipsis"},Nm={key:0,class:"session-perfoms"},Mm=["title","onPointerdown","onClick"],Vm={class:"nested-time"},Im={class:"nested-name ellipsis"},Tm={key:0,class:"nested-speakers ellipsis"},Pm=["title","onPointerdown"],Rm={class:"block-actions"},Am=["title","onPointerdown"],zm=["title"],Dm={class:"session-spine-name"},vm={class:"block-time"},Fm={key:0,class:"session-badge"},_m={key:1,class:"conflict-badge"},Om={class:"block-name ellipsis"},Lm={class:"text-caption text-grey-6 q-pa-xs"},Hm={key:1,class:"list-view"},Um={class:"row items-center q-gutter-sm"},jm={class:"text-subtitle2"},qm={key:0,class:"sub-block"},Wm={class:"sub-title"},Gm={class:"list-row session-row"},Qm={key:0,class:"nested-list"},Ym={class:"col-4 ellipsis"},Xm={class:"time-text"},Zm={class:"sub-block"},Jm={class:"sub-title"},Km={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"},ip={class:"row items-center q-gutter-sm q-mb-md"},op={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"},dn=15,Ba=6,$a=A(t.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}},setup(n){var Tl,Pl;const e=n,i=t.computed(()=>({...or,...e.labels})),o=t.computed(()=>({...Ea,...e.factories})),r=p=>e.slotListOf?e.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>e.nestedSlotListOf?e.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||i.value.hall,d=p=>e.sessionName?e.sessionName(p):(p==null?void 0:p.name)||`${i.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>e.slotName?e.slotName(p):(p==null?void 0:p.name)||i.value.slot,u=p=>e.slotSubtitle?e.slotSubtitle(p):"",f=t.ref("grid"),h=t.ref((Pl=(Tl=e.days)==null?void 0:Tl[0])==null?void 0:Pl.id),m=t.ref(!1),w=t.ref(""),y=t.ref(!1),C=t.ref(null),B=t.ref(null),E=t.ref(void 0),N=t.ref(null),k=t.ref(null),R=t.ref(!1),v=t.ref(0),Z=t.ref(null),K=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],fe=t.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);t.watch(fe,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const ht=t.computed(()=>Math.max(be.value.total/60*fe.value,360)),Ye=t.computed(()=>ht.value+"px"),Ae=t.computed(()=>[...e.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),ke=t.computed(()=>Ae.value.find(p=>p.id===h.value));t.watch(()=>Ae.value.map(p=>p.id).join(","),()=>{var p;(!h.value||!Ae.value.some(g=>g.id===h.value))&&(h.value=(p=Ae.value[0])==null?void 0:p.id)});const fn=p=>{if(e.dayTitle)return e.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Xe=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Nt=async(p,g)=>{g&&(p.date=new Date(g),await e.persist.updateDay(p),await e.persist.refresh())},Mt=async p=>{var S;if(!p)return;for(const I of mt(p))await se(I);await e.persist.removeDay(p);const g=(e.days||[]).indexOf(p);g>=0&&e.days.splice(g,1),await e.persist.refresh(),h.value=(S=Ae.value[0])==null?void 0:S.id},Ot=async()=>{var H,X;const p=Ae.value,g=p[p.length-1],S=g?new Date(new Date(g.date).getTime()+864e5):new Date;let I;try{I=o.value.createDay(S)}catch{e.persist.notify("warning",i.value.saveEventFirst);return}try{await((X=(H=e.persist).createDay)==null?void 0:X.call(H,I));for(const ue of e.places||[])await W(ue,I);await e.persist.refresh()}catch{e.persist.notify("negative",i.value.createFailed);return}h.value=I.id,e.persist.notify("positive",`${i.value.dayAdded}: ${fn(I)}`)},mt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,S)=>{const I=wt(g),H=wt(S);return I.localeCompare(H,"ru")}),wt=p=>{if(e.hallName)return e.hallName(p);const g=p.place||(e.places||[]).find(S=>S.id===p.placeId);return(g==null?void 0:g.name)||i.value.hall},nt=()=>{m.value=!0},we=t.computed(()=>{const p=ke.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(S=>S.placeId));return(e.places||[]).filter(S=>!g.has(S.id))}),W=async(p,g)=>{if(e.persist.bindPlaceToDay){await e.persist.bindPlaceToDay(p,g,o.value.createSchedule);return}const S=o.value.createSchedule(p.id,g.id);await e.persist.createSchedule(S)},He=async p=>{m.value=!1;const g=ke.value;if(!g){e.persist.notify("warning",i.value.selectDayFirst);return}if(mt(g).some(S=>S.placeId===p.id)){e.persist.notify("warning",i.value.alreadyAdded);return}try{await W(p,g)}catch(S){console.warn("addPlaceToDay failed:",S),e.persist.notify("negative",i.value.createFailed),await e.persist.refresh();return}await e.persist.refresh(),h.value=g.id},Vt=async()=>{var S,I,H;const p=(S=w.value)==null?void 0:S.trim();if(!p){e.persist.notify("warning",i.value.enterName);return}const g=o.value.createPlace(p);try{if(!await((H=(I=e.persist).createPlace)==null?void 0:H.call(I,g))){e.persist.notify("negative",i.value.hallCreateFailed);return}}catch(X){console.warn("createPlace failed:",X),e.persist.notify("negative",i.value.hallCreateFailed);return}w.value="",await He(g),e.persist.notify("positive",i.value.hallCreated.replace("{name}",p))},ge=async p=>{await se(p);const g=We(p);g&&(g.schedules=(g.schedules||[]).filter(S=>S.id!==p.id)),await e.persist.refresh()},se=async p=>{for(const g of p.sessions||[]){for(const S of s(g))await e.persist.removeSlot(S);await e.persist.removeSession(g)}for(const g of r(p))await e.persist.removeSlot(g);await e.persist.removeSchedule(p)},We=p=>(e.days||[]).find(g=>(g.schedules||[]).some(S=>S.id===p.id)),Ge=p=>[...s(p)].sort(ir),Hn=p=>(p.sessions||[]).some(g=>s(g).length>0),Ze=new WeakMap,Lt=p=>{const g=Ze.get(p),S=r(p);if(g&&g.src===S)return g.list;const I=new Set((p.sessions||[]).map(X=>X.id)),H=S.filter(X=>!X.sessionId||!I.has(X.sessionId));return Ze.set(p,{src:S,list:H}),H},Ve=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),...Lt(p).map(g=>({kind:"slot",item:g}))],hn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),be=t.computed(()=>{var g,S;const p=(((g=ke.value)==null?void 0:g.schedules)||[]).flatMap(I=>Ve(I));for(const I of((S=ke.value)==null?void 0:S.schedules)||[])for(const H of I.sessions||[])p.push(...Ge(H).map(X=>({kind:"slot",item:X})));return ya(p)}),Je=t.computed(()=>{const p=[];for(let g=be.value.start;g<=be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),ee=t.computed(()=>{const p=[];for(let g=be.value.start+30;g<be.value.end;g+=60)p.push({min:g,label:it(g)});return p}),Ie=p=>wa(p,be.value),rt=t.computed(()=>{if(!N.value||!B.value)return{};const p=be.value,g=(N.value.minutes-p.start)/p.total*100,S=Math.max(B.value.duration/p.total*100,2.5);return{top:g+"%",height:S+"%"}}),st=t.computed(()=>!N.value||!B.value?"":it(N.value.minutes+B.value.duration)),mn=t.computed(()=>{if(!N.value)return{};const p=be.value,g=(N.value.minutes-p.start)/p.total*100,S=Math.max(dn/p.total*100,1.5);return{top:g+"%",height:S+"%"}}),bt=t.computed(()=>{var H,X,ue,$e,Te;if(!N.value||!B.value||!B.value.id)return 0;const p=mi(N.value.scheduleId);if(!p)return 0;const g={startTime:N.value.time,endTime:st.value},S=(H=N.value.session)==null?void 0:H.id;let I=0;for(const P of Ve(p))P.item.id!==((X=B.value)==null?void 0:X.id)&&(((ue=B.value)==null?void 0:ue.kind)==="slot"&&P.kind==="session"&&P.item.id===S||ai(g,P.item)&&I++);if((($e=B.value)==null?void 0:$e.kind)==="slot"&&N.value.session)for(const P of Ge(N.value.session))P.id!==((Te=B.value)==null?void 0:Te.id)&&ai(g,P)&&I++;return I}),It=t.computed(()=>bt.value>0),fo=(p,g)=>Sa(Ve(p),g,ai),Nr=(p,g)=>Ca(Ge(p),g,ai),Mr=(p,g)=>ba(p,g),pn=p=>{const g=be.value,S=de(p.item.startTime),I=de(p.item.endTime);return!isFinite(S)||!isFinite(I)?48:(I-S)/g.total*ht.value},Un=p=>xa(pn(p)),Vr=p=>{const g=e.slotName?e.slotName(p.item):p.item.name||(p.kind==="session"?i.value.session:i.value.slot);if(p.kind==="slot"&&Un(p)!=="h-full"){const S=u(p.item);if(S)return`${g} — ${S}`}return g},Ir=(p,g)=>{const S=c(p);if(g!=="h-full"){const I=u(p);if(I)return`${S} — ${I}`}return S},hi=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const S=u(p.item);return[c(p.item),g,S?`${i.value.participants}: ${S}`:""].filter(Boolean).join(`
22
+ `+s)}}catch{}}throw o}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=rn(this.defaults,i);const{transitional:o,paramsSerializer:r,headers:s}=i;o!==void 0&&qi.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean),legacyInterceptorReqResOrdering:Ge.transitional(Ge.boolean),advertiseZstdAcceptEncoding:Ge.transitional(Ge.boolean),validateStatusUndefinedResolves:Ge.transitional(Ge.boolean)},!1),r!=null&&(b.isFunction(r)?i.paramsSerializer={serialize:r}:qi.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),qi.assertOptions(i,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=s&&b.merge(s.common,s[i.method]);s&&b.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete s[y]}),i.headers=We.concat(a,s);const d=[];let c=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(i)===!1)return;c=c&&S.synchronous;const E=i.transitional||Fo;E&&E.legacyInterceptorReqResOrdering?d.unshift(S.fulfilled,S.rejected):d.push(S.fulfilled,S.rejected)});const u=[];this.interceptors.response.forEach(function(S){u.push(S.fulfilled,S.rejected)});let f,m=0,h;if(!c){const y=[qs.bind(this),void 0];for(y.unshift(...d),y.push(...u),h=y.length,f=Promise.resolve(i);m<h;)f=f.then(y[m++],y[m++]);return f}h=d.length;let w=i;for(;m<h;){const y=d[m++],S=d[m++];try{w=y(w)}catch(E){S.call(this,E);break}}try{f=qs.call(this,w)}catch(y){return Promise.reject(y)}for(m=0,h=u.length;m<h;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=rn(this.defaults,t);const i=Ds(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Es(i,t.params,t.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(t){sn.prototype[t]=function(i,o){return this.request(rn(o||{},{method:t,url:i,data:o&&b.hasOwnProp(o,"data")?o.data:void 0}))}}),b.forEach(["post","put","patch","query"],function(t){function i(o){return function(s,a,d){return this.request(rn(d||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}sn.prototype[t]=i(),t!=="query"&&(sn.prototype[t+"Form"]=i(!0))});let pu=class Wl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(d=>{o.subscribe(d),s=d}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,d){o.reason||(o.reason=new ni(s,a,d),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const t=new AbortController,i=o=>{t.abort(o)};return this.subscribe(i),t.signal.unsubscribe=()=>this.unsubscribe(i),t.signal}static source(){let t;return{token:new Wl(function(r){t=r}),cancel:t}}};function gu(n){return function(i){return n.apply(null,i)}}function yu(n){return b.isObject(n)&&n.isAxiosError===!0}const jo={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(jo).forEach(([n,t])=>{jo[t]=n});function Ws(n){const t=new sn(n),i=as(sn.prototype.request,t);return b.extend(i,sn.prototype,t,{allOwnKeys:!0}),b.extend(i,t,null,{allOwnKeys:!0}),i.create=function(r){return Ws(rn(n,r))},i}const Be=Ws(ti);Be.Axios=sn,Be.CanceledError=ni,Be.CancelToken=pu,Be.isCancel=Is,Be.VERSION=Ho,Be.toFormData=Oi,Be.AxiosError=F,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=gu,Be.isAxiosError=yu,Be.mergeConfig=rn,Be.AxiosHeaders=We,Be.formToJSON=n=>Vs(b.isHTMLForm(n)?new FormData(n):n),Be.getAdapter=Us.getAdapter,Be.HttpStatusCode=jo,Be.default=Be;const{Axios:Ab,AxiosError:zb,CanceledError:_b,isCancel:Fb,CancelToken:Ob,VERSION:Lb,all:vb,Cancel:Hb,isAxiosError:Ub,spread:qb,toFormData:jb,AxiosHeaders:Wb,HttpStatusCode:Gb,formToJSON:Qb,getAdapter:Yb,mergeConfig:Xb,create:Zb}=Be;var ii=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ii||{});const oi=(()=>{function n(){const c=r();return!(!c||c==="undefined")}function t(c){c.accessToken&&localStorage.setItem("access_token",c.accessToken),c.refreshToken&&localStorage.setItem("refresh_token",c.refreshToken)}function i(){const c=localStorage.getItem("user");return c?JSON.parse(c).id:""}function o(){const c=localStorage.getItem("user");if(c)return JSON.parse(c)}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 d(c){if(!n())return;const u=oi.getUser();u&&(u.human=c,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:i,clearTokens:a,getUser:o,updateHuman:d}})();class Wo{constructor(t){l(this,"code",400);l(this,"err","");v.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,i){const o=t.config;if(t.response){if(t.response.status===401&&!o._retry)return o._retry=!0,i.defaults.headers.common.token=oi.getAccessToken(),t.config.headers.token=oi.getAccessToken(),t.config.baseURL=void 0,i.request(o);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Bn.Error("Неверный логин или пароль");return}Bn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new Wo(t.response.data).getErr();r&&Bn.Error(r)}return Promise.reject(t)}}}const Tn=Be.create();Tn.interceptors.response.use(n=>n,async n=>await Wo.Handle(n,Tn));class ri{static async Get(t,i,o){return await Tn({method:ii.GET,url:t,headers:i,responseType:o})}static async Post(t,i,o,r){return i["Content-Type"]="multipart/form-data",await Tn({method:ii.POST,url:t,headers:i,responseType:o,data:r})}static async Put(t,i,o){return i["Content-Type"]="multipart/form-data",await Tn({method:ii.PUT,url:t,headers:i,data:o})}static async Delete(t,i){return await Tn({method:ii.DELETE,url:t,headers:i})}}class ji{constructor(t){l(this,"name","");v.BuildClass(this,t)}static Set(){}static Get(t,i){const o=sessionStorage.getItem(t);if(o){const r=JSON.parse(o),s=new Date,a=new Date(r.time),d=s.getTime()-a.getTime();return Math.round(d/6e4)>(i||10)?null:r.data}else return null}static async TryGet(t,i,o){let r;return r=ji.Get(t,o),r||(r=await i()),r}}var Go=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Go||{}),Gs=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Gs||{});const ye=class ye{static Setup(t="http://localhost",i,o="api"){this.baseUrl=ae.BuildSafeUrl(t,i,o),this.host=t,this.apiVersion=o}static newWebSocket(t){const i=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(i)}static download(t,i){const o=ye.getDownloadFileName(t,i.headers);if(!(i.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(i.data),s=document.createElement("a");s.href=r,s.setAttribute("download",o),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,i){if(t)return t;const o=i["content-disposition"];if(!o)return"file";const r=o.indexOf('"')+1,s=o.lastIndexOf('"'),a=o.substring(r,s);return a||"file"}static getHeaders(t){const i=Et.Get(ut.AccessToken);return t||(t=ye.headers),i&&(t[Go.Token]=i),t??ye.headers}static returnResponse(t,i){if(i)return t!=null&&t.isBlob?ye.download(t.downloadFileName,i):i.data}static async Get(t){return ye.returnResponse(t,await ri.Get(ye.buildUrl((t==null?void 0:t.query)??""),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ye.returnResponse(t,await ri.Post(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.getResponseType(t.isBlob),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ye.returnResponse(t,await ri.Put(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers),ye.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ye.returnResponse(t,await ri.Delete(ye.buildUrl(t==null?void 0:t.query),ye.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:i}=t;return new EventSource(ye.buildUrl(i))}static buildUrl(t=""){try{return No(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,i){const o=new FormData;if(o.append("form",JSON.stringify(t)),i)for(const r of i)r.file&&o.append(r.id??"files",r.file,r.originalName);return o}};l(ye,"baseUrl",""),l(ye,"apiVersion","api"),l(ye,"host",""),l(ye,"headers",{[Go.ContentType]:Gs.ApplicationJson});let Ee=ye;const z=(n,t)=>{const i=n.__vccOpts||n;for(const[o,r]of t)i[o]=r;return i},wu={},bu={style:{"text-align":"center"}};function Su(n,t){return e.openBlock(),e.createElementBlock("div",bu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Qs=z(wu,[["render",Su]]),Cu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Qs}],gt=class gt{static Setup(t,i=""){this.router=t,this.title=i,this.ChangeDocumentTitle(),this.AddRoutes(Cu)}static Get(){return this.router}static AddRoutes(t){t.forEach(i=>{this.Get().addRoute(i)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return gt.GetStringParam("id")}static Slug(){return gt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return gt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const i=this.Get().resolve({path:t});window.open(i==null?void 0:i.href,"_blank")}static GetPath(){var i;const t=(i=gt.Route())==null?void 0:i.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let i=t;i[0]==="/"&&(i=t.substring(1)),await gt.To(`/admin/${i}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var i;return(i=this.Route())==null?void 0:i.params[t]}static SetQueryParam(t,i){const o=new URL(window.location);o.searchParams.set(t,String(i)),history.replaceState(null,"",o)}static Resolve(t){return this.Get().resolve(t)}};l(gt,"router"),l(gt,"title",""),l(gt,"ChangeDocumentTitle",(t="")=>{let i=gt.Route().meta.title??t;i&&(i=" | "+i),document.title=gt.title+i});let Bt=gt;class ue{constructor(t,i){l(this,"items",e.reactive([]));l(this,"item");l(this,"options",e.reactive([]));l(this,"count",e.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=i}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",i="id"){const o=`${this.getUrl()}/options/${t}/${i}`;try{const r=await Ee.Get({query:o});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let i;const o=Ee.Get;t&&t.withCache?i=await ji.TryGet(this.getUrl(),o):i=await o({query:this.getUrl()}),Array.isArray(i)?this.SetAll(i):this.SetAllWithCount(i)}catch(i){console.warn("GetAll failed:",i)}}async Get(t){try{t||(t=Bt.Id()),this.Set(await Ee.Get({query:this.getUrl(t)}))}catch(i){console.warn("Get failed:",i)}}async GetBySlug(t){try{t||(t=Bt.Slug()),this.Set(await P.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(i){console.warn("GetBySlug failed:",i)}}async FTSP(t){var i;try{const r=((t==null?void 0:t.ftsp)??_t.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ee.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((i=a.data)==null?void 0:i.items);return}this.SetAllWithCount(a.data)}}catch(o){console.warn("FTSP failed:",o)}}async Create(t){try{const i=t??this.item,o={payload:i,query:this.getUrl()};return i.getFileInfos&&(o.fileInfos=i.getFileInfos()),await Ee.Post(o)}catch(i){console.warn("Create failed:",i)}}async CreateAndSet(t){const i=await this.Create(t);this.Set(i)}async CreateMany(t){if(!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Create(o)))}),Promise.all(i)}async Update(t){try{const i=t??this.item,o={query:this.getUrl(`${i.id}`),payload:i};return i.getFileInfos&&(o.fileInfos=i.getFileInfos(),o.fileInfos.forEach(r=>r.url="")),await Ee.Put(o)}catch(i){console.warn("Update failed:",i)}}async UpdateAndSet(t){const i=await this.Update(t);this.Set(i)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await Ee.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(i){console.warn("Remove failed:",i)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const i=[];t.forEach(o=>{i.push(new Promise(()=>this.Update(o)))}),Promise.all(i)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(i=>new this.classConstructor(i)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const i=this.items.findIndex(o=>o.id===t);i<0||this.items.splice(i,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.push(...i);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){v.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const i=t.map(o=>new this.classConstructor(o));this.items.unshift(...i);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>P.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 ku(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const xu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Eu{static GetRandColor(t){return zt.GetRandEL(t??xu)}}function Ys(n,t){const i=[],o=t||ft.Asc,r=o===ft.Asc?ft.Desc:ft.Asc;return Object.values(n).forEach(s=>{i.push(s(o)),i.push(s(r))}),i.length>0&&!i.some(s=>s.default)&&(i[0].default=!0),t&&i.forEach(s=>{s.default&&(s.default=s.order===t)}),i}let Bu=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yn.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",Vi[Yn.FiveMinutes])}startDrag(t,i){this.draggedStartTime=t,this.draggedEndTime=i,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vi[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 Qo=n=>n===8||n===46,Nu=n=>n>46&&n<58,$u=n=>n>34&&n<41,Vu=n=>n+".",Iu=(n,t,i)=>{Qo(t)||$u(t)||(!Nu(t)||i>9)&&n.preventDefault()};function Mu(n,t){if(t>8){let i=n.substring(0,2).replace(".","1");Number(i)>31&&(i="31");let o=n.substring(3,5).replace(".","1");Number(o)>12&&(o="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=i+"."+o+"."+r}return n}function Pu(n){const t=n.keyCode;let i=n.srcElement.value;const o=i.length;Iu(n,t,o),!Qo(t)&&(o===2||o===5)&&(i=Vu(i));const r=n.srcElement.value+String.fromCharCode(n.which);if(Qo(t)){n.srcElement.value=i;return}i.length===0&&Number(r)>3&&(i="3",n.preventDefault()),i.length===1&&Number(r)>31&&(i="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(i=i.substring(0,3)+"12",n.preventDefault()),i=Mu(i,o),n.srcElement.value=i}const Tu=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Ru="ru-RU";class Wt{constructor(){l(this,"locale","ru-RU")}static Format(t,i){if(!t)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return i&&(o.year=i.year||i.year===void 0?i.year:o.year,o.month=i.month||i.month===void 0?i.month:o.month,o.day=i.day||i.day===void 0?i.day:o.day,o.hour=i.hour??o.hour,o.minute=i.minute??o.minute),Intl.DateTimeFormat(Ru,o).format(new Date(t))}static FormatWithTime(t){return Wt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetPeriod(t,i,o){return`${this.Format(t,o)}-${this.Format(i,o)}`}static GetShortDayName(t){return t?Tu[t.getDay()]:""}static GetCurrentWeekPeriod(t){const i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()+1),r=new Date(i.getFullYear(),i.getMonth(),o.getDate()+7);return this.GetPeriod(o,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,i){const o=new Date,r=new Date,s=Wt.SplitHourTime(t),a=Wt.SplitHourTime(i);return o.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-o.getTime())/1e3/60}static HourTimeinMunutes(t){const i=Wt.SplitHourTime(t);return i[0]*60+i[1]}static SplitHourTime(t){const i=t.split(":");return[Number(i[0]),Number(i[1])]}static AddMinutesToHM(t,i){const o=new Date,r=Wt.SplitHourTime(t);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+i*6e4),a=s.getHours(),d=s.getMinutes();return`${a}:${d}`}static GetMonthsDiff(t,i){return i.getMonth()-t.getMonth()+12*(i.getFullYear()-t.getFullYear())}static StringToDate(t){const i=t.split(".");return new Date(`${i[2]}-${i[1]}-${i[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,i,o){return new Date(t)>=new Date(i)&&new Date(t)<=new Date(o)}static GetDatesFromPeriod(t,i){const o=[new Date(t)];let r=t;for(;r<=i;)r=Wt.AddDays(r,1),o.push(r);return o}static AddDays(t,i){const o=new Date(t);return o.setDate(o.getDate()+i),o}static Eq(t,i){return t.getTime()===i.getTime()}}class Du{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Xs{static Get(t){const i=t.split(".");return i[i.length-1]}}const Au=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const d=localStorage.getItem(`${s}_favourite`);return d?d.split(",").includes(a):!1}function i(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d){n(s,[a]);return}const c=d.split(",");c.push(a),n(s,c)}function o(s,a){const d=localStorage.getItem(`${s}_favourite`);if(!d)return;const c=d.split(",").filter(u=>u!==a);n(s,c)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:i,removeFromFavourite:o,setFavourite:n,isFavourite:t,clearFavourite:r}})();class zu{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=Ys(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const an=new zu;function _u(){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 Fu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{P.F.FTSP.Get().reset(),an.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:i}=_u(),o=s=>tc.onBeforeRouteLeave((a,d,c)=>{i((s||r)(),c)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:o,submit:r}})();function Zs(n,t){const i=[];if(n)for(let o=0;o<Math.ceil(n.length/t);o++)i[o]=n.slice(o*t,o*t+t);return i}class Yo{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const t=Bt.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const i=this.items.findIndex(o=>o.slug===t);i>-1&&this.Select(i)}static Create(t,i){const o=new Yo;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Bt.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const yo=class yo{static Format(t){let i=t;if(!i)t=i;else{(i[0]==="7"||i[0]==="8")&&i.length!==1&&(i=i.slice(1));const o=i.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:t="";break;case(r===1&&i.length===1&&o==="7"):case(r===1&&i.length===1&&o==="8"):t="+7 (";break;case r<4:t=`+7 (${o}`;break;case r<7:t=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:t=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(yo,"validatePhone",(t,i,o)=>{yo.getPhoneRegExp().test(i)||!i?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let Xo=yo;class Ou{static Count(t){const i=t.filter(s=>s.rating!==0);let o=0;i.forEach(s=>o=o+s.rating);const r=o/i.length;return isNaN(r)?0:Number((o/i.length).toFixed(2))}}class Lu{static async Auth(t){t&&t()}static Dev(){}}class vu{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yn.FiveMinutes);l(this,"timelines",Vi[Yn.FiveMinutes])}periodIsCorrect(t,i){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,i)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Vi[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,i,o,r){return r.filter(s=>s.id!==o).every(s=>!ie.PeriodsIntersects(t,i,s.startTime,s.endTime))}sortByStartTime(t){t.sort((i,o)=>ie.HMtoM(i.startTime)-ie.HMtoM(o.startTime))}}const Hu=-68;function Uu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const i=document.querySelector(n),o=t??Hu;let r=0;i&&(r=i.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class qu{static Sort(t){t.forEach((i,o)=>i.order=o)}}class Wi{static Wait(t,i){return new Promise(o=>setTimeout(()=>o(i),t))}static WaitS(t,i){return Wi.Wait(ie.S(t),i)}static WaitM(t,i){return Wi.Wait(ie.M(t),i)}}function ju(n,t){let i=!0;return n.value.validate(o=>(o||(i=!1),i)),i}const Wu=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const i=new MutationObserver(()=>{document.querySelector(n)&&(i.disconnect(),t(document.querySelector(n)))});i.observe(document.body,{childList:!0,subtree:!0})});let Gu=class Gr{constructor(t){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");v.BuildClass(this,t)}static Create(t,i,o,r){const s=new Gr;return s.id=jt(),s.chatId=t,s.message=o,s.userName=r,s}static CreatePingMessage(){const t=new Gr;return t.type="ping",t.id=jt(),t}isMessage(){return this.type==="message"||this.type===""}};const Qu="";class Yu{constructor(t="",i="",o="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);v.BuildClass(this,{endpoint:t,query:i,mutation:o}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Gu.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Qu.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 Xu=(re=class{},l(re,"Arrays",zt),l(re,"Axios",ri),l(re,"BaseStore",ue),l(re,"Cache",ji),l(re,"Classes",v),l(re,"CarouselSwipe",ku),l(re,"Color",Eu),l(re,"CreateSortModels",Ys),l(re,"Cursor",Bu),l(re,"DateMask",Pu),l(re,"Dates",Wt),l(re,"Dragger",Du),l(re,"Extension",Xs),l(re,"Favourite",Au),l(re,"Hooks",Fu),l(re,"HttpClient",Ee),l(re,"Id",ve),l(re,"MakeCarousel",Zs),l(re,"Period",Eo),l(re,"PhoneService",Xo),l(re,"Rating",Ou),l(re,"Router",Bt),l(re,"RouterGuard",Lu),l(re,"Scheduler",vu),l(re,"Scroll",Uu),l(re,"Sorter",qu),l(re,"Static",$o),l(re,"Strings",ae),l(re,"Time",ie),l(re,"Timer",Wi),l(re,"Token",oi),l(re,"Menus",Yo),l(re,"validate",ju),l(re,"WaitElement",Wu),l(re,"WebSocketClient",Yu),re);class Zu{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Js=new Zu;var Ks=(n=>(n.TableList="tableList",n.Default="",n))(Ks||{}),Nt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Nt||{}),ea=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ea||{}),ta=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(ta||{}),Zo=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Zo||{});const Ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:Ks,Animations:Nt,CalendarScale:ea,LocalStoreKeys:ut,SocialTypes:ta,ValueRelation:Zo},Symbol.toStringTag,{value:"Module"}));let Ku=class{async Login(t=Oe.Form.GetValues()){const i=await Ee.Post({query:"auth/login",payload:t});if(!i)throw"Ошибка авторизации";Oe.Status.SetState(i)}async LoginAs(t){await Ee.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const i=await Ee.Post({query:"auth/register",payload:t});if(!i)throw i}async RestorePassword(t=Oe.Form.GetValues()){await Ee.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Bt.GetStringParam("userId"),await Ee.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ee.Post({query:"auth/refresh-token",payload:{refreshToken:oi.getRefreshToken()}})}async CheckUuid(t){await Ee.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ee.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ee.Get({query:`auth/email-is-confirm/${t}`})}};const ef=new Ku;var tf=Object.defineProperty,Gi=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&tf(t,i,r),r};const si=class Gl{constructor(t){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new Ii]);l(this,"phones",[]);l(this,"websites",[]);v.BuildClass(this,t)}addEmail(){const t=en.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=tn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Gl;return t.id=ve.UUID(),t}removeEmail(t){v.RemoveFromClassById(t,this.emails)}removePhone(t){v.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Ii)}addWebsite(){this.websites.push(new Vo)}pushFirst(){this.emails.length||this.emails.push(new en),this.phones.length||this.phones.push(new tn)}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}};Gi([v.GetClassConstructor(en)],si.prototype,"emails"),Gi([v.GetClassConstructor(Ii)],si.prototype,"postAddresses"),Gi([v.GetClassConstructor(tn)],si.prototype,"phones"),Gi([v.GetClassConstructor(Vo)],si.prototype,"websites");let na=si,nf=class extends ue{constructor(){super(na,"contacts")}};const of=new nf;let rf=class extends ue{constructor(){super(en,"emails")}};const sf=new rf;class Jo{constructor(t){l(this,"id");l(this,"ftsp");l(this,"name","");v.BuildClass(this,t)}static Create(t){const i=new Jo;return i.id=ve.UUID(),i.ftsp=JSON.stringify(t),i}}let af=class extends ue{constructor(){super(Jo,"ftsp-presets")}};const lf=new af;let cf=class extends ue{constructor(){super(os,"humans")}};const df=new cf;let uf=class extends ue{constructor(){super(tn,"phones")}};const ff=new uf;class mf{constructor(t){l(this,"id");l(this,"nameRus","");v.BuildClass(this,t)}}var hf=Object.defineProperty,pf=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&hf(t,i,r),r};class ia{constructor(t){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);v.BuildClass(this,t)}}pf([v.GetClassConstructor(mf)],ia.prototype,"fields");let gf=class extends ue{constructor(){super(ia,"schemas")}};const yf=new gf;class oa{constructor(t){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);v.BuildClass(this,t)}}class wf{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");v.BuildClass(this,t)}}var bf=Object.defineProperty,ra=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&bf(t,i,r),r};class Rn{constructor(t){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);v.BuildClass(this,t)}}ra([v.GetClassConstructor(oa)],Rn.prototype,"options"),ra([v.GetClassConstructor(wf)],Rn.prototype,"searchGroupMetaColumns");class Ko{constructor(t){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Rn);l(this,"searchObjects",[]);l(this,"pagination",new Ti);l(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(i=>new Rn(i))),t.searchGroup&&(this.searchGroup=new Rn(t.searchGroup)),t.options&&(this.options=t.options.map(i=>new oa(i))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const i=this.searchGroups.find(o=>o.id===t);i?this.searchGroup=i:this.searchGroup=new Rn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Bt.Route().query.groupId)}setQuery(){const t=Bt.Route().query.query;t&&(this.query=t)}}let Sf=class{constructor(){l(this,"isSearchDrawerOpen",e.ref(!1));l(this,"searchModel",e.reactive(new Ko));l(this,"searchGroups",e.reactive([]));l(this,"count",0)}async Search(t){const i=await Ee.Get({query:`search?key=${t.key}&query=${t.query}`});i&&i.searchGroup&&i.searchGroup.options.forEach(o=>{t.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(t){this.SetSearchModel(await Ee.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(o=>{o.options=[]});const i=await Ee.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(i),i}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Ko}SetSearchModel(t){t&&(this.searchModel=new Ko(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const er=new Sf;let Cf=class extends ue{constructor(){super(Mi,"users-accounts")}};const kf=new Cf;var Qe=(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))(Qe||{});class sa{constructor(t){l(this,"id");l(this,"name",Qe.String);l(this,"valueRelation",Zo.simple);v.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===Qe.Radio)return"RadioProp";if(this.name===Qe.Set)return"SetProp";if(this.name===Qe.Number)return"NumberProp";if(this.name===Qe.String)return"StringProp"}}let xf=class extends ue{constructor(){super(sa,"value-types")}};const Ef=new xf;let aa=(st=class{},l(st,"Auth",ef),l(st,"Contacts",of),l(st,"Emails",sf),l(st,"FileInfos",new ue(Ze,"file-infos")),l(st,"FTSPPresets",lf),l(st,"Humans",df),l(st,"Phones",ff),l(st,"Schemas",yf),l(st,"UserAccounts",kf),l(st,"ValueTypes",Ef),l(st,"Search",er),st);var Gt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Gt||{});let Bf=(Jt=class{},l(Jt,"Orders",ft),l(Jt,"Sizes",Gt),l(Jt,"Statuses",ge),l(Jt,"DataTypes",Ae),l(Jt,"ValueTypes",Qe),l(Jt,"Operators",xe),Jt);class Nf{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",e.ref(!1));l(this,"showEdit",e.ref(!1))}Set(t="",i){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=i}}const $f=new Nf;class Vf{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var i;return ae.SearchIn(t.name,this.filterString)||((i=t.children)==null?void 0:i.some(o=>ae.SearchIn(o.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var i;return this.filterString?(i=t.children)==null?void 0:i.filter(o=>ae.SearchIn(o.name,this.filterString)):t.children}}const If=new Vf;class Mf{constructor(){l(this,"Menu",e.reactive(If));l(this,"Head",e.reactive($f))}}const Pf=new Mf,la="Да",ca="Нет";class Tf extends En{constructor(){super(...arguments);l(this,"confirmButtonText",la);l(this,"cancelButtonText",ca);l(this,"persistent",!0);l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(i){const o=typeof i=="string"?{text:i}:i;return this.confirmButtonText=o.confirmButtonText??la,this.cancelButtonText=o.cancelButtonText??ca,this.persistent=o.persistent??!0,super.showMessage(o,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof N.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=N.Dialog.create({title:this.title||void 0,message:this.text,html:En.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var i;return(i=this.resolve)==null?void 0:i.call(this,!0)})}Cancel(){this.Settle(()=>{var i;return(i=this.reject)==null?void 0:i.call(this)})}Settle(i){i==null||i(),this.resolve=void 0,this.reject=void 0}}const Rf=new Tf;class Df{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Af extends Df{Show(){super.show()}Hide(){super.hide()}}const zf=new Af;class Qt{}l(Qt,"Admin",Pf),l(Qt,"Dialog",Rf),l(Qt,"Loading",zf),l(Qt,"Notify",Bn),l(Qt,"Btn",Kt),l(Qt,"Input",Xr);class P{}l(P,"Auth",e.reactive(Oe)),l(P,"UI",e.reactive(Qt)),l(P,"Paginator",e.reactive(Js)),l(P,"S",aa),l(P,"H",Xu),l(P,"C",Sc),l(P,"T",Bf),l(P,"I",Ju),l(P,"F",Bc);class da{constructor(t){l(this,"id");l(this,"name","");l(this,"address","");l(this,"number");l(this,"building");l(this,"buildingId");P.H.Classes.BuildClass(this,t),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var t;return String((t=this.building)==null?void 0:t.number)}getEntranceNumber(){return String(this.number)}}class ua{constructor(t){l(this,"id");l(this,"number");l(this,"buildingId");P.H.Classes.BuildClass(this,t)}}var _f=Object.defineProperty,fa=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&_f(t,i,r),r};class Qi{constructor(t){l(this,"id");l(this,"number","");l(this,"address","");l(this,"name","");l(this,"status","");l(this,"description","");l(this,"floors",[]);l(this,"entrances",[]);P.H.Classes.BuildClass(this,t)}}fa([P.H.Classes.GetClassConstructor(ua)],Qi.prototype,"floors"),fa([P.H.Classes.GetClassConstructor(da)],Qi.prototype,"entrances");const Ff=Object.freeze(Object.defineProperty({__proto__:null,Building:Qi,Entrance:da,Floor:ua},Symbol.toStringTag,{value:"Module"}));let Of=class extends ue{constructor(){super(Qi,"buildings")}};const Lf=new Of,vf=Object.freeze(Object.defineProperty({__proto__:null,C:Ff,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:Lf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Dn=(n=>(n.Ping="ping",n.Enter="enter",n.Exit="exit",n.Message="message",n.Write="write",n.Empty="",n))(Dn||{});class ln{constructor(t){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new P.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",Dn.Message);v.BuildClass(this,t)}static Create(t,i,o){const r=new ln;return r.id=P.H.Id.UUID(),r.chatId=i,r.userId=o,r.message=t,r}static CreatePingMessage(){const t=new ln;return t.type=Dn.Ping,t.id=P.H.Id.UUID(),t}isMessage(){return this.type===Dn.Message||this.type===Dn.Empty}}var Hf=Object.defineProperty,Uf=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Hf(t,i,r),r};const ma=class Ql{constructor(t){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);P.H.Classes.BuildClass(this,t)}static Create(){const t=new Ql;return t.id=P.H.Id.UUID(),t}addMessage(){if(this.newMesage==="")return;const t=ln.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(t),this.newMesage="",t}};Uf([P.H.Classes.GetClassConstructor(ln)],ma.prototype,"chatMessages");let ha=ma;const qf=Object.freeze(Object.defineProperty({__proto__:null,Chat:ha,ChatMessage:ln},Symbol.toStringTag,{value:"Module"}));let jf=class extends ue{constructor(){super(ln,"chat-messages")}};const Wf=new jf;let Gf=class extends ue{constructor(){super(ha,"chats")}};const Qf=new Gf,Yf=Object.freeze(Object.defineProperty({__proto__:null,C:qf,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:Wf,Chats:Qf},Symbol.toStringTag,{value:"Module"})),T:(_r=class{},l(_r,"ChatMessage",Dn),_r)},Symbol.toStringTag,{value:"Module"})),ai=e.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const t=e.useAttrs(),i=e.computed(()=>{const o={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=t[r]);return o});return(o,r)=>(e.openBlock(),e.createBlock(e.unref(N.QBadge),e.mergeProps(e.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),oe=e.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:Gt.M,required:!1},type:{type:String,default:ge.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,i=e.useAttrs(),o=e.computed(()=>{const x={};for(const V of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(V)||(x[V]=i[V]);return x}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),d=e.computed(()=>s.value?ge.Primary:t.type),c=e.computed(()=>{const x={};return t.margin&&(x.margin=t.margin),t.padding&&(x.padding=t.padding),t.width&&(x.maxWidth=t.width,x.minWidth=t.width),t.height&&(x.minHeight=t.height,x.maxHeight=t.height),t.fontSize&&(x.fontSize=t.fontSize),x}),u={[ge.Primary]:"primary",[ge.Success]:"positive",[ge.Warning]:"warning",[ge.Error]:"negative",[ge.Info]:"info"},f=e.computed(()=>i.color!==void 0?i.color:u[d.value]??"primary"),m={[Gt.XS]:"xs",[Gt.S]:"sm",[Gt.M]:"md",[Gt.L]:"lg",[Gt.XL]:"xl"},h=e.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),w=e.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(t.skin)),y=e.computed(()=>i.outline!==void 0?i.outline:t.skin==="invert"),S=e.computed(()=>i.unelevated!==void 0?i.unelevated:t.skin==="base"),E=e.computed(()=>i.disable??t.disabled);return(x,V)=>(e.openBlock(),e.createBlock(e.unref(N.QBtn),e.mergeProps(e.unref(o),{style:e.unref(c),color:e.unref(f),size:e.unref(h),flat:e.unref(w),outline:e.unref(y),unelevated:e.unref(S),disable:e.unref(E),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(x.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Xf=["innerHTML"],Zf={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,i={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[e.createVNode(e.unref(N.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Xf)):(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),mt=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,i=e.useAttrs(),o=e.computed(()=>{const c={};for(const u of Object.keys(i))u!=="delay"&&(c[u]=i[u]);return c}),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 c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${c}`}),a=e.computed(()=>{const c=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${c}`}),d=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(o),{class:"tooltip-wrapper"}),[e.renderSlot(c.$slots,"default",{},void 0,!0),e.createVNode(e.unref(N.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(d))},{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(N.QTooltip),e.mergeProps({key:1},e.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),$t={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},ot=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:i}){const o=i,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),d=e.computed(()=>{const y={};for(const S of Object.keys(s))S!=="id"&&S!=="disable"&&(y[S]=s[S]);return y}),c=n,u=e.computed(()=>s.disable??c.disabled),f=e.ref(null);function m(){var y;(y=f.value)==null||y.focus()}t({focus:m});const h=()=>{o("input",r.value)},w=e.computed(()=>{const y={};return c.margin&&(y.margin=c.margin),c.padding&&(y.padding=c.padding),c.width&&(y.width=c.width),c.borderColor&&(y["--p-border-color"]=c.borderColor),y});return(y,S)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=E=>r.value=E)},e.unref(d),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(w),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":h,onBlur:S[1]||(S[1]=E=>y.$emit("blur",r.value)),onFocus:S[2]||(S[2]=E=>y.$emit("focus",r.value)),onClear:S[3]||(S[3]=E=>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-c4acf8be"]]),cn=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:e.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=e.useAttrs(),o=e.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(e.openBlock(),e.createBlock(e.unref(N.QDialog),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value=a)},e.unref(o),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Jf={class:"q-mb-md"},Kf={class:"text-subtitle1 text-weight-medium text-grey-9"},em={class:"text-caption text-grey-6 q-mt-xs"},li=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Jf,[e.createVNode(e.unref(N.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Kf,e.toDisplayString(n.title),1),e.createElementVNode("div",em,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(N.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[r]]),e.createVNode(oe,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),tm={class:"q-mr-md"},nm={class:"text-subtitle1 text-weight-medium text-grey-9"},ci=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue");return(i,o)=>{const r=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=s=>t.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",tm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",nm,e.toDisplayString(n.title),1),e.createVNode(e.unref(N.QSpace)),e.withDirectives(e.createVNode(oe,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[r]])]),_:1}),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(N.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(oe,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[r]]),e.createVNode(oe,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:o[0]||(o[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"])}}}),im={class:"q-mt-sm"},om={class:"row items-center justify-between q-mb-xs q-px-xs"},rm={class:"row items-center q-gutter-xs"},sm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},am={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},lm={style:{"min-width":"0"}},cm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},dm={key:0,class:"text-caption text-grey-6 ellipsis"},um={class:"row items-center no-wrap q-gutter-xs"},fm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},mm={class:"text-body2 text-grey-7"},dn=z(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async T=>{T&&(await navigator.clipboard.writeText(T),P.UI.Notify.Success(i.value.copiedEmail))},S=T=>{var M,A;s.value=T,a.value=o.value[T],d.value=t.adapter.emailValue(o.value[T]),c.value=((A=(M=t.adapter).emailDescription)==null?void 0:A.call(M,o.value[T]))??"",r.value=!0},E=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(i.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:d.value,description:c.value}),await t.adapter.updateEmail(a.value),r.value=!1,P.UI.Notify.Success(i.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),S(o.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=T=>{w.value=T,h.value=!0},k=async()=>{var T,M;m.value=!0;try{const A=o.value[w.value];await t.adapter.removeEmail((M=(T=t.adapter).emailId)==null?void 0:M.call(T,A)),o.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(i.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(T,M)=>(e.openBlock(),e.createElementBlock("div",im,[e.createElementVNode("div",om,[e.createElementVNode("div",rm,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",sm,e.toDisplayString(e.unref(i).emailsTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(ai,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:x},null,8,["loading"])]),e.unref(o).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(A,Q)=>{var se,_e,Ne,Se,he,at;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).emailId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",T.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",am,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",lm,[e.createElementVNode("div",cm,e.toDisplayString(n.adapter.emailValue(A)),1),(Se=(Ne=n.adapter).emailDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",dm,e.toDisplayString((at=(he=n.adapter).emailDescription)==null?void 0:at.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",um,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.emailValue(A))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",fm,[e.createVNode(e.unref(N.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",mm,e.toDisplayString(e.unref(i).noEmails),1),M[7]||(M[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(oe,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:x},null,8,["loading"])])),e.createVNode(ci,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[2]=A=>e.isRef(r)?r.value=A:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(ot,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(d)?d.value=A:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterEmail,A=>!A||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(ot,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(c)?c.value=A:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(li,{modelValue:e.unref(h),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),hm={class:"q-mt-sm"},pm={class:"row items-center justify-between q-mb-xs q-px-xs"},gm={class:"row items-center q-gutter-xs"},ym={class:"text-uppercase text-caption text-weight-medium text-grey-7"},wm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},bm={style:{"min-width":"0"}},Sm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Cm={key:0,class:"text-caption text-grey-6 ellipsis"},km={class:"row items-center no-wrap q-gutter-xs"},xm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Em={class:"text-body2 text-grey-7"},un=z(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),d=e.ref(""),c=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),h=e.ref(!1),w=e.ref(-1),y=async T=>{T&&(await navigator.clipboard.writeText(T),P.UI.Notify.Success(i.value.copiedNumber))},S=T=>{var M,A;s.value=T,a.value=o.value[T],d.value=t.adapter.phoneNumber(o.value[T]),c.value=((A=(M=t.adapter).phoneDescription)==null?void 0:A.call(M,o.value[T]))??"",r.value=!0},E=async()=>{if(!a.value||!d.value){P.UI.Notify.Warning(i.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:d.value,description:c.value}),await t.adapter.updatePhone(a.value),r.value=!1,P.UI.Notify.Success(i.value.saved)}catch{P.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),S(o.value.length-1)}catch{P.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},V=T=>{w.value=T,h.value=!0},k=async()=>{var T,M;m.value=!0;try{const A=o.value[w.value];await t.adapter.removePhone((M=(T=t.adapter).phoneId)==null?void 0:M.call(T,A)),o.value.splice(w.value,1),h.value=!1,P.UI.Notify.Success(i.value.deleted)}catch{P.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(T,M)=>(e.openBlock(),e.createElementBlock("div",hm,[e.createElementVNode("div",pm,[e.createElementVNode("div",gm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",ym,e.toDisplayString(e.unref(i).phonesTitle),1),e.unref(o).length>0?(e.openBlock(),e.createBlock(ai,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(oe,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:x},null,8,["loading"])]),e.unref(o).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(A,Q)=>{var se,_e,Ne,Se,he,at;return e.openBlock(),e.createElementBlock("div",{key:((_e=(se=n.adapter).phoneId)==null?void 0:_e.call(se,A))??Q,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",T.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",wm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",bm,[e.createElementVNode("div",Sm,e.toDisplayString(n.adapter.phoneNumber(A)),1),(Se=(Ne=n.adapter).phoneDescription)!=null&&Se.call(Ne,A)?(e.openBlock(),e.createElementBlock("div",Cm,e.toDisplayString((at=(he=n.adapter).phoneDescription)==null?void 0:at.call(he,A)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",km,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:$e=>y(n.adapter.phoneNumber(A))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[4]||(M[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(oe,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:$e=>S(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[5]||(M[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),Q>=n.presetted?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:$e=>V(Q)},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...M[6]||(M[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",xm,[e.createVNode(e.unref(N.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Em,e.toDisplayString(e.unref(i).noPhones),1),M[7]||(M[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(oe,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:x},null,8,["loading"])])),e.createVNode(ci,{modelValue:e.unref(r),"onUpdate:modelValue":M[2]||(M[2]=A=>e.isRef(r)?r.value=A:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:E},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(ot,{key:0,modelValue:e.unref(d),"onUpdate:modelValue":M[0]||(M[0]=A=>e.isRef(d)?d.value=A:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[A=>!!A||e.unref(i).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.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(ot,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":M[1]||(M[1]=A=>e.isRef(c)?c.value=A:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(li,{modelValue:e.unref(h),"onUpdate:modelValue":M[3]||(M[3]=A=>e.isRef(h)?h.value=A:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:k},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),Bm={class:"row items-center q-gutter-sm"},Nm={class:"text-weight-medium text-grey-9"},$m=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:$t.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,i=e.computed(()=>({...$t,...t.labels})),o=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),d=()=>{a.value=!a.value},c=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),P.UI.Notify.Success(i.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(N.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:d},[e.createElementVNode("div",Bm,[e.createVNode(oe,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(N.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",Nm,e.toDisplayString(n.title),1),e.unref(o).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(ai,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(N.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(oe,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:c},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(N.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(N.QSeparator)),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(N.QSeparator),{class:"q-my-sm"}),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(i)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),nr=z($m,[["__scopeId","data-v-327b9235"]]),Vm={class:"contact-edit-wrapper"},ir=z(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Vm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),Im={class:"edit-emails-wrapper"},or=z(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Im,[e.createVNode(dn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),Mm={class:"edit-phones-wrapper"},rr=z(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Mm,[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-59e80623"]]),Pm={class:"contact-view-wrapper"},sr=z(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...$t}));return(i,o)=>(e.openBlock(),e.createElementBlock("div",Pm,[e.createVNode(un,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),o[0]||(o[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(dn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function pa(n){n.component("PContactForm",nr),n.component("PContactFormDeleteDialog",li),n.component("PContactFormEdit",ir),n.component("PContactFormEditDialog",ci),n.component("PContactFormEditEmails",or),n.component("PContactFormEditPhones",rr),n.component("PContactFormView",sr),n.component("PContactFormViewEmails",dn),n.component("PContactFormViewPhones",un)}const Tm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:nr,PContactFormDeleteDialog:li,PContactFormEdit:ir,PContactFormEditDialog:ci,PContactFormEditEmails:or,PContactFormEditPhones:rr,PContactFormView:sr,PContactFormViewEmails:dn,PContactFormViewPhones:un,default:pa,defaultContactsLabels:$t},Symbol.toStringTag,{value:"Module"}));class ga{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class di{constructor(t){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new P.C.FileInfo);l(this,"order",0);v.BuildClass(this,t)}static Create(t){const i=new di;return i.id=P.H.Id.UUID(),i.passportId=t,i}}var Rm=Object.defineProperty,Dm=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Rm(t,i,r),r};class ar{constructor(t){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);v.BuildClass(this,t)}}Dm([v.GetClassConstructor(di)],ar.prototype,"passportScans");class ya{constructor(t){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}const Am=Object.freeze(Object.defineProperty({__proto__:null,Inn:ga,Passport:ar,PassportScan:di,Snils:ya},Symbol.toStringTag,{value:"Module"}));let zm=class extends ue{constructor(){super(ga,"inns")}};const _m=new zm;let Fm=class extends ue{constructor(){super(di,"passport-scans")}};const Om=new Fm;let Lm=class extends ue{constructor(){super(ar,"passports")}};const vm=new Lm;let Hm=class extends ue{constructor(){super(ya,"snilss")}};const Um=new Hm,qm=Object.freeze(Object.defineProperty({__proto__:null,C:Am,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:_m,PassportScans:Om,Passports:vm,Snilss:Um},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class lr{constructor(t){l(this,"id");l(this,"name","");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new lr;return i.id=P.H.Id.UUID(),i.name=t,i}}const jm=Object.freeze(Object.defineProperty({__proto__:null,Extract:lr},Symbol.toStringTag,{value:"Module"})),Wm=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>yb)}];class ui{constructor(t){l(this,"id");l(this,"name","");l(this,"label","");P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new ui;return o.id=P.H.Id.UUID(),o.name=t,o.label=i,o}}let Gm=class extends ue{constructor(){super(ui,"extracts")}};const Qm=new Gm,Ym=Object.freeze(Object.defineProperty({__proto__:null,C:jm,R:Wm,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:Qm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class fn{constructor(t){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);P.H.Classes.BuildClass(this,t)}static Create(t){const i=new fn;return i.id=P.H.Id.UUID(),i.fieldId=t,i}}class wa{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");P.H.Classes.BuildClass(this,t)}}class cr{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);P.H.Classes.BuildClass(this,t)}}class An{constructor(t){l(this,"id");l(this,"name","");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new An;return i.id=P.H.Id.UUID(),i.fieldId=t,i}}var Xm=Object.defineProperty,fi=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Xm(t,i,r),r};const mn=class So{constructor(t){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new sa);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);P.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const i=new So;return i.id=P.H.Id.UUID(),i.formSectionId=t,i}getRegisterPropertyRadioOriginalValue(t){const i=this.answerVariants.find(o=>o.id===t);return i?i.name:""}addRadioItem(t){const i=new fn(t);i.order=this.answerVariants.length,this.answerVariants.push(i)}removeRadioItem(t){const i=this.answerVariants[t].id;i&&this.answerVariantsForDelete.push(i),this.answerVariants.splice(t,1)}changeRelation(t){const i=t.find(o=>o.id===this.valueTypeId);if(i){if(i.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(i.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=i}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,i)=>t.order=i)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new cr(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new An)}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=fn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=So.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=An.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new So(this);return t.id=P.H.Id.UUID(),t.answerVariants.forEach(i=>{i.id=P.H.Id.UUID(),i.fieldId=t.id}),t.children=t.children.map(i=>{const o=i.copy();return o.parentId=t.id,o}),t}};fi([P.H.Classes.GetClassConstructor(fn)],mn.prototype,"answerVariants"),fi([P.H.Classes.GetClassConstructor(wa)],mn.prototype,"fieldExamples"),fi([P.H.Classes.GetClassConstructor(An)],mn.prototype,"fieldVariants"),fi([P.H.Classes.GetClassConstructor(cr)],mn.prototype,"fieldMeasures"),fi([P.H.Classes.GetClassConstructor(mn)],mn.prototype,"children");let Yi=mn;class dr{constructor(t){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new Ze);P.H.Classes.BuildClass(this,t)}}class hn{constructor(t){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new hn;return o.id=jt(),o.fieldFillId=t,o.answerVariantId=i,o}static GetClassName(){return"selectedAnswerVariant"}}var Zm=Object.defineProperty,ba=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Zm(t,i,r),r};const ur=class Qr{constructor(t){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new Ze);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);P.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,i){const o=new Qr;return o.id=jt(),o.fieldId=t.id,o.formFillId=i,o.order=t.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,i){return t.map(o=>Qr.Create(o,i))}addFile(){const t=new dr;return t.id=jt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(i=>t.push(i.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,i){const o=hn.Create(this.id,t);return o.answerVariantIdY=i,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(t,i){return this.selectedAnswerVariants.find(o=>o.answerVariantId===t&&o.answerVariantIdY===i)}addSelectedAnswerVariant(t){const i=hn.Create(this.id,t);return this.selectedAnswerVariants.push(i),this.filled=!0,i}static GetClassName(){return"answer"}showOther(t){const i=t.find(o=>o.showOther);return i?this.answerVariantId===i.id||this.selectedAnswerVariants.some(o=>o.answerVariantId===i.id):!1}};ba([P.H.Classes.GetClassConstructor(hn)],ur.prototype,"selectedAnswerVariants"),ba([P.H.Classes.GetClassConstructor(dr)],ur.prototype,"answerFiles");let zn=ur;class Jm{constructor(t){l(this,"id");l(this,"fieldId");P.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Km=Object.defineProperty,eh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Km(t,i,r),r};const Sa=class Yl{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");P.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,i){return`${this.getFieldN(t)}.${i+1}`}static Create(t){const i=new Yl;return i.id=P.H.Id.UUID(),i.formId=t,i}addField(){const t=Yi.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,i)=>t.order=i)}getAnswerVariants(){const t=[];return this.fields.forEach(i=>t.push(...i.answerVariants)),t}};eh([P.H.Classes.GetClassConstructor(Yi)],Sa.prototype,"fields");let Xi=Sa;var th=Object.defineProperty,nh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&th(t,i,r),r};const Ca=class Xl{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);P.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new Xl;return t.id=P.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Xi.Create(this.id);return this.formSections.push(t),P.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(o=>o.fields).flat(),i=t.map(o=>o.children).flat();return t.concat(i).filter(o=>o.children.length===0)}};nh([P.H.Classes.GetClassConstructor(Xi)],Ca.prototype,"formSections");let ka=Ca;var ih=Object.defineProperty,oh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&ih(t,i,r),r};const xa=class Zl{constructor(t){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Zl;return i.id=P.H.Id.UUID(),i.formId=t.id,i.fieldFills.push(...zn.CreateMany(t.getFields(),i.id)),i}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var i;return(i=this.fieldFills)==null?void 0:i.find(o=>o.fieldId===t)}pushRegisterProperty(t){const i=new zn;i.researchResultId=t,this.fieldFills.push(i)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(i=>i.researchResultId===t)}getOrCreateFieldFill(t){let i=this.getFieldFill(t.id);return i||(i=zn.Create(t),this.addFieldFill(i)),i}getFileInfos(){const t=[];return this.fieldFills.forEach(i=>t.push(...i.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(o=>o.filled).length,i=this.fieldFills.length;this.fillingPercentage=Math.round(t/i*100)}getFieldFillByFieldId(t){return this.fieldFills.find(i=>i.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(i=>i.answerVariantId===t)}getFieldsFieldFillsMap(t){const i={};return t.forEach(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;i[o.code]=s}}),i}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};oh([P.H.Classes.GetClassConstructor(zn)],xa.prototype,"fieldFills");let Ea=xa;const rh=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:fn,Field:Yi,FieldExample:wa,FieldFill:zn,FieldFillFile:dr,FieldFilter:Jm,FieldMeasure:cr,FieldVariant:An,Form:ka,FormFill:Ea,FormSection:Xi,SelectedAnswerVariant:hn},Symbol.toStringTag,{value:"Module"}));let sh=class extends ue{constructor(){super(fn,"answer-variants")}};const ah=new sh;let lh=class extends ue{constructor(){super(zn,"field-fills")}};const ch=new lh;let dh=class extends ue{constructor(){super(Yi,"fields")}};const uh=new dh;let fh=class extends ue{constructor(){super(Ea,"form-fills")}};const mh=new fh;let hh=class extends ue{constructor(){super(Xi,"form-sections")}};const ph=new hh;let gh=class extends ue{constructor(){super(ka,"forms")}};const yh=new gh;let wh=class extends ue{constructor(){super(hn,"selected-answer-variants")}};const bh=new wh,Sh=Object.freeze(Object.defineProperty({__proto__:null,C:rh,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:ah,FieldFills:ch,Fields:uh,FormFills:mh,FormSections:ph,Forms:yh,SelectedAnswerVariants:bh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Zi{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new Ze);l(this,"iconName","");l(this,"svgCode","");v.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=ve.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Ch=Object.defineProperty,kh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Ch(t,i,r),r};class fr{constructor(t){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new Ze);v.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(i=>{t.push(i.icon)}),t}addFile(t){this.icon.id||(this.icon.id=ve.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Zi)}removeSubMenu(t){const i=this.subMenus[t].id;i&&this.subMenusForDelete.push(i),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let i=0;this.subMenus.forEach(o=>{o.color=t[i],i=t.length-1?i=0:i++})}containPath(t){return this.link===t||!!this.subMenus.find(i=>i.link===t)}static GetClassName(){return"menu"}}kh([v.GetClassConstructor(Zi)],fr.prototype,"subMenus");const xh=Object.freeze(Object.defineProperty({__proto__:null,Menu:fr,SubMenu:Zi},Symbol.toStringTag,{value:"Module"}));let Eh=class extends P.H.BaseStore{constructor(){super(fr,"menus")}};const Bh=new Eh;let Nh=class extends P.H.BaseStore{constructor(){super(Zi,"sub-menus")}};const $h=new Nh,Vh=Object.freeze(Object.defineProperty({__proto__:null,C:xh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Bh,SubMenus:$h},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ji{constructor(t){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);v.BuildClass(this,t)}static Create(t,i,o,r,s){const a=new Ji;return a.id=t,a.name=i,a.component=o,a.order=r,a.active=!!s,a}}var Ba=(n=>(n.User="USER",n.Admin="ADMIN",n))(Ba||{});class Ih{constructor(t){l(this,"id");l(this,"name",Ba.User);l(this,"label","");l(this,"startPage","");v.BuildClass(this,t)}}class mr{constructor(t){l(this,"id");l(this,"document",new Ze);l(this,"documentId");l(this,"pageId");v.BuildClass(this,t)}}var Mh=Object.defineProperty,Ph=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Mh(t,i,r),r};class Ki{constructor(t){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");v.BuildClass(this,t)}}Ph([v.GetClassConstructor(Ze)],Ki.prototype,"fileInfo");class eo{constructor(t){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new Ze);l(this,"scanId");v.BuildClass(this,t)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Th=Object.defineProperty,Rh=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Th(t,i,r),r};class _n{constructor(t){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);v.BuildClass(this,t),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const t=new eo;t.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(t)}getFileInfos(){const t=[];return this.pageSectionDocuments.forEach(i=>{t.push(...i.getFileInfos())}),t}infoExists(t){const i=ae.SearchIn(this.name,t),o=ae.SearchIn(this.description,t),r=this.getDocuments(t);return i||o||r.length>0}getDocuments(t){return this.pageSectionDocuments.filter(i=>ae.SearchIn(i.name,t))}getDescription(t){return t?ae.WrapSubStr(this.description,t):this.description}filter(t){if(!t){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):"",this.documents=this.pageSectionDocuments.filter(i=>ae.SearchIn(i.name,t))}}Rh([v.GetClassConstructor(eo)],_n.prototype,"pageSectionDocuments");var Dh=Object.defineProperty,Ah=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Dh(t,i,r),r};class Yt{constructor(t){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");v.BuildClass(this,t),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const t=[];return this.pageSections.forEach(i=>{t.push(...i.getFileInfos())}),t}addPageSection(){const t=new _n;t.order=this.pageSections.length+1,t.name=`Новой раздел ${t.order}`,t.id=ve.UUID(),this.pageSections.push(t)}infoExists(t){const i=ae.SearchIn(this.name,t),o=ae.SearchIn(this.description,t),r=this.getPageSections(t).length>0;return i||o||r}getPageSections(t){return t.length?this.pageSections.filter(i=>i.infoExists(t)):this.pageSections}filter(t){t.length?(this.sections=this.pageSections.filter(i=>i.infoExists(t)),this.text=ae.SearchIn(this.description,t)?ae.WrapSubStr(this.description,t):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(i=>i.filter(t))}}Ah([v.GetClassConstructor(_n)],Yt.prototype,"pageSections");var zh=Object.defineProperty,to=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&zh(t,i,r),r};class Fn{constructor(t){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new na);l(this,"contactId");l(this,"role",new Ih);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");v.BuildClass(this,t),this.menus=this.pageSideMenus}getActiveMenu(){const t=this.pageSideMenus.find(i=>i.id===this.activeMenuId);return t||this.pageSideMenus[0]}setActiveMenuId(t){this.activeMenuId=t}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const t=[];return this.pageSideMenus.forEach(i=>{t.push(...i.getFileInfos())}),this.pageImages.forEach(i=>{i.fileInfo&&t.push(i.fileInfo)}),t}addSideMenu(){const t=new Yt;return t.order=this.pageSideMenus.length+1,t.name=`Новое меню ${t.order}`,t.id=ve.UUID(),this.pageSideMenus.push(t),t.id}selectSideMenu(t,i){if(!t&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(o=>{i?o.selected=o.id===t:o.selected=o.slug===t})}getSelectedSideMenu(){const t=this.pageSideMenus.find(i=>i.selected);return t||new Yt}addCustomSectionsToSideMenu(t){t.forEach(i=>{const o=new Yt;o.id=i.id,o.name=i.name,typeof i.order<"u"?this.pageSideMenus.splice(i.order,0,o):this.pageSideMenus.push(o)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(t=>t.id==="contacts")){const t=new Yt;t.id="contacts",t.name="Контакты",this.pageSideMenus.push(t)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(t=>t.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(t=>t.infoExists(this.filterStr)),this.menus.forEach(t=>t.filter(this.filterStr))}static GetClassName(){return"page"}}to([v.GetClassConstructor(Ki)],Fn.prototype,"pageImages"),to([v.GetClassConstructor(Yt)],Fn.prototype,"pageSideMenus"),to([v.GetClassConstructor(_n)],Fn.prototype,"pageSections"),to([v.GetClassConstructor(mr)],Fn.prototype,"pageDocuments");const _h=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:Ji,Page:Fn,PageDocument:mr,PageImage:Ki,PageSection:_n,PageSectionDocument:eo,PageSideMenu:Yt},Symbol.toStringTag,{value:"Module"}));let Fh=class extends P.H.BaseStore{constructor(){super(Ji,"custom-sections")}};const Oh=new Fh;let Lh=class extends P.H.BaseStore{constructor(){super(mr,"page-documents")}};const vh=new Lh;let Hh=class extends P.H.BaseStore{constructor(){super(Ki,"page-images")}};const Uh=new Hh;let qh=class extends P.H.BaseStore{constructor(){super(eo,"page-section-documents")}};const jh=new qh;let Wh=class extends P.H.BaseStore{constructor(){super(_n,"page-sections")}};const Gh=new Wh;let Qh=class extends P.H.BaseStore{constructor(){super(Yt,"page-side-menus")}};const Yh=new Qh;let Xh=class extends P.H.BaseStore{constructor(){super(Fn,"pages")}};const Zh=new Xh,Jh=Object.freeze(Object.defineProperty({__proto__:null,C:_h,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Oh,PageDocuments:vh,PageImages:Uh,PageSectionDocuments:jh,PageSections:Gh,PageSideMenus:Yh,Pages:Zh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"sessionId");l(this,"payload",{});P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Ft;return i.id=P.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}}var Kh=Object.defineProperty,ep=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&Kh(t,i,r),r};const Na=class Jl{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"startTime","");l(this,"endTime","");l(this,"scheduleId");l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t){const i=new Jl;return i.id=P.H.Id.UUID(),i.scheduleId=t,i.startTime="9:00",i.endTime="9:30",i}};ep([P.H.Classes.GetClassConstructor(Ft)],Na.prototype,"slots");let On=Na;var tp=Object.defineProperty,$a=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&tp(t,i,r),r};const hr=class Kl{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"scheduleDayId");l(this,"placeId");l(this,"sessions",[]);l(this,"slots",[]);P.H.Classes.BuildClass(this,t)}static Create(t,i){const o=new Kl;return o.id=P.H.Id.UUID(),o.placeId=t,o.scheduleDayId=i,o}addSession(){const t=On.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ft.Create(this.id);return this.slots.push(t),t}};$a([P.H.Classes.GetClassConstructor(On)],hr.prototype,"sessions"),$a([P.H.Classes.GetClassConstructor(Ft)],hr.prototype,"slots");let mi=hr;var np=Object.defineProperty,ip=(n,t,i,o)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,i,r)||r);return r&&np(t,i,r),r};const Va=class ec{constructor(t){l(this,"id");l(this,"date",new Date(0));l(this,"description","");l(this,"ownerId");l(this,"ownerType","");l(this,"schedules",[]);P.H.Classes.BuildClass(this,t)}static Create(t,i,o=new Date){const r=new ec;return r.id=P.H.Id.UUID(),r.ownerId=t,r.ownerType=i||"",r.date=o,r}};ip([P.H.Classes.GetClassConstructor(mi)],Va.prototype,"schedules");let no=Va;class Ln{constructor(t){l(this,"id");l(this,"name","");l(this,"description","");l(this,"color","");P.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=P.H.Id.UUID(),t}}const op=Object.freeze(Object.defineProperty({__proto__:null,Schedule:mi,ScheduleDay:no,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),fe=n=>n?P.H.Time.HMtoM(n):NaN,rt=n=>P.H.Time.ConcatHM(Math.floor(n/60),n%60),vn=n=>{if(!n)return"";const t=P.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},hi=(n,t)=>P.H.Time.DiffM(n,t),pn=(n,t)=>P.H.Time.AddMtoHM(n,t),pr=(n,t)=>{const i=fe(n.startTime),o=fe(t.startTime);return isFinite(i)?isFinite(o)?i-o:-1:1},pi=(n,t)=>{const i=fe(n.startTime),o=fe(n.endTime),r=fe(t.startTime),s=fe(t.endTime);return!isFinite(i)||!isFinite(o)||!isFinite(r)||!isFinite(s)?!1:i<s&&r<o},gi=(n,t)=>Math.round(n/t)*t,Ia=(n,t=8*60,i=20*60)=>{let o=t,r=i;for(const{item:d}of n){const c=fe(d.startTime),u=fe(d.endTime);isFinite(c)&&(o=Math.min(o,c)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(o/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Ma=(n,t)=>{const i=fe(n.item.startTime),o=fe(n.item.endTime);if(!isFinite(i)||!isFinite(o))return{top:"0%",height:"48px"};const r=(i-t.start)/t.total*100,s=Math.max((o-i)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},Pa=(n,t)=>{const i=fe(n.startTime),o=fe(n.endTime);if(!isFinite(i)||!isFinite(o)||o<=i)return{top:"0%",height:"auto"};const r=o-i,s=fe(t.startTime),a=fe(t.endTime),d=isFinite(s)?Math.max((s-i)/r*100,0):0;let c=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return c=Math.min(Math.max(c,3),100-d),{top:d+"%",height:c+"%"}},Ta=(n,t,i)=>n.some(o=>o.item.id===t.item.id||t.kind==="session"&&o.kind==="slot"&&o.item.sessionId===t.item.id?!1:i(t.item,o.item)),Ra=(n,t,i)=>n.some(o=>o.id!==t.id&&i(t,o)),Da=(n,t,i,o)=>{if(!(!isFinite(t)||!isFinite(i)||i<=t))return(n||[]).find(r=>{const s=o(r.startTime),a=o(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&i<=a})},Aa=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",gr={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 no.Create(void 0,void 0,n)},createSchedule(n,t){return mi.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],i=t[t.length-1],o=(i==null?void 0:i.endTime)||"9:00",r=On.Create(n==null?void 0:n.id);return r.startTime=o,r.endTime=P.H.Time.AddMtoHM(o,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=Ln.Create();return t.name=n||"",t}},rp={class:"schedule-admin"},sp={key:0,class:"no-days text-center text-grey q-py-xl"},ap={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},lp={key:1,class:"row items-center q-gutter-xs zoom-control"},cp={key:0,class:"grid-view"},dp={key:0,class:"text-grey text-center q-py-lg"},up={class:"grid-header"},fp={class:"row items-center justify-center q-gutter-xs"},mp={class:"ellipsis"},hp={class:"time-gutter"},pp=["data-schedule-id","onDblclick"],gp=["title","onPointerdown","onClick"],yp={class:"block-content"},wp={class:"block-time"},bp={class:"block-name ellipsis"},Sp={key:0,class:"block-speakers ellipsis"},Cp={key:0,class:"session-perfoms"},kp=["title","onPointerdown","onClick"],xp={class:"nested-time"},Ep={class:"nested-name ellipsis"},Bp={key:0,class:"nested-speakers ellipsis"},Np=["title","onPointerdown"],$p={class:"block-actions"},Vp=["title","onPointerdown"],Ip=["title"],Mp={class:"session-spine-name"},Pp={class:"block-time"},Tp={key:0,class:"session-badge"},Rp={key:1,class:"conflict-badge"},Dp={class:"block-name ellipsis"},Ap={class:"text-caption text-grey-6 q-pa-xs"},zp={key:1,class:"list-view"},_p={class:"row items-center q-gutter-sm"},Fp={class:"text-subtitle2"},Op={key:0,class:"sub-block"},Lp={class:"sub-title"},vp={class:"list-row session-row"},Hp={key:0,class:"nested-list"},Up={class:"col-4 ellipsis"},qp={class:"time-text"},jp={class:"sub-block"},Wp={class:"sub-title"},Gp={class:"list-row slot-row"},Qp={key:0,class:"text-grey text-center q-py-sm"},Yp={class:"text-caption text-grey-6 q-mb-sm"},Xp={class:"text-h6"},Zp={class:"row items-center q-gutter-sm q-mb-md"},Jp={key:0,class:"text-grey text-center q-py-md"},Kp={class:"col ellipsis"},eg={class:"text-h6"},tg={class:"row q-col-gutter-sm q-mb-sm"},ng={class:"col-6"},ig={class:"col-6"},gn=15,_a=6,Fa=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}},setup(n){var Hl,Ul;const t=n,i=e.computed(()=>({...gr,...t.labels})),o=e.computed(()=>({...za,...t.factories})),r=p=>t.slotListOf?t.slotListOf(p):(p==null?void 0:p.slots)||[],s=p=>t.nestedSlotListOf?t.nestedSlotListOf(p):(p==null?void 0:p.slots)||[],a=p=>(p==null?void 0:p.name)||i.value.hall,d=p=>t.sessionName?t.sessionName(p):(p==null?void 0:p.name)||`${i.value.session} ${(p==null?void 0:p.startTime)||""}–${(p==null?void 0:p.endTime)||""}`.trim(),c=p=>t.slotName?t.slotName(p):(p==null?void 0:p.name)||i.value.slot,u=p=>t.slotSubtitle?t.slotSubtitle(p):"",f=e.ref("grid"),m=e.ref((Ul=(Hl=t.days)==null?void 0:Hl[0])==null?void 0:Ul.id),h=e.ref(!1),w=e.ref(""),y=e.ref(!1),S=e.ref(null),E=e.ref(null),x=e.ref(void 0),V=e.ref(null),k=e.ref(null),T=e.ref(!1),M=e.ref(0),A=e.ref(null),Q=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],se=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(se,p=>localStorage.setItem("schedule-grid-zoom",String(p)));const _e=e.computed(()=>Math.max(ke.value.total/60*se.value,360)),Ne=e.computed(()=>_e.value+"px"),Se=e.computed(()=>[...t.days||[]].sort((p,g)=>new Date(p.date).getTime()-new Date(g.date).getTime())),he=e.computed(()=>Se.value.find(p=>p.id===m.value));e.watch(()=>Se.value.map(p=>p.id).join(","),()=>{var p;(!m.value||!Se.value.some(g=>g.id===m.value))&&(m.value=(p=Se.value[0])==null?void 0:p.id)});const at=p=>{if(t.dayTitle)return t.dayTitle(p);const g=new Date(p.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},$e=p=>{const g=new Date(p);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Pt=async(p,g)=>{g&&(p.date=new Date(g),await t.persist.updateDay(p),await t.persist.refresh())},Tt=async p=>{var C;if(!p)return;for(const R of yt(p))await le(R);await t.persist.removeDay(p);const g=(t.days||[]).indexOf(p);g>=0&&t.days.splice(g,1),await t.persist.refresh(),m.value=(C=Se.value[0])==null?void 0:C.id},Ut=async()=>{var q,J;const p=Se.value,g=p[p.length-1],C=g?new Date(new Date(g.date).getTime()+864e5):new Date;let R;try{R=o.value.createDay(C)}catch{t.persist.notify("warning",i.value.saveEventFirst);return}try{await((J=(q=t.persist).createDay)==null?void 0:J.call(q,R));for(const me of t.places||[])await G(me,R);await t.persist.refresh()}catch{t.persist.notify("negative",i.value.createFailed);return}m.value=R.id,t.persist.notify("positive",`${i.value.dayAdded}: ${at(R)}`)},yt=p=>((p==null?void 0:p.schedules)||[]).slice().sort((g,C)=>{const R=Ct(g),q=Ct(C);return R.localeCompare(q,"ru")}),Ct=p=>{if(t.hallName)return t.hallName(p);const g=p.place||(t.places||[]).find(C=>C.id===p.placeId);return(g==null?void 0:g.name)||i.value.hall},it=()=>{h.value=!0},Ce=e.computed(()=>{const p=he.value,g=new Set(((p==null?void 0:p.schedules)||[]).map(C=>C.placeId));return(t.places||[]).filter(C=>!g.has(C.id))}),G=async(p,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(p,g,o.value.createSchedule);return}const C=o.value.createSchedule(p.id,g.id);await t.persist.createSchedule(C)},je=async p=>{h.value=!1;const g=he.value;if(!g){t.persist.notify("warning",i.value.selectDayFirst);return}if(yt(g).some(C=>C.placeId===p.id)){t.persist.notify("warning",i.value.alreadyAdded);return}try{await G(p,g)}catch(C){console.warn("addPlaceToDay failed:",C),t.persist.notify("negative",i.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),m.value=g.id},Rt=async()=>{var C,R,q;const p=(C=w.value)==null?void 0:C.trim();if(!p){t.persist.notify("warning",i.value.enterName);return}const g=o.value.createPlace(p);try{if(!await((q=(R=t.persist).createPlace)==null?void 0:q.call(R,g))){t.persist.notify("negative",i.value.hallCreateFailed);return}}catch(J){console.warn("createPlace failed:",J),t.persist.notify("negative",i.value.hallCreateFailed);return}w.value="",await je(g),t.persist.notify("positive",i.value.hallCreated.replace("{name}",p))},we=async p=>{await le(p);const g=Ye(p);g&&(g.schedules=(g.schedules||[]).filter(C=>C.id!==p.id)),await t.persist.refresh()},le=async p=>{for(const g of p.sessions||[]){for(const C of s(g))await t.persist.removeSlot(C);await t.persist.removeSession(g)}for(const g of r(p))await t.persist.removeSlot(g);await t.persist.removeSchedule(p)},Ye=p=>(t.days||[]).find(g=>(g.schedules||[]).some(C=>C.id===p.id)),Xe=p=>[...s(p)].sort(pr),Gn=p=>(p.sessions||[]).some(g=>s(g).length>0),Je=new WeakMap,qt=p=>{const g=Je.get(p),C=r(p);if(g&&g.src===C)return g.list;const R=new Set((p.sessions||[]).map(J=>J.id)),q=C.filter(J=>!J.sessionId||!R.has(J.sessionId));return Je.set(p,{src:C,list:q}),q},Te=p=>[...(p.sessions||[]).map(g=>({kind:"session",item:g})),...qt(p).map(g=>({kind:"slot",item:g}))],wn=p=>(p.sessions||[]).map(g=>({kind:"session",item:g})),ke=e.computed(()=>{var g,C;const p=(((g=he.value)==null?void 0:g.schedules)||[]).flatMap(R=>Te(R));for(const R of((C=he.value)==null?void 0:C.schedules)||[])for(const q of R.sessions||[])p.push(...Xe(q).map(J=>({kind:"slot",item:J})));return Ia(p)}),Ke=e.computed(()=>{const p=[];for(let g=ke.value.start;g<=ke.value.end;g+=60)p.push({min:g,label:rt(g)});return p}),ee=e.computed(()=>{const p=[];for(let g=ke.value.start+30;g<ke.value.end;g+=60)p.push({min:g,label:rt(g)});return p}),Re=p=>Ma(p,ke.value),lt=e.computed(()=>{if(!V.value||!E.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(E.value.duration/p.total*100,2.5);return{top:g+"%",height:C+"%"}}),ct=e.computed(()=>!V.value||!E.value?"":rt(V.value.minutes+E.value.duration)),bn=e.computed(()=>{if(!V.value)return{};const p=ke.value,g=(V.value.minutes-p.start)/p.total*100,C=Math.max(gn/p.total*100,1.5);return{top:g+"%",height:C+"%"}}),kt=e.computed(()=>{var q,J,me,Me,De;if(!V.value||!E.value||!E.value.id)return 0;const p=Si(V.value.scheduleId);if(!p)return 0;const g={startTime:V.value.time,endTime:ct.value},C=(q=V.value.session)==null?void 0:q.id;let R=0;for(const D of Te(p))D.item.id!==((J=E.value)==null?void 0:J.id)&&(((me=E.value)==null?void 0:me.kind)==="slot"&&D.kind==="session"&&D.item.id===C||pi(g,D.item)&&R++);if(((Me=E.value)==null?void 0:Me.kind)==="slot"&&V.value.session)for(const D of Xe(V.value.session))D.id!==((De=E.value)==null?void 0:De.id)&&pi(g,D)&&R++;return R}),Dt=e.computed(()=>kt.value>0),wo=(p,g)=>Ta(Te(p),g,pi),Fr=(p,g)=>Ra(Xe(p),g,pi),Or=(p,g)=>Pa(p,g),Sn=p=>{const g=ke.value,C=fe(p.item.startTime),R=fe(p.item.endTime);return!isFinite(C)||!isFinite(R)?48:(R-C)/g.total*_e.value},Qn=p=>Aa(Sn(p)),Lr=p=>{const g=t.slotName?t.slotName(p.item):p.item.name||(p.kind==="session"?i.value.session:i.value.slot);if(p.kind==="slot"&&Qn(p)!=="h-full"){const C=u(p.item);if(C)return`${g} — ${C}`}return g},vr=(p,g)=>{const C=c(p);if(g!=="h-full"){const R=u(p);if(R)return`${C} — ${R}`}return C},bi=p=>{const g=`${p.item.startTime||"?"}–${p.item.endTime||"?"}`;if(p.kind==="slot"){const C=u(p.item);return[c(p.item),g,C?`${i.value.participants}: ${C}`:""].filter(Boolean).join(`
23
23
  `)}return[d(p.item),g].filter(Boolean).join(`
24
- `)},x=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
- `)},$=(p,g)=>{var S;return{conflict:Nr(p.item,g),dragging:((S=pt.value)==null?void 0:S.perfom.id)===g.id,[Un(p)]:!0}},V=t.ref(null),z=(p,g)=>{const S=p.getBoundingClientRect(),I=Math.min(Math.max((g-S.top)/S.height,0),1);return be.value.start+li(I*be.value.total,dn)},Y=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||R.value||(V.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ee),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",te),window.addEventListener("keydown",he))},Ee=p=>{const g=V.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Ba)return;g.moved=!0;const S=si(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"?i.value.session:i.value.slot),duration:isFinite(S)&&S>0?S:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Be(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Be=(p,g)=>{var $e,Te;const S=document.elementFromPoint(p,g),I=S==null?void 0:S.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id");if(!I||!H){E.value=void 0,N.value=null;return}const X=mi(H);if(!X)return;E.value=X.id;const ue=z(I,g);N.value={scheduleId:X.id,minutes:ue,time:it(ue),hallName:wt(X),...(($e=B.value)==null?void 0:$e.kind)==="slot"?{session:Ar(X.sessions,ue,ue+(((Te=B.value)==null?void 0:Te.duration)||30),de)}:{}},k.value={x:p,y:g}},ne=(p,g)=>{const S=Z.value;if(!S)return;const I=S.getBoundingClientRect();g<I.top+48?S.scrollTop-=14:g>I.bottom-48&&(S.scrollTop+=14),p<I.left+48?S.scrollLeft-=14:p>I.right-48&&(S.scrollLeft+=14)},F=p=>{O(p)},O=async p=>{const g=V.value;if(L(),V.value=null,!g||!g.moved)return;v.value=Date.now();const S=document.elementFromPoint(p.clientX,p.clientY),I=S==null?void 0:S.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?mi(H):void 0;if(I&&X){const ue=z(I,p.clientY);await xl(X,ue)}U()},L=()=>{window.removeEventListener("pointermove",Ee),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",he)},U=()=>{V.value=null,B.value=null,E.value=void 0,N.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",v.value=Date.now()},te=()=>{L(),U()},he=p=>{p.key==="Escape"&&te()};t.onBeforeUnmount(()=>{L(),Rr(),document.body.style.userSelect="",document.body.style.cursor=""});const ye=p=>{if(!p)return null;for(const g of e.days||[])for(const S of g.schedules||[]){const I=(S.sessions||[]).find(X=>X.id===p);if(I)return{kind:"session",item:I,schedule:S};const H=r(S).find(X=>X.id===p);if(H)return{kind:"slot",item:H,schedule:S}}return null},at=()=>{var p;return ye((p=B.value)==null?void 0:p.id)},ho=(p,g)=>{g.preventDefault(),g.stopPropagation();const S=p.item,I=de(S.startTime),H=de(S.endTime);if(!isFinite(I)||!isFinite(H))return;const X=g.clientY;R.value=!0;const ue=P=>{const Q=(P.clientY-X)/fe.value*60,J=li(H+Q,dn);S.endTime=it(Math.max(J,I+dn))},$e=async()=>{window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",Te),R.value=!1,v.value=Date.now();const P=ye(S.id);P&&(await St(S,P.kind),await e.persist.refresh())},Te=()=>{$e()};window.addEventListener("pointermove",ue),window.addEventListener("pointerup",Te)},pt=t.ref(null),Tr=(p,g,S)=>{if(S.target.closest(".nested-edit, .nested-resize")||S.button!==0||R.value)return;const I=S.target.closest(".session-perfoms"),H=de(p.startTime),X=de(p.endTime),ue=si(g.startTime,g.endTime);!I||!isFinite(H)||!isFinite(X)||X<=H||(pt.value={perfom:g,session:p,startX:S.clientX,startY:S.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:H,sessionDur:X-H,durMin:isFinite(ue)&&ue>0?ue:30,container:I},window.addEventListener("pointermove",Sl),window.addEventListener("pointerup",Cl),window.addEventListener("pointercancel",Pr),window.addEventListener("keydown",kl))},Sl=p=>{const g=pt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<Ba)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const S=g.container.getBoundingClientRect(),I=Math.min(Math.max((p.clientY-S.top)/S.height,0),1);let H=g.sessionStart+li(I*g.sessionDur,dn);const X=g.sessionStart+g.sessionDur-g.durMin;H=Math.min(Math.max(H,g.sessionStart),Math.max(X,g.sessionStart)),g.perfom.startTime=it(H),g.perfom.endTime=it(H+g.durMin),k.value={x:p.clientX,y:p.clientY}},Cl=p=>{$w(p)},$w=async p=>{var ue;const g=pt.value;if(Rr(),pt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;v.value=Date.now();const S=document.elementFromPoint(p.clientX,p.clientY),I=S==null?void 0:S.closest(".hall-col"),H=I==null?void 0:I.getAttribute("data-schedule-id"),X=H?mi(H):void 0;if(I&&X){B.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const $e=z(I,p.clientY),Te=it($e),P=si(g.perfom.startTime,g.perfom.endTime),Q=cn(Te,P>0?P:30),J=((ue=$l(g.perfom))==null?void 0:ue.id)===X.id&&g.perfom.startTime===Te&&g.perfom.endTime===Q;await xl(X,$e),J&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh()),B.value=null;return}g.perfom.startTime=Dn(g.perfom.startTime),g.perfom.endTime=Dn(g.perfom.endTime),g.perfom.startTime&&(await e.persist.updateSlot(g.perfom),await e.persist.refresh())},Pr=()=>{const p=pt.value;Rr(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),pt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Rr=()=>{window.removeEventListener("pointermove",Sl),window.removeEventListener("pointerup",Cl),window.removeEventListener("pointercancel",Pr),window.removeEventListener("keydown",kl)},kl=p=>{p.key==="Escape"&&Pr()},Nw=(p,g,S)=>{S.preventDefault(),S.stopPropagation();const I=de(p.startTime),H=de(p.endTime),X=de(g.startTime),ue=S.target.closest(".nested-perfom"),$e=ue==null?void 0:ue.closest(".session-perfoms");if(!ue||!$e||!isFinite(I)||!isFinite(H)||H<=I||!isFinite(X))return;const Te=$e.getBoundingClientRect(),P=H-I;R.value=!0;const Q=gn=>{const Rw=Math.min(Math.max((gn.clientY-Te.top)/Te.height,0),1),Aw=Math.min(Math.max(X+dn,I+li(Rw*P,dn)),H);g.endTime=it(Aw)},J=async()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",q),R.value=!1,v.value=Date.now(),await e.persist.updateSlot(g),await e.persist.refresh()},q=()=>{J()};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",q)},xl=async(p,g)=>{var Q;E.value=void 0,N.value=null,k.value=null;const S=at();if(!S)return;const I=it(g),H=si(S.item.startTime,S.item.endTime),X=cn(I,H>0?H:30);if(((Q=S.schedule)==null?void 0:Q.id)===p.id&&S.item.startTime===I&&S.item.endTime===X)return;const ue=S.item.startTime;if(S.item.startTime=I,S.item.endTime=X,S.kind==="slot"){const J=Ar(p.sessions,de(I),de(X),de);J?S.item.sessionId=J.id:delete S.item.sessionId}if(S.kind==="session"){const J=de(I)-de(ue);for(const q of Ge(S.item))q.startTime&&(q.startTime=cn(q.startTime,J),q.endTime&&(q.endTime=cn(q.endTime,J)),q.scheduleId=p.id,await St(q,"slot"))}const $e=S.schedule,Te=S.kind==="session"?p.sessions:r(p),P=S.item;if($e&&$e.id!==p.id){P.scheduleId=p.id;const J=S.kind==="session"?$e.sessions:r($e);T.H.Classes.RemoveFromClassById(P.id,J,[]),Te.push(P)}await St(P,S.kind),await e.persist.refresh()},Mw=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const S=z(g.currentTarget,g.clientY),I=o.value.createSlot(p);I.startTime=it(S),I.endTime=it(S+30);const H=Ar(p.sessions,S,S+30,de);H!=null&&H.id&&(I.sessionId=H.id),await e.persist.createSlot(I),await e.persist.refresh();const X=ye(I.id);X&&pi(X)},El=async(p,g,S)=>{if(p.added){if(p.added.element.scheduleId=g.id,S==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(H=>H.id===p.added.element.sessionId)||delete p.added.element.sessionId),await St(p.added.element,S),S==="session")for(const I of s(p.added.element))I.scheduleId=g.id,await e.persist.updateSlot(I);await e.persist.refresh()}},mi=p=>{for(const g of e.days||[]){const S=(g.schedules||[]).find(I=>I.id===p);if(S)return S}},Ar=(p,g,S,I)=>ka(p,g,S,I),Bl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),$l=p=>{for(const g of e.days||[])for(const S of g.schedules||[])if(r(S).some(I=>I.id===p.id)||p.sessionId&&(S.sessions||[]).some(I=>I.id===p.sessionId))return S},Nl=t.computed(()=>{const p=C.value;if(p)return p.kind==="session"?mi(p.item.scheduleId)||Iw(p.item):$l(p.item)}),Vw=t.computed(()=>{const p=C.value;return!p||p.kind!=="slot"?[]:Bl(Nl.value)}),Iw=(p,g)=>{for(const S of e.days||[])for(const I of S.schedules||[])if((I.sessions||[]).some(H=>H.id===p.id))return I},Ml=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await e.persist.updateSlot(p),await e.persist.refresh()},Vl=async p=>{const g=o.value.createSession(p);await e.persist.createSession(g),await e.persist.refresh()},Il=async p=>{const g=o.value.createSlot(p),S=[...r(p)].sort(ir).slice(-1)[0];g.startTime=Dn(S==null?void 0:S.endTime)||"9:00",g.endTime=cn(g.startTime,30),await e.persist.createSlot(g),await e.persist.refresh()},zr=async(p,g)=>{if(g==="slot")await e.persist.removeSlot(p);else{for(const S of s(p))delete S.sessionId,await e.persist.updateSlot(S);await e.persist.removeSession(p)}await e.persist.refresh()},St=async(p,g)=>{const S=Dn(p.startTime),I=Dn(p.endTime);if(!S){e.persist.notify("warning",i.value.correctStartTime);return}p.startTime=S,p.endTime=I||cn(S,30),g==="slot"?await e.persist.updateSlot(p):await e.persist.updateSession(p)},pi=p=>{R.value||Date.now()-v.value<400||(C.value={kind:p.kind,item:p.item},y.value=!0)},Tw=async()=>{const p=C.value;p&&(await St(p.item,p.kind),y.value=!1,C.value=null,await e.persist.refresh())},Pw=async()=>{const p=C.value;p&&(await zr(p.item,p.kind),y.value=!1,C.value=null)};return e.persist.loadOptions&&e.persist.loadOptions(),(p,g)=>{var $e,Te;const S=t.resolveComponent("PButton"),I=t.resolveComponent("PInput"),H=t.resolveComponent("PTooltip"),X=t.resolveComponent("PSelect"),ue=t.resolveComponent("PDialog");return t.openBlock(),t.createElementBlock("div",um,[($e=n.days)!=null&&$e.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",hm,[t.createVNode(t.unref(M.QTabs),{modelValue:h.value,"onUpdate:modelValue":g[0]||(g[0]=P=>h.value=P),dense:"",class:"day-tabs","active-color":"primary"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ae.value,P=>(t.openBlock(),t.createBlock(t.unref(M.QTab),{key:P.id,name:P.id,label:fn(P)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),t.createVNode(t.unref(M.QSpace)),ke.value?(t.openBlock(),t.createBlock(I,{key:0,"model-value":Xe(ke.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=P=>Nt(ke.value,P))},null,8,["model-value","label"])):t.createCommentVNode("",!0),t.createVNode(S,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!ke.value,onClick:g[2]||(g[2]=P=>Mt(ke.value))},null,8,["label","disable"]),t.createVNode(S,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:Ot},null,8,["label"]),t.createVNode(S,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:nt},null,8,["label"]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",mm,[t.createVNode(t.unref(M.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),t.createVNode(t.unref(M.QBtnToggle),{modelValue:fe.value,"onUpdate:modelValue":g[3]||(g[3]=P=>fe.value=P),"toggle-color":"primary",options:K,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=P=>f.value=P),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(t.openBlock(),t.createElementBlock("div",pm,[mt(ke.value).length?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:Z,class:"grid-scroll"},[t.createElementVNode("div",{class:"grid-wrap",style:t.normalizeStyle({"--halls":mt(ke.value).length,"--hours":Math.max(be.value.total/60,1),"--half-hours":Math.max(be.value.total/60*2,2)})},[t.createElementVNode("div",ym,[g[15]||(g[15]=t.createElementVNode("div",{class:"time-gutter"},null,-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),P=>(t.openBlock(),t.createElementBlock("div",{key:P.id,class:t.normalizeClass(["hall-head",{"drag-over":E.value===P.id}])},[t.createElementVNode("div",wm,[t.createVNode(t.unref(M.QIcon),{name:"meeting_room",size:"15px"}),t.createElementVNode("span",bm,t.toDisplayString(wt(P)),1),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:Q=>Il(P)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:Q=>Vl(P)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(P)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),t.createElementVNode("div",{class:"grid-body",style:t.normalizeStyle({height:Ye.value})},[t.createElementVNode("div",Sm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Je.value,P=>(t.openBlock(),t.createElementBlock("div",{key:P.min,class:"hour-label",style:t.normalizeStyle({top:(P.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(P.label),5))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,P=>(t.openBlock(),t.createElementBlock("div",{key:P.min,class:"half-label",style:t.normalizeStyle({top:(P.min-be.value.start)/be.value.total*100+"%"})},t.toDisplayString(P.label),5))),128))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),P=>(t.openBlock(),t.createElementBlock("div",{key:P.id,class:t.normalizeClass(["hall-col",{"drag-over":E.value===P.id}]),"data-schedule-id":P.id,onDblclick:Q=>Mw(P,Q)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ve(P),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:Q.item.id,class:t.normalizeClass(["timeline-block",[Q.kind,{conflict:fo(P,Q),dragging:((J=B.value)==null?void 0:J.id)===Q.item.id},Un(Q)]]),style:t.normalizeStyle(Ie(Q)),title:hi(Q),onPointerdown:q=>Y(Q,q),onClick:q=>pi(Q)},[t.createVNode(t.unref(M.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createElementVNode("div",xm,[t.createElementVNode("div",Em,t.toDisplayString(Q.item.startTime)+"–"+t.toDisplayString(Q.item.endTime),1),t.createElementVNode("div",Bm,t.toDisplayString(Vr(Q)),1),Q.kind==="slot"&&u(Q.item)?(t.openBlock(),t.createElementBlock("div",$m,t.toDisplayString(u(Q.item)),1)):t.createCommentVNode("",!0)]),Q.kind==="session"&&Ge(Q.item).length?(t.openBlock(),t.createElementBlock("div",Nm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ge(Q.item),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:t.normalizeClass(["nested-perfom",$(Q,q)]),style:t.normalizeStyle(Mr(Q.item,q)),title:x(q),onPointerdown:t.withModifiers(gn=>Tr(Q.item,q,gn),["stop"]),onClick:t.withModifiers(gn=>pi({kind:"slot",item:q}),["stop"])},[t.createElementVNode("div",Vm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createElementVNode("div",Im,t.toDisplayString(Ir(q,Un(Q))),1),u(q)?(t.openBlock(),t.createElementBlock("div",Tm,t.toDisplayString(u(q)),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),t.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(gn=>Nw(Q.item,q,gn),["stop","prevent"])},null,40,Pm)],46,Mm))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",Rm,[fo(P,Q)?(t.openBlock(),t.createBlock(t.unref(M.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:t.withModifiers(q=>pi(Q),["stop"])},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),t.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:t.withModifiers(q=>ho(Q,q),["stop","prevent"])},null,40,Am)],46,km)}),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(hn(P),Q=>{var J;return t.openBlock(),t.createElementBlock("div",{key:"spine-"+Q.item.id,class:t.normalizeClass(["session-spine",{dragging:((J=B.value)==null?void 0:J.id)===Q.item.id}]),style:t.normalizeStyle(Ie(Q)),title:d(Q.item)},[t.createVNode(t.unref(M.QIcon),{name:"groups",size:"11px"}),t.createElementVNode("span",Dm,t.toDisplayString(d(Q.item)),1)],14,zm)}),128)),N.value&&N.value.scheduleId===P.id&&B.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["drop-zone",{conflict:It.value}]),style:t.normalizeStyle(mn.value)},null,6)):t.createCommentVNode("",!0),N.value&&N.value.scheduleId===P.id&&B.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["drop-preview",[B.value.kind,{conflict:It.value}]]),style:t.normalizeStyle(rt.value)},[t.createElementVNode("div",vm,[t.createTextVNode(t.toDisplayString(N.value.time)+"–"+t.toDisplayString(st.value)+" ",1),N.value.session?(t.openBlock(),t.createElementBlock("span",Fm,t.toDisplayString(i.value.intoSession),1)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock("span",_m," ⚠ "+t.toDisplayString(i.value.conflictCount)+": "+t.toDisplayString(bt.value),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",Om,t.toDisplayString(B.value.name),1)],6)):t.createCommentVNode("",!0)],42,Cm))),128))],4),t.createElementVNode("div",Lm,t.toDisplayString(i.value.gridHint),1)],4)],512)):(t.openBlock(),t.createElementBlock("div",gm,[t.createTextVNode(t.toDisplayString(i.value.noHalls)+" ",1),t.createVNode(S,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:nt},null,8,["label"])])),k.value&&N.value?(t.openBlock(),t.createElementBlock("div",{key:2,class:"drag-time-chip",style:t.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[t.createVNode(t.unref(M.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(N.value.time)+" · "+t.toDisplayString(N.value.hallName)+" ",1),N.value.session?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[g[16]||(g[16]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(M.QIcon),{name:"groups",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(i.value.intoSession)+" «"+t.toDisplayString(d(N.value.session))+"» ",1)],64)):t.createCommentVNode("",!0),bt.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[g[17]||(g[17]=t.createTextVNode(" · ",-1)),t.createVNode(t.unref(M.QIcon),{name:"warning",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(bt.value),1)],64)):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0),(Te=pt.value)!=null&&Te.moved&&k.value?(t.openBlock(),t.createElementBlock("div",{key:3,class:"drag-time-chip",style:t.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[t.createVNode(t.unref(M.QIcon),{name:"schedule",size:"12px"}),t.createTextVNode(" "+t.toDisplayString(pt.value.perfom.startTime)+"–"+t.toDisplayString(pt.value.perfom.endTime)+" · "+t.toDisplayString(i.value.intoSession),1)],4)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Hm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(mt(ke.value),P=>(t.openBlock(),t.createBlock(t.unref(M.QCard),{key:P.id,class:"hall-card q-mb-md"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCardSection),{class:"hall-card-head"},{default:t.withCtx(()=>[t.createElementVNode("div",Um,[t.createVNode(t.unref(M.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),t.createElementVNode("span",jm,t.toDisplayString(wt(P)),1),t.createVNode(t.unref(M.QSpace)),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:Q=>Vl(P)},null,8,["label","onClick"]),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:Q=>Il(P)},null,8,["label","onClick"]),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>ge(P)},{default:t.withCtx(()=>[t.createVNode(H,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),t.createVNode(t.unref(M.QCardSection),{class:"q-pt-none"},{default:t.withCtx(()=>{var Q;return[(Q=P.sessions)!=null&&Q.length?(t.openBlock(),t.createElementBlock("div",qm,[t.createElementVNode("div",Wm,[t.createVNode(t.unref(M.QIcon),{name:"groups",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.sessionsTitle),1)]),t.createVNode(t.unref(po),{list:P.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,P,"session")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Gm,[t.createVNode(t.unref(M.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.renderSlot(p.$slots,"session-row-extra",{element:J,schedule:P},void 0,!0),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>zr(J,"session")},null,8,["onClick"])]),Ge(J).length?(t.openBlock(),t.createElementBlock("div",Qm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ge(J),q=>(t.openBlock(),t.createElementBlock("div",{key:q.id,class:"list-row nested-row"},[t.createVNode(t.unref(M.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),t.createElementVNode("div",Ym,t.toDisplayString(c(q)),1),t.createElementVNode("div",Xm,t.toDisplayString(q.startTime)+"–"+t.toDisplayString(q.endTime),1),t.createVNode(t.unref(M.QSpace)),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:gn=>pi({kind:"slot",item:q})},null,8,["onClick"])]))),128))])):t.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Zm,[t.createElementVNode("div",Jm,[t.createVNode(t.unref(M.QIcon),{name:"mic",size:"15px"}),t.createTextVNode(" "+t.toDisplayString(i.value.slotsTitle),1)]),t.createVNode(t.unref(po),{list:Lt(P),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>El(J,P,"slot")},{item:t.withCtx(({element:J})=>[t.createElementVNode("div",Km,[t.createVNode(t.unref(M.QIcon),{name:"drag_indicator",class:"drag-handle"}),t.createVNode(I,{"model-value":J.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":q=>J.name=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.startTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(I,{"model-value":J.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":q=>J.endTime=q,onBlur:q=>St(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),t.createVNode(X,{"model-value":J.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Bl(P),"option-value":"id","option-label":"label","onUpdate:modelValue":q=>Ml(J,q)},null,8,["model-value","label","options","onUpdate:modelValue"]),t.renderSlot(p.$slots,"slot-row-extra",{element:J,schedule:P},void 0,!0),t.createVNode(S,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:q=>zr(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Lt(P).length&&!Hn(P)?(t.openBlock(),t.createElementBlock("div",ep,t.toDisplayString(i.value.noSlotsInDay),1)):t.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),t.createElementVNode("div",tp,t.toDisplayString(i.value.listHint),1)]))],64)):(t.openBlock(),t.createElementBlock("div",fm,[t.createVNode(t.unref(M.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),t.createElementVNode("div",null,t.toDisplayString(i.value.noDays),1),t.createVNode(S,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:Ot},null,8,["label"])])),t.createVNode(ue,{modelValue:m.value,"onUpdate:modelValue":g[7]||(g[7]=P=>m.value=P)},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCard),{style:{width:"700px","max-width":"80vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",np,t.toDisplayString(i.value.addHall),1)]),_:1}),t.createVNode(t.unref(M.QCardSection),null,{default:t.withCtx(()=>[t.createElementVNode("div",ip,[t.createVNode(I,{modelValue:w.value,"onUpdate:modelValue":g[5]||(g[5]=P=>w.value=P),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:t.withKeys(Vt,["enter"])},null,8,["modelValue","label"]),t.createVNode(S,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:Vt},null,8,["label"])]),t.renderSlot(p.$slots,"places-list",{day:ke.value,add:He},()=>[we.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",op,t.toDisplayString(i.value.noHalls),1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(we.value,P=>(t.openBlock(),t.createElementBlock("div",{key:P.id,class:"place-row row items-center q-gutter-sm"},[t.createVNode(t.unref(M.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),t.createElementVNode("span",rp,t.toDisplayString(a(P)),1),t.createVNode(S,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:Q=>He(P)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),t.createVNode(t.unref(M.QCardActions),{align:"right"},{default:t.withCtx(()=>[t.createVNode(S,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=P=>m.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),t.createVNode(ue,{modelValue:y.value,"onUpdate:modelValue":g[14]||(g[14]=P=>y.value=P)},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCard),{style:{width:"640px","max-width":"90vw"}},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCardSection),null,{default:t.withCtx(()=>{var P;return[t.createElementVNode("div",sp,t.toDisplayString(((P=C.value)==null?void 0:P.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),C.value?(t.openBlock(),t.createBlock(t.unref(M.QCardSection),{key:0,class:"q-pt-none"},{default:t.withCtx(()=>[t.createVNode(I,{modelValue:C.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=P=>C.value.item.name=P),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),t.createElementVNode("div",ap,[t.createElementVNode("div",lp,[t.createVNode(I,{modelValue:C.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=P=>C.value.item.startTime=P),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),t.createElementVNode("div",cp,[t.createVNode(I,{modelValue:C.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=P=>C.value.item.endTime=P),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),C.value.kind==="slot"?(t.openBlock(),t.createBlock(X,{key:0,"model-value":C.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Vw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=P=>Ml(C.value.item,P))},null,8,["model-value","label","options"])):t.createCommentVNode("",!0),t.renderSlot(p.$slots,"edit-form",{kind:C.value.kind,item:C.value.item,schedule:Nl.value},void 0,!0),C.value.kind==="slot"?(t.openBlock(),t.createBlock(I,{key:1,modelValue:C.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=P=>C.value.item.description=P),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):t.createCommentVNode("",!0)]),_:3})):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QCardActions),{align:"right"},{default:t.withCtx(()=>[C.value?(t.openBlock(),t.createBlock(S,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:Pw},null,8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QSpace)),t.createVNode(S,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=P=>y.value=!1)},null,8,["label"]),t.createVNode(S,{label:i.value.save,color:"primary",onClick:Tw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),dp={class:"schedule-timeline"},up={key:0,class:"timeline-container"},fp={class:"day-header"},hp={class:"day-title"},mp={class:"timeline"},pp={key:0,class:"schedule-place"},gp={class:"events-column"},yp={key:0,class:"event-item session-item"},wp={class:"event-content"},bp={class:"event-time"},Sp={class:"event-main"},Cp={class:"event-name"},kp={key:0,class:"speakers-list"},xp=["onClick"],Ep={class:"speaker-details"},Bp={class:"speaker-name"},$p={class:"bio-text"},Np=["onClick"],Mp={key:0,class:"perfom-divider"},Vp={class:"event-content"},Ip={class:"event-time"},Tp={class:"event-main"},Pp={class:"event-name"},Rp={class:"event-badges"},Ap={key:0,class:"speakers-list"},zp=["onClick"],Dp={class:"speaker-details"},vp={class:"speaker-name"},Fp={class:"bio-text"},_p={key:1,class:"no-program"},Na=A(t.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:e}){const i=n,o=e,r=t.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=k=>{if(i.dayTitle)return i.dayTitle(k);const R=new Date(k.date);return isNaN(R.getTime())||R.getFullYear()<2e3?"":R.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=k=>{var R;return i.placeName?i.placeName(k):((R=k.place)==null?void 0:R.name)||k.placeName||""},d=k=>i.slotName?i.slotName(k):(k==null?void 0:k.name)||"",c=k=>i.sessionName?i.sessionName(k):(k==null?void 0:k.name)||"",u=k=>i.slotParticipants?i.slotParticipants(k):(k==null?void 0:k.participants)||[],f=k=>i.sessionParticipants?i.sessionParticipants(k):(k==null?void 0:k.participants)||[],h=k=>{var R,v;return i.participantName?i.participantName(k):(k==null?void 0:k.name)||(k==null?void 0:k.fullName)||((v=(R=k==null?void 0:k.human)==null?void 0:R.getFullName)==null?void 0:v.call(R))||""},m=k=>i.participantBio?i.participantBio(k):(k==null?void 0:k.bio)||(k==null?void 0:k.regalias)||"",w=k=>i.slotListOf?i.slotListOf(k):(k==null?void 0:k.slots)||[],y=k=>i.nestedSlotListOf?i.nestedSlotListOf(k):(k==null?void 0:k.slots)||[],C=k=>k.schedules.filter(R=>{var v;return w(R).length>0||(((v=R.sessions)==null?void 0:v.length)||0)>0}),B=k=>{const R=[],v=new Set((k.sessions||[]).map(K=>K.id));for(const K of k.sessions||[]){R.push({kind:"session",item:K,nested:!1,index:0});for(const fe of y(K))R.push({kind:"slot",item:fe,nested:!0,index:0})}let Z=0;for(const K of w(k).filter(fe=>!fe.sessionId||!v.has(fe.sessionId)))R.push({kind:"slot",item:K,nested:!1,index:Z++});return R},E=t.computed(()=>{var k;return(k=i.days)==null?void 0:k.some(R=>{var v;return(v=R.schedules)==null?void 0:v.some(Z=>{var K;return w(Z).length>0||(((K=Z.sessions)==null?void 0:K.length)||0)>0})})}),N=(k,R)=>`${k} - ${R}`;return(k,R)=>(t.openBlock(),t.createElementBlock("div",dp,[E.value?(t.openBlock(),t.createElementBlock("div",up,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.days,v=>(t.openBlock(),t.createElementBlock("div",{key:v.id,class:"day-section"},[t.createElementVNode("div",fp,[t.createElementVNode("div",hp,[t.createVNode(t.unref(M.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),t.createTextVNode(" "+t.toDisplayString(s(v)),1)])]),t.createElementVNode("div",mp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C(v),Z=>(t.openBlock(),t.createElementBlock("div",{key:Z.id,class:"time-slot"},[a(Z)?(t.openBlock(),t.createElementBlock("div",pp,[t.createVNode(t.unref(M.QIcon),{name:"meeting_room",size:"14px"}),t.createTextVNode(" "+t.toDisplayString(a(Z)),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",gp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B(Z),K=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:K.item.id},[K.kind==="session"?(t.openBlock(),t.createElementBlock("div",yp,[t.createElementVNode("div",wp,[t.createElementVNode("div",bp,t.toDisplayString(N(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",Sp,[t.createElementVNode("div",Cp,t.toDisplayString(c(K.item)),1),f(K.item).length?(t.openBlock(),t.createElementBlock("div",kp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",Ep,[t.createElementVNode("div",Bp,[t.createVNode(t.unref(M.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",$p,t.toDisplayString(m(fe)),1)])],8,xp))),128))])):t.createCommentVNode("",!0)])])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["event-item",[{"event-active":K.item.active,"nested-item":K.nested},{clickable:i.slotClickable}]]),onClick:fe=>i.slotClickable&&o("slot-click",K.item)},[!K.nested&&K.index>0?(t.openBlock(),t.createElementBlock("div",Mp)):t.createCommentVNode("",!0),t.createElementVNode("div",Vp,[t.createElementVNode("div",Ip,t.toDisplayString(N(K.item.startTime,K.item.endTime)),1),t.createElementVNode("div",Tp,[t.createElementVNode("div",Pp,t.toDisplayString(d(K.item)),1),t.createElementVNode("div",Rp,[t.renderSlot(k.$slots,"badges",{item:K.item},void 0,!0)]),u(K.item).length?(t.openBlock(),t.createElementBlock("div",Ap,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u(K.item),fe=>(t.openBlock(),t.createElementBlock("div",{key:fe.id,class:"speaker-item",onClick:ht=>o("open-participant",fe)},[t.createElementVNode("div",Dp,[t.createElementVNode("div",vp,[t.createVNode(t.unref(M.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),t.createTextVNode(" "+t.toDisplayString(h(fe)),1)]),t.createElementVNode("div",Fp,t.toDisplayString(m(fe)),1)])],8,zp))),128))])):t.createCommentVNode("",!0)])])],10,Np))],64))),128))])]))),128))])]))),128))])):(t.openBlock(),t.createElementBlock("div",_p,[t.createVNode(t.unref(M.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),t.createElementVNode("p",null,t.toDisplayString(r.value.noProgram),1)])),t.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Op=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:$a,ScheduleTimeline:Na},Symbol.toStringTag,{value:"Module"})),Lp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:cn,blockSizeClass:xa,blockStyle:wa,byStart:ir,diffM:si,findEnclosingSession:ka,fromMin:it,gridBounds:ya,hasConflict:Sa,intersects:ai,nestedConflict:Ca,nestedSlotStyle:ba,normTime:Dn,snapMinutes:li,toMin:de},Symbol.toStringTag,{value:"Module"}));let Hp=class extends ce{constructor(){super(Xi,"schedule-days")}};const Up=new Hp;let jp=class extends ce{constructor(){super(zn,"schedule-places")}};const qp=new jp;let Wp=class extends ce{constructor(){super(An,"schedule-sessions")}};const Gp=new Wp;let Qp=class extends ce{constructor(){super(At,"schedule-slots")}};const Yp=new Qp;let Xp=class extends ce{constructor(){super(ri,"schedule-timetables")}};const Zp=new Xp,Jp=Object.freeze(Object.defineProperty({__proto__:null,C:dm,Components:Op,H:Lp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Up,SchedulePlacesStore:qp,ScheduleSessionsStore:Gp,ScheduleSlotsStore:Yp,SchedulesStore:Zp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Ea,defaultScheduleLabels:or},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Kp=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:ii},Symbol.toStringTag,{value:"Module"}));let eg=class extends ce{constructor(){super(ii,"color-themes")}};const tg=new eg,ng=Object.freeze(Object.defineProperty({__proto__:null,C:Kp,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:tg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),ig=["innerHTML"],rr=A(t.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:e}){const i=n,o=e;t.onBeforeMount(()=>{i.tabsStore.Select()});const r=s=>{i.tabsStore.Select(s),o("select")};return(s,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[t.createVNode(t.unref(M.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:t.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:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabsStore.items,d=>(t.openBlock(),t.createBlock(t.unref(M.QTab),{key:d.value,name:d.value,label:d.htmlLabel?void 0:d.label,icon:d.icon,"no-caps":""},{default:t.withCtx(()=>[d.htmlLabel?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:d.htmlLabel},null,8,ig)):t.createCommentVNode("",!0),d.alert?(t.openBlock(),t.createBlock(t.unref(M.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createTextVNode("!",-1)])]),_:1})):t.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),t.createVNode(t.unref(M.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabsStore.items,d=>(t.openBlock(),t.createBlock(t.unref(M.QTabPanel),{key:d.value,name:d.value,class:"tab-panel"},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{item:d,tab:d},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),Ne=t.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:me.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const e=n,i=t.useAttrs(),o=t.computed(()=>{const E={};for(const N of Object.keys(i))["disable","color","size","flat","outline","unelevated","type"].includes(N)||(E[N]=i[N]);return E}),r=["submit","button","reset"],s=t.computed(()=>r.includes(e.type)),a=t.computed(()=>s.value?e.type:void 0),d=t.computed(()=>s.value?me.Primary:e.type),c=t.computed(()=>{const E={};return e.margin&&(E.margin=e.margin),e.padding&&(E.padding=e.padding),e.width&&(E.maxWidth=e.width,E.minWidth=e.width),e.height&&(E.minHeight=e.height,E.maxHeight=e.height),e.fontSize&&(E.fontSize=e.fontSize),E}),u={[me.Primary]:"primary",[me.Success]:"positive",[me.Warning]:"warning",[me.Error]:"negative",[me.Info]:"info"},f=t.computed(()=>i.color!==void 0?i.color:u[d.value]??"primary"),h={[jt.XS]:"xs",[jt.S]:"sm",[jt.M]:"md",[jt.L]:"lg",[jt.XL]:"xl"},m=t.computed(()=>i.size!==void 0?i.size:["xs","sm","md","lg","xl"].includes(e.size)?e.size:h[e.size]??"md"),w=t.computed(()=>i.flat!==void 0?i.flat:["text","pag","text_ano"].includes(e.skin)),y=t.computed(()=>i.outline!==void 0?i.outline:e.skin==="invert"),C=t.computed(()=>i.unelevated!==void 0?i.unelevated:e.skin==="base"),B=t.computed(()=>i.disable??e.disabled);return(E,N)=>(t.openBlock(),t.createBlock(t.unref(M.QBtn),t.mergeProps(t.unref(o),{style:t.unref(c),color:t.unref(f),size:t.unref(m),flat:t.unref(w),outline:t.unref(y),unelevated:t.unref(C),disable:t.unref(B),type:t.unref(a),"no-wrap":""}),{default:t.withCtx(()=>[t.renderSlot(E.$slots,"default"),t.createTextVNode(" "+t.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),og={class:"q-pa-md"},sr=A(t.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:e}){const i=n,o=e,r=a=>{i.tabsStore.Select(a),o("select")},s=t.ref(20);return(a,d)=>(t.openBlock(),t.createBlock(t.unref(M.QSplitter),{modelValue:t.unref(s),"onUpdate:modelValue":d[0]||(d[0]=c=>t.isRef(s)?s.value=c:null),class:"full-height"},{before:t.withCtx(()=>[t.createVNode(t.unref(M.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabsStore.items,c=>(t.openBlock(),t.createBlock(t.unref(M.QTab),{key:c.value,name:c.value,label:c.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),t.createElementVNode("div",og,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.buttons,(c,u)=>(t.openBlock(),t.createBlock(Ne,{key:u,label:c.text,color:c.color,class:"q-mb-sm full-width",onClick:f=>c.action(c)},null,8,["label","color","onClick"]))),128))])]),after:t.withCtx(()=>[t.createVNode(t.unref(M.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabsStore.GetItems(),c=>(t.openBlock(),t.createBlock(t.unref(M.QTabPanel),{key:c.value,name:c.value},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{item:c},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class Zi{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","");l(this,"value","")}preSelect(){var i;const e=T.H.Router.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select((i=this.items[0])==null?void 0:i.value);return}this.Select(e)}static ToTab(e,i="",o=""){return{label:o,value:i,...e}}static Create(e,i){const o=new Zi;return o.key=e,o.items=i,o.items.length&&o.preSelect(),o}Select(e){if(!this.items.length)return;if(e===void 0)return this.preSelect();this.idx=this.items.findIndex(o=>o.value===e),this.value=e;const i=this.GetValue();i&&T.H.Router.SetQueryParam(this.key,i)}GetMenu(){return this.items[this.idx]}GetComponent(){var e;return(e=this.items[this.idx])==null?void 0:e.component}GetValue(){var e;return(e=this.items[this.idx])==null?void 0:e.value}GetItems(){return this.items}}function Ma(n){n.component("PTabs",rr),n.component("PTabsLeft",sr)}const rg=Object.freeze(Object.defineProperty({__proto__:null,Buildings:If,Chats:Ff,Docs:Xf,Extracts:th,Forms:$h,Menus:Ah,Pages:om,Schedule:Jp,Settings:ng,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:rr,PTabsLeft:sr,TabsStore:Zi,default:Ma},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Va=t.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 e=t.useAttrs(),i=t.computed(()=>{const o={};for(const r of Object.keys(e))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(o[r]=e[r]);return o});return(o,r)=>(t.openBlock(),t.createBlock(t.unref(M.QBadge),t.mergeProps(t.unref(i),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),Ia=t.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:t.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:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-checkbox",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(M.QCheckbox),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Ta=t.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:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(t.openBlock(),t.createBlock(t.unref(M.QChip),t.mergeProps(t.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]=d=>i("remove"))}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),zt=A(t.defineComponent({inheritAttrs:!1,__name:"PInput",props:t.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:t.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:e,emit:i}){const o=i,r=t.useModel(n,"modelValue"),s=t.useAttrs(),a=t.computed(()=>typeof s.id=="string"?s.id:void 0),d=t.computed(()=>{const y={};for(const C of Object.keys(s))C!=="id"&&C!=="disable"&&(y[C]=s[C]);return y}),c=n,u=t.computed(()=>s.disable??c.disabled),f=t.ref(null);function h(){var y;(y=f.value)==null||y.focus()}e({focus:h});const m=()=>{o("input",r.value)},w=t.computed(()=>{const y={};return c.margin&&(y.margin=c.margin),c.padding&&(y.padding=c.padding),c.width&&(y.width=c.width),c.borderColor&&(y["--p-border-color"]=c.borderColor),y});return(y,C)=>(t.openBlock(),t.createBlock(t.unref(M.QInput),t.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":C[0]||(C[0]=B=>r.value=B)},t.unref(d),{for:t.unref(a),label:n.label||void 0,mask:n.mask,disable:t.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:t.unref(w),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":m,onBlur:C[1]||(C[1]=B=>y.$emit("blur",r.value)),onFocus:C[2]||(C[2]=B=>y.$emit("focus",r.value)),onClear:C[3]||(C[3]=B=>y.$emit("clear"))}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(y.$slots,"before",{},()=>[t.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:t.withCtx(()=>[t.renderSlot(y.$slots,"append",{},()=>[t.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-c4acf8be"]]),sg={class:"row items-center justify-end"},Ji="DD.MM.YYYY",Ki=t.defineComponent({__name:"PDateInput",props:t.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}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:e}){const i=n,o=e,r=t.useModel(n,"modelValue"),s=Ji.replace(/[DMY]/g,"#"),a=t.ref(null),d=y=>{if(i.modelType){a.value=i.modelType;return}y instanceof Date?a.value="date":(typeof y=="string"&&y||a.value===null)&&(a.value="string")},c=y=>{if(!y)return"";if(y instanceof Date)return Number.isNaN(y.getTime())?"":M.date.formatDate(y,Ji);const C=String(y).match(/^(\d{4})-(\d{2})-(\d{2})/);if(C)return`${C[3]}.${C[2]}.${C[1]}`;const B=new Date(y);return Number.isNaN(B.getTime())?"":M.date.formatDate(B,Ji)},u=y=>{const C=y.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!C)return null;const B=+C[1],E=+C[2],N=+C[3];if(B<1||B>31||E<1||E>12||N<1900||N>2100)return null;const k=new Date(N,E-1,B);return k.getFullYear()!==N||k.getMonth()!==E-1||k.getDate()!==B?null:k},f=t.ref(c(r.value));d(r.value),t.watch(r,y=>{d(y);const C=c(y);C!==f.value&&(f.value=C)});const h=y=>{const C=typeof y=="number"?String(y):y;if(!C){const E=a.value==="date"?null:"";r.value=E,o("input",E);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(C))return;const B=u(C);if(B)if(a.value==="date")r.value=B,o("input",B);else{const E=B.getFullYear(),N=String(B.getMonth()+1).padStart(2,"0"),k=String(B.getDate()).padStart(2,"0"),R=`${E}-${N}-${k}`;r.value=R,o("input",R)}},m=()=>{o("blur",r.value)},w={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(y,C)=>{const B=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(zt,{modelValue:t.unref(f),"onUpdate:modelValue":[C[1]||(C[1]=E=>t.isRef(f)?f.value=E:null),h],class:"fit",label:n.label,placeholder:n.placeholder,mask:t.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,inputmode:"numeric",onBlur:m},{prepend:t.withCtx(()=>[t.createVNode(t.unref(M.QIcon),{name:"event",class:"cursor-pointer"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QDate),{modelValue:t.unref(f),"onUpdate:modelValue":C[0]||(C[0]=E=>t.isRef(f)?f.value=E:null),mask:Ji,"today-btn":"",locale:w},{default:t.withCtx(()=>[t.createElementVNode("div",sg,[t.withDirectives(t.createVNode(Ne,{label:"Готово",color:"primary",flat:""},null,512),[[B]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:t.withCtx(()=>[t.renderSlot(y.$slots,"before")]),append:t.withCtx(()=>[t.renderSlot(y.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width"])}}}),ag=t.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:t.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:t.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue"),r=d=>{const c=d.getFullYear(),u=String(d.getMonth()+1).padStart(2,"0"),f=String(d.getDate()).padStart(2,"0");return`${c}-${u}-${f}`},s=d=>{i("input",d instanceof Date?r(d):d??null)},a=()=>{i("blur")};return(d,c)=>(t.openBlock(),t.createBlock(Ki,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:t.withCtx(()=>[t.renderSlot(d.$slots,"default")]),append:t.withCtx(()=>[t.renderSlot(d.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),lg={class:"row items-center justify-end"},cg={class:"row items-center justify-end"},Pa=t.defineComponent({__name:"PDateTimeInput",props:t.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:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=t.ref(""),o=t.ref(""),r=t.ref(""),s=w=>w?M.date.formatDate(w,"DD.MM.YYYY HH:mm"):"",a=w=>{if(!w||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(w))return null;const y=M.date.extractDate(w,"DD.MM.YYYY HH:mm");return Number.isNaN(y.getTime())?null:y},d=w=>{e.value=w},c=w=>{const y=String(w??"");i.value=y.replace(/[_\s]/g,"")===""?"":y},u=()=>{const w=a(i.value);w?d(w):i.value===""?d(null):i.value=s(e.value)},f=()=>{if(o.value){const w=e.value?M.date.formatDate(e.value,"HH:mm"):"00:00",y=`${o.value} ${w}`,C=a(y);C&&(i.value=s(C),d(C))}o.value=""},h=()=>{if(r.value){const w=e.value?M.date.formatDate(e.value,"DD.MM.YYYY"):"",y=M.date.formatDate(new Date,"DD.MM.YYYY"),C=w?`${w} ${r.value}`:`${y} ${r.value}`,B=a(C);B&&(i.value=s(B),d(B))}r.value=""};t.watch(e,w=>{w!==a(i.value)&&(i.value=s(w??null))},{immediate:!0});const m={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(w,y)=>{const C=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(zt,{"model-value":t.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":c,onBlur:u},{prepend:t.withCtx(()=>[t.createVNode(t.unref(M.QIcon),{name:"event",class:"cursor-pointer"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QPopupProxy),{cover:""},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QDate),{modelValue:t.unref(o),"onUpdate:modelValue":y[0]||(y[0]=B=>t.isRef(o)?o.value=B:null),mask:"DD.MM.YYYY",locale:m},{default:t.withCtx(()=>[t.createElementVNode("div",lg,[t.withDirectives(t.createVNode(Ne,{label:"OK",color:"primary",flat:"",onClick:f},null,512),[[C]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:t.withCtx(()=>[t.createVNode(t.unref(M.QIcon),{name:"access_time",class:"cursor-pointer"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QPopupProxy),{cover:""},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QTime),{modelValue:t.unref(r),"onUpdate:modelValue":y[1]||(y[1]=B=>t.isRef(r)?r.value=B:null),mask:"HH:mm",format24h:"",locale:m},{default:t.withCtx(()=>[t.createElementVNode("div",cg,[t.withDirectives(t.createVNode(Ne,{label:"OK",color:"primary",flat:"",onClick:h},null,512),[[C]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message"])}}}),ci=t.defineComponent({inheritAttrs:!1,__name:"PDialog",props:t.mergeModels({persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>{const r={};for(const s of Object.keys(i))["persistent","maximized","transition-show","transition-hide"].includes(s)||(r[s]=i[s]);return r});return(r,s)=>(t.openBlock(),t.createBlock(t.unref(M.QDialog),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=a=>e.value=a)},t.unref(o),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:2},[r.$slots.title?{name:"title",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"title")]),key:"0"}:void 0,r.$slots.header?{name:"header",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"header")]),key:"1"}:void 0,r.$slots.body?{name:"body",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"body")]),key:"2"}:void 0,r.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),dg=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"flex-line flex",style:t.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})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),ug=["innerHTML"],fg={key:1},ar=A(t.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 e=n,i={color:e.color||void 0,fontSize:e.fontSize||void 0,fontWeight:e.fontWeight||void 0,background:e.background||void 0,padding:e.padding||void 0,width:e.width||void 0,maxWidth:e.width||void 0,minWidth:e.minWidth||void 0,margin:e.margin||void 0,justifyContent:e.justifyContent||void 0};return(o,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["string",n.customClass]),style:i,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[t.createVNode(t.unref(M.QItemLabel),null,{default:t.withCtx(()=>[n.isHtml?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:n.string},null,8,ug)):(t.openBlock(),t.createElementBlock("span",fg,t.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),di=A(t.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 e=n,i=t.useAttrs(),o=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="delay"&&(c[u]=i[u]);return c}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"top":"bottom"} ${c}`}),a=t.computed(()=>{const c=e.relPosition==="left"?"right":"left";return`${e.level==="top"?"bottom":"top"} ${c}`}),d=t.computed(()=>({background:r[e.typeStyle],whiteSpace:"pre",height:e.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(c,u)=>n.tooltipText?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0},t.unref(o),{class:"tooltip-wrapper"}),[t.renderSlot(c.$slots,"default",{},void 0,!0),t.createVNode(t.unref(M.QTooltip),{delay:n.timeout,anchor:t.unref(s),self:t.unref(a),class:"tooltip-box",style:t.normalizeStyle(t.unref(d))},{default:t.withCtx(()=>[t.createVNode(ar,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(t.openBlock(),t.createBlock(t.unref(M.QTooltip),t.mergeProps({key:1},t.unref(o),{delay:n.timeout,class:"tooltip-box"}),{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),hg={class:"p-hint-popup"},lr=A(t.defineComponent({__name:"PHint",props:{text:{}},setup(n){const e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[n.text?(t.openBlock(),t.createBlock(t.unref(M.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=t.withModifiers(r=>e.value=!0,["stop"]))},{default:t.withCtx(()=>[t.createVNode(di,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.text),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QMenu),{modelValue:t.unref(e),"onUpdate:modelValue":o[1]||(o[1]=r=>t.isRef(e)?e.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:t.withCtx(()=>[t.createElementVNode("div",hg,t.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),mg=t.defineComponent({__name:"PInputDate",props:t.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:t.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useModel(n,"modelValue");let r=null;const s=d=>{i("input",d),r=d instanceof Date?d:null},a=()=>{r instanceof Date&&(i("beforeChange",r),i("change",r),r=null)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"style-container",style:t.normalizeStyle({width:n.width,position:"relative"})},[t.createVNode(Ki,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),pg=A(t.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),gg=A(t.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[t.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"]]),yg=t.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:t.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}},{modelValue:{default:0},modelModifiers:{}}),emits:t.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:e}){const i=e,o=t.useAttrs(),r=t.computed(()=>typeof o.id=="string"?o.id:void 0),s=t.computed(()=>{const v={};for(const Z of Object.keys(o))Z!=="id"&&(v[Z]=o[Z]);return v}),a=n,d=()=>{const v=a.step.toString();return v.includes(".")?v.split(".")[1].length:0},c=d(),u=t.useModel(n,"modelValue"),h=(v=>Math.min(Math.max(v,a.min),a.max))(u.value);h!==u.value&&(u.value=h);const m=t.ref(h.toFixed(d())),w=t.computed(()=>{const v={};return a.margin&&(v.margin=a.margin),a.padding&&(v.padding=a.padding),v}),y=v=>{const Z=Math.pow(10,c);return Math.round(v*Z)/Z},C=(v,...Z)=>{u.value=y(v),m.value=y(v).toFixed(d()),Z.forEach(K=>i(K,u.value))},B=(v,...Z)=>{a.disabled||v>a.max||v<a.min||C(v,...Z)},E=()=>B(+m.value+a.step,"change"),N=()=>B(+m.value-a.step,"change"),k=v=>B(Number(v),"input"),R=()=>B(+m.value,"change","blur");return(v,Z)=>(t.openBlock(),t.createBlock(t.unref(M.QInput),t.mergeProps(t.unref(s),{for:t.unref(r),"model-value":t.unref(m),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:t.unref(w),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onBlur:R}),{before:t.withCtx(()=>[t.createVNode(t.unref(M.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:N},{default:t.withCtx(()=>[t.createVNode(pg)]),_:1})]),append:t.withCtx(()=>[t.createVNode(t.unref(M.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:E},{default:t.withCtx(()=>[t.createVNode(gg)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),wg=A(yg,[["__scopeId","data-v-6f4093e8"]]),bg=A(t.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:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.shift?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),t.createElementVNode("div",{class:"LS-body",style:t.normalizeStyle({marginLeft:t.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})},[t.createElementVNode("div",{class:"LS-content",style:t.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4),t.createVNode(t.unref(M.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),Sg=t.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(e,i)=>(t.openBlock(),t.createBlock(t.unref(M.QList),{tag:"ul",style:t.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),Cg=t.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(e,i)=>(t.openBlock(),t.createBlock(t.unref(M.QItem),{tag:"li",style:t.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["style"]))}}),kg={class:"tags-selector"},xg={key:0,class:"empty-state"},Ra=A(t.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:e}){const i=n,o=t.ref(""),r=i.store.Options,s=t.computed(()=>r.filter(c=>T.H.Strings.SearchIn(c.label,o.value))),a=e;t.onBeforeMount(async()=>{await i.store.GetOptions()});const d=async c=>{await i.store.Get(c.value),a("select",i.store.Item)};return(c,u)=>{const f=t.resolveDirective("ripple");return t.openBlock(),t.createElementBlock("div",kg,[t.createVNode(zt,{modelValue:t.unref(o),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(o)?o.value=h:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),t.createVNode(t.unref(M.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QList),{dense:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>t.withDirectives((t.openBlock(),t.createBlock(t.unref(M.QItem),{key:h.value,clickable:"",class:"tag-item",onClick:m=>d(h)},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QItemSection),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),t.unref(s).length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",xg,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),eo=t.defineComponent({inheritAttrs:!1,__name:"PSelect",props:t.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:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>typeof r.id=="string"?r.id:void 0),a=t.computed(()=>{const m={};for(const w of Object.keys(r))w!=="id"&&w!=="disable"&&(m[w]=r[w]);return m}),d=n,c=t.computed(()=>r.disable??d.disabled),u=m=>{o("change",m)},f=()=>{o("clear",void 0)},h=t.computed(()=>{const m={};return d.margin&&(m.margin=d.margin),d.padding&&(m.padding=d.padding),d.width&&(m.width=d.width),d.inPadding&&(m.padding=d.inPadding),m});return(m,w)=>(t.openBlock(),t.createBlock(t.unref(M.QSelect),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=y=>i.value=y)},t.unref(a),{for:t.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:t.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:t.unref(h),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),t.createSlots({before:t.withCtx(()=>[t.renderSlot(m.$slots,"before",{},()=>[t.renderSlot(m.$slots,"left")])]),append:t.withCtx(()=>[t.renderSlot(m.$slots,"append",{},()=>[t.renderSlot(m.$slots,"right")])]),_:2},[m.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"prepend")]),key:"0"}:void 0,m.$slots.after?{name:"after",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after")]),key:"1"}:void 0,m.$slots.default?{name:"default",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"default")]),key:"2"}:void 0,m.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"label")]),key:"3"}:void 0,m.$slots.error?{name:"error",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"error")]),key:"4"}:void 0,m.$slots.hint?{name:"hint",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"hint")]),key:"5"}:void 0,m.$slots.counter?{name:"counter",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"counter")]),key:"6"}:void 0,m.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"loading")]),key:"7"}:void 0,m.$slots.selected?{name:"selected",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"selected")]),key:"8"}:void 0,m.$slots.option?{name:"option",fn:t.withCtx(y=>[t.renderSlot(m.$slots,"option",t.normalizeProps(t.guardReactiveProps(y)))]),key:"9"}:void 0,m.$slots["no-option"]?{name:"no-option",fn:t.withCtx(y=>[t.renderSlot(m.$slots,"no-option",t.normalizeProps(t.guardReactiveProps(y)))]),key:"10"}:void 0,m.$slots["before-options"]?{name:"before-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"before-options")]),key:"11"}:void 0,m.$slots["after-options"]?{name:"after-options",fn:t.withCtx(()=>[t.renderSlot(m.$slots,"after-options")]),key:"12"}:void 0,m.$slots["selected-item"]?{name:"selected-item",fn:t.withCtx(y=>[t.renderSlot(m.$slots,"selected-item",t.normalizeProps(t.guardReactiveProps(y)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),Aa=t.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const e=n,i=((d=e.storeOpts)==null?void 0:d.Options)??[],o=t.ref(i);async function r(c,u,f,h){var C,B;const w="set"+(((C=u[0])==null?void 0:C.toUpperCase())+u.slice(1)),y=c[w];typeof y=="function"?y(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await((B=h==null?void 0:h.Update)==null?void 0:B.call(h,c))}const s=(c,u)=>{if(c===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>T.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await e.storeOpts.Get(c.value),await r(e.item,e.prop,e.storeOpts.Item,e.store)):await r(e.item,e.prop,void 0,e.store)};return t.onBeforeMount(async()=>{i.length>0||await e.storeOpts.GetOptions(e.optLabel,e.optValue)}),(c,u)=>(t.openBlock(),t.createBlock(eo,{"use-input":"",options:t.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:t.withCtx(()=>[t.createVNode(lr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Eg=t.defineComponent({__name:"PRadio",props:t.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:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=n,s=()=>{o("change",r.value)};return(a,d)=>(t.openBlock(),t.createElementBlock("div",{class:"p-radio",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(M.QRadio),{modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=c=>i.value=c),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:t.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),Bg=A(t.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:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"wrapper",style:t.normalizeStyle({maxHeight:n.height,height:n.height})},[t.createElementVNode("div",{class:"content",style:t.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[t.renderSlot(a.$slots,"content",{},void 0,!0)],4),t.createElementVNode("div",{class:"RS-body",style:t.normalizeStyle({marginRight:t.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"})},[t.createVNode(t.unref(M.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),t.createElementVNode("div",{class:"RS-content",style:t.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),$g=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"sticky-block",style:t.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})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Ng=t.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("table",t.mergeProps(e.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[t.createElementVNode("thead",null,[t.renderSlot(e.$slots,"thead")]),t.createElementVNode("tbody",null,[t.renderSlot(e.$slots,"tbody")])],16))}}),za=A(t.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const e=n,i=t.computed(()=>e.row[e.prop]),o=async()=>{e.row[e.prop]=!e.row[e.prop],await e.store.Update(e.row)};return(r,s)=>(t.openBlock(),t.createBlock(t.unref(M.QTd),{key:n.prop},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["toggle-cell",{clickable:!e.readonly}]),onClick:s[0]||(s[0]=a=>e.readonly?void 0:o())},[t.createVNode(t.unref(M.QIcon),{name:t.unref(i)?"check_circle":"radio_button_unchecked",color:t.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),t.createVNode(di,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Mg=A(t.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:t.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}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const e=t.useModel(n,"modelValue"),i=t.useAttrs(),o=t.computed(()=>typeof i.id=="string"?i.id:void 0),r=t.computed(()=>{const c={};for(const u of Object.keys(i))u!=="id"&&(c[u]=i[u]);return c}),s=n,a=t.computed(()=>({color:s.color||void 0,resize:s.resize})),d=t.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(t.openBlock(),t.createBlock(t.unref(M.QInput),t.mergeProps({modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=f=>e.value=f)},t.unref(r),{for:t.unref(o),label:n.label||void 0,mask:n.mask,type:"textarea","input-style":t.unref(a),style:t.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",e.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",e.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",e.value))}),{before:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{},void 0,!0)]),append:t.withCtx(()=>[t.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),Da=t.defineComponent({inheritAttrs:!1,__name:"PToggle",props:t.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:t.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:e}){const i=t.useModel(n,"modelValue"),o=e,r=t.useAttrs(),s=t.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"p-toggle",style:t.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[t.createVNode(t.unref(M.QToggle),t.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},t.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Vg={class:"top-slider-content"},Ig={class:"center"},Tg=A(t.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:e}){const i=n,o=e,r=t.ref(i.open);t.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",Vg,[t.createElementVNode("div",Ig,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createVNode(t.unref(M.QBtn),{class:"click-line",flat:"","no-caps":"",style:t.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function Pg(n){n.component("PButton",Ne),n.component("PBadge",Va),n.component("PCheckBox",Ia),n.component("PChip",Ta),n.component("PDateInput",Ki),n.component("PDatePicker",ag),n.component("PDateTimeInput",Pa),n.component("PDialog",ci),n.component("PFlex",dg),n.component("PHint",lr),n.component("PInput",zt),n.component("PInputDate",mg),n.component("PInputNumber",wg),n.component("PLeftSlider",bg),n.component("PList",Sg),n.component("PListItem",Cg),n.component("POptionsListSingle",Ra),n.component("POpts",Aa),n.component("PRadio",Eg),n.component("PRightSlider",Bg),n.component("PSelect",eo),n.component("PSticky",$g),n.component("PString",ar),n.component("PTextarea",Mg),n.component("PTopSlider",Tg),n.component("PTable",Ng),n.component("PTableToggle",za),n.component("PToggle",Da),n.component("PTooltip",di)}const Rg={key:0,class:"mainblock"},Ag={class:"mainblock-right"},zg={class:"body"},Dg=A(t.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",Rg,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,maxWidth:t.unref(r)?"100%":n.menuWidth,marginLeft:t.unref(r)?"-110%":"0",position:t.unref(r)?"fixed":"relative",top:t.unref(r)?"140px":""})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"auto":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!t.unref(o)&&t.unref(r)?"110%":"0",borderTopLeftRadius:t.unref(r)?"0":"",borderBottomLeftRadius:t.unref(r)?"0":""}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",Ag,[a.$slots.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:"title",style:t.normalizeStyle({display:a.$slots.title?"flex":"none"})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",zg,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),vg={class:"mainblock-right"},Fg={class:"body"},_g=A(t.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 e=n,i=t.ref(!1),o=t.ref(!0),r=t.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(a.$slots,"main",{},void 0,!0),t.unref(i)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mainblock",style:t.normalizeStyle({display:t.unref(r)?"block":"flex"})},[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:t.unref(r)?"58px":"80px"})},[t.createElementVNode("div",{class:"left-menu",style:t.normalizeStyle({minWidth:t.unref(r)?"100%":n.menuWidth,boxShadow:t.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!t.unref(o)&&t.unref(r),"0"),overflowX:t.unref(r)?"scroll":"hidden",display:t.unref(r)?"flex":"block",background:t.unref(r)?"#ffffff":"",overflowY:t.unref(r)?"hidden":"auto"}),onClick:d[0]||(d[0]=c=>s())},[t.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),t.createElementVNode("div",vg,[t.createElementVNode("div",{class:"title",style:t.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?t.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[t.createElementVNode("div",{class:"icon",style:t.normalizeStyle({display:t.unref(r)?"flex":"none"}),onClick:d[1]||(d[1]=c=>s())},[t.renderSlot(a.$slots,"icon",{},void 0,!0)],4),t.renderSlot(a.$slots,"title",{},void 0,!0)],4),t.createElementVNode("div",Fg,[t.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),va=A(t.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 t.useCssVars(e=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid-block",n.customClass])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Og={class:"container"},Lg={class:"slide-box"},Hg={class:"image"},Ug={class:"image-box"},jg=["id","src","alt"],qg={class:"link-number"},Wg=["id","onClick"],Gg=A(t.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){t.useCssVars(w=>({v582c9d05:i}));const e=n,i=`${e.animationTime}ms`,o=t.ref(e.startActiveGroupIndex),r=t.ref(xt.None),s=t.ref(Os(e.events,e.quantity)),a=t.computed(()=>s.value[o.value]);t.onMounted(()=>{});const d=()=>o.value=o.value+1<s.value.length?o.value+1:0,c=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=w=>{r.value=w,setTimeout(()=>r.value=xt.None,e.animationTime)},f=w=>{w!=o.value&&(u(w<o.value?xt.Prev:xt.Next),setTimeout(()=>o.value=w,e.animationTime/2))},h=()=>{u(xt.Next),setTimeout(d,e.animationTime/2)},m=()=>{u(xt.Prev),setTimeout(c,e.animationTime/2)};return(w,y)=>(t.openBlock(),t.createElementBlock("div",{class:"field",style:t.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[t.createElementVNode("div",Og,[(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:y[0]||(y[0]=t.withModifiers(C=>m(),["stop"]))},[...y[3]||(y[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),t.createElementVNode("div",Lg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),(C,B)=>(t.openBlock(),t.createElementBlock("div",{key:B,class:t.normalizeClass({animationnext:t.unref(r)===t.unref(xt).Next,animationprev:t.unref(r)===t.unref(xt).Prev})},[t.createElementVNode("div",Hg,[t.createElementVNode("div",Ug,[t.createElementVNode("img",{id:C.fileInfo.getImageUrl(),style:t.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:C.fileInfo.getImageUrl(),alt:C.fileInfo.originalName,onClick:y[1]||(y[1]=E=>w.showImageInFullScreen())},null,12,jg)])])],2))),128))]),(t.openBlock(),t.createElementBlock("svg",{class:"icon-arrow",onClick:y[2]||(y[2]=t.withModifiers(C=>h(),["stop"]))},[...y[4]||(y[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),t.createElementVNode("div",qg,[t.createVNode(va,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(C,B)=>(t.openBlock(),t.createElementBlock("div",{id:B.toString(),key:B,class:"number",style:t.normalizeStyle({background:B.toString()===t.unref(o).toString()?"#9D9D9D":""}),onClick:t.withModifiers(E=>f(B),["stop"])},t.toDisplayString(B+1),13,Wg))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),Qg=t.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.x),s=t.ref(i.y),a=t.computed(()=>r.value+"px"),d=t.computed(()=>s.value+"px"),c=()=>{o("close")};return(u,f)=>{const h=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"context-window",style:t.normalizeStyle({left:t.unref(a),top:t.unref(d)})},[t.renderSlot(u.$slots,"default")],4)),[[h,c]])}}}),Yg={class:"date-range"},Xg=A(t.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:e}){const i=n,o=e;t.watch(()=>[i.start,i.end],()=>{i.start||(r.value=void 0),i.end||(s.value=void 0)});const r=t.ref(i.start),s=t.ref(i.end),a=c=>{r.value=c,!(!i.end||c>i.end)&&(o("update:start",c),o("setStart",c))},d=c=>{s.value=c,!(!i.start||c<i.start)&&(o("update:end",c),o("setEnd",c))};return(c,u)=>{const f=t.resolveComponent("PInputDate");return t.openBlock(),t.createElementBlock("div",Yg,[t.createVNode(f,{"model-value":t.unref(r),"onUpdate:modelValue":u[0]||(u[0]=h=>t.isRef(r)?r.value=h:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=t.createTextVNode(" - ",-1)),t.createVNode(f,{"model-value":t.unref(s),"onUpdate:modelValue":u[1]||(u[1]=h=>t.isRef(s)?s.value=h:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),Zg=t.defineComponent({name:"DateInputRangeV2"}),Jg={class:"date-range"};function Kg(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",Jg,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const e1=A(Zg,[["render",Kg],["__scopeId","data-v-d28c6f33"]]),t1={class:"drop-item"},n1={key:0,class:"drop-item-list"},i1=A(t.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const e=n,i=t.ref(e.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=t.resolveComponent("PString"),d=t.resolveComponent("IconArrowDrop");return t.openBlock(),t.createElementBlock("div",t1,[t.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>o())},[t.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"]),t.createElementVNode("div",{style:t.normalizeStyle({transform:t.unref(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[t.createVNode(d,{size:"10px",margin:"0"})],4)]),t.unref(i)?(t.openBlock(),t.createElementBlock("div",n1,[t.renderSlot(r.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),o1=A(t.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Eo,required:!0}},emits:["load"],setup(n,{emit:e}){const i=n,o=t.ref(!1),r=e,s=()=>{i.model.setBoolean(o.value),o.value?T.F.FTSP.Get().setF(i.model):T.F.FTSP.Get().removeF(i.model),r("load")};return(a,d)=>{const c=t.resolveComponent("PCheckBox");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=u=>t.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),r1=A(t.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref(void 0),r=async a=>{Rt.Get().replaceF(a,o.value),o.value=a,Rt.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,d)=>{const c=t.resolveComponent("PString"),u=t.resolveComponent("PButton"),f=t.resolveComponent("GridContainer"),h=t.resolveComponent("InfoItem");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),t.createVNode(h,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:t.withCtx(()=>[...d[0]||(d[0]=[])]),default:t.withCtx(()=>[t.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(m,w)=>(t.openBlock(),t.createBlock(u,{key:w,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(t.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:y=>s(m.valueEq(t.unref(o))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),s1=["value","label"],a1=A(t.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:e}){const i=e,o=Rt.Get(),r=t.ref(void 0),s=async d=>{o.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),i("load")};return(d,c)=>{const u=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(u,{modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=f=>t.isRef(r)?r.value=f:null),clearable:t.unref(r),placeholder:n.defaultLabel,onChange:a},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.models,(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,value:f,label:f.label},null,8,s1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),l1=A(t.defineComponent({__name:"FTSPPanel",setup(n){return t.onBeforeMount(async()=>{}),(e,i)=>(t.openBlock(),t.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),c1=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock("div",{class:"general-block-item",style:t.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&t.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[t.createElementVNode("div",{class:"green",style:t.normalizeStyle({width:`${n.ready}`})},null,4),t.createElementVNode("div",{class:"general-block-item-title",style:t.normalizeStyle({fontSize:n.fontSize})},[t.renderSlot(i.$slots,"general-item",{},void 0,!0)],4),t.createElementVNode("div",{class:"tools-icon",style:t.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[t.createElementVNode("svg",{class:"icon-del"},[t.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[t.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"},u1={style:{display:"flex","justify-content":"center"}},f1=A(t.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:e}){const i=n,o=e,r=i.customClass!==""?i.customClass:"inside-class",s=t.ref(!1),a=t.ref(!1),d=t.ref(!1),c=t.ref(i.close);t.watch(()=>i.close,()=>{a.value=!1});const u=R=>{R.stopPropagation(),R.key==="Escape"&&(i.showSaveDialog?d.value=!0:a.value=!1)};t.watch(a,async()=>{var R,v;await t.nextTick(),a.value?((v=(R=document.getElementById("info-item-opened-content"))==null?void 0:R.querySelector("input"))==null||v.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,c.value!==i.close&&(a.value=!1,c.value=!c.value)},h=t.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),m=t.computed(()=>a.value&&i.withOpenWindow),w=t.computed(()=>({background:i.background?i.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":i.padding,margin:i.margin,width:m.value?i.openWidth:i.width,height:m.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(i.withHover,"pointer")})),y=t.computed(()=>({height:m.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),C=t.computed(()=>({height:m.value?"auto":"0"})),B=t.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),E=()=>{i.showSaveDialog?d.value=!0:a.value=!1},N=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),d.value=!1},k=()=>{a.value=!1,d.value=!1};return(R,v)=>{const Z=t.resolveComponent("PString"),K=t.resolveComponent("PButton"),fe=t.resolveComponent("PModal"),ht=t.resolveDirective("click-outside");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",d1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"base-box",style:t.normalizeStyle(t.unref(h)),onClick:v[2]||(v[2]=t.withModifiers(Ye=>f(),["prevent","stop"]))},[t.createElementVNode("div",{class:t.normalizeClass(["body",t.unref(r)]),style:t.normalizeStyle(t.unref(w)),onMouseenter:v[0]||(v[0]=Ye=>n.withHover?s.value=!0:s.value=!1),onMouseleave:v[1]||(v[1]=Ye=>s.value=!1)},[t.unref(a)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["close-window",n.customClass]),style:t.normalizeStyle(t.unref(y))},[t.renderSlot(R.$slots,"default",{},void 0,!0)],6)),t.unref(a)?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:t.normalizeStyle(t.unref(C))},[t.renderSlot(R.$slots,"open-inside-content",{},void 0,!0)],4)),[[ht,E,void 0,{prevent:!0}]]):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"top-title",style:t.normalizeStyle(t.unref(B))},[t.renderSlot(R.$slots,"title",{},()=>[t.createVNode(Z,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:t.normalizeStyle({color:t.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),t.createVNode(fe,{show:t.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:t.withCtx(()=>[t.createElementVNode("div",u1,[t.createVNode(K,{text:"Не сохранять",onClick:k}),t.createVNode(K,{text:"Сохранять",onClick:N})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),h1=A(t.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:e}){const i=t.ref(!1),o=e,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(u,{close:t.unref(i),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.list,f=>(t.openBlock(),t.createBlock(c,{key:f,type:"admin",color:"blue",text:f,onClick:h=>r(f)},null,8,["text","onClick"]))),128)),t.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:t.withCtx(()=>[t.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),m1={class:"mainblock"},p1={class:"mainline"},g1=A(t.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",m1,[t.createElementVNode("div",p1,[t.createElementVNode("div",{class:"mainblock-left",style:t.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[t.renderSlot(e.$slots,"left",{},void 0,!0)],4),t.createElementVNode("div",{class:"mainblock-right",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Fa=A(t.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.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"],_a=A(t.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:e}){const i=e,o=n,r=t.ref(o.modelValue),s=t.ref([]);async function a(){i("input",r.value),await d()}async function d(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function c(u){r.value="",i("select",u)}return(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"container",style:t.normalizeStyle({width:n.width})},[t.createVNode(zt,{modelValue:t.unref(r),"onUpdate:modelValue":f[0]||(f[0]=h=>t.isRef(r)?r.value=h:null),placeholder:"Найти",onInput:a},{right:t.withCtx(()=>[t.createVNode(Fa,{size:"24px"})]),_:1},8,["modelValue"]),t.unref(r)&&t.unref(r).length>=2?(t.openBlock(),t.createElementBlock("div",{key:0,class:"result",style:t.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[t.createElementVNode("ul",y1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),h=>(t.openBlock(),t.createElementBlock("li",{key:h.value,onClick:m=>c(h)},t.toDisplayString(h.label),9,w1))),128))])],4)):t.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),b1=A(t.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),i=async()=>{};return(o,r)=>{const s=t.resolveComponent("PInput");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{modelValue:e.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.number=a),onBlur:i},null,8,["modelValue"]),t.createVNode(s,{modelValue:e.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),S1={};function C1(n,e){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e[0]||(e[0]=t.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const k1=A(S1,[["render",C1],["__scopeId","data-v-0f1f2f84"]]),x1={style:{display:"flex","justify-content":"center",width:"100%"}},E1={class:"pag-number"},B1={class:"pag-ul"},$1={key:2},N1=A(t.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const e=n,i=h=>h?"active":"neutral",o=h=>h?"not-active":"neutral",r=t.ref(Ls),s=t.ref(!1),a=t.ref(!1);r.value.count=e.store.Count.value,t.watch(e.store.Count,()=>{r.value.count=e.store.Count.value});const d=async h=>{if(h!==r.value.curPage&&(h<1&&(h=1),h>r.value.pagesCount()&&(h=r.value.pagesCount()),!e.showConfirm))return await c(h)},c=async(h,m)=>{r.value.setCurPage(h),Rt.Get().p.offset=(h-1)*r.value.limit,await e.store.FTSP(),f()},u=t.computed(()=>{const h=r.value.pagesCount();return h<8?Pt.GenerateNumsRange(2,h-1).filter(m=>m<h&&m>1):Pt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(m=>m<h&&m>1)}),f=()=>{const h=document.querySelector(".el-table__body-wrapper"),m=document.querySelector("#list");h?h.scrollTo({top:0}):m&&m.scrollTo({top:0})};return t.onBeforeUnmount(()=>{Rt.Get().p.drop()}),(h,m)=>{const w=t.resolveComponent("ArrowLeft"),y=t.resolveComponent("PButton"),C=t.resolveComponent("DoubleArrowLeft"),B=t.resolveComponent("EllipsisSvg"),E=t.resolveComponent("DoubleArrowRight"),N=t.resolveComponent("ArrowRight");return t.openBlock(),t.createElementBlock("div",x1,[t.createElementVNode("div",{class:"pag-container",style:t.normalizeStyle({justifyContent:n.justifyContent})},[t.createElementVNode("div",E1,[t.createVNode(y,{skin:"pag",type:o(t.unref(r).curPage===1),onClick:m[0]||(m[0]=k=>d(t.unref(r).curPage-1))},{default:t.withCtx(()=>[t.createVNode(w)]),_:1},8,["type"]),t.createElementVNode("ul",B1,[t.createElementVNode("li",null,[t.createVNode(y,{skin:"pag",type:i(t.unref(r).curPage===1),text:"1",onClick:m[1]||(m[1]=k=>d(1))},null,8,["type"])]),t.unref(r).pagesCount()>8&&t.unref(r).curPage>4?(t.openBlock(),t.createElementBlock("li",{key:0,onMouseenter:m[3]||(m[3]=k=>s.value=!0),onMouseleave:m[4]||(m[4]=k=>s.value=!1)},[t.createVNode(y,{skin:"pag",type:"neutral",onClick:m[2]||(m[2]=k=>d(t.unref(r).curPage-5))},{default:t.withCtx(()=>[t.unref(s)?(t.openBlock(),t.createBlock(C,{key:0})):(t.openBlock(),t.createBlock(B,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),k=>(t.openBlock(),t.createElementBlock("li",{key:k},[t.createVNode(y,{skin:"pag",type:i(k===t.unref(r).curPage),text:k,onClick:R=>d(k)},null,8,["type","text","onClick"])]))),128)),t.unref(r).pagesCount()>=8&&t.unref(r).curPage<t.unref(r).pagesCount()-3?(t.openBlock(),t.createElementBlock("li",{key:1,onMouseenter:m[6]||(m[6]=k=>a.value=!0),onMouseleave:m[7]||(m[7]=k=>a.value=!1)},[t.createVNode(y,{skin:"pag",type:"neutral",onClick:m[5]||(m[5]=k=>d(t.unref(r).curPage+5))},{default:t.withCtx(()=>[t.unref(a)?(t.openBlock(),t.createBlock(E,{key:0})):(t.openBlock(),t.createBlock(B,{key:1}))]),_:1})],32)):t.createCommentVNode("",!0),t.unref(r).pagesCount()>1?(t.openBlock(),t.createElementBlock("li",$1,[t.createVNode(y,{skin:"pag",type:i(t.unref(r).pagesCount()===t.unref(r).curPage),text:t.unref(r).pagesCount(),onClick:m[8]||(m[8]=k=>d(t.unref(r).pagesCount()))},null,8,["type","text"])])):t.createCommentVNode("",!0)]),t.createVNode(y,{skin:"pag",type:o(t.unref(r).curPage===t.unref(r).pagesCount()),onClick:m[9]||(m[9]=k=>d(t.unref(r).curPage+1))},{default:t.withCtx(()=>[t.createVNode(N)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),M1=A(t.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:e}){const i=n,o=e,r=t.ref(i.modelValue),s=t.ref();let a=Qo.SearchModel();t.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=Qo.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const h=a.searchGroups.find(m=>m.key===i.keyValue);return h&&(a.searchGroup=h),await Xs.Search.Search(a),a.searchObjects},c=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,h)=>(t.openBlock(),t.createBlock(_a,{ref_key:"searchForm",ref:s,modelValue:t.unref(r),"onUpdate:modelValue":h[0]||(h[0]=m=>t.isRef(r)?r.value=m: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":d,"trigger-on-focus":n.showSuggestions,suggestions:t.unref(a).searchObjects,onSelect:c,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-af0b4b1a"]]),V1={class:"mainblock-body"},I1={class:"mainblock-footer"},T1=A(t.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({background:n.background,padding:n.padding})},[t.createElementVNode("div",{class:"mainblock-header",style:t.normalizeStyle({background:n.background})},[t.renderSlot(e.$slots,"header",{},void 0,!0)],4),t.createElementVNode("div",V1,[t.renderSlot(e.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",I1,[t.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),P1={class:"right-slider-content"},R1={class:"right-slider-content-header"},A1={class:"right-slider-content-box"},z1={class:"right-slider-button"},D1=A(t.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:e}){const i=n,o=e,r=t.ref(!1);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>{const c=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",{class:"right-slider",style:t.normalizeStyle({marginRight:t.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[t.createElementVNode("div",{class:"click-line",onClick:d[0]||(d[0]=u=>s(!t.unref(r)))},[t.unref(r)?(t.openBlock(),t.createBlock(c,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):t.createCommentVNode("",!0),t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),t.createElementVNode("div",P1,[t.createElementVNode("div",R1,[t.renderSlot(a.$slots,"header",{},void 0,!0)]),t.createElementVNode("div",A1,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",z1,[t.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),v1={class:"mainblock"},F1={class:"body-block"},_1={class:"tab-block"},O1=A(t.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:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(window.matchMedia("(max-width: 768px)").matches),a=c=>{o("toggle",c)},d=t.ref(!1);return t.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(c,u)=>(t.openBlock(),t.createElementBlock("div",v1,[t.createElementVNode("div",{class:"slider-block",style:t.normalizeStyle({marginRight:t.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"})},[t.createElementVNode("div",{class:"slider-icon",style:t.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=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[t.createElementVNode("div",{class:"icon-block",style:t.normalizeStyle({transform:t.unref(d)?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"})},[t.renderSlot(c.$slots,"icon",{},void 0,!0)],4)],36),t.createElementVNode("div",{class:"slider-info",style:t.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[t.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),t.createElementVNode("div",F1,[t.renderSlot(c.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",_1,[t.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),L1=["label","value"],H1=A(t.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:e}){const i={[qe.String]:"Текстовый ответ",[qe.Text]:"Развёрнутый текстовый ответ",[qe.Number]:"Числовой ответ",[qe.Date]:"Ответ в виде даты",[qe.Radio]:"Выбор одного из вариантов",[qe.Set]:"Выбор нескольких вариантов",[qe.File]:"Ответ в виде файла",[qe.MatrixRadio]:"Матрица с одним выбором",[qe.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),t.createVNode(c,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,(u,f)=>t.createElementVNode("option",{key:u,label:u,value:f},null,8,L1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),U1=["label","value"],j1=A(t.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=t.ref();t.onBeforeMount(()=>{i.value=!0,r.value=on.GetDefault()});const s=async d=>{r.value=d??on.GetDefault(),o("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=t.resolveComponent("PSelect");return t.unref(i)?(t.openBlock(),t.createBlock(u,{key:0,modelValue:t.unref(r),"onUpdate:modelValue":c[0]||(c[0]=h=>t.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((f=t.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:c[1]||(c[1]=h=>a())},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(on).Get(),(h,m)=>(t.openBlock(),t.createElementBlock("option",{key:m,label:h.label,value:h},null,8,U1))),128))]),_:1},8,["modelValue","clearable"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),q1=["label","value"],W1=A(t.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:e}){const i=e,o=t.ref();t.onBeforeMount(()=>{o.value=on.GetDefault()});const r=async a=>{a||(o.value=on.GetDefault()),Rt.Get().setSortModel(o.value),Rt.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=t.resolveComponent("PSelect");return t.openBlock(),t.createBlock(c,{modelValue:t.unref(o),"onUpdate:modelValue":d[0]||(d[0]=f=>t.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=t.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(on).Get(),(f,h)=>(t.openBlock(),t.createElementBlock("option",{key:h,label:f.label,value:f},null,8,q1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),G1={class:"switch-container"},Q1={class:"line"},Y1={class:"line"},X1=A(t.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:e}){const i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,d=h=>{var w;return{color:(w=u.value)!=null&&w.valueEq(h)?"#006bb4":"#B0A4C0"}},c=e,u=t.ref(void 0),f=async h=>{var m;(m=u.value)!=null&&m.valueEq(h)||(u.value=h,c("load"))};return(h,m)=>{const w=t.resolveComponent("PString");return t.openBlock(),t.createElementBlock("div",G1,[t.createElementVNode("div",Q1,[t.createVNode(w,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.firstModel)),onClick:m[0]||(m[0]=y=>f(n.firstModel))},null,8,["string","style"]),t.createVNode(w,{string:"Все","font-size":"12px",padding:"0",style:t.normalizeStyle(d()),onClick:m[1]||(m[1]=y=>f())},null,8,["style"]),t.createVNode(w,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:t.normalizeStyle(d(n.secondModel)),onClick:m[2]||(m[2]=y=>f(n.secondModel))},null,8,["string","style"])]),t.createElementVNode("div",Y1,[t.createElementVNode("div",{class:t.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(r()),onClick:m[3]||(m[3]=y=>f(n.firstModel))},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob2",{active:!t.unref(u)}]),style:t.normalizeStyle(s()),onClick:m[4]||(m[4]=y=>f())},null,6),t.createElementVNode("div",{class:t.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(t.unref(u))}]),style:t.normalizeStyle(a()),onClick:m[5]||(m[5]=y=>f(n.secondModel))},null,6),m[6]||(m[6]=t.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=t.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=t.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=t.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),Z1={},J1={class:"flex"};function K1(n,e){return t.openBlock(),t.createElementBlock("div",J1,[t.renderSlot(n.$slots,"default",{},void 0,!0)])}const e0=A(Z1,[["render",K1],["__scopeId","data-v-5023d414"]]),t0=A(t.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=t.ref(!1),o=e,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const d=t.resolveComponent("PString"),c=t.resolveComponent("PButton"),u=t.resolveComponent("GridContainer"),f=t.resolveComponent("InfoItem");return t.openBlock(),t.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:t.unref(i),width:"100%",onKeyupEnter:r},{"open-inside-content":t.withCtx(()=>[t.createVNode(u,{"custom-class":"grid"},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{},void 0,!0),t.createVNode(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:t.withCtx(()=>[n.content.length>0?(t.openBlock(),t.createBlock(d,{key:0,string:n.content},null,8,["string"])):(t.openBlock(),t.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),n0={class:"top-slider-content"},i0={class:"center"},o0=A(t.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:e}){const i=n,o=e,r=t.ref(!0);t.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(r)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=t.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[1]=t.withModifiers(()=>{},["stop"]))]})),t.createElementVNode("div",{class:"top-slider",style:t.normalizeStyle({marginTop:t.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:d[3]||(d[3]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",n0,[t.createElementVNode("div",i0,[t.renderSlot(a.$slots,"default",{},void 0,!0)])]),t.createElementVNode("div",{class:"click-line",style:t.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!t.unref(r)))},[t.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function r0(n){n.component("PageNotFound",vs),n.component("AdaptiveContainer",Dg),n.component("AdaptiveContainerHorizontal",_g),n.component("CarouselImages",Gg),n.component("ContextWindow",Qg),n.component("DateInputRangeV2",e1),n.component("DateInputRange",Xg),n.component("DropList",i1),n.component("FilterCheckbox",o1),n.component("FiltersButtonsSelect",r1),n.component("FilterSelect",a1),n.component("FTSPPanel",l1),n.component("GeneralItem",c1),n.component("GridContainer",va),n.component("InfoItem",f1),n.component("InfoItemSelectButtons",h1),n.component("LeftRightContainer",g1),n.component("PAutocomplete",_a),n.component("PhoneForm",b1),n.component("PLoader",k1),n.component("PPagination",N1),n.component("RemoteSearch",M1),n.component("ResearcheContainer",T1),n.component("RightSliderContainer",D1),n.component("RightTabsContainer",O1),n.component("SelectValueType",H1),n.component("SortList",j1),n.component("SortSelect",W1),n.component("Switch3Pos",X1),n.component("ThemeWrapper",e0),n.component("ToggleInfoItem",t0),n.component("TopSliderContainer",o0)}const s0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.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"}),t.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"]]),a0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.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"}),t.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"]]),l0=A(t.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[t.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"]]),c0=A(t.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.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"]]),Oa=A(t.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[t.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"]]),d0=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.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"}),t.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"]]),u0=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.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"]]),f0=A(t.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[t.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"]]),h0=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[t.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"]]),m0=A(t.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(e,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[1]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[t.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"}),t.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"]]),p0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.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"]]),g0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.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"]]),y0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.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"]]),w0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[3]=t.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[t.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.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"]]),b0=A(t.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 e=t.ref(!1);return(i,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["icon",n.iconClass]),style:t.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?t.unref(e)?n.hoverColor:n.color:(t.unref(e),n.color)}),onMouseenter:o[0]||(o[0]=r=>e.value=!0),onMouseleave:o[1]||(o[1]=r=>e.value=!1)},[...o[2]||(o[2]=[t.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[3]=t.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 S0(n){n.component("IconDownload",s0),n.component("IconFilter",a0),n.component("ArrowLeft",p0),n.component("ArrowRight",g0),n.component("DoubleArrowLeft",y0),n.component("DoubleArrowRight",w0),n.component("EllipsisSvg",b0),n.component("IconArrowLeft",l0),n.component("IconCheckDefault",c0),n.component("IconClose",Oa),n.component("IconEdit",d0),n.component("IconEmail",u0),n.component("IconMove",f0),n.component("IconPhone",h0),n.component("IconSearch",Fa),n.component("IconSelectArrow",m0)}const C0=t.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const e=t.ref(n.initActiveIdx),i=o=>{e.value=o};return t.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:e}}});function k0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const x0=A(C0,[["render",k0]]),E0=t.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:e}){const i=t.ref(n.activeId==="0"),o=()=>{i.value=!i.value,e("changeActiveId",n.tabId)};return t.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),t.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),B0=["for"],$0={class:"inside-icon"};function N0(n,e,i,o,r,s){return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:"tab",style:t.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?(t.openBlock(),t.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[3]||(e[3]=[t.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(t.openBlock(),t.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...e[4]||(e[4]=[t.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):t.createCommentVNode("",!0),t.createElementVNode("label",{for:n.tabId,onClick:e[2]||(e[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[t.createElementVNode("div",{style:t.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[t.createElementVNode("div",$0,[t.renderSlot(n.$slots,"icon",{},void 0,!0)]),t.createElementVNode("div",{class:"title-in",style:t.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[t.renderSlot(n.$slots,"inside-title",{},()=>[t.createTextVNode(t.toDisplayString(n.title),1)],!0)],4),t.createElementVNode("div",{class:t.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[t.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,B0),t.createElementVNode("div",{style:t.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:t.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[t.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),e[5]||(e[5]=t.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const M0=A(E0,[["render",N0],["__scopeId","data-v-c2e31ebb"]]),V0={class:"tab"},I0={class:"rotate"},T0=A(t.defineComponent({__name:"VerticalCollapseContainer",setup(n){const e=t.ref(!1),i=async()=>{e.value=!e.value};return(o,r)=>{const s=t.resolveComponent("ArrowRight"),a=t.resolveComponent("ArrowLeft");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",V0,[t.renderSlot(o.$slots,"main",{},void 0,!0),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[t.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),t.createElementVNode("div",{class:"arrow-bar",onClick:i},[t.createElementVNode("div",I0,[t.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),t.unref(e)?(t.openBlock(),t.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(t.openBlock(),t.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),t.createElementVNode("div",{style:t.normalizeStyle({width:t.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[t.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),t.createVNode(a),t.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),P0={class:"add-block_body"},R0=A(t.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(e,i)=>{const o=t.resolveComponent("PSticky");return t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",P0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),A0=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"add-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),z0={class:"add-block_body"},D0=A(t.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(e,i)=>{const o=t.resolveComponent("PSticky"),r=t.resolveComponent("PContainer");return t.openBlock(),t.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:t.withCtx(()=>[t.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),t.createElementVNode("div",z0,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),v0={class:"select-dialog"},F0={class:"select-dialog-header"},_0={class:"select-dialog-title"},O0={class:"select-dialog-content"},L0={class:"select-dialog-actions"},La=A(t.defineComponent({__name:"PAddDialog",props:t.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:t.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:e,emit:i}){const o=n,r=i,s=t.useModel(n,"modelValue"),a=t.ref([]),d=M.Ripple,c=async()=>{await o.store.GetOptions(),a.value=o.store.Options},u=async C=>{await o.store.Get(C.value);const B=o.store.Item,E=new B.constructor(B);r("add",E),f()},f=()=>{r("close"),s.value=!1},h=C=>{C||r("close")},m=()=>{s.value&&f()},w=()=>{s.value=!s.value},y=async()=>{await t.nextTick();const C=document.querySelector(".select-dialog-content .q-item");C&&"focus"in C&&C.focus()};return e({opened:s,toggle:w}),t.onBeforeMount(c),(C,B)=>{const E=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(ci,{modelValue:s.value,"onUpdate:modelValue":[B[0]||(B[0]=N=>s.value=N),h],position:"top",onKeydown:t.withKeys(m,["escape"]),onShow:y},{default:t.withCtx(()=>[t.createElementVNode("div",v0,[t.createElementVNode("div",F0,[t.createElementVNode("div",_0,t.toDisplayString(n.title),1),t.withDirectives(t.createVNode(Ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[E]])]),t.createElementVNode("div",O0,[t.createVNode(t.unref(M.QList),{bordered:"",separator:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),N=>t.withDirectives((t.openBlock(),t.createBlock(t.unref(M.QItem),{key:N.value,clickable:"",class:"q-px-md q-py-sm",onClick:k=>u(N)},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QItemSection),null,{default:t.withCtx(()=>[t.createVNode(t.unref(M.QItemLabel),{class:"text-body1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(N.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[t.unref(d)]])),128))]),_:1})]),t.createElementVNode("div",L0,[t.withDirectives(t.createVNode(Ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[E]])])])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-462df82a"]]),H0=["src"],U0={key:0,class:"header-row"},j0={class:"title-wrapper"},q0={key:0,class:"title-icon"},W0={class:"title-text"},G0={class:"text-subtitle1 text-weight-medium"},Q0={key:0,class:"caption-row"},Y0={class:"text-caption text-grey-6"},X0=["innerHTML"],Z0={key:1,class:"card-footer"},Ha=A(t.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:e}){const i=t.ref(null),o=n,r=e,s=t.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=d=>{o.noPointer||r("click",d)};return(d,c)=>(t.openBlock(),t.createBlock(t.unref(M.QCard),{class:t.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:t.normalizeStyle({height:n.height}),onClick:a},{default:t.withCtx(()=>[n.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"image-container",style:t.normalizeStyle({height:s.value})},[t.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:t.normalizeStyle({height:s.value})},null,12,H0)],4)):t.createCommentVNode("",!0),t.createVNode(t.unref(M.QCardSection),{class:"card-content",style:t.normalizeStyle({maxHeight:n.maxHeight})},{default:t.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",U0,[t.createElementVNode("div",j0,[n.icon||d.$slots.icon?(t.openBlock(),t.createElementBlock("div",q0,[t.renderSlot(d.$slots,"icon",{},()=>[t.createVNode(t.unref(M.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",W0,[t.renderSlot(d.$slots,"title",{},()=>[t.createElementVNode("span",G0,t.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(t.openBlock(),t.createElementBlock("div",Q0,[t.renderSlot(d.$slots,"caption",{},()=>[t.createElementVNode("span",Y0,t.toDisplayString(n.caption),1)],!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),n.title||d.$slots.title?(t.openBlock(),t.createBlock(t.unref(M.QSeparator),{key:1,class:"header-separator"})):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[t.renderSlot(d.$slots,"default",{},()=>[n.content?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,X0)):t.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(t.openBlock(),t.createElementBlock("div",Z0,[t.renderSlot(d.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),J0={key:0,class:"list-title"},K0={class:"draggable-item"},ey={class:"drag-handle"},ty={class:"item-content"},ny={key:0,class:"item-actions"},iy={class:"item-content"},oy={key:0,class:"item-actions"},ry={key:4,class:"add-button-container"},sy=t.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:T.H.BaseStore,default:void 0},addFunc:{type:Function,required:!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:e}){t.useCssVars(c=>({v73008f9f:n.background}));const i=n,o=e,r=async()=>{const c=await i.addFunc();c.order!=="undefined"&&(c.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(c),i.store&&await i.store.Create(c),await d(),o("add",c)},s=async c=>{i.removeFromList&&T.H.Classes.RemoveFromClassById(c,i.list),i.store&&await i.store.Remove(c),await d(),o("remove",c)},a=async c=>{i.store&&await i.store.Update(c),o("update",c)},d=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(T.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(c,u)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(t.openBlock(),t.createElementBlock("div",J0,t.toDisplayString(n.title),1)):t.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(t.openBlock(),t.createBlock(t.unref(po),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:t.withCtx(({element:f,index:h})=>[t.createElementVNode("div",K0,[t.createElementVNode("div",ey,[t.createVNode(t.unref(M.QIcon),{name:"drag_indicator",class:"drag-icon"})]),t.createElementVNode("div",ty,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(zt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",ny,[t.createVNode(Ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)])]),_:3},8,["list"])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:3},t.renderList(n.list,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:f.id,class:"static-item",style:t.normalizeStyle({background:n.background})},[t.createElementVNode("div",iy,[t.renderSlot(c.$slots,"default",{item:f,update:a,index:h},()=>[t.createVNode(zt,{modelValue:f.name,"onUpdate:modelValue":m=>f.name=m,outlined:"",dense:"",class:"content-input",onBlur:m=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(t.openBlock(),t.createElementBlock("div",oy,[t.createVNode(Ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:m=>s(f.id)},null,8,["onClick"])])):t.createCommentVNode("",!0)],4))),128)),n.showAdd?(t.openBlock(),t.createElementBlock("div",ry,[t.createVNode(Ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):t.createCommentVNode("",!0)],16))}}),Ua=A(sy,[["__scopeId","data-v-27edbd1f"]]),ay={class:"del-block_title"},ly={class:"del-block_body"},cy=A(t.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(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"del-block",style:t.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[t.createElementVNode("div",ay,[t.renderSlot(e.$slots,"title",{},void 0,!0)]),t.createElementVNode("div",ly,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),dy={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},uy={class:"edit-dialog-header"},fy={class:"edit-dialog-title"},hy={class:"edit-dialog-content"},my={key:0,class:"edit-dialog-actions"},ja=A(t.defineComponent({__name:"PEditDialog",props:t.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},dy),emits:["update:modelValue","confirm","close"],setup(n,{expose:e,emit:i}){const o=n,r=i,s=t.ref(!1);t.watch(()=>o.modelValue,h=>{s.value=h},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};e({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await t.nextTick();const h=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');h&&"focus"in h&&h.focus()};return(h,m)=>{const w=t.resolveDirective("close-popup");return t.openBlock(),t.createBlock(ci,{modelValue:t.unref(s),"onUpdate:modelValue":[m[0]||(m[0]=y=>t.isRef(s)?s.value=y:null),d],position:"top",onKeydown:[t.withKeys(a,["enter"]),t.withKeys(c,["escape"])],onShow:f},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"edit-dialog",style:t.normalizeStyle({width:o.width})},[t.createElementVNode("div",uy,[t.createElementVNode("div",fy,t.toDisplayString(o.title),1),t.withDirectives(t.createVNode(Ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[w]])]),t.createElementVNode("div",hy,[t.renderSlot(h.$slots,"default",{},void 0,!0)]),o.showConfirm?(t.openBlock(),t.createElementBlock("div",my,[t.withDirectives(t.createVNode(Ne,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[w]]),t.createVNode(Ne,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):t.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),qa=A(t.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:e}){const i=n,o=e,r=a=>{a.key==="Escape"&&s()};t.onMounted(()=>{document.body.addEventListener("keydown",r)}),t.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,d)=>{const c=t.resolveComponent("IconClose");return t.openBlock(),t.createElementBlock(t.Fragment,null,[n.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"blur",onClick:s})):t.createCommentVNode("",!0),n.show?(t.openBlock(),t.createElementBlock("div",{key:1,class:"modal-w",style:t.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[t.createVNode(c,{size:"20px"})])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function py(n){n.component("CollapseContainer",x0),n.component("CollapseItem",M0),n.component("VerticalCollapseContainer",T0),n.component("PAdd",R0),n.component("PAddDialog",La),n.component("PCard",Ha),n.component("PCrudList",Ua),n.component("PEditDialog",ja),n.component("PModal",qa),n.component("PContainer",A0),n.component("PContainerStickyHead",D0),n.component("PDel",cy)}const gy={class:"btn-group"},Wa=A(t.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:e}){const i=e,o=t.computed(()=>De.Form.GetButtons()),r=t.useTemplateRef("fields"),s=async d=>{if(!d.isSubmit){De.Form.SetChunk(d.GetChunk()),a();return}const c=De.Form.Validate();if(c.length>0){qt.Notify.Error(c.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return t.onMounted(async()=>{await a()}),t.onBeforeUnmount(()=>{De.Form.Reset()}),(d,c)=>(t.openBlock(),t.createElementBlock("div",{class:"auth-card",style:t.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[t.createVNode(ar,{string:t.unref(De).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(De).Form.GetFields(),u=>(t.openBlock(),t.createBlock(zt,{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)),t.createElementVNode("div",gy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(u,f)=>(t.openBlock(),t.createBlock(Ne,{id:u.id,key:u.GetChunk(),disabled:t.unref(De).Form.IsBlock,type:f===0?t.unref(me).Success:t.unref(me).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:h=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),yy=t.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const e=()=>{De.Form.Reset(),De.Modal.Close()};return(i,o)=>(t.openBlock(),t.createBlock(qa,{show:t.unref(De).Modal.Visible,closable:t.unref(De).Modal.Closable,width:n.width,padding:n.padding,onClose:e},{default:t.withCtx(()=>[t.createVNode(Wa,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),wy=["onClick"],by=A(t.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:e}){const i=n,o=e,r=t.ref(window.innerWidth),s=t.ref(),a=t.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};t.onMounted(()=>window.addEventListener("resize",d)),t.onUnmounted(()=>window.removeEventListener("resize",d));const c=t.computed(()=>`calc(100% - ${a.value}px + 1px)`);t.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("select")};return(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"mainblock",style:t.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[t.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:t.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.menus.items,(m,w)=>(t.openBlock(),t.createElementBlock("div",{key:w},[t.createElementVNode("div",{class:t.normalizeClass({"selected-tab":w===n.menus.idx,tab:w!==n.menus.idx}),style:t.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:y=>u(w)},t.toDisplayString(m.name),15,wy)]))),128))],4),t.createElementVNode("div",{class:"body-container",style:t.normalizeStyle({background:n.background,height:t.unref(c)})},[t.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):t.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),Sy={class:"field"},Cy=A(t.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(!1),s=t.ref(),a=t.ref(i.withName.name),d=t.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),i.withName.setName&&i.withName.setName(a.value),r.value=!r.value,o("submit")};return(f,h)=>{const m=t.resolveComponent("PString"),w=t.resolveComponent("PInput"),y=t.resolveComponent("InfoItem"),C=t.resolveComponent("PButton"),B=t.resolveComponent("el-form");return t.openBlock(),t.createBlock(B,{ref_key:"form",ref:s,style:{width:"100%"}},{default:t.withCtx(()=>[t.createVNode(y,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":t.withCtx(()=>[t.createVNode(y,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:t.withCtx(()=>[t.createElementVNode("div",Sy,[t.createVNode(w,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=E=>a.value=E),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),t.createVNode(C,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:t.withCtx(()=>[a.value.length?(t.openBlock(),t.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(t.openBlock(),t.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),ky=["id"],xy=["for"],Ey={class:"left-field"},By=["href","download"],$y={key:1,class:"text-field__input"},Ny={class:"right-field"},My=t.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Qe},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:e}){const i=n,o=e,r=Fe.GUID(),s=Fe.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Sn.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const h=new Qe;h.setFile(f),h.url=URL.createObjectURL(f),o("upload",h)},d=()=>{o("remove")};t.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const c=u=>{let f=_s.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const h=t.resolveComponent("PString"),m=t.resolveComponent("PFlex"),w=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("input",{id:t.unref(r),type:"file",hidden:"",onChange:a},null,40,ky),t.createElementVNode("div",{class:"text-field",style:t.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},t.toDisplayString(n.label),9,xy)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"field",style:t.normalizeStyle({borderColor:n.borderColor})},[t.createElementVNode("div",Ey,[t.createVNode(m,null,{default:t.withCtx(()=>[t.renderSlot(u.$slots,"default",{},void 0,!0),t.createVNode(h,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-field__input",style:t.normalizeStyle({color:n.color})},[t.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[t.createElementVNode("div",null,t.toDisplayString(n.fileInfo.originalName),1)],8,By),t.createVNode(w,{skin:"text",type:"del",onClick:d},{default:t.withCtx(()=>[t.createVNode(Oa,{size:"20px",margin:"0 5px"})]),_:1})],4)):(t.openBlock(),t.createElementBlock("div",$y,[t.createVNode(h,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),t.createElementVNode("div",Ny,[t.createVNode(w,{id:t.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)}}}),Vy=A(My,[["__scopeId","data-v-8b73ee22"]]);function Ga(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function ae(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Ga(Object(i),!0).forEach(function(o){dt(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ga(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function dt(n,e,i){return e in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function Iy(n,e){if(n==null)return{};var i,o,r=function(a,d){if(a==null)return{};var c,u,f={},h=Object.keys(a);for(u=0;u<h.length;u++)c=h[u],d.indexOf(c)>=0||(f[c]=a[c]);return f}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function un(n){return function(e){if(Array.isArray(e))return cr(e)}(n)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||function(e,i){if(e){if(typeof e=="string")return cr(e,i);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return cr(e,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function cr(n,e){(e==null||e>n.length)&&(e=n.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=n[i];return o}var Qa,Ty,to,Me=(Qa=function(n){/*!
24
+ `)},B=p=>{const g=u(p);return[c(p),`${p.startTime}–${p.endTime}`,g?`${i.value.participants}: ${g}`:""].filter(Boolean).join(`
25
+ `)},$=(p,g)=>{var C;return{conflict:Fr(p.item,g),dragging:((C=wt.value)==null?void 0:C.perfom.id)===g.id,[Qn(p)]:!0}},I=e.ref(null),_=(p,g)=>{const C=p.getBoundingClientRect(),R=Math.min(Math.max((g-C.top)/C.height,0),1);return ke.value.start+gi(R*ke.value.total,gn)},Z=(p,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||T.value||(I.value={gi:p,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",Ve),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",te),window.addEventListener("keydown",pe))},Ve=p=>{const g=I.value;if(g){if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<_a)return;g.moved=!0;const C=hi(g.gi.item.startTime,g.gi.item.endTime);E.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?i.value.session:i.value.slot),duration:isFinite(C)&&C>0?C:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}Ie(p.clientX,p.clientY),ne(p.clientX,p.clientY)}},Ie=(p,g)=>{var Me,De;const C=document.elementFromPoint(p,g),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id");if(!R||!q){x.value=void 0,V.value=null;return}const J=Si(q);if(!J)return;x.value=J.id;const me=_(R,g);V.value={scheduleId:J.id,minutes:me,time:rt(me),hallName:Ct(J),...((Me=E.value)==null?void 0:Me.kind)==="slot"?{session:jr(J.sessions,me,me+(((De=E.value)==null?void 0:De.duration)||30),fe)}:{}},k.value={x:p,y:g}},ne=(p,g)=>{const C=A.value;if(!C)return;const R=C.getBoundingClientRect();g<R.top+48?C.scrollTop-=14:g>R.bottom-48&&(C.scrollTop+=14),p<R.left+48?C.scrollLeft-=14:p>R.right-48&&(C.scrollLeft+=14)},O=p=>{H(p)},H=async p=>{const g=I.value;if(U(),I.value=null,!g||!g.moved)return;M.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id"),J=q?Si(q):void 0;if(R&&J){const me=_(R,p.clientY);await Dl(J,me)}j()},U=()=>{window.removeEventListener("pointermove",Ve),window.removeEventListener("pointerup",O),window.removeEventListener("pointercancel",te),window.removeEventListener("keydown",pe)},j=()=>{I.value=null,E.value=null,x.value=void 0,V.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",M.value=Date.now()},te=()=>{U(),j()},pe=p=>{p.key==="Escape"&&te()};e.onBeforeUnmount(()=>{U(),qr(),document.body.style.userSelect="",document.body.style.cursor=""});const be=p=>{if(!p)return null;for(const g of t.days||[])for(const C of g.schedules||[]){const R=(C.sessions||[]).find(J=>J.id===p);if(R)return{kind:"session",item:R,schedule:C};const q=r(C).find(J=>J.id===p);if(q)return{kind:"slot",item:q,schedule:C}}return null},dt=()=>{var p;return be((p=E.value)==null?void 0:p.id)},bo=(p,g)=>{g.preventDefault(),g.stopPropagation();const C=p.item,R=fe(C.startTime),q=fe(C.endTime);if(!isFinite(R)||!isFinite(q))return;const J=g.clientY;T.value=!0;const me=D=>{const X=(D.clientY-J)/se.value*60,K=gi(q+X,gn);C.endTime=rt(Math.max(K,R+gn))},Me=async()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",De),T.value=!1,M.value=Date.now();const D=be(C.id);D&&(await xt(C,D.kind),await t.persist.refresh())},De=()=>{Me()};window.addEventListener("pointermove",me),window.addEventListener("pointerup",De)},wt=e.ref(null),Hr=(p,g,C)=>{if(C.target.closest(".nested-edit, .nested-resize")||C.button!==0||T.value)return;const R=C.target.closest(".session-perfoms"),q=fe(p.startTime),J=fe(p.endTime),me=hi(g.startTime,g.endTime);!R||!isFinite(q)||!isFinite(J)||J<=q||(wt.value={perfom:g,session:p,startX:C.clientX,startY:C.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:q,sessionDur:J-q,durMin:isFinite(me)&&me>0?me:30,container:R},window.addEventListener("pointermove",Pl),window.addEventListener("pointerup",Tl),window.addEventListener("pointercancel",Ur),window.addEventListener("keydown",Rl))},Pl=p=>{const g=wt.value;if(!g)return;if(!g.moved){if(Math.hypot(p.clientX-g.startX,p.clientY-g.startY)<_a)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const C=g.container.getBoundingClientRect(),R=Math.min(Math.max((p.clientY-C.top)/C.height,0),1);let q=g.sessionStart+gi(R*g.sessionDur,gn);const J=g.sessionStart+g.sessionDur-g.durMin;q=Math.min(Math.max(q,g.sessionStart),Math.max(J,g.sessionStart)),g.perfom.startTime=rt(q),g.perfom.endTime=rt(q+g.durMin),k.value={x:p.clientX,y:p.clientY}},Tl=p=>{wb(p)},wb=async p=>{var me;const g=wt.value;if(qr(),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;M.value=Date.now();const C=document.elementFromPoint(p.clientX,p.clientY),R=C==null?void 0:C.closest(".hall-col"),q=R==null?void 0:R.getAttribute("data-schedule-id"),J=q?Si(q):void 0;if(R&&J){E.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||i.value.slot,duration:g.durMin};const Me=_(R,p.clientY),De=rt(Me),D=hi(g.perfom.startTime,g.perfom.endTime),X=pn(De,D>0?D:30),K=((me=_l(g.perfom))==null?void 0:me.id)===J.id&&g.perfom.startTime===De&&g.perfom.endTime===X;await Dl(J,Me),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),E.value=null;return}g.perfom.startTime=vn(g.perfom.startTime),g.perfom.endTime=vn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Ur=()=>{const p=wt.value;qr(),p&&(p.perfom.startTime=p.savedStart,p.perfom.endTime=p.savedEnd),wt.value=null,k.value=null,document.body.style.userSelect="",document.body.style.cursor=""},qr=()=>{window.removeEventListener("pointermove",Pl),window.removeEventListener("pointerup",Tl),window.removeEventListener("pointercancel",Ur),window.removeEventListener("keydown",Rl)},Rl=p=>{p.key==="Escape"&&Ur()},bb=(p,g,C)=>{C.preventDefault(),C.stopPropagation();const R=fe(p.startTime),q=fe(p.endTime),J=fe(g.startTime),me=C.target.closest(".nested-perfom"),Me=me==null?void 0:me.closest(".session-perfoms");if(!me||!Me||!isFinite(R)||!isFinite(q)||q<=R||!isFinite(J))return;const De=Me.getBoundingClientRect(),D=q-R;T.value=!0;const X=Cn=>{const Bb=Math.min(Math.max((Cn.clientY-De.top)/De.height,0),1),Nb=Math.min(Math.max(J+gn,R+gi(Bb*D,gn)),q);g.endTime=rt(Nb)},K=async()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",W),T.value=!1,M.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},W=()=>{K()};window.addEventListener("pointermove",X),window.addEventListener("pointerup",W)},Dl=async(p,g)=>{var X;x.value=void 0,V.value=null,k.value=null;const C=dt();if(!C)return;const R=rt(g),q=hi(C.item.startTime,C.item.endTime),J=pn(R,q>0?q:30);if(((X=C.schedule)==null?void 0:X.id)===p.id&&C.item.startTime===R&&C.item.endTime===J)return;const me=C.item.startTime;if(C.item.startTime=R,C.item.endTime=J,C.kind==="slot"){const K=jr(p.sessions,fe(R),fe(J),fe);K?C.item.sessionId=K.id:delete C.item.sessionId}if(C.kind==="session"){const K=fe(R)-fe(me);for(const W of Xe(C.item))W.startTime&&(W.startTime=pn(W.startTime,K),W.endTime&&(W.endTime=pn(W.endTime,K)),W.scheduleId=p.id,await xt(W,"slot"))}const Me=C.schedule,De=C.kind==="session"?p.sessions:r(p),D=C.item;if(Me&&Me.id!==p.id){D.scheduleId=p.id;const K=C.kind==="session"?Me.sessions:r(Me);P.H.Classes.RemoveFromClassById(D.id,K,[]),De.push(D)}await xt(D,C.kind),await t.persist.refresh()},Sb=async(p,g)=>{if(g.target.closest(".timeline-block"))return;const C=_(g.currentTarget,g.clientY),R=o.value.createSlot(p);R.startTime=rt(C),R.endTime=rt(C+30);const q=jr(p.sessions,C,C+30,fe);q!=null&&q.id&&(R.sessionId=q.id),await t.persist.createSlot(R),await t.persist.refresh();const J=be(R.id);J&&Ci(J)},Al=async(p,g,C)=>{if(p.added){if(p.added.element.scheduleId=g.id,C==="slot"&&p.added.element.sessionId&&((g.sessions||[]).some(q=>q.id===p.added.element.sessionId)||delete p.added.element.sessionId),await xt(p.added.element,C),C==="session")for(const R of s(p.added.element))R.scheduleId=g.id,await t.persist.updateSlot(R);await t.persist.refresh()}},Si=p=>{for(const g of t.days||[]){const C=(g.schedules||[]).find(R=>R.id===p);if(C)return C}},jr=(p,g,C,R)=>Da(p,g,C,R),zl=p=>((p==null?void 0:p.sessions)||[]).map(g=>({id:g.id,label:d(g)})),_l=p=>{for(const g of t.days||[])for(const C of g.schedules||[])if(r(C).some(R=>R.id===p.id)||p.sessionId&&(C.sessions||[]).some(R=>R.id===p.sessionId))return C},Fl=e.computed(()=>{const p=S.value;if(p)return p.kind==="session"?Si(p.item.scheduleId)||kb(p.item):_l(p.item)}),Cb=e.computed(()=>{const p=S.value;return!p||p.kind!=="slot"?[]:zl(Fl.value)}),kb=(p,g)=>{for(const C of t.days||[])for(const R of C.schedules||[])if((R.sessions||[]).some(q=>q.id===p.id))return R},Ol=async(p,g)=>{g?p.sessionId=g:delete p.sessionId,await t.persist.updateSlot(p),await t.persist.refresh()},Ll=async p=>{const g=o.value.createSession(p);await t.persist.createSession(g),await t.persist.refresh()},vl=async p=>{const g=o.value.createSlot(p),C=[...r(p)].sort(pr).slice(-1)[0];g.startTime=vn(C==null?void 0:C.endTime)||"9:00",g.endTime=pn(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},Wr=async(p,g)=>{if(g==="slot")await t.persist.removeSlot(p);else{for(const C of s(p))delete C.sessionId,await t.persist.updateSlot(C);await t.persist.removeSession(p)}await t.persist.refresh()},xt=async(p,g)=>{const C=vn(p.startTime),R=vn(p.endTime);if(!C){t.persist.notify("warning",i.value.correctStartTime);return}p.startTime=C,p.endTime=R||pn(C,30),g==="slot"?await t.persist.updateSlot(p):await t.persist.updateSession(p)},Ci=p=>{T.value||Date.now()-M.value<400||(S.value={kind:p.kind,item:p.item},y.value=!0)},xb=async()=>{const p=S.value;p&&(await xt(p.item,p.kind),y.value=!1,S.value=null,await t.persist.refresh())},Eb=async()=>{const p=S.value;p&&(await Wr(p.item,p.kind),y.value=!1,S.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(p,g)=>{var Me,De;const C=e.resolveComponent("PButton"),R=e.resolveComponent("PInput"),q=e.resolveComponent("PTooltip"),J=e.resolveComponent("PSelect"),me=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",rp,[(Me=n.days)!=null&&Me.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ap,[e.createVNode(e.unref(N.QTabs),{modelValue:m.value,"onUpdate:modelValue":g[0]||(g[0]=D=>m.value=D),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,D=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:D.id,name:D.id,label:at(D)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(N.QSpace)),he.value?(e.openBlock(),e.createBlock(R,{key:0,"model-value":$e(he.value.date),label:i.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=D=>Pt(he.value,D))},null,8,["model-value","label"])):e.createCommentVNode("",!0),e.createVNode(C,{size:"sm",color:"negative",outline:"",icon:"delete",label:i.value.deleteDay,disable:!he.value,onClick:g[2]||(g[2]=D=>Tt(he.value))},null,8,["label","disable"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"event",label:i.value.addDay,onClick:Ut},null,8,["label"]),e.createVNode(C,{size:"sm",color:"primary",outline:"",icon:"add",label:i.value.addHall,onClick:it},null,8,["label"]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",lp,[e.createVNode(e.unref(N.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(N.QBtnToggle),{modelValue:se.value,"onUpdate:modelValue":g[3]||(g[3]=D=>se.value=D),"toggle-color":"primary",options:Q,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QBtnToggle),{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=D=>f.value=D),"toggle-color":"primary",options:[{label:i.value.grid,value:"grid",icon:"calendar_view_week"},{label:i.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),f.value==="grid"?(e.openBlock(),e.createElementBlock("div",cp,[yt(he.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:A,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":yt(he.value).length,"--hours":Math.max(ke.value.total/60,1),"--half-hours":Math.max(ke.value.total/60*2,2)})},[e.createElementVNode("div",up,[g[15]||(g[15]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-head",{"drag-over":x.value===D.id}])},[e.createElementVNode("div",fp,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",mp,e.toDisplayString(Ct(D)),1),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:X=>vl(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:X=>Ll(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.addSession),1)]),_:1})]),_:1},8,["onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:Ne.value})},[e.createElementVNode("div",hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ke.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"hour-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.min,class:"half-label",style:e.normalizeStyle({top:(D.min-ke.value.start)/ke.value.total*100+"%"})},e.toDisplayString(D.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:e.normalizeClass(["hall-col",{"drag-over":x.value===D.id}]),"data-schedule-id":D.id,onDblclick:X=>Sb(D,X)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Te(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:X.item.id,class:e.normalizeClass(["timeline-block",[X.kind,{conflict:wo(D,X),dragging:((K=E.value)==null?void 0:K.id)===X.item.id},Qn(X)]]),style:e.normalizeStyle(Re(X)),title:bi(X),onPointerdown:W=>Z(X,W),onClick:W=>Ci(X)},[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",yp,[e.createElementVNode("div",wp,e.toDisplayString(X.item.startTime)+"–"+e.toDisplayString(X.item.endTime),1),e.createElementVNode("div",bp,e.toDisplayString(Lr(X)),1),X.kind==="slot"&&u(X.item)?(e.openBlock(),e.createElementBlock("div",Sp,e.toDisplayString(u(X.item)),1)):e.createCommentVNode("",!0)]),X.kind==="session"&&Xe(X.item).length?(e.openBlock(),e.createElementBlock("div",Cp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(X.item),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["nested-perfom",$(X,W)]),style:e.normalizeStyle(Or(X.item,W)),title:B(W),onPointerdown:e.withModifiers(Cn=>Hr(X.item,W,Cn),["stop"]),onClick:e.withModifiers(Cn=>Ci({kind:"slot",item:W}),["stop"])},[e.createElementVNode("div",xp,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createElementVNode("div",Ep,e.toDisplayString(vr(W,Qn(X))),1),u(W)?(e.openBlock(),e.createElementBlock("div",Bp,e.toDisplayString(u(W)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(Cn=>bb(X.item,W,Cn),["stop","prevent"])},null,40,Np)],46,kp))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",$p,[wo(D,X)?(e.openBlock(),e.createBlock(e.unref(N.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(W=>Ci(X),["stop"])},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:i.value.changeDurationTitle,onPointerdown:e.withModifiers(W=>bo(X,W),["stop","prevent"])},null,40,Vp)],46,gp)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(wn(D),X=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+X.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=E.value)==null?void 0:K.id)===X.item.id}]),style:e.normalizeStyle(Re(X)),title:d(X.item)},[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Mp,e.toDisplayString(d(X.item)),1)],14,Ip)}),128)),V.value&&V.value.scheduleId===D.id&&E.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:Dt.value}]),style:e.normalizeStyle(bn.value)},null,6)):e.createCommentVNode("",!0),V.value&&V.value.scheduleId===D.id&&E.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[E.value.kind,{conflict:Dt.value}]]),style:e.normalizeStyle(lt.value)},[e.createElementVNode("div",Pp,[e.createTextVNode(e.toDisplayString(V.value.time)+"–"+e.toDisplayString(ct.value)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock("span",Tp,e.toDisplayString(i.value.intoSession),1)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock("span",Rp," ⚠ "+e.toDisplayString(i.value.conflictCount)+": "+e.toDisplayString(kt.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Dp,e.toDisplayString(E.value.name),1)],6)):e.createCommentVNode("",!0)],42,pp))),128))],4),e.createElementVNode("div",Ap,e.toDisplayString(i.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",dp,[e.createTextVNode(e.toDisplayString(i.value.noHalls)+" ",1),e.createVNode(C,{flat:"",color:"primary",size:"sm",label:i.value.addHall,onClick:it},null,8,["label"])])),k.value&&V.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(N.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(V.value.time)+" · "+e.toDisplayString(V.value.hallName)+" ",1),V.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[16]||(g[16]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(N.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(i.value.intoSession)+" «"+e.toDisplayString(d(V.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),kt.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[17]||(g[17]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(N.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(kt.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(De=wt.value)!=null&&De.moved&&k.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:k.value.x+"px",top:k.value.y+"px"})},[e.createVNode(e.unref(N.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(wt.value.perfom.startTime)+"–"+e.toDisplayString(wt.value.perfom.endTime)+" · "+e.toDisplayString(i.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(yt(he.value),D=>(e.openBlock(),e.createBlock(e.unref(N.QCard),{key:D.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",_p,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Fp,e.toDisplayString(Ct(D)),1),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.session,onClick:X=>Ll(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:i.value.slot,onClick:X=>vl(D)},null,8,["label","onClick"]),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:X=>we(D)},{default:e.withCtx(()=>[e.createVNode(q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])])]),_:2},1024),e.createVNode(e.unref(N.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var X;return[(X=D.sessions)!=null&&X.length?(e.openBlock(),e.createElementBlock("div",Op,[e.createElementVNode("div",Lp,[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.sessionsTitle),1)]),e.createVNode(e.unref(Co),{list:D.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,D,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",vp,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(p.$slots,"session-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>Wr(K,"session")},null,8,["onClick"])]),Xe(K).length?(e.openBlock(),e.createElementBlock("div",Hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe(K),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:"list-row nested-row"},[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",Up,e.toDisplayString(c(W)),1),e.createElementVNode("div",qp,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:Cn=>Ci({kind:"slot",item:W})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",jp,[e.createElementVNode("div",Wp,[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(i.value.slotsTitle),1)]),e.createVNode(e.unref(Co),{list:qt(D),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,D,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Gp,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(R,{"model-value":K.name,label:i.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>K.name=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.startTime,label:i.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.startTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(R,{"model-value":K.endTime,label:i.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>K.endTime=W,onBlur:W=>xt(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(J,{"model-value":K.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:zl(D),"option-value":"id","option-label":"label","onUpdate:modelValue":W=>Ol(K,W)},null,8,["model-value","label","options","onUpdate:modelValue"]),e.renderSlot(p.$slots,"slot-row-extra",{element:K,schedule:D},void 0,!0),e.createVNode(C,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>Wr(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!qt(D).length&&!Gn(D)?(e.openBlock(),e.createElementBlock("div",Qp,e.toDisplayString(i.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",Yp,e.toDisplayString(i.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",sp,[e.createVNode(e.unref(N.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(i.value.noDays),1),e.createVNode(C,{color:"primary",outline:"",label:i.value.addDay,icon:"event",class:"q-mt-sm",onClick:Ut},null,8,["label"])])),e.createVNode(me,{modelValue:h.value,"onUpdate:modelValue":g[7]||(g[7]=D=>h.value=D)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Xp,e.toDisplayString(i.value.addHall),1)]),_:1}),e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Zp,[e.createVNode(R,{modelValue:w.value,"onUpdate:modelValue":g[5]||(g[5]=D=>w.value=D),label:i.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(Rt,["enter"])},null,8,["modelValue","label"]),e.createVNode(C,{color:"primary",label:i.value.create,icon:"add",dense:"",onClick:Rt},null,8,["label"])]),e.renderSlot(p.$slots,"places-list",{day:he.value,add:je},()=>[Ce.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Jp,e.toDisplayString(i.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",Kp,e.toDisplayString(a(D)),1),e.createVNode(C,{size:"sm",color:"primary",outline:"",label:i.value.addHall,icon:"add",dense:"",onClick:X=>je(D)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(N.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(C,{label:i.value.close,color:"primary",onClick:g[6]||(g[6]=D=>h.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(me,{modelValue:y.value,"onUpdate:modelValue":g[14]||(g[14]=D=>y.value=D)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),null,{default:e.withCtx(()=>{var D;return[e.createElementVNode("div",eg,e.toDisplayString(((D=S.value)==null?void 0:D.kind)==="session"?i.value.session:i.value.slot),1)]}),_:1}),S.value?(e.openBlock(),e.createBlock(e.unref(N.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:S.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=D=>S.value.item.name=D),label:i.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",tg,[e.createElementVNode("div",ng,[e.createVNode(R,{modelValue:S.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=D=>S.value.item.startTime=D),label:i.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",ig,[e.createVNode(R,{modelValue:S.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=D=>S.value.item.endTime=D),label:i.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),S.value.kind==="slot"?(e.openBlock(),e.createBlock(J,{key:0,"model-value":S.value.item.sessionId,label:i.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Cb.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=D=>Ol(S.value.item,D))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"edit-form",{kind:S.value.kind,item:S.value.item,schedule:Fl.value},void 0,!0),S.value.kind==="slot"?(e.openBlock(),e.createBlock(R,{key:1,modelValue:S.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=D=>S.value.item.description=D),label:i.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QCardActions),{align:"right"},{default:e.withCtx(()=>[S.value?(e.openBlock(),e.createBlock(C,{key:0,flat:"",color:"negative",label:i.value.delete,onClick:Eb},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QSpace)),e.createVNode(C,{flat:"",label:i.value.cancel,color:"primary",onClick:g[13]||(g[13]=D=>y.value=!1)},null,8,["label"]),e.createVNode(C,{label:i.value.save,color:"primary",onClick:xb},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"])])}}}),[["__scopeId","data-v-cfbff9e3"]]),og={class:"schedule-timeline"},rg={key:0,class:"timeline-container"},sg={class:"day-header"},ag={class:"day-title"},lg={class:"timeline"},cg={key:0,class:"schedule-place"},dg={class:"events-column"},ug={key:0,class:"event-item session-item"},fg={class:"event-content"},mg={class:"event-time"},hg={class:"event-main"},pg={class:"event-name"},gg={key:0,class:"speakers-list"},yg=["onClick"],wg={class:"speaker-details"},bg={class:"speaker-name"},Sg={class:"bio-text"},Cg=["onClick"],kg={key:0,class:"perfom-divider"},xg={class:"event-content"},Eg={class:"event-time"},Bg={class:"event-main"},Ng={class:"event-name"},$g={class:"event-badges"},Vg={key:0,class:"speakers-list"},Ig=["onClick"],Mg={class:"speaker-details"},Pg={class:"speaker-name"},Tg={class:"bio-text"},Rg={key:1,class:"no-program"},Oa=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 i=n,o=t,r=e.computed(()=>({noProgram:i.noProgramText||"Программа пока не опубликована"})),s=k=>{if(i.dayTitle)return i.dayTitle(k);const T=new Date(k.date);return isNaN(T.getTime())||T.getFullYear()<2e3?"":T.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=k=>{var T;return i.placeName?i.placeName(k):((T=k.place)==null?void 0:T.name)||k.placeName||""},d=k=>i.slotName?i.slotName(k):(k==null?void 0:k.name)||"",c=k=>i.sessionName?i.sessionName(k):(k==null?void 0:k.name)||"",u=k=>i.slotParticipants?i.slotParticipants(k):(k==null?void 0:k.participants)||[],f=k=>i.sessionParticipants?i.sessionParticipants(k):(k==null?void 0:k.participants)||[],m=k=>{var T,M;return i.participantName?i.participantName(k):(k==null?void 0:k.name)||(k==null?void 0:k.fullName)||((M=(T=k==null?void 0:k.human)==null?void 0:T.getFullName)==null?void 0:M.call(T))||""},h=k=>i.participantBio?i.participantBio(k):(k==null?void 0:k.bio)||(k==null?void 0:k.regalias)||"",w=k=>i.slotListOf?i.slotListOf(k):(k==null?void 0:k.slots)||[],y=k=>i.nestedSlotListOf?i.nestedSlotListOf(k):(k==null?void 0:k.slots)||[],S=k=>k.schedules.filter(T=>{var M;return w(T).length>0||(((M=T.sessions)==null?void 0:M.length)||0)>0}),E=k=>{const T=[],M=new Set((k.sessions||[]).map(Q=>Q.id));for(const Q of k.sessions||[]){T.push({kind:"session",item:Q,nested:!1,index:0});for(const se of y(Q))T.push({kind:"slot",item:se,nested:!0,index:0})}let A=0;for(const Q of w(k).filter(se=>!se.sessionId||!M.has(se.sessionId)))T.push({kind:"slot",item:Q,nested:!1,index:A++});return T},x=e.computed(()=>{var k;return(k=i.days)==null?void 0:k.some(T=>{var M;return(M=T.schedules)==null?void 0:M.some(A=>{var Q;return w(A).length>0||(((Q=A.sessions)==null?void 0:Q.length)||0)>0})})}),V=(k,T)=>`${k} - ${T}`;return(k,T)=>(e.openBlock(),e.createElementBlock("div",og,[x.value?(e.openBlock(),e.createElementBlock("div",rg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,M=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:"day-section"},[e.createElementVNode("div",sg,[e.createElementVNode("div",ag,[e.createVNode(e.unref(N.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(M)),1)])]),e.createElementVNode("div",lg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S(M),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"time-slot"},[a(A)?(e.openBlock(),e.createElementBlock("div",cg,[e.createVNode(e.unref(N.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(A)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",dg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E(A),Q=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Q.item.id},[Q.kind==="session"?(e.openBlock(),e.createElementBlock("div",ug,[e.createElementVNode("div",fg,[e.createElementVNode("div",mg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",hg,[e.createElementVNode("div",pg,e.toDisplayString(c(Q.item)),1),f(Q.item).length?(e.openBlock(),e.createElementBlock("div",gg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>o("open-participant",se)},[e.createElementVNode("div",wg,[e.createElementVNode("div",bg,[e.createVNode(e.unref(N.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Sg,e.toDisplayString(h(se)),1)])],8,yg))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":Q.item.active,"nested-item":Q.nested},{clickable:i.slotClickable}]]),onClick:se=>i.slotClickable&&o("slot-click",Q.item)},[!Q.nested&&Q.index>0?(e.openBlock(),e.createElementBlock("div",kg)):e.createCommentVNode("",!0),e.createElementVNode("div",xg,[e.createElementVNode("div",Eg,e.toDisplayString(V(Q.item.startTime,Q.item.endTime)),1),e.createElementVNode("div",Bg,[e.createElementVNode("div",Ng,e.toDisplayString(d(Q.item)),1),e.createElementVNode("div",$g,[e.renderSlot(k.$slots,"badges",{item:Q.item},void 0,!0)]),u(Q.item).length?(e.openBlock(),e.createElementBlock("div",Vg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(Q.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:_e=>o("open-participant",se)},[e.createElementVNode("div",Mg,[e.createElementVNode("div",Pg,[e.createVNode(e.unref(N.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Tg,e.toDisplayString(h(se)),1)])],8,Ig))),128))])):e.createCommentVNode("",!0)])])],10,Cg))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",Rg,[e.createVNode(e.unref(N.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Dg=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Fa,ScheduleTimeline:Oa},Symbol.toStringTag,{value:"Module"})),Ag=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:pn,blockSizeClass:Aa,blockStyle:Ma,byStart:pr,diffM:hi,findEnclosingSession:Da,fromMin:rt,gridBounds:Ia,hasConflict:Ta,intersects:pi,nestedConflict:Ra,nestedSlotStyle:Pa,normTime:vn,snapMinutes:gi,toMin:fe},Symbol.toStringTag,{value:"Module"}));let zg=class extends ue{constructor(){super(no,"schedule-days")}};const _g=new zg;let Fg=class extends ue{constructor(){super(Ln,"schedule-places")}};const Og=new Fg;let Lg=class extends ue{constructor(){super(On,"schedule-sessions")}};const vg=new Lg;let Hg=class extends ue{constructor(){super(Ft,"schedule-slots")}};const Ug=new Hg;let qg=class extends ue{constructor(){super(mi,"schedule-timetables")}};const jg=new qg,Wg=Object.freeze(Object.defineProperty({__proto__:null,C:op,Components:Dg,H:Ag,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:_g,SchedulePlacesStore:Og,ScheduleSessionsStore:vg,ScheduleSlotsStore:Ug,SchedulesStore:jg},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:za,defaultScheduleLabels:gr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Gg=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:ui},Symbol.toStringTag,{value:"Module"}));let Qg=class extends ue{constructor(){super(ui,"color-themes")}};const Yg=new Qg,Xg=Object.freeze(Object.defineProperty({__proto__:null,C:Gg,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Yg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Zg=["innerHTML"],yr=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 i=n,o=t;e.onBeforeMount(()=>{i.tabsStore.Select()});const r=s=>{i.tabsStore.Select(s),o("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(N.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,d=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:d.value,name:d.value,label:d.htmlLabel?void 0:d.label,icon:d.icon,"no-caps":""},{default:e.withCtx(()=>[d.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:d.htmlLabel},null,8,Zg)):e.createCommentVNode("",!0),d.alert?(e.openBlock(),e.createBlock(e.unref(N.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(N.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,d=>(e.openBlock(),e.createBlock(e.unref(N.QTabPanel),{key:d.value,name:d.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:d,tab:d},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),Jg={class:"q-pa-md"},wr=z(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const i=n,o=t,r=a=>{i.tabsStore.Select(a),o("select")},s=e.ref(20);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(N.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":d[0]||(d[0]=c=>e.isRef(s)?s.value=c:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(N.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,c=>(e.openBlock(),e.createBlock(e.unref(N.QTab),{key:c.value,name:c.value,label:c.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",Jg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(c,u)=>(e.openBlock(),e.createBlock(oe,{key:u,label:c.text,color:c.color,class:"q-mb-sm full-width",onClick:f=>c.action(c)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(N.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(),c=>(e.openBlock(),e.createBlock(e.unref(N.QTabPanel),{key:c.value,name:c.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class io{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","");l(this,"value","")}preSelect(){var i;const t=P.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((i=this.items[0])==null?void 0:i.value);return}this.Select(t)}static ToTab(t,i="",o=""){return{label:o,value:i,...t}}static Create(t,i){const o=new io;return o.key=t,o.items=i,o.items.length&&o.preSelect(),o}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(o=>o.value===t),this.value=t;const i=this.GetValue();i&&P.H.Router.SetQueryParam(this.key,i)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function La(n){n.component("PTabs",yr),n.component("PTabsLeft",wr)}const Kg=Object.freeze(Object.defineProperty({__proto__:null,Buildings:vf,Chats:Yf,Contacts:Tm,Docs:qm,Extracts:Ym,Forms:Sh,Menus:Vh,Pages:Jh,Schedule:Wg,Settings:Xg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:yr,PTabsLeft:wr,TabsStore:io,default:La},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),va=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QCheckbox),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Ha=e.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:t}){const i=t,o=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(o))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=o[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(N.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]=d=>i("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),e1={class:"row items-center justify-end"},oo="DD.MM.YYYY",ro=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}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const i=n,o=t,r=e.useModel(n,"modelValue"),s=oo.replace(/[DMY]/g,"#"),a=e.ref(null),d=y=>{if(i.modelType){a.value=i.modelType;return}y instanceof Date?a.value="date":(typeof y=="string"&&y||a.value===null)&&(a.value="string")},c=y=>{if(!y)return"";if(y instanceof Date)return Number.isNaN(y.getTime())?"":N.date.formatDate(y,oo);const S=String(y).match(/^(\d{4})-(\d{2})-(\d{2})/);if(S)return`${S[3]}.${S[2]}.${S[1]}`;const E=new Date(y);return Number.isNaN(E.getTime())?"":N.date.formatDate(E,oo)},u=y=>{const S=y.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!S)return null;const E=+S[1],x=+S[2],V=+S[3];if(E<1||E>31||x<1||x>12||V<1900||V>2100)return null;const k=new Date(V,x-1,E);return k.getFullYear()!==V||k.getMonth()!==x-1||k.getDate()!==E?null:k},f=e.ref(c(r.value));d(r.value),e.watch(r,y=>{d(y);const S=c(y);S!==f.value&&(f.value=S)});const m=y=>{const S=typeof y=="number"?String(y):y;if(!S){const x=a.value==="date"?null:"";r.value=x,o("input",x);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(S))return;const E=u(S);if(E)if(a.value==="date")r.value=E,o("input",E);else{const x=E.getFullYear(),V=String(E.getMonth()+1).padStart(2,"0"),k=String(E.getDate()).padStart(2,"0"),T=`${x}-${V}-${k}`;r.value=T,o("input",T)}},h=()=>{o("blur",r.value)},w={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(y,S)=>{const E=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(ot,{modelValue:e.unref(f),"onUpdate:modelValue":[S[1]||(S[1]=x=>e.isRef(f)?f.value=x:null),m],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(s),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,inputmode:"numeric",onBlur:h},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QDate),{modelValue:e.unref(f),"onUpdate:modelValue":S[0]||(S[0]=x=>e.isRef(f)?f.value=x:null),mask:oo,"today-btn":"",locale:w},{default:e.withCtx(()=>[e.createElementVNode("div",e1,[e.withDirectives(e.createVNode(oe,{label:"Готово",color:"primary",flat:""},null,512),[[E]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(y.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width"])}}}),t1=e.defineComponent({inheritAttrs:!1,__name:"PDatePicker",props:e.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useModel(n,"modelValue"),r=d=>{const c=d.getFullYear(),u=String(d.getMonth()+1).padStart(2,"0"),f=String(d.getDate()).padStart(2,"0");return`${c}-${u}-${f}`},s=d=>{i("input",d instanceof Date?r(d):d??null)},a=()=>{i("blur")};return(d,c)=>(e.openBlock(),e.createBlock(ro,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder||void 0,margin:n.margin,padding:n.padding,onBlur:a,onInput:s},{before:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),append:e.withCtx(()=>[e.renderSlot(d.$slots,"right")]),_:3},8,["modelValue","label","placeholder","margin","padding"]))}}),n1={class:"row items-center justify-end"},i1={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:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=e.ref(""),o=e.ref(""),r=e.ref(""),s=w=>w?N.date.formatDate(w,"DD.MM.YYYY HH:mm"):"",a=w=>{if(!w||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(w))return null;const y=N.date.extractDate(w,"DD.MM.YYYY HH:mm");return Number.isNaN(y.getTime())?null:y},d=w=>{t.value=w},c=w=>{const y=String(w??"");i.value=y.replace(/[_\s]/g,"")===""?"":y},u=()=>{const w=a(i.value);w?d(w):i.value===""?d(null):i.value=s(t.value)},f=()=>{if(o.value){const w=t.value?N.date.formatDate(t.value,"HH:mm"):"00:00",y=`${o.value} ${w}`,S=a(y);S&&(i.value=s(S),d(S))}o.value=""},m=()=>{if(r.value){const w=t.value?N.date.formatDate(t.value,"DD.MM.YYYY"):"",y=N.date.formatDate(new Date,"DD.MM.YYYY"),S=w?`${w} ${r.value}`:`${y} ${r.value}`,E=a(S);E&&(i.value=s(E),d(E))}r.value=""};e.watch(t,w=>{w!==a(i.value)&&(i.value=s(w??null))},{immediate:!0});const h={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(w,y)=>{const S=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(ot,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":c,onBlur:u},{prepend:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QDate),{modelValue:e.unref(o),"onUpdate:modelValue":y[0]||(y[0]=E=>e.isRef(o)?o.value=E:null),mask:"DD.MM.YYYY",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",n1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:f},null,512),[[S]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(N.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QTime),{modelValue:e.unref(r),"onUpdate:modelValue":y[1]||(y[1]=E=>e.isRef(r)?r.value=E:null),mask:"HH:mm",format24h:"",locale:h},{default:e.withCtx(()=>[e.createElementVNode("div",i1,[e.withDirectives(e.createVNode(oe,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[S]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message"])}}}),o1=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),r1={class:"p-hint-popup"},br=z(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(N.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:o[0]||(o[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(mt,{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(N.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":o[1]||(o[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",r1,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),s1=e.defineComponent({__name:"PInputDate",props:e.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","change","beforeChange","input"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useModel(n,"modelValue");let r=null;const s=d=>{i("input",d),r=d instanceof Date?d:null},a=()=>{r instanceof Date&&(i("beforeChange",r),i("change",r),r=null)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"style-container",style:e.normalizeStyle({width:n.width,position:"relative"})},[e.createVNode(ro,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),"model-type":"date",label:n.label||void 0,placeholder:n.placeholder,margin:n.margin,onBlur:a,onInput:s},null,8,["modelValue","label","placeholder","margin"])],4))}}),a1=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),l1=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),c1=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}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const i=t,o=e.useAttrs(),r=e.computed(()=>typeof o.id=="string"?o.id:void 0),s=e.computed(()=>{const M={};for(const A of Object.keys(o))A!=="id"&&(M[A]=o[A]);return M}),a=n,d=()=>{const M=a.step.toString();return M.includes(".")?M.split(".")[1].length:0},c=d(),u=e.useModel(n,"modelValue"),m=(M=>Math.min(Math.max(M,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const h=e.ref(m.toFixed(d())),w=e.computed(()=>{const M={};return a.margin&&(M.margin=a.margin),a.padding&&(M.padding=a.padding),M}),y=M=>{const A=Math.pow(10,c);return Math.round(M*A)/A},S=(M,...A)=>{u.value=y(M),h.value=y(M).toFixed(d()),A.forEach(Q=>i(Q,u.value))},E=(M,...A)=>{a.disabled||M>a.max||M<a.min||S(M,...A)},x=()=>E(+h.value+a.step,"change"),V=()=>E(+h.value-a.step,"change"),k=M=>E(Number(M),"input"),T=()=>E(+h.value,"change","blur");return(M,A)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(h),label:n.label||void 0,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(w),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":k,onBlur:T}),{before:e.withCtx(()=>[e.createVNode(e.unref(N.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:V},{default:e.withCtx(()=>[e.createVNode(a1)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(N.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:x},{default:e.withCtx(()=>[e.createVNode(l1)]),_:1})]),_:1},16,["for","model-value","label","disable","input-style","style"]))}}),d1=z(c1,[["__scopeId","data-v-6f4093e8"]]),u1=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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=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(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),f1=e.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(N.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"]))}}),m1=e.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(N.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"]))}}),h1={class:"tags-selector"},p1={key:0,class:"empty-state"},qa=z(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const i=n,o=e.ref(""),r=i.store.Options,s=e.computed(()=>r.filter(c=>P.H.Strings.SearchIn(c.label,o.value))),a=t;e.onBeforeMount(async()=>{await i.store.GetOptions()});const d=async c=>{await i.store.Get(c.value),a("select",i.store.Item)};return(c,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",h1,[e.createVNode(ot,{modelValue:e.unref(o),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(o)?o.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(N.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.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(N.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:h=>d(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.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",p1,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),so=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:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>typeof r.id=="string"?r.id:void 0),a=e.computed(()=>{const h={};for(const w of Object.keys(r))w!=="id"&&w!=="disable"&&(h[w]=r[w]);return h}),d=n,c=e.computed(()=>r.disable??d.disabled),u=h=>{o("change",h)},f=()=>{o("clear",void 0)},m=e.computed(()=>{const h={};return d.margin&&(h.margin=d.margin),d.padding&&(h.padding=d.padding),d.width&&(h.width=d.width),d.inPadding&&(h.padding=d.inPadding),h});return(h,w)=>(e.openBlock(),e.createBlock(e.unref(N.QSelect),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=y=>i.value=y)},e.unref(a),{for:e.unref(s),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,disable:e.unref(c),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(m),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u,onClear:f}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(h.$slots,"before",{},()=>[e.renderSlot(h.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(h.$slots,"append",{},()=>[e.renderSlot(h.$slots,"right")])]),_:2},[h.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"prepend")]),key:"0"}:void 0,h.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after")]),key:"1"}:void 0,h.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),key:"2"}:void 0,h.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"label")]),key:"3"}:void 0,h.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"error")]),key:"4"}:void 0,h.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"hint")]),key:"5"}:void 0,h.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"counter")]),key:"6"}:void 0,h.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"loading")]),key:"7"}:void 0,h.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"selected")]),key:"8"}:void 0,h.$slots.option?{name:"option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"9"}:void 0,h.$slots["no-option"]?{name:"no-option",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(y)))]),key:"10"}:void 0,h.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"before-options")]),key:"11"}:void 0,h.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"after-options")]),key:"12"}:void 0,h.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(y=>[e.renderSlot(h.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(y)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","disable","readonly","input-style","style"]))}}),ja=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var d;const t=n,i=((d=t.storeOpts)==null?void 0:d.Options)??[],o=e.ref(i);async function r(c,u,f,m){var S,E;const w="set"+(((S=u[0])==null?void 0:S.toUpperCase())+u.slice(1)),y=c[w];typeof y=="function"?y(f):(c[u]=f,c[u+"Id"]=f==null?void 0:f.id),await((E=m==null?void 0:m.Update)==null?void 0:E.call(m,c))}const s=(c,u)=>{if(c===""){u(()=>{o.value=i});return}u(()=>{o.value=i.filter(f=>P.H.Strings.SearchInFields(c,[f.label]))})},a=async c=>{c?(await t.storeOpts.Get(c.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{i.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(c,u)=>(e.openBlock(),e.createBlock(so,{"use-input":"",options:e.unref(o),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(br,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),g1=e.defineComponent({__name:"PRadio",props:e.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const i=e.useModel(n,"modelValue"),o=t,r=n,s=()=>{o("change",r.value)};return(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QRadio),{modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=c=>i.value=c),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))}}),y1=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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>{const c=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(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:d[0]||(d[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{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"]]),w1=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),b1=e.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("table",e.mergeProps(t.$attrs,{style:{width:n.width,margin:n.margin},class:"p-table"}),[e.createElementVNode("thead",null,[e.renderSlot(t.$slots,"thead")]),e.createElementVNode("tbody",null,[e.renderSlot(t.$slots,"tbody")])],16))}}),Wa=z(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,i=e.computed(()=>t.row[t.prop]),o=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(N.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:o())},[e.createVNode(e.unref(N.QIcon),{name:e.unref(i)?"check_circle":"radio_button_unchecked",color:e.unref(i)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(mt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),S1=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}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),i=e.useAttrs(),o=e.computed(()=>typeof i.id=="string"?i.id:void 0),r=e.computed(()=>{const c={};for(const u of Object.keys(i))u!=="id"&&(c[u]=i[u]);return c}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),d=e.computed(()=>{const c={};return s.margin&&(c.margin=s.margin),s.padding&&(c.padding=s.padding),s.borderColor&&(c["--p-border-color"]=s.borderColor),c});return(c,u)=>(e.openBlock(),e.createBlock(e.unref(N.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(o),label:n.label||void 0,mask:n.mask,type:"textarea","input-style":e.unref(a),style:e.unref(d),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>c.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>c.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>c.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(c.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","input-style","style"]))}}),[["__scopeId","data-v-8e01fef2"]]),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 i=e.useModel(n,"modelValue"),o=t,r=e.useAttrs(),s=e.computed(()=>{const d={};for(const c of Object.keys(r))d[c]=r[c];return d}),a=()=>{o("change",i.value)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(N.QToggle),e.mergeProps({modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),C1={class:"top-slider-content"},k1={class:"center"},x1=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 i=n,o=t,r=e.ref(i.open);e.watch(()=>i.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("open",a)};return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",C1,[e.createElementVNode("div",k1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(N.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:d[2]||(d[2]=c=>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 E1(n){n.component("PButton",oe),n.component("PBadge",ai),n.component("PCheckBox",va),n.component("PChip",Ha),n.component("PDateInput",ro),n.component("PDatePicker",t1),n.component("PDateTimeInput",Ua),n.component("PDialog",cn),n.component("PFlex",o1),n.component("PHint",br),n.component("PInput",ot),n.component("PInputDate",s1),n.component("PInputNumber",d1),n.component("PLeftSlider",u1),n.component("PList",f1),n.component("PListItem",m1),n.component("POptionsListSingle",qa),n.component("POpts",ja),n.component("PRadio",g1),n.component("PRightSlider",y1),n.component("PSelect",so),n.component("PSticky",w1),n.component("PString",tr),n.component("PTextarea",S1),n.component("PTopSlider",x1),n.component("PTable",b1),n.component("PTableToggle",Wa),n.component("PToggle",Ga),n.component("PTooltip",mt)}const B1={key:0,class:"mainblock"},N1={class:"mainblock-right"},$1={class:"body"},V1=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,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(e.openBlock(),e.createElementBlock("div",B1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(o)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",N1,[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:d[1]||(d[1]=c=>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",$1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),I1={class:"mainblock-right"},M1={class:"body"},P1=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,i=e.ref(!1),o=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),i.value=!0}),(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(o)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:d[0]||(d[0]=c=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",I1,[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:d[1]||(d[1]=c=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",M1,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Qa=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),T1={class:"container"},R1={class:"slide-box"},D1={class:"image"},A1={class:"image-box"},z1=["id","src","alt"],_1={class:"link-number"},F1=["id","onClick"],O1=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(w=>({v582c9d05:i}));const t=n,i=`${t.animationTime}ms`,o=e.ref(t.startActiveGroupIndex),r=e.ref(Nt.None),s=e.ref(Zs(t.events,t.quantity)),a=e.computed(()=>s.value[o.value]);e.onMounted(()=>{});const d=()=>o.value=o.value+1<s.value.length?o.value+1:0,c=()=>o.value=o.value-1<0?s.value.length-1:o.value-1,u=w=>{r.value=w,setTimeout(()=>r.value=Nt.None,t.animationTime)},f=w=>{w!=o.value&&(u(w<o.value?Nt.Prev:Nt.Next),setTimeout(()=>o.value=w,t.animationTime/2))},m=()=>{u(Nt.Next),setTimeout(d,t.animationTime/2)},h=()=>{u(Nt.Prev),setTimeout(c,t.animationTime/2)};return(w,y)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",T1,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[0]||(y[0]=e.withModifiers(S=>h(),["stop"]))},[...y[3]||(y[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",R1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(S,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Nt).Next,animationprev:e.unref(r)===e.unref(Nt).Prev})},[e.createElementVNode("div",D1,[e.createElementVNode("div",A1,[e.createElementVNode("img",{id:S.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:S.fileInfo.getImageUrl(),alt:S.fileInfo.originalName,onClick:y[1]||(y[1]=x=>w.showImageInFullScreen())},null,12,z1)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:y[2]||(y[2]=e.withModifiers(S=>m(),["stop"]))},[...y[4]||(y[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",_1,[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),(S,E)=>(e.openBlock(),e.createElementBlock("div",{id:E.toString(),key:E,class:"number",style:e.normalizeStyle({background:E.toString()===e.unref(o).toString()?"#9D9D9D":""}),onClick:e.withModifiers(x=>f(E),["stop"])},e.toDisplayString(E+1),13,F1))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),L1=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(i.x),s=e.ref(i.y),a=e.computed(()=>r.value+"px"),d=e.computed(()=>s.value+"px"),c=()=>{o("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(d)})},[e.renderSlot(u.$slots,"default")],4)),[[m,c]])}}}),v1={class:"date-range"},H1=z(e.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(n,{emit:t}){const i=n,o=t;e.watch(()=>[i.start,i.end],()=>{i.start||(r.value=void 0),i.end||(s.value=void 0)});const r=e.ref(i.start),s=e.ref(i.end),a=c=>{r.value=c,!(!i.end||c>i.end)&&(o("update:start",c),o("setStart",c))},d=c=>{s.value=c,!(!i.start||c<i.start)&&(o("update:end",c),o("setEnd",c))};return(c,u)=>{const f=e.resolveComponent("PInputDate");return e.openBlock(),e.createElementBlock("div",v1,[e.createVNode(f,{"model-value":e.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(r)?r.value=m:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=e.createTextVNode(" - ",-1)),e.createVNode(f,{"model-value":e.unref(s),"onUpdate:modelValue":u[1]||(u[1]=m=>e.isRef(s)?s.value=m:null),onChange:d},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),U1=e.defineComponent({name:"DateInputRangeV2"}),q1={class:"date-range"};function j1(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock("div",q1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const W1=z(U1,[["render",j1],["__scopeId","data-v-d28c6f33"]]),G1={class:"drop-item"},Q1={key:0,class:"drop-item-list"},Y1=z(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,i=e.ref(t.rolledUp),o=async()=>{i.value=!i.value};return(r,s)=>{const a=e.resolveComponent("PString"),d=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",G1,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=c=>o())},[e.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(i)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(d,{size:"10px",margin:"0"})],4)]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",Q1,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),X1=z(e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Mo,required:!0}},emits:["load"],setup(n,{emit:t}){const i=n,o=e.ref(!1),r=t,s=()=>{i.model.setBoolean(o.value),o.value?P.F.FTSP.Get().setF(i.model):P.F.FTSP.Get().removeF(i.model),r("load")};return(a,d)=>{const c=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(o),"onUpdate:modelValue":d[0]||(d[0]=u=>e.isRef(o)?o.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),Z1=z(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const i=t,o=e.ref(void 0),r=async a=>{_t.Get().replaceF(a,o.value),o.value=a,_t.Get().p.drop()},s=async a=>{await r(a),i("load")};return(a,d)=>{const c=e.resolveComponent("PString"),u=e.resolveComponent("PButton"),f=e.resolveComponent("GridContainer"),m=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(m,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...d[0]||(d[0]=[])]),default:e.withCtx(()=>[e.createVNode(f,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(h,w)=>(e.openBlock(),e.createBlock(u,{key:w,color:"blue",height:"auto",text:h.label,"is-toggle":h.valueEq(e.unref(o)),"toggle-mode":!0,inverse:n.inverse,onClick:y=>s(h.valueEq(e.unref(o))?void 0:h)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),J1=["value","label"],K1=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 i=t,o=_t.Get(),r=e.ref(void 0),s=async d=>{o.replaceF(d,r.value),r.value=d},a=async d=>{d?await s(r.value):await s(void 0),i("load")};return(d,c)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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,J1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),ey=z(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,i)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),ty=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(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(i.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...o[2]||(o[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),ny={key:0,class:"blur"},iy={style:{display:"flex","justify-content":"center"}},oy=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 i=n,o=t,r=i.customClass!==""?i.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),d=e.ref(!1),c=e.ref(i.close);e.watch(()=>i.close,()=>{a.value=!1});const u=T=>{T.stopPropagation(),T.key==="Escape"&&(i.showSaveDialog?d.value=!0:a.value=!1)};e.watch(a,async()=>{var T,M;await e.nextTick(),a.value?((M=(T=document.getElementById("info-item-opened-content"))==null?void 0:T.querySelector("input"))==null||M.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&o("after-close")});const f=()=>{o("click"),a.value=!!i.withOpenWindow,c.value!==i.close&&(a.value=!1,c.value=!c.value)},m=e.computed(()=>i.customClass===""?{width:i.width,minHeight:"40px",height:"auto",maxWidth:i.maxWidth,minWidth:i.minWidth,margin:i.baseBoxMargin}:void 0),h=e.computed(()=>a.value&&i.withOpenWindow),w=e.computed(()=>({background:i.background?i.background:void 0,zIndex:h.value?"2":"0",padding:h.value?"0":i.padding,margin:i.margin,width:h.value?i.openWidth:i.width,height:h.value?i.openHeight:i.height,minHeight:"40px",maxWidth:i.maxWidth,minWidth:i.minWidth,borderColor:s.value||a.value?i.colorSelected:i.borderColor,color:s.value?i.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${i.colorSelected}`:"none",alignItems:h.value?"end":"center",cursor:(i.withHover,"pointer")})),y=e.computed(()=>({height:h.value?"0":"",overflow:i.closeWindowOverflow,width:i.width})),S=e.computed(()=>({height:h.value?"auto":"0"})),E=e.computed(()=>({color:s.value?i.colorSelected:"#343E5C",fill:s.value?i.colorSelected:"#343E5C",background:i.background})),x=()=>{i.showSaveDialog?d.value=!0:a.value=!1},V=async()=>{await o("keyup-enter"),i.close&&(a.value=!1),d.value=!1},k=()=>{a.value=!1,d.value=!1};return(T,M)=>{const A=e.resolveComponent("PString"),Q=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),_e=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",ny)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:M[2]||(M[2]=e.withModifiers(Ne=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(w)),onMouseenter:M[0]||(M[0]=Ne=>n.withHover?s.value=!0:s.value=!1),onMouseleave:M[1]||(M[1]=Ne=>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(y))},[e.renderSlot(T.$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(S))},[e.renderSlot(T.$slots,"open-inside-content",{},void 0,!0)],4)),[[_e,x,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(E))},[e.renderSlot(T.$slots,"title",{},()=>[e.createVNode(A,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(se,{show:e.unref(d),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",iy,[e.createVNode(Q,{text:"Не сохранять",onClick:k}),e.createVNode(Q,{text:"Сохранять",onClick:V})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),ry=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 i=e.ref(!1),o=t,r=s=>{i.value=!i.value,o("select",s)};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(i),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(c,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(c,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(d,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),sy={class:"mainblock"},ay={class:"mainline"},ly=z(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,i)=>(e.openBlock(),e.createElementBlock("div",sy,[e.createElementVNode("div",ay,[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=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),cy={class:"search-list"},dy=["onClick"],Xa=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 i=t,o=n,r=e.ref(o.modelValue),s=e.ref([]);async function a(){i("input",r.value),await d()}async function d(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function c(u){r.value="",i("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(ot,{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",cy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:h=>c(m)},e.toDisplayString(m.label),9,dy))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),uy=z(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),i=async()=>{};return(o,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:i},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:i},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),fy={};function my(n,t){return e.openBlock(),e.createElementBlock(e.Fragment,null,[t[0]||(t[0]=e.createElementVNode("div",{class:"blur"},null,-1)),t[1]||(t[1]=e.createElementVNode("div",{class:"loader-container"},[e.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const hy=z(fy,[["render",my],["__scopeId","data-v-0f1f2f84"]]),py={style:{display:"flex","justify-content":"center",width:"100%"}},gy={class:"pag-number"},yy={class:"pag-ul"},wy={key:2},by=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,i=m=>m?"active":"neutral",o=m=>m?"not-active":"neutral",r=e.ref(Js),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const d=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await c(m)},c=async(m,h)=>{r.value.setCurPage(m),_t.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?zt.GenerateNumsRange(2,m-1).filter(h=>h<m&&h>1):zt.GenerateNumsRange(r.value.curPage-2,r.value.curPage+3).filter(h=>h<m&&h>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),h=document.querySelector("#list");m?m.scrollTo({top:0}):h&&h.scrollTo({top:0})};return e.onBeforeUnmount(()=>{_t.Get().p.drop()}),(m,h)=>{const w=e.resolveComponent("ArrowLeft"),y=e.resolveComponent("PButton"),S=e.resolveComponent("DoubleArrowLeft"),E=e.resolveComponent("EllipsisSvg"),x=e.resolveComponent("DoubleArrowRight"),V=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",py,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",gy,[e.createVNode(y,{skin:"pag",type:o(e.unref(r).curPage===1),onClick:h[0]||(h[0]=k=>d(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(w)]),_:1},8,["type"]),e.createElementVNode("ul",yy,[e.createElementVNode("li",null,[e.createVNode(y,{skin:"pag",type:i(e.unref(r).curPage===1),text:"1",onClick:h[1]||(h[1]=k=>d(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:h[3]||(h[3]=k=>s.value=!0),onMouseleave:h[4]||(h[4]=k=>s.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[2]||(h[2]=k=>d(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(S,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),k=>(e.openBlock(),e.createElementBlock("li",{key:k},[e.createVNode(y,{skin:"pag",type:i(k===e.unref(r).curPage),text:k,onClick:T=>d(k)},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:h[6]||(h[6]=k=>a.value=!0),onMouseleave:h[7]||(h[7]=k=>a.value=!1)},[e.createVNode(y,{skin:"pag",type:"neutral",onClick:h[5]||(h[5]=k=>d(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(x,{key:0})):(e.openBlock(),e.createBlock(E,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",wy,[e.createVNode(y,{skin:"pag",type:i(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:h[8]||(h[8]=k=>d(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(y,{skin:"pag",type:o(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:h[9]||(h[9]=k=>d(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(V)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),Sy=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 i=n,o=t,r=e.ref(i.modelValue),s=e.ref();let a=er.SearchModel();e.watch(()=>i.focus,()=>{i.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const d=async f=>{if(f.length<2)return;s.value.activated=!0,a=er.SearchModel(),a.searchObjects=[],a.query=f,a.key=i.keyValue;const m=a.searchGroups.find(h=>h.key===i.keyValue);return m&&(a.searchGroup=m),await aa.Search.Search(a),a.searchObjects},c=async f=>{o("select",f),r.value=""},u=f=>{o("input",f),f.length===0&&o("input","")};return(f,m)=>(e.openBlock(),e.createBlock(Xa,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=h=>e.isRef(r)?r.value=h: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":d,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:c,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-af0b4b1a"]]),Cy={class:"mainblock-body"},ky={class:"mainblock-footer"},xy=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",Cy,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",ky,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),Ey={class:"right-slider-content"},By={class:"right-slider-content-header"},Ny={class:"right-slider-content-box"},$y={class:"right-slider-button"},Vy=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 i=n,o=t,r=e.ref(!1);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>{const c=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:d[0]||(d[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(c,{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(c,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",Ey,[e.createElementVNode("div",By,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",Ny,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",$y,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),Iy={class:"mainblock"},My={class:"body-block"},Py={class:"tab-block"},Ty=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 i=n,o=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=c=>{o("toggle",c)},d=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(i.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(c,u)=>(e.openBlock(),e.createElementBlock("div",Iy,[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=>d.value=!0),onMouseleave:u[2]||(u[2]=f=>d.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(d)?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(c.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(c.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",My,[e.renderSlot(c.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",Py,[e.renderSlot(c.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),Ry=["label","value"],Dy=z(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const i={[Qe.String]:"Текстовый ответ",[Qe.Text]:"Развёрнутый текстовый ответ",[Qe.Number]:"Числовой ответ",[Qe.Date]:"Ответ в виде даты",[Qe.Radio]:"Выбор одного из вариантов",[Qe.Set]:"Выбор нескольких вариантов",[Qe.File]:"Ответ в виде файла",[Qe.MatrixRadio]:"Матрица с одним выбором",[Qe.MatrixSet]:"Матрица с несколькими выборами"},o=t,r=s=>{o("select",s)};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(c,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,Ry)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),Ay=["label","value"],zy=z(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=e.ref();e.onBeforeMount(()=>{i.value=!0,r.value=an.GetDefault()});const s=async d=>{r.value=d??an.GetDefault(),o("load")},a=async d=>{await s(d)};return(d,c)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(i)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":c[0]||(c[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:c[1]||(c[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(an).Get(),(m,h)=>(e.openBlock(),e.createElementBlock("option",{key:h,label:m.label,value:m},null,8,Ay))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),_y=["label","value"],Fy=z(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const i=t,o=e.ref();e.onBeforeMount(()=>{o.value=an.GetDefault()});const r=async a=>{a||(o.value=an.GetDefault()),_t.Get().setSortModel(o.value),_t.Get().p.drop(),i("load")},s=async a=>{await r(a)};return(a,d)=>{var u;const c=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(c,{modelValue:e.unref(o),"onUpdate:modelValue":d[0]||(d[0]=f=>e.isRef(o)?o.value=f:null),"popper-append-to-body":!1,clearable:!((u=e.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(an).Get(),(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,label:f.label,value:f},null,8,_y))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),Oy={class:"switch-container"},Ly={class:"line"},vy={class:"line"},Hy=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 i=n,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>i.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>i.secondModel.valueEq(u.value)?void 0:o,d=m=>{var w;return{color:(w=u.value)!=null&&w.valueEq(m)?"#006bb4":"#B0A4C0"}},c=t,u=e.ref(void 0),f=async m=>{var h;(h=u.value)!=null&&h.valueEq(m)||(u.value=m,c("load"))};return(m,h)=>{const w=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",Oy,[e.createElementVNode("div",Ly,[e.createVNode(w,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.firstModel)),onClick:h[0]||(h[0]=y=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(w,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(d()),onClick:h[1]||(h[1]=y=>f())},null,8,["style"]),e.createVNode(w,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(d(n.secondModel)),onClick:h[2]||(h[2]=y=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",vy,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:h[3]||(h[3]=y=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:h[4]||(h[4]=y=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:h[5]||(h[5]=y=>f(n.secondModel))},null,6),h[6]||(h[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),h[7]||(h[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),h[8]||(h[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),h[9]||(h[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),Uy={},qy={class:"flex"};function jy(n,t){return e.openBlock(),e.createElementBlock("div",qy,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const Wy=z(Uy,[["render",jy],["__scopeId","data-v-5023d414"]]),Gy=z(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const i=e.ref(!1),o=t,r=async()=>{o("submit"),i.value=!i.value};return(s,a)=>{const d=e.resolveComponent("PString"),c=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(i),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(c,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(d,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(d,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),Qy={class:"top-slider-content"},Yy={class:"center"},Xy=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 i=n,o=t,r=e.ref(!0);e.watch(()=>i.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[d[0]||(d[0]=e.withModifiers(c=>r.value=!0,["prevent"])),d[1]||(d[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:d[3]||(d[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Qy,[e.createElementVNode("div",Yy,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:d[2]||(d[2]=c=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function Zy(n){n.component("PageNotFound",Qs),n.component("AdaptiveContainer",V1),n.component("AdaptiveContainerHorizontal",P1),n.component("CarouselImages",O1),n.component("ContextWindow",L1),n.component("DateInputRangeV2",W1),n.component("DateInputRange",H1),n.component("DropList",Y1),n.component("FilterCheckbox",X1),n.component("FiltersButtonsSelect",Z1),n.component("FilterSelect",K1),n.component("FTSPPanel",ey),n.component("GeneralItem",ty),n.component("GridContainer",Qa),n.component("InfoItem",oy),n.component("InfoItemSelectButtons",ry),n.component("LeftRightContainer",ly),n.component("PAutocomplete",Xa),n.component("PhoneForm",uy),n.component("PLoader",hy),n.component("PPagination",by),n.component("RemoteSearch",Sy),n.component("ResearcheContainer",xy),n.component("RightSliderContainer",Vy),n.component("RightTabsContainer",Ty),n.component("SelectValueType",Dy),n.component("SortList",zy),n.component("SortSelect",Fy),n.component("Switch3Pos",Hy),n.component("ThemeWrapper",Wy),n.component("ToggleInfoItem",Gy),n.component("TopSliderContainer",Xy)}const Jy=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),e.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),Ky=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),e.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),e0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),t0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),Za=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),n0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),i0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),o0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),r0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),s0=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,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...i[0]||(i[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),i[1]||(i[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),a0=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-46c690c8"]]),l0=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-b688738b"]]),c0=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-bd131770"]]),d0=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),o[3]||(o[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-db5832a2"]]),u0=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(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:o[0]||(o[0]=r=>t.value=!0),onMouseleave:o[1]||(o[1]=r=>t.value=!1)},[...o[2]||(o[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),o[3]||(o[3]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-5abed3e4></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-5abed3e4></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function f0(n){n.component("IconDownload",Jy),n.component("IconFilter",Ky),n.component("ArrowLeft",a0),n.component("ArrowRight",l0),n.component("DoubleArrowLeft",c0),n.component("DoubleArrowRight",d0),n.component("EllipsisSvg",u0),n.component("IconArrowLeft",e0),n.component("IconCheckDefault",t0),n.component("IconClose",Za),n.component("IconEdit",n0),n.component("IconEmail",i0),n.component("IconMove",o0),n.component("IconPhone",r0),n.component("IconSearch",Ya),n.component("IconSelectArrow",s0)}const m0=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),i=o=>{t.value=o};return e.watch(()=>n.initActiveIdx,()=>{i(n.initActiveIdx)}),{changeActiveId:i,activeIdx:t}}});function h0(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const p0=z(m0,[["render",h0]]),g0=e.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(n,{emit:t}){const i=e.ref(n.activeId==="0"),o=()=>{i.value=!i.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(i.value=!1)}),{collapsed:i,handleItemClick:o}}}),y0=["for"],w0={class:"inside-icon"};function b0(n,t,i,o,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",w0,[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,y0),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-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const S0=z(g0,[["render",b0],["__scopeId","data-v-c2e31ebb"]]),C0={class:"tab"},k0={class:"rotate"},x0=z(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),i=async()=>{t.value=!t.value};return(o,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",C0,[e.renderSlot(o.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:i},[e.createElementVNode("div",k0,[e.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),E0={class:"add-block_body"},B0=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,i)=>{const o=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",E0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),N0=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),$0={class:"add-block_body"},V0=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,i)=>{const o=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(o,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",$0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),I0={class:"select-dialog"},M0={class:"select-dialog-header"},P0={class:"select-dialog-title"},T0={class:"select-dialog-content"},R0={class:"select-dialog-actions"},Ja=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:i}){const o=n,r=i,s=e.useModel(n,"modelValue"),a=e.ref([]),d=N.Ripple,c=async()=>{await o.store.GetOptions(),a.value=o.store.Options},u=async S=>{await o.store.Get(S.value);const E=o.store.Item,x=new E.constructor(E);r("add",x),f()},f=()=>{r("close"),s.value=!1},m=S=>{S||r("close")},h=()=>{s.value&&f()},w=()=>{s.value=!s.value},y=async()=>{await e.nextTick();const S=document.querySelector(".select-dialog-content .q-item");S&&"focus"in S&&S.focus()};return t({opened:s,toggle:w}),e.onBeforeMount(c),(S,E)=>{const x=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:s.value,"onUpdate:modelValue":[E[0]||(E[0]=V=>s.value=V),m],position:"top",onKeydown:e.withKeys(h,["escape"]),onShow:y},{default:e.withCtx(()=>[e.createElementVNode("div",I0,[e.createElementVNode("div",M0,[e.createElementVNode("div",P0,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[x]])]),e.createElementVNode("div",T0,[e.createVNode(e.unref(N.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),V=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(N.QItem),{key:V.value,clickable:"",class:"q-px-md q-py-sm",onClick:k=>u(V)},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(N.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(d)]])),128))]),_:1})]),e.createElementVNode("div",R0,[e.withDirectives(e.createVNode(oe,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[x]])])])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-462df82a"]]),D0=["src"],A0={key:0,class:"header-row"},z0={class:"title-wrapper"},_0={key:0,class:"title-icon"},F0={class:"title-text"},O0={class:"text-subtitle1 text-weight-medium"},L0={key:0,class:"caption-row"},v0={class:"text-caption text-grey-6"},H0=["innerHTML"],U0={key:1,class:"card-footer"},Ka=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 i=e.ref(null),o=n,r=t,s=e.computed(()=>o.img?o.isMain?"365px":"200px":"0"),a=d=>{o.noPointer||r("click",d)};return(d,c)=>(e.openBlock(),e.createBlock(e.unref(N.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,D0)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(N.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||d.$slots.title||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",A0,[e.createElementVNode("div",z0,[n.icon||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",_0,[e.renderSlot(d.$slots,"icon",{},()=>[e.createVNode(e.unref(N.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",F0,[e.renderSlot(d.$slots,"title",{},()=>[e.createElementVNode("span",O0,e.toDisplayString(n.title),1)],!0)])]),d.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",L0,[e.renderSlot(d.$slots,"caption",{},()=>[e.createElementVNode("span",v0,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||d.$slots.title?(e.openBlock(),e.createBlock(e.unref(N.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[e.renderSlot(d.$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,H0)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",U0,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),q0={key:0,class:"list-title"},j0={class:"draggable-item"},W0={class:"drag-handle"},G0={class:"item-content"},Q0={key:0,class:"item-actions"},Y0={class:"item-content"},X0={key:0,class:"item-actions"},Z0={key:4,class:"add-button-container"},J0=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:P.H.BaseStore,default:void 0},addFunc:{type:Function,required:!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(c=>({v73008f9f:n.background}));const i=n,o=t,r=async()=>{const c=await i.addFunc();c.order!=="undefined"&&(c.order=i.list.length),i.addToList&&i.store&&i.store.AppendToAll(c),i.store&&await i.store.Create(c),await d(),o("add",c)},s=async c=>{i.removeFromList&&P.H.Classes.RemoveFromClassById(c,i.list),i.store&&await i.store.Remove(c),await d(),o("remove",c)},a=async c=>{i.store&&await i.store.Update(c),o("update",c)},d=async()=>{!i.sortable||i.list.length===0||typeof i.list[0].order>"u"||(P.H.Sorter.Sort(i.list),i.store&&await i.store.UpdateMany(i.list),o("sort"))};return(c,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(c.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",q0,e.toDisplayString(n.title),1)):e.renderSlot(c.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(Co),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:d},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",j0,[e.createElementVNode("div",W0,[e.createVNode(e.unref(N.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",G0,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(ot,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Q0,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>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",Y0,[e.renderSlot(c.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(ot,{modelValue:f.name,"onUpdate:modelValue":h=>f.name=h,outlined:"",dense:"",class:"content-input",onBlur:h=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",X0,[e.createVNode(oe,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:h=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Z0,[e.createVNode(oe,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),el=z(J0,[["__scopeId","data-v-27edbd1f"]]),K0={class:"del-block_title"},ew={class:"del-block_body"},tw=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,i)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",K0,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",ew,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),nw={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},iw={class:"edit-dialog-header"},ow={class:"edit-dialog-title"},rw={class:"edit-dialog-content"},sw={key:0,class:"edit-dialog-actions"},tl=z(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},nw),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:i}){const o=n,r=i,s=e.ref(!1);e.watch(()=>o.modelValue,m=>{s.value=m},{immediate:!0});const a=async()=>{r("confirm"),d()},d=()=>{r("close"),s.value=!1,r("update:modelValue",!1)},c=()=>{s.value&&d()};t({opened:s,toggle:()=>{s.value=!s.value,r("update:modelValue",s.value)}});const f=async()=>{await e.nextTick();const m=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');m&&"focus"in m&&m.focus()};return(m,h)=>{const w=e.resolveDirective("close-popup");return e.openBlock(),e.createBlock(cn,{modelValue:e.unref(s),"onUpdate:modelValue":[h[0]||(h[0]=y=>e.isRef(s)?s.value=y:null),d],position:"top",onKeydown:[e.withKeys(a,["enter"]),e.withKeys(c,["escape"])],onShow:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:o.width})},[e.createElementVNode("div",iw,[e.createElementVNode("div",ow,e.toDisplayString(o.title),1),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[w]])]),e.createElementVNode("div",rw,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),o.showConfirm?(e.openBlock(),e.createElementBlock("div",sw,[e.withDirectives(e.createVNode(oe,{flat:"",label:o.cancelLabel,size:"sm"},null,8,["label"]),[[w]]),e.createVNode(oe,{flat:"",label:o.confirmLabel,color:"primary",disable:o.disabled,size:"sm",onClick:a},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-beb7df93"]]),nl=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 i=n,o=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{i.closable&&o("close")};return(a,d)=>{const c=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(c,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function aw(n){n.component("CollapseContainer",p0),n.component("CollapseItem",S0),n.component("VerticalCollapseContainer",x0),n.component("PAdd",B0),n.component("PAddDialog",Ja),n.component("PCard",Ka),n.component("PCrudList",el),n.component("PEditDialog",tl),n.component("PModal",nl),n.component("PContainer",N0),n.component("PContainerStickyHead",V0),n.component("PDel",tw)}const lw={class:"btn-group"},il=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 i=t,o=e.computed(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async d=>{if(!d.isSubmit){Oe.Form.SetChunk(d.GetChunk()),a();return}const c=Oe.Form.Validate();if(c.length>0){Qt.Notify.Error(c.join("<br/>"));return}i("submit")},a=()=>{if(!r.value)return;const d=r.value[0];d&&d.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(d,c)=>(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(),u=>(e.openBlock(),e.createBlock(ot,{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",lw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(u,f)=>(e.openBlock(),e.createBlock(oe,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(ge).Success:e.unref(ge).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"]]),cw=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(i,o)=>(e.openBlock(),e.createBlock(nl,{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(il,{margin:n.margin,padding:"0",onSubmit:o[0]||(o[0]=r=>i.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),dw=["onClick"],uw=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 i=n,o=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(i.tabHeight.replace(/[^+\d]/g,""))),d=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(i.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",d)),e.onUnmounted(()=>window.removeEventListener("resize",d));const c=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{i.menus.Select()});const u=f=>{i.menus.Select(f),o("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,(h,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":w===n.menus.idx,tab:w!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:y=>u(w)},e.toDisplayString(h.name),15,dw)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(c)})},[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"]]),fw={class:"field"},mw=z(e.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(n,{emit:t}){const i=n,o=t,r=e.ref(!1),s=e.ref(),a=e.ref(i.withName.name),d=e.ref(!1),c=()=>{d.value=!1},u=async()=>{a.value.trim(),i.withName.setName&&i.withName.setName(a.value),r.value=!r.value,o("submit")};return(f,m)=>{const h=e.resolveComponent("PString"),w=e.resolveComponent("PInput"),y=e.resolveComponent("InfoItem"),S=e.resolveComponent("PButton"),E=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(y,{title:"Название","show-save-dialog":d.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:c},{"open-inside-content":e.withCtx(()=>[e.createVNode(y,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:e.withCtx(()=>[e.createElementVNode("div",fw,[e.createVNode(w,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),e.createVNode(S,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:e.withCtx(()=>[a.value.length?(e.openBlock(),e.createBlock(h,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(e.openBlock(),e.createBlock(h,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),hw=["id"],pw=["for"],gw={class:"left-field"},yw=["href","download"],ww={key:1,class:"text-field__input"},bw={class:"right-field"},Sw=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new Ze},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(n,{emit:t}){const i=n,o=t,r=ve.GUID(),s=ve.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!c(f.name)){Bn.Error(`Загруженный файл должен быть в одном из форматов: ${i.formats.join(", ")}`);return}const m=new Ze;m.setFile(f),m.url=URL.createObjectURL(f),o("upload",m)},d=()=>{o("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const c=u=>{let f=Xs.Get(u);return!!i.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),h=e.resolveComponent("PFlex"),w=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,hw),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,pw)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",gw,[e.createVNode(h,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,yw),e.createVNode(w,{skin:"text",type:"del",onClick:d},{default:e.withCtx(()=>[e.createVNode(Za,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",ww,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",bw,[e.createVNode(w,{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)}}}),Cw=z(Sw,[["__scopeId","data-v-8b73ee22"]]);function ol(n,t){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),i.push.apply(i,o)}return i}function ce(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?ol(Object(i),!0).forEach(function(o){ht(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ol(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function ht(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function kw(n,t){if(n==null)return{};var i,o,r=function(a,d){if(a==null)return{};var c,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)c=m[u],d.indexOf(c)>=0||(f[c]=a[c]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)i=s[o],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(n,i)&&(r[i]=n[i])}return r}function yn(n){return function(t){if(Array.isArray(t))return Sr(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,i){if(t){if(typeof t=="string")return Sr(t,i);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Sr(t,i)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sr(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=n[i];return o}var rl,xw,ao,Pe=(rl=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 e={}.hasOwnProperty;function i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var d=i.apply(null,s);d&&o.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)e.call(s,c)&&s[c]&&o.push(c);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},Qa(to={path:Ty,exports:{},require:function(n,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e==null&&to.path)}},to.exports),to.exports),yt=function(n){return function(e,i){if(!e)return n;var o;typeof e=="string"?o=e:i=e;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var d=i[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function dr(n,e,i){var o,r,s,a,d;function c(){var f=Date.now()-a;f<e&&f>=0?o=setTimeout(c,e-f):(o=null,i||(d=n.apply(s,r),s=r=null))}e==null&&(e=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(c,e)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(d=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}dr.debounce=dr;var ur=dr,G=function(){return G=Object.assign||function(n){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},G.apply(this,arguments)};/*! *****************************************************************************
30
+ */(function(){var t={}.hasOwnProperty;function i(){for(var o=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")o.push(s);else if(Array.isArray(s)){if(s.length){var d=i.apply(null,s);d&&o.push(d)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)t.call(s,c)&&s[c]&&o.push(c);else o.push(s.toString())}}return o.join(" ")}n.exports?(i.default=i,n.exports=i):window.classNames=i})()},rl(ao={path:xw,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ao.path)}},ao.exports),ao.exports),St=function(n){return function(t,i){if(!t)return n;var o;typeof t=="string"?o=t:i=t;var r=n;return o&&(r+="__"+o),r+(i?Object.keys(i).reduce(function(s,a){var d=i[a];return d&&(s+=" "+(typeof d=="boolean"?r+"--"+a:r+"--"+a+"_"+d)),s},""):"")}};function Cr(n,t,i){var o,r,s,a,d;function c(){var f=Date.now()-a;f<t&&f>=0?o=setTimeout(c,t-f):(o=null,i||(d=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=i&&!o;return o||(o=setTimeout(c,t)),f&&(d=n.apply(s,r),s=r=null),d};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(d=n.apply(s,r),s=r=null,clearTimeout(o),o=null)},u}Cr.debounce=Cr;var kr=Cr,Y=function(){return Y=Object.assign||function(n){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},Y.apply(this,arguments)};/*! *****************************************************************************
31
31
  Copyright (c) Microsoft Corporation.
32
32
 
33
33
  Permission to use, copy, modify, and/or distribute this software for any
@@ -40,5 +40,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
40
40
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
41
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
42
  PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */function Ya(n,e){var i,o;return n&&e?(i=""+n+e[0].toUpperCase()+e.slice(1),o=n+"-"+e):(i=n||e,o=n||e),{name:i,classname:o}}function Xa(n){return/^blob:/.test(n)}function Za(n){return Xa(n)||function(e){return/^data:/.test(e)}(n)}function vn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Re(n){return n===void 0}function no(n){return typeof n=="object"&&n!==null}function fr(n,e,i){var o={};return no(n)?(Object.keys(e).forEach(function(r){Re(n[r])?o[r]=e[r]:no(e[r])?no(n[r])?o[r]=fr(n[r],e[r],i[r]):o[r]=n[r]?e[r]:i[r]:e[r]===!0||e[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?e:i}function io(n){var e=Number(n);return Number.isNaN(e)?n:e}function Ja(n){return typeof(n=="number"||function(e){return typeof e=="object"&&e!==null}(n)&&toString.call(n)=="[object Number]")&&!Ka(n)}function Ka(n){return n!=n}function el(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}var ui=function(n,e){n===void 0&&(n={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=n,this.scale=e},Py=function(n,e){e===void 0&&(e={}),this.type="resize",this.directions=n,this.params=e},hr=function(n){this.type="move",this.directions=n},Ry=function(){function n(e,i,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var e=this,i=e.element,o=e.anchor,r=e.position;if(i){var s=i.getBoundingClientRect(),a=s.left,d=s.top;return{left:r.left-a-o.left,top:r.top-d-o.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=un(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(e,i){return{clientX:e.clientX+i.clientX/n.touches.length,clientY:e.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),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 e=this.$refs.draggable.getBoundingClientRect(),i=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,e){var i=un(e);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new Ry(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};mr.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"draggable",class:i.classname,onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:e[3]||(e[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:e[4]||(e[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],34)};var pr=yt("vue-handler-wrapper"),tl={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 e,i=Ya(this.horizontalPosition,this.verticalPosition);n=pr((dt(e={},i.classname,!0),dt(e,"disabled",this.disabled),e))}else n=pr({disabled:this.disabled});return{root:n,draggable:pr("draggable")}}},emits:["leave","enter","drag","drag-end"]};tl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock("div",{class:s.classes.root},[t.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var Ay=yt("vue-line-wrapper"),nl={name:"LineWrapper",components:{DraggableElement:mr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return Ay((dt(n={},this.position,!0),dt(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};nl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("DraggableElement");return t.openBlock(),t.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(d){return n.$emit("drag",d)}),onDragEnd:e[2]||(e[2]=function(d){return n.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(d){return n.$emit("leave")}),onEnter:e[4]||(e[4]=function(d){return n.$emit("enter")})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Et=["left","right","top","bottom"],zy=["left","right"],Dy=["top","bottom"],vy=["left","top"],Fy=["fill-area","fit-area","stencil","none"],il={left:0,top:0,width:0,height:0};function ol(n,e,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==e[o]})}function Bt(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Fn(n,e){return{left:n.left-e.left,top:n.top-e.top}}function Oe(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function fi(n,e){var i={left:0,top:0,right:0,bottom:0};return Et.forEach(function(o){var r=e[o],s=Bt(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function $t(n,e){return{left:n.left-e.left,top:n.top-e.top,width:n.width+e.left+e.right,height:n.height+e.top+e.bottom}}function oo(n){return{left:-n.left,top:-n.top}}function et(n,e){return G(G({},n),{left:n.left+e.left,top:n.top+e.top})}function ut(n,e,i,o){if(e!==1){if(i){var r=Oe(n);return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2+(i.left-r.left)*(1-e),top:n.top+n.height*(1-e)/2+(i.top-r.top)*(1-e)}}return{width:n.width*e,height:n.height*e,left:n.left+n.width*(1-e)/2,top:n.top+n.height*(1-e)/2}}return n}function le(n){return n.width/n.height}function _n(n,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/n.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/n.height:1/0)}function On(n,e){var i={left:0,top:0},o=fi(n,e);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function gr(n,e){var i;return e.minimum&&n<e.minimum?i=e.minimum:e.maximum&&n>e.maximum&&(i=e.maximum),i}function rl(n,e){var i=le(n),o=le(e);return e.width<1/0&&e.height<1/0?i>o?{width:e.width,height:e.width/i}:{width:e.height*i,height:e.height}:e.width<1/0?{width:e.width,height:e.width/i}:e.height<1/0?{width:e.height*i,height:e.height}:n}function sl(n,e){var i=e*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Gt(n,e){var i=e*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function ro(n,e){var i=fi(Le(n,e),e);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,_n(n,e)):Math.min((n.height+i.top+i.bottom)/n.height,_n(n,e)):1}function Le(n,e,i){i===void 0&&(i=!1);var o=On(n,e);return et(n,i?oo(o):o)}function yr(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 _y(n,e){return G(G({},n),{minWidth:Math.min(e.width,n.minWidth),minHeight:Math.min(e.height,n.minHeight),maxWidth:Math.min(e.width,n.maxWidth),maxHeight:Math.min(e.height,n.maxHeight)})}function al(n,e,i){i===void 0&&(i=!0);var o={};return Et.forEach(function(r){var s=n[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function so(n,e){return al(n,e,!0)}function ll(n){var e=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((e.correctRatio||le(e)>=i.minimum&&le(e)<=i.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function cl(n,e){return Math.pow(n.width-e.width,2)+Math.pow(n.height-e.height,2)}function Dt(n){var e=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(h,m){return ll({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!h||cl(m,{width:e,height:i})<cl(h,{width:e,height:i}))?m:h},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),ll({size:s,aspectRatio:r,sizeRestrictions:o})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function wr(n){var e=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=et(i,e.directions);return et(s,On(s,r))}function Oy(n){var e=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,h){return wr({coordinates:f,positionRestrictions:s,event:new hr({left:h.left-f.left,top:h.top-f.top})})},u=G({},e);return(Array.isArray(i)?i:[i]).forEach(function(f){var h={};Re((h=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:d}):f).width)&&Re(h.height)||(u=function(m,w){var y=G(G(G({},m),Dt({width:w.width,height:w.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(y,{left:m.left,top:m.top})}(u,G(G({},u),h))),Re(h.left)&&Re(h.top)||(u=c(u,G(G({},u),h)))}),u}function Ly(n){n.event;var e=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,d=n.positionRestrictions;n.stencilReference;var c,u,f,h=G({},o),m=G({},r),w=G({},s);c=le(w),u=le(h),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(h=G(G({},h),Dt({sizeRestrictions:a,width:h.width,height:h.height,aspectRatio:{minimum:le(w),maximum:le(w)}})));var y=ro(m=ut(m,h.width*i.width/(m.width*w.width)),e({visibleArea:m,type:"resize"}));return y!==1&&(m=ut(m,y),h=ut(h,y)),m=Le(m=et(m,Fn(Oe(h),Oe(m))),e({visibleArea:m,type:"move"})),{coordinates:h=Le(h,so(Bt(m),d)),visibleArea:m}}function Hy(n){var e=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var d=G({},r),c=G({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};c.width,o.width,le(o)>le(d)?(u.height=.8*o.height,u.width=u.height*le(d)):(u.width=.8*o.width,u.height=u.width*le(d));var f=ro(c=ut(c,d.width*o.width/(c.width*u.width)),i({visibleArea:c,type:"resize"}));c=ut(c,f),f!==1&&(u.height/=f,u.width/=f),c=Le(c=et(c,Fn(Oe(d),Oe(c))),i({visibleArea:c,type:"move"})),d=Le(d,so(Bt(c),a))}return{coordinates:d,visibleArea:c}}function Uy(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=G({},o),a=G({},i);if(e.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=ut(s,Math.min(a.width/s.width,_n(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=ut(s,Math.min(a.height/s.height,_n(s,r({visibleArea:s,type:"resize"}))))),s=Le(s=et(s,oo(On(a,Bt(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function jy(n){var e=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||e;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function qy(n){var e=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,le(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Dt(G(G({},d),{aspectRatio:o,sizeRestrictions:r}))}function Wy(n){var e,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||o;return le(u)>le(s)?i=(e=c.height*u.height/s.height)*le(c):e=(i=c.width*u.width/s.width)/le(c),Dt({width:i,height:e,aspectRatio:a,sizeRestrictions:d})}function Gy(n){var e=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=le(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=rl({width:le(s)>r?s.width:s.height*r,height:le(s)>r?s.width/r:s.height},yr(e())),d={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},c=fi(i,Bt(G({left:0,top:0},o))),u={};return!c.left&&!c.right&&d.width<=o.width&&(u.left=0,u.right=o.width),!c.top&&!c.bottom&&d.height<=o.height&&(u.top=0,u.bottom=o.height),Le(d,u)}var f=le(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function ao(n,e){return al(n,Bt(e))}function Qy(n){var e=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=e.scale,u=e.move,f=G({},o),h=G({},i),m=1,w=1,y=c.factor&&Math.abs(c.factor-1)>.001;f=et(f,{left:u.left||0,top:u.top||0});var C={stencil:{minimum:Math.max(r.minWidth?r.minWidth/h.width:0,r.minHeight?r.minHeight/h.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/h.width:1/0,r.maxHeight?r.maxHeight/h.height:1/0,_n(h,a))},area:{maximum:_n(f,s({visibleArea:f,type:"resize"}))}};c.factor&&y&&(c.factor<1?(w=Math.max(c.factor,C.stencil.minimum))>1&&(w=1):c.factor>1&&(w=Math.min(c.factor,Math.min(C.area.maximum,C.stencil.maximum)))<1&&(w=1)),w&&(f=ut(f,w,c.center));var B=i.left-o.left,E=o.width+o.left-(i.width+i.left),N=i.top-o.top,k=o.height+o.top-(i.height+i.top);return f=Le(f=et(f,On(f,{left:a.left!==void 0?a.left-B*w:void 0,top:a.top!==void 0?a.top-N*w:void 0,bottom:a.bottom!==void 0?a.bottom+k*w:void 0,right:a.right!==void 0?a.right+E*w:void 0})),s({visibleArea:f,type:"move"})),h.width=h.width*w,h.height=h.height*w,h.left=f.left+B*w,h.top=f.top+N*w,h=Le(h,so(Bt(f),a)),c.factor&&y&&d&&(c.factor>1?m=Math.min(C.area.maximum,c.factor)/w:c.factor<1&&(m=Math.max(h.height/f.height,h.width/f.width,c.factor/w)),m!==1&&(f=et(f=Le(f=ut(f,m,c.factor>1?c.center:Oe(h)),s({visibleArea:f,type:"move"})),oo(On(h,Bt(f)))))),{coordinates:h,visibleArea:f}}function Yy(n){var e=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=G({},o),h=G({},r),m=Gt(Oe(G({left:0,top:0},c)),u);return(f=G(G({},Dt({sizeRestrictions:s,aspectRatio:e,width:f.width,height:f.height})),Gt(Oe(f),u))).left-=m.left-d.width/2+f.width/2,f.top-=m.top-d.height/2+f.height/2,h=ut(h,ro(h,i({visibleArea:h,type:"resize"}))),{coordinates:f=Le(f,a),visibleArea:h=Le(h=et(h,Fn(Oe(f),Oe(o))),i({visibleArea:h,type:"move"}))}}function Xy(n){var e=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=G({},s),u=G({},a),f=i.horizontal!==e.horizontal,h=i.vertical!==e.vertical;if(f||h){var m=Gt({left:d.width/2,top:d.height/2},-o),w=Gt(Oe(c),-o),y=Gt({left:f?m.left-(w.left-m.left):w.left,top:h?m.top-(w.top-m.top):w.top},o);c=et(c,Fn(y,Oe(c))),w=Gt(Oe(u),-o),u=Le(u=et(u,Fn(y=Gt({left:f?m.left-(w.left-m.left):w.left,top:h?m.top-(w.top-m.top):w.top},o),Oe(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function dl(n){var e=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=G({},e),u=$t(i,c).width,f=$t(i,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(i.width-s.minWidth)/(c.left/c.right),c.right=-(i.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(i.width-s.minWidth):c.right<0&&(c.right=-(i.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(i.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(i.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(i.height-s.minHeight):c.bottom<0&&(c.bottom=-(i.height-s.minHeight)));var h=fi($t(i,c),r);d&&(h.left&&h.left>0&&h.right===0?(c.right+=h.left,c.left-=h.left):h.right&&h.right>0&&h.left===0&&(c.left+=h.right,c.right-=h.right),h.top&&h.top>0&&h.bottom===0?(c.bottom+=h.top,c.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(c.top+=h.bottom,c.bottom-=h.bottom),h=fi($t(i,c),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Et.forEach(function(C){var B=h[C];B&&c[C]&&(m[C]=Math.max(0,1-B/c[C]))}),a){var w=Math.min.apply(null,Et.map(function(C){return m[C]}));w!==1/0&&Et.forEach(function(C){c[C]*=w})}else Et.forEach(function(C){m[C]!==1/0&&(c[C]*=m[C])});if(u=$t(i,c).width,f=$t(i,c).height,c.right+c.left&&(u>s.maxWidth?m.width=(s.maxWidth-i.width)/(c.right+c.left):u<s.minWidth&&(m.width=(s.minWidth-i.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?m.height=(s.maxHeight-i.height)/(c.bottom+c.top):f<s.minHeight&&(m.height=(s.minHeight-i.height)/(c.bottom+c.top))),a){var y=Math.min(m.width,m.height);y!==1/0&&Et.forEach(function(C){c[C]*=y})}else m.width!==1/0&&zy.forEach(function(C){c[C]*=m.width}),m.height!==1/0&&Dy.forEach(function(C){c[C]*=m.height});return c}function lo(n,e,i){return e==0&&i==0?n/2:e==0?0:i==0?n:n*Math.abs(e/(e+i))}var Zy=yt("vue-simple-handler"),Jy=yt("vue-simple-handler-wrapper"),br={name:"SimpleHandler",components:{HandlerWrapper:tl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var n,e=(dt(n={},this.horizontalPosition,!!this.horizontalPosition),dt(n,this.verticalPosition,!!this.verticalPosition),dt(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),dt(n,"hover",this.hover),n);return{default:Me(Zy(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(Jy(e),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"]};br.render=function(n,e,i,o,r,s){var a=t.resolveComponent("HandlerWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Ky=yt("vue-simple-line"),ew=yt("vue-simple-line-wrapper"),Sr={name:"SimpleLine",components:{LineWrapper:nl},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Me(Ky(dt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(ew(dt({},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"]};Sr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("LineWrapper");return t.openBlock(),t.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Cr=yt("vue-bounding-box"),tw=["east","west",null],nw=["south","north",null],ul={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return br}},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 Sr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return tw.forEach(function(e){nw.forEach(function(i){if(e!==i){var o=Ya(e,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,horizontalDirection:e})}})}),{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,e=this.handlersWrappersClasses,i=this.linesClasses,o=this.linesWrappersClasses;return{root:Cr(),handlers:n,handlersWrappers:e,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,e=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||e.push({name:i.name,component:n.linesComponent,class:Me(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),e},handlerNodes:function(){var n=this,e=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class: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(i&&o){var a=r.horizontalDirection,d=r.verticalDirection,c=a==="east"?i:a==="west"?0:i/2,u=d==="south"?o:d==="north"?0:o/2;s.wrapperClass=Cr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Cr("handler",dt({},r.classname,!0));e.push(s)}}),e}},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,e,i){var o,r=n.shift(),s=r.left,a=r.top,d={left:0,right:0,top:0,bottom:0};e==="west"?d.left-=s:e==="east"&&(d.right+=s),i==="north"?d.top-=a:i==="south"&&(d.bottom+=a),!i&&e?o="width":i&&!e&&(o="height"),this.resizable&&this.$emit("resize",new Py(d,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};ul.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[t.renderSlot(n.$slots,"default"),t.createVNode("div",null,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.lineNodes,function(a){return t.openBlock(),t.createBlock(t.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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.handlerNodes,function(a){return t.openBlock(),t.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(t.openBlock(),t.createBlock(t.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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var iw=yt("vue-draggable-area"),fl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:iw()}}},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 e=this.movable&&n.touches.length===1;e&&(this.touches=un(n.touches)),(this.touchStarted||e)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):el({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],this.initAnchor(e),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 e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,e){var i=un(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new hr({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};fl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};function kr(n){var e,i;return{rotate:n.rotate||0,flip:{horizontal:((e=n==null?void 0:n.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function ow(n){return new Promise(function(e,i){try{if(n)if(/^data:/i.test(n))e(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,h=new ArrayBuffer(f),m=new Uint8Array(h),w=0;w<f;w++)m[w]=u.charCodeAt(w);return h}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(c){e(c.target.result)},s=n,a=function(c){o.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(c){i(c)}var s,a,d})}function hl(n){var e=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function rw(n){try{var e,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,c=2;c+1<d;){if(i.getUint8(c)===255&&i.getUint8(c+1)===225){s=c;break}c++}if(s&&(o=s+10,function(w,y,C){var B,E="";for(B=y,C+=y;B<C;B++)E+=String.fromCharCode(w.getUint8(B));return E}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var h=i.getUint16(a,r),m=0;m<h;m++)if(c=a+12*m+2,i.getUint16(c,r)===274){c+=8,e=i.getUint16(c,r),i.setUint16(c,1,r);break}}return e}catch{return null}}function ml(n,e){var i=e.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-o)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=el({x:s.left,y:s.top},{x:d.clientX-o,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var pl={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=ur(this.processEnd),this.touches=[]},methods:{processMove:function(n,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new ui({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=ml(e,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new ui({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=e}},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 e=this.$refs.container,i=e.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=un(n.touches).filter(function(d){return d.clientX>o&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=ml(this.touches,e)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var e=this;if(this.touches.length){var i=un(n.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var e={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[e],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 e=this.$refs.container.getBoundingClientRect(),i=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(d=+a)==0||Ka(d)?d:d>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new ui({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};pl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:e[2]||(e[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:e[3]||(e[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[t.renderSlot(n.$slots,"default")],544)};var xr={components:{TransformableImage:pl},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};xr.render=function(n,e,i,o,r,s){var a=t.resolveComponent("transformable-image");return t.openBlock(),t.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:e[1]||(e[1]=function(d){return n.$emit("move",d)}),onResize:e[2]||(e[2]=function(d){return n.$emit("resize",d)})},{default:t.withCtx(function(){return[t.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var co=yt("vue-preview"),gl={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:co({fill:this.fill}),wrapper:co("wrapper"),imageWrapper:co("image-wrapper"),image:Me(co("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,e=ae(ae({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=sl({width:i,height:o},e.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*i/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
44
- `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+hl(e),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};gl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[t.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[t.withDirectives(t.createVNode("img",{ref:"image",src:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[t.vShow,i.image&&i.image.src]])],6)],6)};var yl={components:{Preview:gl},inheritAttrs:!1};yl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("preview");return t.openBlock(),t.createBlock(a,t.mergeProps(n.$attrs,{fill:!0}),null,16)};var Er=yt("vue-rectangle-stencil"),wl={name:"RectangleStencil",components:{StencilPreview:yl,BoundingBox:ul,DraggableArea:fl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return br}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Sr}},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(Er({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(Er("preview"),this.previewClass),boundingBox:Me(Er("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,e=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(e,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};wl.render=function(n,e,i,o,r,s){var a=t.resolveComponent("stencil-preview"),d=t.resolveComponent("draggable-area"),c=t.resolveComponent("bounding-box");return t.openBlock(),t.createBlock("div",{class:s.classes.stencil,style:s.style},[t.createVNode(c,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:t.withCtx(function(){return[t.createVNode(d,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:t.withCtx(function(){return[t.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var sw=["transitions"],vt=yt("vue-advanced-cropper"),bl={name:"Cropper",components:{BackgroundWrapper:xr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return wl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return xr}},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 Fy.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 e=n.event,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=G(G({},i),{right:i.left+i.width,bottom:i.top+i.height}),d=e.params||{},c=G({},e.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),Et.forEach(function(R){u[R]||(c[R]=0)});var f=$t(a,c=dl({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,h=$t(a,c).height,m=d.preserveRatio?le(a):gr(f/h,o);if(m){var w=d.respectDirection;if(w||(w=a.width>=a.height||m===1?"width":"height"),w==="width"){var y=f/m-a.height;if(u.top&&u.bottom){var C=c.top,B=c.bottom;c.bottom=lo(y,B,C),c.top=lo(y,C,B)}else u.bottom?c.bottom=y:u.top?c.top=y:u.right?c.right=0:u.left&&(c.left=0)}else if(w==="height"){var E=a.width-h*m;if(u.left&&u.right){var N=c.left,k=c.right;c.left=-lo(E,N,k),c.right=-lo(E,k,N)}else u.left?c.left=-E:u.right?c.right=-E:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=dl({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=$t(a,c).width,h=$t(a,c).height,(m=d.preserveRatio?le(a):gr(f/h,o))&&Math.abs(m-f/h)>.001&&Et.forEach(function(R){u[R]||(c[R]=0)}),wr({event:new hr({left:-c.left,top:-c.top}),coordinates:{width:i.width+c.right+c.left,height:i.height+c.top+c.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:wr},initStretcher:{type:Function,default:function(n){var e=n.stretcher,i=n.imageSize,o=le(i);e.style.width=i.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var e=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=G(G({},i),Dt({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return a=Le(a=et(a,Fn(Oe(i),Oe(a))),so(Bt(e),s))}},fitVisibleArea:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=G({},e);s.height=s.width/le(i),s.top+=(e.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=oo(On(r,Bt(s=ut(s,ro(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Le(s=et(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(le(i)>le(o)?(a={top:0,bottom:o.height},e&&s==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&s==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var e=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:e.width,bottom:e.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:ae({},il)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var n=function(e){return e*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=fr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:fr(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:Re(this.minWidth)?0:io(this.minWidth),minHeight:Re(this.minHeight)?0:io(this.minHeight),maxWidth:Re(this.maxWidth)?1/0:io(this.maxWidth),maxHeight:Re(this.maxHeight)?1/0:io(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,d=o.positionRestrictions,c=G(G({},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});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=yr(r),f=rl(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({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 e=this.getStencilSize(),i=yr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*e.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.height*e.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:vt(),image:Me(vt("image"),this.imageClass),stencil:vt("stencil"),boundaries:Me(vt("boundaries"),this.boundariesClass),stretcher:Me(vt("stretcher")),background:Me(vt("background"),this.backgroundClass),foreground:Me(vt("foreground"),this.foregroundClass),imageWrapper:Me(vt("image-wrapper")),cropperWrapper:Me(vt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,e=n.width,i=n.height,o=n.left,r=n.top;return{width:e/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=ae(ae({},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(-e.left-i.left-this.imageTransforms.translateX,"px, ").concat(-e.top-i.top-this.imageTransforms.translateY,"px)")+hl(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==e[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=ur(this.update,this.debounce),this.debouncedDisableTransitions=ur(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(ae({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:ae({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,imageTransforms:e,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ae({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new ui({},{factor:1/n,center:e}),{normalize:!1,transitions:r})},move:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new ui({left:n||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(n),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=n})},refresh:function(){var n=this,e=this.$refs.image;if(this.src&&e)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 e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),e.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(e){var i=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),Le(s,r)}(ae(ae({},this.getPublicProperties()),{},{positionRestrictions:ao(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,e,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Ly:this.autoZoom?Hy:Uy);var s=r({event:{type:n,params:o},visibleArea:e,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return ae(ae({},s),{},{changed:!ol(s.visibleArea,e)||!ol(s.coordinates,i)})},runAutoZoom:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i!==void 0&&i,r=Iy(e,sw),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;o&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,o&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(e){var i=e.event,o=e.visibleArea,r=e.coefficient;if(i.type==="manipulateImage")return G(G({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=G(G({},i),{directions:G({},i.directions)});return Et.forEach(function(d){s.directions[d]*=r}),s}if(i.type==="move"){var a=G(G({},i),{directions:G({},i.directions)});return vy.forEach(function(d){a.directions[d]*=r}),a}return i}(ae(ae({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,e=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(d,c,u){var f=u.rotate,h=u.flip,m={width:c.naturalWidth,height:c.naturalHeight},w=sl(m,f),y=d.getContext("2d");d.height=w.height,d.width=w.width,y.save();var C=Gt(Oe(G({left:0,top:0},m)),f);return y.translate(-(C.left-w.width/2),-(C.top-w.height/2)),y.rotate(f*Math.PI/180),y.translate(h.horizontal?m.width:0,h.vertical?m.height:0),y.scale(h.horizontal?-1:1,h.vertical?-1:1),y.drawImage(c,0,0,m.width,m.height),y.restore(),d}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=ae({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Dt({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(d,c,u,f,h){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var m=d.getContext("2d");m.clearRect(0,0,d.width,d.height),h&&(h.imageSmoothingEnabled&&(m.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(m.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(m.fillStyle=h.fillColor,m.fillRect(0,0,d.width,d.height),m.save()));var w=u.left<0?-u.left:0,y=u.top<0?-u.top:0;m.drawImage(c,u.left+w,u.top+y,u.width,u.height,w*(d.width/u.width),y*(d.height/u.height),d.width,d.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&e?_y(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?ao(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Oy({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Wy:qy);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=vn(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||jy,s=[o,function(a){var d=a.coordinates;return ae({},vn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,un(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 e=n.$refs.stretcher;e&&(e.style.height="auto",e.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,e=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(vn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=ae(ae({},this.defaultImageTransforms),{},{flip:ae({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var e,i,o,r,s,a,d=n.defaultVisibleArea||Gy;n.visibleArea=vn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(e={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=G({},i),a=le(o),s.width/s.height!==a&&(s.height=s.width/a),Le(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,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(Za(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var i=Re(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){ow(n).then(function(s){var a=rw(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var e=this,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Xa(i)||!Za(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,vn(this.defaultTransforms)?this.appliedImageTransforms=kr(this.defaultTransforms()):no(this.defaultTransforms)?this.appliedImageTransforms=kr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=kr({});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=ae(ae({},this.appliedImageTransforms),{},{flip:ae({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=e.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:ao(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(n)})),e.onChange()})},onResize:function(n){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(ae(ae({},e.getPublicProperties()),{},{positionRestrictions:ao(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,e.visibleArea.width),maxHeight:Math.min(i.maxHeight,e.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:e.normalizeEvent(n)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=e.transitions,o=i!==void 0&&i,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Qy(ae(ae({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(n){var e,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var d=this.$refs.stencil.aspectRatios();e=d.minimum,i=d.maximum}if(Re(e)&&(e=Re(r)?s:r),Re(i)&&(i=Re(r)?a:r),!n&&(Re(e)||Re(i))){var c=this.getStencilSize(),u=c?le(c):null;Re(e)&&(e=Ja(u)?u:void 0),Re(i)&&(i=Ja(u)?u:void 0)}return{minimum:e,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=n.boundaries,i=n.stencilSize,o=n.aspectRatio,gr(le(r=vn(i)?i({boundaries:e,aspectRatio:o}):i),o)&&(r=Dt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>e.width||r.height>e.height)&&(r=Dt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:le(r),maximum:le(r)}})),r;var n,e,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return ae({},il)},flip:function(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=ae({},this.imageTransforms.flip),a=Xy({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:e?!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()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=ae({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=Yy({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,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},aw={key:0,ref:"canvas",style:{display:"none"}},lw={key:1,ref:"sourceCanvas",style:{display:"none"}};bl.render=function(n,e,i,o,r,s){return t.openBlock(),t.createBlock("div",{ref:"cropper",class:s.classes.cropper},[t.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),t.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:t.withCtx(function(){return[t.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),t.createVNode("div",{class:s.classes.imageWrapper},[t.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=t.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),t.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),t.withDirectives((t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.stencilComponent),t.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[t.vShow,r.imageLoaded]]),i.canvas?(t.openBlock(),t.createBlock("canvas",aw,null,512)):t.createCommentVNode("",!0),i.canvas?(t.openBlock(),t.createBlock("canvas",lw,null,512)):t.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const cw={width:0,height:0,left:0,top:0};class Br{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",cw)}setCoordinates(e){this.coordinates=e}getCoordinates(){return this.coordinates}static Create(e,i=0,o){const r=new Br;return r.src=e,r.ratio=i,r.id=o,r}setRatio(e){this.ratio=e}getRatio(){return this.ratio}setSrc(e){this.src=e}getSrc(){return this.src}}const dw={class:"cropper-wrapper"},uw={class:"row justify-end q-mt-md"},fw=A(t.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:e}){const i=n,o=e,r=t.ref(i.ratio),s=t.ref(Br.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=t.ref(),d=t.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}]),c=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(h=>{var m;o("crop",{blob:h,src:(m=f.canvas)==null?void 0:m.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,h)=>(t.openBlock(),t.createElementBlock("div",dw,[t.createVNode(eo,{modelValue:r.value,"onUpdate:modelValue":[h[0]||(h[0]=m=>r.value=m),h[1]||(h[1]=m=>c(m))],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),t.createVNode(t.unref(bl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:h[2]||(h[2]=m=>s.value.setCoordinates(m.coordinates))},null,8,["src","stencil-props"]),t.createElementVNode("div",uw,[t.createVNode(Ne,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),hw={class:"column items-center q-my-md"},mw={class:"uploader-content"},pw={class:"uploader-icon"},gw={class:"tools-button absolute-full column items-center justify-center"},yw={class:"row q-gutter-sm"},ww=A(t.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:e}){const i=M.ClosePopup,o=n,r=e,s=t.ref(),a=t.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=t.ref(!1),c=t.ref(),u=t.ref(o.ratio),f=t.ref(""),h=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),m=t.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),w=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},y=E=>{E.blob.src=E.src,o.fileInfo.setFile&&o.fileInfo.setFile(E.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),d.value=!1,r("crop")},C=E=>{f.value=E.url,d.value=!0},B=E=>{if(E.length===0)return;const N=E[0];N.url=URL.createObjectURL(N),s.value=N,o.fileInfo.setFile&&o.fileInfo.setFile(N),o.withCrop&&C(s.value)};return t.watch(u,E=>{r("update:ratio",E)}),t.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),t.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(E,N)=>(t.openBlock(),t.createElementBlock("div",hw,[t.unref(s)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-container relative-position",style:t.normalizeStyle(t.unref(h))},[t.createVNode(t.unref(M.QImg),{src:t.unref(s).url,ratio:t.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),t.createElementVNode("div",gw,[t.createElementVNode("div",yw,[t.createVNode(Ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:N[0]||(N[0]=k=>C(t.unref(s)))},{default:t.withCtx(()=>[t.createVNode(di,null,{default:t.withCtx(()=>[...N[5]||(N[5]=[t.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),t.createVNode(Ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:w},{default:t.withCtx(()=>[t.createVNode(di,null,{default:t.withCtx(()=>[...N[6]||(N[6]=[t.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(t.openBlock(),t.createBlock(t.unref(M.QUploader),{key:0,id:t.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:t.normalizeStyle(t.unref(m)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:B,onRemoved:w},{header:t.withCtx(()=>[t.createElementVNode("div",mw,[t.createVNode(t.unref(M.QUploaderAddTrigger)),t.createElementVNode("div",pw,[t.createVNode(t.unref(M.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),N[4]||(N[4]=t.createElementVNode("div",{class:"uploader-text text-primary text-center"},[t.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),t.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),t.createVNode(ci,{modelValue:t.unref(d),"onUpdate:modelValue":N[3]||(N[3]=k=>t.isRef(d)?d.value=k:null),persistent:""},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCard),{class:"full-height"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QCardSection),{class:"row items-center q-pb-none"},{default:t.withCtx(()=>[t.createVNode(t.unref(M.QSpace)),t.withDirectives(t.createVNode(Ne,{icon:"close",flat:"",round:"",dense:""},null,512),[[t.unref(i)]])]),_:1}),t.createVNode(t.unref(M.QCardSection),{class:"cropper-section"},{default:t.withCtx(()=>[t.createVNode(fw,{ratio:t.unref(u),"onUpdate:ratio":N[1]||(N[1]=k=>t.isRef(u)?u.value=k:null),src:t.unref(f),onCrop:y,onClose:N[2]||(N[2]=k=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-52f912c6"]]);function bw(n){n.component("PMenuTabs",by),n.component("PUploaderFile",Vy),n.component("PUploaderImage",ww),n.component("PAuthForm",Wa),n.component("PAuthModal",yy),n.component("PNameEdit",Cy)}const Sw={install:function(n){Pg(n),py(n),S0(n),bw(n),r0(n),Ma(n)}};function Cw(n,e={}){const{quasarPlugins:i=!0}=e;i&&n.use(M.Quasar,{plugins:{Notify:M.Notify,Dialog:M.Dialog}}),Sw.install(n)}class kw extends bi{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Or);l(this,"method",wn.Login);l(this,"id","field-auth-login")}}const xw=["PF","PFM"],Ew=A(t.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:e}){const i=e,o=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([o]),i("create")};return(s,a)=>{const d=t.resolveComponent("PInput"),c=t.resolveComponent("PButton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{modelValue:t.unref(o).name,"onUpdate:modelValue":a[0]||(a[0]=u=>t.unref(o).name=u)},null,8,["modelValue"]),t.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),Bw=Object.freeze(Object.defineProperty({__proto__:null,default:A(t.defineComponent({__name:"ExtractsList",setup(n){const e=t.ref(!1),i=t.ref(!1),o=async()=>{i.value=!0},r=async()=>{await Promise.all([o()])},s=()=>{e.value=!e.value};return T.H.Hooks.onBeforeMount(r),(a,d)=>{const c=Ew,u=t.resolveComponent("PModal");return t.unref(e)?(t.openBlock(),t.createBlock(u,{key:0,show:t.unref(e)},{default:t.withCtx(()=>[t.createVNode(c,{onCreate:s})]),_:1},8,["show"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));j.AuthButtonLogin=go,j.AuthButtonRefresh=Fr,j.AuthButtonRegister=yo,j.AuthButtonRestore=wi,j.AuthChunks=ze,j.AuthFieldsIds=Tt,j.AuthFormSettings=Hr,j.AuthMethods=wn,j.EmailField=Si,j.LoginField=kw,j.PAddDialog=La,j.PBadge=Va,j.PButton=Ne,j.PCard=Ha,j.PCheckBox=Ia,j.PChip=Ta,j.PCrudList=Ua,j.PDateInput=Ki,j.PDateTimeInput=Pa,j.PDialog=ci,j.PEditDialog=ja,j.PF=T,j.PFM=rg,j.PHint=lr,j.PInput=zt,j.POptionsListSingle=Ra,j.POpts=Aa,j.PSelect=eo,j.PTableToggle=za,j.PTabs=rr,j.PTabsLeft=sr,j.PToggle=Da,j.PasswordField=Ci,j.PasswordRepeatField=Lr,j.Schedule=ri,j.ScheduleDay=Xi,j.ScheduleDefaultLabels=or,j.ScheduleGridEditor=$a,j.SchedulePlace=zn,j.ScheduleSession=An,j.ScheduleSlot=At,j.ScheduleTimeline=Na,j.TabsStore=Zi,j.installSprof=Cw,j.pfName=xw,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
43
+ ***************************************************************************** */function sl(n,t){var i,o;return n&&t?(i=""+n+t[0].toUpperCase()+t.slice(1),o=n+"-"+t):(i=n||t,o=n||t),{name:i,classname:o}}function al(n){return/^blob:/.test(n)}function ll(n){return al(n)||function(t){return/^data:/.test(t)}(n)}function Hn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function ze(n){return n===void 0}function lo(n){return typeof n=="object"&&n!==null}function xr(n,t,i){var o={};return lo(n)?(Object.keys(t).forEach(function(r){ze(n[r])?o[r]=t[r]:lo(t[r])?lo(n[r])?o[r]=xr(n[r],t[r],i[r]):o[r]=n[r]?t[r]:i[r]:t[r]===!0||t[r]===!1?o[r]=!!n[r]:o[r]=n[r]}),o):n?t:i}function co(n){var t=Number(n);return Number.isNaN(t)?n:t}function cl(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!dl(n)}function dl(n){return n!=n}function ul(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var yi=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},Ew=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Er=function(n){this.type="move",this.directions=n},Bw=function(){function n(t,i,o,r,s){this.type="drag",this.nativeEvent=t,this.position=o,this.previousPosition=r,this.element=i,this.anchor=s}return n.prototype.shift=function(){var t=this,i=t.element,o=t.anchor,r=t.position;if(i){var s=i.getBoundingClientRect(),a=s.left,d=s.top;return{left:r.left-a-o.left,top:r.top-d-o.top}}return{left:0,top:0}},n}(),Br={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=yn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,i){return{clientX:t.clientX+i.clientX/n.touches.length,clientY:t.clientY+i.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.draggable.getBoundingClientRect(),i=t.left,o=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-i,top:n.clientY-s,bottom:r-n.clientY,right:o-n.clientX}},processMove:function(n,t){var i=yn(t);if(this.touches.length){if(this.touches.length===1&&i.length===1){var o=this.$refs.draggable;this.$emit("drag",new Bw(n,o,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Br.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:i.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Nr=St("vue-handler-wrapper"),fl={name:"HandlerWrapper",components:{DraggableElement:Br},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,i=sl(this.horizontalPosition,this.verticalPosition);n=Nr((ht(t={},i.classname,!0),ht(t,"disabled",this.disabled),t))}else n=Nr({disabled:this.disabled});return{root:n,draggable:Nr("draggable")}}},emits:["leave","enter","drag","drag-end"]};fl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var Nw=St("vue-line-wrapper"),ml={name:"LineWrapper",components:{DraggableElement:Br},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return Nw((ht(n={},this.position,!0),ht(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};ml.render=function(n,t,i,o,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(d){return n.$emit("drag",d)}),onDragEnd:t[2]||(t[2]=function(d){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(d){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(d){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Vt=["left","right","top","bottom"],$w=["left","right"],Vw=["top","bottom"],Iw=["left","top"],Mw=["fill-area","fit-area","stencil","none"],hl={left:0,top:0,width:0,height:0};function pl(n,t,i){return!(i=i||["width","height","left","top"]).some(function(o){return n[o]!==t[o]})}function It(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function Un(n,t){return{left:n.left-t.left,top:n.top-t.top}}function Ue(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function wi(n,t){var i={left:0,top:0,right:0,bottom:0};return Vt.forEach(function(o){var r=t[o],s=It(n)[o];i[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),i}function Mt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function uo(n){return{left:-n.left,top:-n.top}}function tt(n,t){return Y(Y({},n),{left:n.left+t.left,top:n.top+t.top})}function pt(n,t,i,o){if(t!==1){if(i){var r=Ue(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(i.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(i.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function de(n){return n.width/n.height}function qn(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 jn(n,t){var i={left:0,top:0},o=wi(n,t);return o.left&&o.left>0?i.left=o.left:o.right&&o.right>0&&(i.left=-o.right),o.top&&o.top>0?i.top=o.top:o.bottom&&o.bottom>0&&(i.top=-o.bottom),i}function $r(n,t){var i;return t.minimum&&n<t.minimum?i=t.minimum:t.maximum&&n>t.maximum&&(i=t.maximum),i}function gl(n,t){var i=de(n),o=de(t);return t.width<1/0&&t.height<1/0?i>o?{width:t.width,height:t.width/i}:{width:t.height*i,height:t.height}:t.width<1/0?{width:t.width,height:t.width/i}:t.height<1/0?{width:t.height*i,height:t.height}:n}function yl(n,t){var i=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(i))+Math.abs(n.height*Math.sin(i)),height:Math.abs(n.width*Math.sin(i))+Math.abs(n.height*Math.cos(i))}}function Xt(n,t){var i=t*Math.PI/180;return{left:n.left*Math.cos(i)-n.top*Math.sin(i),top:n.left*Math.sin(i)+n.top*Math.cos(i)}}function fo(n,t){var i=wi(qe(n,t),t);return i.left+i.right+i.top+i.bottom?i.left+i.right>i.top+i.bottom?Math.min((n.width+i.left+i.right)/n.width,qn(n,t)):Math.min((n.height+i.top+i.bottom)/n.height,qn(n,t)):1}function qe(n,t,i){i===void 0&&(i=!1);var o=jn(n,t);return tt(n,i?uo(o):o)}function Vr(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 Pw(n,t){return Y(Y({},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 wl(n,t,i){i===void 0&&(i=!0);var o={};return Vt.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?i?Math.max(s,a):Math.min(s,a):i?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function mo(n,t){return wl(n,t,!0)}function bl(n){var t=n.size,i=n.aspectRatio,o=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||de(t)>=i.minimum&&de(t)<=i.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(o||t.height>=r.minHeight&&t.width>=r.minWidth))}function Sl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(n){var t=n.width,i=n.height,o=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,t)),height:Math.max(o.minHeight,Math.min(o.maxHeight,i))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(m,h){return bl({size:h,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:f})&&(!m||Sl(h,{width:t,height:i})<Sl(m,{width:t,height:i}))?h:m},null)}var d=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&d.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),bl({size:s,aspectRatio:r,sizeRestrictions:o})&&d.push(s);var c=a(d)||a(d,!0);return c&&{width:c.width,height:c.height}}function Ir(n){var t=n.event,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=tt(i,t.directions);return tt(s,jn(s,r))}function Tw(n){var t=n.coordinates,i=n.transform,o=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,d=n.visibleArea,c=function(f,m){return Ir({coordinates:f,positionRestrictions:s,event:new Er({left:m.left-f.left,top:m.top-f.top})})},u=Y({},t);return(Array.isArray(i)?i:[i]).forEach(function(f){var m={};ze((m=typeof f=="function"?f({coordinates:u,imageSize:o,visibleArea:d}):f).width)&&ze(m.height)||(u=function(h,w){var y=Y(Y(Y({},h),Ot({width:w.width,height:w.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return c(y,{left:h.left,top:h.top})}(u,Y(Y({},u),m))),ze(m.left)&&ze(m.top)||(u=c(u,Y(Y({},u),m)))}),u}function Rw(n){n.event;var t=n.getAreaRestrictions,i=n.boundaries,o=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,d=n.positionRestrictions;n.stencilReference;var c,u,f,m=Y({},o),h=Y({},r),w=Y({},s);c=de(w),u=de(m),f===void 0&&(f=.001),(c===0||u===0?Math.abs(u-c)<f:Math.abs(u/c)<1+f&&Math.abs(u/c)>1-f)||(m=Y(Y({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:de(w),maximum:de(w)}})));var y=fo(h=pt(h,m.width*i.width/(h.width*w.width)),t({visibleArea:h,type:"resize"}));return y!==1&&(h=pt(h,y),m=pt(m,y)),h=qe(h=tt(h,Un(Ue(m),Ue(h))),t({visibleArea:h,type:"move"})),{coordinates:m=qe(m,mo(It(h),d)),visibleArea:h}}function Dw(n){var t=n.event,i=n.getAreaRestrictions,o=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var d=Y({},r),c=Y({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};c.width,o.width,de(o)>de(d)?(u.height=.8*o.height,u.width=u.height*de(d)):(u.width=.8*o.width,u.height=u.width*de(d));var f=fo(c=pt(c,d.width*o.width/(c.width*u.width)),i({visibleArea:c,type:"resize"}));c=pt(c,f),f!==1&&(u.height/=f,u.width/=f),c=qe(c=tt(c,Un(Ue(d),Ue(c))),i({visibleArea:c,type:"move"})),d=qe(d,mo(It(c),a))}return{coordinates:d,visibleArea:c}}function Aw(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.getAreaRestrictions,s=Y({},o),a=Y({},i);if(t.type==="setCoordinates"){var d=Math.max(0,a.width-s.width),c=Math.max(0,a.height-s.height);d>c?s=pt(s,Math.min(a.width/s.width,qn(s,r({visibleArea:s,type:"resize"})))):c>d&&(s=pt(s,Math.min(a.height/s.height,qn(s,r({visibleArea:s,type:"resize"}))))),s=qe(s=tt(s,uo(jn(a,It(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function zw(n){var t=n.imageSize,i=n.visibleArea,o=n.coordinates,r=i||t;return{left:(i?i.left:0)+r.width/2-o.width/2,top:(i?i.top:0)+r.height/2-o.height/2}}function _w(n){var t=n.imageSize,i=n.visibleArea,o=n.aspectRatio,r=n.sizeRestrictions,s=i||t,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,de(s))),d=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(Y(Y({},d),{aspectRatio:o,sizeRestrictions:r}))}function Fw(n){var t,i,o=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,d=n.sizeRestrictions,c=n.stencilSize,u=r||o;return de(u)>de(s)?i=(t=c.height*u.height/s.height)*de(c):t=(i=c.width*u.width/s.width)/de(c),Ot({width:i,height:t,aspectRatio:a,sizeRestrictions:d})}function Ow(n){var t=n.getAreaRestrictions,i=n.coordinates,o=n.imageSize,r=de(n.boundaries);if(i){var s={height:Math.max(i.height,o.height),width:Math.max(i.width,o.width)},a=gl({width:de(s)>r?s.width:s.height*r,height:de(s)>r?s.width/r:s.height},Vr(t())),d={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},c=wi(i,It(Y({left:0,top:0},o))),u={};return!c.left&&!c.right&&d.width<=o.width&&(u.left=0,u.right=o.width),!c.top&&!c.bottom&&d.height<=o.height&&(u.top=0,u.bottom=o.height),qe(d,u)}var f=de(o);return a={height:f>r?o.height:o.width/r,width:f>r?o.height*r:o.width},{left:o.width/2-a.width/2,top:o.height/2-a.height/2,width:a.width,height:a.height}}function ho(n,t){return wl(n,It(t))}function Lw(n){var t=n.event,i=n.coordinates,o=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,d=n.adjustStencil,c=t.scale,u=t.move,f=Y({},o),m=Y({},i),h=1,w=1,y=c.factor&&Math.abs(c.factor-1)>.001;f=tt(f,{left:u.left||0,top:u.top||0});var S={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,qn(m,a))},area:{maximum:qn(f,s({visibleArea:f,type:"resize"}))}};c.factor&&y&&(c.factor<1?(w=Math.max(c.factor,S.stencil.minimum))>1&&(w=1):c.factor>1&&(w=Math.min(c.factor,Math.min(S.area.maximum,S.stencil.maximum)))<1&&(w=1)),w&&(f=pt(f,w,c.center));var E=i.left-o.left,x=o.width+o.left-(i.width+i.left),V=i.top-o.top,k=o.height+o.top-(i.height+i.top);return f=qe(f=tt(f,jn(f,{left:a.left!==void 0?a.left-E*w:void 0,top:a.top!==void 0?a.top-V*w:void 0,bottom:a.bottom!==void 0?a.bottom+k*w:void 0,right:a.right!==void 0?a.right+x*w:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*w,m.height=m.height*w,m.left=f.left+E*w,m.top=f.top+V*w,m=qe(m,mo(It(f),a)),c.factor&&y&&d&&(c.factor>1?h=Math.min(S.area.maximum,c.factor)/w:c.factor<1&&(h=Math.max(m.height/f.height,m.width/f.width,c.factor/w)),h!==1&&(f=tt(f=qe(f=pt(f,h,c.factor>1?c.center:Ue(m)),s({visibleArea:f,type:"move"})),uo(jn(m,It(f)))))),{coordinates:m,visibleArea:f}}function vw(n){var t=n.aspectRatio,i=n.getAreaRestrictions,o=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,d=n.imageSize,c=n.previousImageSize,u=n.angle,f=Y({},o),m=Y({},r),h=Xt(Ue(Y({left:0,top:0},c)),u);return(f=Y(Y({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Xt(Ue(f),u))).left-=h.left-d.width/2+f.width/2,f.top-=h.top-d.height/2+f.height/2,m=pt(m,fo(m,i({visibleArea:m,type:"resize"}))),{coordinates:f=qe(f,a),visibleArea:m=qe(m=tt(m,Un(Ue(f),Ue(o))),i({visibleArea:m,type:"move"}))}}function Hw(n){var t=n.flip,i=n.previousFlip,o=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,d=n.imageSize,c=Y({},s),u=Y({},a),f=i.horizontal!==t.horizontal,m=i.vertical!==t.vertical;if(f||m){var h=Xt({left:d.width/2,top:d.height/2},-o),w=Xt(Ue(c),-o),y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},o);c=tt(c,Un(y,Ue(c))),w=Xt(Ue(u),-o),u=qe(u=tt(u,Un(y=Xt({left:f?h.left-(w.left-h.left):w.left,top:m?h.top-(w.top-h.top):w.top},o),Ue(u))),r({visibleArea:u,type:"move"}))}return{coordinates:c,visibleArea:u}}function Cl(n){var t=n.directions,i=n.coordinates,o=n.positionRestrictions,r=o===void 0?{}:o,s=n.sizeRestrictions,a=n.preserveRatio,d=n.compensate,c=Y({},t),u=Mt(i,c).width,f=Mt(i,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(i.width-s.minWidth)/(c.left/c.right),c.right=-(i.width-s.minWidth)/(c.right/c.left)):c.left<0?c.left=-(i.width-s.minWidth):c.right<0&&(c.right=-(i.width-s.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(i.height-s.minHeight)/(c.top/c.bottom),c.bottom=-(i.height-s.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(i.height-s.minHeight):c.bottom<0&&(c.bottom=-(i.height-s.minHeight)));var m=wi(Mt(i,c),r);d&&(m.left&&m.left>0&&m.right===0?(c.right+=m.left,c.left-=m.left):m.right&&m.right>0&&m.left===0&&(c.left+=m.right,c.right-=m.right),m.top&&m.top>0&&m.bottom===0?(c.bottom+=m.top,c.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(c.top+=m.bottom,c.bottom-=m.bottom),m=wi(Mt(i,c),r));var h={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Vt.forEach(function(S){var E=m[S];E&&c[S]&&(h[S]=Math.max(0,1-E/c[S]))}),a){var w=Math.min.apply(null,Vt.map(function(S){return h[S]}));w!==1/0&&Vt.forEach(function(S){c[S]*=w})}else Vt.forEach(function(S){h[S]!==1/0&&(c[S]*=h[S])});if(u=Mt(i,c).width,f=Mt(i,c).height,c.right+c.left&&(u>s.maxWidth?h.width=(s.maxWidth-i.width)/(c.right+c.left):u<s.minWidth&&(h.width=(s.minWidth-i.width)/(c.right+c.left))),c.bottom+c.top&&(f>s.maxHeight?h.height=(s.maxHeight-i.height)/(c.bottom+c.top):f<s.minHeight&&(h.height=(s.minHeight-i.height)/(c.bottom+c.top))),a){var y=Math.min(h.width,h.height);y!==1/0&&Vt.forEach(function(S){c[S]*=y})}else h.width!==1/0&&$w.forEach(function(S){c[S]*=h.width}),h.height!==1/0&&Vw.forEach(function(S){c[S]*=h.height});return c}function po(n,t,i){return t==0&&i==0?n/2:t==0?0:i==0?n:n*Math.abs(t/(t+i))}var Uw=St("vue-simple-handler"),qw=St("vue-simple-handler-wrapper"),Mr={name:"SimpleHandler",components:{HandlerWrapper:fl},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=(ht(n={},this.horizontalPosition,!!this.horizontalPosition),ht(n,this.verticalPosition,!!this.verticalPosition),ht(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ht(n,"hover",this.hover),n);return{default:Pe(Uw(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Pe(qw(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"]};Mr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var jw=St("vue-simple-line"),Ww=St("vue-simple-line-wrapper"),Pr={name:"SimpleLine",components:{LineWrapper:ml},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:Pe(jw(ht({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Pe(Ww(ht({},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"]};Pr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Tr=St("vue-bounding-box"),Gw=["east","west",null],Qw=["south","north",null],kl={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 Mr}},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 Pr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return Gw.forEach(function(t){Qw.forEach(function(i){if(t!==i){var o=sl(t,i),r=o.name,s=o.classname;n.push({name:r,classname:s,verticalDirection:i,horizontalDirection:t})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,t=this.handlersWrappersClasses,i=this.linesClasses,o=this.linesWrappersClasses;return{root:Tr(),handlers:n,handlersWrappers:t,lines:i,linesWrappers:o}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(i){i.horizontalDirection&&i.verticalDirection||!n.lines[i.name]||t.push({name:i.name,component:n.linesComponent,class:Pe(n.classes.lines.default,n.classes.lines[i.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Pe(n.classes.linesWrappers.default,n.classes.linesWrappers[i.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],i=this.width,o=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Pe(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Pe(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(i&&o){var a=r.horizontalDirection,d=r.verticalDirection,c=a==="east"?i:a==="west"?0:i/2,u=d==="south"?o:d==="north"?0:o/2;s.wrapperClass=Tr("handler"),s.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Tr("handler",ht({},r.classname,!0));t.push(s)}}),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(n,t,i){var o,r=n.shift(),s=r.left,a=r.top,d={left:0,right:0,top:0,bottom:0};t==="west"?d.left-=s:t==="east"&&(d.right+=s),i==="north"?d.top-=a:i==="south"&&(d.bottom+=a),!i&&t?o="width":i&&!t&&(o="height"),this.resizable&&this.$emit("resize",new Ew(d,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};kl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(d){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(d){return s.onHandlerDrag(d,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(d){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Yw=St("vue-draggable-area"),xl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Yw()}}},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=yn(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()):ul({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.container.getBoundingClientRect(),i=t.left,o=t.top;this.anchor={x:n.clientX-i,y:n.clientY-o}},processMove:function(n,t){var i=yn(t);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&i.length===1&&this.$emit("move",new Er({left:i[0].clientX-(r+this.anchor.x),top:i[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};xl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Rr(n){var t,i;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((i=n==null?void 0:n.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function Xw(n){return new Promise(function(t,i){try{if(n)if(/^data:/i.test(n))t(function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(c),f=u.length,m=new ArrayBuffer(f),h=new Uint8Array(m),w=0;w<f;w++)h[w]=u.charCodeAt(w);return m}(n));else if(/^blob:/i.test(n)){var o=new FileReader;o.onload=function(c){t(c.target.result)},s=n,a=function(c){o.readAsArrayBuffer(c)},(d=new XMLHttpRequest).open("GET",s,!0),d.responseType="blob",d.onload=function(){this.status!=200&&this.status!==0||a(this.response)},d.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):i("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else i("Error: the image is empty")}catch(c){i(c)}var s,a,d})}function El(n){var t=n.rotate,i=n.flip,o=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+o*(i.horizontal?-1:1)+") ",s+=" scaleY("+r*(i.vertical?-1:1)+") "}function Zw(n){try{var t,i=new DataView(n),o=void 0,r=void 0,s=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,c=2;c+1<d;){if(i.getUint8(c)===255&&i.getUint8(c+1)===225){s=c;break}c++}if(s&&(o=s+10,function(w,y,S){var E,x="";for(E=y,S+=y;E<S;E++)x+=String.fromCharCode(w.getUint8(E));return x}(i,s+4,4)==="Exif")){var u=i.getUint16(o);if(((r=u===18761)||u===19789)&&i.getUint16(o+2,r)===42){var f=i.getUint32(o+4,r);f>=8&&(a=o+f)}}if(a){for(var m=i.getUint16(a,r),h=0;h<m;h++)if(c=a+12*h+2,i.getUint16(c,r)===274){c+=8,t=i.getUint16(c,r),i.setUint16(c,1,r);break}}return t}catch{return null}}function Bl(n,t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,s={left:0,top:0},a=0;return n.forEach(function(d){s.left+=(d.clientX-o)/n.length,s.top+=(d.clientY-r)/n.length}),n.forEach(function(d){a+=ul({x:s.left,y:s.top},{x:d.clientX-o,y:d.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var Nl={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=kr(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 yi({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=Bl(t,this.$refs.container),o=this.oldGeometricProperties;o.count===i.count&&o.count>1&&this.$emit("resize",new yi({left:o.centerMass.left-i.centerMass.left,top:o.centerMass.top-i.centerMass.top},{factor:o.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var t=this.$refs.container,i=t.getBoundingClientRect(),o=i.left,r=i.top,s=i.bottom,a=i.right;this.touches=yn(n.touches).filter(function(d){return d.clientX>o&&d.clientX<a&&d.clientY>r&&d.clientY<s}),this.oldGeometricProperties=Bl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var i=yn(n.touches).filter(function(o){return!o.identifier||t.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(n)&&(this.processMove(n,i),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var t=this.$refs.container.getBoundingClientRect(),i=t.left,o=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(d=+a)==0||dl(d)?d:d>0?1:-1),s={left:n.clientX-i,top:n.clientY-o};this.$emit("resize",new yi({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,d}},emits:["resize","move","transform-end"]};Nl.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Dr={components:{TransformableImage:Nl},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"]};Dr.render=function(n,t,i,o,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:t[1]||(t[1]=function(d){return n.$emit("move",d)}),onResize:t[2]||(t[2]=function(d){return n.$emit("resize",d)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var go=St("vue-preview"),$l={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:go({fill:this.fill}),wrapper:go("wrapper"),imageWrapper:go("image-wrapper"),image:Pe(go("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=ce(ce({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),i=this.imageSize.width,o=this.imageSize.height,r=yl({width:i,height:o},t.rotate),s={width:"".concat(i,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-r.width)*t.scaleX/2,top:(o-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*i/2,top:(1-t.scaleY)*o/2}};return s.transform=`translate(
44
+ `.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+El(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()}}};$l.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:i.image&&i.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,i.image&&i.image.src]])],6)],6)};var Vl={components:{Preview:$l},inheritAttrs:!1};Vl.render=function(n,t,i,o,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Ar=St("vue-rectangle-stencil"),Il={name:"RectangleStencil",components:{StencilPreview:Vl,BoundingBox:kl,DraggableArea:xl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Mr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Pr}},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:Pe(Ar({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Pe(Ar("preview"),this.previewClass),boundingBox:Pe(Ar("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,i=n.width,o=n.left,r=n.top,s={width:"".concat(i,"px"),height:"".concat(t,"px"),transform:"translate(".concat(o,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};Il.render=function(n,t,i,o,r,s){var a=e.resolveComponent("stencil-preview"),d=e.resolveComponent("draggable-area"),c=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(c,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:s.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(d,{movable:i.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:s.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var Jw=["transitions"],Lt=St("vue-advanced-cropper"),Ml={name:"Cropper",components:{BackgroundWrapper:Dr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Il}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Dr}},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 Mw.indexOf(n)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(n){return!(typeof n=="string"&&n!=="fill"&&n!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(n){var t=n.event,i=n.coordinates,o=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=Y(Y({},i),{right:i.left+i.width,bottom:i.top+i.height}),d=t.params||{},c=Y({},t.directions),u=d.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(c.left=0,c.right=0),s.heightFrozen&&(c.top=0,c.bottom=0),Vt.forEach(function(T){u[T]||(c[T]=0)});var f=Mt(a,c=Cl({coordinates:a,directions:c,sizeRestrictions:s,positionRestrictions:r})).width,m=Mt(a,c).height,h=d.preserveRatio?de(a):$r(f/m,o);if(h){var w=d.respectDirection;if(w||(w=a.width>=a.height||h===1?"width":"height"),w==="width"){var y=f/h-a.height;if(u.top&&u.bottom){var S=c.top,E=c.bottom;c.bottom=po(y,E,S),c.top=po(y,S,E)}else u.bottom?c.bottom=y:u.top?c.top=y:u.right?c.right=0:u.left&&(c.left=0)}else if(w==="height"){var x=a.width-m*h;if(u.left&&u.right){var V=c.left,k=c.right;c.left=-po(x,V,k),c.right=-po(x,k,V)}else u.left?c.left=-x:u.right?c.right=-x:u.top?c.top=0:u.bottom&&(c.bottom=0)}c=Cl({directions:c,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:d.compensate})}return f=Mt(a,c).width,m=Mt(a,c).height,(h=d.preserveRatio?de(a):$r(f/m,o))&&Math.abs(h-f/m)>.001&&Vt.forEach(function(T){u[T]||(c[T]=0)}),Ir({event:new Er({left:-c.left,top:-c.top}),coordinates:{width:i.width+c.right+c.left,height:i.height+c.top+c.bottom,left:i.left,top:i.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ir},initStretcher:{type:Function,default:function(n){var t=n.stretcher,i=n.imageSize,o=de(i);t.style.width=i.width+"px",t.style.height=t.clientWidth/o+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,i=n.coordinates,o=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=Y(Y({},i),Ot({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=qe(a=tt(a,Un(Ue(i),Ue(a))),mo(It(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.getAreaRestrictions,r=n.coordinates,s=Y({},t);s.height=s.width/de(i),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=pt(s,Math.max(r.height/s.height,r.width/s.width)));var a=uo(jn(r,It(s=pt(s,fo(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=qe(s=tt(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,i=n.boundaries,o=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(de(i)>de(o)?(a={top:0,bottom:o.height},t&&s==="move"&&(t.width>o.width?(a.left=-(t.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},t&&s==="move"&&(t.height>o.height?(a.top=-(t.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,i={};return n.imageRestriction!=="none"&&(i={left:0,top:0,right:t.width,bottom:t.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:ce({},hl)}},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=xr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:xr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ze(this.minWidth)?0:co(this.minWidth),minHeight:ze(this.minHeight)?0:co(this.minHeight),maxWidth:ze(this.maxWidth)?1/0:co(this.maxWidth),maxHeight:ze(this.maxHeight)?1/0:co(this.maxHeight)});if(n=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,d=o.positionRestrictions,c=Y(Y({},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});d.left!==void 0&&d.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,d.right-d.left)),d.bottom!==void 0&&d.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,d.bottom-d.top));var u=Vr(r),f=gl(a,u);return u.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),u.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c}({sizeRestrictions:n,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),i=Vr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,i.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,i.height*t.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Lt(),image:Pe(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Pe(Lt("boundaries"),this.boundariesClass),stretcher:Pe(Lt("stretcher")),background:Pe(Lt("background"),this.backgroundClass),foreground:Pe(Lt("foreground"),this.foregroundClass),imageWrapper:Pe(Lt("image-wrapper")),cropperWrapper:Pe(Lt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,i=n.height,o=n.left,r=n.top;return{width:t/this.coefficient,height:i/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(n.opacity="0"),n},imageStyle:function(){var n=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},o=ce(ce({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-i.left-this.imageTransforms.translateX,"px, ").concat(-t.top-i.top-this.imageTransforms.translateY,"px)")+El(o)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return n[i]!==t[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=kr(this.update,this.debounce),this.debouncedDisableTransitions=kr(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(ce({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:ce({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},this.visibleArea):null,imageTransforms:t,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?ce({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new yi({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;this.onManipulateImage(new yi({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,r=o===void 0||o,s=i.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var i=t.coordinates,o=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return s.width>o.maxWidth?s.width=Math.floor(i.width):s.width<o.minWidth&&(s.width=Math.ceil(i.width)),s.height>o.maxHeight?s.height=Math.floor(i.height):s.height<o.minHeight&&(s.height=Math.ceil(i.height)),qe(s,r)}(ce(ce({},this.getPublicProperties()),{},{positionRestrictions:ho(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,i,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?Rw:this.autoZoom?Dw:Aw);var s=r({event:{type:n,params:o},visibleArea:t,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return ce(ce({},s),{},{changed:!pl(s.visibleArea,t)||!pl(s.coordinates,i)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i!==void 0&&i,r=kw(t,Jw),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,d=s.coordinates,c=s.changed;o&&c&&this.enableTransitions(),this.visibleArea=a,this.coordinates=d,o&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var i=t.event,o=t.visibleArea,r=t.coefficient;if(i.type==="manipulateImage")return Y(Y({},i),{move:{left:i.move&&i.move.left?r*i.move.left:0,top:i.move&&i.move.top?r*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*r+o.left,top:i.scale.center.top*r+o.top}:null}});if(i.type==="resize"){var s=Y(Y({},i),{directions:Y({},i.directions)});return Vt.forEach(function(d){s.directions[d]*=r}),s}if(i.type==="move"){var a=Y(Y({},i),{directions:Y({},i.directions)});return Iw.forEach(function(d){a.directions[d]*=r}),a}return i}(ce(ce({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(d,c,u){var f=u.rotate,m=u.flip,h={width:c.naturalWidth,height:c.naturalHeight},w=yl(h,f),y=d.getContext("2d");d.height=w.height,d.width=w.width,y.save();var S=Xt(Ue(Y({left:0,top:0},h)),f);return y.translate(-(S.left-w.width/2),-(S.top-w.height/2)),y.rotate(f*Math.PI/180),y.translate(m.horizontal?h.width:0,m.vertical?h.height:0),y.scale(m.horizontal?-1:1,m.vertical?-1:1),y.drawImage(c,0,0,h.width,h.height),y.restore(),d}(this.$refs.sourceCanvas,t,this.imageTransforms):t,o=ce({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(d){return d.find(function(c){return u=c,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Ot({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(d,c,u,f,m){d.width=f?f.width:u.width,d.height=f?f.height:u.height;var h=d.getContext("2d");h.clearRect(0,0,d.width,d.height),m&&(m.imageSmoothingEnabled&&(h.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(h.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(h.fillStyle=m.fillColor,h.fillRect(0,0,d.width,d.height),h.save()));var w=u.left<0?-u.left:0,y=u.top<0?-u.top:0;h.drawImage(c,u.left+w,u.top+y,u.width,u.height,w*(d.width/u.width),y*(d.height/u.height),d.width,d.height)}(n,i,this.coordinates,s,o),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&t?Pw(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&t?ho(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Tw({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?Fw:_w);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=Hn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||zw,s=[o,function(a){var d=a.coordinates;return ce({},Hn(r)?r({coordinates:d,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,yn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var t=n.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,t=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:n.imageSize};if(Hn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(o):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,d=s.clientHeight,c=s.clientWidth,u=d,f=a.width*d/a.height;return f>c&&(f=c,u=a.height*c/a.width),{width:f,height:u}}(o):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=ce(ce({},this.defaultImageTransforms),{},{flip:ce({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,i,o,r,s,a,d=n.defaultVisibleArea||Ow;n.visibleArea=Hn(d)?d({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},i=t.visibleArea,o=t.boundaries,r=t.getAreaRestrictions,s=Y({},i),a=de(o),s.width/s.height!==a&&(s.height=s.width/a),qe(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ll(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],d={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},c=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!d.protocol&&!d.host&&!d.port||d.protocol&&d.protocol==s.protocol&&d.host&&d.host==s.host&&d.host&&c(d)==c(s))}(this.src)){var i=ze(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(n=this.src,new Promise(function(r){Xw(n).then(function(s){var a=Zw(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,i=n.source,o=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?al(i)||!ll(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],d=new Uint8Array(s);d.length>0;){var c=d.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),d=d.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,Hn(this.defaultTransforms)?this.appliedImageTransforms=Rr(this.defaultTransforms()):lo(this.defaultTransforms)?this.appliedImageTransforms=Rr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Rr({});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=ce(ce({},this.appliedImageTransforms),{},{flip:ce({},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(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:ho(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=t.sizeRestrictions,o=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(ce(ce({},t.getPublicProperties()),{},{positionRestrictions:ho(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,t.visibleArea.width),maxHeight:Math.min(i.maxHeight,t.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=t.transitions,o=i!==void 0&&i,r=t.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=Lw(ce(ce({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),d=a.visibleArea,c=a.coordinates;this.visibleArea=d,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,i=n.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:o})},getAspectRatio:function(n){var t,i,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var d=this.$refs.stencil.aspectRatios();t=d.minimum,i=d.maximum}if(ze(t)&&(t=ze(r)?s:r),ze(i)&&(i=ze(r)?a:r),!n&&(ze(t)||ze(i))){var c=this.getStencilSize(),u=c?de(c):null;ze(t)&&(t=cl(u)?u:void 0),ze(i)&&(i=cl(u)?u:void 0)}return{minimum:t,maximum:i}},getStencilSize:function(){if(this.stencilSize)return n={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=n.boundaries,i=n.stencilSize,o=n.aspectRatio,$r(de(r=Hn(i)?i({boundaries:t,aspectRatio:o}):i),o)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:de(r),maximum:de(r)}})),r;var n,t,i,o,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return ce({},hl)},flip:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=ce({},this.imageTransforms.flip),a=Hw({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()}),d=a.visibleArea,c=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=d,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var r=ce({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=vw({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,d=s.coordinates,c=this.processAutoZoom("rotateImage",a,d);a=c.visibleArea,d=c.coordinates,this.visibleArea=a,this.coordinates=d,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Kw={key:0,ref:"canvas",style:{display:"none"}},eb={key:1,ref:"sourceCanvas",style:{display:"none"}};Ml.render=function(n,t,i,o,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},i.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),i.canvas?(e.openBlock(),e.createBlock("canvas",Kw,null,512)):e.createCommentVNode("",!0),i.canvas?(e.openBlock(),e.createBlock("canvas",eb,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const tb={width:0,height:0,left:0,top:0};class zr{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",tb)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,i=0,o){const r=new zr;return r.src=t,r.ratio=i,r.id=o,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const nb={class:"cropper-wrapper"},ib={class:"row justify-end q-mt-md"},ob=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 i=n,o=t,r=e.ref(i.ratio),s=e.ref(zr.Create(i.src,i.ratio));s.value.setRatio(r.value);const a=e.ref(),d=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}]),c=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var h;o("crop",{blob:m,src:(h=f.canvas)==null?void 0:h.toDataURL()}),o("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",nb,[e.createVNode(so,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=h=>r.value=h),m[1]||(m[1]=h=>c(h))],clearable:!1,options:d.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(Ml),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=h=>s.value.setCoordinates(h.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",ib,[e.createVNode(oe,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),rb={class:"column items-center q-my-md"},sb={class:"uploader-content"},ab={class:"uploader-icon"},lb={class:"tools-button absolute-full column items-center justify-center"},cb={class:"row q-gutter-sm"},db=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 i=N.ClosePopup,o=n,r=t,s=e.ref(),a=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),d=e.ref(!1),c=e.ref(),u=e.ref(o.ratio),f=e.ref(""),m=e.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),h=e.computed(()=>({width:`${o.height*u.value}px`,height:`${o.height}px`,maxWidth:"100%"})),w=()=>{s.value=void 0,u.value=1,r("update:ratio",1),r("removeFile")},y=x=>{x.blob.src=x.src,o.fileInfo.setFile&&o.fileInfo.setFile(x.blob),o.fileInfo.fileSystemPath&&(s.value=o.fileInfo),d.value=!1,r("crop")},S=x=>{f.value=x.url,d.value=!0},E=x=>{if(x.length===0)return;const V=x[0];V.url=URL.createObjectURL(V),s.value=V,o.fileInfo.setFile&&o.fileInfo.setFile(V),o.withCrop&&S(s.value)};return e.watch(u,x=>{r("update:ratio",x)}),e.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(s.value=o.fileInfo,o.fileInfo.getFileUrl&&(s.value.url=o.fileInfo.getFileUrl()))}),(x,V)=>(e.openBlock(),e.createElementBlock("div",rb,[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(m))},[e.createVNode(e.unref(N.QImg),{src:e.unref(s).url,ratio:e.unref(u),class:"uploaded-image","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",lb,[e.createElementVNode("div",cb,[e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md",onClick:V[0]||(V[0]=k=>S(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...V[5]||(V[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(oe,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md",onClick:w},{default:e.withCtx(()=>[e.createVNode(mt,null,{default:e.withCtx(()=>[...V[6]||(V[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(N.QUploader),{key:0,id:e.unref(a),ref_key:"uploader",ref:c,class:"img-uploader",style:e.normalizeStyle(e.unref(h)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:E,onRemoved:w},{header:e.withCtx(()=>[e.createElementVNode("div",sb,[e.createVNode(e.unref(N.QUploaderAddTrigger)),e.createElementVNode("div",ab,[e.createVNode(e.unref(N.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),V[4]||(V[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(cn,{modelValue:e.unref(d),"onUpdate:modelValue":V[3]||(V[3]=k=>e.isRef(d)?d.value=k:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.QSpace)),e.withDirectives(e.createVNode(oe,{icon:"close",flat:"",round:"",dense:""},null,512),[[e.unref(i)]])]),_:1}),e.createVNode(e.unref(N.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(ob,{ratio:e.unref(u),"onUpdate:ratio":V[1]||(V[1]=k=>e.isRef(u)?u.value=k:null),src:e.unref(f),onCrop:y,onClose:V[2]||(V[2]=k=>d.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),[["__scopeId","data-v-52f912c6"]]);function ub(n){n.component("PMenuTabs",uw),n.component("PUploaderFile",Cw),n.component("PUploaderImage",db),n.component("PAuthForm",il),n.component("PAuthModal",cw),n.component("PNameEdit",mw)}const fb={install:function(n){E1(n),aw(n),f0(n),ub(n),Zy(n),La(n),pa(n)}};function mb(n,t={}){const{quasarPlugins:i=!0}=t;i&&n.use(N.Quasar,{plugins:{Notify:N.Notify,Dialog:N.Dialog}}),fb.install(n)}class hb extends Bi{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Zr);l(this,"method",xn.Login);l(this,"id","field-auth-login")}}const pb=["PF","PFM"],gb=z(e.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(n,{emit:t}){const i=t,o=ExtractsStore.Item,r=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([o]),i("create")};return(s,a)=>{const d=e.resolveComponent("PInput"),c=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(d,{modelValue:e.unref(o).name,"onUpdate:modelValue":a[0]||(a[0]=u=>e.unref(o).name=u)},null,8,["modelValue"]),e.createVNode(c,{text:"Создать",onClick:r})],64)}}}),[["__scopeId","data-v-acdf750a"]]),yb=Object.freeze(Object.defineProperty({__proto__:null,default:z(e.defineComponent({__name:"ExtractsList",setup(n){const t=e.ref(!1),i=e.ref(!1),o=async()=>{i.value=!0},r=async()=>{await Promise.all([o()])},s=()=>{t.value=!t.value};return P.H.Hooks.onBeforeMount(r),(a,d)=>{const c=gb,u=e.resolveComponent("PModal");return e.unref(t)?(e.openBlock(),e.createBlock(u,{key:0,show:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(c,{onCreate:s})]),_:1},8,["show"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));L.AuthButtonLogin=ko,L.AuthButtonRefresh=Yr,L.AuthButtonRegister=xo,L.AuthButtonRestore=Ei,L.AuthChunks=Fe,L.AuthFieldsIds=At,L.AuthFormSettings=Kr,L.AuthMethods=xn,L.EmailField=Ni,L.LoginField=hb,L.PAddDialog=Ja,L.PBadge=ai,L.PButton=oe,L.PCard=Ka,L.PCheckBox=va,L.PChip=Ha,L.PContactForm=nr,L.PContactFormDeleteDialog=li,L.PContactFormEdit=ir,L.PContactFormEditDialog=ci,L.PContactFormEditEmails=or,L.PContactFormEditPhones=rr,L.PContactFormView=sr,L.PContactFormViewEmails=dn,L.PContactFormViewPhones=un,L.PCrudList=el,L.PDateInput=ro,L.PDateTimeInput=Ua,L.PDialog=cn,L.PEditDialog=tl,L.PF=P,L.PFM=Kg,L.PHint=br,L.PInput=ot,L.POptionsListSingle=qa,L.POpts=ja,L.PSelect=so,L.PTableToggle=Wa,L.PTabs=yr,L.PTabsLeft=wr,L.PToggle=Ga,L.PasswordField=$i,L.PasswordRepeatField=Jr,L.Schedule=mi,L.ScheduleDay=no,L.ScheduleDefaultLabels=gr,L.ScheduleGridEditor=Fa,L.SchedulePlace=Ln,L.ScheduleSession=On,L.ScheduleSlot=Ft,L.ScheduleTimeline=Oa,L.TabsStore=io,L.defaultContactsLabels=$t,L.installSprof=mb,L.pfName=pb,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});