sprof 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(p,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(p=typeof globalThis<"u"?globalThis:p||self,i(p.sprof={},p.Vue))})(this,function(p,i){"use strict";var Dm=Object.defineProperty;var Fm=(p,i,he)=>i in p?Dm(p,i,{enumerable:!0,configurable:!0,writable:!0,value:he}):p[i]=he;var d=(p,i,he)=>Fm(p,typeof i!="symbol"?i+"":i,he);var Se;var he=typeof document<"u"?document.currentScript:null;const ma=[...["Auth","AuthFormSettings","EmailField","LoginField","PasswordField","PasswordRepeatField","AuthFormSettings","AuthFormSettingsType","AuthFormStatuses","AuthButtonLogin","AuthButtonRegister"]],pa={key:0,class:"mainblock"},ga={class:"mainblock-right"},ya={class:"title"},wa={class:"body"},ba=i.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!0),r=i.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return i.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}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",pa,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,maxWidth:i.unref(r)?"100%":t.menuWidth,marginLeft:i.unref(r)?"-110%":"0",position:i.unref(r)?"fixed":"relative",top:i.unref(r)?"140px":""})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(r)?"auto":t.menuWidth,boxShadow:i.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!i.unref(o)&&i.unref(r)?"110%":"0",borderTopLeftRadius:i.unref(r)?"0":"",borderBottomLeftRadius:i.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",ga,[i.createElementVNode("div",ya,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",wa,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])])):i.createCommentVNode("",!0)],64))}}),v=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Zi=v(ba,[["__scopeId","data-v-7b0ea2a1"]]),Sa={class:"mainblock-right"},Ca={class:"body"},Ji=v(i.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(t){const e=t,n=i.ref(!1),o=i.ref(!0),r=i.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return i.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}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mainblock",style:i.normalizeStyle({display:i.unref(r)?"block":"flex"})},[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,display:t.leftWidth!=="0px"?"flex":"none",top:i.unref(r)?"58px":"80px"})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,boxShadow:i.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!i.unref(o)&&i.unref(r),"0"),overflowX:i.unref(r)?"scroll":"hidden",display:i.unref(r)?"flex":"block",background:i.unref(r)?"#ffffff":"",overflowY:i.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",Sa,[i.createElementVNode("div",{class:"title",style:i.normalizeStyle({position:t.titleSticky?"sticky":"relative",top:t.titleSticky?i.unref(r)?"108px":"58px":"0",zIndex:t.titleSticky?"10":""})},[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)],4),i.createElementVNode("div",Ca,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-aa16a0ab"]]);class Ie{static Shuffle(e){for(let n=e.length-1;n>0;n--){const o=Math.floor(Math.random()*(n+1));[e[n],e[o]]=[e[o],e[n]]}}static GenerateNumsRange(e,n,o=1){return Array.from({length:(n-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((n,o)=>n.order=o)}static Refill(e,n){e.splice(0,e.length),e.push(...n)}static Eq(e,n){return e.length===n.length&&(e==null?void 0:e.every((o,r)=>e[r]==n[r]))}static SwipeById(e,n,o){const r=e.findIndex(a=>n.id===a.id),s=e.findIndex(a=>o.id===a.id);r||s||([e[r],e[s]]=[e[s],e[r]])}static Swap(e,n,o){if(n<0||n>=e.length||o<0||o>=e.length)return;const r=e[n];e[n]=e[o],e[o]=r}}var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(p,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(p=typeof globalThis<"u"?globalThis:p||self,i(p.sprof={},p.Vue))})(this,function(p,i){"use strict";var Fm=Object.defineProperty;var Om=(p,i,he)=>i in p?Fm(p,i,{enumerable:!0,configurable:!0,writable:!0,value:he}):p[i]=he;var d=(p,i,he)=>Om(p,typeof i!="symbol"?i+"":i,he);var Se;var he=typeof document<"u"?document.currentScript:null;const ma=[...["Auth","AuthFormSettings","EmailField","LoginField","PasswordField","PasswordRepeatField","AuthFormSettings","AuthFormSettingsType","AuthFormStatuses","AuthButtonLogin","AuthButtonRegister"]],pa={key:0,class:"mainblock"},ga={class:"mainblock-right"},ya={class:"title"},wa={class:"body"},ba=i.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!0),r=i.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return i.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}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",pa,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,maxWidth:i.unref(r)?"100%":t.menuWidth,marginLeft:i.unref(r)?"-110%":"0",position:i.unref(r)?"fixed":"relative",top:i.unref(r)?"140px":""})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(r)?"auto":t.menuWidth,boxShadow:i.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!i.unref(o)&&i.unref(r)?"110%":"0",borderTopLeftRadius:i.unref(r)?"0":"",borderBottomLeftRadius:i.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",ga,[i.createElementVNode("div",ya,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",wa,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])])):i.createCommentVNode("",!0)],64))}}),v=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Zi=v(ba,[["__scopeId","data-v-7b0ea2a1"]]),Sa={class:"mainblock-right"},Ca={class:"body"},Ji=v(i.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(t){const e=t,n=i.ref(!1),o=i.ref(!0),r=i.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{o.value=!o.value};return i.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}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mainblock",style:i.normalizeStyle({display:i.unref(r)?"block":"flex"})},[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,display:t.leftWidth!=="0px"?"flex":"none",top:i.unref(r)?"58px":"80px"})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(r)?"100%":t.menuWidth,boxShadow:i.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!i.unref(o)&&i.unref(r),"0"),overflowX:i.unref(r)?"scroll":"hidden",display:i.unref(r)?"flex":"block",background:i.unref(r)?"#ffffff":"",overflowY:i.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",Sa,[i.createElementVNode("div",{class:"title",style:i.normalizeStyle({position:t.titleSticky?"sticky":"relative",top:t.titleSticky?i.unref(r)?"108px":"58px":"0",zIndex:t.titleSticky?"10":""})},[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)],4),i.createElementVNode("div",Ca,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-aa16a0ab"]]);class Ie{static Shuffle(e){for(let n=e.length-1;n>0;n--){const o=Math.floor(Math.random()*(n+1));[e[n],e[o]]=[e[o],e[n]]}}static GenerateNumsRange(e,n,o=1){return Array.from({length:(n-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((n,o)=>n.order=o)}static Refill(e,n){e.splice(0,e.length),e.push(...n)}static Eq(e,n){return e.length===n.length&&(e==null?void 0:e.every((o,r)=>e[r]==n[r]))}static SwipeById(e,n,o){const r=e.findIndex(a=>n.id===a.id),s=e.findIndex(a=>o.id===a.id);r||s||([e[r],e[s]]=[e[s],e[r]])}static Swap(e,n,o){if(n<0||n>=e.length||o<0||o>=e.length)return;const r=e[n];e[n]=e[o],e[o]=r}}var Xi=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,11 +11,11 @@
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 Yi;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof Xi=="object"?Xi:typeof self=="object"?self:typeof this=="object"?this:c(),o=r(t);typeof n.Reflect<"u"&&(o=r(n.Reflect,o)),e(o,n),typeof n.Reflect>"u"&&(n.Reflect=t);function r(l,u){return function(h,f){Object.defineProperty(l,h,{configurable:!0,writable:!0,value:f}),u&&u(h,f)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(e,n){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,h={create:c?function(){return Gi(Object.create(null))}:l?function(){return Gi({__proto__:null})}:function(){return Gi({})},has:u?function(w,S){return o.call(w,S)}:function(w,S){return S in w},get:u?function(w,S){return o.call(w,S)?w[S]:void 0}:function(w,S){return w[S]}},f=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Vm(),y=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Pm(),g=typeof WeakMap=="function"?WeakMap:zm(),E=r?Symbol.for("@reflect-metadata:registry"):void 0,b=$m(),x=Am(b);function F(w,S,k,M){if(T(k)){if(!ra(w))throw new TypeError;if(!sa(S))throw new TypeError;return km(w,S)}else{if(!ra(w))throw new TypeError;if(!ee(S))throw new TypeError;if(!ee(M)&&!T(M)&&!bt(M))throw new TypeError;return bt(M)&&(M=void 0),k=Le(k),Em(w,S,k,M)}}e("decorate",F);function O(w,S){function k(M,P){if(!ee(M))throw new TypeError;if(!T(P)&&!Nm(P))throw new TypeError;ea(w,S,M,P)}return k}e("metadata",O);function L(w,S,k,M){if(!ee(k))throw new TypeError;return T(M)||(M=Le(M)),ea(w,S,k,M)}e("defineMetadata",L);function z(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=Le(k)),Ys(w,S,k)}e("hasMetadata",z);function Ce(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=Le(k)),qi(w,S,k)}e("hasOwnMetadata",Ce);function Be(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=Le(k)),Qs(w,S,k)}e("getMetadata",Be);function Ge(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=Le(k)),Ks(w,S,k)}e("getOwnMetadata",Ge);function wt(w,S){if(!ee(w))throw new TypeError;return T(S)||(S=Le(S)),ta(w,S)}e("getMetadataKeys",wt);function Mn(w,S){if(!ee(w))throw new TypeError;return T(S)||(S=Le(S)),na(w,S)}e("getOwnMetadataKeys",Mn);function Cm(w,S,k){if(!ee(S))throw new TypeError;if(T(k)||(k=Le(k)),!ee(S))throw new TypeError;T(k)||(k=Le(k));var M=Ft(S,k,!1);return T(M)?!1:M.OrdinaryDeleteMetadata(w,S,k)}e("deleteMetadata",Cm);function km(w,S){for(var k=w.length-1;k>=0;--k){var M=w[k],P=M(S);if(!T(P)&&!bt(P)){if(!sa(P))throw new TypeError;S=P}}return S}function Em(w,S,k,M){for(var P=w.length-1;P>=0;--P){var ie=w[P],te=ie(S,k,M);if(!T(te)&&!bt(te)){if(!ee(te))throw new TypeError;M=te}}return M}function Ys(w,S,k){var M=qi(w,S,k);if(M)return!0;var P=Wi(S);return bt(P)?!1:Ys(w,P,k)}function qi(w,S,k){var M=Ft(S,k,!1);return T(M)?!1:oa(M.OrdinaryHasOwnMetadata(w,S,k))}function Qs(w,S,k){var M=qi(w,S,k);if(M)return Ks(w,S,k);var P=Wi(S);if(!bt(P))return Qs(w,P,k)}function Ks(w,S,k){var M=Ft(S,k,!1);if(!T(M))return M.OrdinaryGetOwnMetadata(w,S,k)}function ea(w,S,k,M){var P=Ft(k,M,!0);P.OrdinaryDefineOwnMetadata(w,S,k,M)}function ta(w,S){var k=na(w,S),M=Wi(w);if(M===null)return k;var P=ta(M,S);if(P.length<=0)return k;if(k.length<=0)return P;for(var ie=new y,te=[],H=0,N=k;H<N.length;H++){var R=N[H],$=ie.has(R);$||(ie.add(R),te.push(R))}for(var I=0,U=P;I<U.length;I++){var R=U[I],$=ie.has(R);$||(ie.add(R),te.push(R))}return te}function na(w,S){var k=Ft(w,S,!1);return k?k.OrdinaryOwnMetadataKeys(w,S):[]}function ia(w){if(w===null)return 1;switch(typeof w){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return w===null?1:6;default:return 6}}function T(w){return w===void 0}function bt(w){return w===null}function vm(w){return typeof w=="symbol"}function ee(w){return typeof w=="object"?w!==null:typeof w=="function"}function Mm(w,S){switch(ia(w)){case 0:return w;case 1:return w;case 2:return w;case 3:return w;case 4:return w;case 5:return w}var k="string",M=aa(w,s);if(M!==void 0){var P=M.call(w,k);if(ee(P))throw new TypeError;return P}return Bm(w)}function Bm(w,S){var k,M;{var P=w.toString;if(Bn(P)){var M=P.call(w);if(!ee(M))return M}var k=w.valueOf;if(Bn(k)){var M=k.call(w);if(!ee(M))return M}}throw new TypeError}function oa(w){return!!w}function xm(w){return""+w}function Le(w){var S=Mm(w);return vm(S)?S:xm(S)}function ra(w){return Array.isArray?Array.isArray(w):w instanceof Object?w instanceof Array:Object.prototype.toString.call(w)==="[object Array]"}function Bn(w){return typeof w=="function"}function sa(w){return typeof w=="function"}function Nm(w){switch(ia(w)){case 3:return!0;case 4:return!0;default:return!1}}function Ui(w,S){return w===S||w!==w&&S!==S}function aa(w,S){var k=w[S];if(k!=null){if(!Bn(k))throw new TypeError;return k}}function la(w){var S=aa(w,a);if(!Bn(S))throw new TypeError;var k=S.call(w);if(!ee(k))throw new TypeError;return k}function ca(w){return w.value}function da(w){var S=w.next();return S.done?!1:S}function ua(w){var S=w.return;S&&S.call(w)}function Wi(w){var S=Object.getPrototypeOf(w);if(typeof w!="function"||w===f||S!==f)return S;var k=w.prototype,M=k&&Object.getPrototypeOf(k);if(M==null||M===Object.prototype)return S;var P=M.constructor;return typeof P!="function"||P===w?S:P}function Rm(){var w;!T(E)&&typeof n.Reflect<"u"&&!(E in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(w=Im(n.Reflect));var S,k,M,P=new g,ie={registerProvider:te,getProvider:N,setProvider:$};return ie;function te(I){if(!Object.isExtensible(ie))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case w===I:break;case T(S):S=I;break;case S===I:break;case T(k):k=I;break;case k===I:break;default:M===void 0&&(M=new y),M.add(I);break}}function H(I,U){if(!T(S)){if(S.isProviderFor(I,U))return S;if(!T(k)){if(k.isProviderFor(I,U))return S;if(!T(M))for(var Z=la(M);;){var J=da(Z);if(!J)return;var Ae=ca(J);if(Ae.isProviderFor(I,U))return ua(Z),Ae}}}if(!T(w)&&w.isProviderFor(I,U))return w}function N(I,U){var Z=P.get(I),J;return T(Z)||(J=Z.get(U)),T(J)&&(J=H(I,U),T(J)||(T(Z)&&(Z=new m,P.set(I,Z)),Z.set(U,J))),J}function R(I){if(T(I))throw new TypeError;return S===I||k===I||!T(M)&&M.has(I)}function $(I,U,Z){if(!R(Z))throw new Error("Metadata provider not registered.");var J=N(I,U);if(J!==Z){if(!T(J))return!1;var Ae=P.get(I);T(Ae)&&(Ae=new m,P.set(I,Ae)),Ae.set(U,Z)}return!0}}function $m(){var w;return!T(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&(w=n.Reflect[E]),T(w)&&(w=Rm()),!T(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,E,{enumerable:!1,configurable:!1,writable:!1,value:w}),w}function Am(w){var S=new g,k={isProviderFor:function(R,$){var I=S.get(R);return T(I)?!1:I.has($)},OrdinaryDefineOwnMetadata:te,OrdinaryHasOwnMetadata:P,OrdinaryGetOwnMetadata:ie,OrdinaryOwnMetadataKeys:H,OrdinaryDeleteMetadata:N};return b.registerProvider(k),k;function M(R,$,I){var U=S.get(R),Z=!1;if(T(U)){if(!I)return;U=new m,S.set(R,U),Z=!0}var J=U.get($);if(T(J)){if(!I)return;if(J=new m,U.set($,J),!w.setProvider(R,$,k))throw U.delete($),Z&&S.delete(R),new Error("Wrong provider for target.")}return J}function P(R,$,I){var U=M($,I,!1);return T(U)?!1:oa(U.has(R))}function ie(R,$,I){var U=M($,I,!1);if(!T(U))return U.get(R)}function te(R,$,I,U){var Z=M(I,U,!0);Z.set(R,$)}function H(R,$){var I=[],U=M(R,$,!1);if(T(U))return I;for(var Z=U.keys(),J=la(Z),Ae=0;;){var ha=da(J);if(!ha)return I.length=Ae,I;var Tm=ca(ha);try{I[Ae]=Tm}catch(Lm){try{ua(J)}finally{throw Lm}}Ae++}}function N(R,$,I){var U=M($,I,!1);if(T(U)||!U.delete(R))return!1;if(U.size===0){var Z=S.get($);T(Z)||(Z.delete(I),Z.size===0&&S.delete(Z))}return!0}}function Im(w){var S=w.defineMetadata,k=w.hasOwnMetadata,M=w.getOwnMetadata,P=w.getOwnMetadataKeys,ie=w.deleteMetadata,te=new g,H={isProviderFor:function(N,R){var $=te.get(N);return!T($)&&$.has(R)?!0:P(N,R).length?(T($)&&($=new y,te.set(N,$)),$.add(R),!0):!1},OrdinaryDefineOwnMetadata:S,OrdinaryHasOwnMetadata:k,OrdinaryGetOwnMetadata:M,OrdinaryOwnMetadataKeys:P,OrdinaryDeleteMetadata:ie};return H}function Ft(w,S,k){var M=b.getProvider(w,S);if(!T(M))return M;if(k){if(b.setProvider(w,S,x))return x;throw new Error("Illegal state.")}}function Vm(){var w={},S=[],k=function(){function H(N,R,$){this._index=0,this._keys=N,this._values=R,this._selector=$}return H.prototype["@@iterator"]=function(){return this},H.prototype[a]=function(){return this},H.prototype.next=function(){var N=this._index;if(N>=0&&N<this._keys.length){var R=this._selector(this._keys[N],this._values[N]);return N+1>=this._keys.length?(this._index=-1,this._keys=S,this._values=S):this._index++,{value:R,done:!1}}return{value:void 0,done:!0}},H.prototype.throw=function(N){throw this._index>=0&&(this._index=-1,this._keys=S,this._values=S),N},H.prototype.return=function(N){return this._index>=0&&(this._index=-1,this._keys=S,this._values=S),{value:N,done:!0}},H}(),M=function(){function H(){this._keys=[],this._values=[],this._cacheKey=w,this._cacheIndex=-2}return Object.defineProperty(H.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),H.prototype.has=function(N){return this._find(N,!1)>=0},H.prototype.get=function(N){var R=this._find(N,!1);return R>=0?this._values[R]:void 0},H.prototype.set=function(N,R){var $=this._find(N,!0);return this._values[$]=R,this},H.prototype.delete=function(N){var R=this._find(N,!1);if(R>=0){for(var $=this._keys.length,I=R+1;I<$;I++)this._keys[I-1]=this._keys[I],this._values[I-1]=this._values[I];return this._keys.length--,this._values.length--,Ui(N,this._cacheKey)&&(this._cacheKey=w,this._cacheIndex=-2),!0}return!1},H.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=w,this._cacheIndex=-2},H.prototype.keys=function(){return new k(this._keys,this._values,P)},H.prototype.values=function(){return new k(this._keys,this._values,ie)},H.prototype.entries=function(){return new k(this._keys,this._values,te)},H.prototype["@@iterator"]=function(){return this.entries()},H.prototype[a]=function(){return this.entries()},H.prototype._find=function(N,R){if(!Ui(this._cacheKey,N)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(Ui(this._keys[$],N)){this._cacheIndex=$;break}}return this._cacheIndex<0&&R&&(this._cacheIndex=this._keys.length,this._keys.push(N),this._values.push(void 0)),this._cacheIndex},H}();return M;function P(H,N){return H}function ie(H,N){return N}function te(H,N){return[H,N]}}function Pm(){var w=function(){function S(){this._map=new m}return Object.defineProperty(S.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),S.prototype.has=function(k){return this._map.has(k)},S.prototype.add=function(k){return this._map.set(k,k),this},S.prototype.delete=function(k){return this._map.delete(k)},S.prototype.clear=function(){this._map.clear()},S.prototype.keys=function(){return this._map.keys()},S.prototype.values=function(){return this._map.keys()},S.prototype.entries=function(){return this._map.entries()},S.prototype["@@iterator"]=function(){return this.keys()},S.prototype[a]=function(){return this.keys()},S}();return w}function zm(){var w=16,S=h.create(),k=M();return function(){function N(){this._key=M()}return N.prototype.has=function(R){var $=P(R,!1);return $!==void 0?h.has($,this._key):!1},N.prototype.get=function(R){var $=P(R,!1);return $!==void 0?h.get($,this._key):void 0},N.prototype.set=function(R,$){var I=P(R,!0);return I[this._key]=$,this},N.prototype.delete=function(R){var $=P(R,!1);return $!==void 0?delete $[this._key]:!1},N.prototype.clear=function(){this._key=M()},N}();function M(){var N;do N="@@WeakMap@@"+H();while(h.has(S,N));return S[N]=!0,N}function P(N,R){if(!o.call(N,k)){if(!R)return;Object.defineProperty(N,k,{value:h.create()})}return N[k]}function ie(N,R){for(var $=0;$<R;++$)N[$]=Math.random()*255|0;return N}function te(N){if(typeof Uint8Array=="function"){var R=new Uint8Array(N);return typeof crypto<"u"?crypto.getRandomValues(R):typeof msCrypto<"u"?msCrypto.getRandomValues(R):ie(R,N),R}return ie(new Array(N),N)}function H(){var N=te(w);N[6]=N[6]&79|64,N[8]=N[8]&191|128;for(var R="",$=0;$<w;++$){var I=N[$];($===4||$===6||$===8)&&(R+="-"),I<16&&(R+="0"),R+=I.toString(16).toLowerCase()}return R}}function Gi(w){return w.__=void 0,delete w.__,w}})})(Yi||(Yi={}));let Ot;const ka=new Uint8Array(16);function Ea(){if(!Ot&&(Ot=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ot))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ot(ka)}const oe=[];for(let t=0;t<256;++t)oe.push((t+256).toString(16).slice(1));function va(t,e=0){return oe[t[e+0]]+oe[t[e+1]]+oe[t[e+2]]+oe[t[e+3]]+"-"+oe[t[e+4]]+oe[t[e+5]]+"-"+oe[t[e+6]]+oe[t[e+7]]+"-"+oe[t[e+8]]+oe[t[e+9]]+"-"+oe[t[e+10]]+oe[t[e+11]]+oe[t[e+12]]+oe[t[e+13]]+oe[t[e+14]]+oe[t[e+15]]}const Qi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ke(t,e,n){if(Qi.randomUUID&&!e&&!t)return Qi.randomUUID();t=t||{};const o=t.random||(t.rng||Ea)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,va(o)}const it=class it{static BuildClass(e,n){n&&Object.keys(n).forEach(o=>{const r=n[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)){const s=Reflect.getMetadata(o,e);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,n,o){it.RemoveFromClass(e,n,o)}static RemoveFromClassById(e,n,o){if(!e)return;const r=n.findIndex(s=>s.id===e);it.RemoveFromClass(r,n,o)}static RemoveFromClass(e,n,o){if(e<0)return;const r=n[e].id;r&&o&&o.push(r),n.splice(e,1)}static GetPropertyName(e){const n=new e;return new Proxy(n,{get(o,r){return r}})}static CreateUUID(){return ke()}static InitClassInstance(e,n){const o=e.constructor(n);return it.BuildClass(o),o.id=it.CreateUUID(),o}static ExistsWithId(e,n){return e.some(o=>o.id===n)}};d(it,"GetClassConstructor",e=>(n,o)=>{const r=Reflect.getMetadata(`property:${o}`,n)||{};r[o]=e,Reflect.defineMetadata(o,r,n)});let B=it;const Ma={class:"item"},Ba={class:"move"},xa={class:"item-tools"},Na=["onClick"],Ra={class:"item-description"},$a=["onUpdate:modelValue"],Ki=v(i.defineComponent({__name:"AdminGallery",props:{fileList:{type:Array,reguired:!0,default:()=>[]},fileListForDelete:{type:Array,default:()=>[]},defaultRatio:{type:Number,required:!1,default:1},upload:{type:Boolean,required:!1,default:!0}},emits:["addImage","ratio","remove"],setup(t,{emit:e}){const n=t,o=e,r=async a=>{o("addImage",a)},s=async a=>{B.RemoveFromClassById(a.id,n.fileList,[]),o("remove",a)};return(a,c)=>{const l=i.resolveComponent("UploderImage"),u=i.resolveComponent("draggable"),h=i.resolveComponent("Move");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(u,{class:"groups",list:t.fileList,"item-key":"id",handle:".move",onEnd:c[0]||(c[0]=f=>i.unref(Ie).Sort(t.fileList))},{item:i.withCtx(({element:f,index:m})=>[i.createElementVNode("div",Ma,[i.createElementVNode("div",Ba,[i.createElementVNode("div",xa,[c[1]||(c[1]=i.createElementVNode("svg",{class:"icon-move"},[i.createElementVNode("use",{"xlink:href":"#move"})],-1)),i.createElementVNode("button",{class:"admin-del2",onClick:i.withModifiers(y=>s(f),["prevent"])},"Удалить",8,Na)]),i.createVNode(l,{"file-info":f,height:150,"default-ratio":t.defaultRatio,onRemoveFile:y=>i.unref(B).RemoveFromClassByIndex(m,t.fileList,t.fileListForDelete),onCrop:y=>r(f)},null,8,["file-info","default-ratio","onRemoveFile","onCrop"])]),i.createElementVNode("div",Ra,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":y=>f.description=y,class:"item-description-form",placeholder:"..."},null,8,$a),[[i.vModelText,f.description]])])])]),_:1},8,["list"]),i.createVNode(h)],64)}}}),[["__scopeId","data-v-e3825d60"]]);class q{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static ToCamelCase(e){const n=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(n).map((r,s)=>s===0?r.toLowerCase():q.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,n,o){return e.substring(e.indexOf(n)+2,e.lastIndexOf(o))}static Translit(e,n){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 n&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(c=>o[c]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const n=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(n,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,n){const o=e.toLowerCase().replaceAll(/\s/g,""),r=n.toLowerCase().replaceAll(/\s/g,""),s=q.Translit(o),a=q.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,n){return q.StringsEquals(e,n)}static FormatToPercentage(e){return`${e}%`}static WrapSubStr(e,n){const o=new RegExp(q.GetVariants(n).join("|"),"gi");return e.replace(o,`<span class="search-text">${n}</span>`)}static GetVariants(e){const n=q.Translit(e);return[e,q.Capitalize(e),e.toLowerCase(),e.toUpperCase(),n,q.Capitalize(n),n.toLowerCase(),n.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static CreateGuid(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static JoinSnake(...e){return e.join("_")}}var xn=(t=>(t.XS="xs",t.S="s",t.M="m",t.L="l",t.XL="xl",t))(xn||{}),le=(t=>(t.Primary="primary",t.Success="success",t.Warning="warning",t.Error="error",t.Info="info",t))(le||{});const Aa="p-button",Ia=i.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:xn.M,required:!1},type:{type:String,default:le.Primary,required:!1},fontSize:{type:String,default:"",required:!1}},emits:["click"],setup(t,{emit:e}){const n=t,o=e,r=()=>{o("click")},s=i.computed(()=>q.JoinSnake(Aa,n.skin)),a=i.computed(()=>q.JoinSnake(s.value,n.type)),c=i.computed(()=>q.JoinSnake(s.value,n.size)),l=i.computed(()=>[s.value,a.value,c.value]);return(u,h)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(u.$attrs,{style:{margin:t.margin,padding:t.padding,maxWidth:t.width,minWidth:t.width,minHeight:t.height,maxHeight:t.height,fontSize:t.fontSize},class:i.unref(l),onClick:i.withModifiers(r,["prevent"])}),[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createTextVNode(" "+i.toDisplayString(t.text),1)],16))}}),fe=v(Ia,[["__scopeId","data-v-215d8f27"]]),Nn=v(i.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.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-ef4acbe9"]]),Va=["value"],Rn=v(i.defineComponent({__name:"PCheckBox",props:i.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:"14px"},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"22px"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:i.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=i.useModel(t,"modelValue"),o=e,r=()=>{o("change",n.value)};return(s,a)=>{const c=Nn;return i.openBlock(),i.createElementBlock("div",{id:"some",class:"check-line",style:i.normalizeStyle({padding:t.padding,margin:t.margin,maxWidth:t.width})},[i.createElementVNode("label",{class:"check-field__label",style:i.normalizeStyle({fontSize:t.fontSize})},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),class:"check-field__input",type:"checkbox",value:t.value,onChange:r},null,40,Va),[[i.vModelCheckbox,n.value]]),i.createElementVNode("div",{id:"abc",class:"box",style:i.normalizeStyle({width:t.size,height:t.size,borderRadius:t.borderRadius})},[n.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"check-icon",style:i.normalizeStyle({width:t.size,height:t.size})},[i.createVNode(c,{margin:"auto",size:t.size},null,8,["size"])],4)):i.createCommentVNode("",!0)],4),i.createTextVNode(" "+i.toDisplayString(t.label),1)],4)],4)}}}),[["__scopeId","data-v-5d8bdbbf"]]),Pa=["for"],za={class:"field"},Ta={class:"left-field"},La=["id","value","name"],Da={class:"right-field"},eo=v(i.defineComponent({__name:"PDatePicker",props:i.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:i.mergeModels(["blur","input"],["update:modelValue"]),setup(t,{emit:e}){const n=e,o=i.useModel(t,"modelValue"),r=a=>{const l=a.target.valueAsDate;l?(o.value=l,n("input",s(o.value))):(o.value=null,n("input",null))},s=a=>a?new Date(a.getTime()-a.getTimezoneOffset()*60*1e3).toISOString().split("T")[0]:"";return(a,c)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Pa)):i.createCommentVNode("",!0),i.createElementVNode("div",za,[i.createElementVNode("div",Ta,[i.renderSlot(a.$slots,"default",{},void 0,!0)]),i.createElementVNode("input",{id:t.label,max:"2100",min:"1900",value:s(o.value),class:"text-field__input",type:"date",name:t.label,onInput:r},null,40,La),i.createElementVNode("div",Da,[i.renderSlot(a.$slots,"right",{},void 0,!0)])])],4))}}),[["__scopeId","data-v-b77c7363"]]),$n=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"flex-line",style:i.normalizeStyle({margin:t.margin,padding:t.padding,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,height:t.height,justifyContent:t.justifyContent,background:t.background,alignItems:t.alignItems})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6c788e9a"]]);var Fa=Object.defineProperty,Oa=(t,e,n)=>e in t?Fa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_t=(t,e,n)=>Oa(t,typeof e!="symbol"?e+"":e,n);const to={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},no=(t,e,n)=>t.replaceAll(e,"").replace(n,".").replace("..",".").replace(/[^.\d]/g,""),io=(t,e,n)=>{var o;return new Intl.NumberFormat(((o=n.number)==null?void 0:o.locale)??"en",{minimumFractionDigits:t,maximumFractionDigits:e,roundingMode:"trunc"})},_a=(t,e=!0,n)=>{var o,r,s,a;const c=((o=n.number)==null?void 0:o.unsigned)==null&&t.startsWith("-")?"-":"",l=((r=n.number)==null?void 0:r.fraction)??0;let u=io(0,l,n);const h=u.formatToParts(1000.12),f=((s=h.find(b=>b.type==="group"))==null?void 0:s.value)??" ",m=((a=h.find(b=>b.type==="decimal"))==null?void 0:a.value)??".",y=no(t,f,m);if(Number.isNaN(parseFloat(y)))return c;const g=y.split(".");if(g[1]!=null&&g[1].length>=1){const b=g[1].length<=l?g[1].length:l;u=io(b,l,n)}let E=u.format(parseFloat(y));return e?l>0&&y.endsWith(".")&&!y.slice(0,-1).includes(".")&&(E+=m):E=no(E,f,m),c+E};let Ha=class{constructor(e={}){_t(this,"opts",{}),_t(this,"memo",new Map);const n={...e};if(n.tokens!=null){n.tokens=n.tokensReplace?{...n.tokens}:{...to,...n.tokens};for(const o of Object.values(n.tokens))typeof o.pattern=="string"&&(o.pattern=new RegExp(o.pattern))}else n.tokens=to;Array.isArray(n.mask)&&(n.mask.length>1?n.mask=[...n.mask].sort((o,r)=>o.length-r.length):n.mask=n.mask[0]??""),n.mask===""&&(n.mask=null),this.opts=n}masked(e){return this.process(e,this.findMask(e))}unmasked(e){return this.process(e,this.findMask(e),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const n=this.findMask(e);if(this.opts.mask==null||n==null)return!1;const o=this.process(e,n).length;return typeof this.opts.mask=="string"?o>=this.opts.mask.length:o>=n.length}findMask(e){const n=this.opts.mask;if(n==null)return null;if(typeof n=="string")return n;if(typeof n=="function")return n(e);const o=this.process(e,n.slice(-1).pop()??"",!1);return n.find(r=>this.process(e,r,!1).length>=o.length)??""}escapeMask(e){const n=[],o=[];return e.split("").forEach((r,s)=>{r==="!"&&e[s-1]!=="!"?o.push(s-o.length):n.push(r)}),{mask:n.join(""),escaped:o}}process(e,n,o=!0){if(this.opts.number!=null)return _a(e,o,this.opts);if(n==null)return e;const r=`v=${e},mr=${n},m=${o?1:0}`;if(this.memo.has(r))return this.memo.get(r);const{mask:s,escaped:a}=this.escapeMask(n),c=[],l=this.opts.tokens!=null?this.opts.tokens:{},u=this.isReversed()?-1:1,h=this.isReversed()?"unshift":"push",f=this.isReversed()?0:s.length-1,m=this.isReversed()?()=>b>-1&&x>-1:()=>b<s.length&&x<e.length,y=O=>!this.isReversed()&&O<=f||this.isReversed()&&O>=f;let g,E=-1,b=this.isReversed()?s.length-1:0,x=this.isReversed()?e.length-1:0,F=!1;for(;m();){const O=s.charAt(b),L=l[O],z=(L==null?void 0:L.transform)!=null?L.transform(e.charAt(x)):e.charAt(x);if(!a.includes(b)&&L!=null?(z.match(L.pattern)!=null?(c[h](z),L.repeated?(E===-1?E=b:b===f&&b!==E&&(b=E-u),f===E&&(b-=u)):L.multiple&&(F=!0,b-=u),b+=u):L.multiple?F&&(b+=u,x-=u,F=!1):z===g?g=void 0:L.optional&&(b+=u,x-=u),x+=u):(o&&!this.isEager()&&c[h](O),z===O&&!this.isEager()?x+=u:g=O,this.isEager()||(b+=u)),this.isEager())for(;y(b)&&(l[s.charAt(b)]==null||a.includes(b));){if(o){if(c[h](s.charAt(b)),e.charAt(x)===s.charAt(b)){b+=u,x+=u;continue}}else s.charAt(b)===e.charAt(x)&&(x+=u);b+=u}}return this.memo.set(r,c.join("")),this.memo.get(r)}};const oo=t=>JSON.parse(t.replaceAll("'",'"')),qa=(t,e={})=>{const n={...e};t.dataset.maska!=null&&t.dataset.maska!==""&&(n.mask=Ua(t.dataset.maska)),t.dataset.maskaEager!=null&&(n.eager=Ht(t.dataset.maskaEager)),t.dataset.maskaReversed!=null&&(n.reversed=Ht(t.dataset.maskaReversed)),t.dataset.maskaTokensReplace!=null&&(n.tokensReplace=Ht(t.dataset.maskaTokensReplace)),t.dataset.maskaTokens!=null&&(n.tokens=Wa(t.dataset.maskaTokens));const o={};return t.dataset.maskaNumberLocale!=null&&(o.locale=t.dataset.maskaNumberLocale),t.dataset.maskaNumberFraction!=null&&(o.fraction=parseInt(t.dataset.maskaNumberFraction)),t.dataset.maskaNumberUnsigned!=null&&(o.unsigned=Ht(t.dataset.maskaNumberUnsigned)),(t.dataset.maskaNumber!=null||Object.values(o).length>0)&&(n.number=o),n},Ht=t=>t!==""?!!JSON.parse(t):!0,Ua=t=>t.startsWith("[")&&t.endsWith("]")?oo(t):t,Wa=t=>{if(t.startsWith("{")&&t.endsWith("}"))return oo(t);const e={};return t.split("|").forEach(n=>{const o=n.split(":");e[o[0]]={pattern:new RegExp(o[1]),optional:o[2]==="optional",multiple:o[2]==="multiple",repeated:o[2]==="repeated"}}),e};let Ga=class{constructor(e,n={}){_t(this,"items",new Map),_t(this,"onInput",o=>{if(o instanceof CustomEvent&&o.type==="input"&&!o.isTrusted&&!o.bubbles)return;const r=o.target,s=this.items.get(r),a="inputType"in o&&o.inputType.startsWith("delete"),c=s.isEager(),l=a&&c&&s.unmasked(r.value)===""?"":r.value;this.fixCursor(r,a,()=>this.setValue(r,l))}),this.options=n,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){e.value!==""&&e.value!==this.processInput(e).masked&&this.setValue(e,e.value)}destroy(){for(const e of this.items.keys())e.removeEventListener("input",this.onInput);this.items.clear()}init(e){const n=this.getOptions(this.options);for(const o of e){this.items.has(o)||o.addEventListener("input",this.onInput,{capture:!0});const r=new Ha(qa(o,n));this.items.set(o,r),queueMicrotask(()=>this.updateValue(o)),o.selectionStart===null&&r.isEager()&&console.warn("Maska: input of `%s` type is not supported",o.type)}}getInputs(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):"length"in e?Array.from(e):[e]}getOptions(e){const{onMaska:n,preProcess:o,postProcess:r,...s}=e;return s}fixCursor(e,n,o){const r=e.selectionStart,s=e.value;if(o(),r===null||r===s.length&&!n)return;const a=e.value,c=s.slice(0,r),l=a.slice(0,r),u=this.processInput(e,c).unmasked,h=this.processInput(e,l).unmasked;let f=r;c!==l&&(f+=n?a.length-s.length:u.length-h.length),e.setSelectionRange(f,f)}setValue(e,n){const o=this.processInput(e,n);e.value=o.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(r=>r(o)):this.options.onMaska(o)),e.dispatchEvent(new CustomEvent("maska",{detail:o})),e.dispatchEvent(new CustomEvent("input",{detail:o.masked}))}processInput(e,n){const o=this.items.get(e);let r=n??e.value;this.options.preProcess!=null&&(r=this.options.preProcess(r));let s=o.masked(r);return this.options.postProcess!=null&&(s=this.options.postProcess(s)),{masked:s,unmasked:o.unmasked(r),completed:o.completed(r)}}};const An=new WeakMap,ja=(t,e)=>{if(t.arg==null||t.instance==null)return;const n="setup"in t.instance.$.type;t.arg in t.instance?t.instance[t.arg]=e:n&&console.warn("Maska: please expose `%s` using defineExpose",t.arg)},ro=(t,e)=>{var n;const o=t instanceof HTMLInputElement?t:t.querySelector("input");if(o==null||(o==null?void 0:o.type)==="file")return;let r={};if(e.value!=null&&(r=typeof e.value=="string"?{mask:e.value}:{...e.value}),e.arg!=null){const s=a=>{const c=e.modifiers.unmasked?a.unmasked:e.modifiers.completed?a.completed:a.masked;ja(e,c)};r.onMaska=r.onMaska==null?s:Array.isArray(r.onMaska)?[...r.onMaska,s]:[r.onMaska,s]}An.has(o)?(n=An.get(o))==null||n.update(r):An.set(o,new Ga(o,r))},Za=["for"],Ja={class:"left-field"},Xa=["disabled"],Ya={class:"right-field"},He=v(i.defineComponent({__name:"PInput",props:i.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},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}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["blur","input"],["update:modelValue"]),setup(t){const e=i.useModel(t,"modelValue");return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Za)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Ja,[i.renderSlot(n.$slots,"default",{},void 0,!0)]),i.withDirectives(i.createElementVNode("input",i.mergeProps(n.$attrs,{"onUpdate:modelValue":o[0]||(o[0]=r=>e.value=r),class:"text-field__input",style:{color:t.color},disabled:t.disabled,onBlur:o[1]||(o[1]=r=>n.$emit("blur",e.value)),onInput:o[2]||(o[2]=r=>n.$emit("input",e.value))}),null,16,Xa),[[i.vModelDynamic,e.value],[i.unref(ro),t.mask]]),i.createElementVNode("div",Ya,[i.renderSlot(n.$slots,"right",{},void 0,!0)])],4)],4))}}),[["__scopeId","data-v-3e6801ac"]]),Qa="ru-RU";class Ct{constructor(){d(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(o.year=n.year||n.year===void 0?n.year:o.year,o.month=n.month||n.month===void 0?n.month:o.month,o.day=n.day||n.day===void 0?n.day:o.day,o.hour=n.hour??o.hour,o.minute=n.minute??o.minute),Intl.DateTimeFormat(Qa,o).format(new Date(e))}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}}class je{constructor(e){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");B.BuildClass(this,e)}static Create(){const e=new je;return e.id=B.CreateUUID(),e}}class ot{constructor(e){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");B.BuildClass(this,e)}static Create(){const e=new ot;return e.id=B.CreateUUID(),e}}class qt{constructor(e){d(this,"id");d(this,"address");d(this,"description");B.BuildClass(this,e)}}class so{constructor(e){d(this,"id");d(this,"address");d(this,"description");B.BuildClass(this,e)}}var Ka=Object.defineProperty,Ut=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Ka(e,n,r),r};const kt=class ji{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new qt]);d(this,"phones",[]);d(this,"websites",[]);B.BuildClass(this,e)}addEmail(){const e=je.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=ot.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ji;return e.id=B.CreateUUID(),e}removeEmail(e){B.RemoveFromClassById(e,this.emails)}removePhone(e){B.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new qt)}addWebsite(){this.websites.push(new so)}pushFirst(){this.emails.length||this.emails.push(new je),this.phones.length||this.phones.push(new ot)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}static CreateBufetContacts(){const e=new ji,n=new qt;return n.address="4-й Добрынинский пер., 4, 1А корпус, 7й этаж",e.postAddresses[0]=n,e}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};Ut([B.GetClassConstructor(je)],kt.prototype,"emails"),Ut([B.GetClassConstructor(qt)],kt.prototype,"postAddresses"),Ut([B.GetClassConstructor(ot)],kt.prototype,"phones"),Ut([B.GetClassConstructor(so)],kt.prototype,"websites");let rt=kt;class ce{constructor(e){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");B.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${oi.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,n){const o=new ce;return o.id=n??B.CreateUUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=B.CreateUUID(),o}uploadNewFile(e){this.id||(this.id=B.CreateUUID()),this.originalName=e.name,this.file=e.blob,this.fileSystemPath=B.CreateUUID()}setFile(e){this.file=e,this.url=e.src}uploadAndSetFile(e){this.uploadNewFile(e),this.setFile(e),this.url=e.url}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,n){if(e.target){let o="/src/services/assets/img/avatar.webp";return n&&(o=`@/assets/img/${n}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)==="pdf"}getExtension(e){const n=e.split(".");return n[n.length-1]}}var X=(t=>(t.Date="date",t.String="string",t.Boolean="boolean",t.Number="number",t.Set="set",t.Join="join",t))(X||{}),de=(t=>(t.Eq="=",t.Ne="!=",t.Gt=">",t.Lt="<",t.Btw="between",t.In="in",t.Like="like",t.Null="is null",t.NotNull="is not null",t))(de||{}),el=Object.defineProperty,tl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&el(e,n,r),r};const ao=class St{constructor(e){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",de.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",X.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");B.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===X.Join){const n=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===de.In?n&&Ie.Eq(this.set,e.set):n}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===X.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===X.String?this.value1===(e==null?void 0:e.value1):this.type===X.Join&&this.set.length?Ie.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",n=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===X.Boolean?`"boolean":${this.boolean}`:"",c=this.type===X.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===X.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===X.Number?`"number":${this.number}`:"",h=this.type===X.Set||this.operator===de.In?`"set":${JSON.stringify(this.set)}`:"",f=this.type===X.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,n,o,r,s,a,c,l,u,h,f].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===de.Eq||this.operator===de.Gt||this.operator===de.Lt}isBetweenFilter(){return this.operator===de.Btw}isSetFilter(){return this.operator===de.In}static Create(e,n,o){const r=new St;return r.model=e.GetClassName(),r.col=n??"",r.type=o,r.type===X.Number&&(r.value1="0"),r.type===X.String&&(r.value1=""),r.type===X.Boolean&&(r.value1="false",r.operator=de.Eq),r}static CreateFilterModel(e,n,o){const r=new St;return r.id=ke(),r.model=typeof e=="string"?e:e.GetClassName(),r.col=n??"",r.type=o,r.type===X.Number&&(r.value1="0"),r.type===X.String&&(r.value1=""),r.type===X.Boolean&&(r.value1="false"),r}static CreateFilterModelWithJoin(e,n,o,r,s,a,c,l){const u=new St;return u.id=ke(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=n,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(e,n,o,r,s,a,c){const l=new St;return l.model=e,l.joinTableModel=o,l.joinTablePk=r,l.joinTableFk=s,l.col=n,l.type=X.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(e,n){const o=new St;return o.id=ke(),o.model=q.ToCamelCase(e.GetClassName()),o.joinTableModel=q.ToCamelCase(n.GetClassName()),o.type=X.Join,o}addToSet(...e){e.forEach(n=>{if(this.set.indexOf(n)===-1){this.set.push(n);return}this.set=this.set.filter(o=>o!==n)})}pushToSet(...e){e.forEach(n=>{this.set.indexOf(n)===-1&&this.set.push(n)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return i.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,n){if(!e&&!n){this.dropDates();return}if(!n){this.setDate1(e),this.operator=de.Eq;return}this.setDate2(n),this.operator=de.Btw}};tl([B.GetClassConstructor(String)],ao.prototype,"set");let In=ao;class nl{constructor(){d(this,"operation",de.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",n=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,n,r,s,a].filter(c=>c!=="").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 Wt{constructor(e){d(this,"offset",0);d(this,"limit",25);d(this,"cursor",new nl);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");B.BuildClass(this,e)}setLoadMore(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.offset=e}toUrlQuery(){const e=`"offset":${this.offset}`,n=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,n,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.offset=Number(o.get("offset")),this.limit=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.limit)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.offset/this.limit+1}drop(){this.offset=0,this.limit=25,B.BuildClass(this)}}class Gt{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(e,n){const o=new Gt;return o.model=e.GetClassName(),o.cols=n,o}}var De=(t=>(t.Asc="asc",t.Desc="desc",t))(De||{});class jt{constructor(e){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);B.BuildClass(this,e)}static Create(e,n,o=De.Asc,r,s){const a=new jt;return a.model=e.GetClassName(),a.col=n??"",a.order=o??De.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===De.Asc}isDesc(){return this.order===De.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",n=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,n,o].toString()}async fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(n));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")??""}}var il=Object.defineProperty,Zt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&il(e,n,r),r};const Et=(Se=class{constructor(e){d(this,"id");d(this,"f",[]);d(this,"s",[]);d(this,"p",new Wt);d(this,"t",new Gt);B.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new Se),this.instance}createFrom(e){const n=new Se(JSON.parse(e));this.f=n.f}clearForHTTP(){const e=new Se(this);return e.f=this.f.map(n=>Se.EmptyEntiries(n)),e.s=this.s.map(n=>Se.EmptyEntiries(n)),e.p=Se.EmptyEntiries(this.p),e.t=Se.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(n=>e.id===n.id)}getFirstSortModel(){return Ie.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}replaceF(e,n){this.removeF(n),e&&this.setF(e)}removeF(e){const n=this.f.findIndex(o=>o.eq(e));B.RemoveFromClassByIndex(n,this.f)}reset(){this.f=[],this.s=[],this.p=new Wt}resetF(){this.f=[]}},d(Se,"instance"),Se);Zt([B.GetClassConstructor(In)],Et.prototype,"f"),Zt([B.GetClassConstructor(jt)],Et.prototype,"s"),Zt([B.GetClassConstructor(Wt)],Et.prototype,"p"),Zt([B.GetClassConstructor(Gt)],Et.prototype,"t");let Q=Et;var ol=Object.defineProperty,rl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ol(e,n,r),r};class Vn{constructor(e){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"citizenship","");d(this,"placeBirth","");d(this,"carNumber","");d(this,"carModel","");d(this,"snils","");d(this,"photoId");d(this,"photo",new ce);d(this,"photoMiniId");d(this,"photoMini",new ce);d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contact",new rt);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);B.BuildClass(this,e)}getImageUrl(){return this.photo.fileSystemPath?this.photo.getFileUrl():new URL("/src/services/assets/img/avatar.webp",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}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=q.Capitalize(this.name),this.surname=q.Capitalize(this.surname),this.patronymic=q.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}getFileInfos(){const e=[];return e.push(this.photo),e.push(this.photoMini),e}removePhoto(){this.photo=new ce,this.photoId=void 0}removePhotoMini(){this.photoMini=new ce,this.photoMiniId=void 0}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}initContact(){this.contact=rt.Create(),this.contactId=this.contact.id}}rl([B.GetClassConstructor(rt)],Vn.prototype,"contact");class Ze{constructor(e,n,o,r){d(this,"text","Сохранить");d(this,"type",le.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=e,this.type=o,this.action=n,r!==void 0&&(this.condition=r)}static Primary(e,n,o){return new Ze(e,n,le.Primary,o)}static Success(e,n,o){return new Ze(e,n,le.Success,o)}static Warning(e,n,o){return new Ze(e,n,le.Warning,o)}static Error(e,n,o){return new Ze(e,n,le.Error,o)}}var lo=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(lo||{}),ue=(t=>(t.String="string",t.Text="text",t.Number="number",t.Date="date",t.DateTime="dateTime",t.Radio="radio",t.Set="set",t.Boolean="boolean",t.Files="files",t.File="file",t.MatrixRadio="matrixRadio",t.MatrixSet="matrixSet",t))(ue||{});class co{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",lo.simple);B.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===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}/*!
14
+ ***************************************************************************** */var Yi;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof Xi=="object"?Xi:typeof self=="object"?self:typeof this=="object"?this:c(),o=r(t);typeof n.Reflect<"u"&&(o=r(n.Reflect,o)),e(o,n),typeof n.Reflect>"u"&&(n.Reflect=t);function r(l,u){return function(h,f){Object.defineProperty(l,h,{configurable:!0,writable:!0,value:f}),u&&u(h,f)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(e,n){var o=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,h={create:c?function(){return Gi(Object.create(null))}:l?function(){return Gi({__proto__:null})}:function(){return Gi({})},has:u?function(w,S){return o.call(w,S)}:function(w,S){return S in w},get:u?function(w,S){return o.call(w,S)?w[S]:void 0}:function(w,S){return w[S]}},f=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Pm(),y=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:zm(),g=typeof WeakMap=="function"?WeakMap:Tm(),E=r?Symbol.for("@reflect-metadata:registry"):void 0,b=Am(),x=Im(b);function F(w,S,k,M){if(T(k)){if(!ra(w))throw new TypeError;if(!sa(S))throw new TypeError;return Em(w,S)}else{if(!ra(w))throw new TypeError;if(!ee(S))throw new TypeError;if(!ee(M)&&!T(M)&&!bt(M))throw new TypeError;return bt(M)&&(M=void 0),k=De(k),vm(w,S,k,M)}}e("decorate",F);function O(w,S){function k(M,P){if(!ee(M))throw new TypeError;if(!T(P)&&!Rm(P))throw new TypeError;ea(w,S,M,P)}return k}e("metadata",O);function L(w,S,k,M){if(!ee(k))throw new TypeError;return T(M)||(M=De(M)),ea(w,S,k,M)}e("defineMetadata",L);function z(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=De(k)),Ys(w,S,k)}e("hasMetadata",z);function Ce(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=De(k)),qi(w,S,k)}e("hasOwnMetadata",Ce);function Be(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=De(k)),Qs(w,S,k)}e("getMetadata",Be);function Ge(w,S,k){if(!ee(S))throw new TypeError;return T(k)||(k=De(k)),Ks(w,S,k)}e("getOwnMetadata",Ge);function wt(w,S){if(!ee(w))throw new TypeError;return T(S)||(S=De(S)),ta(w,S)}e("getMetadataKeys",wt);function Mn(w,S){if(!ee(w))throw new TypeError;return T(S)||(S=De(S)),na(w,S)}e("getOwnMetadataKeys",Mn);function km(w,S,k){if(!ee(S))throw new TypeError;if(T(k)||(k=De(k)),!ee(S))throw new TypeError;T(k)||(k=De(k));var M=Ft(S,k,!1);return T(M)?!1:M.OrdinaryDeleteMetadata(w,S,k)}e("deleteMetadata",km);function Em(w,S){for(var k=w.length-1;k>=0;--k){var M=w[k],P=M(S);if(!T(P)&&!bt(P)){if(!sa(P))throw new TypeError;S=P}}return S}function vm(w,S,k,M){for(var P=w.length-1;P>=0;--P){var ie=w[P],te=ie(S,k,M);if(!T(te)&&!bt(te)){if(!ee(te))throw new TypeError;M=te}}return M}function Ys(w,S,k){var M=qi(w,S,k);if(M)return!0;var P=Wi(S);return bt(P)?!1:Ys(w,P,k)}function qi(w,S,k){var M=Ft(S,k,!1);return T(M)?!1:oa(M.OrdinaryHasOwnMetadata(w,S,k))}function Qs(w,S,k){var M=qi(w,S,k);if(M)return Ks(w,S,k);var P=Wi(S);if(!bt(P))return Qs(w,P,k)}function Ks(w,S,k){var M=Ft(S,k,!1);if(!T(M))return M.OrdinaryGetOwnMetadata(w,S,k)}function ea(w,S,k,M){var P=Ft(k,M,!0);P.OrdinaryDefineOwnMetadata(w,S,k,M)}function ta(w,S){var k=na(w,S),M=Wi(w);if(M===null)return k;var P=ta(M,S);if(P.length<=0)return k;if(k.length<=0)return P;for(var ie=new y,te=[],H=0,N=k;H<N.length;H++){var R=N[H],$=ie.has(R);$||(ie.add(R),te.push(R))}for(var I=0,U=P;I<U.length;I++){var R=U[I],$=ie.has(R);$||(ie.add(R),te.push(R))}return te}function na(w,S){var k=Ft(w,S,!1);return k?k.OrdinaryOwnMetadataKeys(w,S):[]}function ia(w){if(w===null)return 1;switch(typeof w){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return w===null?1:6;default:return 6}}function T(w){return w===void 0}function bt(w){return w===null}function Mm(w){return typeof w=="symbol"}function ee(w){return typeof w=="object"?w!==null:typeof w=="function"}function Bm(w,S){switch(ia(w)){case 0:return w;case 1:return w;case 2:return w;case 3:return w;case 4:return w;case 5:return w}var k="string",M=aa(w,s);if(M!==void 0){var P=M.call(w,k);if(ee(P))throw new TypeError;return P}return xm(w)}function xm(w,S){var k,M;{var P=w.toString;if(Bn(P)){var M=P.call(w);if(!ee(M))return M}var k=w.valueOf;if(Bn(k)){var M=k.call(w);if(!ee(M))return M}}throw new TypeError}function oa(w){return!!w}function Nm(w){return""+w}function De(w){var S=Bm(w);return Mm(S)?S:Nm(S)}function ra(w){return Array.isArray?Array.isArray(w):w instanceof Object?w instanceof Array:Object.prototype.toString.call(w)==="[object Array]"}function Bn(w){return typeof w=="function"}function sa(w){return typeof w=="function"}function Rm(w){switch(ia(w)){case 3:return!0;case 4:return!0;default:return!1}}function Ui(w,S){return w===S||w!==w&&S!==S}function aa(w,S){var k=w[S];if(k!=null){if(!Bn(k))throw new TypeError;return k}}function la(w){var S=aa(w,a);if(!Bn(S))throw new TypeError;var k=S.call(w);if(!ee(k))throw new TypeError;return k}function ca(w){return w.value}function da(w){var S=w.next();return S.done?!1:S}function ua(w){var S=w.return;S&&S.call(w)}function Wi(w){var S=Object.getPrototypeOf(w);if(typeof w!="function"||w===f||S!==f)return S;var k=w.prototype,M=k&&Object.getPrototypeOf(k);if(M==null||M===Object.prototype)return S;var P=M.constructor;return typeof P!="function"||P===w?S:P}function $m(){var w;!T(E)&&typeof n.Reflect<"u"&&!(E in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(w=Vm(n.Reflect));var S,k,M,P=new g,ie={registerProvider:te,getProvider:N,setProvider:$};return ie;function te(I){if(!Object.isExtensible(ie))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case w===I:break;case T(S):S=I;break;case S===I:break;case T(k):k=I;break;case k===I:break;default:M===void 0&&(M=new y),M.add(I);break}}function H(I,U){if(!T(S)){if(S.isProviderFor(I,U))return S;if(!T(k)){if(k.isProviderFor(I,U))return S;if(!T(M))for(var Z=la(M);;){var J=da(Z);if(!J)return;var Ae=ca(J);if(Ae.isProviderFor(I,U))return ua(Z),Ae}}}if(!T(w)&&w.isProviderFor(I,U))return w}function N(I,U){var Z=P.get(I),J;return T(Z)||(J=Z.get(U)),T(J)&&(J=H(I,U),T(J)||(T(Z)&&(Z=new m,P.set(I,Z)),Z.set(U,J))),J}function R(I){if(T(I))throw new TypeError;return S===I||k===I||!T(M)&&M.has(I)}function $(I,U,Z){if(!R(Z))throw new Error("Metadata provider not registered.");var J=N(I,U);if(J!==Z){if(!T(J))return!1;var Ae=P.get(I);T(Ae)&&(Ae=new m,P.set(I,Ae)),Ae.set(U,Z)}return!0}}function Am(){var w;return!T(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&(w=n.Reflect[E]),T(w)&&(w=$m()),!T(E)&&ee(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,E,{enumerable:!1,configurable:!1,writable:!1,value:w}),w}function Im(w){var S=new g,k={isProviderFor:function(R,$){var I=S.get(R);return T(I)?!1:I.has($)},OrdinaryDefineOwnMetadata:te,OrdinaryHasOwnMetadata:P,OrdinaryGetOwnMetadata:ie,OrdinaryOwnMetadataKeys:H,OrdinaryDeleteMetadata:N};return b.registerProvider(k),k;function M(R,$,I){var U=S.get(R),Z=!1;if(T(U)){if(!I)return;U=new m,S.set(R,U),Z=!0}var J=U.get($);if(T(J)){if(!I)return;if(J=new m,U.set($,J),!w.setProvider(R,$,k))throw U.delete($),Z&&S.delete(R),new Error("Wrong provider for target.")}return J}function P(R,$,I){var U=M($,I,!1);return T(U)?!1:oa(U.has(R))}function ie(R,$,I){var U=M($,I,!1);if(!T(U))return U.get(R)}function te(R,$,I,U){var Z=M(I,U,!0);Z.set(R,$)}function H(R,$){var I=[],U=M(R,$,!1);if(T(U))return I;for(var Z=U.keys(),J=la(Z),Ae=0;;){var ha=da(J);if(!ha)return I.length=Ae,I;var Lm=ca(ha);try{I[Ae]=Lm}catch(Dm){try{ua(J)}finally{throw Dm}}Ae++}}function N(R,$,I){var U=M($,I,!1);if(T(U)||!U.delete(R))return!1;if(U.size===0){var Z=S.get($);T(Z)||(Z.delete(I),Z.size===0&&S.delete(Z))}return!0}}function Vm(w){var S=w.defineMetadata,k=w.hasOwnMetadata,M=w.getOwnMetadata,P=w.getOwnMetadataKeys,ie=w.deleteMetadata,te=new g,H={isProviderFor:function(N,R){var $=te.get(N);return!T($)&&$.has(R)?!0:P(N,R).length?(T($)&&($=new y,te.set(N,$)),$.add(R),!0):!1},OrdinaryDefineOwnMetadata:S,OrdinaryHasOwnMetadata:k,OrdinaryGetOwnMetadata:M,OrdinaryOwnMetadataKeys:P,OrdinaryDeleteMetadata:ie};return H}function Ft(w,S,k){var M=b.getProvider(w,S);if(!T(M))return M;if(k){if(b.setProvider(w,S,x))return x;throw new Error("Illegal state.")}}function Pm(){var w={},S=[],k=function(){function H(N,R,$){this._index=0,this._keys=N,this._values=R,this._selector=$}return H.prototype["@@iterator"]=function(){return this},H.prototype[a]=function(){return this},H.prototype.next=function(){var N=this._index;if(N>=0&&N<this._keys.length){var R=this._selector(this._keys[N],this._values[N]);return N+1>=this._keys.length?(this._index=-1,this._keys=S,this._values=S):this._index++,{value:R,done:!1}}return{value:void 0,done:!0}},H.prototype.throw=function(N){throw this._index>=0&&(this._index=-1,this._keys=S,this._values=S),N},H.prototype.return=function(N){return this._index>=0&&(this._index=-1,this._keys=S,this._values=S),{value:N,done:!0}},H}(),M=function(){function H(){this._keys=[],this._values=[],this._cacheKey=w,this._cacheIndex=-2}return Object.defineProperty(H.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),H.prototype.has=function(N){return this._find(N,!1)>=0},H.prototype.get=function(N){var R=this._find(N,!1);return R>=0?this._values[R]:void 0},H.prototype.set=function(N,R){var $=this._find(N,!0);return this._values[$]=R,this},H.prototype.delete=function(N){var R=this._find(N,!1);if(R>=0){for(var $=this._keys.length,I=R+1;I<$;I++)this._keys[I-1]=this._keys[I],this._values[I-1]=this._values[I];return this._keys.length--,this._values.length--,Ui(N,this._cacheKey)&&(this._cacheKey=w,this._cacheIndex=-2),!0}return!1},H.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=w,this._cacheIndex=-2},H.prototype.keys=function(){return new k(this._keys,this._values,P)},H.prototype.values=function(){return new k(this._keys,this._values,ie)},H.prototype.entries=function(){return new k(this._keys,this._values,te)},H.prototype["@@iterator"]=function(){return this.entries()},H.prototype[a]=function(){return this.entries()},H.prototype._find=function(N,R){if(!Ui(this._cacheKey,N)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(Ui(this._keys[$],N)){this._cacheIndex=$;break}}return this._cacheIndex<0&&R&&(this._cacheIndex=this._keys.length,this._keys.push(N),this._values.push(void 0)),this._cacheIndex},H}();return M;function P(H,N){return H}function ie(H,N){return N}function te(H,N){return[H,N]}}function zm(){var w=function(){function S(){this._map=new m}return Object.defineProperty(S.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),S.prototype.has=function(k){return this._map.has(k)},S.prototype.add=function(k){return this._map.set(k,k),this},S.prototype.delete=function(k){return this._map.delete(k)},S.prototype.clear=function(){this._map.clear()},S.prototype.keys=function(){return this._map.keys()},S.prototype.values=function(){return this._map.keys()},S.prototype.entries=function(){return this._map.entries()},S.prototype["@@iterator"]=function(){return this.keys()},S.prototype[a]=function(){return this.keys()},S}();return w}function Tm(){var w=16,S=h.create(),k=M();return function(){function N(){this._key=M()}return N.prototype.has=function(R){var $=P(R,!1);return $!==void 0?h.has($,this._key):!1},N.prototype.get=function(R){var $=P(R,!1);return $!==void 0?h.get($,this._key):void 0},N.prototype.set=function(R,$){var I=P(R,!0);return I[this._key]=$,this},N.prototype.delete=function(R){var $=P(R,!1);return $!==void 0?delete $[this._key]:!1},N.prototype.clear=function(){this._key=M()},N}();function M(){var N;do N="@@WeakMap@@"+H();while(h.has(S,N));return S[N]=!0,N}function P(N,R){if(!o.call(N,k)){if(!R)return;Object.defineProperty(N,k,{value:h.create()})}return N[k]}function ie(N,R){for(var $=0;$<R;++$)N[$]=Math.random()*255|0;return N}function te(N){if(typeof Uint8Array=="function"){var R=new Uint8Array(N);return typeof crypto<"u"?crypto.getRandomValues(R):typeof msCrypto<"u"?msCrypto.getRandomValues(R):ie(R,N),R}return ie(new Array(N),N)}function H(){var N=te(w);N[6]=N[6]&79|64,N[8]=N[8]&191|128;for(var R="",$=0;$<w;++$){var I=N[$];($===4||$===6||$===8)&&(R+="-"),I<16&&(R+="0"),R+=I.toString(16).toLowerCase()}return R}}function Gi(w){return w.__=void 0,delete w.__,w}})})(Yi||(Yi={}));let Ot;const ka=new Uint8Array(16);function Ea(){if(!Ot&&(Ot=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ot))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ot(ka)}const oe=[];for(let t=0;t<256;++t)oe.push((t+256).toString(16).slice(1));function va(t,e=0){return oe[t[e+0]]+oe[t[e+1]]+oe[t[e+2]]+oe[t[e+3]]+"-"+oe[t[e+4]]+oe[t[e+5]]+"-"+oe[t[e+6]]+oe[t[e+7]]+"-"+oe[t[e+8]]+oe[t[e+9]]+"-"+oe[t[e+10]]+oe[t[e+11]]+oe[t[e+12]]+oe[t[e+13]]+oe[t[e+14]]+oe[t[e+15]]}const Qi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ke(t,e,n){if(Qi.randomUUID&&!e&&!t)return Qi.randomUUID();t=t||{};const o=t.random||(t.rng||Ea)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,va(o)}const it=class it{static BuildClass(e,n){n&&Object.keys(n).forEach(o=>{const r=n[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)){const s=Reflect.getMetadata(o,e);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,n,o){it.RemoveFromClass(e,n,o)}static RemoveFromClassById(e,n,o){if(!e)return;const r=n.findIndex(s=>s.id===e);it.RemoveFromClass(r,n,o)}static RemoveFromClass(e,n,o){if(e<0)return;const r=n[e].id;r&&o&&o.push(r),n.splice(e,1)}static GetPropertyName(e){const n=new e;return new Proxy(n,{get(o,r){return r}})}static CreateUUID(){return ke()}static InitClassInstance(e,n){const o=e.constructor(n);return it.BuildClass(o),o.id=it.CreateUUID(),o}static ExistsWithId(e,n){return e.some(o=>o.id===n)}};d(it,"GetClassConstructor",e=>(n,o)=>{const r=Reflect.getMetadata(`property:${o}`,n)||{};r[o]=e,Reflect.defineMetadata(o,r,n)});let B=it;const Ma={class:"item"},Ba={class:"move"},xa={class:"item-tools"},Na=["onClick"],Ra={class:"item-description"},$a=["onUpdate:modelValue"],Ki=v(i.defineComponent({__name:"AdminGallery",props:{fileList:{type:Array,reguired:!0,default:()=>[]},fileListForDelete:{type:Array,default:()=>[]},defaultRatio:{type:Number,required:!1,default:1},upload:{type:Boolean,required:!1,default:!0}},emits:["addImage","ratio","remove"],setup(t,{emit:e}){const n=t,o=e,r=async a=>{o("addImage",a)},s=async a=>{B.RemoveFromClassById(a.id,n.fileList,[]),o("remove",a)};return(a,c)=>{const l=i.resolveComponent("UploderImage"),u=i.resolveComponent("draggable"),h=i.resolveComponent("Move");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(u,{class:"groups",list:t.fileList,"item-key":"id",handle:".move",onEnd:c[0]||(c[0]=f=>i.unref(Ie).Sort(t.fileList))},{item:i.withCtx(({element:f,index:m})=>[i.createElementVNode("div",Ma,[i.createElementVNode("div",Ba,[i.createElementVNode("div",xa,[c[1]||(c[1]=i.createElementVNode("svg",{class:"icon-move"},[i.createElementVNode("use",{"xlink:href":"#move"})],-1)),i.createElementVNode("button",{class:"admin-del2",onClick:i.withModifiers(y=>s(f),["prevent"])},"Удалить",8,Na)]),i.createVNode(l,{"file-info":f,height:150,"default-ratio":t.defaultRatio,onRemoveFile:y=>i.unref(B).RemoveFromClassByIndex(m,t.fileList,t.fileListForDelete),onCrop:y=>r(f)},null,8,["file-info","default-ratio","onRemoveFile","onCrop"])]),i.createElementVNode("div",Ra,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":y=>f.description=y,class:"item-description-form",placeholder:"..."},null,8,$a),[[i.vModelText,f.description]])])])]),_:1},8,["list"]),i.createVNode(h)],64)}}}),[["__scopeId","data-v-e3825d60"]]);class q{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static ToCamelCase(e){const n=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(n).map((r,s)=>s===0?r.toLowerCase():q.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,n,o){return e.substring(e.indexOf(n)+2,e.lastIndexOf(o))}static Translit(e,n){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 n&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(o).find(c=>o[c]===r);return a||""}const s=Object.keys(o).find(a=>o[a]===r.toLowerCase());return s?s.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?o[r]:o[r.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const n=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(n,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,n){const o=e.toLowerCase().replaceAll(/\s/g,""),r=n.toLowerCase().replaceAll(/\s/g,""),s=q.Translit(o),a=q.Translit(r);return o.includes(r)||s.includes(r)||o.includes(a)}static SearchIn(e,n){return q.StringsEquals(e,n)}static FormatToPercentage(e){return`${e}%`}static WrapSubStr(e,n){const o=new RegExp(q.GetVariants(n).join("|"),"gi");return e.replace(o,`<span class="search-text">${n}</span>`)}static GetVariants(e){const n=q.Translit(e);return[e,q.Capitalize(e),e.toLowerCase(),e.toUpperCase(),n,q.Capitalize(n),n.toLowerCase(),n.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static CreateGuid(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static JoinSnake(...e){return e.join("_")}}var xn=(t=>(t.XS="xs",t.S="s",t.M="m",t.L="l",t.XL="xl",t))(xn||{}),le=(t=>(t.Primary="primary",t.Success="success",t.Warning="warning",t.Error="error",t.Info="info",t))(le||{});const Aa="p-button",Ia=i.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:xn.M,required:!1},type:{type:String,default:le.Primary,required:!1},fontSize:{type:String,default:"",required:!1}},emits:["click"],setup(t,{emit:e}){const n=t,o=e,r=()=>{o("click")},s=i.computed(()=>q.JoinSnake(Aa,n.skin)),a=i.computed(()=>q.JoinSnake(s.value,n.type)),c=i.computed(()=>q.JoinSnake(s.value,n.size)),l=i.computed(()=>[s.value,a.value,c.value]);return(u,h)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(u.$attrs,{style:{margin:t.margin,padding:t.padding,maxWidth:t.width,minWidth:t.width,minHeight:t.height,maxHeight:t.height,fontSize:t.fontSize},class:i.unref(l),onClick:i.withModifiers(r,["prevent"])}),[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createTextVNode(" "+i.toDisplayString(t.text),1)],16))}}),fe=v(Ia,[["__scopeId","data-v-215d8f27"]]),Nn=v(i.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.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-ef4acbe9"]]),Va=["value"],Rn=v(i.defineComponent({__name:"PCheckBox",props:i.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:"14px"},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"22px"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:i.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=i.useModel(t,"modelValue"),o=e,r=()=>{o("change",n.value)};return(s,a)=>{const c=Nn;return i.openBlock(),i.createElementBlock("div",{id:"some",class:"check-line",style:i.normalizeStyle({padding:t.padding,margin:t.margin,maxWidth:t.width})},[i.createElementVNode("label",{class:"check-field__label",style:i.normalizeStyle({fontSize:t.fontSize})},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),class:"check-field__input",type:"checkbox",value:t.value,onChange:r},null,40,Va),[[i.vModelCheckbox,n.value]]),i.createElementVNode("div",{id:"abc",class:"box",style:i.normalizeStyle({width:t.size,height:t.size,borderRadius:t.borderRadius})},[n.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"check-icon",style:i.normalizeStyle({width:t.size,height:t.size})},[i.createVNode(c,{margin:"auto",size:t.size},null,8,["size"])],4)):i.createCommentVNode("",!0)],4),i.createTextVNode(" "+i.toDisplayString(t.label),1)],4)],4)}}}),[["__scopeId","data-v-5d8bdbbf"]]),Pa=["for"],za={class:"field"},Ta={class:"left-field"},La=["id","value","name"],Da={class:"right-field"},eo=v(i.defineComponent({__name:"PDatePicker",props:i.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:i.mergeModels(["blur","input"],["update:modelValue"]),setup(t,{emit:e}){const n=e,o=i.useModel(t,"modelValue"),r=a=>{const l=a.target.valueAsDate;l?(o.value=l,n("input",s(o.value))):(o.value=null,n("input",null))},s=a=>a?new Date(a.getTime()-a.getTimezoneOffset()*60*1e3).toISOString().split("T")[0]:"";return(a,c)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Pa)):i.createCommentVNode("",!0),i.createElementVNode("div",za,[i.createElementVNode("div",Ta,[i.renderSlot(a.$slots,"default",{},void 0,!0)]),i.createElementVNode("input",{id:t.label,max:"2100",min:"1900",value:s(o.value),class:"text-field__input",type:"date",name:t.label,onInput:r},null,40,La),i.createElementVNode("div",Da,[i.renderSlot(a.$slots,"right",{},void 0,!0)])])],4))}}),[["__scopeId","data-v-b77c7363"]]),$n=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"flex-line",style:i.normalizeStyle({margin:t.margin,padding:t.padding,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,height:t.height,justifyContent:t.justifyContent,background:t.background,alignItems:t.alignItems})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6c788e9a"]]);var Fa=Object.defineProperty,Oa=(t,e,n)=>e in t?Fa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_t=(t,e,n)=>Oa(t,typeof e!="symbol"?e+"":e,n);const to={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},no=(t,e,n)=>t.replaceAll(e,"").replace(n,".").replace("..",".").replace(/[^.\d]/g,""),io=(t,e,n)=>{var o;return new Intl.NumberFormat(((o=n.number)==null?void 0:o.locale)??"en",{minimumFractionDigits:t,maximumFractionDigits:e,roundingMode:"trunc"})},_a=(t,e=!0,n)=>{var o,r,s,a;const c=((o=n.number)==null?void 0:o.unsigned)==null&&t.startsWith("-")?"-":"",l=((r=n.number)==null?void 0:r.fraction)??0;let u=io(0,l,n);const h=u.formatToParts(1000.12),f=((s=h.find(b=>b.type==="group"))==null?void 0:s.value)??" ",m=((a=h.find(b=>b.type==="decimal"))==null?void 0:a.value)??".",y=no(t,f,m);if(Number.isNaN(parseFloat(y)))return c;const g=y.split(".");if(g[1]!=null&&g[1].length>=1){const b=g[1].length<=l?g[1].length:l;u=io(b,l,n)}let E=u.format(parseFloat(y));return e?l>0&&y.endsWith(".")&&!y.slice(0,-1).includes(".")&&(E+=m):E=no(E,f,m),c+E};let Ha=class{constructor(e={}){_t(this,"opts",{}),_t(this,"memo",new Map);const n={...e};if(n.tokens!=null){n.tokens=n.tokensReplace?{...n.tokens}:{...to,...n.tokens};for(const o of Object.values(n.tokens))typeof o.pattern=="string"&&(o.pattern=new RegExp(o.pattern))}else n.tokens=to;Array.isArray(n.mask)&&(n.mask.length>1?n.mask=[...n.mask].sort((o,r)=>o.length-r.length):n.mask=n.mask[0]??""),n.mask===""&&(n.mask=null),this.opts=n}masked(e){return this.process(e,this.findMask(e))}unmasked(e){return this.process(e,this.findMask(e),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const n=this.findMask(e);if(this.opts.mask==null||n==null)return!1;const o=this.process(e,n).length;return typeof this.opts.mask=="string"?o>=this.opts.mask.length:o>=n.length}findMask(e){const n=this.opts.mask;if(n==null)return null;if(typeof n=="string")return n;if(typeof n=="function")return n(e);const o=this.process(e,n.slice(-1).pop()??"",!1);return n.find(r=>this.process(e,r,!1).length>=o.length)??""}escapeMask(e){const n=[],o=[];return e.split("").forEach((r,s)=>{r==="!"&&e[s-1]!=="!"?o.push(s-o.length):n.push(r)}),{mask:n.join(""),escaped:o}}process(e,n,o=!0){if(this.opts.number!=null)return _a(e,o,this.opts);if(n==null)return e;const r=`v=${e},mr=${n},m=${o?1:0}`;if(this.memo.has(r))return this.memo.get(r);const{mask:s,escaped:a}=this.escapeMask(n),c=[],l=this.opts.tokens!=null?this.opts.tokens:{},u=this.isReversed()?-1:1,h=this.isReversed()?"unshift":"push",f=this.isReversed()?0:s.length-1,m=this.isReversed()?()=>b>-1&&x>-1:()=>b<s.length&&x<e.length,y=O=>!this.isReversed()&&O<=f||this.isReversed()&&O>=f;let g,E=-1,b=this.isReversed()?s.length-1:0,x=this.isReversed()?e.length-1:0,F=!1;for(;m();){const O=s.charAt(b),L=l[O],z=(L==null?void 0:L.transform)!=null?L.transform(e.charAt(x)):e.charAt(x);if(!a.includes(b)&&L!=null?(z.match(L.pattern)!=null?(c[h](z),L.repeated?(E===-1?E=b:b===f&&b!==E&&(b=E-u),f===E&&(b-=u)):L.multiple&&(F=!0,b-=u),b+=u):L.multiple?F&&(b+=u,x-=u,F=!1):z===g?g=void 0:L.optional&&(b+=u,x-=u),x+=u):(o&&!this.isEager()&&c[h](O),z===O&&!this.isEager()?x+=u:g=O,this.isEager()||(b+=u)),this.isEager())for(;y(b)&&(l[s.charAt(b)]==null||a.includes(b));){if(o){if(c[h](s.charAt(b)),e.charAt(x)===s.charAt(b)){b+=u,x+=u;continue}}else s.charAt(b)===e.charAt(x)&&(x+=u);b+=u}}return this.memo.set(r,c.join("")),this.memo.get(r)}};const oo=t=>JSON.parse(t.replaceAll("'",'"')),qa=(t,e={})=>{const n={...e};t.dataset.maska!=null&&t.dataset.maska!==""&&(n.mask=Ua(t.dataset.maska)),t.dataset.maskaEager!=null&&(n.eager=Ht(t.dataset.maskaEager)),t.dataset.maskaReversed!=null&&(n.reversed=Ht(t.dataset.maskaReversed)),t.dataset.maskaTokensReplace!=null&&(n.tokensReplace=Ht(t.dataset.maskaTokensReplace)),t.dataset.maskaTokens!=null&&(n.tokens=Wa(t.dataset.maskaTokens));const o={};return t.dataset.maskaNumberLocale!=null&&(o.locale=t.dataset.maskaNumberLocale),t.dataset.maskaNumberFraction!=null&&(o.fraction=parseInt(t.dataset.maskaNumberFraction)),t.dataset.maskaNumberUnsigned!=null&&(o.unsigned=Ht(t.dataset.maskaNumberUnsigned)),(t.dataset.maskaNumber!=null||Object.values(o).length>0)&&(n.number=o),n},Ht=t=>t!==""?!!JSON.parse(t):!0,Ua=t=>t.startsWith("[")&&t.endsWith("]")?oo(t):t,Wa=t=>{if(t.startsWith("{")&&t.endsWith("}"))return oo(t);const e={};return t.split("|").forEach(n=>{const o=n.split(":");e[o[0]]={pattern:new RegExp(o[1]),optional:o[2]==="optional",multiple:o[2]==="multiple",repeated:o[2]==="repeated"}}),e};let Ga=class{constructor(e,n={}){_t(this,"items",new Map),_t(this,"onInput",o=>{if(o instanceof CustomEvent&&o.type==="input"&&!o.isTrusted&&!o.bubbles)return;const r=o.target,s=this.items.get(r),a="inputType"in o&&o.inputType.startsWith("delete"),c=s.isEager(),l=a&&c&&s.unmasked(r.value)===""?"":r.value;this.fixCursor(r,a,()=>this.setValue(r,l))}),this.options=n,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){e.value!==""&&e.value!==this.processInput(e).masked&&this.setValue(e,e.value)}destroy(){for(const e of this.items.keys())e.removeEventListener("input",this.onInput);this.items.clear()}init(e){const n=this.getOptions(this.options);for(const o of e){this.items.has(o)||o.addEventListener("input",this.onInput,{capture:!0});const r=new Ha(qa(o,n));this.items.set(o,r),queueMicrotask(()=>this.updateValue(o)),o.selectionStart===null&&r.isEager()&&console.warn("Maska: input of `%s` type is not supported",o.type)}}getInputs(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):"length"in e?Array.from(e):[e]}getOptions(e){const{onMaska:n,preProcess:o,postProcess:r,...s}=e;return s}fixCursor(e,n,o){const r=e.selectionStart,s=e.value;if(o(),r===null||r===s.length&&!n)return;const a=e.value,c=s.slice(0,r),l=a.slice(0,r),u=this.processInput(e,c).unmasked,h=this.processInput(e,l).unmasked;let f=r;c!==l&&(f+=n?a.length-s.length:u.length-h.length),e.setSelectionRange(f,f)}setValue(e,n){const o=this.processInput(e,n);e.value=o.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(r=>r(o)):this.options.onMaska(o)),e.dispatchEvent(new CustomEvent("maska",{detail:o})),e.dispatchEvent(new CustomEvent("input",{detail:o.masked}))}processInput(e,n){const o=this.items.get(e);let r=n??e.value;this.options.preProcess!=null&&(r=this.options.preProcess(r));let s=o.masked(r);return this.options.postProcess!=null&&(s=this.options.postProcess(s)),{masked:s,unmasked:o.unmasked(r),completed:o.completed(r)}}};const An=new WeakMap,ja=(t,e)=>{if(t.arg==null||t.instance==null)return;const n="setup"in t.instance.$.type;t.arg in t.instance?t.instance[t.arg]=e:n&&console.warn("Maska: please expose `%s` using defineExpose",t.arg)},ro=(t,e)=>{var n;const o=t instanceof HTMLInputElement?t:t.querySelector("input");if(o==null||(o==null?void 0:o.type)==="file")return;let r={};if(e.value!=null&&(r=typeof e.value=="string"?{mask:e.value}:{...e.value}),e.arg!=null){const s=a=>{const c=e.modifiers.unmasked?a.unmasked:e.modifiers.completed?a.completed:a.masked;ja(e,c)};r.onMaska=r.onMaska==null?s:Array.isArray(r.onMaska)?[...r.onMaska,s]:[r.onMaska,s]}An.has(o)?(n=An.get(o))==null||n.update(r):An.set(o,new Ga(o,r))},Za=["for"],Ja={class:"left-field"},Xa=["disabled"],Ya={class:"right-field"},He=v(i.defineComponent({__name:"PInput",props:i.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},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}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["blur","input"],["update:modelValue"]),setup(t){const e=i.useModel(t,"modelValue");return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Za)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",Ja,[i.renderSlot(n.$slots,"default",{},void 0,!0)]),i.withDirectives(i.createElementVNode("input",i.mergeProps(n.$attrs,{"onUpdate:modelValue":o[0]||(o[0]=r=>e.value=r),class:"text-field__input",style:{color:t.color},disabled:t.disabled,onBlur:o[1]||(o[1]=r=>n.$emit("blur",e.value)),onInput:o[2]||(o[2]=r=>n.$emit("input",e.value))}),null,16,Xa),[[i.vModelDynamic,e.value],[i.unref(ro),t.mask]]),i.createElementVNode("div",Ya,[i.renderSlot(n.$slots,"right",{},void 0,!0)])],4)],4))}}),[["__scopeId","data-v-3e6801ac"]]),Qa="ru-RU";class Ct{constructor(){d(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const o={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(o.year=n.year||n.year===void 0?n.year:o.year,o.month=n.month||n.month===void 0?n.month:o.month,o.day=n.day||n.day===void 0?n.day:o.day,o.hour=n.hour??o.hour,o.minute=n.minute??o.minute),Intl.DateTimeFormat(Qa,o).format(new Date(e))}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}}class je{constructor(e){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");B.BuildClass(this,e)}static Create(){const e=new je;return e.id=B.CreateUUID(),e}}class ot{constructor(e){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");B.BuildClass(this,e)}static Create(){const e=new ot;return e.id=B.CreateUUID(),e}}class qt{constructor(e){d(this,"id");d(this,"address");d(this,"description");B.BuildClass(this,e)}}class so{constructor(e){d(this,"id");d(this,"address");d(this,"description");B.BuildClass(this,e)}}var Ka=Object.defineProperty,Ut=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&Ka(e,n,r),r};const kt=class ji{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new qt]);d(this,"phones",[]);d(this,"websites",[]);B.BuildClass(this,e)}addEmail(){const e=je.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=ot.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ji;return e.id=B.CreateUUID(),e}removeEmail(e){B.RemoveFromClassById(e,this.emails)}removePhone(e){B.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new qt)}addWebsite(){this.websites.push(new so)}pushFirst(){this.emails.length||this.emails.push(new je),this.phones.length||this.phones.push(new ot)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}static CreateBufetContacts(){const e=new ji,n=new qt;return n.address="4-й Добрынинский пер., 4, 1А корпус, 7й этаж",e.postAddresses[0]=n,e}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};Ut([B.GetClassConstructor(je)],kt.prototype,"emails"),Ut([B.GetClassConstructor(qt)],kt.prototype,"postAddresses"),Ut([B.GetClassConstructor(ot)],kt.prototype,"phones"),Ut([B.GetClassConstructor(so)],kt.prototype,"websites");let rt=kt;class ce{constructor(e){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");B.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${oi.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,n){const o=new ce;return o.id=n??B.CreateUUID(),o.originalName=e.name,o.file=e.blob,o.fileSystemPath=B.CreateUUID(),o}uploadNewFile(e){this.id||(this.id=B.CreateUUID()),this.originalName=e.name,this.file=e.blob,this.fileSystemPath=B.CreateUUID()}setFile(e){this.file=e,this.url=e.src}uploadAndSetFile(e){this.uploadNewFile(e),this.setFile(e),this.url=e.url}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,n){if(e.target){let o="/src/services/assets/img/avatar.webp";return n&&(o=`@/assets/img/${n}`),new URL(o,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)==="pdf"}getExtension(e){const n=e.split(".");return n[n.length-1]}}var X=(t=>(t.Date="date",t.String="string",t.Boolean="boolean",t.Number="number",t.Set="set",t.Join="join",t))(X||{}),de=(t=>(t.Eq="=",t.Ne="!=",t.Gt=">",t.Lt="<",t.Btw="between",t.In="in",t.Like="like",t.Null="is null",t.NotNull="is not null",t))(de||{}),el=Object.defineProperty,tl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&el(e,n,r),r};const ao=class St{constructor(e){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",de.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",X.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");B.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===X.Join){const n=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===de.In?n&&Ie.Eq(this.set,e.set):n}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===X.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===X.String?this.value1===(e==null?void 0:e.value1):this.type===X.Join&&this.set.length?Ie.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",n=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===X.Boolean?`"boolean":${this.boolean}`:"",c=this.type===X.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===X.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===X.Number?`"number":${this.number}`:"",h=this.type===X.Set||this.operator===de.In?`"set":${JSON.stringify(this.set)}`:"",f=this.type===X.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,n,o,r,s,a,c,l,u,h,f].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===de.Eq||this.operator===de.Gt||this.operator===de.Lt}isBetweenFilter(){return this.operator===de.Btw}isSetFilter(){return this.operator===de.In}static Create(e,n,o){const r=new St;return r.model=e.GetClassName(),r.col=n??"",r.type=o,r.type===X.Number&&(r.value1="0"),r.type===X.String&&(r.value1=""),r.type===X.Boolean&&(r.value1="false",r.operator=de.Eq),r}static CreateFilterModel(e,n,o){const r=new St;return r.id=ke(),r.model=typeof e=="string"?e:e.GetClassName(),r.col=n??"",r.type=o,r.type===X.Number&&(r.value1="0"),r.type===X.String&&(r.value1=""),r.type===X.Boolean&&(r.value1="false"),r}static CreateFilterModelWithJoin(e,n,o,r,s,a,c,l){const u=new St;return u.id=ke(),u.joinTable=o,u.joinTablePk=r,u.joinTableFk=s,u.col=n,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(e,n,o,r,s,a,c){const l=new St;return l.model=e,l.joinTableModel=o,l.joinTablePk=r,l.joinTableFk=s,l.col=n,l.type=X.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(e,n){const o=new St;return o.id=ke(),o.model=q.ToCamelCase(e.GetClassName()),o.joinTableModel=q.ToCamelCase(n.GetClassName()),o.type=X.Join,o}addToSet(...e){e.forEach(n=>{if(this.set.indexOf(n)===-1){this.set.push(n);return}this.set=this.set.filter(o=>o!==n)})}pushToSet(...e){e.forEach(n=>{this.set.indexOf(n)===-1&&this.set.push(n)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return i.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,n){if(!e&&!n){this.dropDates();return}if(!n){this.setDate1(e),this.operator=de.Eq;return}this.setDate2(n),this.operator=de.Btw}};tl([B.GetClassConstructor(String)],ao.prototype,"set");let In=ao;class nl{constructor(){d(this,"operation",de.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",n=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,n,r,s,a].filter(c=>c!=="").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 Wt{constructor(e){d(this,"offset",0);d(this,"limit",25);d(this,"cursor",new nl);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");B.BuildClass(this,e)}setLoadMore(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.tableName=o,this.cursorMode=!0}setLoadMoreV2(e,n,o){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=de.Gt,this.cursor.column=n,this.cursor.model=o,this.cursorMode=!0,this.version="v2"}setOffset(e){this.offset=e}toUrlQuery(){const e=`"offset":${this.offset}`,n=`"limit":${this.limit}`,o=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,n,o,r,s,a].toString()}fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),o=new URLSearchParams(decodeURIComponent(n));this.offset=Number(o.get("offset")),this.limit=Number(o.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.limit)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.offset/this.limit+1}drop(){this.offset=0,this.limit=25,B.BuildClass(this)}}class Gt{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(e,n){const o=new Gt;return o.model=e.GetClassName(),o.cols=n,o}}var Ve=(t=>(t.Asc="asc",t.Desc="desc",t))(Ve||{});class jt{constructor(e){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);B.BuildClass(this,e)}static Create(e,n,o=Ve.Asc,r,s){const a=new jt;return a.model=e.GetClassName(),a.col=n??"",a.order=o??Ve.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===Ve.Asc}isDesc(){return this.order===Ve.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",n=this.col?`"col":"${this.col}"`:"",o=this.order?`"order":"${this.order}"`:"";return[e,n,o].toString()}async fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("s=")+2,e.indexOf("|")),o=new URLSearchParams(decodeURIComponent(n));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")??""}}var il=Object.defineProperty,Zt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&il(e,n,r),r};const Et=(Se=class{constructor(e){d(this,"id");d(this,"f",[]);d(this,"s",[]);d(this,"p",new Wt);d(this,"t",new Gt);B.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new Se),this.instance}createFrom(e){const n=new Se(JSON.parse(e));this.f=n.f}clearForHTTP(){const e=new Se(this);return e.f=this.f.map(n=>Se.EmptyEntiries(n)),e.s=this.s.map(n=>Se.EmptyEntiries(n)),e.p=Se.EmptyEntiries(this.p),e.t=Se.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(n=>e.id===n.id)}getFirstSortModel(){return Ie.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}replaceF(e,n){this.removeF(n),e&&this.setF(e)}removeF(e){const n=this.f.findIndex(o=>o.eq(e));B.RemoveFromClassByIndex(n,this.f)}reset(){this.f=[],this.s=[],this.p=new Wt}resetF(){this.f=[]}},d(Se,"instance"),Se);Zt([B.GetClassConstructor(In)],Et.prototype,"f"),Zt([B.GetClassConstructor(jt)],Et.prototype,"s"),Zt([B.GetClassConstructor(Wt)],Et.prototype,"p"),Zt([B.GetClassConstructor(Gt)],Et.prototype,"t");let Q=Et;var ol=Object.defineProperty,rl=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ol(e,n,r),r};class Vn{constructor(e){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"citizenship","");d(this,"placeBirth","");d(this,"carNumber","");d(this,"carModel","");d(this,"snils","");d(this,"photoId");d(this,"photo",new ce);d(this,"photoMiniId");d(this,"photoMini",new ce);d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contact",new rt);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);B.BuildClass(this,e)}getImageUrl(){return this.photo.fileSystemPath?this.photo.getFileUrl():new URL("/src/services/assets/img/avatar.webp",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:he&&he.tagName.toUpperCase()==="SCRIPT"&&he.src||new URL("sprof.umd.cjs",document.baseURI).href)}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=q.Capitalize(this.name),this.surname=q.Capitalize(this.surname),this.patronymic=q.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}getFileInfos(){const e=[];return e.push(this.photo),e.push(this.photoMini),e}removePhoto(){this.photo=new ce,this.photoId=void 0}removePhotoMini(){this.photoMini=new ce,this.photoMiniId=void 0}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}initContact(){this.contact=rt.Create(),this.contactId=this.contact.id}}rl([B.GetClassConstructor(rt)],Vn.prototype,"contact");class Ze{constructor(e,n,o,r){d(this,"text","Сохранить");d(this,"type",le.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=e,this.type=o,this.action=n,r!==void 0&&(this.condition=r)}static Primary(e,n,o){return new Ze(e,n,le.Primary,o)}static Success(e,n,o){return new Ze(e,n,le.Success,o)}static Warning(e,n,o){return new Ze(e,n,le.Warning,o)}static Error(e,n,o){return new Ze(e,n,le.Error,o)}}var lo=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(lo||{}),ue=(t=>(t.String="string",t.Text="text",t.Number="number",t.Date="date",t.DateTime="dateTime",t.Radio="radio",t.Set="set",t.Boolean="boolean",t.Files="files",t.File="file",t.MatrixRadio="matrixRadio",t.MatrixSet="matrixSet",t))(ue||{});class co{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",lo.simple);B.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===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}/*!
15
15
  * vue-router v4.4.5
16
16
  * (c) 2024 Eduardo San Martin Morote
17
17
  * @license MIT
18
- */function uo(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var ho;(function(t){t.pop="pop",t.push="push"})(ho||(ho={}));var fo;(function(t){t.back="back",t.forward="forward",t.unknown=""})(fo||(fo={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var mo;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(mo||(mo={}));const sl=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function al(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function ll(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){uo("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(sl,{}).value;if(!e){process.env.NODE_ENV!=="production"&&uo("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}al(e,"leaveGuards",t)}function po(t,e){const n=[],o=e||De.Asc,r=o===De.Asc?De.Desc:De.Asc;return Object.values(t).forEach(s=>{n.push(s(o)),n.push(s(r))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}class cl{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=po(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 Ve=new cl;var we=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(we||{});class go extends Ze{constructor(){super(...arguments);d(this,"id","auth-button");d(this,"status",we.Login);d(this,"submit",!1)}GetStatus(){return this.status}}let Pn=class extends go{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"disabled",!1)}};class zn extends go{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"disabled",!1)}}class dl{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Jt extends dl{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}}var st=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(st||{});const ul=/\S+@\S+\.\S+/;class yo{constructor(){d(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),ul.test(e)||this.errors.push("Некорректный email"),this.errors}}class Xt extends Jt{constructor(){super(...arguments);d(this,"id","field-auth-email");d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new yo);d(this,"method",st.Email)}}class hl{constructor(){d(this,"errors",[]);d(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Yt extends Jt{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new hl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id","field-auth-password")}}class wo extends Jt{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id","field-auth-password-repeat")}}const bo={[we.Login]:{methods:[st.Email],title:"Вход в систему",action:"login",buttons:[new Pn,new zn],fields:[new Xt,new Yt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[we.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new zn,new Pn],fields:[new Xt,new Yt,new wo],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[we.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[],fields:[new Xt]},[we.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[],fields:[new Yt]}};let fl=class{constructor(){d(this,"settings",bo);d(this,"status",we.Login);d(this,"selectedMethod",st.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(o=>{o.value&&n.set(o.name,o.value)}),n}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Status(){return this.status}GetCurSet(){return this.settings[this.status]}IsLogin(){return this.status===we.Login}IsRegister(){return this.status===we.Register}IsRestore(){return this.status===we.Restore}IsRefresh(){return this.status===we.Refresh}SetStatus(e){this.status=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.submit=!1}),e.length>0&&(e[0].submit=!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.status=we.Login}};class ml{constructor(){d(this,"visible",!1);d(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class xe{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Ee=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Ee||{});class pl{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return xe.Get(Ee.AccessToken)}getRefreshToken(){return xe.Get(Ee.RefreshToken)}setAccessToken(e){xe.Set(Ee.AccessToken,e)}setRefreshToken(e){xe.Set(Ee.RefreshToken,e)}reset(){xe.Remove(Ee.AccessToken),xe.Remove(Ee.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class gl{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(xe.Get(Ee.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),xe.Set(Ee.User,this.user))}reset(){this.user=void 0,xe.Remove(Ee.User)}actualize(){const e=xe.Get(Ee.User);e&&this.set(e)}}class yl{constructor(){d(this,"isAuth",!1);d(this,"user",new gl);d(this,"tokens",new pl);d(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)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){A.Notification.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.user.get()&&this.tokens.getAccessToken()&&this.tokens.getRefreshToken()){this.isAuth=!0;return}this.Logout()}}class wl{constructor(){d(this,"form",new fl);d(this,"status",new yl);d(this,"modal",new ml)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}}const So=new wl;class bl{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const Sl=new bl;class Cl{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return q.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(o=>q.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 n;return this.filterString?(n=e.children)==null?void 0:n.filter(o=>q.SearchIn(o.name,this.filterString)):e.children}}const kl=new Cl;class El{constructor(){d(this,"Menu",kl);d(this,"Head",Sl)}}const vl=new El;class Co{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class ko extends Co{constructor(){super(...arguments);d(this,"type",le.Success);d(this,"text","");d(this,"title","")}showMessage(n,o){this.hide(),this.type=o,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,le.Info)}Success(n){this.showMessage(n,le.Success)}Error(n){this.showMessage(n,le.Error)}Warning(n){this.showMessage(n,le.Warning)}FormMessage(n){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const r of Object.keys(n))n[r][0]&&n[r][0].message&&(o+=`<li>${n[r][0].message}</li>`);return o+="</ul>",o}}class Ml extends ko{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((o,r)=>{this.resolve=o,this.reject=r})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const Bl=new Ml;class xl extends Co{Show(){super.show()}Hide(){super.hide()}}const Nl=new xl;class vt{static Get(e,n,o="-"){return!e||!n?"":`${e}${o}${n}`}static In(e,n,o){return e>=n&&e<=o}static Intersects(e,n,o,r){return e===o||n===r||e>o&&e<r||n>o&&n<r||n>r&&e<o}}const Eo=1e3,vo=60*Eo,Tn=60*vo;var Mt=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Mt||{});const Qt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class _{static S(e){return Eo*e}static M(e){return vo*e}static H(e){return Tn*e}static D(e){return Tn*e}static W(e){return Tn*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=_.SplitHM(e);return n.length>1?_.HtoM(n[0])+n[1]:_.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=_.SplitHM(e);return _.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const o=new Date,r=_.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return _.ConcatHM(a,c)}static ConcatHM(e,n){return`${e}:${_.NormalizeTime(n)}`}static DiffM(e,n){return _.Gt(n,e)?_.HMtoM(n)-_.HMtoM(e):_.HMtoM(e)-_.HMtoM(n)}static GetPeriod(e,n){return vt.Get(e,n)}static Gt(e,n){return _.HMtoM(e)>_.HMtoM(n)}static GtOrEq(e,n){return _.Gt(e,n)||_.Eq(e,n)}static Eq(e,n){return _.HMtoM(e)===_.HMtoM(n)}static PeriodInPeriod(e,n,o,r){return _.HMtoM(e)>=_.HMtoM(o)&&_.HMtoM(n)<=_.HMtoM(r)}static PeriodsIntersects(e,n,o,r){return vt.Intersects(_.HMtoM(e),_.HMtoM(n),_.HMtoM(o),_.HMtoM(r))}}class Bt{static Wait(e,n){return new Promise(o=>setTimeout(()=>o(n),e))}static WaitS(e,n){return Bt.Wait(_.S(e),n)}static WaitM(e,n){return Bt.Wait(_.M(e),n)}}class Rl extends ko{constructor(){super(...arguments);d(this,"duration",_.S(3))}showMessage(n,o){super.showMessage(n,o),typeof n!="string"&&(this.duration=n.duration??this.duration),Bt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",o=le.Warning;super.showMessage(n,o)}Save(){const n="Изменения успешно сохранены",o=le.Success;super.showMessage(n,o)}}const $l=new Rl;class Al{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Il=new Al;class A{}d(A,"Auth",i.reactive(So)),d(A,"AdminUI",i.reactive(vl)),d(A,"Dialog",i.reactive(Bl)),d(A,"Notification",i.reactive($l)),d(A,"Loading",i.reactive(Nl)),d(A,"Paginator",i.reactive(Il));function Mo(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?A.Dialog.Save().then(()=>{s(),a()}).catch(()=>{A.Notification.Warning("Изменения не были сохранены"),a()}):a()}}}const Vl=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;Q.Get().reset(),Ve.Set(a==null?void 0:a.sortsLib),Q.Get().setSortModel(Ve.GetDefault()),Ve.Set(a==null?void 0:a.sortsLib),Q.Get().setSortModel(Ve.GetDefault()),A.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Mo(),o=s=>ll((a,c,l)=>{n((s||r)(),l)}),r=s=>async()=>{e.value=!0;try{s&&await s(),A.Notification.Success("Сохранено")}catch(a){A.Notification.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:o,submit:r}})();function Bo(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pl}=Object.prototype,{getPrototypeOf:Ln}=Object,Kt=(t=>e=>{const n=Pl.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=t=>(t=t.toLowerCase(),e=>Kt(e)===t),en=t=>e=>typeof e===t,{isArray:at}=Array,xt=en("undefined");function zl(t){return t!==null&&!xt(t)&&t.constructor!==null&&!xt(t.constructor)&&be(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const xo=Ne("ArrayBuffer");function Tl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&xo(t.buffer),e}const Ll=en("string"),be=en("function"),No=en("number"),tn=t=>t!==null&&typeof t=="object",Dl=t=>t===!0||t===!1,nn=t=>{if(Kt(t)!=="object")return!1;const e=Ln(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Fl=Ne("Date"),Ol=Ne("File"),_l=Ne("Blob"),Hl=Ne("FileList"),ql=t=>tn(t)&&be(t.pipe),Ul=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||be(t.append)&&((e=Kt(t))==="formdata"||e==="object"&&be(t.toString)&&t.toString()==="[object FormData]"))},Wl=Ne("URLSearchParams"),[Gl,jl,Zl,Jl]=["ReadableStream","Request","Response","Headers"].map(Ne),Xl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),at(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let c;for(o=0;o<a;o++)c=s[o],e.call(null,t[c],c,t)}}function Ro(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$o=t=>!xt(t)&&t!==Je;function Dn(){const{caseless:t}=$o(this)&&this||{},e={},n=(o,r)=>{const s=t&&Ro(e,r)||r;nn(e[s])&&nn(o)?e[s]=Dn(e[s],o):nn(o)?e[s]=Dn({},o):at(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Nt(arguments[o],n);return e}const Yl=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&be(r)?t[s]=Bo(r,n):t[s]=r},{allOwnKeys:o}),t),Ql=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Kl=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ec=(t,e,n,o)=>{let r,s,a;const c={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&Ln(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},tc=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},nc=t=>{if(!t)return null;if(at(t))return t;let e=t.length;if(!No(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ic=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ln(Uint8Array)),oc=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},rc=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},sc=Ne("HTMLFormElement"),ac=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Ao=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lc=Ne("RegExp"),Io=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},cc=t=>{Io(t,(e,n)=>{if(be(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(be(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dc=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return at(t)?o(t):o(String(t).split(e)),n},uc=()=>{},hc=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Fn="abcdefghijklmnopqrstuvwxyz",Vo="0123456789",Po={DIGIT:Vo,ALPHA:Fn,ALPHA_DIGIT:Fn+Fn.toUpperCase()+Vo},fc=(t=16,e=Po.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function mc(t){return!!(t&&be(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const pc=t=>{const e=new Array(10),n=(o,r)=>{if(tn(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=at(o)?[]:{};return Nt(o,(a,c)=>{const l=n(a,r+1);!xt(l)&&(s[c]=l)}),e[r]=void 0,s}}return o};return n(t,0)},gc=Ne("AsyncFunction"),yc=t=>t&&(tn(t)||be(t))&&be(t.then)&&be(t.catch),zo=((t,e)=>t?setImmediate:e?((n,o)=>(Je.addEventListener("message",({source:r,data:s})=>{r===Je&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",be(Je.postMessage)),wc=typeof queueMicrotask<"u"?queueMicrotask.bind(Je):typeof process<"u"&&process.nextTick||zo,C={isArray:at,isArrayBuffer:xo,isBuffer:zl,isFormData:Ul,isArrayBufferView:Tl,isString:Ll,isNumber:No,isBoolean:Dl,isObject:tn,isPlainObject:nn,isReadableStream:Gl,isRequest:jl,isResponse:Zl,isHeaders:Jl,isUndefined:xt,isDate:Fl,isFile:Ol,isBlob:_l,isRegExp:lc,isFunction:be,isStream:ql,isURLSearchParams:Wl,isTypedArray:ic,isFileList:Hl,forEach:Nt,merge:Dn,extend:Yl,trim:Xl,stripBOM:Ql,inherits:Kl,toFlatObject:ec,kindOf:Kt,kindOfTest:Ne,endsWith:tc,toArray:nc,forEachEntry:oc,matchAll:rc,isHTMLForm:sc,hasOwnProperty:Ao,hasOwnProp:Ao,reduceDescriptors:Io,freezeMethods:cc,toObjectSet:dc,toCamelCase:ac,noop:uc,toFiniteNumber:hc,findKey:Ro,global:Je,isContextDefined:$o,ALPHABET:Po,generateString:fc,isSpecCompliantForm:mc,toJSONObject:pc,isAsyncFn:gc,isThenable:yc,setImmediate:zo,asap:wc};function D(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}C.inherits(D,Error,{toJSON:function(){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:C.toJSONObject(this.config),code:this.code,status:this.status}}});const To=D.prototype,Lo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Lo[t]={value:t}}),Object.defineProperties(D,Lo),Object.defineProperty(To,"isAxiosError",{value:!0}),D.from=(t,e,n,o,r,s)=>{const a=Object.create(To);return C.toFlatObject(t,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),D.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const bc=null;function On(t){return C.isPlainObject(t)||C.isArray(t)}function Do(t){return C.endsWith(t,"[]")?t.slice(0,-2):t}function Fo(t,e,n){return t?t.concat(e).map(function(r,s){return r=Do(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Sc(t){return C.isArray(t)&&!t.some(On)}const Cc=C.toFlatObject(C,{},null,function(e){return/^is[A-Z]/.test(e)});function on(t,e,n){if(!C.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,b){return!C.isUndefined(b[E])});const o=n.metaTokens,r=n.visitor||h,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(e);if(!C.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(C.isDate(g))return g.toISOString();if(!l&&C.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(g)||C.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function h(g,E,b){let x=g;if(g&&!b&&typeof g=="object"){if(C.endsWith(E,"{}"))E=o?E:E.slice(0,-2),g=JSON.stringify(g);else if(C.isArray(g)&&Sc(g)||(C.isFileList(g)||C.endsWith(E,"[]"))&&(x=C.toArray(g)))return E=Do(E),x.forEach(function(O,L){!(C.isUndefined(O)||O===null)&&e.append(a===!0?Fo([E],L,s):a===null?E:E+"[]",u(O))}),!1}return On(g)?!0:(e.append(Fo(b,E,s),u(g)),!1)}const f=[],m=Object.assign(Cc,{defaultVisitor:h,convertValue:u,isVisitable:On});function y(g,E){if(!C.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(g),C.forEach(g,function(x,F){(!(C.isUndefined(x)||x===null)&&r.call(e,x,C.isString(F)?F.trim():F,E,m))===!0&&y(x,E?E.concat(F):[F])}),f.pop()}}if(!C.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Oo(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function _n(t,e){this._pairs=[],t&&on(t,this,e)}const _o=_n.prototype;_o.append=function(e,n){this._pairs.push([e,n])},_o.toString=function(e){const n=e?function(o){return e.call(this,o,Oo)}:Oo;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function kc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ho(t,e,n){if(!e)return t;const o=n&&n.encode||kc,r=n&&n.serialize;let s;if(r?s=r(e,n):s=C.isURLSearchParams(e)?e.toString():new _n(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class qo{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,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){C.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Uo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ec={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_n,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hn=typeof window<"u"&&typeof document<"u",qn=typeof navigator=="object"&&navigator||void 0,vc=Hn&&(!qn||["ReactNative","NativeScript","NS"].indexOf(qn.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bc=Hn&&window.location.href||"http://localhost",me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hn,hasStandardBrowserEnv:vc,hasStandardBrowserWebWorkerEnv:Mc,navigator:qn,origin:Bc},Symbol.toStringTag,{value:"Module"})),...Ec};function xc(t,e){return on(t,new me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return me.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Nc(t){return C.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Rc(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function Wo(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&C.isArray(r)?r.length:a,l?(C.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!C.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&C.isArray(r[a])&&(r[a]=Rc(r[a])),!c)}if(C.isFormData(t)&&C.isFunction(t.entries)){const n={};return C.forEachEntry(t,(o,r)=>{e(Nc(o),r,n,0)}),n}return null}function $c(t,e,n){if(C.isString(t))try{return(e||JSON.parse)(t),C.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(t)}const Rt={transitional:Uo,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=C.isObject(e);if(s&&C.isHTMLForm(e)&&(e=new FormData(e)),C.isFormData(e))return r?JSON.stringify(Wo(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e)||C.isReadableStream(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return xc(e,this.formSerializer).toString();if((c=C.isFileList(e))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return on(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),$c(e)):e}],transformResponse:[function(e){const n=this.transitional||Rt.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(C.isResponse(e)||C.isReadableStream(e))return e;if(e&&C.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],t=>{Rt.headers[t]={}});const Ac=C.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"]),Ic=t=>{const e={};let n,o,r;return t&&t.split(`
18
+ */function uo(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var ho;(function(t){t.pop="pop",t.push="push"})(ho||(ho={}));var fo;(function(t){t.back="back",t.forward="forward",t.unknown=""})(fo||(fo={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var mo;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(mo||(mo={}));const sl=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function al(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function ll(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){uo("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(sl,{}).value;if(!e){process.env.NODE_ENV!=="production"&&uo("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}al(e,"leaveGuards",t)}function po(t,e){const n=[],o=e||Ve.Asc,r=o===Ve.Asc?Ve.Desc:Ve.Asc;return Object.values(t).forEach(s=>{n.push(s(o)),n.push(s(r))}),n.length>0&&!n.some(s=>s.default)&&(n[0].default=!0),e&&n.forEach(s=>{s.default&&(s.default=s.order===e)}),n}class cl{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=po(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 Pe=new cl;var we=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(we||{});class go extends Ze{constructor(){super(...arguments);d(this,"id","auth-button");d(this,"status",we.Login);d(this,"submit",!1)}GetStatus(){return this.status}}let Pn=class extends go{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"disabled",!1)}};class zn extends go{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"disabled",!1)}}class dl{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}class Jt extends dl{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}}var st=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(st||{});const ul=/\S+@\S+\.\S+/;class yo{constructor(){d(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),ul.test(e)||this.errors.push("Некорректный email"),this.errors}}class Xt extends Jt{constructor(){super(...arguments);d(this,"id","field-auth-email");d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new yo);d(this,"method",st.Email)}}class hl{constructor(){d(this,"errors",[]);d(this,"length",6)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль недостаточной длины"),this.errors)}}class Yt extends Jt{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new hl);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id","field-auth-password")}}class wo extends Jt{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id","field-auth-password-repeat")}}const bo={[we.Login]:{methods:[st.Email],title:"Вход в систему",action:"login",buttons:[new Pn,new zn],fields:[new Xt,new Yt],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[we.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new zn,new Pn],fields:[new Xt,new Yt,new wo],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[we.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[],fields:[new Xt]},[we.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[],fields:[new Yt]}};let fl=class{constructor(){d(this,"settings",bo);d(this,"status",we.Login);d(this,"selectedMethod",st.Email)}async Block(e){await e()}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(o=>{o.value&&n.set(o.name,o.value)}),n}Validate(){return[]}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Status(){return this.status}GetCurSet(){return this.settings[this.status]}IsLogin(){return this.status===we.Login}IsRegister(){return this.status===we.Register}IsRestore(){return this.status===we.Restore}IsRefresh(){return this.status===we.Refresh}SetStatus(e){this.status=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.submit=!1}),e.length>0&&(e[0].submit=!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.status=we.Login}};class ml{constructor(){d(this,"visible",!1);d(this,"closable",!1)}IsClosable(){return this.closable}IsVisible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class xe{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Ee=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Ee||{});class pl{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return xe.Get(Ee.AccessToken)}getRefreshToken(){return xe.Get(Ee.RefreshToken)}setAccessToken(e){xe.Set(Ee.AccessToken,e)}setRefreshToken(e){xe.Set(Ee.RefreshToken,e)}reset(){xe.Remove(Ee.AccessToken),xe.Remove(Ee.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class gl{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(this.userConstructor)return this.user=new this.userConstructor(xe.Get(Ee.User)),this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),xe.Set(Ee.User,this.user))}reset(){this.user=void 0,xe.Remove(Ee.User)}actualize(){const e=xe.Get(Ee.User);e&&this.set(e)}}class yl{constructor(){d(this,"isAuth",!1);d(this,"user",new gl);d(this,"tokens",new pl);d(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)}SetState(e){this.user.set(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){A.Notification.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.user.get()&&this.tokens.getAccessToken()&&this.tokens.getRefreshToken()){this.isAuth=!0;return}this.Logout()}}class wl{constructor(){d(this,"form",new fl);d(this,"status",new yl);d(this,"modal",new ml)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}}const So=new wl;class bl{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const Sl=new bl;class Cl{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return q.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(o=>q.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 n;return this.filterString?(n=e.children)==null?void 0:n.filter(o=>q.SearchIn(o.name,this.filterString)):e.children}}const kl=new Cl;class El{constructor(){d(this,"Menu",kl);d(this,"Head",Sl)}}const vl=new El;class Co{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class ko extends Co{constructor(){super(...arguments);d(this,"type",le.Success);d(this,"text","");d(this,"title","")}showMessage(n,o){this.hide(),this.type=o,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,le.Info)}Success(n){this.showMessage(n,le.Success)}Error(n){this.showMessage(n,le.Error)}Warning(n){this.showMessage(n,le.Warning)}FormMessage(n){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const r of Object.keys(n))n[r][0]&&n[r][0].message&&(o+=`<li>${n[r][0].message}</li>`);return o+="</ul>",o}}class Ml extends ko{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((o,r)=>{this.resolve=o,this.reject=r})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const Bl=new Ml;class xl extends Co{Show(){super.show()}Hide(){super.hide()}}const Nl=new xl;class vt{static Get(e,n,o="-"){return!e||!n?"":`${e}${o}${n}`}static In(e,n,o){return e>=n&&e<=o}static Intersects(e,n,o,r){return e===o||n===r||e>o&&e<r||n>o&&n<r||n>r&&e<o}}const Eo=1e3,vo=60*Eo,Tn=60*vo;var Mt=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Mt||{});const Qt={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class _{static S(e){return Eo*e}static M(e){return vo*e}static H(e){return Tn*e}static D(e){return Tn*e}static W(e){return Tn*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=_.SplitHM(e);return n.length>1?_.HtoM(n[0])+n[1]:_.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=_.SplitHM(e);return _.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const o=new Date,r=_.SplitHM(e);o.setHours(r[0],r[1],0,0);const s=new Date(o.getTime()+n*6e4),a=s.getHours(),c=s.getMinutes();return _.ConcatHM(a,c)}static ConcatHM(e,n){return`${e}:${_.NormalizeTime(n)}`}static DiffM(e,n){return _.Gt(n,e)?_.HMtoM(n)-_.HMtoM(e):_.HMtoM(e)-_.HMtoM(n)}static GetPeriod(e,n){return vt.Get(e,n)}static Gt(e,n){return _.HMtoM(e)>_.HMtoM(n)}static GtOrEq(e,n){return _.Gt(e,n)||_.Eq(e,n)}static Eq(e,n){return _.HMtoM(e)===_.HMtoM(n)}static PeriodInPeriod(e,n,o,r){return _.HMtoM(e)>=_.HMtoM(o)&&_.HMtoM(n)<=_.HMtoM(r)}static PeriodsIntersects(e,n,o,r){return vt.Intersects(_.HMtoM(e),_.HMtoM(n),_.HMtoM(o),_.HMtoM(r))}}class Bt{static Wait(e,n){return new Promise(o=>setTimeout(()=>o(n),e))}static WaitS(e,n){return Bt.Wait(_.S(e),n)}static WaitM(e,n){return Bt.Wait(_.M(e),n)}}class Rl extends ko{constructor(){super(...arguments);d(this,"duration",_.S(3))}showMessage(n,o){super.showMessage(n,o),typeof n!="string"&&(this.duration=n.duration??this.duration),Bt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",o=le.Warning;super.showMessage(n,o)}Save(){const n="Изменения успешно сохранены",o=le.Success;super.showMessage(n,o)}}const $l=new Rl;class Al{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Il=new Al;class A{}d(A,"Auth",i.reactive(So)),d(A,"AdminUI",i.reactive(vl)),d(A,"Dialog",i.reactive(Bl)),d(A,"Notification",i.reactive($l)),d(A,"Loading",i.reactive(Nl)),d(A,"Paginator",i.reactive(Il));function Mo(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?A.Dialog.Save().then(()=>{s(),a()}).catch(()=>{A.Notification.Warning("Изменения не были сохранены"),a()}):a()}}}const Vl=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;Q.Get().reset(),Pe.Set(a==null?void 0:a.sortsLib),Q.Get().setSortModel(Pe.GetDefault()),Pe.Set(a==null?void 0:a.sortsLib),Q.Get().setSortModel(Pe.GetDefault()),A.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Mo(),o=s=>ll((a,c,l)=>{n((s||r)(),l)}),r=s=>async()=>{e.value=!0;try{s&&await s(),A.Notification.Success("Сохранено")}catch(a){A.Notification.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:o,submit:r}})();function Bo(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pl}=Object.prototype,{getPrototypeOf:Ln}=Object,Kt=(t=>e=>{const n=Pl.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=t=>(t=t.toLowerCase(),e=>Kt(e)===t),en=t=>e=>typeof e===t,{isArray:at}=Array,xt=en("undefined");function zl(t){return t!==null&&!xt(t)&&t.constructor!==null&&!xt(t.constructor)&&be(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const xo=Ne("ArrayBuffer");function Tl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&xo(t.buffer),e}const Ll=en("string"),be=en("function"),No=en("number"),tn=t=>t!==null&&typeof t=="object",Dl=t=>t===!0||t===!1,nn=t=>{if(Kt(t)!=="object")return!1;const e=Ln(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Fl=Ne("Date"),Ol=Ne("File"),_l=Ne("Blob"),Hl=Ne("FileList"),ql=t=>tn(t)&&be(t.pipe),Ul=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||be(t.append)&&((e=Kt(t))==="formdata"||e==="object"&&be(t.toString)&&t.toString()==="[object FormData]"))},Wl=Ne("URLSearchParams"),[Gl,jl,Zl,Jl]=["ReadableStream","Request","Response","Headers"].map(Ne),Xl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),at(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let c;for(o=0;o<a;o++)c=s[o],e.call(null,t[c],c,t)}}function Ro(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$o=t=>!xt(t)&&t!==Je;function Dn(){const{caseless:t}=$o(this)&&this||{},e={},n=(o,r)=>{const s=t&&Ro(e,r)||r;nn(e[s])&&nn(o)?e[s]=Dn(e[s],o):nn(o)?e[s]=Dn({},o):at(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Nt(arguments[o],n);return e}const Yl=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&be(r)?t[s]=Bo(r,n):t[s]=r},{allOwnKeys:o}),t),Ql=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Kl=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ec=(t,e,n,o)=>{let r,s,a;const c={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&Ln(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},tc=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},nc=t=>{if(!t)return null;if(at(t))return t;let e=t.length;if(!No(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ic=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ln(Uint8Array)),oc=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},rc=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},sc=Ne("HTMLFormElement"),ac=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Ao=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lc=Ne("RegExp"),Io=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},cc=t=>{Io(t,(e,n)=>{if(be(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(be(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dc=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return at(t)?o(t):o(String(t).split(e)),n},uc=()=>{},hc=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Fn="abcdefghijklmnopqrstuvwxyz",Vo="0123456789",Po={DIGIT:Vo,ALPHA:Fn,ALPHA_DIGIT:Fn+Fn.toUpperCase()+Vo},fc=(t=16,e=Po.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function mc(t){return!!(t&&be(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const pc=t=>{const e=new Array(10),n=(o,r)=>{if(tn(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=at(o)?[]:{};return Nt(o,(a,c)=>{const l=n(a,r+1);!xt(l)&&(s[c]=l)}),e[r]=void 0,s}}return o};return n(t,0)},gc=Ne("AsyncFunction"),yc=t=>t&&(tn(t)||be(t))&&be(t.then)&&be(t.catch),zo=((t,e)=>t?setImmediate:e?((n,o)=>(Je.addEventListener("message",({source:r,data:s})=>{r===Je&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",be(Je.postMessage)),wc=typeof queueMicrotask<"u"?queueMicrotask.bind(Je):typeof process<"u"&&process.nextTick||zo,C={isArray:at,isArrayBuffer:xo,isBuffer:zl,isFormData:Ul,isArrayBufferView:Tl,isString:Ll,isNumber:No,isBoolean:Dl,isObject:tn,isPlainObject:nn,isReadableStream:Gl,isRequest:jl,isResponse:Zl,isHeaders:Jl,isUndefined:xt,isDate:Fl,isFile:Ol,isBlob:_l,isRegExp:lc,isFunction:be,isStream:ql,isURLSearchParams:Wl,isTypedArray:ic,isFileList:Hl,forEach:Nt,merge:Dn,extend:Yl,trim:Xl,stripBOM:Ql,inherits:Kl,toFlatObject:ec,kindOf:Kt,kindOfTest:Ne,endsWith:tc,toArray:nc,forEachEntry:oc,matchAll:rc,isHTMLForm:sc,hasOwnProperty:Ao,hasOwnProp:Ao,reduceDescriptors:Io,freezeMethods:cc,toObjectSet:dc,toCamelCase:ac,noop:uc,toFiniteNumber:hc,findKey:Ro,global:Je,isContextDefined:$o,ALPHABET:Po,generateString:fc,isSpecCompliantForm:mc,toJSONObject:pc,isAsyncFn:gc,isThenable:yc,setImmediate:zo,asap:wc};function D(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}C.inherits(D,Error,{toJSON:function(){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:C.toJSONObject(this.config),code:this.code,status:this.status}}});const To=D.prototype,Lo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Lo[t]={value:t}}),Object.defineProperties(D,Lo),Object.defineProperty(To,"isAxiosError",{value:!0}),D.from=(t,e,n,o,r,s)=>{const a=Object.create(To);return C.toFlatObject(t,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),D.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const bc=null;function On(t){return C.isPlainObject(t)||C.isArray(t)}function Do(t){return C.endsWith(t,"[]")?t.slice(0,-2):t}function Fo(t,e,n){return t?t.concat(e).map(function(r,s){return r=Do(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Sc(t){return C.isArray(t)&&!t.some(On)}const Cc=C.toFlatObject(C,{},null,function(e){return/^is[A-Z]/.test(e)});function on(t,e,n){if(!C.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,b){return!C.isUndefined(b[E])});const o=n.metaTokens,r=n.visitor||h,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(e);if(!C.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(C.isDate(g))return g.toISOString();if(!l&&C.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(g)||C.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function h(g,E,b){let x=g;if(g&&!b&&typeof g=="object"){if(C.endsWith(E,"{}"))E=o?E:E.slice(0,-2),g=JSON.stringify(g);else if(C.isArray(g)&&Sc(g)||(C.isFileList(g)||C.endsWith(E,"[]"))&&(x=C.toArray(g)))return E=Do(E),x.forEach(function(O,L){!(C.isUndefined(O)||O===null)&&e.append(a===!0?Fo([E],L,s):a===null?E:E+"[]",u(O))}),!1}return On(g)?!0:(e.append(Fo(b,E,s),u(g)),!1)}const f=[],m=Object.assign(Cc,{defaultVisitor:h,convertValue:u,isVisitable:On});function y(g,E){if(!C.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(g),C.forEach(g,function(x,F){(!(C.isUndefined(x)||x===null)&&r.call(e,x,C.isString(F)?F.trim():F,E,m))===!0&&y(x,E?E.concat(F):[F])}),f.pop()}}if(!C.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Oo(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function _n(t,e){this._pairs=[],t&&on(t,this,e)}const _o=_n.prototype;_o.append=function(e,n){this._pairs.push([e,n])},_o.toString=function(e){const n=e?function(o){return e.call(this,o,Oo)}:Oo;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function kc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ho(t,e,n){if(!e)return t;const o=n&&n.encode||kc,r=n&&n.serialize;let s;if(r?s=r(e,n):s=C.isURLSearchParams(e)?e.toString():new _n(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class qo{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,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){C.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Uo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ec={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_n,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hn=typeof window<"u"&&typeof document<"u",qn=typeof navigator=="object"&&navigator||void 0,vc=Hn&&(!qn||["ReactNative","NativeScript","NS"].indexOf(qn.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bc=Hn&&window.location.href||"http://localhost",me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hn,hasStandardBrowserEnv:vc,hasStandardBrowserWebWorkerEnv:Mc,navigator:qn,origin:Bc},Symbol.toStringTag,{value:"Module"})),...Ec};function xc(t,e){return on(t,new me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return me.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Nc(t){return C.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Rc(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function Wo(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&C.isArray(r)?r.length:a,l?(C.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!C.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&C.isArray(r[a])&&(r[a]=Rc(r[a])),!c)}if(C.isFormData(t)&&C.isFunction(t.entries)){const n={};return C.forEachEntry(t,(o,r)=>{e(Nc(o),r,n,0)}),n}return null}function $c(t,e,n){if(C.isString(t))try{return(e||JSON.parse)(t),C.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(t)}const Rt={transitional:Uo,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=C.isObject(e);if(s&&C.isHTMLForm(e)&&(e=new FormData(e)),C.isFormData(e))return r?JSON.stringify(Wo(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e)||C.isReadableStream(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return xc(e,this.formSerializer).toString();if((c=C.isFileList(e))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return on(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),$c(e)):e}],transformResponse:[function(e){const n=this.transitional||Rt.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(C.isResponse(e)||C.isReadableStream(e))return e;if(e&&C.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],t=>{Rt.headers[t]={}});const Ac=C.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"]),Ic=t=>{const e={};let n,o,r;return t&&t.split(`
19
19
  `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Ac[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Go=Symbol("internals");function $t(t){return t&&String(t).trim().toLowerCase()}function rn(t){return t===!1||t==null?t:C.isArray(t)?t.map(rn):String(t)}function Vc(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Pc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Un(t,e,n,o,r){if(C.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!C.isString(e)){if(C.isString(o))return e.indexOf(o)!==-1;if(C.isRegExp(o))return o.test(e)}}function zc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Tc(t,e){const n=C.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class pe{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(c,l,u){const h=$t(l);if(!h)throw new Error("header name must be a non-empty string");const f=C.findKey(r,h);(!f||r[f]===void 0||u===!0||u===void 0&&r[f]!==!1)&&(r[f||l]=rn(c))}const a=(c,l)=>C.forEach(c,(u,h)=>s(u,h,l));if(C.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(C.isString(e)&&(e=e.trim())&&!Pc(e))a(Ic(e),n);else if(C.isHeaders(e))for(const[c,l]of e.entries())s(l,c,o);else e!=null&&s(n,e,o);return this}get(e,n){if(e=$t(e),e){const o=C.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Vc(r);if(C.isFunction(n))return n.call(this,r,o);if(C.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=$t(e),e){const o=C.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Un(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=$t(a),a){const c=C.findKey(o,a);c&&(!n||Un(o,o[c],c,n))&&(delete o[c],r=!0)}}return C.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Un(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return C.forEach(this,(r,s)=>{const a=C.findKey(o,s);if(a){n[a]=rn(r),delete n[s];return}const c=e?zc(s):String(s).trim();c!==s&&delete n[s],n[c]=rn(r),o[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return C.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&C.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
20
20
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Go]=this[Go]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=$t(a);o[c]||(Tc(r,a),o[c]=!0)}return C.isArray(e)?e.forEach(s):s(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(pe.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),C.freezeMethods(pe);function Wn(t,e){const n=this||Rt,o=e||n,r=pe.from(o.headers);let s=o.data;return C.forEach(t,function(c){s=c.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function jo(t){return!!(t&&t.__CANCEL__)}function lt(t,e,n){D.call(this,t??"canceled",D.ERR_CANCELED,e,n),this.name="CanceledError"}C.inherits(lt,D,{__CANCEL__:!0});function Zo(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Dc(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),h=o[s];a||(a=u),n[r]=l,o[r]=u;let f=s,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),u-a<e)return;const y=h&&u-h;return y?Math.round(m*1e3/y):void 0}}function Fc(t,e){let n=0,o=1e3/e,r,s;const a=(u,h=Date.now())=>{n=h,r=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=o?a(u,h):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-f)))},()=>r&&a(r)]}const sn=(t,e,n=3)=>{let o=0;const r=Dc(50,250);return Fc(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),h=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&h?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},Jo=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},Xo=t=>(...e)=>C.asap(()=>t(...e)),Oc=me.hasStandardBrowserEnv?function(){const e=me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const c=C.isString(a)?r(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),_c=me.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];C.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),C.isString(o)&&a.push("path="+o),C.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Hc(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Yo(t,e){return t&&!Hc(e)?qc(t,e):e}const Qo=t=>t instanceof pe?{...t}:t;function Xe(t,e){e=e||{};const n={};function o(u,h,f){return C.isPlainObject(u)&&C.isPlainObject(h)?C.merge.call({caseless:f},u,h):C.isPlainObject(h)?C.merge({},h):C.isArray(h)?h.slice():h}function r(u,h,f){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u,f)}else return o(u,h,f)}function s(u,h){if(!C.isUndefined(h))return o(void 0,h)}function a(u,h){if(C.isUndefined(h)){if(!C.isUndefined(u))return o(void 0,u)}else return o(void 0,h)}function c(u,h,f){if(f in e)return o(u,h);if(f in t)return o(void 0,u)}const l={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,responseEncoding:a,validateStatus:c,headers:(u,h)=>r(Qo(u),Qo(h),!0)};return C.forEach(Object.keys(Object.assign({},t,e)),function(h){const f=l[h]||r,m=f(t[h],e[h],h);C.isUndefined(m)&&f!==c||(n[h]=m)}),n}const Ko=t=>{const e=Xe({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=e;e.headers=a=pe.from(a),e.url=Ho(Yo(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(C.isFormData(n)){if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...h]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...h].join("; "))}}if(me.hasStandardBrowserEnv&&(o&&C.isFunction(o)&&(o=o(e)),o||o!==!1&&Oc(e.url))){const u=r&&s&&_c.read(s);u&&a.set(r,u)}return e},Uc=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){const r=Ko(t);let s=r.data;const a=pe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,h,f,m,y,g;function E(){y&&y(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,!0),b.timeout=r.timeout;function x(){if(!b)return;const O=pe.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),z={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:t,request:b};Zo(function(Be){n(Be),E()},function(Be){o(Be),E()},z),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(o(new D("Request aborted",D.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new D("Network Error",D.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let L=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const z=r.transitional||Uo;r.timeoutErrorMessage&&(L=r.timeoutErrorMessage),o(new D(L,z.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&C.forEach(a.toJSON(),function(L,z){b.setRequestHeader(z,L)}),C.isUndefined(r.withCredentials)||(b.withCredentials=!!r.withCredentials),c&&c!=="json"&&(b.responseType=r.responseType),u&&([m,g]=sn(u,!0),b.addEventListener("progress",m)),l&&b.upload&&([f,y]=sn(l),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(h=O=>{b&&(o(!O||O.type?new lt(null,t,b):O),b.abort(),b=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const F=Lc(r.url);if(F&&me.protocols.indexOf(F)===-1){o(new D("Unsupported protocol "+F+":",D.ERR_BAD_REQUEST,t));return}b.send(s||null)})},Wc=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,c();const h=u instanceof Error?u:this.reason;o.abort(h instanceof D?h:new lt(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,s(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>C.asap(c),l}},Gc=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let o=0,r;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},jc=async function*(t,e){for await(const n of Zc(t))yield*Gc(n,e)},Zc=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:o}=await e.read();if(n)break;yield o}}finally{await e.cancel()}},er=(t,e,n,o)=>{const r=jc(t,e);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await r.next();if(u){c(),l.close();return}let f=h.byteLength;if(n){let m=s+=f;n(m)}l.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},an=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",tr=an&&typeof ReadableStream=="function",Jc=an&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),nr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Xc=tr&&nr(()=>{let t=!1;const e=new Request(me.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ir=64*1024,Gn=tr&&nr(()=>C.isReadableStream(new Response("").body)),ln={stream:Gn&&(t=>t.body)};an&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ln[e]&&(ln[e]=C.isFunction(t[e])?n=>n[e]():(n,o)=>{throw new D(`Response type '${e}' is not supported`,D.ERR_NOT_SUPPORT,o)})})})(new Response);const Yc=async t=>{if(t==null)return 0;if(C.isBlob(t))return t.size;if(C.isSpecCompliantForm(t))return(await new Request(me.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(C.isArrayBufferView(t)||C.isArrayBuffer(t))return t.byteLength;if(C.isURLSearchParams(t)&&(t=t+""),C.isString(t))return(await Jc(t)).byteLength},Qc=async(t,e)=>{const n=C.toFiniteNumber(t.getContentLength());return n??Yc(e)},jn={http:bc,xhr:Uc,fetch:an&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:m}=Ko(t);u=u?(u+"").toLowerCase():"text";let y=Wc([r,s&&s.toAbortSignal()],a),g;const E=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(l&&Xc&&n!=="get"&&n!=="head"&&(b=await Qc(h,o))!==0){let z=new Request(e,{method:"POST",body:o,duplex:"half"}),Ce;if(C.isFormData(o)&&(Ce=z.headers.get("content-type"))&&h.setContentType(Ce),z.body){const[Be,Ge]=Jo(b,sn(Xo(l)));o=er(z.body,ir,Be,Ge)}}C.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;g=new Request(e,{...m,signal:y,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:x?f:void 0});let F=await fetch(g);const O=Gn&&(u==="stream"||u==="response");if(Gn&&(c||O&&E)){const z={};["status","statusText","headers"].forEach(wt=>{z[wt]=F[wt]});const Ce=C.toFiniteNumber(F.headers.get("content-length")),[Be,Ge]=c&&Jo(Ce,sn(Xo(c),!0))||[];F=new Response(er(F.body,ir,Be,()=>{Ge&&Ge(),E&&E()}),z)}u=u||"text";let L=await ln[C.findKey(ln,u)||"text"](F,t);return!O&&E&&E(),await new Promise((z,Ce)=>{Zo(z,Ce,{data:L,headers:pe.from(F.headers),status:F.status,statusText:F.statusText,config:t,request:g})})}catch(x){throw E&&E(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,t,g),{cause:x.cause||x}):D.from(x,x&&x.code,t,g)}})};C.forEach(jn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const or=t=>`- ${t}`,Kc=t=>C.isFunction(t)||t===null||t===!1,rr={getAdapter:t=>{t=C.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!Kc(n)&&(o=jn[(a=String(n)).toLowerCase()],o===void 0))throw new D(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
21
21
  `+s.map(or).join(`
@@ -38,5 +38,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
38
38
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
39
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
40
  PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */function Qr(t,e){var n,o;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),o=t+"-"+e):(n=t||e,o=t||e),{name:n,classname:o}}function Kr(t){return/^blob:/.test(t)}function es(t){return Kr(t)||function(e){return/^data:/.test(e)}(t)}function mt(t){return!!(t&&t.constructor&&t.call&&t.apply)}function ne(t){return t===void 0}function pn(t){return typeof t=="object"&&t!==null}function Mi(t,e,n){var o={};return pn(t)?(Object.keys(e).forEach(function(r){ne(t[r])?o[r]=e[r]:pn(e[r])?pn(t[r])?o[r]=Mi(t[r],e[r],n[r]):o[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?o[r]=!!t[r]:o[r]=t[r]}),o):t?e:n}function gn(t){var e=Number(t);return Number.isNaN(e)?t:e}function ts(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!ns(t)}function ns(t){return t!=t}function is(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Lt=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},nh=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},Bi=function(t){this.type="move",this.directions=t},ih=function(){function t(e,n,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=n,this.anchor=s}return t.prototype.shift=function(){var e=this,n=e.element,o=e.anchor,r=e.position;if(n){var s=n.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},t}(),xi={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(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=nt(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:t.clientX-n,top:t.clientY-s,bottom:r-t.clientY,right:o-t.clientX}},processMove:function(t,e){var n=nt(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var o=this.$refs.draggable;this.$emit("drag",new ih(t,o,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},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"]};xi.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.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)})},[i.renderSlot(t.$slots,"default")],34)};var Ni=$e("vue-handler-wrapper"),os={name:"HandlerWrapper",components:{DraggableElement:xi},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=Qr(this.horizontalPosition,this.verticalPosition);t=Ni((ve(e={},n.classname,!0),ve(e,"disabled",this.disabled),e))}else t=Ni({disabled:this.disabled});return{root:t,draggable:Ni("draggable")}}},emits:["leave","enter","drag","drag-end"]};os.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:s.classes.root},[i.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var oh=$e("vue-line-wrapper"),rs={name:"LineWrapper",components:{DraggableElement:xi},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return oh((ve(t={},this.position,!0),ve(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};rs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var Pe=["left","right","top","bottom"],rh=["left","right"],sh=["top","bottom"],ah=["left","top"],lh=["fill-area","fit-area","stencil","none"],ss={left:0,top:0,width:0,height:0};function as(t,e,n){return!(n=n||["width","height","left","top"]).some(function(o){return t[o]!==e[o]})}function ze(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function pt(t,e){return{left:t.left-e.left,top:t.top-e.top}}function se(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function Dt(t,e){var n={left:0,top:0,right:0,bottom:0};return Pe.forEach(function(o){var r=e[o],s=ze(t)[o];n[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),n}function Te(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function yn(t){return{left:-t.left,top:-t.top}}function ye(t,e){return V(V({},t),{left:t.left+e.left,top:t.top+e.top})}function Me(t,e,n,o){if(e!==1){if(n){var r=se(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function G(t){return t.width/t.height}function gt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function yt(t,e){var n={left:0,top:0},o=Dt(t,e);return o.left&&o.left>0?n.left=o.left:o.right&&o.right>0&&(n.left=-o.right),o.top&&o.top>0?n.top=o.top:o.bottom&&o.bottom>0&&(n.top=-o.bottom),n}function Ri(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function ls(t,e){var n=G(t),o=G(e);return e.width<1/0&&e.height<1/0?n>o?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function cs(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function Ue(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function wn(t,e){var n=Dt(ae(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,gt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,gt(t,e)):1}function ae(t,e,n){n===void 0&&(n=!1);var o=yt(t,e);return ye(t,n?yn(o):o)}function $i(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function ch(t,e){return V(V({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function ds(t,e,n){n===void 0&&(n=!0);var o={};return Pe.forEach(function(r){var s=t[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?n?Math.max(s,a):Math.min(s,a):n?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function bn(t,e){return ds(t,e,!0)}function us(t){var e=t.size,n=t.aspectRatio,o=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||G(e)>=n.minimum&&G(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function hs(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Oe(t){var e=t.width,n=t.height,o=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,m){return us({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:h})&&(!f||hs(m,{width:e,height:n})<hs(f,{width:e,height:n}))?m:f},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),us({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ai(t){var e=t.event,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=ye(n,e.directions);return ye(s,yt(s,r))}function dh(t){var e=t.coordinates,n=t.transform,o=t.imageSize,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,l=function(h,f){return Ai({coordinates:h,positionRestrictions:s,event:new Bi({left:f.left-h.left,top:f.top-h.top})})},u=V({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};ne((f=typeof h=="function"?h({coordinates:u,imageSize:o,visibleArea:c}):h).width)&&ne(f.height)||(u=function(m,y){var g=V(V(V({},m),Oe({width:y.width,height:y.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(g,{left:m.left,top:m.top})}(u,V(V({},u),f))),ne(f.left)&&ne(f.top)||(u=l(u,V(V({},u),f)))}),u}function uh(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio;var s=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var l,u,h,f=V({},o),m=V({},r),y=V({},s);l=G(y),u=G(f),h===void 0&&(h=.001),(l===0||u===0?Math.abs(u-l)<h:Math.abs(u/l)<1+h&&Math.abs(u/l)>1-h)||(f=V(V({},f),Oe({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:G(y),maximum:G(y)}})));var g=wn(m=Me(m,f.width*n.width/(m.width*y.width)),e({visibleArea:m,type:"resize"}));return g!==1&&(m=Me(m,g),f=Me(f,g)),m=ae(m=ye(m,pt(se(f),se(m))),e({visibleArea:m,type:"move"})),{coordinates:f=ae(f,bn(ze(m),c)),visibleArea:m}}function hh(t){var e=t.event,n=t.getAreaRestrictions,o=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=V({},r),l=V({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,o.width,G(o)>G(c)?(u.height=.8*o.height,u.width=u.height*G(c)):(u.width=.8*o.width,u.height=u.width*G(c));var h=wn(l=Me(l,c.width*o.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=Me(l,h),h!==1&&(u.height/=h,u.width/=h),l=ae(l=ye(l,pt(se(c),se(l))),n({visibleArea:l,type:"move"})),c=ae(c,bn(ze(l),a))}return{coordinates:c,visibleArea:l}}function fh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.getAreaRestrictions,s=V({},o),a=V({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=Me(s,Math.min(a.width/s.width,gt(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=Me(s,Math.min(a.height/s.height,gt(s,r({visibleArea:s,type:"resize"}))))),s=ae(s=ye(s,yn(yt(a,ze(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function mh(t){var e=t.imageSize,n=t.visibleArea,o=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-o.width/2,top:(n?n.top:0)+r.height/2-o.height/2}}function ph(t){var e=t.imageSize,n=t.visibleArea,o=t.aspectRatio,r=t.sizeRestrictions,s=n||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,G(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Oe(V(V({},c),{aspectRatio:o,sizeRestrictions:r}))}function gh(t){var e,n,o=t.imageSize,r=t.visibleArea,s=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,l=t.stencilSize,u=r||o;return G(u)>G(s)?n=(e=l.height*u.height/s.height)*G(l):e=(n=l.width*u.width/s.width)/G(l),Oe({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function yh(t){var e=t.getAreaRestrictions,n=t.coordinates,o=t.imageSize,r=G(t.boundaries);if(n){var s={height:Math.max(n.height,o.height),width:Math.max(n.width,o.width)},a=ls({width:G(s)>r?s.width:s.height*r,height:G(s)>r?s.width/r:s.height},$i(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},l=Dt(n,ze(V({left:0,top:0},o))),u={};return!l.left&&!l.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!l.top&&!l.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),ae(c,u)}var h=G(o);return a={height:h>r?o.height:o.width/r,width:h>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 Sn(t,e){return ds(t,ze(e))}function wh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,l=e.scale,u=e.move,h=V({},o),f=V({},n),m=1,y=1,g=l.factor&&Math.abs(l.factor-1)>.001;h=ye(h,{left:u.left||0,top:u.top||0});var E={stencil:{minimum:Math.max(r.minWidth?r.minWidth/f.width:0,r.minHeight?r.minHeight/f.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/f.width:1/0,r.maxHeight?r.maxHeight/f.height:1/0,gt(f,a))},area:{maximum:gt(h,s({visibleArea:h,type:"resize"}))}};l.factor&&g&&(l.factor<1?(y=Math.max(l.factor,E.stencil.minimum))>1&&(y=1):l.factor>1&&(y=Math.min(l.factor,Math.min(E.area.maximum,E.stencil.maximum)))<1&&(y=1)),y&&(h=Me(h,y,l.center));var b=n.left-o.left,x=o.width+o.left-(n.width+n.left),F=n.top-o.top,O=o.height+o.top-(n.height+n.top);return h=ae(h=ye(h,yt(h,{left:a.left!==void 0?a.left-b*y:void 0,top:a.top!==void 0?a.top-F*y:void 0,bottom:a.bottom!==void 0?a.bottom+O*y:void 0,right:a.right!==void 0?a.right+x*y:void 0})),s({visibleArea:h,type:"move"})),f.width=f.width*y,f.height=f.height*y,f.left=h.left+b*y,f.top=h.top+F*y,f=ae(f,bn(ze(h),a)),l.factor&&g&&c&&(l.factor>1?m=Math.min(E.area.maximum,l.factor)/y:l.factor<1&&(m=Math.max(f.height/h.height,f.width/h.width,l.factor/y)),m!==1&&(h=ye(h=ae(h=Me(h,m,l.factor>1?l.center:se(f)),s({visibleArea:h,type:"move"})),yn(yt(f,ze(h)))))),{coordinates:f,visibleArea:h}}function bh(t){var e=t.aspectRatio,n=t.getAreaRestrictions,o=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,l=t.previousImageSize,u=t.angle,h=V({},o),f=V({},r),m=Ue(se(V({left:0,top:0},l)),u);return(h=V(V({},Oe({sizeRestrictions:s,aspectRatio:e,width:h.width,height:h.height})),Ue(se(h),u))).left-=m.left-c.width/2+h.width/2,h.top-=m.top-c.height/2+h.height/2,f=Me(f,wn(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=ae(h,a),visibleArea:f=ae(f=ye(f,pt(se(h),se(o))),n({visibleArea:f,type:"move"}))}}function Sh(t){var e=t.flip,n=t.previousFlip,o=t.rotate,r=t.getAreaRestrictions,s=t.coordinates,a=t.visibleArea,c=t.imageSize,l=V({},s),u=V({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var m=Ue({left:c.width/2,top:c.height/2},-o),y=Ue(se(l),-o),g=Ue({left:h?m.left-(y.left-m.left):y.left,top:f?m.top-(y.top-m.top):y.top},o);l=ye(l,pt(g,se(l))),y=Ue(se(u),-o),u=ae(u=ye(u,pt(g=Ue({left:h?m.left-(y.left-m.left):y.left,top:f?m.top-(y.top-m.top):y.top},o),se(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function fs(t){var e=t.directions,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,l=V({},e),u=Te(n,l).width,h=Te(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-s.minWidth)/(l.left/l.right),l.right=-(n.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-s.minWidth):l.right<0&&(l.right=-(n.width-s.minWidth))),h<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-s.minHeight):l.bottom<0&&(l.bottom=-(n.height-s.minHeight)));var f=Dt(Te(n,l),r);c&&(f.left&&f.left>0&&f.right===0?(l.right+=f.left,l.left-=f.left):f.right&&f.right>0&&f.left===0&&(l.left+=f.right,l.right-=f.right),f.top&&f.top>0&&f.bottom===0?(l.bottom+=f.top,l.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(l.top+=f.bottom,l.bottom-=f.bottom),f=Dt(Te(n,l),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Pe.forEach(function(E){var b=f[E];b&&l[E]&&(m[E]=Math.max(0,1-b/l[E]))}),a){var y=Math.min.apply(null,Pe.map(function(E){return m[E]}));y!==1/0&&Pe.forEach(function(E){l[E]*=y})}else Pe.forEach(function(E){m[E]!==1/0&&(l[E]*=m[E])});if(u=Te(n,l).width,h=Te(n,l).height,l.right+l.left&&(u>s.maxWidth?m.width=(s.maxWidth-n.width)/(l.right+l.left):u<s.minWidth&&(m.width=(s.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(h>s.maxHeight?m.height=(s.maxHeight-n.height)/(l.bottom+l.top):h<s.minHeight&&(m.height=(s.minHeight-n.height)/(l.bottom+l.top))),a){var g=Math.min(m.width,m.height);g!==1/0&&Pe.forEach(function(E){l[E]*=g})}else m.width!==1/0&&rh.forEach(function(E){l[E]*=m.width}),m.height!==1/0&&sh.forEach(function(E){l[E]*=m.height});return l}function Cn(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var Ch=$e("vue-simple-handler"),kh=$e("vue-simple-handler-wrapper"),Ii={name:"SimpleHandler",components:{HandlerWrapper:os},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 t,e=(ve(t={},this.horizontalPosition,!!this.horizontalPosition),ve(t,this.verticalPosition,!!this.verticalPosition),ve(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ve(t,"hover",this.hover),t);return{default:K(Ch(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(kh(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ii.render=function(t,e,n,o,r,s){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Eh=$e("vue-simple-line"),vh=$e("vue-simple-line-wrapper"),Vi={name:"SimpleLine",components:{LineWrapper:rs},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:K(Eh(ve({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(vh(ve({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Vi.render=function(t,e,n,o,r,s){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Pi=$e("vue-bounding-box"),Mh=["east","west",null],Bh=["south","north",null],ms={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 Ii}},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 Vi}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return Mh.forEach(function(e){Bh.forEach(function(n){if(e!==n){var o=Qr(e,n),r=o.name,s=o.classname;t.push({name:r,classname:s,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,o=this.linesWrappersClasses;return{root:Pi(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:o}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:K(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:K(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,o=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var s={name:r.name,component:t.handlersComponent,class:K(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:K(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&o){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?n:a==="west"?0:n/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=Pi("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(s.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else s.wrapperClass=Pi("handler",ve({},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(t,e,n){var o,r=t.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=s:e==="east"&&(c.right+=s),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?o="width":n&&!e&&(o="height"),this.resizable&&this.$emit("resize",new nh(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};ms.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var xh=$e("vue-draggable-area"),ps={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:xh()}}},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(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=nt(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):is({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top;this.anchor={x:t.clientX-n,y:t.clientY-o}},processMove:function(t,e){var n=nt(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&n.length===1&&this.$emit("move",new Bi({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};ps.render=function(t,e,n,o,r,s){return i.openBlock(),i.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)})},[i.renderSlot(t.$slots,"default")],544)};function zi(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function Nh(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),h=u.length,f=new ArrayBuffer(h),m=new Uint8Array(f),y=0;y<h;y++)m[y]=u.charCodeAt(y);return f}(t));else if(/^blob:/i.test(t)){var o=new FileReader;o.onload=function(l){e(l.target.result)},s=t,a=function(l){o.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("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",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var s,a,c})}function gs(t){var e=t.rotate,n=t.flip,o=t.scaleX,r=t.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(n.horizontal?-1:1)+") ",s+=" scaleY("+r*(n.vertical?-1:1)+") "}function Rh(t){try{var e,n=new DataView(t),o=void 0,r=void 0,s=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,l=2;l+1<c;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){s=l;break}l++}if(s&&(o=s+10,function(y,g,E){var b,x="";for(b=g,E+=g;b<E;b++)x+=String.fromCharCode(y.getUint8(b));return x}(n,s+4,4)==="Exif")){var u=n.getUint16(o);if(((r=u===18761)||u===19789)&&n.getUint16(o+2,r)===42){var h=n.getUint32(o+4,r);h>=8&&(a=o+h)}}if(a){for(var f=n.getUint16(a,r),m=0;m<f;m++)if(l=a+12*m+2,n.getUint16(l,r)===274){l+=8,e=n.getUint16(l,r),n.setUint16(l,1,r);break}}return e}catch{return null}}function ys(t,e){var n=e.getBoundingClientRect(),o=n.left,r=n.top,s={left:0,top:0},a=0;return t.forEach(function(c){s.left+=(c.clientX-o)/t.length,s.top+=(c.clientY-r)/t.length}),t.forEach(function(c){a+=is({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:t.length}}var ws={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=vi(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Lt({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 n=ys(e,this.$refs.container),o=this.oldGeometricProperties;o.count===n.count&&o.count>1&&this.$emit("resize",new Lt({left:o.centerMass.left-n.centerMass.left,top:o.centerMass.top-n.centerMass.top},{factor:o.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),o=n.left,r=n.top,s=n.bottom,a=n.right;this.touches=nt(t.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=ys(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=nt(t.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||ns(c)?c:c>0?1:-1),s={left:t.clientX-n,top:t.clientY-o};this.$emit("resize",new Lt({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};ws.render=function(t,e,n,o,r,s){return i.openBlock(),i.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)})},[i.renderSlot(t.$slots,"default")],544)};var Ti={components:{TransformableImage:ws},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"]};Ti.render=function(t,e,n,o,r,s){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var kn=$e("vue-preview"),bs={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:kn({fill:this.fill}),wrapper:kn("wrapper"),imageWrapper:kn("image-wrapper"),image:K(kn("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={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&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,o=this.imageSize.height,r=cs({width:n,height:o},e.rotate),s={width:"".concat(n,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
42
- `.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+gs(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(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.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 t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};bs.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var Ss={components:{Preview:bs},inheritAttrs:!1};Ss.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Li=$e("vue-rectangle-stencil"),Cs={name:"RectangleStencil",components:{StencilPreview:Ss,BoundingBox:ms,DraggableArea:ps},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Ii}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Vi}},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:K(Li({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:K(Li("preview"),this.previewClass),boundingBox:K(Li("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"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(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),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"]};Cs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),l=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.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 $h=["transitions"],_e=$e("vue-advanced-cropper"),ks={name:"Cropper",components:{BackgroundWrapper:Ti},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Cs}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Ti}},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(t){return lh.indexOf(t)!==-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(t){return!(typeof t=="string"&&t!=="fill"&&t!=="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(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=V(V({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},l=V({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Pe.forEach(function(L){u[L]||(l[L]=0)});var h=Te(a,l=fs({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,f=Te(a,l).height,m=c.preserveRatio?G(a):Ri(h/f,o);if(m){var y=c.respectDirection;if(y||(y=a.width>=a.height||m===1?"width":"height"),y==="width"){var g=h/m-a.height;if(u.top&&u.bottom){var E=l.top,b=l.bottom;l.bottom=Cn(g,b,E),l.top=Cn(g,E,b)}else u.bottom?l.bottom=g:u.top?l.top=g:u.right?l.right=0:u.left&&(l.left=0)}else if(y==="height"){var x=a.width-f*m;if(u.left&&u.right){var F=l.left,O=l.right;l.left=-Cn(x,F,O),l.right=-Cn(x,O,F)}else u.left?l.left=-x:u.right?l.right=-x:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=fs({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=Te(a,l).width,f=Te(a,l).height,(m=c.preserveRatio?G(a):Ri(h/f,o))&&Math.abs(m-h/f)>.001&&Pe.forEach(function(L){u[L]||(l[L]=0)}),Ai({event:new Bi({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ai},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=G(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=V(V({},n),Oe({width:n.width,height:n.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=ae(a=ye(a,pt(se(n),se(a))),bn(ze(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=V({},e);s.height=s.width/G(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Me(s,Math.max(r.height/s.height,r.width/s.width)));var a=yn(yt(r,ze(s=Me(s,wn(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ae(s=ye(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(G(n)>G(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(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},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:W({},ss)}},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 t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Mi(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Mi(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},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 t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ne(this.minWidth)?0:gn(this.minWidth),minHeight:ne(this.minHeight)?0:gn(this.minHeight),maxWidth:ne(this.maxWidth)?1/0:gn(this.maxWidth),maxHeight:ne(this.maxHeight)?1/0:gn(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,l=V(V({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=$i(r),h=ls(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>h.width)&&(l.maxWidth=Math.min(l.maxWidth,h.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>h.height)&&(l.maxHeight=Math.min(l.maxHeight,h.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:t,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(),n=$i(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:_e(),image:K(_e("image"),this.imageClass),stencil:_e("stencil"),boundaries:K(_e("boundaries"),this.boundariesClass),stretcher:K(_e("stretcher")),background:K(_e("background"),this.backgroundClass),foreground:K(_e("foreground"),this.foregroundClass),imageWrapper:K(_e("image-wrapper")),cropperWrapper:K(_e("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={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||(t.opacity="0"),t},imageStyle:function(){var t=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:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+gs(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 t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=vi(this.update,this.debounce),this.debouncedDisableTransitions=vi(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 t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Lt({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Lt({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ae(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:Sn(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?uh:this.autoZoom?hh:fh);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!as(s.visibleArea,e)||!as(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=eh(e,$h),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;o&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return V(V({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=V(V({},n),{directions:V({},n.directions)});return Pe.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=V(V({},n),{directions:V({},n.directions)});return ah.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var h=u.rotate,f=u.flip,m={width:l.naturalWidth,height:l.naturalHeight},y=cs(m,h),g=c.getContext("2d");c.height=y.height,c.width=y.width,g.save();var E=Ue(se(V({left:0,top:0},m)),h);return g.translate(-(E.left-y.width/2),-(E.top-y.height/2)),g.rotate(h*Math.PI/180),g.translate(f.horizontal?m.width:0,f.vertical?m.height:0),g.scale(f.horizontal?-1:1,f.vertical?-1:1),g.drawImage(l,0,0,m.width,m.height),g.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Oe({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var m=c.getContext("2d");m.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(m.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(m.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(m.fillStyle=f.fillColor,m.fillRect(0,0,c.width,c.height),m.save()));var y=u.left<0?-u.left:0,g=u.top<0?-u.top:0;m.drawImage(l,u.left+y,u.top+g,u.width,u.height,y*(c.width/u.width),g*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?ch(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?Sn(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return dh({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?gh:ph);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=mt(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||mh,s=[o,function(a){var c=a.coordinates;return W({},mt(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,nt(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(mt(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,h=a.width*c/a.height;return h>l&&(h=l,u=a.height*l/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||yh;t.visibleArea=mt(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=V({},n),a=G(o),s.width/s.height!==a&&(s.height=s.width/a),ae(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(es(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var n=ne(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){Nh(t).then(function(s){var a=Rh(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,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 t=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(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Kr(n)||!es(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,mt(this.defaultTransforms)?this.appliedImageTransforms=zi(this.defaultTransforms()):pn(this.defaultTransforms)?this.appliedImageTransforms=zi(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=zi({});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=W(W({},this.appliedImageTransforms),{},{flip:W({},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(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Sn(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Sn(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=wh(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(ne(e)&&(e=ne(r)?s:r),ne(n)&&(n=ne(r)?a:r),!t&&(ne(e)||ne(n))){var l=this.getStencilSize(),u=l?G(l):null;ne(e)&&(e=ts(u)?u:void 0),ne(n)&&(n=ts(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={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=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Ri(G(r=mt(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=Oe({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=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:G(r),maximum:G(r)}})),r;var t,e,n,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 W({},ss)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=Sh({flip:{horizontal:t?!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()}),c=a.visibleArea,l=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=bh({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Ah={key:0,ref:"canvas",style:{display:"none"}},Ih={key:1,ref:"sourceCanvas",style:{display:"none"}};ks.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.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:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",Ah,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",Ih,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Vh={class:"background-container"},Ph={class:"tools-line"},zh={class:"line-block"},Th={class:"dialog-footer"},Di=v(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=ai.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),l=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{l.value=!0;const y=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),y&&y.canvas.toBlob(g=>{var E;o("crop",{blob:g,src:(E=y.canvas)==null?void 0:E.toDataURL()})}),l.value=!1},m=y=>{var g;c.value=y.coordinates,u.value=(g=y.canvas)==null?void 0:g.toDataURL()};return(y,g)=>{const E=Ke,b=i.resolveComponent("el-form-item"),x=i.resolveComponent("el-form"),F=i.resolveComponent("el-button"),O=zt;return i.openBlock(),i.createBlock(O,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",Vh,[i.createElementVNode("div",Ph,[i.createElementVNode("div",zh,[i.createVNode(x,null,{default:i.withCtx(()=>[i.createVNode(b,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(E,{modelValue:i.unref(s),"onUpdate:modelValue":g[0]||(g[0]=L=>i.isRef(s)?s.value=L:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>g[1]||(g[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(ks),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:m},null,8,["src","stencil-props"]),i.createElementVNode("div",Th,[i.createVNode(F,{loading:i.unref(l),type:"success",onClick:f},{default:i.withCtx(()=>g[2]||(g[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-0707c63d"]]),Es=v(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=ge,l=fe,u=tt;return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:s.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(l,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-435691bb"]]),Lh={class:"mainblock"},Dh={class:"mainline"},vs=v(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",Lh,[i.createElementVNode("div",Dh,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-a4bc6b16"]]),Fh={class:"message-title"},Oh={class:"message-text"},En=v(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Fh,i.toDisplayString(t.title),1),i.createElementVNode("div",Oh,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-e3c1e672"]]),_h=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function Hh(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const Ms=v(_h,[["render",Hh]]),qh=i.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(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),Uh=["for"],Wh={class:"inside-icon"};function Gh(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",Wh,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,Uh),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-50a7d390><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-50a7d390></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-50a7d390></path></symbol></svg>',1))],64)}const Bs=v(qh,[["render",Gh],["__scopeId","data-v-50a7d390"]]),jh={width:"0",height:"0",class:"hidden"};function Zh(t,e){return i.openBlock(),i.createElementBlock("svg",jh,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-left"},[i.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)]))}const Jh={render:Zh},Xh={width:"0",height:"0",class:"hidden"};function Yh(t,e){return i.openBlock(),i.createElementBlock("svg",Xh,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-right"},[i.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)]))}const Qh={render:Yh},Kh={class:"tab"},ef={class:"rotate"},tf={key:0,class:"icon-arrow"},nf={key:1,class:"icon-arrow"},xs=v(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Kh,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",ef,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createElementBlock("svg",nf,r[1]||(r[1]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]))):(i.openBlock(),i.createElementBlock("svg",tf,r[0]||(r[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(i.unref(Jh)),i.createVNode(i.unref(Qh))],64))}}),[["__scopeId","data-v-2371e4d8"]]),of={class:"add-block_body"},Ns=v(i.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(t){return(e,n)=>{const o=dn;return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",of,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-b93bc8b1"]]),Fi=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b89bdc7a"]]),rf={class:"add-block_body"},Rs=v(i.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(t){return(e,n)=>{const o=dn,r=Fi;return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",rf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-e59e418e"]]),sf={class:"del-block_title"},af={class:"del-block_body"},$s=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",sf,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",af,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-362b7b0d"]]),lf=["onClick"],As=v(i.defineComponent({__name:"PTabs",props:{tabs:{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"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.tabs[0]),s=i.ref(window.innerWidth),a=i.ref(),c=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),l=()=>{s.value=window.innerWidth,c.value=a.value?a.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",l)),i.onUnmounted(()=>window.removeEventListener("resize",l));const u=i.computed(()=>`calc(100% - ${c.value}px + 1px)`),h=f=>{r.value=f,o("select",f)};return(f,m)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:a,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.tabs,y=>(i.openBlock(),i.createElementBlock("div",{key:y.id},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":y.id===i.unref(r).id,tab:i.unref(r).id!==y.id}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:g=>h(y)},i.toDisplayString(y.name),15,lf)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(u)})},[i.renderSlot(f.$slots,"default",{},void 0,!0)],4)],4))}}),[["__scopeId","data-v-5a83fbbf"]]),cf=["id"],df=["for"],uf={class:"left-field"},hf=["href","download"],ff={key:1,class:"text-field__input"},mf={class:"right-field"},pf=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new ce},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"",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(t,{emit:e}){const n=t,o=e,r=q.CreateGuid(),s=q.CreateGuid(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!l(h.name)){A.Notification.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const l=u=>{let h=hr.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=ge,m=$n,y=fe;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,cf),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,df)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",uf,[i.createVNode(m,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,hf),i.createVNode(y,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Pt,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",ff,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",mf,[i.createVNode(y,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),Is=v(pf,[["__scopeId","data-v-88abe1df"]]),gf={class:"bg"},Oi=v(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{A.Auth.Form.IsLogin()&&Qe.ToHome()};return(n,o)=>{const r=un;return i.openBlock(),i.createElementBlock("div",gf,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-14e033ce"]]),yf=Object.freeze(Object.defineProperty({__proto__:null,default:Oi},Symbol.toStringTag,{value:"Module"})),wf={},bf={style:{"text-align":"center"}};function Sf(t,e){return i.openBlock(),i.createElementBlock("div",bf,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const _i=v(wf,[["render",Sf]]),Cf=Object.freeze(Object.defineProperty({__proto__:null,default:_i},Symbol.toStringTag,{value:"Module"})),kf={class:"container"},Ef={key:0,class:"result"},vf={class:"list"},Mf=["onClick"],Hi=v(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function l(u){n("select",u)}return(u,h)=>{const f=gi,m=He;return i.openBlock(),i.createElementBlock("div",kf,[i.createVNode(m,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>i.isRef(r)?r.value=y:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",Ef,[i.createElementVNode("ul",vf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),y=>(i.openBlock(),i.createElementBlock("li",{key:y.value,onClick:g=>l(y)},i.toDisplayString(y.label),9,Mf))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-58b78c5c"]]),Bf={class:"footer"},Vs=v(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(A.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=En,s=fe;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(A)).Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",Bf,[i.createVNode(s,{type:"primary",text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PHelp"in n?n.PHelp:i.unref(A)).Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PHelp"in n?n.PHelp:i.unref(A)).Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-cbdf027e"]]),xf={};function Nf(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const Ps=v(xf,[["render",Nf],["__scopeId","data-v-879cfd55"]]),zs=v(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(A.Notification.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=En;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(A)).Notification.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(A)).Notification.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(A)).Notification.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-e8d26012"]]),Rf={style:{display:"flex","justify-content":"center",width:"100%"}},$f={class:"pag-number"},Af={class:"pag-ul"},If={key:2},Ts=v(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=y=>y?"active":"neutral",r=y=>y?"not-active":"neutral",s=A.Paginator,a=i.ref(!1),c=i.ref(!1),l=e;s.count=n.store.Count();const u=async y=>{if(y!==s.curPage){if(y<1&&(y=1),y>s.pagesCount()&&(y=s.pagesCount()),!n.showConfirm)return await h(y);A.Dialog.Save().then(async()=>{l("save"),await h(y)}).catch(async()=>{A.Notification.Warning("Изменения не были сохранены"),l("cancel"),await h(y)})}},h=async(y,g)=>{s.setCurPage(y),Q.Get().p.offset=(y-1)*s.limit,await n.store.FTSP(),m()},f=i.computed(()=>{const y=s.pagesCount();return y<8?Ie.GenerateNumsRange(2,y-1).filter(g=>g<y&&g>1):Ie.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(g=>g<y&&g>1)}),m=()=>{const y=document.querySelector(".el-table__body-wrapper"),g=document.querySelector("#list");y?y.scrollTo({top:0}):g&&g.scrollTo({top:0})};return i.onBeforeUnmount(()=>{Q.Get().p.drop()}),(y,g)=>{const E=yi,b=fe,x=bi,F=Ci,O=Si,L=wi;return i.openBlock(),i.createElementBlock("div",Rf,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",$f,[i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:g[0]||(g[0]=z=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(E)]),_:1},8,["type"]),i.createElementVNode("ul",Af,[i.createElementVNode("li",null,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:g[1]||(g[1]=z=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:g[3]||(g[3]=z=>a.value=!0),onMouseleave:g[4]||(g[4]=z=>a.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[2]||(g[2]=z=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(x,{key:0})):(i.openBlock(),i.createBlock(F,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),z=>(i.openBlock(),i.createElementBlock("li",{key:z},[i.createVNode(b,{skin:"pag",type:o(z===i.unref(s).curPage),text:z,onClick:Ce=>u(z)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:g[6]||(g[6]=z=>c.value=!0),onMouseleave:g[7]||(g[7]=z=>c.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[5]||(g[5]=z=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(O,{key:0})):(i.openBlock(),i.createBlock(F,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",If,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:g[8]||(g[8]=z=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:g[9]||(g[9]=z=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(L)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-6645cd2f"]]),Ls=v(i.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},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=di.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(m=>m.key===n.keyValue);return f&&(a.searchGroup=f),await di.Search(a),a.searchObjects},l=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const m=Hi;return i.openBlock(),i.createBlock(m,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=y=>i.isRef(r)?r.value=y:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:l,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-11ab26af"]]),Vf={class:"mainblock-body"},Pf={class:"mainblock-footer"},Ds=v(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",Vf,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",Pf,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-a670fb4a"]]),zf={class:"right-slider-content"},Tf={class:"right-slider-content-header"},Lf={class:"right-slider-content-box"},Df={class:"right-slider-button"},Fs=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const l=ge;return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(l,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(l,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",zf,[i.createElementVNode("div",Tf,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",Lf,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",Df,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-495a90f9"]]),Ff={class:"mainblock"},Of={class:"body-block"},_f={class:"tab-block"},Os=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{o("toggle",l)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(i.openBlock(),i.createElementBlock("div",Ff,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",Of,[i.renderSlot(l.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",_f,[i.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-eaeca0cc"]]),Hf={class:"mainblock"},qf={class:"body"},Uf={key:0,class:"title"},Wf={class:"title-line"},Gf={class:"icon-filter",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},jf={key:0,class:"help-block"},Zf={key:0,class:"title"},Jf={class:"title-line"},Xf={class:"icon-download",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},Yf={key:1,class:"icons"},_s=v(i.defineComponent({__name:"RSContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"6000px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!1),r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 6000px)").matches),a=()=>{o.value=!1,r.value=!1},c=()=>{o.value=!o.value},l=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.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: 6000px)").matches}),n.value=!0}),(u,h)=>{const f=pi,m=fe,y=mi;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Hf,[o.value|r.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:h[0]||(h[0]=g=>a())})):i.createCommentVNode("",!0),i.createElementVNode("div",qf,[i.createElementVNode("div",{class:"visability-block",style:i.normalizeStyle({maxWidth:s.value?"100%":"300px"})},[i.renderSlot(u.$slots,"visability",{},void 0,!0)],4),i.createElementVNode("div",{class:"filter-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"10px":"",right:s.value?"0px":"",width:(s.value,"100%"),zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0",marginRight:s.value?o.value?"0":"-200%":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:(s.value,"rgba(0, 0, 0, 0.35) 0px 5px 5px"),height:(s.value,"60vh")})},[s.value?(i.openBlock(),i.createElementBlock("div",Uf,[i.createElementVNode("div",Wf,[(i.openBlock(),i.createElementBlock("svg",Gf,h[5]||(h[5]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",style:{marginRight:"5px"},onClick:h[1]||(h[1]=g=>c())},h[6]||(h[6]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))]),i.renderSlot(u.$slots,"title-tools",{},void 0,!0)])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"filter",{},void 0,!0)],4),s.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",jf)),i.createElementVNode("div",{class:"download-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"60px":"",right:s.value?"0px":"",width:s.value?"77px":"",zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0 0 0 10px",marginRight:s.value?r.value?"-2px":"-130px":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:s.value?"rgba(0, 0, 0, 0.35) 0px 5px 5px":"",height:s.value?"150px":""})},[s.value?(i.openBlock(),i.createElementBlock("div",Zf,[i.createElementVNode("div",Jf,[(i.openBlock(),i.createElementBlock("svg",Xf,h[7]||(h[7]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",onClick:h[2]||(h[2]=g=>l())},h[8]||(h[8]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))])])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"download",{},void 0,!0)],4),s.value?(i.openBlock(),i.createElementBlock("div",Yf,[i.createVNode(m,{skin:"icon",margin:"0 0 0 10px",onClick:h[3]||(h[3]=g=>c())},{default:i.withCtx(()=>[i.createVNode(f,{color:"#006BB4"})]),_:1}),i.createVNode(m,{skin:"icon",margin:"13px 0 0 10px",onClick:h[4]||(h[4]=g=>l())},{default:i.withCtx(()=>[i.createVNode(y,{color:"#006BB4"})]),_:1})])):i.createCommentVNode("",!0)])]),h[9]||(h[9]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M12 10.5857L16.95 5.63574L18.364 7.04974L13.414 11.9997L18.364 16.9497L16.95 18.3637L12 13.4137L7.04999 18.3637L5.63599 16.9497L10.586 11.9997L5.63599 7.04974L7.04999 5.63574L12 10.5857Z"})])],-1))],64)}}}),[["__scopeId","data-v-468150ac"]]),Qf=["label","value"],Hs=v(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[ue.String]:"Текстовый ответ",[ue.Text]:"Развёрнутый текстовый ответ",[ue.Number]:"Числовой ответ",[ue.Date]:"Ответ в виде даты",[ue.Radio]:"Выбор одного из вариантов",[ue.Set]:"Выбор нескольких вариантов",[ue.File]:"Ответ в виде файла",[ue.MatrixRadio]:"Матрица с одним выбором",[ue.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=ge,l=Ke;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(l,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,Qf)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-6be05cd5"]]),Kf={class:"field"},qs=v(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),l=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const m=ge,y=i.resolveComponent("el-input"),g=i.resolveComponent("el-form-item"),E=i.resolveComponent("el-form"),b=fe;return i.openBlock(),i.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(tt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:l},{"open-inside-content":i.withCtx(()=>[i.createVNode(tt,{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:i.withCtx(()=>[i.createElementVNode("div",Kf,[i.createVNode(E,null,{default:i.withCtx(()=>[i.createVNode(g,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(b,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-890163ac"]]),em=["label","value"],Us=v(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Ve.GetDefault(),Q.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Ve.GetDefault(),Q.Get().setSortModel(r.value),Q.Get().p.drop(),o("load")},a=async c=>{Q.Get().p.drop(),await s(c)};return(c,l)=>{var h;const u=Ke;return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ve).Get(),(f,m)=>(i.openBlock(),i.createElementBlock("option",{key:m,label:f.label,value:f},null,8,em))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03971699"]]),tm=["label","value"],Ws=v(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Ve.GetDefault()});const r=async a=>{a||(o.value=Ve.GetDefault()),Q.Get().setSortModel(o.value),Q.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=Ke;return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ve).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,tm))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-98d731ba"]]),nm={class:"switch-container"},im={class:"line"},om={class:"line"},Gs=v(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var y;return{color:(y=u.value)!=null&&y.valueEq(f)?"#006bb4":"#B0A4C0"}},l=e,u=i.ref(void 0),h=async f=>{var m;(m=u.value)!=null&&m.valueEq(f)||(Q.Get().replaceF(f,u.value),u.value=f,l("load"))};return(f,m)=>{const y=ge;return i.openBlock(),i.createElementBlock("div",nm,[i.createElementVNode("div",im,[i.createVNode(y,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:m[0]||(m[0]=g=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(y,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:m[1]||(m[1]=g=>h())},null,8,["style"]),i.createVNode(y,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:m[2]||(m[2]=g=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",om,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:m[3]||(m[3]=g=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:m[4]||(m[4]=g=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:m[5]||(m[5]=g=>h(t.secondModel))},null,6),m[6]||(m[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-4776a738"]]),rm={},sm={class:"flex"};function am(t,e){return i.openBlock(),i.createElementBlock("div",sm,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const js=v(rm,[["render",am],["__scopeId","data-v-4d1abb74"]]),Zs=v(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=ge,l=fe,u=Tt,h=tt;return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-994f6522"]]),lm={class:"top-slider-content"},cm={class:"center"},Js=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",lm,[i.createElementVNode("div",cm,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-fec4dfde"]]),dm={id:"drop-area",class:"img-container"},um={key:0},hm=["src"],fm={class:"tools-button"},mm={class:"ins"},pm={key:1},gm=["id"],Xs=v(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:ce,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=q.CreateGuid(),a=i.ref(!1),c=i.ref(),l=b=>{const x=n.cropRatio?n.defaultRatio:0;ai.Open(hn.CreateCropper(b.url,x,n.fileInfo.id)),a.value=!0},u=()=>{A.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=b=>{n.fileInfo.setFile(b),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const b=document.getElementById("drop-area");b&&(b.addEventListener("dragover",x=>{m(x),b.classList.add("drag-over")}),b.addEventListener("dragleave",x=>{m(x),b.classList.remove("drag-over")}),b.addEventListener("dragenter",m),b.addEventListener("dragleave",m),b.addEventListener("drop",g),f=document.getElementById(s))});function m(b){b.preventDefault(),b.stopPropagation()}const y=()=>{f&&f.click()};function g(b){if(b.preventDefault(),!b.dataTransfer)return;const x=b.dataTransfer.files;x.length&&f&&(f.files=x,E())}const E=()=>{if(!f||!f.files||!f.files.length)return;const b=f.files[0];b.url=URL.createObjectURL(b),r.value=b,n.fileInfo.uploadNewFile(b),l(r.value)};return(b,x)=>{const F=fe,O=Di;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",dm,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",um,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,hm)],4),i.createElementVNode("div",fm,[i.createElementVNode("div",mm,[i.createVNode(F,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:x[0]||(x[0]=L=>l(i.unref(r)))}),i.createVNode(F,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:x[1]||(x[1]=L=>u())})])])])):(i.openBlock(),i.createElementBlock("div",pm,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(F,{skin:"text",text:"Добавить","font-size":"20px",onClick:y})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:E},null,40,gm),t.withCrop?(i.openBlock(),i.createBlock(O,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:x[2]||(x[2]=L=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-61aa63c7"]]),ym=["BaseStore","Contact","Static","Button","RouterGuard","Sizes","Human","FileInfo","Statuses","Email","FTSP","Arrays","Axios","brandColors","buildNameNumbers","Cache","CarouselSwipe","ClassHelper","Color","countRating","CreateSortModels","Cursor","DateFormat","DateMask","Dates","DatesFormatter","Dragger","Favourite","Extension","HttpClient","MakeCarousel","moveUp","moveDown","Period","PhoneService","Router","Scheduler","Scroll","Sorter","Strings","Time","TimeFormatter","Token","useConfirmLeavePage","validate","WaitElement","WebSocketClient","Hooks","ValueType","PHelp","FilterModel","SortModel"],wm=["AuthStore","ContactsStore","CropperStore","EmailsStore","FileInfosStore","FTSPPresetsStore","MenusStore","HumansStore","SchemasStore","PhonesStore","SearchStore","UserAccountsStore","ValueTypesStore"];class bm extends Jt{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new yo);d(this,"method",st.Login);d(this,"id","field-auth-login")}}const Sm={install:function(t){t.component("PButton",fe),t.component("PCheckBox",Rn),t.component("PDatePicker",eo),t.component("PFlex",$n),t.component("PInput",He),t.component("PInputDate",ri),t.component("PInputNumber",mr),t.component("PLeftSlider",pr),t.component("PList",gr),t.component("PListItem",yr),t.component("PRadio",wr),t.component("PRightSlider",br),t.component("PSelect",Ke),t.component("PSticky",dn),t.component("PString",ge),t.component("PTextarea",Sr),t.component("PTopSlider",Cr),t.component("IconDownload",mi),t.component("IconFilter",pi),t.component("ArrowLeft",yi),t.component("ArrowRight",wi),t.component("DoubleArrowLeft",bi),t.component("DoubleArrowRight",Si),t.component("EllipsisSvg",Ci),t.component("IconArrowLeft",Wr),t.component("IconCheckDefault",Nn),t.component("IconClose",Pt),t.component("IconEdit",Gr),t.component("IconEmail",jr),t.component("IconMove",Zr),t.component("IconPhone",Jr),t.component("IconSearch",gi),t.component("IconSelectArrow",si),t.component("CollapseContainer",Ms),t.component("CollapseItem",Bs),t.component("VerticalCollapseContainer",xs),t.component("PAdd",Ns),t.component("PContainer",Fi),t.component("PContainerStickyHead",Rs),t.component("PDel",$s),t.component("PTabs",As),t.component("UploaderFile",Is),t.component("AuthForm",un),t.component("PModal",zt),t.component("AuthPage",Oi),t.component("PageNotFound",_i),t.component("AdaptiveContainer",Zi),t.component("AdaptiveContainerHorizontal",Ji),t.component("AdminGallery",Ki),t.component("AuthModal",kr),t.component("CarouselImages",Er),t.component("ContactForm",zr),t.component("ContextWindow",Tr),t.component("DateInputRangeV2",Dr),t.component("DateInputRange",Lr),t.component("DropList",Fr),t.component("EmailForm",hi),t.component("FilterCheckbox",Or),t.component("FiltersButtonsSelect",_r),t.component("FilterSelect",Hr),t.component("FTSPPanel",qr),t.component("GeneralItem",Ur),t.component("GridContainer",Tt),t.component("ImageCropper",Di),t.component("InfoItem",tt),t.component("InfoItemSelectButtons",Es),t.component("LeftRightContainer",vs),t.component("MessageBody",En),t.component("PAutocomplete",Hi),t.component("PDialog",Vs),t.component("PhoneForm",fi),t.component("PLoader",Ps),t.component("PNotification",zs),t.component("PPagination",Ts),t.component("RemoteSearch",Ls),t.component("ResearcheContainer",Ds),t.component("RightSliderContainer",Fs),t.component("RightTabsContainer",Os),t.component("RSContainer",_s),t.component("SelectValueType",Hs),t.component("SingleNameToggleForm",qs),t.component("SortList",Us),t.component("SortSelect",Ws),t.component("Switch3Pos",Gs),t.component("ThemeWrapper",js),t.component("ToggleInfoItem",Zs),t.component("TopSliderContainer",Js),t.component("UploaderImage",Xs)}};p.AdaptiveContainer=Zi,p.AdaptiveContainerHorizontal=Ji,p.AdminGallery=Ki,p.Arrays=Ie,p.ArrowLeft=yi,p.ArrowRight=wi,p.Auth=So,p.AuthButtonLogin=Pn,p.AuthButtonRegister=zn,p.AuthForm=un,p.AuthFormSettings=bo,p.AuthFormStatuses=we,p.AuthMethods=st,p.AuthModal=kr,p.AuthPage=Oi,p.AuthStore=iu,p.Axios=Vt,p.BaseStore=Re,p.Button=Ze,p.Cache=sd,p.CarouselImages=Er,p.CarouselSwipe=ad,p.ClassHelper=B,p.CollapseContainer=Ms,p.CollapseItem=Bs,p.Color=cd,p.Contact=rt,p.ContactForm=zr,p.ContactsStore=ru,p.ContextWindow=Tr,p.CreateSortModels=po,p.CropperStore=ai,p.Cursor=ud,p.DateFormat=dt,p.DateInputRange=Lr,p.DateInputRange_v2=Dr,p.DateMask=wd,p.Dates=ni,p.DatesFormatter=Ct,p.DoubleArrowLeft=bi,p.DoubleArrowRight=Si,p.Dragger=bd,p.DropList=Fr,p.EllipsisSvg=Ci,p.Email=je,p.EmailField=Xt,p.EmailForm=hi,p.EmailsStore=vr,p.Extension=hr,p.FTSP=Q,p.FTSPPanel=qr,p.FTSPPresetsStore=uu,p.Favourite=Sd,p.FileInfo=ce,p.FileInfosStore=cu,p.FilterCheckbox=Or,p.FilterModel=In,p.FilterSelect=Hr,p.FiltersButtonsSelect=_r,p.GeneralItem=Ur,p.GridContainer=Tt,p.Hooks=Vl,p.HttpClient=re,p.Human=Vn,p.HumansStore=fu,p.IconArrowLeft=Wr,p.IconCheckDefault=Nn,p.IconClose=Pt,p.IconDownload=mi,p.IconEdit=Gr,p.IconEmail=jr,p.IconFilter=pi,p.IconMove=Zr,p.IconPhone=Jr,p.IconSearch=gi,p.IconSelectArrow=si,p.ImageCropper=Di,p.InfoItem=tt,p.InfoItemSelectButtons=Es,p.LeftRightContainer=vs,p.LoginField=bm,p.MakeCarousel=fr,p.MenusStore=Bu,p.MessageBody=En,p.PAdd=Ns,p.PAutocomplete=Hi,p.PButton=fe,p.PCheckBox=Rn,p.PContainer=Fi,p.PContainerStickyHead=Rs,p.PDatePicker=eo,p.PDel=$s,p.PDialog=Vs,p.PFlex=$n,p.PHelp=A,p.PInput=He,p.PInputDate=ri,p.PInputNumber=mr,p.PLeftSlider=pr,p.PList=gr,p.PListItem=yr,p.PLoader=Ps,p.PModal=zt,p.PNotification=zs,p.PPagination=Ts,p.PRadio=wr,p.PRightSlider=br,p.PSelect=Ke,p.PSticky=dn,p.PString=ge,p.PTabs=As,p.PTextarea=Sr,p.PTopSlider=Cr,p.PageNotFound=_i,p.PasswordField=Yt,p.PasswordRepeatField=wo,p.Period=vt,p.PhoneForm=fi,p.PhoneService=ii,p.PhonesStore=Ar,p.RSContainer=_s,p.RemoteSearch=Ls,p.ResearcheContainer=Ds,p.RightSliderContainer=Fs,p.RightTabsContainer=Os,p.Router=Qe,p.RouterGuard=vd,p.Scheduler=Md,p.SchemasStore=Iu,p.Scroll=xd,p.SearchStore=di,p.SelectValueType=Hs,p.SingleNameToggleForm=qs,p.Sizes=xn,p.SortList=Us,p.SortModel=jt,p.SortSelect=Ws,p.Sorter=Nd,p.Static=oi,p.Statuses=le,p.Strings=q,p.Switch3Pos=Gs,p.ThemeWrapper=js,p.Time=_,p.Timer=Bt,p.ToggleInfoItem=Zs,p.Token=It,p.TopSliderContainer=Js,p.UploaderFile=Is,p.UploaderImage=Xs,p.UserAccountsStore=Lu,p.ValueType=co,p.ValueTypesStore=Fu,p.VerticalCollapseContainer=xs,p.WaitElement=$d,p.WebSocketClient=Id,p.brandColors=od,p.buildNameNumbers=rd,p.classesNames=ma,p.countRating=dd,p.moveDown=kd,p.moveUp=Cd,p.servicesComponents=Sm,p.servicesNames=ym,p.servicesStoresNames=wm,p.useConfirmLeavePage=Mo,p.validate=Rd,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
41
+ ***************************************************************************** */function Qr(t,e){var n,o;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),o=t+"-"+e):(n=t||e,o=t||e),{name:n,classname:o}}function Kr(t){return/^blob:/.test(t)}function es(t){return Kr(t)||function(e){return/^data:/.test(e)}(t)}function mt(t){return!!(t&&t.constructor&&t.call&&t.apply)}function ne(t){return t===void 0}function pn(t){return typeof t=="object"&&t!==null}function Mi(t,e,n){var o={};return pn(t)?(Object.keys(e).forEach(function(r){ne(t[r])?o[r]=e[r]:pn(e[r])?pn(t[r])?o[r]=Mi(t[r],e[r],n[r]):o[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?o[r]=!!t[r]:o[r]=t[r]}),o):t?e:n}function gn(t){var e=Number(t);return Number.isNaN(e)?t:e}function ts(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!ns(t)}function ns(t){return t!=t}function is(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Lt=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},nh=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},Bi=function(t){this.type="move",this.directions=t},ih=function(){function t(e,n,o,r,s){this.type="drag",this.nativeEvent=e,this.position=o,this.previousPosition=r,this.element=n,this.anchor=s}return t.prototype.shift=function(){var e=this,n=e.element,o=e.anchor,r=e.position;if(n){var s=n.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-o.left,top:r.top-c-o.top}}return{left:0,top:0}},t}(),xi={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(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=nt(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,o=e.right,r=e.bottom,s=e.top;this.anchor={left:t.clientX-n,top:t.clientY-s,bottom:r-t.clientY,right:o-t.clientX}},processMove:function(t,e){var n=nt(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var o=this.$refs.draggable;this.$emit("drag",new ih(t,o,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},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"]};xi.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.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)})},[i.renderSlot(t.$slots,"default")],34)};var Ni=$e("vue-handler-wrapper"),os={name:"HandlerWrapper",components:{DraggableElement:xi},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=Qr(this.horizontalPosition,this.verticalPosition);t=Ni((ve(e={},n.classname,!0),ve(e,"disabled",this.disabled),e))}else t=Ni({disabled:this.disabled});return{root:t,draggable:Ni("draggable")}}},emits:["leave","enter","drag","drag-end"]};os.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:s.classes.root},[i.createVNode(a,{class:s.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var oh=$e("vue-line-wrapper"),rs={name:"LineWrapper",components:{DraggableElement:xi},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return oh((ve(t={},this.position,!0),ve(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};rs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:s.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var ze=["left","right","top","bottom"],rh=["left","right"],sh=["top","bottom"],ah=["left","top"],lh=["fill-area","fit-area","stencil","none"],ss={left:0,top:0,width:0,height:0};function as(t,e,n){return!(n=n||["width","height","left","top"]).some(function(o){return t[o]!==e[o]})}function Te(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function pt(t,e){return{left:t.left-e.left,top:t.top-e.top}}function se(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function Dt(t,e){var n={left:0,top:0,right:0,bottom:0};return ze.forEach(function(o){var r=e[o],s=Te(t)[o];n[o]=r!==void 0&&s!==void 0?o==="left"||o==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),n}function Le(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function yn(t){return{left:-t.left,top:-t.top}}function ye(t,e){return V(V({},t),{left:t.left+e.left,top:t.top+e.top})}function Me(t,e,n,o){if(e!==1){if(n){var r=se(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function G(t){return t.width/t.height}function gt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function yt(t,e){var n={left:0,top:0},o=Dt(t,e);return o.left&&o.left>0?n.left=o.left:o.right&&o.right>0&&(n.left=-o.right),o.top&&o.top>0?n.top=o.top:o.bottom&&o.bottom>0&&(n.top=-o.bottom),n}function Ri(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function ls(t,e){var n=G(t),o=G(e);return e.width<1/0&&e.height<1/0?n>o?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function cs(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function Ue(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function wn(t,e){var n=Dt(ae(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,gt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,gt(t,e)):1}function ae(t,e,n){n===void 0&&(n=!1);var o=yt(t,e);return ye(t,n?yn(o):o)}function $i(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function ch(t,e){return V(V({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function ds(t,e,n){n===void 0&&(n=!0);var o={};return ze.forEach(function(r){var s=t[r],a=e[r];s!==void 0&&a!==void 0?o[r]=r==="left"||r==="top"?n?Math.max(s,a):Math.min(s,a):n?Math.min(s,a):Math.max(s,a):a!==void 0?o[r]=a:s!==void 0&&(o[r]=s)}),o}function bn(t,e){return ds(t,e,!0)}function us(t){var e=t.size,n=t.aspectRatio,o=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||G(e)>=n.minimum&&G(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(o||e.height>=r.minHeight&&e.width>=r.minWidth))}function hs(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Oe(t){var e=t.width,n=t.height,o=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},s={width:Math.max(o.minWidth,Math.min(o.maxWidth,e)),height:Math.max(o.minHeight,Math.min(o.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,m){return us({size:m,aspectRatio:r,sizeRestrictions:o,ignoreMinimum:h})&&(!f||hs(m,{width:e,height:n})<hs(f,{width:e,height:n}))?m:f},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),us({size:s,aspectRatio:r,sizeRestrictions:o})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ai(t){var e=t.event,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=ye(n,e.directions);return ye(s,yt(s,r))}function dh(t){var e=t.coordinates,n=t.transform,o=t.imageSize,r=t.sizeRestrictions,s=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,l=function(h,f){return Ai({coordinates:h,positionRestrictions:s,event:new Bi({left:f.left-h.left,top:f.top-h.top})})},u=V({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};ne((f=typeof h=="function"?h({coordinates:u,imageSize:o,visibleArea:c}):h).width)&&ne(f.height)||(u=function(m,y){var g=V(V(V({},m),Oe({width:y.width,height:y.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(g,{left:m.left,top:m.top})}(u,V(V({},u),f))),ne(f.left)&&ne(f.top)||(u=l(u,V(V({},u),f)))}),u}function uh(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,o=t.coordinates,r=t.visibleArea;t.aspectRatio;var s=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var l,u,h,f=V({},o),m=V({},r),y=V({},s);l=G(y),u=G(f),h===void 0&&(h=.001),(l===0||u===0?Math.abs(u-l)<h:Math.abs(u/l)<1+h&&Math.abs(u/l)>1-h)||(f=V(V({},f),Oe({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:G(y),maximum:G(y)}})));var g=wn(m=Me(m,f.width*n.width/(m.width*y.width)),e({visibleArea:m,type:"resize"}));return g!==1&&(m=Me(m,g),f=Me(f,g)),m=ae(m=ye(m,pt(se(f),se(m))),e({visibleArea:m,type:"move"})),{coordinates:f=ae(f,bn(Te(m),c)),visibleArea:m}}function hh(t){var e=t.event,n=t.getAreaRestrictions,o=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=V({},r),l=V({},s);if(r&&s&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,o.width,G(o)>G(c)?(u.height=.8*o.height,u.width=u.height*G(c)):(u.width=.8*o.width,u.height=u.width*G(c));var h=wn(l=Me(l,c.width*o.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=Me(l,h),h!==1&&(u.height/=h,u.width/=h),l=ae(l=ye(l,pt(se(c),se(l))),n({visibleArea:l,type:"move"})),c=ae(c,bn(Te(l),a))}return{coordinates:c,visibleArea:l}}function fh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.getAreaRestrictions,s=V({},o),a=V({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=Me(s,Math.min(a.width/s.width,gt(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=Me(s,Math.min(a.height/s.height,gt(s,r({visibleArea:s,type:"resize"}))))),s=ae(s=ye(s,yn(yt(a,Te(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function mh(t){var e=t.imageSize,n=t.visibleArea,o=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-o.width/2,top:(n?n.top:0)+r.height/2-o.height/2}}function ph(t){var e=t.imageSize,n=t.visibleArea,o=t.aspectRatio,r=t.sizeRestrictions,s=n||e,a=Math.min(o.maximum||1/0,Math.max(o.minimum||0,G(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Oe(V(V({},c),{aspectRatio:o,sizeRestrictions:r}))}function gh(t){var e,n,o=t.imageSize,r=t.visibleArea,s=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,l=t.stencilSize,u=r||o;return G(u)>G(s)?n=(e=l.height*u.height/s.height)*G(l):e=(n=l.width*u.width/s.width)/G(l),Oe({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function yh(t){var e=t.getAreaRestrictions,n=t.coordinates,o=t.imageSize,r=G(t.boundaries);if(n){var s={height:Math.max(n.height,o.height),width:Math.max(n.width,o.width)},a=ls({width:G(s)>r?s.width:s.height*r,height:G(s)>r?s.width/r:s.height},$i(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},l=Dt(n,Te(V({left:0,top:0},o))),u={};return!l.left&&!l.right&&c.width<=o.width&&(u.left=0,u.right=o.width),!l.top&&!l.bottom&&c.height<=o.height&&(u.top=0,u.bottom=o.height),ae(c,u)}var h=G(o);return a={height:h>r?o.height:o.width/r,width:h>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 Sn(t,e){return ds(t,Te(e))}function wh(t){var e=t.event,n=t.coordinates,o=t.visibleArea,r=t.sizeRestrictions,s=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,l=e.scale,u=e.move,h=V({},o),f=V({},n),m=1,y=1,g=l.factor&&Math.abs(l.factor-1)>.001;h=ye(h,{left:u.left||0,top:u.top||0});var E={stencil:{minimum:Math.max(r.minWidth?r.minWidth/f.width:0,r.minHeight?r.minHeight/f.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/f.width:1/0,r.maxHeight?r.maxHeight/f.height:1/0,gt(f,a))},area:{maximum:gt(h,s({visibleArea:h,type:"resize"}))}};l.factor&&g&&(l.factor<1?(y=Math.max(l.factor,E.stencil.minimum))>1&&(y=1):l.factor>1&&(y=Math.min(l.factor,Math.min(E.area.maximum,E.stencil.maximum)))<1&&(y=1)),y&&(h=Me(h,y,l.center));var b=n.left-o.left,x=o.width+o.left-(n.width+n.left),F=n.top-o.top,O=o.height+o.top-(n.height+n.top);return h=ae(h=ye(h,yt(h,{left:a.left!==void 0?a.left-b*y:void 0,top:a.top!==void 0?a.top-F*y:void 0,bottom:a.bottom!==void 0?a.bottom+O*y:void 0,right:a.right!==void 0?a.right+x*y:void 0})),s({visibleArea:h,type:"move"})),f.width=f.width*y,f.height=f.height*y,f.left=h.left+b*y,f.top=h.top+F*y,f=ae(f,bn(Te(h),a)),l.factor&&g&&c&&(l.factor>1?m=Math.min(E.area.maximum,l.factor)/y:l.factor<1&&(m=Math.max(f.height/h.height,f.width/h.width,l.factor/y)),m!==1&&(h=ye(h=ae(h=Me(h,m,l.factor>1?l.center:se(f)),s({visibleArea:h,type:"move"})),yn(yt(f,Te(h)))))),{coordinates:f,visibleArea:h}}function bh(t){var e=t.aspectRatio,n=t.getAreaRestrictions,o=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,l=t.previousImageSize,u=t.angle,h=V({},o),f=V({},r),m=Ue(se(V({left:0,top:0},l)),u);return(h=V(V({},Oe({sizeRestrictions:s,aspectRatio:e,width:h.width,height:h.height})),Ue(se(h),u))).left-=m.left-c.width/2+h.width/2,h.top-=m.top-c.height/2+h.height/2,f=Me(f,wn(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=ae(h,a),visibleArea:f=ae(f=ye(f,pt(se(h),se(o))),n({visibleArea:f,type:"move"}))}}function Sh(t){var e=t.flip,n=t.previousFlip,o=t.rotate,r=t.getAreaRestrictions,s=t.coordinates,a=t.visibleArea,c=t.imageSize,l=V({},s),u=V({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var m=Ue({left:c.width/2,top:c.height/2},-o),y=Ue(se(l),-o),g=Ue({left:h?m.left-(y.left-m.left):y.left,top:f?m.top-(y.top-m.top):y.top},o);l=ye(l,pt(g,se(l))),y=Ue(se(u),-o),u=ae(u=ye(u,pt(g=Ue({left:h?m.left-(y.left-m.left):y.left,top:f?m.top-(y.top-m.top):y.top},o),se(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function fs(t){var e=t.directions,n=t.coordinates,o=t.positionRestrictions,r=o===void 0?{}:o,s=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,l=V({},e),u=Le(n,l).width,h=Le(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-s.minWidth)/(l.left/l.right),l.right=-(n.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-s.minWidth):l.right<0&&(l.right=-(n.width-s.minWidth))),h<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-s.minHeight):l.bottom<0&&(l.bottom=-(n.height-s.minHeight)));var f=Dt(Le(n,l),r);c&&(f.left&&f.left>0&&f.right===0?(l.right+=f.left,l.left-=f.left):f.right&&f.right>0&&f.left===0&&(l.left+=f.right,l.right-=f.right),f.top&&f.top>0&&f.bottom===0?(l.bottom+=f.top,l.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(l.top+=f.bottom,l.bottom-=f.bottom),f=Dt(Le(n,l),r));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(ze.forEach(function(E){var b=f[E];b&&l[E]&&(m[E]=Math.max(0,1-b/l[E]))}),a){var y=Math.min.apply(null,ze.map(function(E){return m[E]}));y!==1/0&&ze.forEach(function(E){l[E]*=y})}else ze.forEach(function(E){m[E]!==1/0&&(l[E]*=m[E])});if(u=Le(n,l).width,h=Le(n,l).height,l.right+l.left&&(u>s.maxWidth?m.width=(s.maxWidth-n.width)/(l.right+l.left):u<s.minWidth&&(m.width=(s.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(h>s.maxHeight?m.height=(s.maxHeight-n.height)/(l.bottom+l.top):h<s.minHeight&&(m.height=(s.minHeight-n.height)/(l.bottom+l.top))),a){var g=Math.min(m.width,m.height);g!==1/0&&ze.forEach(function(E){l[E]*=g})}else m.width!==1/0&&rh.forEach(function(E){l[E]*=m.width}),m.height!==1/0&&sh.forEach(function(E){l[E]*=m.height});return l}function Cn(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var Ch=$e("vue-simple-handler"),kh=$e("vue-simple-handler-wrapper"),Ii={name:"SimpleHandler",components:{HandlerWrapper:os},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 t,e=(ve(t={},this.horizontalPosition,!!this.horizontalPosition),ve(t,this.verticalPosition,!!this.verticalPosition),ve(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ve(t,"hover",this.hover),t);return{default:K(Ch(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(kh(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ii.render=function(t,e,n,o,r,s){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Eh=$e("vue-simple-line"),vh=$e("vue-simple-line-wrapper"),Vi={name:"SimpleLine",components:{LineWrapper:rs},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:K(Eh(ve({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:K(vh(ve({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Vi.render=function(t,e,n,o,r,s){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Pi=$e("vue-bounding-box"),Mh=["east","west",null],Bh=["south","north",null],ms={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 Ii}},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 Vi}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return Mh.forEach(function(e){Bh.forEach(function(n){if(e!==n){var o=Qr(e,n),r=o.name,s=o.classname;t.push({name:r,classname:s,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,o=this.linesWrappersClasses;return{root:Pi(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:o}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:K(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:K(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,o=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var s={name:r.name,component:t.handlersComponent,class:K(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:K(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&o){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?n:a==="west"?0:n/2,u=c==="south"?o:c==="north"?0:o/2;s.wrapperClass=Pi("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(s.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else s.wrapperClass=Pi("handler",ve({},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(t,e,n){var o,r=t.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=s:e==="east"&&(c.right+=s),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?o="width":n&&!e&&(o="height"),this.resizable&&this.$emit("resize",new nh(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:o}))}},emits:["resize","resize-end"]};ms.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(s.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var xh=$e("vue-draggable-area"),ps={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:xh()}}},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(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=nt(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):is({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top;this.anchor={x:t.clientX-n,y:t.clientY-o}},processMove:function(t,e){var n=nt(e);if(this.touches.length){var o=this.$refs.container.getBoundingClientRect(),r=o.left,s=o.top;this.touches.length===1&&n.length===1&&this.$emit("move",new Bi({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};ps.render=function(t,e,n,o,r,s){return i.openBlock(),i.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)})},[i.renderSlot(t.$slots,"default")],544)};function zi(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function Nh(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),h=u.length,f=new ArrayBuffer(h),m=new Uint8Array(f),y=0;y<h;y++)m[y]=u.charCodeAt(y);return f}(t));else if(/^blob:/i.test(t)){var o=new FileReader;o.onload=function(l){e(l.target.result)},s=t,a=function(l){o.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("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",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var s,a,c})}function gs(t){var e=t.rotate,n=t.flip,o=t.scaleX,r=t.scaleY,s="";return s+=" rotate("+e+"deg) ",s+=" scaleX("+o*(n.horizontal?-1:1)+") ",s+=" scaleY("+r*(n.vertical?-1:1)+") "}function Rh(t){try{var e,n=new DataView(t),o=void 0,r=void 0,s=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,l=2;l+1<c;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){s=l;break}l++}if(s&&(o=s+10,function(y,g,E){var b,x="";for(b=g,E+=g;b<E;b++)x+=String.fromCharCode(y.getUint8(b));return x}(n,s+4,4)==="Exif")){var u=n.getUint16(o);if(((r=u===18761)||u===19789)&&n.getUint16(o+2,r)===42){var h=n.getUint32(o+4,r);h>=8&&(a=o+h)}}if(a){for(var f=n.getUint16(a,r),m=0;m<f;m++)if(l=a+12*m+2,n.getUint16(l,r)===274){l+=8,e=n.getUint16(l,r),n.setUint16(l,1,r);break}}return e}catch{return null}}function ys(t,e){var n=e.getBoundingClientRect(),o=n.left,r=n.top,s={left:0,top:0},a=0;return t.forEach(function(c){s.left+=(c.clientX-o)/t.length,s.top+=(c.clientY-r)/t.length}),t.forEach(function(c){a+=is({x:s.left,y:s.top},{x:c.clientX-o,y:c.clientY-r})}),{centerMass:s,spread:a,count:t.length}}var ws={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=vi(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Lt({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 n=ys(e,this.$refs.container),o=this.oldGeometricProperties;o.count===n.count&&o.count>1&&this.$emit("resize",new Lt({left:o.centerMass.left-n.centerMass.left,top:o.centerMass.top-n.centerMass.top},{factor:o.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),o=n.left,r=n.top,s=n.bottom,a=n.right;this.touches=nt(t.touches).filter(function(c){return c.clientX>o&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=ys(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=nt(t.touches).filter(function(o){return!o.identifier||e.touches.find(function(r){return r.identifier===o.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,o=e.top,r=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||ns(c)?c:c>0?1:-1),s={left:t.clientX-n,top:t.clientY-o};this.$emit("resize",new Lt({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};ws.render=function(t,e,n,o,r,s){return i.openBlock(),i.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)})},[i.renderSlot(t.$slots,"default")],544)};var Ti={components:{TransformableImage:ws},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"]};Ti.render=function(t,e,n,o,r,s){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var kn=$e("vue-preview"),bs={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:kn({fill:this.fill}),wrapper:kn("wrapper"),imageWrapper:kn("image-wrapper"),image:K(kn("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={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&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,o=this.imageSize.height,r=cs({width:n,height:o},e.rotate),s={width:"".concat(n,"px"),height:"".concat(o,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-r.width)*e.scaleX/2,top:(o-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*o/2}};return s.transform=`translate(
42
+ `.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+gs(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(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.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 t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};bs.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[i.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var Ss={components:{Preview:bs},inheritAttrs:!1};Ss.render=function(t,e,n,o,r,s){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Li=$e("vue-rectangle-stencil"),Cs={name:"RectangleStencil",components:{StencilPreview:Ss,BoundingBox:ms,DraggableArea:ps},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Ii}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Vi}},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:K(Li({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:K(Li("preview"),this.previewClass),boundingBox:K(Li("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,o=t.left,r=t.top,s={width:"".concat(n,"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(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),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"]};Cs.render=function(t,e,n,o,r,s){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),l=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:s.classes.stencil,style:s.style},[i.createVNode(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.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 $h=["transitions"],_e=$e("vue-advanced-cropper"),ks={name:"Cropper",components:{BackgroundWrapper:Ti},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Cs}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Ti}},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(t){return lh.indexOf(t)!==-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(t){return!(typeof t=="string"&&t!=="fill"&&t!=="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(t){var e=t.event,n=t.coordinates,o=t.aspectRatio,r=t.positionRestrictions,s=t.sizeRestrictions,a=V(V({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},l=V({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),ze.forEach(function(L){u[L]||(l[L]=0)});var h=Le(a,l=fs({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,f=Le(a,l).height,m=c.preserveRatio?G(a):Ri(h/f,o);if(m){var y=c.respectDirection;if(y||(y=a.width>=a.height||m===1?"width":"height"),y==="width"){var g=h/m-a.height;if(u.top&&u.bottom){var E=l.top,b=l.bottom;l.bottom=Cn(g,b,E),l.top=Cn(g,E,b)}else u.bottom?l.bottom=g:u.top?l.top=g:u.right?l.right=0:u.left&&(l.left=0)}else if(y==="height"){var x=a.width-f*m;if(u.left&&u.right){var F=l.left,O=l.right;l.left=-Cn(x,F,O),l.right=-Cn(x,O,F)}else u.left?l.left=-x:u.right?l.right=-x:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=fs({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return h=Le(a,l).width,f=Le(a,l).height,(m=c.preserveRatio?G(a):Ri(h/f,o))&&Math.abs(m-h/f)>.001&&ze.forEach(function(L){u[L]||(l[L]=0)}),Ai({event:new Bi({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ai},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,o=G(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,o=t.aspectRatio,r=t.sizeRestrictions,s=t.positionRestrictions,a=V(V({},n),Oe({width:n.width,height:n.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=ae(a=ye(a,pt(se(n),se(a))),bn(Te(e),s))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.getAreaRestrictions,r=t.coordinates,s=V({},e);s.height=s.width/G(n),s.top+=(e.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=Me(s,Math.max(r.height/s.height,r.width/s.width)));var a=yn(yt(r,Te(s=Me(s,wn(s,o({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=ae(s=ye(s,a),o({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,o=t.imageSize,r=t.imageRestriction,s=t.type,a={};return r==="fill-area"?a={left:0,top:0,right:o.width,bottom:o.height}:r==="fit-area"&&(G(n)>G(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(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},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:W({},ss)}},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 t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Mi(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Mi(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},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 t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ne(this.minWidth)?0:gn(this.minWidth),minHeight:ne(this.minHeight)?0:gn(this.minHeight),maxWidth:ne(this.maxWidth)?1/0:gn(this.maxWidth),maxHeight:ne(this.maxHeight)?1/0:gn(this.maxHeight)});if(t=function(o){var r=o.areaRestrictions,s=o.sizeRestrictions,a=o.boundaries,c=o.positionRestrictions,l=V(V({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=$i(r),h=ls(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>h.width)&&(l.maxWidth=Math.min(l.maxWidth,h.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>h.height)&&(l.maxHeight=Math.min(l.maxHeight,h.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:t,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(),n=$i(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:_e(),image:K(_e("image"),this.imageClass),stencil:_e("stencil"),boundaries:K(_e("boundaries"),this.boundariesClass),stretcher:K(_e("stretcher")),background:K(_e("background"),this.backgroundClass),foreground:K(_e("foreground"),this.foregroundClass),imageWrapper:K(_e("image-wrapper")),cropperWrapper:K(_e("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,o=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(o-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={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||(t.opacity="0"),t},imageStyle:function(){var t=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:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+gs(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 t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=vi(this.update,this.debounce),this.debouncedDisableTransitions=vi(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 t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Lt({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;this.onManipulateImage(new Lt({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.autoZoom,r=o===void 0||o,s=n.transitions,a=s===void 0||s;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,o=e.sizeRestrictions,r=e.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>o.maxWidth?s.width=Math.floor(n.width):s.width<o.minWidth&&(s.width=Math.ceil(n.width)),s.height>o.maxHeight?s.height=Math.floor(n.height):s.height<o.minHeight&&(s.height=Math.ceil(n.height)),ae(s,r)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:Sn(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,o){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?uh:this.autoZoom?hh:fh);var s=r({event:{type:t,params:o},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},s),{},{changed:!as(s.visibleArea,e)||!as(s.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n!==void 0&&n,r=eh(e,$h),s=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;o&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,o&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,o=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return V(V({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+o.left,top:n.scale.center.top*r+o.top}:null}});if(n.type==="resize"){var s=V(V({},n),{directions:V({},n.directions)});return ze.forEach(function(c){s.directions[c]*=r}),s}if(n.type==="move"){var a=V(V({},n),{directions:V({},n.directions)});return ah.forEach(function(c){a.directions[c]*=r}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var h=u.rotate,f=u.flip,m={width:l.naturalWidth,height:l.naturalHeight},y=cs(m,h),g=c.getContext("2d");c.height=y.height,c.width=y.width,g.save();var E=Ue(se(V({left:0,top:0},m)),h);return g.translate(-(E.left-y.width/2),-(E.top-y.height/2)),g.rotate(h*Math.PI/180),g.translate(f.horizontal?m.width:0,f.vertical?m.height:0),g.scale(f.horizontal?-1:1,f.vertical?-1:1),g.drawImage(l,0,0,m.width,m.height),g.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Oe({sizeRestrictions:{minWidth:r([o.width,o.minWidth])||0,minHeight:r([o.height,o.minHeight])||0,maxWidth:r([o.width,o.maxWidth])||1/0,maxHeight:r([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&s.width*s.height>o.maxArea){var a=Math.sqrt(o.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var m=c.getContext("2d");m.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(m.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(m.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(m.fillStyle=f.fillColor,m.fillRect(0,0,c.width,c.height),m.save()));var y=u.left<0?-u.left:0,g=u.top<0?-u.top:0;m.drawImage(l,u.left+y,u.top+g,u.width,u.height,y*(c.width/u.width),g*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,s,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?ch(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?Sn(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return dh({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?gh:ph);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var o=mt(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||mh,s=[o,function(a){var c=a.coordinates;return W({},mt(r)?r({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,nt(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:n,imageSize:t.imageSize};if(mt(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,h=a.width*c/a.height;return h>l&&(h=l,u=a.height*l/a.width),{width:h,height:u}}(o):t.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,o,r,s,a,c=t.defaultVisibleArea||yh;t.visibleArea=mt(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,o=e.boundaries,r=e.getAreaRestrictions,s=V({},n),a=G(o),s.width/s.height!==a&&(s.height=s.width/a),ae(s,r({visibleArea:s,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(es(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var n=ne(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(r){Nh(t).then(function(s){var a=Rh(s);r(s?{source:t,arrayBuffer:s,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:t,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 t=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(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,o=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&r&&r>1?Kr(n)||!es(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=n,mt(this.defaultTransforms)?this.appliedImageTransforms=zi(this.defaultTransforms()):pn(this.defaultTransforms)?this.appliedImageTransforms=zi(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=zi({});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=W(W({},this.appliedImageTransforms),{},{flip:W({},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(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Sn(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:Sn(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,o),minHeight:Math.max(n.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,o=n!==void 0&&n,r=e.normalize,s=r===void 0||r;o&&this.enableTransitions();var a=wh(W(W({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,o=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,n,o=this.stencilProps,r=o.aspectRatio,s=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(ne(e)&&(e=ne(r)?s:r),ne(n)&&(n=ne(r)?a:r),!t&&(ne(e)||ne(n))){var l=this.getStencilSize(),u=l?G(l):null;ne(e)&&(e=ts(u)?u:void 0),ne(n)&&(n=ts(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={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=t.boundaries,n=t.stencilSize,o=t.aspectRatio,Ri(G(r=mt(n)?n({boundaries:e,aspectRatio:o}):n),o)&&(r=Oe({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=Oe({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:G(r),maximum:G(r)}})),r;var t,e,n,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 W({},ss)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.transitions,r=o===void 0||o;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageTransforms.flip),a=Sh({flip:{horizontal:t?!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()}),c=a.visibleArea,l=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,o=n===void 0||n;if(!this.transitionsActive){o&&this.enableTransitions();var r=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var s=bh({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Ah={key:0,ref:"canvas",style:{display:"none"}},Ih={key:1,ref:"sourceCanvas",style:{display:"none"}};ks.render=function(t,e,n,o,r,s){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:s.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),i.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.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:i.withCtx(function(){return[i.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),i.createVNode("div",{class:s.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,r.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",Ah,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",Ih,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Vh={class:"background-container"},Ph={class:"tools-line"},zh={class:"line-block"},Th={class:"dialog-footer"},Di=v(i.defineComponent({__name:"ImageCropper",props:{open:{type:Boolean,required:!0},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","close"],setup(t,{emit:e}){const n=t,o=e,r=ai.Cropper(),s=i.ref(n.defaultRatio);r.ratio=s.value;const a=async()=>{s.value===0?r.ratio=0:r.ratio=s.value},c=i.ref({width:0,height:0,left:0,top:0}),l=i.ref(!1),u=i.ref(""),h=i.ref(),f=async()=>{l.value=!0;const y=h.value.getResult();r.ratio===0&&(s.value=c.value.width/c.value.height),y&&y.canvas.toBlob(g=>{var E;o("crop",{blob:g,src:(E=y.canvas)==null?void 0:E.toDataURL()})}),l.value=!1},m=y=>{var g;c.value=y.coordinates,u.value=(g=y.canvas)==null?void 0:g.toDataURL()};return(y,g)=>{const E=Ke,b=i.resolveComponent("el-form-item"),x=i.resolveComponent("el-form"),F=i.resolveComponent("el-button"),O=zt;return i.openBlock(),i.createBlock(O,{show:t.open,title:"Настройка изображения","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},{default:i.withCtx(()=>[i.createElementVNode("div",Vh,[i.createElementVNode("div",Ph,[i.createElementVNode("div",zh,[i.createVNode(x,null,{default:i.withCtx(()=>[i.createVNode(b,{label:"Задайте пропорции фото:"},{default:i.withCtx(()=>[i.createVNode(E,{modelValue:i.unref(s),"onUpdate:modelValue":g[0]||(g[0]=L=>i.isRef(s)?s.value=L:null),label:"Пропорции изображения",onChange:a},{default:i.withCtx(()=>g[1]||(g[1]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})])]),i.createVNode(i.unref(ks),{ref_key:"cropperRef",ref:h,src:i.unref(r).src,"stencil-props":{aspectRatio:i.unref(r).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:m},null,8,["src","stencil-props"]),i.createElementVNode("div",Th,[i.createVNode(F,{loading:i.unref(l),type:"success",onClick:f},{default:i.withCtx(()=>g[2]||(g[2]=[i.createTextVNode(" Сохранить ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),[["__scopeId","data-v-0707c63d"]]),Es=v(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=s=>{n.value=!n.value,o("select",s)};return(s,a)=>{const c=ge,l=fe,u=tt;return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:s.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(l,{key:h,type:"admin",color:"blue",text:h,onClick:f=>r(h)},null,8,["text","onClick"]))),128)),i.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>r(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-435691bb"]]),Lh={class:"mainblock"},Dh={class:"mainline"},vs=v(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",Lh,[i.createElementVNode("div",Dh,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-a4bc6b16"]]),Fh={class:"message-title"},Oh={class:"message-text"},En=v(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Fh,i.toDisplayString(t.title),1),i.createElementVNode("div",Oh,i.toDisplayString(t.text),1)]))}}),[["__scopeId","data-v-e3c1e672"]]),_h=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=o=>{e.value=o};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function Hh(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const Ms=v(_h,[["render",Hh]]),qh=i.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(t,{emit:e}){const n=i.ref(t.activeId==="0"),o=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:o}}}),Uh=["for"],Wh={class:"inside-icon"};function Gh(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",Wh,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),t.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},i.toDisplayString(t.title),5)):(i.openBlock(),i.createElementBlock("div",{key:1,class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},void 0,!0)],4)),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,Uh),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"inside-content",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-50a7d390><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-50a7d390></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-50a7d390><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-50a7d390></path></symbol></svg>',1))],64)}const Bs=v(qh,[["render",Gh],["__scopeId","data-v-50a7d390"]]),jh={width:"0",height:"0",class:"hidden"};function Zh(t,e){return i.openBlock(),i.createElementBlock("svg",jh,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-left"},[i.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)]))}const Jh={render:Zh},Xh={width:"0",height:"0",class:"hidden"};function Yh(t,e){return i.openBlock(),i.createElementBlock("svg",Xh,e[0]||(e[0]=[i.createElementVNode("symbol",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",id:"arrow-right"},[i.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)]))}const Qh={render:Yh},Kh={class:"tab"},ef={class:"rotate"},tf={key:0,class:"icon-arrow"},nf={key:1,class:"icon-arrow"},xs=v(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(o,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Kh,[i.renderSlot(o.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(o.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",ef,[i.renderSlot(o.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createElementBlock("svg",nf,r[1]||(r[1]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]))):(i.openBlock(),i.createElementBlock("svg",tf,r[0]||(r[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(o.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(i.unref(Jh)),i.createVNode(i.unref(Qh))],64))}}),[["__scopeId","data-v-2371e4d8"]]),of={class:"add-block_body"},Ns=v(i.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(t){return(e,n)=>{const o=dn;return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",of,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-b93bc8b1"]]),Fi=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b89bdc7a"]]),rf={class:"add-block_body"},Rs=v(i.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(t){return(e,n)=>{const o=dn,r=Fi;return i.openBlock(),i.createBlock(r,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(o,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",rf,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-e59e418e"]]),sf={class:"del-block_title"},af={class:"del-block_body"},$s=v(i.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(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",sf,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",af,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-362b7b0d"]]),lf=["onClick"],As=v(i.defineComponent({__name:"PTabs",props:{tabs:{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"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.tabs[0]),s=i.ref(window.innerWidth),a=i.ref(),c=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),l=()=>{s.value=window.innerWidth,c.value=a.value?a.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",l)),i.onUnmounted(()=>window.removeEventListener("resize",l));const u=i.computed(()=>`calc(100% - ${c.value}px + 1px)`),h=f=>{r.value=f,o("select",f)};return(f,m)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`})},[i.createElementVNode("div",{ref_key:"menuRef",ref:a,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.tabs,y=>(i.openBlock(),i.createElementBlock("div",{key:y.id},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":y.id===i.unref(r).id,tab:i.unref(r).id!==y.id}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:g=>h(y)},i.toDisplayString(y.name),15,lf)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(u)})},[i.renderSlot(f.$slots,"default",{},void 0,!0)],4)],4))}}),[["__scopeId","data-v-5a83fbbf"]]),cf=["id"],df=["for"],uf={class:"left-field"},hf=["href","download"],ff={key:1,class:"text-field__input"},mf={class:"right-field"},pf=i.defineComponent({__name:"UploaderFile",props:{fileInfo:{type:Object,required:!1,default:new ce},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"",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(t,{emit:e}){const n=t,o=e,r=q.CreateGuid(),s=q.CreateGuid(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const h=u.files[0];if(h){if(!l(h.name)){A.Notification.Error("Загруженный файл должен быть в формате pdf, jpg или jpeg");return}n.fileInfo.uploadAndSetFile(h),o("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),o("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var h;return(h=document.getElementById(r))==null?void 0:h.click()})});const l=u=>{let h=hr.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=ge,m=$n,y=fe;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(r),type:"file",hidden:"",onChange:a},null,40,cf),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,df)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",uf,[i.createVNode(m,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,hf),i.createVNode(y,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(Pt,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",ff,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",mf,[i.createVNode(y,{id:i.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),Is=v(pf,[["__scopeId","data-v-88abe1df"]]),gf={class:"bg"},Oi=v(i.defineComponent({__name:"AuthPage",setup(t){const e=()=>{A.Auth.Form.IsLogin()&&Qe.ToHome()};return(n,o)=>{const r=un;return i.openBlock(),i.createElementBlock("div",gf,[i.createVNode(r,{width:"760px",margin:"0 auto",onAction:e})])}}}),[["__scopeId","data-v-14e033ce"]]),yf=Object.freeze(Object.defineProperty({__proto__:null,default:Oi},Symbol.toStringTag,{value:"Module"})),wf={},bf={style:{"text-align":"center"}};function Sf(t,e){return i.openBlock(),i.createElementBlock("div",bf,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const _i=v(wf,[["render",Sf]]),Cf=Object.freeze(Object.defineProperty({__proto__:null,default:_i},Symbol.toStringTag,{value:"Module"})),kf={class:"container"},Ef={key:0,class:"result"},vf={class:"list"},Mf=["onClick"],Hi=v(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]}},emits:["select","input"],setup(t,{emit:e}){const n=e,o=t,r=i.ref(o.modelValue),s=i.ref([]);async function a(){n("input",r.value),await c()}async function c(){o.searchFunc&&(s.value=await o.searchFunc(r.value))}async function l(u){n("select",u)}return(u,h)=>{const f=gi,m=He;return i.openBlock(),i.createElementBlock("div",kf,[i.createVNode(m,{modelValue:i.unref(r),"onUpdate:modelValue":h[0]||(h[0]=y=>i.isRef(r)?r.value=y:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(f)]),_:1},8,["modelValue"]),i.unref(r)?(i.openBlock(),i.createElementBlock("div",Ef,[i.createElementVNode("ul",vf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),y=>(i.openBlock(),i.createElementBlock("li",{key:y.value,onClick:g=>l(y)},i.toDisplayString(y.label),9,Mf))),128))])])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-58b78c5c"]]),Bf={class:"footer"},Vs=v(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(A.Dialog.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,o)=>{const r=En,s=fe;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(A)).Dialog.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetText()},null,8,["title","text"]),i.createElementVNode("div",Bf,[i.createVNode(s,{type:"primary",text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetConfirmButtonText(),margin:"10px 0 0 0",onClick:o[0]||(o[0]=a=>("PHelp"in n?n.PHelp:i.unref(A)).Dialog.Submit())},null,8,["text"]),i.createVNode(s,{type:"warning",text:("PHelp"in n?n.PHelp:i.unref(A)).Dialog.GetCancelButtonText(),margin:"10px 0 0 0",onClick:o[1]||(o[1]=a=>("PHelp"in n?n.PHelp:i.unref(A)).Dialog.Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-cbdf027e"]]),xf={};function Nf(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const Ps=v(xf,[["render",Nf],["__scopeId","data-v-879cfd55"]]),zs=v(i.defineComponent({__name:"PNotification",setup(t){const e=i.computed(()=>{switch(A.Notification.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,o)=>{const r=En;return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[("PHelp"in n?n.PHelp:i.unref(A)).Notification.IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(r,{title:("PHelp"in n?n.PHelp:i.unref(A)).Notification.GetTitle(),text:("PHelp"in n?n.PHelp:i.unref(A)).Notification.GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-e8d26012"]]),Rf={style:{display:"flex","justify-content":"center",width:"100%"}},$f={class:"pag-number"},Af={class:"pag-ul"},If={key:2},Ts=v(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,o=y=>y?"active":"neutral",r=y=>y?"not-active":"neutral",s=A.Paginator,a=i.ref(!1),c=i.ref(!1),l=e;s.count=n.store.Count();const u=async y=>{if(y!==s.curPage){if(y<1&&(y=1),y>s.pagesCount()&&(y=s.pagesCount()),!n.showConfirm)return await h(y);A.Dialog.Save().then(async()=>{l("save"),await h(y)}).catch(async()=>{A.Notification.Warning("Изменения не были сохранены"),l("cancel"),await h(y)})}},h=async(y,g)=>{s.setCurPage(y),Q.Get().p.offset=(y-1)*s.limit,await n.store.FTSP(),m()},f=i.computed(()=>{const y=s.pagesCount();return y<8?Ie.GenerateNumsRange(2,y-1).filter(g=>g<y&&g>1):Ie.GenerateNumsRange(s.curPage-2,s.curPage+3).filter(g=>g<y&&g>1)}),m=()=>{const y=document.querySelector(".el-table__body-wrapper"),g=document.querySelector("#list");y?y.scrollTo({top:0}):g&&g.scrollTo({top:0})};return i.onBeforeUnmount(()=>{Q.Get().p.drop()}),(y,g)=>{const E=yi,b=fe,x=bi,F=Ci,O=Si,L=wi;return i.openBlock(),i.createElementBlock("div",Rf,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",$f,[i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===1),onClick:g[0]||(g[0]=z=>u(i.unref(s).curPage-1))},{default:i.withCtx(()=>[i.createVNode(E)]),_:1},8,["type"]),i.createElementVNode("ul",Af,[i.createElementVNode("li",null,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).curPage===1),text:"1",onClick:g[1]||(g[1]=z=>u(1))},null,8,["type"])]),i.unref(s).pagesCount()>8&&i.unref(s).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:g[3]||(g[3]=z=>a.value=!0),onMouseleave:g[4]||(g[4]=z=>a.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[2]||(g[2]=z=>u(i.unref(s).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(x,{key:0})):(i.openBlock(),i.createBlock(F,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(f),z=>(i.openBlock(),i.createElementBlock("li",{key:z},[i.createVNode(b,{skin:"pag",type:o(z===i.unref(s).curPage),text:z,onClick:Ce=>u(z)},null,8,["type","text","onClick"])]))),128)),i.unref(s).pagesCount()>=8&&i.unref(s).curPage<i.unref(s).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:g[6]||(g[6]=z=>c.value=!0),onMouseleave:g[7]||(g[7]=z=>c.value=!1)},[i.createVNode(b,{skin:"pag",type:"neutral",onClick:g[5]||(g[5]=z=>u(i.unref(s).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(O,{key:0})):(i.openBlock(),i.createBlock(F,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(s).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",If,[i.createVNode(b,{skin:"pag",type:o(i.unref(s).pagesCount()===i.unref(s).curPage),text:i.unref(s).pagesCount(),onClick:g[8]||(g[8]=z=>u(i.unref(s).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(b,{skin:"pag",type:r(i.unref(s).curPage===i.unref(s).pagesCount()),onClick:g[9]||(g[9]=z=>u(i.unref(s).curPage+1))},{default:i.withCtx(()=>[i.createVNode(L)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-6645cd2f"]]),Ls=v(i.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},maxWidth:{type:[Number,String],default:350},focus:{type:Boolean,default:!1}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.modelValue),s=i.ref(),a=di.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async h=>{if(h.length<2)return;s.value.activated=!0,a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(m=>m.key===n.keyValue);return f&&(a.searchGroup=f),await di.Search(a),a.searchObjects},l=async h=>{o("select",h),r.value=""},u=h=>{o("input",h),h.length===0&&o("input","")};return(h,f)=>{const m=Hi;return i.openBlock(),i.createBlock(m,{ref_key:"searchForm",ref:s,modelValue:i.unref(r),"onUpdate:modelValue":f[0]||(f[0]=y=>i.isRef(r)?r.value=y:null),"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:l,onInput:u},{suffix:i.withCtx(()=>f[1]||(f[1]=[i.createElementVNode("i",{class:"el-icon-search"},null,-1)])),_:1},8,["modelValue","placeholder","trigger-on-focus","suggestions"])}}}),[["__scopeId","data-v-11ab26af"]]),Vf={class:"mainblock-body"},Pf={class:"mainblock-footer"},Ds=v(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",Vf,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",Pf,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-a670fb4a"]]),zf={class:"right-slider-content"},Tf={class:"right-slider-content-header"},Lf={class:"right-slider-content-box"},Df={class:"right-slider-button"},Fs=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!1);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>{const l=ge;return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(r)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!i.unref(r)))},[i.unref(r)?(i.openBlock(),i.createBlock(l,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(l,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",zf,[i.createElementVNode("div",Tf,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",Lf,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",Df,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-495a90f9"]]),Ff={class:"mainblock"},Of={class:"body-block"},_f={class:"tab-block"},Os=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{o("toggle",l)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),r.value=!0}),(l,u)=>(i.openBlock(),i.createElementBlock("div",Ff,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(s)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",Of,[i.renderSlot(l.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",_f,[i.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-eaeca0cc"]]),Hf={class:"mainblock"},qf={class:"body"},Uf={key:0,class:"title"},Wf={class:"title-line"},Gf={class:"icon-filter",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},jf={key:0,class:"help-block"},Zf={key:0,class:"title"},Jf={class:"title-line"},Xf={class:"icon-download",style:{stroke:"#B0A4C0",paddingLeft:"10px"}},Yf={key:1,class:"icons"},_s=v(i.defineComponent({__name:"RSContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"6000px"}},setup(t){const e=t,n=i.ref(!1),o=i.ref(!1),r=i.ref(!1),s=i.ref(window.matchMedia("(max-width: 6000px)").matches),a=()=>{o.value=!1,r.value=!1},c=()=>{o.value=!o.value},l=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.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: 6000px)").matches}),n.value=!0}),(u,h)=>{const f=pi,m=fe,y=mi;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",Hf,[o.value|r.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:h[0]||(h[0]=g=>a())})):i.createCommentVNode("",!0),i.createElementVNode("div",qf,[i.createElementVNode("div",{class:"visability-block",style:i.normalizeStyle({maxWidth:s.value?"100%":"300px"})},[i.renderSlot(u.$slots,"visability",{},void 0,!0)],4),i.createElementVNode("div",{class:"filter-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"10px":"",right:s.value?"0px":"",width:(s.value,"100%"),zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0",marginRight:s.value?o.value?"0":"-200%":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:(s.value,"rgba(0, 0, 0, 0.35) 0px 5px 5px"),height:(s.value,"60vh")})},[s.value?(i.openBlock(),i.createElementBlock("div",Uf,[i.createElementVNode("div",Wf,[(i.openBlock(),i.createElementBlock("svg",Gf,h[5]||(h[5]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",style:{marginRight:"5px"},onClick:h[1]||(h[1]=g=>c())},h[6]||(h[6]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))]),i.renderSlot(u.$slots,"title-tools",{},void 0,!0)])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"filter",{},void 0,!0)],4),s.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",jf)),i.createElementVNode("div",{class:"download-block",style:i.normalizeStyle({position:s.value?"absolute":"",top:s.value?"60px":"",right:s.value?"0px":"",width:s.value?"77px":"",zIndex:s.value?"4":"",padding:s.value?"0px 0px 26px 0px":"0 0 0 10px",marginRight:s.value?r.value?"-2px":"-130px":"0",transition:s.value?"0.3s":"",background:s.value?"#F5f5f5":"",borderTopLeftRadius:s.value?"5px":"",borderBottomLeftRadius:s.value?"5px":"",boxShadow:s.value?"rgba(0, 0, 0, 0.35) 0px 5px 5px":"",height:s.value?"150px":""})},[s.value?(i.openBlock(),i.createElementBlock("div",Zf,[i.createElementVNode("div",Jf,[(i.openBlock(),i.createElementBlock("svg",Xf,h[7]||(h[7]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]))),(i.openBlock(),i.createElementBlock("svg",{class:"icon-close",onClick:h[2]||(h[2]=g=>l())},h[8]||(h[8]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)])))])])):i.createCommentVNode("",!0),i.renderSlot(u.$slots,"download",{},void 0,!0)],4),s.value?(i.openBlock(),i.createElementBlock("div",Yf,[i.createVNode(m,{skin:"icon",margin:"0 0 0 10px",onClick:h[3]||(h[3]=g=>c())},{default:i.withCtx(()=>[i.createVNode(f,{color:"#006BB4"})]),_:1}),i.createVNode(m,{skin:"icon",margin:"13px 0 0 10px",onClick:h[4]||(h[4]=g=>l())},{default:i.withCtx(()=>[i.createVNode(y,{color:"#006BB4"})]),_:1})])):i.createCommentVNode("",!0)])]),h[9]||(h[9]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M12 10.5857L16.95 5.63574L18.364 7.04974L13.414 11.9997L18.364 16.9497L16.95 18.3637L12 13.4137L7.04999 18.3637L5.63599 16.9497L10.586 11.9997L5.63599 7.04974L7.04999 5.63574L12 10.5857Z"})])],-1))],64)}}}),[["__scopeId","data-v-468150ac"]]),Qf=["label","value"],Hs=v(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[ue.String]:"Текстовый ответ",[ue.Text]:"Развёрнутый текстовый ответ",[ue.Number]:"Числовой ответ",[ue.Date]:"Ответ в виде даты",[ue.Radio]:"Выбор одного из вариантов",[ue.Set]:"Выбор нескольких вариантов",[ue.File]:"Ответ в виде файла",[ue.MatrixRadio]:"Матрица с одним выбором",[ue.MatrixSet]:"Матрица с несколькими выборами"},o=e,r=s=>{o("select",s)};return(s,a)=>{const c=ge,l=Ke;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(l,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:r},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,Qf)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-6be05cd5"]]),Kf={class:"field"},qs=v(i.defineComponent({__name:"SingleNameToggleForm",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(!1),s=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),l=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),r.value=!r.value,o("submit")};return(h,f)=>{const m=ge,y=i.resolveComponent("el-input"),g=i.resolveComponent("el-form-item"),E=i.resolveComponent("el-form"),b=fe;return i.openBlock(),i.createBlock(E,{ref_key:"form",ref:s,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(tt,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:r.value,width:"100%",onKeyupEnter:u,onAfterClose:l},{"open-inside-content":i.withCtx(()=>[i.createVNode(tt,{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:i.withCtx(()=>[i.createElementVNode("div",Kf,[i.createVNode(E,null,{default:i.withCtx(()=>[i.createVNode(g,{style:{width:"100%"},prop:"surname"},{default:i.withCtx(()=>[i.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),i.createVNode(b,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-890163ac"]]),em=["label","value"],Us=v(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=i.ref();i.onBeforeMount(()=>{n.value=!0,r.value=Pe.GetDefault(),Q.Get().setSortModel(r.value)});const s=async c=>{r.value=c??Pe.GetDefault(),Q.Get().setSortModel(r.value),Q.Get().p.drop(),o("load")},a=async c=>{Q.Get().p.drop(),await s(c)};return(c,l)=>{var h;const u=Ke;return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>i.isRef(r)?r.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(r))!=null&&h.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Pe).Get(),(f,m)=>(i.openBlock(),i.createElementBlock("option",{key:m,label:f.label,value:f},null,8,em))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03971699"]]),tm=["label","value"],Ws=v(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,o=i.ref();i.onBeforeMount(()=>{o.value=Pe.GetDefault()});const r=async a=>{a||(o.value=Pe.GetDefault()),Q.Get().setSortModel(o.value),Q.Get().p.drop(),n("load")},s=async a=>{await r(a)};return(a,c)=>{var u;const l=Ke;return i.openBlock(),i.createBlock(l,{modelValue:i.unref(o),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(o)?o.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(o))!=null&&u.default),"value-key":"label",onChange:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Pe).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,tm))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-98d731ba"]]),nm={class:"switch-container"},im={class:"line"},om={class:"line"},Gs=v(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,o={background:"inherit",border:"1px solid #c4c4c4"},r=()=>n.firstModel.valueEq(u.value)?void 0:o,s=()=>u.value?o:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:o,c=f=>{var y;return{color:(y=u.value)!=null&&y.valueEq(f)?"#006bb4":"#B0A4C0"}},l=e,u=i.ref(void 0),h=async f=>{var m;(m=u.value)!=null&&m.valueEq(f)||(Q.Get().replaceF(f,u.value),u.value=f,l("load"))};return(f,m)=>{const y=ge;return i.openBlock(),i.createElementBlock("div",nm,[i.createElementVNode("div",im,[i.createVNode(y,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:m[0]||(m[0]=g=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(y,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:m[1]||(m[1]=g=>h())},null,8,["style"]),i.createVNode(y,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:m[2]||(m[2]=g=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",om,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(r()),onClick:m[3]||(m[3]=g=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(s()),onClick:m[4]||(m[4]=g=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:m[5]||(m[5]=g=>h(t.secondModel))},null,6),m[6]||(m[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-4776a738"]]),rm={},sm={class:"flex"};function am(t,e){return i.openBlock(),i.createElementBlock("div",sm,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const js=v(rm,[["render",am],["__scopeId","data-v-4d1abb74"]]),Zs=v(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),o=e,r=async()=>{o("submit"),n.value=!n.value};return(s,a)=>{const c=ge,l=fe,u=Tt,h=tt;return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:r},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default",{},void 0,!0),i.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-994f6522"]]),lm={class:"top-slider-content"},cm={class:"center"},Js=v(i.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(t,{emit:e}){const n=t,o=e,r=i.ref(!0);i.watch(()=>n.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,o("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(r)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(r)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",lm,[i.createElementVNode("div",cm,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!i.unref(r)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-fec4dfde"]]),dm={id:"drop-area",class:"img-container"},um={key:0},hm=["src"],fm={class:"tools-button"},mm={class:"ins"},pm={key:1},gm=["id"],Xs=v(i.defineComponent({__name:"UploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:ce,required:!0},height:{type:Number,default:150},width:{type:Number,default:150},cropRatio:{type:Boolean,default:!0},emitCrop:{type:Boolean,default:!1},defaultRatio:{type:Number,required:!1,default:1}},emits:["crop","removeFile"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(void 0),s=q.CreateGuid(),a=i.ref(!1),c=i.ref(),l=b=>{const x=n.cropRatio?n.defaultRatio:0;ai.Open(hn.CreateCropper(b.url,x,n.fileInfo.id)),a.value=!0},u=()=>{A.Dialog.Show({text:"Вы хотите удалить изображение",confirmButtonText:"Удалить",cancelButtonText:"Не удалять"}).then(()=>{r.value=void 0,c.value.clearFiles(),o("removeFile")})},h=b=>{n.fileInfo.setFile(b),n.fileInfo.fileSystemPath&&(r.value=n.fileInfo),a.value=!1,o("crop")};i.onBeforeMount(()=>{n.fileInfo.fileSystemPath&&(r.value=n.fileInfo,r.value.url=n.fileInfo.getFileUrl())});let f=null;i.onMounted(()=>{const b=document.getElementById("drop-area");b&&(b.addEventListener("dragover",x=>{m(x),b.classList.add("drag-over")}),b.addEventListener("dragleave",x=>{m(x),b.classList.remove("drag-over")}),b.addEventListener("dragenter",m),b.addEventListener("dragleave",m),b.addEventListener("drop",g),f=document.getElementById(s))});function m(b){b.preventDefault(),b.stopPropagation()}const y=()=>{f&&f.click()};function g(b){if(b.preventDefault(),!b.dataTransfer)return;const x=b.dataTransfer.files;x.length&&f&&(f.files=x,E())}const E=()=>{if(!f||!f.files||!f.files.length)return;const b=f.files[0];b.url=URL.createObjectURL(b),r.value=b,n.fileInfo.uploadNewFile(b),l(r.value)};return(b,x)=>{const F=fe,O=Di;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",dm,[i.unref(r)?(i.openBlock(),i.createElementBlock("div",um,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createElementVNode("img",{class:"el-upload-list__item-thumbnail",src:i.unref(r).url,alt:"upload-image"},null,8,hm)],4),i.createElementVNode("div",fm,[i.createElementVNode("div",mm,[i.createVNode(F,{skin:"text",text:"Изменить","font-size":"20px",width:"300px",margin:"100px 0 0 0",onClick:x[0]||(x[0]=L=>l(i.unref(r)))}),i.createVNode(F,{skin:"text",text:"Удалить","font-size":"20px",width:"300px",margin:"50px 0 0 0",onClick:x[1]||(x[1]=L=>u())})])])])):(i.openBlock(),i.createElementBlock("div",pm,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*t.defaultRatio-2+"px",height:t.height+"px"})},[i.createVNode(F,{skin:"text",text:"Добавить","font-size":"20px",onClick:y})],4)]))]),i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:E},null,40,gm),t.withCrop?(i.openBlock(),i.createBlock(O,{key:0,open:i.unref(a),"default-ratio":t.defaultRatio,onCrop:h,onClose:x[2]||(x[2]=L=>a.value=!1)},null,8,["open","default-ratio"])):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-61aa63c7"]]),ym=["BaseStore","Contact","Static","Button","RouterGuard","Sizes","Human","FileInfo","Statuses","Email","FTSP","Arrays","Axios","brandColors","buildNameNumbers","Cache","CarouselSwipe","ClassHelper","Color","countRating","CreateSortModels","Cursor","DateFormat","DateMask","Dates","DatesFormatter","Dragger","Favourite","Extension","HttpClient","MakeCarousel","moveUp","moveDown","Period","PhoneService","Router","Scheduler","Scroll","Sorter","Strings","Time","TimeFormatter","Token","useConfirmLeavePage","validate","WaitElement","WebSocketClient","Hooks","ValueType","PHelp","FilterModel","SortModel"],wm=["AuthStore","ContactsStore","CropperStore","EmailsStore","FileInfosStore","FTSPPresetsStore","MenusStore","HumansStore","SchemasStore","PhonesStore","SearchStore","UserAccountsStore","ValueTypesStore"],bm=["Orders"];class Sm extends Jt{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new yo);d(this,"method",st.Login);d(this,"id","field-auth-login")}}const Cm={install:function(t){t.component("PButton",fe),t.component("PCheckBox",Rn),t.component("PDatePicker",eo),t.component("PFlex",$n),t.component("PInput",He),t.component("PInputDate",ri),t.component("PInputNumber",mr),t.component("PLeftSlider",pr),t.component("PList",gr),t.component("PListItem",yr),t.component("PRadio",wr),t.component("PRightSlider",br),t.component("PSelect",Ke),t.component("PSticky",dn),t.component("PString",ge),t.component("PTextarea",Sr),t.component("PTopSlider",Cr),t.component("IconDownload",mi),t.component("IconFilter",pi),t.component("ArrowLeft",yi),t.component("ArrowRight",wi),t.component("DoubleArrowLeft",bi),t.component("DoubleArrowRight",Si),t.component("EllipsisSvg",Ci),t.component("IconArrowLeft",Wr),t.component("IconCheckDefault",Nn),t.component("IconClose",Pt),t.component("IconEdit",Gr),t.component("IconEmail",jr),t.component("IconMove",Zr),t.component("IconPhone",Jr),t.component("IconSearch",gi),t.component("IconSelectArrow",si),t.component("CollapseContainer",Ms),t.component("CollapseItem",Bs),t.component("VerticalCollapseContainer",xs),t.component("PAdd",Ns),t.component("PContainer",Fi),t.component("PContainerStickyHead",Rs),t.component("PDel",$s),t.component("PTabs",As),t.component("UploaderFile",Is),t.component("AuthForm",un),t.component("PModal",zt),t.component("AuthPage",Oi),t.component("PageNotFound",_i),t.component("AdaptiveContainer",Zi),t.component("AdaptiveContainerHorizontal",Ji),t.component("AdminGallery",Ki),t.component("AuthModal",kr),t.component("CarouselImages",Er),t.component("ContactForm",zr),t.component("ContextWindow",Tr),t.component("DateInputRangeV2",Dr),t.component("DateInputRange",Lr),t.component("DropList",Fr),t.component("EmailForm",hi),t.component("FilterCheckbox",Or),t.component("FiltersButtonsSelect",_r),t.component("FilterSelect",Hr),t.component("FTSPPanel",qr),t.component("GeneralItem",Ur),t.component("GridContainer",Tt),t.component("ImageCropper",Di),t.component("InfoItem",tt),t.component("InfoItemSelectButtons",Es),t.component("LeftRightContainer",vs),t.component("MessageBody",En),t.component("PAutocomplete",Hi),t.component("PDialog",Vs),t.component("PhoneForm",fi),t.component("PLoader",Ps),t.component("PNotification",zs),t.component("PPagination",Ts),t.component("RemoteSearch",Ls),t.component("ResearcheContainer",Ds),t.component("RightSliderContainer",Fs),t.component("RightTabsContainer",Os),t.component("RSContainer",_s),t.component("SelectValueType",Hs),t.component("SingleNameToggleForm",qs),t.component("SortList",Us),t.component("SortSelect",Ws),t.component("Switch3Pos",Gs),t.component("ThemeWrapper",js),t.component("ToggleInfoItem",Zs),t.component("TopSliderContainer",Js),t.component("UploaderImage",Xs)}};p.AdaptiveContainer=Zi,p.AdaptiveContainerHorizontal=Ji,p.AdminGallery=Ki,p.Arrays=Ie,p.ArrowLeft=yi,p.ArrowRight=wi,p.Auth=So,p.AuthButtonLogin=Pn,p.AuthButtonRegister=zn,p.AuthForm=un,p.AuthFormSettings=bo,p.AuthFormStatuses=we,p.AuthMethods=st,p.AuthModal=kr,p.AuthPage=Oi,p.AuthStore=iu,p.Axios=Vt,p.BaseStore=Re,p.Button=Ze,p.Cache=sd,p.CarouselImages=Er,p.CarouselSwipe=ad,p.ClassHelper=B,p.CollapseContainer=Ms,p.CollapseItem=Bs,p.Color=cd,p.Contact=rt,p.ContactForm=zr,p.ContactsStore=ru,p.ContextWindow=Tr,p.CreateSortModels=po,p.CropperStore=ai,p.Cursor=ud,p.DateFormat=dt,p.DateInputRange=Lr,p.DateInputRange_v2=Dr,p.DateMask=wd,p.Dates=ni,p.DatesFormatter=Ct,p.DoubleArrowLeft=bi,p.DoubleArrowRight=Si,p.Dragger=bd,p.DropList=Fr,p.EllipsisSvg=Ci,p.Email=je,p.EmailField=Xt,p.EmailForm=hi,p.EmailsStore=vr,p.Extension=hr,p.FTSP=Q,p.FTSPPanel=qr,p.FTSPPresetsStore=uu,p.Favourite=Sd,p.FileInfo=ce,p.FileInfosStore=cu,p.FilterCheckbox=Or,p.FilterModel=In,p.FilterSelect=Hr,p.FiltersButtonsSelect=_r,p.GeneralItem=Ur,p.GridContainer=Tt,p.Hooks=Vl,p.HttpClient=re,p.Human=Vn,p.HumansStore=fu,p.IconArrowLeft=Wr,p.IconCheckDefault=Nn,p.IconClose=Pt,p.IconDownload=mi,p.IconEdit=Gr,p.IconEmail=jr,p.IconFilter=pi,p.IconMove=Zr,p.IconPhone=Jr,p.IconSearch=gi,p.IconSelectArrow=si,p.ImageCropper=Di,p.InfoItem=tt,p.InfoItemSelectButtons=Es,p.LeftRightContainer=vs,p.LoginField=Sm,p.MakeCarousel=fr,p.MenusStore=Bu,p.MessageBody=En,p.Orders=Ve,p.PAdd=Ns,p.PAutocomplete=Hi,p.PButton=fe,p.PCheckBox=Rn,p.PContainer=Fi,p.PContainerStickyHead=Rs,p.PDatePicker=eo,p.PDel=$s,p.PDialog=Vs,p.PFlex=$n,p.PHelp=A,p.PInput=He,p.PInputDate=ri,p.PInputNumber=mr,p.PLeftSlider=pr,p.PList=gr,p.PListItem=yr,p.PLoader=Ps,p.PModal=zt,p.PNotification=zs,p.PPagination=Ts,p.PRadio=wr,p.PRightSlider=br,p.PSelect=Ke,p.PSticky=dn,p.PString=ge,p.PTabs=As,p.PTextarea=Sr,p.PTopSlider=Cr,p.PageNotFound=_i,p.PasswordField=Yt,p.PasswordRepeatField=wo,p.Period=vt,p.PhoneForm=fi,p.PhoneService=ii,p.PhonesStore=Ar,p.RSContainer=_s,p.RemoteSearch=Ls,p.ResearcheContainer=Ds,p.RightSliderContainer=Fs,p.RightTabsContainer=Os,p.Router=Qe,p.RouterGuard=vd,p.Scheduler=Md,p.SchemasStore=Iu,p.Scroll=xd,p.SearchStore=di,p.SelectValueType=Hs,p.SingleNameToggleForm=qs,p.Sizes=xn,p.SortList=Us,p.SortModel=jt,p.SortSelect=Ws,p.Sorter=Nd,p.Static=oi,p.Statuses=le,p.Strings=q,p.Switch3Pos=Gs,p.ThemeWrapper=js,p.Time=_,p.Timer=Bt,p.ToggleInfoItem=Zs,p.Token=It,p.TopSliderContainer=Js,p.UploaderFile=Is,p.UploaderImage=Xs,p.UserAccountsStore=Lu,p.ValueType=co,p.ValueTypesStore=Fu,p.VerticalCollapseContainer=xs,p.WaitElement=$d,p.WebSocketClient=Id,p.brandColors=od,p.buildNameNumbers=rd,p.classesNames=ma,p.countRating=dd,p.moveDown=kd,p.moveUp=Cd,p.servicesComponents=Cm,p.servicesNames=ym,p.servicesStoresNames=wm,p.typesNames=bm,p.useConfirmLeavePage=Mo,p.validate=Rd,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});