diff --git a/backend/evening_detective_server b/backend/evening_detective_server index 3114aef..2808a34 100755 Binary files a/backend/evening_detective_server and b/backend/evening_detective_server differ diff --git a/frontend/dist/assets/Alert-CUBw4GSK.js b/frontend/dist/assets/Alert-BoUmQeXf.js similarity index 88% rename from frontend/dist/assets/Alert-CUBw4GSK.js rename to frontend/dist/assets/Alert-BoUmQeXf.js index c299bb5..15e2632 100644 --- a/frontend/dist/assets/Alert-CUBw4GSK.js +++ b/frontend/dist/assets/Alert-BoUmQeXf.js @@ -1,4 +1,4 @@ -import{H as e,Lt as t,Mt as n,U as r,X as i,Z as a,at as o,bt as s,d as c,g as l,hn as u,it as d,kt as f,nt as p,p as m,st as h,tt as g}from"./client-Bz0sY7Lm.js";import{o as _}from"./es-BhJOHfSF.js";import{i as v,o as y}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{A as b,H as x,R as S,U as C,V as w,W as T,k as E,q as D,z as O}from"./index-6B3OmSLg.js";function k(e){let{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:o,dividerColor:s,actionColor:c,textColor1:l,textColor2:u,closeColorHover:d,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,infoColor:g,successColor:_,warningColor:v,errorColor:y,fontSize:x}=e;return Object.assign(Object.assign({},b),{fontSize:x,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${s}`,color:c,titleTextColor:l,iconColor:u,contentTextColor:u,closeBorderRadius:n,closeColorHover:d,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderInfo:`1px solid ${a(o,i(g,{alpha:.25}))}`,colorInfo:a(o,i(g,{alpha:.08})),titleTextColorInfo:l,iconColorInfo:g,contentTextColorInfo:u,closeColorHoverInfo:d,closeColorPressedInfo:f,closeIconColorInfo:p,closeIconColorHoverInfo:m,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${a(o,i(_,{alpha:.25}))}`,colorSuccess:a(o,i(_,{alpha:.08})),titleTextColorSuccess:l,iconColorSuccess:_,contentTextColorSuccess:u,closeColorHoverSuccess:d,closeColorPressedSuccess:f,closeIconColorSuccess:p,closeIconColorHoverSuccess:m,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${a(o,i(v,{alpha:.33}))}`,colorWarning:a(o,i(v,{alpha:.08})),titleTextColorWarning:l,iconColorWarning:v,contentTextColorWarning:u,closeColorHoverWarning:d,closeColorPressedWarning:f,closeIconColorWarning:p,closeIconColorHoverWarning:m,closeIconColorPressedWarning:h,borderError:`1px solid ${a(o,i(y,{alpha:.25}))}`,colorError:a(o,i(y,{alpha:.08})),titleTextColorError:l,iconColorError:y,contentTextColorError:u,closeColorHoverError:d,closeColorPressedError:f,closeIconColorError:p,closeIconColorHoverError:m,closeIconColorPressedError:h})}var A={name:`Alert`,common:c,self:k},j=p(`alert`,` +import{H as e,Lt as t,Mt as n,U as r,X as i,Z as a,at as o,bt as s,d as c,g as l,hn as u,it as d,kt as f,nt as p,p as m,st as h,tt as g}from"./client-Bz0sY7Lm.js";import{o as _}from"./es-Qklex053.js";import{i as v,o as y}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{A as b,B as x,G as S,H as C,J as w,U as T,W as E,j as D,z as O}from"./index-NE0dsiiJ.js";function k(e){let{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:o,dividerColor:s,actionColor:c,textColor1:l,textColor2:u,closeColorHover:d,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,infoColor:g,successColor:_,warningColor:v,errorColor:y,fontSize:b}=e;return Object.assign(Object.assign({},D),{fontSize:b,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${s}`,color:c,titleTextColor:l,iconColor:u,contentTextColor:u,closeBorderRadius:n,closeColorHover:d,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderInfo:`1px solid ${a(o,i(g,{alpha:.25}))}`,colorInfo:a(o,i(g,{alpha:.08})),titleTextColorInfo:l,iconColorInfo:g,contentTextColorInfo:u,closeColorHoverInfo:d,closeColorPressedInfo:f,closeIconColorInfo:p,closeIconColorHoverInfo:m,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${a(o,i(_,{alpha:.25}))}`,colorSuccess:a(o,i(_,{alpha:.08})),titleTextColorSuccess:l,iconColorSuccess:_,contentTextColorSuccess:u,closeColorHoverSuccess:d,closeColorPressedSuccess:f,closeIconColorSuccess:p,closeIconColorHoverSuccess:m,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${a(o,i(v,{alpha:.33}))}`,colorWarning:a(o,i(v,{alpha:.08})),titleTextColorWarning:l,iconColorWarning:v,contentTextColorWarning:u,closeColorHoverWarning:d,closeColorPressedWarning:f,closeIconColorWarning:p,closeIconColorHoverWarning:m,closeIconColorPressedWarning:h,borderError:`1px solid ${a(o,i(y,{alpha:.25}))}`,colorError:a(o,i(y,{alpha:.08})),titleTextColorError:l,iconColorError:y,contentTextColorError:u,closeColorHoverError:d,closeColorPressedError:f,closeIconColorError:p,closeIconColorHoverError:m,closeIconColorPressedError:h})}var A={name:`Alert`,common:c,self:k},j=p(`alert`,` line-height: var(--n-line-height); border-radius: var(--n-border-radius); position: relative; @@ -18,7 +18,7 @@ import{H as e,Lt as t,Mt as n,U as r,X as i,Z as a,at as o,bt as s,d as c,g as l pointer-events: none; `),o(`closable`,[p(`alert-body`,[d(`title`,` padding-right: 24px; - `)])]),d(`icon`,{color:`var(--n-icon-color)`}),p(`alert-body`,{padding:`var(--n-padding)`},[d(`title`,{color:`var(--n-title-text-color)`}),d(`content`,{color:`var(--n-content-text-color)`})]),E({originalTransition:`transform .3s var(--n-bezier)`,enterToProps:{transform:`scale(1)`},leaveToProps:{transform:`scale(0.9)`}}),d(`icon`,` + `)])]),d(`icon`,{color:`var(--n-icon-color)`}),p(`alert-body`,{padding:`var(--n-padding)`},[d(`title`,{color:`var(--n-title-text-color)`}),d(`content`,{color:`var(--n-content-text-color)`})]),b({originalTransition:`transform .3s var(--n-bezier)`,enterToProps:{transform:`scale(1)`},leaveToProps:{transform:`scale(0.9)`}}),d(`icon`,` position: absolute; left: 0; top: 0; @@ -45,4 +45,4 @@ import{H as e,Lt as t,Mt as n,U as r,X as i,Z as a,at as o,bt as s,d as c,g as l font-size: 16px; line-height: 19px; font-weight: var(--n-title-font-weight); - `,[g(`& +`,[d(`content`,{marginTop:`9px`})])]),d(`content`,{transition:`color .3s var(--n-bezier)`,fontSize:`var(--n-font-size)`})]),d(`icon`,{transition:`color .3s var(--n-bezier)`})]),M=f({name:`Alert`,inheritAttrs:!1,props:Object.assign(Object.assign({},m.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:`default`},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),slots:Object,setup(t){let{mergedClsPrefixRef:n,mergedBorderedRef:i,inlineThemeDisabled:a,mergedRtlRef:o}=r(t),c=m(`Alert`,`-alert`,j,A,t,n),d=l(`Alert`,o,n),f=s(()=>{let{common:{cubicBezierEaseInOut:e},self:n}=c.value,{fontSize:r,borderRadius:i,titleFontWeight:a,lineHeight:o,iconSize:s,iconMargin:l,iconMarginRtl:u,closeIconSize:d,closeBorderRadius:f,closeSize:p,closeMargin:m,closeMarginRtl:g,padding:v}=n,{type:y}=t,{left:b,right:x}=_(l);return{"--n-bezier":e,"--n-color":n[h(`color`,y)],"--n-close-icon-size":d,"--n-close-border-radius":f,"--n-close-color-hover":n[h(`closeColorHover`,y)],"--n-close-color-pressed":n[h(`closeColorPressed`,y)],"--n-close-icon-color":n[h(`closeIconColor`,y)],"--n-close-icon-color-hover":n[h(`closeIconColorHover`,y)],"--n-close-icon-color-pressed":n[h(`closeIconColorPressed`,y)],"--n-icon-color":n[h(`iconColor`,y)],"--n-border":n[h(`border`,y)],"--n-title-text-color":n[h(`titleTextColor`,y)],"--n-content-text-color":n[h(`contentTextColor`,y)],"--n-line-height":o,"--n-border-radius":i,"--n-font-size":r,"--n-title-font-weight":a,"--n-icon-size":s,"--n-icon-margin":l,"--n-icon-margin-rtl":u,"--n-close-size":p,"--n-close-margin":m,"--n-close-margin-rtl":g,"--n-padding":v,"--n-icon-margin-left":b,"--n-icon-margin-right":x}}),p=a?e(`alert`,s(()=>t.type[0]),f,t):void 0,g=u(!0),v=()=>{let{onAfterLeave:e,onAfterHide:n}=t;e&&e(),n&&n()};return{rtlEnabled:d,mergedClsPrefix:n,mergedBordered:i,visible:g,handleCloseClick:()=>{Promise.resolve(t.onClose?.call(t)).then(e=>{e!==!1&&(g.value=!1)})},handleAfterLeave:()=>{v()},mergedTheme:c,cssVars:a?void 0:f,themeClass:p?.themeClass,onRender:p?.onRender}},render(){var e;return(e=this.onRender)==null||e.call(this),n(S,{onAfterLeave:this.handleAfterLeave},{default:()=>{let{mergedClsPrefix:e,$slots:r}=this,i={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:`alert`};return this.visible?n(`div`,Object.assign({},t(this.$attrs,i)),this.closable&&n(O,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&n(`div`,{class:`${e}-alert__border`}),this.showIcon&&n(`div`,{class:`${e}-alert__icon`,"aria-hidden":`true`},v(r.icon,()=>[n(D,{clsPrefix:e},{default:()=>{switch(this.type){case`success`:return n(x,null);case`info`:return n(C,null);case`warning`:return n(w,null);case`error`:return n(T,null);default:return null}}})])),n(`div`,{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},y(r.header,t=>{let r=t||this.title;return r?n(`div`,{class:`${e}-alert-body__title`},r):null}),r.default&&n(`div`,{class:`${e}-alert-body__content`},r))):null}})}});export{M as t}; \ No newline at end of file + `,[g(`& +`,[d(`content`,{marginTop:`9px`})])]),d(`content`,{transition:`color .3s var(--n-bezier)`,fontSize:`var(--n-font-size)`})]),d(`icon`,{transition:`color .3s var(--n-bezier)`})]),M=f({name:`Alert`,inheritAttrs:!1,props:Object.assign(Object.assign({},m.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:`default`},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),slots:Object,setup(t){let{mergedClsPrefixRef:n,mergedBorderedRef:i,inlineThemeDisabled:a,mergedRtlRef:o}=r(t),c=m(`Alert`,`-alert`,j,A,t,n),d=l(`Alert`,o,n),f=s(()=>{let{common:{cubicBezierEaseInOut:e},self:n}=c.value,{fontSize:r,borderRadius:i,titleFontWeight:a,lineHeight:o,iconSize:s,iconMargin:l,iconMarginRtl:u,closeIconSize:d,closeBorderRadius:f,closeSize:p,closeMargin:m,closeMarginRtl:g,padding:v}=n,{type:y}=t,{left:b,right:x}=_(l);return{"--n-bezier":e,"--n-color":n[h(`color`,y)],"--n-close-icon-size":d,"--n-close-border-radius":f,"--n-close-color-hover":n[h(`closeColorHover`,y)],"--n-close-color-pressed":n[h(`closeColorPressed`,y)],"--n-close-icon-color":n[h(`closeIconColor`,y)],"--n-close-icon-color-hover":n[h(`closeIconColorHover`,y)],"--n-close-icon-color-pressed":n[h(`closeIconColorPressed`,y)],"--n-icon-color":n[h(`iconColor`,y)],"--n-border":n[h(`border`,y)],"--n-title-text-color":n[h(`titleTextColor`,y)],"--n-content-text-color":n[h(`contentTextColor`,y)],"--n-line-height":o,"--n-border-radius":i,"--n-font-size":r,"--n-title-font-weight":a,"--n-icon-size":s,"--n-icon-margin":l,"--n-icon-margin-rtl":u,"--n-close-size":p,"--n-close-margin":m,"--n-close-margin-rtl":g,"--n-padding":v,"--n-icon-margin-left":b,"--n-icon-margin-right":x}}),p=a?e(`alert`,s(()=>t.type[0]),f,t):void 0,g=u(!0),v=()=>{let{onAfterLeave:e,onAfterHide:n}=t;e&&e(),n&&n()};return{rtlEnabled:d,mergedClsPrefix:n,mergedBordered:i,visible:g,handleCloseClick:()=>{Promise.resolve(t.onClose?.call(t)).then(e=>{e!==!1&&(g.value=!1)})},handleAfterLeave:()=>{v()},mergedTheme:c,cssVars:a?void 0:f,themeClass:p?.themeClass,onRender:p?.onRender}},render(){var e;return(e=this.onRender)==null||e.call(this),n(O,{onAfterLeave:this.handleAfterLeave},{default:()=>{let{mergedClsPrefix:e,$slots:r}=this,i={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:`alert`};return this.visible?n(`div`,Object.assign({},t(this.$attrs,i)),this.closable&&n(x,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&n(`div`,{class:`${e}-alert__border`}),this.showIcon&&n(`div`,{class:`${e}-alert__icon`,"aria-hidden":`true`},v(r.icon,()=>[n(w,{clsPrefix:e},{default:()=>{switch(this.type){case`success`:return n(T,null);case`info`:return n(E,null);case`warning`:return n(C,null);case`error`:return n(S,null);default:return null}}})])),n(`div`,{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},y(r.header,t=>{let r=t||this.title;return r?n(`div`,{class:`${e}-alert-body__title`},r):null}),r.default&&n(`div`,{class:`${e}-alert-body__content`},r))):null}})}});export{M as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Button-lcMg8vK2.js b/frontend/dist/assets/Button-MBUKfT_Z.js similarity index 91% rename from frontend/dist/assets/Button-lcMg8vK2.js rename to frontend/dist/assets/Button-MBUKfT_Z.js index b47e3ad..6216e55 100644 --- a/frontend/dist/assets/Button-lcMg8vK2.js +++ b/frontend/dist/assets/Button-MBUKfT_Z.js @@ -1,4 +1,4 @@ -import{H as e,Mt as t,Pt as n,Rt as r,U as i,Vt as a,X as o,Y as s,Z as c,at as l,bt as u,g as d,h as f,hn as p,it as m,kt as h,m as g,nt as _,ot as v,p as y,st as b,tt as x,vn as S}from"./client-Bz0sY7Lm.js";import{c as C,o as w,r as T,s as E}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as D}from"./use-form-item-Bl3X3aXB.js";import{B as O,E as k,I as A,K as j,R as M,et as N}from"./index-6B3OmSLg.js";var P=typeof document<`u`&&typeof window<`u`,{cubicBezierEaseInOut:F}=f;function I({duration:e=`.2s`,delay:t=`.1s`}={}){return[x(`&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to`,{opacity:1}),x(`&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from`,` +import{H as e,Mt as t,Pt as n,Rt as r,U as i,Vt as a,X as o,Y as s,Z as c,at as l,bt as u,g as d,h as f,hn as p,it as m,kt as h,m as g,nt as _,ot as v,p as y,st as b,tt as x,vn as S}from"./client-Bz0sY7Lm.js";import{c as C,l as w,o as T,r as E}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as D}from"./use-form-item-Bl3X3aXB.js";import{D as O,L as k,V as A,q as j,tt as M,z as N}from"./index-NE0dsiiJ.js";var P=typeof document<`u`&&typeof window<`u`,{cubicBezierEaseInOut:F}=f;function I({duration:e=`.2s`,delay:t=`.1s`}={}){return[x(`&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to`,{opacity:1}),x(`&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from`,` opacity: 0!important; margin-left: 0!important; margin-right: 0!important; @@ -98,7 +98,7 @@ import{H as e,Mt as t,Pt as n,Rt as r,U as i,Vt as a,X as o,Y as s,Z as c,at as display: flex; align-items: center; justify-content: center; - `,[O({top:`50%`,originalTransform:`translateY(-50%)`})]),I()]),m(`content`,` + `,[A({top:`50%`,originalTransform:`translateY(-50%)`})]),I()]),m(`content`,` display: flex; align-items: center; flex-wrap: nowrap; @@ -106,4 +106,4 @@ import{H as e,Mt as t,Pt as n,Rt as r,U as i,Vt as a,X as o,Y as s,Z as c,at as `,[x(`~`,[m(`icon`,{margin:`var(--n-icon-margin)`,marginRight:0})])]),l(`block`,` display: flex; width: 100%; - `),l(`dashed`,[m(`border, state-border`,{borderStyle:`dashed !important`})]),l(`disabled`,{cursor:`not-allowed`,opacity:`var(--n-opacity-disabled)`})]),x(`@keyframes button-wave-spread`,{from:{boxShadow:`0 0 0.5px 0 var(--n-ripple-color)`},to:{boxShadow:`0 0 0.5px 4.5px var(--n-ripple-color)`}}),x(`@keyframes button-wave-opacity`,{from:{opacity:`var(--n-wave-opacity)`},to:{opacity:0}})]),G=h({name:`Button`,props:Object.assign(Object.assign({},y.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:`button`},type:{type:String,default:`default`},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:`left`},attrType:{type:String,default:`button`},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!B},spinProps:Object}),slots:Object,setup(t){let r=p(null),a=p(null),s=p(!1),c=N(()=>!t.quaternary&&!t.tertiary&&!t.secondary&&!t.text&&(!t.color||t.ghost||t.dashed)&&t.bordered),l=n(U,{}),{inlineThemeDisabled:f,mergedClsPrefixRef:m,mergedRtlRef:h,mergedComponentPropsRef:g}=i(t),{mergedSizeRef:_}=D({},{defaultSize:`medium`,mergedSize:e=>{let{size:n}=t;if(n)return n;let{size:r}=l;if(r)return r;let{mergedSize:i}=e||{};return i?i.value:g?.value?.Button?.size||`medium`}}),v=u(()=>t.focusable&&!t.disabled),x=e=>{var n;v.value||e.preventDefault(),!t.nativeFocusBehavior&&(e.preventDefault(),!t.disabled&&v.value&&((n=r.value)==null||n.focus({preventScroll:!0})))},S=e=>{var n;if(!t.disabled&&!t.loading){let{onClick:r}=t;r&&E(r,e),t.text||(n=a.value)==null||n.play()}},w=e=>{switch(e.key){case`Enter`:if(!t.keyboard)return;s.value=!1}},T=e=>{switch(e.key){case`Enter`:if(!t.keyboard||t.loading){e.preventDefault();return}s.value=!0}},O=()=>{s.value=!1},A=y(`Button`,`-button`,W,k,t,m),j=d(`Button`,h,m),M=u(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseOut:n},self:r}=A.value,{rippleDuration:i,opacityDisabled:a,fontWeight:s,fontWeightStrong:c}=r,l=_.value,{dashed:u,type:d,ghost:f,text:p,color:m,round:h,circle:g,textColor:v,secondary:y,tertiary:x,quaternary:S,strong:C}=t,w={"--n-font-weight":C?c:s},T={"--n-color":`initial`,"--n-color-hover":`initial`,"--n-color-pressed":`initial`,"--n-color-focus":`initial`,"--n-color-disabled":`initial`,"--n-ripple-color":`initial`,"--n-text-color":`initial`,"--n-text-color-hover":`initial`,"--n-text-color-pressed":`initial`,"--n-text-color-focus":`initial`,"--n-text-color-disabled":`initial`},E=d===`tertiary`,D=d==="default",O=E?`default`:d;if(p){let e=v||m;T={"--n-color":`#0000`,"--n-color-hover":`#0000`,"--n-color-pressed":`#0000`,"--n-color-focus":`#0000`,"--n-color-disabled":`#0000`,"--n-ripple-color":`#0000`,"--n-text-color":e||r[b(`textColorText`,O)],"--n-text-color-hover":e?V(e):r[b(`textColorTextHover`,O)],"--n-text-color-pressed":e?H(e):r[b(`textColorTextPressed`,O)],"--n-text-color-focus":e?V(e):r[b(`textColorTextHover`,O)],"--n-text-color-disabled":e||r[b(`textColorTextDisabled`,O)]}}else if(f||u){let e=v||m;T={"--n-color":`#0000`,"--n-color-hover":`#0000`,"--n-color-pressed":`#0000`,"--n-color-focus":`#0000`,"--n-color-disabled":`#0000`,"--n-ripple-color":m||r[b(`rippleColor`,O)],"--n-text-color":e||r[b(`textColorGhost`,O)],"--n-text-color-hover":e?V(e):r[b(`textColorGhostHover`,O)],"--n-text-color-pressed":e?H(e):r[b(`textColorGhostPressed`,O)],"--n-text-color-focus":e?V(e):r[b(`textColorGhostHover`,O)],"--n-text-color-disabled":e||r[b(`textColorGhostDisabled`,O)]}}else if(y){let e=D?r.textColor:E?r.textColorTertiary:r[b(`color`,O)],t=m||e,n=d!=="default"&&d!==`tertiary`;T={"--n-color":n?o(t,{alpha:Number(r.colorOpacitySecondary)}):r.colorSecondary,"--n-color-hover":n?o(t,{alpha:Number(r.colorOpacitySecondaryHover)}):r.colorSecondaryHover,"--n-color-pressed":n?o(t,{alpha:Number(r.colorOpacitySecondaryPressed)}):r.colorSecondaryPressed,"--n-color-focus":n?o(t,{alpha:Number(r.colorOpacitySecondaryHover)}):r.colorSecondaryHover,"--n-color-disabled":r.colorSecondary,"--n-ripple-color":`#0000`,"--n-text-color":t,"--n-text-color-hover":t,"--n-text-color-pressed":t,"--n-text-color-focus":t,"--n-text-color-disabled":t}}else if(x||S){let e=D?r.textColor:E?r.textColorTertiary:r[b(`color`,O)],t=m||e;x?(T[`--n-color`]=r.colorTertiary,T[`--n-color-hover`]=r.colorTertiaryHover,T[`--n-color-pressed`]=r.colorTertiaryPressed,T[`--n-color-focus`]=r.colorSecondaryHover,T[`--n-color-disabled`]=r.colorTertiary):(T[`--n-color`]=r.colorQuaternary,T[`--n-color-hover`]=r.colorQuaternaryHover,T[`--n-color-pressed`]=r.colorQuaternaryPressed,T[`--n-color-focus`]=r.colorQuaternaryHover,T[`--n-color-disabled`]=r.colorQuaternary),T[`--n-ripple-color`]=`#0000`,T[`--n-text-color`]=t,T[`--n-text-color-hover`]=t,T[`--n-text-color-pressed`]=t,T[`--n-text-color-focus`]=t,T[`--n-text-color-disabled`]=t}else T={"--n-color":m||r[b(`color`,O)],"--n-color-hover":m?V(m):r[b(`colorHover`,O)],"--n-color-pressed":m?H(m):r[b(`colorPressed`,O)],"--n-color-focus":m?V(m):r[b(`colorFocus`,O)],"--n-color-disabled":m||r[b(`colorDisabled`,O)],"--n-ripple-color":m||r[b(`rippleColor`,O)],"--n-text-color":v||(m?r.textColorPrimary:E?r.textColorTertiary:r[b(`textColor`,O)]),"--n-text-color-hover":v||(m?r.textColorHoverPrimary:r[b(`textColorHover`,O)]),"--n-text-color-pressed":v||(m?r.textColorPressedPrimary:r[b(`textColorPressed`,O)]),"--n-text-color-focus":v||(m?r.textColorFocusPrimary:r[b(`textColorFocus`,O)]),"--n-text-color-disabled":v||(m?r.textColorDisabledPrimary:r[b(`textColorDisabled`,O)])};let k={"--n-border":`initial`,"--n-border-hover":`initial`,"--n-border-pressed":`initial`,"--n-border-focus":`initial`,"--n-border-disabled":`initial`};k=p?{"--n-border":`none`,"--n-border-hover":`none`,"--n-border-pressed":`none`,"--n-border-focus":`none`,"--n-border-disabled":`none`}:{"--n-border":r[b(`border`,O)],"--n-border-hover":r[b(`borderHover`,O)],"--n-border-pressed":r[b(`borderPressed`,O)],"--n-border-focus":r[b(`borderFocus`,O)],"--n-border-disabled":r[b(`borderDisabled`,O)]};let{[b(`height`,l)]:j,[b(`fontSize`,l)]:M,[b(`padding`,l)]:N,[b(`paddingRound`,l)]:P,[b(`iconSize`,l)]:F,[b(`borderRadius`,l)]:I,[b(`iconMargin`,l)]:L,waveOpacity:R}=r,z={"--n-width":g&&!p?j:`initial`,"--n-height":p?`initial`:j,"--n-font-size":M,"--n-padding":g||p?`initial`:h?P:N,"--n-icon-size":F,"--n-icon-margin":L,"--n-border-radius":p?`initial`:g||h?j:I};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":e,"--n-bezier-ease-out":n,"--n-ripple-duration":i,"--n-opacity-disabled":a,"--n-wave-opacity":R},w),T),k),z)}),P=f?e(`button`,u(()=>{let e=``,{dashed:n,type:r,ghost:i,text:a,color:o,round:s,circle:c,textColor:l,secondary:u,tertiary:d,quaternary:f,strong:p}=t;n&&(e+=`a`),i&&(e+=`b`),a&&(e+=`c`),s&&(e+=`d`),c&&(e+=`e`),u&&(e+=`f`),d&&(e+=`g`),f&&(e+=`h`),p&&(e+=`i`),o&&(e+=`j${C(o)}`),l&&(e+=`k${C(l)}`);let{value:m}=_;return e+=`l${m[0]}`,e+=`m${r[0]}`,e}),M,t):void 0;return{selfElRef:r,waveElRef:a,mergedClsPrefix:m,mergedFocusable:v,mergedSize:_,showBorder:c,enterPressed:s,rtlEnabled:j,handleMousedown:x,handleKeydown:T,handleBlur:O,handleKeyup:w,handleClick:S,customColorCssVars:u(()=>{let{color:e}=t;if(!e)return null;let n=V(e);return{"--n-border-color":e,"--n-border-color-hover":n,"--n-border-color-pressed":H(e),"--n-border-color-focus":n,"--n-border-color-disabled":e}}),cssVars:f?void 0:M,themeClass:P?.themeClass,onRender:P?.onRender}},render(){let{mergedClsPrefix:e,tag:n,onRender:r}=this;r?.();let i=w(this.$slots.default,n=>n&&t(`span`,{class:`${e}-button__content`},n));return t(n,{ref:`selfElRef`,class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement===`right`&&i,t(M,{width:!0},{default:()=>w(this.$slots.icon,n=>(this.loading||this.renderIcon||n)&&t(`span`,{class:`${e}-button__icon`,style:{margin:T(this.$slots.default)?`0`:``}},t(j,null,{default:()=>this.loading?t(A,Object.assign({clsPrefix:e,key:`loading`,class:`${e}-icon-slot`,strokeWidth:20},this.spinProps)):t(`div`,{key:`icon`,class:`${e}-icon-slot`,role:`none`},this.renderIcon?this.renderIcon():n)})))}),this.iconPlacement===`left`&&i,this.text?null:t(R,{ref:`waveElRef`,clsPrefix:e}),this.showBorder?t(`div`,{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?t(`div`,{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),K=G;export{P as a,B as i,K as n,U as r,G as t}; \ No newline at end of file + `),l(`dashed`,[m(`border, state-border`,{borderStyle:`dashed !important`})]),l(`disabled`,{cursor:`not-allowed`,opacity:`var(--n-opacity-disabled)`})]),x(`@keyframes button-wave-spread`,{from:{boxShadow:`0 0 0.5px 0 var(--n-ripple-color)`},to:{boxShadow:`0 0 0.5px 4.5px var(--n-ripple-color)`}}),x(`@keyframes button-wave-opacity`,{from:{opacity:`var(--n-wave-opacity)`},to:{opacity:0}})]),G=h({name:`Button`,props:Object.assign(Object.assign({},y.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:`button`},type:{type:String,default:`default`},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:`left`},attrType:{type:String,default:`button`},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!B},spinProps:Object}),slots:Object,setup(t){let r=p(null),a=p(null),s=p(!1),c=M(()=>!t.quaternary&&!t.tertiary&&!t.secondary&&!t.text&&(!t.color||t.ghost||t.dashed)&&t.bordered),l=n(U,{}),{inlineThemeDisabled:f,mergedClsPrefixRef:m,mergedRtlRef:h,mergedComponentPropsRef:g}=i(t),{mergedSizeRef:_}=D({},{defaultSize:`medium`,mergedSize:e=>{let{size:n}=t;if(n)return n;let{size:r}=l;if(r)return r;let{mergedSize:i}=e||{};return i?i.value:g?.value?.Button?.size||`medium`}}),v=u(()=>t.focusable&&!t.disabled),x=e=>{var n;v.value||e.preventDefault(),!t.nativeFocusBehavior&&(e.preventDefault(),!t.disabled&&v.value&&((n=r.value)==null||n.focus({preventScroll:!0})))},S=e=>{var n;if(!t.disabled&&!t.loading){let{onClick:r}=t;r&&C(r,e),t.text||(n=a.value)==null||n.play()}},T=e=>{switch(e.key){case`Enter`:if(!t.keyboard)return;s.value=!1}},E=e=>{switch(e.key){case`Enter`:if(!t.keyboard||t.loading){e.preventDefault();return}s.value=!0}},k=()=>{s.value=!1},A=y(`Button`,`-button`,W,O,t,m),j=d(`Button`,h,m),N=u(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseOut:n},self:r}=A.value,{rippleDuration:i,opacityDisabled:a,fontWeight:s,fontWeightStrong:c}=r,l=_.value,{dashed:u,type:d,ghost:f,text:p,color:m,round:h,circle:g,textColor:v,secondary:y,tertiary:x,quaternary:S,strong:C}=t,w={"--n-font-weight":C?c:s},T={"--n-color":`initial`,"--n-color-hover":`initial`,"--n-color-pressed":`initial`,"--n-color-focus":`initial`,"--n-color-disabled":`initial`,"--n-ripple-color":`initial`,"--n-text-color":`initial`,"--n-text-color-hover":`initial`,"--n-text-color-pressed":`initial`,"--n-text-color-focus":`initial`,"--n-text-color-disabled":`initial`},E=d===`tertiary`,D=d==="default",O=E?`default`:d;if(p){let e=v||m;T={"--n-color":`#0000`,"--n-color-hover":`#0000`,"--n-color-pressed":`#0000`,"--n-color-focus":`#0000`,"--n-color-disabled":`#0000`,"--n-ripple-color":`#0000`,"--n-text-color":e||r[b(`textColorText`,O)],"--n-text-color-hover":e?V(e):r[b(`textColorTextHover`,O)],"--n-text-color-pressed":e?H(e):r[b(`textColorTextPressed`,O)],"--n-text-color-focus":e?V(e):r[b(`textColorTextHover`,O)],"--n-text-color-disabled":e||r[b(`textColorTextDisabled`,O)]}}else if(f||u){let e=v||m;T={"--n-color":`#0000`,"--n-color-hover":`#0000`,"--n-color-pressed":`#0000`,"--n-color-focus":`#0000`,"--n-color-disabled":`#0000`,"--n-ripple-color":m||r[b(`rippleColor`,O)],"--n-text-color":e||r[b(`textColorGhost`,O)],"--n-text-color-hover":e?V(e):r[b(`textColorGhostHover`,O)],"--n-text-color-pressed":e?H(e):r[b(`textColorGhostPressed`,O)],"--n-text-color-focus":e?V(e):r[b(`textColorGhostHover`,O)],"--n-text-color-disabled":e||r[b(`textColorGhostDisabled`,O)]}}else if(y){let e=D?r.textColor:E?r.textColorTertiary:r[b(`color`,O)],t=m||e,n=d!=="default"&&d!==`tertiary`;T={"--n-color":n?o(t,{alpha:Number(r.colorOpacitySecondary)}):r.colorSecondary,"--n-color-hover":n?o(t,{alpha:Number(r.colorOpacitySecondaryHover)}):r.colorSecondaryHover,"--n-color-pressed":n?o(t,{alpha:Number(r.colorOpacitySecondaryPressed)}):r.colorSecondaryPressed,"--n-color-focus":n?o(t,{alpha:Number(r.colorOpacitySecondaryHover)}):r.colorSecondaryHover,"--n-color-disabled":r.colorSecondary,"--n-ripple-color":`#0000`,"--n-text-color":t,"--n-text-color-hover":t,"--n-text-color-pressed":t,"--n-text-color-focus":t,"--n-text-color-disabled":t}}else if(x||S){let e=D?r.textColor:E?r.textColorTertiary:r[b(`color`,O)],t=m||e;x?(T[`--n-color`]=r.colorTertiary,T[`--n-color-hover`]=r.colorTertiaryHover,T[`--n-color-pressed`]=r.colorTertiaryPressed,T[`--n-color-focus`]=r.colorSecondaryHover,T[`--n-color-disabled`]=r.colorTertiary):(T[`--n-color`]=r.colorQuaternary,T[`--n-color-hover`]=r.colorQuaternaryHover,T[`--n-color-pressed`]=r.colorQuaternaryPressed,T[`--n-color-focus`]=r.colorQuaternaryHover,T[`--n-color-disabled`]=r.colorQuaternary),T[`--n-ripple-color`]=`#0000`,T[`--n-text-color`]=t,T[`--n-text-color-hover`]=t,T[`--n-text-color-pressed`]=t,T[`--n-text-color-focus`]=t,T[`--n-text-color-disabled`]=t}else T={"--n-color":m||r[b(`color`,O)],"--n-color-hover":m?V(m):r[b(`colorHover`,O)],"--n-color-pressed":m?H(m):r[b(`colorPressed`,O)],"--n-color-focus":m?V(m):r[b(`colorFocus`,O)],"--n-color-disabled":m||r[b(`colorDisabled`,O)],"--n-ripple-color":m||r[b(`rippleColor`,O)],"--n-text-color":v||(m?r.textColorPrimary:E?r.textColorTertiary:r[b(`textColor`,O)]),"--n-text-color-hover":v||(m?r.textColorHoverPrimary:r[b(`textColorHover`,O)]),"--n-text-color-pressed":v||(m?r.textColorPressedPrimary:r[b(`textColorPressed`,O)]),"--n-text-color-focus":v||(m?r.textColorFocusPrimary:r[b(`textColorFocus`,O)]),"--n-text-color-disabled":v||(m?r.textColorDisabledPrimary:r[b(`textColorDisabled`,O)])};let k={"--n-border":`initial`,"--n-border-hover":`initial`,"--n-border-pressed":`initial`,"--n-border-focus":`initial`,"--n-border-disabled":`initial`};k=p?{"--n-border":`none`,"--n-border-hover":`none`,"--n-border-pressed":`none`,"--n-border-focus":`none`,"--n-border-disabled":`none`}:{"--n-border":r[b(`border`,O)],"--n-border-hover":r[b(`borderHover`,O)],"--n-border-pressed":r[b(`borderPressed`,O)],"--n-border-focus":r[b(`borderFocus`,O)],"--n-border-disabled":r[b(`borderDisabled`,O)]};let{[b(`height`,l)]:j,[b(`fontSize`,l)]:M,[b(`padding`,l)]:N,[b(`paddingRound`,l)]:P,[b(`iconSize`,l)]:F,[b(`borderRadius`,l)]:I,[b(`iconMargin`,l)]:L,waveOpacity:R}=r,z={"--n-width":g&&!p?j:`initial`,"--n-height":p?`initial`:j,"--n-font-size":M,"--n-padding":g||p?`initial`:h?P:N,"--n-icon-size":F,"--n-icon-margin":L,"--n-border-radius":p?`initial`:g||h?j:I};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":e,"--n-bezier-ease-out":n,"--n-ripple-duration":i,"--n-opacity-disabled":a,"--n-wave-opacity":R},w),T),k),z)}),P=f?e(`button`,u(()=>{let e=``,{dashed:n,type:r,ghost:i,text:a,color:o,round:s,circle:c,textColor:l,secondary:u,tertiary:d,quaternary:f,strong:p}=t;n&&(e+=`a`),i&&(e+=`b`),a&&(e+=`c`),s&&(e+=`d`),c&&(e+=`e`),u&&(e+=`f`),d&&(e+=`g`),f&&(e+=`h`),p&&(e+=`i`),o&&(e+=`j${w(o)}`),l&&(e+=`k${w(l)}`);let{value:m}=_;return e+=`l${m[0]}`,e+=`m${r[0]}`,e}),N,t):void 0;return{selfElRef:r,waveElRef:a,mergedClsPrefix:m,mergedFocusable:v,mergedSize:_,showBorder:c,enterPressed:s,rtlEnabled:j,handleMousedown:x,handleKeydown:E,handleBlur:k,handleKeyup:T,handleClick:S,customColorCssVars:u(()=>{let{color:e}=t;if(!e)return null;let n=V(e);return{"--n-border-color":e,"--n-border-color-hover":n,"--n-border-color-pressed":H(e),"--n-border-color-focus":n,"--n-border-color-disabled":e}}),cssVars:f?void 0:N,themeClass:P?.themeClass,onRender:P?.onRender}},render(){let{mergedClsPrefix:e,tag:n,onRender:r}=this;r?.();let i=T(this.$slots.default,n=>n&&t(`span`,{class:`${e}-button__content`},n));return t(n,{ref:`selfElRef`,class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement===`right`&&i,t(N,{width:!0},{default:()=>T(this.$slots.icon,n=>(this.loading||this.renderIcon||n)&&t(`span`,{class:`${e}-button__icon`,style:{margin:E(this.$slots.default)?`0`:``}},t(j,null,{default:()=>this.loading?t(k,Object.assign({clsPrefix:e,key:`loading`,class:`${e}-icon-slot`,strokeWidth:20},this.spinProps)):t(`div`,{key:`icon`,class:`${e}-icon-slot`,role:`none`},this.renderIcon?this.renderIcon():n)})))}),this.iconPlacement===`left`&&i,this.text?null:t(R,{ref:`waveElRef`,clsPrefix:e}),this.showBorder?t(`div`,{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?t(`div`,{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),K=G;export{P as a,B as i,K as n,U as r,G as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Card-BGJkYb2B.js b/frontend/dist/assets/Card-BGJkYb2B.js new file mode 100644 index 0000000..5c58c59 --- /dev/null +++ b/frontend/dist/assets/Card-BGJkYb2B.js @@ -0,0 +1,190 @@ +import{At as e,H as t,Ht as n,Lt as r,Mt as i,U as a,Ut as o,Vt as s,Yt as c,at as l,bt as u,ct as d,et as f,g as p,hn as m,ht as h,it as g,kt as _,lt as v,nt as y,p as b,rn as x,st as S,tt as C,zt as w}from"./client-Bz0sY7Lm.js";import{i as T,o as E,s as D}from"./es-Qklex053.js";import{c as O,n as k,o as A}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as j}from"./fade-in.cssr-0rRavIDG.js";import{r as ee,t as M}from"./light-BweHUoJf.js";import{B as N,at as P}from"./index-NE0dsiiJ.js";function te(e){return e.composedPath()[0]||null}function F(e){return e.composedPath()[0]}var ne={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function I(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(F(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(F(n))},i=r=>{e&&(t.contains(F(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function L(e,t,n){let r=ne[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=I(e,t,n)),a}function re(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=L(e,t,n);return Object.keys(i).forEach(e=>{z(e,document,i[e],r)}),!0}return!1}function ie(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=L(e,t,n);return Object.keys(i).forEach(e=>{B(e,document,i[e],r)}),!0}return!1}function R(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=F(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,re(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(ie(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:z,off:B}=R(),ae=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function oe(){return ae}function se(e){let t={isDeactivated:!1},r=!1;return w(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),n(()=>{t.isDeactivated=!0,r||=!0}),t}function V(e,t){console.error(`[vueuc/${e}]: ${t}`)}var H=[],ce=function(){return H.some(function(e){return e.activeTargets.length>0})},le=function(){return H.some(function(e){return e.skippedTargets.length>0})},ue=`ResizeObserver loop completed with undelivered notifications.`,de=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:ue}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=ue),window.dispatchEvent(e)},U;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(U||={});var W=function(e){return Object.freeze(e)},fe=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,W(this)}return e}(),pe=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,W(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),G=function(e){return e instanceof SVGElement&&`getBBox`in e},me=function(e){if(G(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},K=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},he=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},q=typeof window<`u`?window:{},J=new WeakMap,ge=/auto|scroll/,Y=/^tb|vertical/,_e=/msie|trident/i.test(q.navigator&&q.navigator.userAgent),X=function(e){return parseFloat(e||`0`)},Z=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new fe((n?t:e)||0,(n?e:t)||0)},ve=W({devicePixelContentBoxSize:Z(),borderBoxSize:Z(),contentBoxSize:Z(),contentRect:new pe(0,0,0,0)}),ye=function(e,t){if(t===void 0&&(t=!1),J.has(e)&&!t)return J.get(e);if(me(e))return J.set(e,ve),ve;var n=getComputedStyle(e),r=G(e)&&e.ownerSVGElement&&e.getBBox(),i=!_e&&n.boxSizing===`border-box`,a=Y.test(n.writingMode||``),o=!r&&ge.test(n.overflowY||``),s=!r&&ge.test(n.overflowX||``),c=r?0:X(n.paddingTop),l=r?0:X(n.paddingRight),u=r?0:X(n.paddingBottom),d=r?0:X(n.paddingLeft),f=r?0:X(n.borderTopWidth),p=r?0:X(n.borderRightWidth),m=r?0:X(n.borderBottomWidth),h=r?0:X(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:X(n.width)-S-x,T=r?r.height:X(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=W({devicePixelContentBoxSize:Z(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:Z(E,D,a),contentBoxSize:Z(w,T,a),contentRect:new pe(d,c,w,T)});return J.set(e,O),O},be=function(e,t,n){var r=ye(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case U.DEVICE_PIXEL_CONTENT_BOX:return o;case U.BORDER_BOX:return i;default:return a}},xe=function(){function e(e){var t=ye(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=W([t.borderBoxSize]),this.contentBoxSize=W([t.contentBoxSize]),this.devicePixelContentBoxSize=W([t.devicePixelContentBoxSize])}return e}(),Se=function(e){if(me(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ce=function(){var e=1/0,t=[];H.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new xe(t.target),i=Se(t.target);r.push(n),t.lastReportedSize=be(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Te=function(){var e=0;for(we(e);ce();)e=Ce(),we(e);return le()&&de(),e>0},Q,Ee=[],De=function(){return Ee.splice(0).forEach(function(e){return e()})},Oe=function(e){if(!Q){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return De()}).observe(n,{characterData:!0}),Q=function(){n.textContent=`${t?t--:t++}`}}Ee.push(e),Q()},ke=function(e){Oe(function(){requestAnimationFrame(e)})},$=0,Ae=function(){return!!$},je=250,Me={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Pe=function(e){return e===void 0&&(e=0),Date.now()+e},Fe=!1,Ie=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=je),!Fe){Fe=!0;var n=Pe(e);ke(function(){var r=!1;try{r=Te()}finally{if(Fe=!1,e=n-Pe(),!Ae())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Me)};document.body?t():q.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ne.forEach(function(t){return q.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Ne.forEach(function(t){return q.removeEventListener(t,e.listener,!0)}),!0)},e}()),Le=function(e){!$&&e>0&&Ie.start(),$+=e,!$&&Ie.stop()},Re=function(e){return!G(e)&&!he(e)&&getComputedStyle(e).display===`inline`},ze=function(){function e(e,t){this.target=e,this.observedBox=t||U.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=be(this.target,this.observedBox,!0);return Re(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Be=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Ve=new WeakMap,He=function(e,t){for(var n=0;n=0&&(i&&H.splice(H.indexOf(n),1),n.observationTargets.splice(r,1),Le(-1))},e.disconnect=function(e){var t=this,n=Ve.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),We=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Ue.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!K(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ue.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!K(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ue.unobserve(this,e)},e.prototype.disconnect=function(){Ue.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Ge=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||We)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Ke=_({name:`ResizeObserver`,props:{onResize:Function},setup(t){let n=!1,r=e().proxy;function i(e){let{onResize:n}=t;n!==void 0&&n(e)}o(()=>{let e=r.$el;if(e===void 0){V(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){V(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Ge.registerHandler(e.nextElementSibling,i),n=!0)}),s(()=>{n&&Ge.unregisterHandler(r.$el.nextElementSibling)})},render(){return c(this.$slots,`default`)}});function qe(e){let{left:t,right:n,top:r,bottom:i}=E(e);return`${r} ${t} ${i} ${n}`}function Je(e){return Object.keys(e)}var Ye=_({render(){var e;return(e=this.$slots).default?.call(e)}}),Xe=y(`scrollbar`,` + overflow: hidden; + position: relative; + z-index: auto; + height: 100%; + width: 100%; +`,[C(`>`,[y(`scrollbar-container`,` + width: 100%; + overflow: scroll; + height: 100%; + min-height: inherit; + max-height: inherit; + scrollbar-width: none; + `,[C(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,` + width: 0; + height: 0; + display: none; + `),C(`>`,[y(`scrollbar-content`,` + box-sizing: border-box; + min-width: 100%; + `)])])]),C(`>, +`,[y(`scrollbar-rail`,` + position: absolute; + pointer-events: none; + user-select: none; + background: var(--n-scrollbar-rail-color); + -webkit-user-select: none; + `,[l(`horizontal`,` + height: var(--n-scrollbar-height); + `,[C(`>`,[g(`scrollbar`,` + height: var(--n-scrollbar-height); + border-radius: var(--n-scrollbar-border-radius); + right: 0; + `)])]),l(`horizontal--top`,` + top: var(--n-scrollbar-rail-top-horizontal-top); + right: var(--n-scrollbar-rail-right-horizontal-top); + bottom: var(--n-scrollbar-rail-bottom-horizontal-top); + left: var(--n-scrollbar-rail-left-horizontal-top); + `),l(`horizontal--bottom`,` + top: var(--n-scrollbar-rail-top-horizontal-bottom); + right: var(--n-scrollbar-rail-right-horizontal-bottom); + bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom); + left: var(--n-scrollbar-rail-left-horizontal-bottom); + `),l(`vertical`,` + width: var(--n-scrollbar-width); + `,[C(`>`,[g(`scrollbar`,` + width: var(--n-scrollbar-width); + border-radius: var(--n-scrollbar-border-radius); + bottom: 0; + `)])]),l(`vertical--left`,` + top: var(--n-scrollbar-rail-top-vertical-left); + right: var(--n-scrollbar-rail-right-vertical-left); + bottom: var(--n-scrollbar-rail-bottom-vertical-left); + left: var(--n-scrollbar-rail-left-vertical-left); + `),l(`vertical--right`,` + top: var(--n-scrollbar-rail-top-vertical-right); + right: var(--n-scrollbar-rail-right-vertical-right); + bottom: var(--n-scrollbar-rail-bottom-vertical-right); + left: var(--n-scrollbar-rail-left-vertical-right); + `),l(`disabled`,[C(`>`,[g(`scrollbar`,`pointer-events: none;`)])]),C(`>`,[g(`scrollbar`,` + z-index: 1; + position: absolute; + cursor: pointer; + pointer-events: all; + background-color: var(--n-scrollbar-color); + transition: background-color .2s var(--n-scrollbar-bezier); + `,[j(),C(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),Ze=_({name:`Scrollbar`,props:Object.assign(Object.assign({},b.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=a(e),c=p(`Scrollbar`,i,n),l=m(null),d=m(null),f=m(null),h=m(null),g=m(null),_=m(null),v=m(null),y=m(null),S=m(null),C=m(null),w=m(null),D=m(0),O=m(0),k=m(!1),A=m(!1),j=!1,M=!1,N,P,F=0,ne=0,I=0,L=0,re=oe(),ie=b(`Scrollbar`,`-scrollbar`,Xe,ee,e,n),R=u(()=>{let{value:e}=y,{value:t}=_,{value:n}=C;return e===null||t===null||n===null?0:Math.min(e,n*e/t+T(ie.value.self.width)*1.5)}),ae=u(()=>`${R.value}px`),V=u(()=>{let{value:e}=S,{value:t}=v,{value:n}=w;return e===null||t===null||n===null?0:n*e/t+T(ie.value.self.height)*1.5}),H=u(()=>`${V.value}px`),ce=u(()=>{let{value:e}=y,{value:t}=D,{value:n}=_,{value:r}=C;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-R.value):0}}),le=u(()=>`${ce.value}px`),ue=u(()=>{let{value:e}=S,{value:t}=O,{value:n}=v,{value:r}=w;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-V.value):0}}),de=u(()=>`${ue.value}px`),U=u(()=>{let{value:e}=y,{value:t}=_;return e!==null&&t!==null&&t>e}),W=u(()=>{let{value:e}=S,{value:t}=v;return e!==null&&t!==null&&t>e}),fe=u(()=>{let{trigger:t}=e;return t===`none`||k.value}),pe=u(()=>{let{trigger:t}=e;return t===`none`||A.value}),G=u(()=>{let{container:t}=e;return t?t():d.value}),me=u(()=>{let{content:t}=e;return t?t():f.value}),K=(t,n)=>{if(!e.scrollable)return;if(typeof t==`number`){Y(t,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=t;(r!==void 0||i!==void 0)&&Y(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?Y(0,a*o,o,u,c):s===`bottom`?Y(0,2**53-1,0,!1,c):s===`top`&&Y(0,0,0,!1,c):Y(0,l.offsetTop,l.offsetHeight,u,c)},he=se(()=>{e.container||K({top:D.value,left:O.value})}),q=()=>{he.isDeactivated||Q()},J=t=>{if(he.isDeactivated)return;let{onResize:n}=e;n&&n(t),Q()},ge=(t,n)=>{if(!e.scrollable)return;let{value:r}=G;r&&(typeof t==`object`?r.scrollBy(t):r.scrollBy(t,n||0))};function Y(e,t,n,r,i){let{value:a}=G;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function _e(){be(),xe(),Q()}function X(){Z()}function Z(){ve(),ye()}function ve(){P!==void 0&&window.clearTimeout(P),P=window.setTimeout(()=>{A.value=!1},e.duration)}function ye(){N!==void 0&&window.clearTimeout(N),N=window.setTimeout(()=>{k.value=!1},e.duration)}function be(){N!==void 0&&window.clearTimeout(N),k.value=!0}function xe(){P!==void 0&&window.clearTimeout(P),A.value=!0}function Se(t){let{onScroll:n}=e;n&&n(t),Ce()}function Ce(){let{value:e}=G;e&&(D.value=e.scrollTop,O.value=e.scrollLeft*(c?.value?-1:1))}function we(){let{value:e}=me;e&&(_.value=e.offsetHeight,v.value=e.offsetWidth);let{value:t}=G;t&&(y.value=t.offsetHeight,S.value=t.offsetWidth);let{value:n}=g,{value:r}=h;n&&(w.value=n.offsetWidth),r&&(C.value=r.offsetHeight)}function Te(){let{value:e}=G;e&&(D.value=e.scrollTop,O.value=e.scrollLeft*(c?.value?-1:1),y.value=e.offsetHeight,S.value=e.offsetWidth,_.value=e.scrollHeight,v.value=e.scrollWidth);let{value:t}=g,{value:n}=h;t&&(w.value=t.offsetWidth),n&&(C.value=n.offsetHeight)}function Q(){e.scrollable&&(e.useUnifiedContainer?Te():(we(),Ce()))}function Ee(e){return!l.value?.contains(te(e))}function De(e){e.preventDefault(),e.stopPropagation(),M=!0,z(`mousemove`,window,Oe,!0),z(`mouseup`,window,ke,!0),ne=O.value,I=c?.value?window.innerWidth-e.clientX:e.clientX}function Oe(t){if(!M)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:n}=S,{value:r}=v,{value:i}=V;if(n===null||r===null)return;let a=(c?.value?window.innerWidth-t.clientX-I:t.clientX-I)*(r-n)/(n-i),o=r-n,s=ne+a;s=Math.min(o,s),s=Math.max(s,0);let{value:l}=G;if(l){l.scrollLeft=s*(c?.value?-1:1);let{internalOnUpdateScrollLeft:t}=e;t&&t(s)}}function ke(e){e.preventDefault(),e.stopPropagation(),B(`mousemove`,window,Oe,!0),B(`mouseup`,window,ke,!0),M=!1,Q(),Ee(e)&&Z()}function $(e){e.preventDefault(),e.stopPropagation(),j=!0,z(`mousemove`,window,Ae,!0),z(`mouseup`,window,je,!0),F=D.value,L=e.clientY}function Ae(e){if(!j)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:t}=y,{value:n}=_,{value:r}=R;if(t===null||n===null)return;let i=(e.clientY-L)*(n-t)/(t-r),a=n-t,o=F+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=G;s&&(s.scrollTop=o)}function je(e){e.preventDefault(),e.stopPropagation(),B(`mousemove`,window,Ae,!0),B(`mouseup`,window,je,!0),j=!1,Q(),Ee(e)&&Z()}x(()=>{let{value:e}=W,{value:t}=U,{value:r}=n,{value:i}=g,{value:a}=h;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),o(()=>{e.container||Q()}),s(()=>{N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P),B(`mousemove`,window,Ae,!0),B(`mouseup`,window,je,!0)});let Me=u(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:a,railInsetHorizontalTop:o,railInsetHorizontalBottom:s,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=ie.value,{top:f,right:p,bottom:m,left:h}=E(o),{top:g,right:_,bottom:v,left:y}=E(s),{top:b,right:x,bottom:S,left:C}=E(c?.value?qe(l):l),{top:w,right:T,bottom:D,left:O}=E(c?.value?qe(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":a,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":C,"--n-scrollbar-rail-top-vertical-left":w,"--n-scrollbar-rail-right-vertical-left":T,"--n-scrollbar-rail-bottom-vertical-left":D,"--n-scrollbar-rail-left-vertical-left":O,"--n-scrollbar-rail-color":d}}),Ne=r?t(`scrollbar`,void 0,Me,e):void 0;return Object.assign(Object.assign({},{scrollTo:K,scrollBy:ge,sync:Q,syncUnifiedContainer:Te,handleMouseEnterWrapper:_e,handleMouseLeaveWrapper:X}),{mergedClsPrefix:n,rtlEnabled:c,containerScrollTop:D,wrapperRef:l,containerRef:d,contentRef:f,yRailRef:h,xRailRef:g,needYBar:U,needXBar:W,yBarSizePx:ae,xBarSizePx:H,yBarTopPx:le,xBarLeftPx:de,isShowXBar:fe,isShowYBar:pe,isIos:re,handleScroll:Se,handleContentResize:q,handleContainerResize:J,handleYScrollMouseDown:$,handleXScrollMouseDown:De,containerWidth:S,cssVars:r?void 0:Me,themeClass:Ne?.themeClass,onRender:Ne?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:a,internalHoistYRail:o,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>i(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},i(u?Ye:P,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var s;return(s=this.onRender)==null||s.call(this),i(`div`,r(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,a&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):i(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":D(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},i(Ke,{onResize:this.handleContentResize},{default:()=>i(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),o?null:d(void 0,void 0),l&&i(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},i(u?Ye:P,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:a?this.xBarLeftPx:void 0,left:a?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},p=this.container?f():i(Ke,{onResize:this.handleContainerResize},{default:f});return o?i(h,null,p,d(this.themeClass,this.cssVars)):p}}),Qe=Ze,$e=y(`card-content`,` + flex: 1; + min-width: 0; + box-sizing: border-box; + padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); + font-size: var(--n-font-size); +`),et=C([y(`card`,` + font-size: var(--n-font-size); + line-height: var(--n-line-height); + display: flex; + flex-direction: column; + width: 100%; + box-sizing: border-box; + position: relative; + border-radius: var(--n-border-radius); + background-color: var(--n-color); + color: var(--n-text-color); + word-break: break-word; + transition: + color .3s var(--n-bezier), + background-color .3s var(--n-bezier), + box-shadow .3s var(--n-bezier), + border-color .3s var(--n-bezier); + `,[f({background:`var(--n-color-modal)`}),l(`hoverable`,[C(`&:hover`,`box-shadow: var(--n-box-shadow);`)]),l(`content-segmented`,[C(`>`,[y(`card-content`,` + padding-top: var(--n-padding-bottom); + `),g(`content-scrollbar`,[C(`>`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` + padding-top: var(--n-padding-bottom); + `)])])])])])]),l(`content-soft-segmented`,[C(`>`,[y(`card-content`,` + margin: 0 var(--n-padding-left); + padding: var(--n-padding-bottom) 0; + `),g(`content-scrollbar`,[C(`>`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` + margin: 0 var(--n-padding-left); + padding: var(--n-padding-bottom) 0; + `)])])])])])]),l(`footer-segmented`,[C(`>`,[g(`footer`,` + padding-top: var(--n-padding-bottom); + `)])]),l(`footer-soft-segmented`,[C(`>`,[g(`footer`,` + padding: var(--n-padding-bottom) 0; + margin: 0 var(--n-padding-left); + `)])]),C(`>`,[y(`card-header`,` + box-sizing: border-box; + display: flex; + align-items: center; + font-size: var(--n-title-font-size); + padding: + var(--n-padding-top) + var(--n-padding-left) + var(--n-padding-bottom) + var(--n-padding-left); + `,[g(`main`,` + font-weight: var(--n-title-font-weight); + transition: color .3s var(--n-bezier); + flex: 1; + min-width: 0; + color: var(--n-title-text-color); + `),g(`extra`,` + display: flex; + align-items: center; + font-size: var(--n-font-size); + font-weight: 400; + transition: color .3s var(--n-bezier); + color: var(--n-text-color); + `),g(`close`,` + margin: 0 0 0 8px; + transition: + background-color .3s var(--n-bezier), + color .3s var(--n-bezier); + `)]),g(`action`,` + box-sizing: border-box; + transition: + background-color .3s var(--n-bezier), + border-color .3s var(--n-bezier); + background-clip: padding-box; + background-color: var(--n-action-color); + `),$e,y(`card-content`,[C(`&:first-child`,` + padding-top: var(--n-padding-bottom); + `)]),g(`content-scrollbar`,` + display: flex; + flex-direction: column; + `,[C(`>`,[y(`scrollbar-container`,[C(`>`,[$e])])]),C(`&:first-child >`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` + padding-top: var(--n-padding-bottom); + `)])])])]),g(`footer`,` + box-sizing: border-box; + padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); + font-size: var(--n-font-size); + `,[C(`&:first-child`,` + padding-top: var(--n-padding-bottom); + `)]),g(`action`,` + background-color: var(--n-action-color); + padding: var(--n-padding-bottom) var(--n-padding-left); + border-bottom-left-radius: var(--n-border-radius); + border-bottom-right-radius: var(--n-border-radius); + `)]),y(`card-cover`,` + overflow: hidden; + width: 100%; + border-radius: var(--n-border-radius) var(--n-border-radius) 0 0; + `,[C(`img`,` + display: block; + width: 100%; + `)]),l(`bordered`,` + border: 1px solid var(--n-border-color); + `,[C(`&:target`,`border-color: var(--n-color-target);`)]),l(`action-segmented`,[C(`>`,[g(`action`,[C(`&:not(:first-child)`,` + border-top: 1px solid var(--n-border-color); + `)])])]),l(`content-segmented, content-soft-segmented`,[C(`>`,[y(`card-content`,` + transition: border-color 0.3s var(--n-bezier); + `,[C(`&:not(:first-child)`,` + border-top: 1px solid var(--n-border-color); + `)]),g(`content-scrollbar`,` + transition: border-color 0.3s var(--n-bezier); + `,[C(`&:not(:first-child)`,` + border-top: 1px solid var(--n-border-color); + `)])])]),l(`footer-segmented, footer-soft-segmented`,[C(`>`,[g(`footer`,` + transition: border-color 0.3s var(--n-bezier); + `,[C(`&:not(:first-child)`,` + border-top: 1px solid var(--n-border-color); + `)])])]),l(`embedded`,` + background-color: var(--n-color-embedded); + `)]),d(y(`card`,` + background: var(--n-color-modal); + `,[l(`embedded`,` + background-color: var(--n-color-embedded-modal); + `)])),v(y(`card`,` + background: var(--n-color-popover); + `,[l(`embedded`,` + background-color: var(--n-color-embedded-popover); + `)]))]),tt={title:[String,Function],contentClass:String,contentStyle:[Object,String],contentScrollable:Boolean,headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:String,bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:`div`},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function,closeFocusable:Boolean},nt=Je(tt),rt=_({name:`Card`,props:Object.assign(Object.assign({},b.props),tt),slots:Object,setup(e){let n=()=>{let{onClose:t}=e;t&&O(t)},{inlineThemeDisabled:r,mergedClsPrefixRef:i,mergedRtlRef:o,mergedComponentPropsRef:s}=a(e),c=b(`Card`,`-card`,et,M,e,i),l=p(`Card`,o,i),d=u(()=>e.size||s?.value?.Card?.size||`medium`),f=u(()=>{let e=d.value,{self:{color:t,colorModal:n,colorTarget:r,textColor:i,titleTextColor:a,titleFontWeight:o,borderColor:s,actionColor:l,borderRadius:u,lineHeight:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:g,closeColorPressed:_,closeBorderRadius:v,closeIconSize:y,closeSize:b,boxShadow:x,colorPopover:C,colorEmbedded:w,colorEmbeddedModal:T,colorEmbeddedPopover:D,[S(`padding`,e)]:O,[S(`fontSize`,e)]:k,[S(`titleFontSize`,e)]:A},common:{cubicBezierEaseInOut:j}}=c.value,{top:ee,left:M,bottom:N}=E(O);return{"--n-bezier":j,"--n-border-radius":u,"--n-color":t,"--n-color-modal":n,"--n-color-popover":C,"--n-color-embedded":w,"--n-color-embedded-modal":T,"--n-color-embedded-popover":D,"--n-color-target":r,"--n-text-color":i,"--n-line-height":f,"--n-action-color":l,"--n-title-text-color":a,"--n-title-font-weight":o,"--n-close-icon-color":p,"--n-close-icon-color-hover":m,"--n-close-icon-color-pressed":h,"--n-close-color-hover":g,"--n-close-color-pressed":_,"--n-border-color":s,"--n-box-shadow":x,"--n-padding-top":ee,"--n-padding-bottom":N,"--n-padding-left":M,"--n-font-size":k,"--n-title-font-size":A,"--n-close-size":b,"--n-close-icon-size":y,"--n-close-border-radius":v}}),m=r?t(`card`,u(()=>d.value[0]),f,e):void 0;return{rtlEnabled:l,mergedClsPrefix:i,mergedTheme:c,handleCloseClick:n,cssVars:r?void 0:f,themeClass:m?.themeClass,onRender:m?.onRender}},render(){let{segmented:e,bordered:t,hoverable:n,mergedClsPrefix:r,rtlEnabled:a,onRender:o,embedded:s,tag:c,$slots:l}=this;return o?.(),i(c,{class:[`${r}-card`,this.themeClass,s&&`${r}-card--embedded`,{[`${r}-card--rtl`]:a,[`${r}-card--content-scrollable`]:this.contentScrollable,[`${r}-card--content${typeof e!=`boolean`&&e.content===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.content,[`${r}-card--footer${typeof e!=`boolean`&&e.footer===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.footer,[`${r}-card--action-segmented`]:e===!0||e!==!1&&e.action,[`${r}-card--bordered`]:t,[`${r}-card--hoverable`]:n}],style:this.cssVars,role:this.role},A(l.cover,e=>{let t=this.cover?k([this.cover()]):e;return t&&i(`div`,{class:`${r}-card-cover`,role:`none`},t)}),A(l.header,e=>{let{title:t}=this,n=t?k(typeof t==`function`?[t()]:[t]):e;return n||this.closable?i(`div`,{class:[`${r}-card-header`,this.headerClass],style:this.headerStyle,role:`heading`},i(`div`,{class:`${r}-card-header__main`,role:`heading`},n),A(l[`header-extra`],e=>{let t=this.headerExtra?k([this.headerExtra()]):e;return t&&i(`div`,{class:[`${r}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},t)}),this.closable&&i(N,{clsPrefix:r,class:`${r}-card-header__close`,onClick:this.handleCloseClick,focusable:this.closeFocusable,absolute:!0})):null}),A(l.default,e=>{let{content:t}=this,n=t?k(typeof t==`function`?[t()]:[t]):e;return n?this.contentScrollable?i(Ze,{class:`${r}-card__content-scrollbar`,contentClass:[`${r}-card-content`,this.contentClass],contentStyle:this.contentStyle},n):i(`div`,{class:[`${r}-card-content`,this.contentClass],style:this.contentStyle,role:`none`},n):null}),A(l.footer,e=>{let t=this.footer?k([this.footer()]):e;return t&&i(`div`,{class:[`${r}-card__footer`,this.footerClass],style:this.footerStyle,role:`none`},t)}),A(l.action,e=>{let t=this.action?k([this.action()]):e;return t&&i(`div`,{class:`${r}-card__action`,role:`none`},t)}))}});export{Qe as a,Ke as c,z as d,te as f,Ze as i,Ge as l,nt as n,Ye as o,tt as r,Je as s,rt as t,B as u}; \ No newline at end of file diff --git a/frontend/dist/assets/Card-D1LVu21r.js b/frontend/dist/assets/Card-D1LVu21r.js deleted file mode 100644 index 4056475..0000000 --- a/frontend/dist/assets/Card-D1LVu21r.js +++ /dev/null @@ -1,190 +0,0 @@ -import{At as e,H as t,Ht as n,Lt as r,Mt as i,U as a,Ut as o,Vt as s,Yt as c,at as l,bt as u,ct as d,et as f,g as p,hn as m,ht as h,it as g,kt as _,lt as v,nt as y,p as b,rn as x,st as S,tt as C,zt as w}from"./client-Bz0sY7Lm.js";import{i as T,o as E,s as D}from"./es-BhJOHfSF.js";import{n as O,o as k,s as A}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as j}from"./fade-in.cssr-0rRavIDG.js";import{r as ee,t as M}from"./light-BweHUoJf.js";import{it as N,z as P}from"./index-6B3OmSLg.js";function te(e){return e.composedPath()[0]||null}function F(e){return e.composedPath()[0]}var ne={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function re(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(F(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(F(n))},i=r=>{e&&(t.contains(F(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function ie(e,t,n){let r=ne[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=re(e,t,n)),a}function ae(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=ie(e,t,n);return Object.keys(i).forEach(e=>{R(e,document,i[e],r)}),!0}return!1}function I(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=ie(e,t,n);return Object.keys(i).forEach(e=>{z(e,document,i[e],r)}),!0}return!1}function L(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=F(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,ae(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(I(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:R,off:z}=L(),oe=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function se(){return oe}function ce(e){let t={isDeactivated:!1},r=!1;return w(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),n(()=>{t.isDeactivated=!0,r||=!0}),t}function B(e,t){console.error(`[vueuc/${e}]: ${t}`)}var V=[],le=function(){return V.some(function(e){return e.activeTargets.length>0})},ue=function(){return V.some(function(e){return e.skippedTargets.length>0})},de=`ResizeObserver loop completed with undelivered notifications.`,fe=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:de}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=de),window.dispatchEvent(e)},H;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(H||={});var U=function(e){return Object.freeze(e)},pe=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,U(this)}return e}(),me=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,U(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),W=function(e){return e instanceof SVGElement&&`getBBox`in e},he=function(e){if(W(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},G=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},ge=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},K=typeof window<`u`?window:{},q=new WeakMap,_e=/auto|scroll/,J=/^tb|vertical/,ve=/msie|trident/i.test(K.navigator&&K.navigator.userAgent),Y=function(e){return parseFloat(e||`0`)},X=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new pe((n?t:e)||0,(n?e:t)||0)},ye=U({devicePixelContentBoxSize:X(),borderBoxSize:X(),contentBoxSize:X(),contentRect:new me(0,0,0,0)}),be=function(e,t){if(t===void 0&&(t=!1),q.has(e)&&!t)return q.get(e);if(he(e))return q.set(e,ye),ye;var n=getComputedStyle(e),r=W(e)&&e.ownerSVGElement&&e.getBBox(),i=!ve&&n.boxSizing===`border-box`,a=J.test(n.writingMode||``),o=!r&&_e.test(n.overflowY||``),s=!r&&_e.test(n.overflowX||``),c=r?0:Y(n.paddingTop),l=r?0:Y(n.paddingRight),u=r?0:Y(n.paddingBottom),d=r?0:Y(n.paddingLeft),f=r?0:Y(n.borderTopWidth),p=r?0:Y(n.borderRightWidth),m=r?0:Y(n.borderBottomWidth),h=r?0:Y(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:Y(n.width)-S-x,T=r?r.height:Y(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=U({devicePixelContentBoxSize:X(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:X(E,D,a),contentBoxSize:X(w,T,a),contentRect:new me(d,c,w,T)});return q.set(e,O),O},xe=function(e,t,n){var r=be(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case H.DEVICE_PIXEL_CONTENT_BOX:return o;case H.BORDER_BOX:return i;default:return a}},Se=function(){function e(e){var t=be(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=U([t.borderBoxSize]),this.contentBoxSize=U([t.contentBoxSize]),this.devicePixelContentBoxSize=U([t.devicePixelContentBoxSize])}return e}(),Ce=function(e){if(he(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},we=function(){var e=1/0,t=[];V.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new Se(t.target),i=Ce(t.target);r.push(n),t.lastReportedSize=xe(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Ee=function(){var e=0;for(Te(e);le();)e=we(),Te(e);return ue()&&fe(),e>0},Z,De=[],Oe=function(){return De.splice(0).forEach(function(e){return e()})},ke=function(e){if(!Z){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Oe()}).observe(n,{characterData:!0}),Z=function(){n.textContent=`${t?t--:t++}`}}De.push(e),Z()},Ae=function(e){ke(function(){requestAnimationFrame(e)})},Q=0,je=function(){return!!Q},Me=250,Ne={attributes:!0,characterData:!0,childList:!0,subtree:!0},Pe=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Fe=function(e){return e===void 0&&(e=0),Date.now()+e},Ie=!1,Le=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=Me),!Ie){Ie=!0;var n=Fe(e);Ae(function(){var r=!1;try{r=Ee()}finally{if(Ie=!1,e=n-Fe(),!je())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Ne)};document.body?t():K.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Pe.forEach(function(t){return K.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Pe.forEach(function(t){return K.removeEventListener(t,e.listener,!0)}),!0)},e}()),Re=function(e){!Q&&e>0&&Le.start(),Q+=e,!Q&&Le.stop()},ze=function(e){return!W(e)&&!ge(e)&&getComputedStyle(e).display===`inline`},Be=function(){function e(e,t){this.target=e,this.observedBox=t||H.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=xe(this.target,this.observedBox,!0);return ze(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Ve=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),He=new WeakMap,Ue=function(e,t){for(var n=0;n=0&&(i&&V.splice(V.indexOf(n),1),n.observationTargets.splice(r,1),Re(-1))},e.disconnect=function(e){var t=this,n=He.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),We=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);$.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!G(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);$.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!G(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);$.unobserve(this,e)},e.prototype.disconnect=function(){$.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Ge=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||We)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Ke=_({name:`ResizeObserver`,props:{onResize:Function},setup(t){let n=!1,r=e().proxy;function i(e){let{onResize:n}=t;n!==void 0&&n(e)}o(()=>{let e=r.$el;if(e===void 0){B(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){B(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Ge.registerHandler(e.nextElementSibling,i),n=!0)}),s(()=>{n&&Ge.unregisterHandler(r.$el.nextElementSibling)})},render(){return c(this.$slots,`default`)}});function qe(e){let{left:t,right:n,top:r,bottom:i}=E(e);return`${r} ${t} ${i} ${n}`}function Je(e){return Object.keys(e)}var Ye=_({render(){var e;return(e=this.$slots).default?.call(e)}}),Xe=y(`scrollbar`,` - overflow: hidden; - position: relative; - z-index: auto; - height: 100%; - width: 100%; -`,[C(`>`,[y(`scrollbar-container`,` - width: 100%; - overflow: scroll; - height: 100%; - min-height: inherit; - max-height: inherit; - scrollbar-width: none; - `,[C(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,` - width: 0; - height: 0; - display: none; - `),C(`>`,[y(`scrollbar-content`,` - box-sizing: border-box; - min-width: 100%; - `)])])]),C(`>, +`,[y(`scrollbar-rail`,` - position: absolute; - pointer-events: none; - user-select: none; - background: var(--n-scrollbar-rail-color); - -webkit-user-select: none; - `,[l(`horizontal`,` - height: var(--n-scrollbar-height); - `,[C(`>`,[g(`scrollbar`,` - height: var(--n-scrollbar-height); - border-radius: var(--n-scrollbar-border-radius); - right: 0; - `)])]),l(`horizontal--top`,` - top: var(--n-scrollbar-rail-top-horizontal-top); - right: var(--n-scrollbar-rail-right-horizontal-top); - bottom: var(--n-scrollbar-rail-bottom-horizontal-top); - left: var(--n-scrollbar-rail-left-horizontal-top); - `),l(`horizontal--bottom`,` - top: var(--n-scrollbar-rail-top-horizontal-bottom); - right: var(--n-scrollbar-rail-right-horizontal-bottom); - bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom); - left: var(--n-scrollbar-rail-left-horizontal-bottom); - `),l(`vertical`,` - width: var(--n-scrollbar-width); - `,[C(`>`,[g(`scrollbar`,` - width: var(--n-scrollbar-width); - border-radius: var(--n-scrollbar-border-radius); - bottom: 0; - `)])]),l(`vertical--left`,` - top: var(--n-scrollbar-rail-top-vertical-left); - right: var(--n-scrollbar-rail-right-vertical-left); - bottom: var(--n-scrollbar-rail-bottom-vertical-left); - left: var(--n-scrollbar-rail-left-vertical-left); - `),l(`vertical--right`,` - top: var(--n-scrollbar-rail-top-vertical-right); - right: var(--n-scrollbar-rail-right-vertical-right); - bottom: var(--n-scrollbar-rail-bottom-vertical-right); - left: var(--n-scrollbar-rail-left-vertical-right); - `),l(`disabled`,[C(`>`,[g(`scrollbar`,`pointer-events: none;`)])]),C(`>`,[g(`scrollbar`,` - z-index: 1; - position: absolute; - cursor: pointer; - pointer-events: all; - background-color: var(--n-scrollbar-color); - transition: background-color .2s var(--n-scrollbar-bezier); - `,[j(),C(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),Ze=_({name:`Scrollbar`,props:Object.assign(Object.assign({},b.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=a(e),c=p(`Scrollbar`,i,n),l=m(null),d=m(null),f=m(null),h=m(null),g=m(null),_=m(null),v=m(null),y=m(null),S=m(null),C=m(null),w=m(null),D=m(0),O=m(0),k=m(!1),A=m(!1),j=!1,M=!1,N,P,F=0,ne=0,re=0,ie=0,ae=se(),I=b(`Scrollbar`,`-scrollbar`,Xe,ee,e,n),L=u(()=>{let{value:e}=y,{value:t}=_,{value:n}=C;return e===null||t===null||n===null?0:Math.min(e,n*e/t+T(I.value.self.width)*1.5)}),oe=u(()=>`${L.value}px`),B=u(()=>{let{value:e}=S,{value:t}=v,{value:n}=w;return e===null||t===null||n===null?0:n*e/t+T(I.value.self.height)*1.5}),V=u(()=>`${B.value}px`),le=u(()=>{let{value:e}=y,{value:t}=D,{value:n}=_,{value:r}=C;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-L.value):0}}),ue=u(()=>`${le.value}px`),de=u(()=>{let{value:e}=S,{value:t}=O,{value:n}=v,{value:r}=w;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-B.value):0}}),fe=u(()=>`${de.value}px`),H=u(()=>{let{value:e}=y,{value:t}=_;return e!==null&&t!==null&&t>e}),U=u(()=>{let{value:e}=S,{value:t}=v;return e!==null&&t!==null&&t>e}),pe=u(()=>{let{trigger:t}=e;return t===`none`||k.value}),me=u(()=>{let{trigger:t}=e;return t===`none`||A.value}),W=u(()=>{let{container:t}=e;return t?t():d.value}),he=u(()=>{let{content:t}=e;return t?t():f.value}),G=(t,n)=>{if(!e.scrollable)return;if(typeof t==`number`){J(t,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=t;(r!==void 0||i!==void 0)&&J(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?J(0,a*o,o,u,c):s===`bottom`?J(0,2**53-1,0,!1,c):s===`top`&&J(0,0,0,!1,c):J(0,l.offsetTop,l.offsetHeight,u,c)},ge=ce(()=>{e.container||G({top:D.value,left:O.value})}),K=()=>{ge.isDeactivated||Z()},q=t=>{if(ge.isDeactivated)return;let{onResize:n}=e;n&&n(t),Z()},_e=(t,n)=>{if(!e.scrollable)return;let{value:r}=W;r&&(typeof t==`object`?r.scrollBy(t):r.scrollBy(t,n||0))};function J(e,t,n,r,i){let{value:a}=W;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function ve(){xe(),Se(),Z()}function Y(){X()}function X(){ye(),be()}function ye(){P!==void 0&&window.clearTimeout(P),P=window.setTimeout(()=>{A.value=!1},e.duration)}function be(){N!==void 0&&window.clearTimeout(N),N=window.setTimeout(()=>{k.value=!1},e.duration)}function xe(){N!==void 0&&window.clearTimeout(N),k.value=!0}function Se(){P!==void 0&&window.clearTimeout(P),A.value=!0}function Ce(t){let{onScroll:n}=e;n&&n(t),we()}function we(){let{value:e}=W;e&&(D.value=e.scrollTop,O.value=e.scrollLeft*(c?.value?-1:1))}function Te(){let{value:e}=he;e&&(_.value=e.offsetHeight,v.value=e.offsetWidth);let{value:t}=W;t&&(y.value=t.offsetHeight,S.value=t.offsetWidth);let{value:n}=g,{value:r}=h;n&&(w.value=n.offsetWidth),r&&(C.value=r.offsetHeight)}function Ee(){let{value:e}=W;e&&(D.value=e.scrollTop,O.value=e.scrollLeft*(c?.value?-1:1),y.value=e.offsetHeight,S.value=e.offsetWidth,_.value=e.scrollHeight,v.value=e.scrollWidth);let{value:t}=g,{value:n}=h;t&&(w.value=t.offsetWidth),n&&(C.value=n.offsetHeight)}function Z(){e.scrollable&&(e.useUnifiedContainer?Ee():(Te(),we()))}function De(e){return!l.value?.contains(te(e))}function Oe(e){e.preventDefault(),e.stopPropagation(),M=!0,R(`mousemove`,window,ke,!0),R(`mouseup`,window,Ae,!0),ne=O.value,re=c?.value?window.innerWidth-e.clientX:e.clientX}function ke(t){if(!M)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:n}=S,{value:r}=v,{value:i}=B;if(n===null||r===null)return;let a=(c?.value?window.innerWidth-t.clientX-re:t.clientX-re)*(r-n)/(n-i),o=r-n,s=ne+a;s=Math.min(o,s),s=Math.max(s,0);let{value:l}=W;if(l){l.scrollLeft=s*(c?.value?-1:1);let{internalOnUpdateScrollLeft:t}=e;t&&t(s)}}function Ae(e){e.preventDefault(),e.stopPropagation(),z(`mousemove`,window,ke,!0),z(`mouseup`,window,Ae,!0),M=!1,Z(),De(e)&&X()}function Q(e){e.preventDefault(),e.stopPropagation(),j=!0,R(`mousemove`,window,je,!0),R(`mouseup`,window,Me,!0),F=D.value,ie=e.clientY}function je(e){if(!j)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:t}=y,{value:n}=_,{value:r}=L;if(t===null||n===null)return;let i=(e.clientY-ie)*(n-t)/(t-r),a=n-t,o=F+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=W;s&&(s.scrollTop=o)}function Me(e){e.preventDefault(),e.stopPropagation(),z(`mousemove`,window,je,!0),z(`mouseup`,window,Me,!0),j=!1,Z(),De(e)&&X()}x(()=>{let{value:e}=U,{value:t}=H,{value:r}=n,{value:i}=g,{value:a}=h;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),o(()=>{e.container||Z()}),s(()=>{N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P),z(`mousemove`,window,je,!0),z(`mouseup`,window,Me,!0)});let Ne=u(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:a,railInsetHorizontalTop:o,railInsetHorizontalBottom:s,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=I.value,{top:f,right:p,bottom:m,left:h}=E(o),{top:g,right:_,bottom:v,left:y}=E(s),{top:b,right:x,bottom:S,left:C}=E(c?.value?qe(l):l),{top:w,right:T,bottom:D,left:O}=E(c?.value?qe(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":a,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":C,"--n-scrollbar-rail-top-vertical-left":w,"--n-scrollbar-rail-right-vertical-left":T,"--n-scrollbar-rail-bottom-vertical-left":D,"--n-scrollbar-rail-left-vertical-left":O,"--n-scrollbar-rail-color":d}}),Pe=r?t(`scrollbar`,void 0,Ne,e):void 0;return Object.assign(Object.assign({},{scrollTo:G,scrollBy:_e,sync:Z,syncUnifiedContainer:Ee,handleMouseEnterWrapper:ve,handleMouseLeaveWrapper:Y}),{mergedClsPrefix:n,rtlEnabled:c,containerScrollTop:D,wrapperRef:l,containerRef:d,contentRef:f,yRailRef:h,xRailRef:g,needYBar:H,needXBar:U,yBarSizePx:oe,xBarSizePx:V,yBarTopPx:ue,xBarLeftPx:fe,isShowXBar:pe,isShowYBar:me,isIos:ae,handleScroll:Ce,handleContentResize:K,handleContainerResize:q,handleYScrollMouseDown:Q,handleXScrollMouseDown:Oe,containerWidth:S,cssVars:r?void 0:Ne,themeClass:Pe?.themeClass,onRender:Pe?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:a,internalHoistYRail:o,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>i(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},i(u?Ye:N,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var s;return(s=this.onRender)==null||s.call(this),i(`div`,r(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,a&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):i(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":D(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},i(Ke,{onResize:this.handleContentResize},{default:()=>i(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),o?null:d(void 0,void 0),l&&i(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},i(u?Ye:N,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:a?this.xBarLeftPx:void 0,left:a?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},p=this.container?f():i(Ke,{onResize:this.handleContainerResize},{default:f});return o?i(h,null,p,d(this.themeClass,this.cssVars)):p}}),Qe=Ze,$e=y(`card-content`,` - flex: 1; - min-width: 0; - box-sizing: border-box; - padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); - font-size: var(--n-font-size); -`),et=C([y(`card`,` - font-size: var(--n-font-size); - line-height: var(--n-line-height); - display: flex; - flex-direction: column; - width: 100%; - box-sizing: border-box; - position: relative; - border-radius: var(--n-border-radius); - background-color: var(--n-color); - color: var(--n-text-color); - word-break: break-word; - transition: - color .3s var(--n-bezier), - background-color .3s var(--n-bezier), - box-shadow .3s var(--n-bezier), - border-color .3s var(--n-bezier); - `,[f({background:`var(--n-color-modal)`}),l(`hoverable`,[C(`&:hover`,`box-shadow: var(--n-box-shadow);`)]),l(`content-segmented`,[C(`>`,[y(`card-content`,` - padding-top: var(--n-padding-bottom); - `),g(`content-scrollbar`,[C(`>`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` - padding-top: var(--n-padding-bottom); - `)])])])])])]),l(`content-soft-segmented`,[C(`>`,[y(`card-content`,` - margin: 0 var(--n-padding-left); - padding: var(--n-padding-bottom) 0; - `),g(`content-scrollbar`,[C(`>`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` - margin: 0 var(--n-padding-left); - padding: var(--n-padding-bottom) 0; - `)])])])])])]),l(`footer-segmented`,[C(`>`,[g(`footer`,` - padding-top: var(--n-padding-bottom); - `)])]),l(`footer-soft-segmented`,[C(`>`,[g(`footer`,` - padding: var(--n-padding-bottom) 0; - margin: 0 var(--n-padding-left); - `)])]),C(`>`,[y(`card-header`,` - box-sizing: border-box; - display: flex; - align-items: center; - font-size: var(--n-title-font-size); - padding: - var(--n-padding-top) - var(--n-padding-left) - var(--n-padding-bottom) - var(--n-padding-left); - `,[g(`main`,` - font-weight: var(--n-title-font-weight); - transition: color .3s var(--n-bezier); - flex: 1; - min-width: 0; - color: var(--n-title-text-color); - `),g(`extra`,` - display: flex; - align-items: center; - font-size: var(--n-font-size); - font-weight: 400; - transition: color .3s var(--n-bezier); - color: var(--n-text-color); - `),g(`close`,` - margin: 0 0 0 8px; - transition: - background-color .3s var(--n-bezier), - color .3s var(--n-bezier); - `)]),g(`action`,` - box-sizing: border-box; - transition: - background-color .3s var(--n-bezier), - border-color .3s var(--n-bezier); - background-clip: padding-box; - background-color: var(--n-action-color); - `),$e,y(`card-content`,[C(`&:first-child`,` - padding-top: var(--n-padding-bottom); - `)]),g(`content-scrollbar`,` - display: flex; - flex-direction: column; - `,[C(`>`,[y(`scrollbar-container`,[C(`>`,[$e])])]),C(`&:first-child >`,[y(`scrollbar-container`,[C(`>`,[y(`card-content`,` - padding-top: var(--n-padding-bottom); - `)])])])]),g(`footer`,` - box-sizing: border-box; - padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); - font-size: var(--n-font-size); - `,[C(`&:first-child`,` - padding-top: var(--n-padding-bottom); - `)]),g(`action`,` - background-color: var(--n-action-color); - padding: var(--n-padding-bottom) var(--n-padding-left); - border-bottom-left-radius: var(--n-border-radius); - border-bottom-right-radius: var(--n-border-radius); - `)]),y(`card-cover`,` - overflow: hidden; - width: 100%; - border-radius: var(--n-border-radius) var(--n-border-radius) 0 0; - `,[C(`img`,` - display: block; - width: 100%; - `)]),l(`bordered`,` - border: 1px solid var(--n-border-color); - `,[C(`&:target`,`border-color: var(--n-color-target);`)]),l(`action-segmented`,[C(`>`,[g(`action`,[C(`&:not(:first-child)`,` - border-top: 1px solid var(--n-border-color); - `)])])]),l(`content-segmented, content-soft-segmented`,[C(`>`,[y(`card-content`,` - transition: border-color 0.3s var(--n-bezier); - `,[C(`&:not(:first-child)`,` - border-top: 1px solid var(--n-border-color); - `)]),g(`content-scrollbar`,` - transition: border-color 0.3s var(--n-bezier); - `,[C(`&:not(:first-child)`,` - border-top: 1px solid var(--n-border-color); - `)])])]),l(`footer-segmented, footer-soft-segmented`,[C(`>`,[g(`footer`,` - transition: border-color 0.3s var(--n-bezier); - `,[C(`&:not(:first-child)`,` - border-top: 1px solid var(--n-border-color); - `)])])]),l(`embedded`,` - background-color: var(--n-color-embedded); - `)]),d(y(`card`,` - background: var(--n-color-modal); - `,[l(`embedded`,` - background-color: var(--n-color-embedded-modal); - `)])),v(y(`card`,` - background: var(--n-color-popover); - `,[l(`embedded`,` - background-color: var(--n-color-embedded-popover); - `)]))]),tt={title:[String,Function],contentClass:String,contentStyle:[Object,String],contentScrollable:Boolean,headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:String,bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:`div`},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function,closeFocusable:Boolean},nt=Je(tt),rt=_({name:`Card`,props:Object.assign(Object.assign({},b.props),tt),slots:Object,setup(e){let n=()=>{let{onClose:t}=e;t&&A(t)},{inlineThemeDisabled:r,mergedClsPrefixRef:i,mergedRtlRef:o,mergedComponentPropsRef:s}=a(e),c=b(`Card`,`-card`,et,M,e,i),l=p(`Card`,o,i),d=u(()=>e.size||s?.value?.Card?.size||`medium`),f=u(()=>{let e=d.value,{self:{color:t,colorModal:n,colorTarget:r,textColor:i,titleTextColor:a,titleFontWeight:o,borderColor:s,actionColor:l,borderRadius:u,lineHeight:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:g,closeColorPressed:_,closeBorderRadius:v,closeIconSize:y,closeSize:b,boxShadow:x,colorPopover:C,colorEmbedded:w,colorEmbeddedModal:T,colorEmbeddedPopover:D,[S(`padding`,e)]:O,[S(`fontSize`,e)]:k,[S(`titleFontSize`,e)]:A},common:{cubicBezierEaseInOut:j}}=c.value,{top:ee,left:M,bottom:N}=E(O);return{"--n-bezier":j,"--n-border-radius":u,"--n-color":t,"--n-color-modal":n,"--n-color-popover":C,"--n-color-embedded":w,"--n-color-embedded-modal":T,"--n-color-embedded-popover":D,"--n-color-target":r,"--n-text-color":i,"--n-line-height":f,"--n-action-color":l,"--n-title-text-color":a,"--n-title-font-weight":o,"--n-close-icon-color":p,"--n-close-icon-color-hover":m,"--n-close-icon-color-pressed":h,"--n-close-color-hover":g,"--n-close-color-pressed":_,"--n-border-color":s,"--n-box-shadow":x,"--n-padding-top":ee,"--n-padding-bottom":N,"--n-padding-left":M,"--n-font-size":k,"--n-title-font-size":A,"--n-close-size":b,"--n-close-icon-size":y,"--n-close-border-radius":v}}),m=r?t(`card`,u(()=>d.value[0]),f,e):void 0;return{rtlEnabled:l,mergedClsPrefix:i,mergedTheme:c,handleCloseClick:n,cssVars:r?void 0:f,themeClass:m?.themeClass,onRender:m?.onRender}},render(){let{segmented:e,bordered:t,hoverable:n,mergedClsPrefix:r,rtlEnabled:a,onRender:o,embedded:s,tag:c,$slots:l}=this;return o?.(),i(c,{class:[`${r}-card`,this.themeClass,s&&`${r}-card--embedded`,{[`${r}-card--rtl`]:a,[`${r}-card--content-scrollable`]:this.contentScrollable,[`${r}-card--content${typeof e!=`boolean`&&e.content===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.content,[`${r}-card--footer${typeof e!=`boolean`&&e.footer===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.footer,[`${r}-card--action-segmented`]:e===!0||e!==!1&&e.action,[`${r}-card--bordered`]:t,[`${r}-card--hoverable`]:n}],style:this.cssVars,role:this.role},k(l.cover,e=>{let t=this.cover?O([this.cover()]):e;return t&&i(`div`,{class:`${r}-card-cover`,role:`none`},t)}),k(l.header,e=>{let{title:t}=this,n=t?O(typeof t==`function`?[t()]:[t]):e;return n||this.closable?i(`div`,{class:[`${r}-card-header`,this.headerClass],style:this.headerStyle,role:`heading`},i(`div`,{class:`${r}-card-header__main`,role:`heading`},n),k(l[`header-extra`],e=>{let t=this.headerExtra?O([this.headerExtra()]):e;return t&&i(`div`,{class:[`${r}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},t)}),this.closable&&i(P,{clsPrefix:r,class:`${r}-card-header__close`,onClick:this.handleCloseClick,focusable:this.closeFocusable,absolute:!0})):null}),k(l.default,e=>{let{content:t}=this,n=t?O(typeof t==`function`?[t()]:[t]):e;return n?this.contentScrollable?i(Ze,{class:`${r}-card__content-scrollbar`,contentClass:[`${r}-card-content`,this.contentClass],contentStyle:this.contentStyle},n):i(`div`,{class:[`${r}-card-content`,this.contentClass],style:this.contentStyle,role:`none`},n):null}),k(l.footer,e=>{let t=this.footer?O([this.footer()]):e;return t&&i(`div`,{class:[`${r}-card__footer`,this.footerClass],style:this.footerStyle,role:`none`},t)}),k(l.action,e=>{let t=this.action?O([this.action()]):e;return t&&i(`div`,{class:`${r}-card__action`,role:`none`},t)}))}});export{Qe as a,Ke as c,R as d,te as f,Ze as i,Ge as l,nt as n,Ye as o,tt as r,Je as s,rt as t,z as u}; \ No newline at end of file diff --git a/frontend/dist/assets/CatalogView-B392_-A1.js b/frontend/dist/assets/CatalogView-Dbbfdp8S.js similarity index 86% rename from frontend/dist/assets/CatalogView-B392_-A1.js rename to frontend/dist/assets/CatalogView-Dbbfdp8S.js index eeaefa2..bec0d7a 100644 --- a/frontend/dist/assets/CatalogView-B392_-A1.js +++ b/frontend/dist/assets/CatalogView-Dbbfdp8S.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,St as s,bn as c,hn as l,ht as u,in as d,kt as f,u as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{r as g}from"./es-BhJOHfSF.js";import{t as _}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as v}from"./Rate-CmLMszwf.js";import{i as y}from"./index-6B3OmSLg.js";import{t as b}from"./HeaderMenu-BhocR0ua.js";var x={class:`center-block-custom`},S={class:`width1200 display-table catalog-grid`},C=[`onClick`],w={class:`scenario-content-block`},T={class:`scenario-title`},E={class:`scenario-description`},D={class:`scenario-rating`},O={key:1},k={key:2},A={key:0,class:`scenario-difficulty`},j={class:`scenario-label`},M=_(f({__name:`CatalogPage`,setup(f){let _=y(),M=l([]),N=p();async function P(){M.value=[];let e=await _.GetScenariosCatalog({});M.value=e.scenarios}async function F(e){N.push(`/scenarios/`+e)}return P(),(l,f)=>(r(),m(u,null,[h(`div`,x,[h(`div`,S,[(r(!0),m(u,null,n(M.value,n=>(r(),m(`div`,{class:`scenario-block`,onClick:e=>F(n.ID),key:n.ID},[h(`div`,{class:`scenario-image-block scenario-image`,style:i({backgroundImage:`url(${n.image})`})},null,4),h(`div`,w,[h(`p`,T,o(n.name),1),h(`p`,E,o(n.description),1),h(`div`,D,[n.reviewsCount?(r(),s(c(v),{key:0,value:n.averageRating,readonly:``,"allow-half":``,size:`small`},null,8,[`value`])):e(``,!0),n.reviewsCount?(r(),m(`span`,O,o(n.averageRating?.toFixed(1))+` · `+o(n.reviewsCount),1)):(r(),m(`span`,k,`Пока нет оценок`))]),n.difficulty?(r(),m(`div`,A,`Сложность: `+o(n.difficulty),1)):e(``,!0),h(`p`,j,[a(c(g),{bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[t(`Автор: `+o(n.author?.username),1)]),_:2},1024)])])],8,C))),128))])]),a(b,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-935ff4be`]]),N=f({__name:`CatalogView`,setup(e){return(e,t)=>(r(),s(M))}});export{N as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,St as s,bn as c,hn as l,ht as u,in as d,kt as f,u as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{r as g}from"./es-Qklex053.js";import{t as _}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as v}from"./Rate-D7hhdTpC.js";import{i as y}from"./index-NE0dsiiJ.js";import{t as b}from"./HeaderMenu-vnmT21Il.js";var x={class:`center-block-custom`},S={class:`width1200 display-table catalog-grid`},C=[`onClick`],w={class:`scenario-content-block`},T={class:`scenario-title`},E={class:`scenario-description`},D={class:`scenario-rating`},O={key:1},k={key:2},A={key:0,class:`scenario-difficulty`},j={class:`scenario-label`},M=_(f({__name:`CatalogPage`,setup(f){let _=y(),M=l([]),N=p();async function P(){M.value=[];let e=await _.GetScenariosCatalog({});M.value=e.scenarios}async function F(e){N.push(`/scenarios/`+e)}return P(),(l,f)=>(r(),m(u,null,[h(`div`,x,[h(`div`,S,[(r(!0),m(u,null,n(M.value,n=>(r(),m(`div`,{class:`scenario-block`,onClick:e=>F(n.ID),key:n.ID},[h(`div`,{class:`scenario-image-block scenario-image`,style:i({backgroundImage:`url(${n.image})`})},null,4),h(`div`,w,[h(`p`,T,o(n.name),1),h(`p`,E,o(n.description),1),h(`div`,D,[n.reviewsCount?(r(),s(c(v),{key:0,value:n.averageRating,readonly:``,"allow-half":``,size:`small`},null,8,[`value`])):e(``,!0),n.reviewsCount?(r(),m(`span`,O,o(n.averageRating?.toFixed(1))+` · `+o(n.reviewsCount),1)):(r(),m(`span`,k,`Пока нет оценок`))]),n.difficulty?(r(),m(`div`,A,`Сложность: `+o(n.difficulty),1)):e(``,!0),h(`p`,j,[a(c(g),{bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[t(`Автор: `+o(n.author?.username),1)]),_:2},1024)])])],8,C))),128))])]),a(b,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-935ff4be`]]),N=f({__name:`CatalogView`,setup(e){return(e,t)=>(r(),s(M))}});export{N as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ConsentView-BGjtjcsI.js b/frontend/dist/assets/ConsentView-DvisXAHz.js similarity index 55% rename from frontend/dist/assets/ConsentView-BGjtjcsI.js rename to frontend/dist/assets/ConsentView-DvisXAHz.js index 82f823a..db9ac4c 100644 --- a/frontend/dist/assets/ConsentView-BGjtjcsI.js +++ b/frontend/dist/assets/ConsentView-DvisXAHz.js @@ -1 +1 @@ -import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-BhocR0ua.js";import{t as o}from"./DocsPage-D65XguoR.js";var s=r({__name:`ConsentView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`consent`}),t(a)],64))}});export{s as default}; \ No newline at end of file +import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-vnmT21Il.js";import{t as o}from"./DocsPage-Bhdw6IT7.js";var s=r({__name:`ConsentView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`consent`}),t(a)],64))}});export{s as default}; \ No newline at end of file diff --git a/frontend/dist/assets/DatePicker-BpsGcifz.js b/frontend/dist/assets/DatePicker-BpsGcifz.js deleted file mode 100644 index 7ec105c..0000000 --- a/frontend/dist/assets/DatePicker-BpsGcifz.js +++ /dev/null @@ -1,362 +0,0 @@ -import{Bt as e,H as t,K as n,Mt as r,Pt as i,Rt as a,U as o,Ut as s,Vt as c,Y as l,an as u,at as d,bt as f,hn as p,it as m,kt as h,mn as ee,nn as te,nt as g,ot as ne,p as _,pn as v,q as re,qt as ie,rn as ae,st as y,tt as b,vn as x}from"./client-Bz0sY7Lm.js";import{a as S,i as C,o as oe,t as w}from"./Follower-C1zQmxY2.js";import{c as T,d as se,u as ce}from"./utils-Bog0tJH6.js";import{d as le,f as ue,i as E,u as de}from"./Card-D1LVu21r.js";import{S as D,a as O,i as fe,m as k,n as A}from"./Suffix-JLavbuLO.js";import{t as pe}from"./use-merged-state-z45UzW9G.js";import{n as j,t as M}from"./Button-lcMg8vK2.js";import{r as N}from"./keep-YWFBE5Rh.js";import{a as P,i as F,o as me,s as I}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as he}from"./use-form-item-Bl3X3aXB.js";import{t as ge}from"./Input-DeqNzuJd.js";import{$ as _e,G as ve,b as ye,it as be,q as xe,x as Se}from"./index-6B3OmSLg.js";function Ce(t={},n){let r=v({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:i,keyup:a}=t,o=e=>{switch(e.key){case`Control`:r.ctrl=!0;break;case`Meta`:r.command=!0,r.win=!0;break;case`Shift`:r.shift=!0;break;case`Tab`:r.tab=!0;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=e=>{switch(e.key){case`Control`:r.ctrl=!1;break;case`Meta`:r.command=!1,r.win=!1;break;case`Shift`:r.shift=!1;break;case`Tab`:r.tab=!1;break}a!==void 0&&Object.keys(a).forEach(t=>{if(t!==e.key)return;let n=a[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},l=()=>{(n===void 0||n.value)&&(le(`keydown`,document,o),le(`keyup`,document,s)),n!==void 0&&te(n,e=>{e?(le(`keydown`,document,o),le(`keyup`,document,s)):(de(`keydown`,document,o),de(`keyup`,document,s))})};return D()?(e(l),c(()=>{(n===void 0||n.value)&&(de(`keydown`,document,o),de(`keyup`,document,s))})):l(),ee(r)}var we=365.2425,Te=6048e5,Ee=864e5,De=6e4,Oe=36e5,ke=1e3,L=3600*24;L*7,L*we/12*3;var Ae=Symbol.for(`constructDateFrom`);function R(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Ae in e?e[Ae](t):e instanceof Date?new e.constructor(t):new Date(t)}function z(e,...t){let n=R.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var je={};function Me(){return je}function B(e,t){return R(t||e,e)}function Ne(e,t){let n=Me(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=B(e,t?.in),a=i.getDay(),o=(ar(`svg`,{width:`28px`,height:`28px`,viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},r(`g`,{"fill-rule":`nonzero`},r(`path`,{d:`M21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 Z M23.5,9.503 L4.5,9.503 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 L23.5,9.503 Z M21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,8.003 L23.5,8.003 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 Z`}))))),Le=h({name:`FastBackward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z`}))))}}),Re=h({name:`FastForward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z`}))))}}),ze=h({name:`Forward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},r(`path`,{d:`M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z`,fill:`currentColor`}))}}),Be=ve(`time`,()=>r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},r(`path`,{d:`M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z`,style:` - fill: none; - stroke: currentColor; - stroke-miterlimit: 10; - stroke-width: 32px; - `}),r(`polyline`,{points:`256 128 256 272 352 272`,style:` - fill: none; - stroke: currentColor; - stroke-linecap: round; - stroke-linejoin: round; - stroke-width: 32px; - `}))),Ve=ve(`to`,()=>r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z`})))));function He(e,t,n){let r=B(e,n?.in);return isNaN(t)?R(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function V(e,t,n){let r=B(e,n?.in);if(isNaN(t))return R(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=R(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function Ue(e,t){return Ne(e,{...t,weekStartsOn:1})}function We(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=R(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=Ue(i),o=R(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=Ue(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ge(e){let t=B(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Ke(e,t){let n=B(e,t?.in);return n.setHours(0,0,0,0),n}function qe(e,t,n){let[r,i]=z(n?.in,e,t),a=Ke(r),o=Ke(i),s=+a-Ge(a),c=+o-Ge(o);return Math.round((s-c)/Ee)}function Je(e,t){let n=We(e,t),r=R(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ue(r)}function Ye(e,t,n){return V(e,t*3,n)}function H(e,t,n){return V(e,t*12,n)}function Xe(e,t,n){let[r,i]=z(n?.in,e,t);return+Ke(r)==+Ke(i)}function Ze(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Qe(e){return!(!Ze(e)&&typeof e!=`number`||isNaN(+B(e)))}function $e(e,t){let n=B(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function et(e,t){let n=B(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function tt(e,t){let n=B(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function nt(e,t){let n=B(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rt(e,t){let n=B(e,t?.in);return qe(n,nt(n))+1}function it(e,t){let n=B(e,t?.in),r=Ue(n)-+Je(n);return Math.round(r/Te)+1}function at(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=Me(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=R(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=Ne(o,t),c=R(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=Ne(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function ot(e,t){let n=Me(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=at(e,t),a=R(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ne(a,t)}function st(e,t){let n=B(e,t?.in),r=Ne(n,t)-+ot(n,t);return Math.round(r/Te)+1}function U(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var ct={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return U(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):U(n+1,2)},d(e,t){return U(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return U(e.getHours()%12||12,t.length)},H(e,t){return U(e.getHours(),t.length)},m(e,t){return U(e.getMinutes(),t.length)},s(e,t){return U(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return U(Math.trunc(r*10**(n-3)),t.length)}},lt={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},ut={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return ct.y(e,t)},Y:function(e,t,n,r){let i=at(e,r),a=i>0?i:1-i;return t===`YY`?U(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):U(a,t.length)},R:function(e,t){return U(We(e),t.length)},u:function(e,t){return U(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return U(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return U(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return ct.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return U(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=st(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):U(i,t.length)},I:function(e,t,n){let r=it(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):U(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):ct.d(e,t)},D:function(e,t,n){let r=rt(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):U(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return U(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return U(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return U(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?lt.noon:r===0?lt.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?lt.evening:r>=12?lt.afternoon:r>=4?lt.morning:lt.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return ct.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):ct.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):U(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):U(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):ct.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):ct.s(e,t)},S:function(e,t){return ct.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return ft(r);case`XXXX`:case`XX`:return pt(r);default:return pt(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return ft(r);case`xxxx`:case`xx`:return pt(r);default:return pt(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+dt(r,`:`);default:return`GMT`+pt(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+dt(r,`:`);default:return`GMT`+pt(r,`:`)}},t:function(e,t,n){return U(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return U(+e,t.length)}};function dt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+U(a,2)}function ft(e,t){return e%60==0?(e>0?`-`:`+`)+U(Math.abs(e)/60,2):pt(e,t)}function pt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=U(Math.trunc(r/60),2),a=U(r%60,2);return n+i+t+a}var mt=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},ht=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},gt={p:ht,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return mt(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,mt(r,t)).replace(`{{time}}`,ht(i,t))}},_t=/^D+$/,vt=/^Y+$/,yt=[`D`,`DD`,`YY`,`YYYY`];function bt(e){return _t.test(e)}function xt(e){return vt.test(e)}function St(e,t,n){let r=Ct(e,t,n);if(console.warn(r),yt.includes(e))throw RangeError(r)}function Ct(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var wt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Et=/^'([^]*?)'?$/,Dt=/''/g,Ot=/[a-zA-Z]/;function W(e,t,n){let r=Me(),i=n?.locale??r.locale??O,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=B(e,n?.in);if(!Qe(s))throw RangeError(`Invalid time value`);let c=t.match(Tt).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=gt[t];return n(e,i.formatLong)}return e}).join(``).match(wt).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:kt(e)};if(ut[t])return{isToken:!0,value:e};if(t.match(Ot))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&xt(a)||!n?.useAdditionalDayOfYearTokens&&bt(a))&&St(a,t,String(e));let o=ut[a[0]];return o(s,a,i.localize,l)}).join(``)}function kt(e){let t=e.match(Et);return t?t[1].replace(Dt,`'`):e}function At(e,t){return B(e,t?.in).getDate()}function jt(e,t){return B(e,t?.in).getDay()}function Mt(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=R(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Nt(){return Object.assign({},Me())}function Pt(e,t){return B(e,t?.in).getHours()}function Ft(e,t){let n=B(e,t?.in).getDay();return n===0?7:n}function It(e){return B(e).getMilliseconds()}function Lt(e,t){return B(e,t?.in).getMinutes()}function G(e,t){return B(e,t?.in).getMonth()}function Rt(e){return B(e).getSeconds()}function K(e){return+B(e)}function q(e,t){return B(e,t?.in).getFullYear()}function zt(e,t){let n=Bt(t)?new t(0):R(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Bt(e){return typeof e==`function`&&e.prototype?.constructor===e}var Vt=10,Ht=class{subPriority=0;validate(e,t){return!0}},Ut=class extends Ht{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},Wt=class extends Ht{priority=Vt;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>R(t,e))}set(e,t){return t.timestampIsSet?e:R(e,zt(e,this.context))}},J=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new Ut(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Gt=class extends J{priority=140;parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`R`,`u`,`t`,`T`]},Y={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Kt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function X(e,t){return e&&{value:t(e.value),rest:e.rest}}function Z(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function qt(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*Oe+a*De+o*ke),rest:t.slice(n[0].length)}}function Jt(e){return Z(Y.anyDigitsSigned,e)}function Q(e,t){switch(e){case 1:return Z(Y.singleDigit,t);case 2:return Z(Y.twoDigits,t);case 3:return Z(Y.threeDigits,t);case 4:return Z(Y.fourDigits,t);default:return Z(RegExp(`^\\d{1,`+e+`}`),t)}}function Yt(e,t){switch(e){case 1:return Z(Y.singleDigitSigned,t);case 2:return Z(Y.twoDigitsSigned,t);case 3:return Z(Y.threeDigitsSigned,t);case 4:return Z(Y.fourDigitsSigned,t);default:return Z(RegExp(`^-?\\d{1,`+e+`}`),t)}}function Xt(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;default:return 0}}function Zt(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function Qt(e){return e%400==0||e%4==0&&e%100!=0}var $t=class extends J{priority=130;incompatibleTokens=[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return X(Q(4,e),r);case`yo`:return X(n.ordinalNumber(e,{unit:`year`}),r);default:return X(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Zt(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},en=class extends J{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return X(Q(4,e),r);case`Yo`:return X(n.ordinalNumber(e,{unit:`year`}),r);default:return X(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=at(e,r);if(n.isTwoDigitYear){let t=Zt(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ne(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ne(e,r)}incompatibleTokens=[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]},tn=class extends J{priority=130;parse(e,t){return Yt(t===`R`?4:t.length,e)}set(e,t,n){let r=R(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ue(r)}incompatibleTokens=[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},nn=class extends J{priority=130;parse(e,t){return Yt(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`]},rn=class extends J{priority=120;parse(e,t,n){switch(t){case`Q`:case`QQ`:return Q(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},an=class extends J{priority=120;parse(e,t,n){switch(t){case`q`:case`qq`:return Q(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},on=class extends J{incompatibleTokens=[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return X(Z(Y.month,e),r);case`MM`:return X(Q(2,e),r);case`Mo`:return X(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},sn=class extends J{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return X(Z(Y.month,e),r);case`LL`:return X(Q(2,e),r);case`Lo`:return X(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]};function cn(e,t,n){let r=B(e,n?.in),i=st(r,n)-t;return r.setDate(r.getDate()-i*7),B(r,n?.in)}var ln=class extends J{priority=100;parse(e,t,n){switch(t){case`w`:return Z(Y.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Ne(cn(e,n,r),r)}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]};function un(e,t,n){let r=B(e,n?.in),i=it(r,n)-t;return r.setDate(r.getDate()-i*7),r}var dn=class extends J{priority=100;parse(e,t,n){switch(t){case`I`:return Z(Y.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Ue(un(e,n))}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},fn=[31,28,31,30,31,30,31,31,30,31,30,31],pn=[31,29,31,30,31,30,31,31,30,31,30,31],mn=class extends J{priority=90;subPriority=1;parse(e,t,n){switch(t){case`d`:return Z(Y.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){let n=Qt(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=pn[r]:t>=1&&t<=fn[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]},hn=class extends J{priority=90;subpriority=1;parse(e,t,n){switch(t){case`D`:case`DD`:return Z(Y.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){return Qt(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`]};function gn(e,t,n){let r=Me(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=B(e,n?.in),o=a.getDay(),s=(t%7+7)%7,c=7-i;return He(a,t<0||t>6?t-(o+c)%7:(s+c)%7-(o+c)%7,n)}var _n=class extends J{priority=90;parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`D`,`i`,`e`,`c`,`t`,`T`]},vn=class extends J{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return X(Q(t.length,e),i);case`eo`:return X(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`]},yn=class extends J{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return X(Q(t.length,e),i);case`co`:return X(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`]};function bn(e,t,n){let r=B(e,n?.in);return He(r,t-Ft(r,n),n)}var xn=class extends J{priority=90;parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return Q(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return X(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return X(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return X(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);default:return X(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=bn(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`]},Sn=class extends J{priority=80;parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`b`,`B`,`H`,`k`,`t`,`T`]},Cn=class extends J{priority=80;parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`a`,`B`,`H`,`k`,`t`,`T`]},wn=class extends J{priority=80;parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`a`,`b`,`t`,`T`]},Tn=class extends J{priority=70;parse(e,t,n){switch(t){case`h`:return Z(Y.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`H`,`K`,`k`,`t`,`T`]},En=class extends J{priority=70;parse(e,t,n){switch(t){case`H`:return Z(Y.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`K`,`k`,`t`,`T`]},Dn=class extends J{priority=70;parse(e,t,n){switch(t){case`K`:return Z(Y.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`h`,`H`,`k`,`t`,`T`]},On=class extends J{priority=70;parse(e,t,n){switch(t){case`k`:return Z(Y.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`H`,`K`,`t`,`T`]},kn=class extends J{priority=60;parse(e,t,n){switch(t){case`m`:return Z(Y.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=[`t`,`T`]},An=class extends J{priority=50;parse(e,t,n){switch(t){case`s`:return Z(Y.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=[`t`,`T`]},jn=class extends J{priority=30;parse(e,t){return X(Q(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=[`t`,`T`]},Mn=class extends J{priority=10;parse(e,t){switch(t){case`X`:return qt(Kt.basicOptionalMinutes,e);case`XX`:return qt(Kt.basic,e);case`XXXX`:return qt(Kt.basicOptionalSeconds,e);case`XXXXX`:return qt(Kt.extendedOptionalSeconds,e);default:return qt(Kt.extended,e)}}set(e,t,n){return t.timestampIsSet?e:R(e,e.getTime()-Ge(e)-n)}incompatibleTokens=[`t`,`T`,`x`]},Nn=class extends J{priority=10;parse(e,t){switch(t){case`x`:return qt(Kt.basicOptionalMinutes,e);case`xx`:return qt(Kt.basic,e);case`xxxx`:return qt(Kt.basicOptionalSeconds,e);case`xxxxx`:return qt(Kt.extendedOptionalSeconds,e);default:return qt(Kt.extended,e)}}set(e,t,n){return t.timestampIsSet?e:R(e,e.getTime()-Ge(e)-n)}incompatibleTokens=[`t`,`T`,`X`]},Pn=class extends J{priority=40;parse(e){return Jt(e)}set(e,t,n){return[R(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens=`*`},Fn=class extends J{priority=20;parse(e){return Jt(e)}set(e,t,n){return[R(e,n),{timestampIsSet:!0}]}incompatibleTokens=`*`},In={G:new Gt,y:new $t,Y:new en,R:new tn,u:new nn,Q:new rn,q:new an,M:new on,L:new sn,w:new ln,I:new dn,d:new mn,D:new hn,E:new _n,e:new vn,c:new yn,i:new xn,a:new Sn,b:new Cn,B:new wn,h:new Tn,H:new En,K:new Dn,k:new On,m:new kn,s:new An,S:new jn,X:new Mn,x:new Nn,t:new Pn,T:new Fn},Ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zn=/^'([^]*?)'?$/,Bn=/''/g,Vn=/\S/,Hn=/[a-zA-Z]/;function Un(e,t,n,r){let i=()=>R(r?.in||n,NaN),a=Nt(),o=r?.locale??a.locale??O,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():B(n,r?.in);let l={firstWeekContainsDate:s,weekStartsOn:c,locale:o},u=[new Wt(r?.in,n)],d=t.match(Rn).map(e=>{let t=e[0];if(t in gt){let n=gt[t];return n(e,o.formatLong)}return e}).join(``).match(Ln),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&xt(n)&&St(n,t,e),!r?.useAdditionalDayOfYearTokens&&bt(n)&&St(n,t,e);let a=n[0],s=In[a];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=f.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(s.incompatibleTokens===`*`&&f.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:a,fullToken:n});let r=s.run(e,n,o.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(a.match(Hn))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=Wn(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&Vn.test(e))return i();let p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=B(n,r?.in);if(isNaN(+m))return i();let h={};for(let e of p){if(!e.validate(m,l))return i();let t=e.set(m,h,l);Array.isArray(t)?(m=t[0],Object.assign(h,t[1])):m=t}return m}function Wn(e){return e.match(zn)[1].replace(Bn,`'`)}function Gn(e,t){let n=B(e,t?.in);return n.setMinutes(0,0,0),n}function Kn(e,t){let n=B(e,t?.in);return n.setSeconds(0,0),n}function qn(e,t,n){let[r,i]=z(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Jn(e,t,n){let[r,i]=z(n?.in,e,t);return+et(r)==+et(i)}function Yn(e,t){let n=B(e,t?.in);return n.setMilliseconds(0),n}function Xn(e,t,n){let[r,i]=z(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Zn(e,t,n){let r=B(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=R(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Mt(o);return r.setMonth(t,Math.min(a,s)),r}function $(e,t,n){let r=B(e,n?.in);return isNaN(+r)?R(n?.in||e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Zn(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function Qn(e,t,n){let r=B(e,n?.in);return r.setHours(t),r}function $n(e,t,n){let r=B(e,n?.in);return r.setMinutes(t),r}function er(e,t,n){let r=B(e,n?.in),i=t-(Math.trunc(r.getMonth()/3)+1);return Zn(r,r.getMonth()+i*3)}function tr(e,t,n){let r=B(e,n?.in);return r.setSeconds(t),r}function nr(e,t,n){let r=B(e,n?.in);return isNaN(+r)?R(n?.in||e,NaN):(r.setFullYear(t),r)}var rr={date:Xe,month:qn,year:Xn,quarter:Jn};function ir(e){return(t,n)=>Pe(t,n,{weekStartsOn:ar(e)})}function ar(e){return(e+1)%7}function or(e,t,n,r=0){return(n===`week`?ir(r):rr[n])(e,t)}function sr(e,t,n,r,i,a){return i===`date`?cr(e,t,n,r):fr(e,t,n,r,a)}function cr(e,t,n,r){let i=!1,a=!1,o=!1;Array.isArray(n)&&(n[0]({locale:t.value.locale})),u=p(null),d=Ce();function m(){let{onClear:t}=e;t&&t()}function h(){let{onConfirm:t,value:n}=e;t&&t(n)}function ee(t,n){let{onUpdateValue:r}=e;r(t,n)}function te(t=!1){let{onClose:n}=e;n&&n(t)}function g(){let{onTabOut:t}=e;t&&t()}function ne(){ee(null,!0),te(!0),m()}function _(){g()}function v(){(e.active||e.panel)&&a(()=>{let{value:e}=u;if(!e)return;let t=e.querySelectorAll(`[data-n-date]`);t.forEach(e=>{e.classList.add(`transition-disabled`)}),e.offsetWidth,t.forEach(e=>{e.classList.remove(`transition-disabled`)})})}function re(e){e.key===`Tab`&&e.target===u.value&&d.shift&&(e.preventDefault(),g())}function ie(e){let{value:t}=u;d.tab&&e.target===t&&t?.contains(e.relatedTarget)&&g()}let ae=null,y=!1;function b(){ae=e.value,y=!0}function x(){y=!1}function S(){y&&=(ee(ae,!1),!1)}function C(e){return typeof e==`function`?e():e}let oe=p(!1);function w(){oe.value=!oe.value}return{mergedTheme:c,mergedClsPrefix:s,dateFnsOptions:l,timePickerSize:n,timePickerProps:r,selfRef:u,locale:o,doConfirm:h,doClose:te,doUpdateValue:ee,doTabOut:g,handleClearClick:ne,handleFocusDetectorFocus:_,disableTransitionOneTick:v,handlePanelKeyDown:re,handlePanelFocus:ie,cachePendingValue:b,clearPendingValue:x,restorePendingValue:S,getShortcutValue:C,handleShortcutMouseleave:S,showMonthYearPanel:oe,handleOpenQuickSelectMonthPanel:w}}var Or=Object.assign(Object.assign({},Er),{defaultCalendarStartTime:Number,actions:{type:Array,default:()=>[`now`,`clear`,`confirm`]}});function kr(e,t){let n=Dr(e),{isValueInvalidRef:r,isDateDisabledRef:a,isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:c,isHourDisabledRef:l,isMinuteDisabledRef:u,isSecondDisabledRef:d,localeRef:m,firstDayOfWeekRef:h,datePickerSlots:ee,yearFormatRef:g,monthFormatRef:ne,quarterFormatRef:_,yearRangeRef:v}=i(Tr),re={isValueInvalid:r,isDateDisabled:a,isDateInvalid:o,isTimeInvalid:s,isDateTimeInvalid:c,isHourDisabled:l,isMinuteDisabled:u,isSecondDisabled:d},ie=f(()=>e.dateFormat||m.value.dateFormat),ae=f(()=>e.calendarDayFormat||m.value.dayFormat),y=p(e.value===null||Array.isArray(e.value)?``:W(e.value,ie.value)),b=p(e.value===null||Array.isArray(e.value)?e.defaultCalendarStartTime??Date.now():e.value),x=p(null),S=p(null),C=p(null),oe=p(Date.now()),w=f(()=>gr(b.value,e.value,oe.value,h.value??m.value.firstDayOfWeek,!1,t===`week`)),T=f(()=>{let{value:t}=e;return _r(b.value,Array.isArray(t)?null:t,oe.value,{monthFormat:ne.value})}),se=f(()=>{let{value:t}=e;return yr(Array.isArray(t)?null:t,oe.value,{yearFormat:g.value},v)}),ce=f(()=>{let{value:t}=e;return vr(b.value,Array.isArray(t)?null:t,oe.value,{quarterFormat:_.value})}),le=f(()=>w.value.slice(0,7).map(e=>{let{ts:t}=e;return W(t,ae.value,n.dateFnsOptions.value)})),ue=f(()=>W(b.value,e.calendarHeaderMonthFormat||m.value.monthFormat,n.dateFnsOptions.value)),E=f(()=>W(b.value,e.calendarHeaderYearFormat||m.value.yearFormat,n.dateFnsOptions.value)),de=f(()=>e.calendarHeaderMonthBeforeYear??m.value.monthBeforeYear);te(b,(e,r)=>{(t===`date`||t===`datetime`)&&(qn(e,r)||n.disableTransitionOneTick())}),te(f(()=>e.value),e=>{e!==null&&!Array.isArray(e)?(y.value=W(e,ie.value,n.dateFnsOptions.value),b.value=e):y.value=``});function D(e){return K(t===`datetime`?Yn(e):t===`month`?tt(e):t===`year`?nt(e):t===`quarter`?et(e):t===`week`?Ne(e,{weekStartsOn:((h.value??m.value.firstDayOfWeek)+1)%7}):Ke(e))}function O(e,t){let{isDateDisabled:{value:n}}=re;return n?n(e,t):!1}function fe(t){let r=br(t,ie.value,new Date,n.dateFnsOptions.value);if(Qe(r)){if(e.value===null)n.doUpdateValue(K(D(Date.now())),e.panel);else if(!Array.isArray(e.value)){let t=$(e.value,{year:q(r),month:G(r),date:At(r)});n.doUpdateValue(K(D(K(t))),e.panel)}}else y.value=t}function k(){let t=br(y.value,ie.value,new Date,n.dateFnsOptions.value);if(Qe(t)){if(e.value===null)n.doUpdateValue(K(D(Date.now())),!1);else if(!Array.isArray(e.value)){let r=$(e.value,{year:q(t),month:G(t),date:At(t)});n.doUpdateValue(K(D(K(r))),!1)}}else I()}function A(){n.doUpdateValue(null,!0),y.value=``,n.doClose(!0),n.handleClearClick()}function pe(){n.doUpdateValue(K(D(Date.now())),!0);let r=Date.now();b.value=r,n.doClose(!0),e.panel&&(t===`month`||t===`quarter`||t===`year`)&&(n.disableTransitionOneTick(),De(r))}let j=p(null);function M(e){e.type===`date`&&t===`week`&&(j.value=D(K(e.ts)))}function N(e){return e.type===`date`&&t===`week`?D(K(e.ts))===j.value:!1}function P(r){if(O(r.ts,r.type===`date`?{type:`date`,year:r.dateObject.year,month:r.dateObject.month,date:r.dateObject.date}:r.type===`month`?{type:`month`,year:r.dateObject.year,month:r.dateObject.month}:r.type===`year`?{type:`year`,year:r.dateObject.year}:{type:`quarter`,year:r.dateObject.year,quarter:r.dateObject.quarter}))return;let i;if(i=e.value!==null&&!Array.isArray(e.value)?e.value:Date.now(),t===`datetime`&&e.defaultTime!==null&&!Array.isArray(e.defaultTime)){let t;t=typeof e.defaultTime==`function`?xr(r.ts,e.defaultTime):Cr(e.defaultTime),t&&(i=K($(i,t)))}switch(i=K(r.type===`quarter`&&r.dateObject.quarter?er(nr(i,r.dateObject.year),r.dateObject.quarter):$(i,r.dateObject)),n.doUpdateValue(D(i),e.panel||t===`date`||t===`week`||t===`year`),t){case`date`:case`week`:n.doClose();break;case`year`:e.panel&&n.disableTransitionOneTick(),n.doClose();break;case`month`:n.disableTransitionOneTick(),De(i);break;case`quarter`:n.disableTransitionOneTick(),De(i);break}}function F(t,n){let r;r=e.value!==null&&!Array.isArray(e.value)?e.value:Date.now(),r=K(t.type===`month`?Zn(r,t.dateObject.month):nr(r,t.dateObject.year)),n(r),De(r)}function me(e){b.value=e}function I(t){if(e.value===null||Array.isArray(e.value)){y.value=``;return}t===void 0&&(t=e.value),y.value=W(t,ie.value,n.dateFnsOptions.value)}function he(){re.isDateInvalid.value||re.isTimeInvalid.value||(n.doConfirm(),ge())}function ge(){e.active&&n.doClose()}function _e(){var t;b.value=K(H(b.value,1)),(t=e.onNextYear)==null||t.call(e)}function ve(){var t;b.value=K(H(b.value,-1)),(t=e.onPrevYear)==null||t.call(e)}function ye(){var t;b.value=K(V(b.value,1)),(t=e.onNextMonth)==null||t.call(e)}function be(){var t;b.value=K(V(b.value,-1)),(t=e.onPrevMonth)==null||t.call(e)}function xe(){let{value:e}=x;return e?.listElRef||null}function Se(){let{value:e}=x;return e?.itemsElRef||null}function Ce(){var e;(e=S.value)==null||e.sync()}function we(t){t!==null&&n.doUpdateValue(t,e.panel)}function Te(e){n.cachePendingValue();let t=n.getShortcutValue(e);typeof t==`number`&&n.doUpdateValue(t,!1)}function Ee(t){let r=n.getShortcutValue(t);typeof r==`number`&&(n.doUpdateValue(r,e.panel),n.clearPendingValue(),he())}function De(t){let{value:n}=e;if(C.value){let e=G(t===void 0?n===null?Date.now():n:t);C.value.scrollTo({top:e*40})}if(x.value){let e=q(t===void 0?n===null?Date.now():n:t)-v.value[0];x.value.scrollTo({top:e*40})}}let Oe={monthScrollbarRef:C,yearScrollbarRef:S,yearVlRef:x};return Object.assign(Object.assign(Object.assign(Object.assign({dateArray:w,monthArray:T,yearArray:se,quarterArray:ce,calendarYear:E,calendarMonth:ue,weekdays:le,calendarMonthBeforeYear:de,mergedIsDateDisabled:O,nextYear:_e,prevYear:ve,nextMonth:ye,prevMonth:be,handleNowClick:pe,handleConfirmClick:he,handleSingleShortcutMouseenter:Te,handleSingleShortcutClick:Ee},re),n),Oe),{handleDateClick:P,handleDateInputBlur:k,handleDateInput:fe,handleDateMouseEnter:M,isWeekHovered:N,handleTimePickerChange:we,clearSelectedDateTime:A,virtualListContainer:xe,virtualListContent:Se,handleVirtualListScroll:Ce,timePickerSize:n.timePickerSize,dateInputValue:y,datePickerSlots:ee,handleQuickMonthClick:F,justifyColumnsScrollState:De,calendarValue:b,onUpdateCalendarValue:me})}var Ar=h({name:`MonthPanel`,props:Object.assign(Object.assign({},Or),{type:{type:String,required:!0},useAsQuickJump:Boolean}),setup(e){let t=kr(e,e.type),{dateLocaleRef:n}=fe(`DatePicker`),i=e=>{switch(e.type){case`year`:return ur(e.dateObject.year,e.yearFormat,n.value.locale);case`month`:return lr(e.dateObject.month,e.monthFormat,n.value.locale);case`quarter`:return dr(e.dateObject.quarter,e.quarterFormat,n.value.locale)}},{useAsQuickJump:a}=e;return s(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(n,o,s)=>{let{mergedIsDateDisabled:c,handleDateClick:l,handleQuickMonthClick:u}=t;return r(`div`,{"data-n-date":!0,key:o,class:[`${s}-date-panel-month-calendar__picker-col-item`,n.isCurrent&&`${s}-date-panel-month-calendar__picker-col-item--current`,n.selected&&`${s}-date-panel-month-calendar__picker-col-item--selected`,!a&&c(n.ts,n.type===`year`?{type:`year`,year:n.dateObject.year}:n.type===`month`?{type:`month`,year:n.dateObject.year,month:n.dateObject.month}:n.type===`quarter`?{type:`month`,year:n.dateObject.year,month:n.dateObject.quarter}:null)&&`${s}-date-panel-month-calendar__picker-col-item--disabled`],onClick:()=>{var t,r;n.type===`year`?(t=e.onSelectYear)==null||t.call(e):n.type===`month`&&((r=e.onSelectMonth)==null||r.call(e)),a?u(n,t=>{e.onUpdateValue(t,!1)}):l(n)}},i(n))}})},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,actions:i,renderItem:a,type:o,onRender:s}=this;return s?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--month`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},r(`div`,{class:`${e}-date-panel-month-calendar`},r(E,{ref:`yearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:this.virtualListContainer,content:this.virtualListContent,horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(ce,{ref:`yearVlRef`,items:this.yearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleVirtualListScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e)})}),o===`month`||o===`quarter`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(E,{ref:`monthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(o===`month`?this.monthArray:this.quarterArray).map((t,n)=>a(t,n,e)),r(`div`,{class:`${e}-date-panel-${o}-calendar__padding`})]})):null),me(this.datePickerSlots.footer,t=>t?r(`div`,{class:`${e}-date-panel-footer`},t):null),i?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(j,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},i?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,i?.includes(`now`)?P(this.datePickerSlots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,i?.includes(`confirm`)?P(this.datePickerSlots.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}}),jr=h({props:{mergedClsPrefix:{type:String,required:!0},value:Number,monthBeforeYear:{type:Boolean,required:!0},monthYearSeparator:{type:String,required:!0},fastYearSelect:Boolean,fastMonthSelect:Boolean,calendarMonth:{type:String,required:!0},calendarYear:{type:String,required:!0},onUpdateValue:{type:Function,required:!0}},setup(e){let t=p(null),n=p(null),r=p(!1);function i(){r.value=!r.value}function a(){e.fastYearSelect&&i()}function o(){e.fastMonthSelect&&i()}function s(e){r.value&&!t.value?.contains(ue(e))&&(r.value=!1)}function c(){i()}return{show:r,triggerRef:t,monthPanelRef:n,handleSelectYear:a,handleSelectMonth:o,handleHeaderClick:c,handleClickOutside:s}},render(){let{handleClickOutside:e,mergedClsPrefix:t}=this;return r(`div`,{class:`${t}-date-panel-month__month-year`,ref:`triggerRef`},r(S,null,{default:()=>[r(C,null,{default:()=>r(`div`,{class:[`${t}-date-panel-month__text`,this.show&&`${t}-date-panel-month__text--active`],onClick:this.handleHeaderClick},this.monthBeforeYear?[this.calendarMonth,this.monthYearSeparator,this.calendarYear]:[this.calendarYear,this.monthYearSeparator,this.calendarMonth])}),r(w,{show:this.show,teleportDisabled:!0},{default:()=>r(be,{name:`fade-in-scale-up-transition`,appear:!0},{default:()=>this.show?u(r(Ar,{ref:`monthPanelRef`,onUpdateValue:this.onUpdateValue,onSelectYear:this.handleSelectYear,onSelectMonth:this.handleSelectMonth,actions:[],calendarHeaderMonthYearSeparator:this.monthYearSeparator,type:`month`,key:`month`,useAsQuickJump:!0,value:this.value}),[[k,e,void 0,{capture:!0}]]):null})})]}))}}),Mr=h({name:`DatePanel`,props:Object.assign(Object.assign({},Or),{type:{type:String,required:!0}}),setup(e){return kr(e,e.type)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,onRender:i,datePickerSlots:a,type:o}=this;return i?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--${o}`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},r(`div`,{class:`${e}-date-panel-calendar`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.prevYear},F(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.prevMonth},F(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:e,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.nextMonth},F(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.nextYear},F(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel-dates`},this.dateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts,{type:`date`,year:t.dateObject.year,month:t.dateObject.month,date:t.dateObject.date}),[`${e}-date-panel-date--week-hovered`]:this.isWeekHovered(t),[`${e}-date-panel-date--week-selected`]:t.inSelectedWeek}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(j,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`now`)?P(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}}),Nr=Object.assign(Object.assign({},Er),{defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,actions:{type:Array,default:()=>[`clear`,`confirm`]}});function Pr(e,t){let{isDateDisabledRef:n,isStartHourDisabledRef:r,isEndHourDisabledRef:a,isStartMinuteDisabledRef:o,isEndMinuteDisabledRef:s,isStartSecondDisabledRef:c,isEndSecondDisabledRef:l,isStartDateInvalidRef:u,isEndDateInvalidRef:d,isStartTimeInvalidRef:m,isEndTimeInvalidRef:h,isStartValueInvalidRef:ee,isEndValueInvalidRef:g,isRangeInvalidRef:ne,localeRef:_,rangesRef:v,closeOnSelectRef:re,updateValueOnCloseRef:ie,firstDayOfWeekRef:ae,datePickerSlots:y,monthFormatRef:b,yearFormatRef:x,quarterFormatRef:S,yearRangeRef:C}=i(Tr),oe={isDateDisabled:n,isStartHourDisabled:r,isEndHourDisabled:a,isStartMinuteDisabled:o,isEndMinuteDisabled:s,isStartSecondDisabled:c,isEndSecondDisabled:l,isStartDateInvalid:u,isEndDateInvalid:d,isStartTimeInvalid:m,isEndTimeInvalid:h,isStartValueInvalid:ee,isEndValueInvalid:g,isRangeInvalid:ne},w=Dr(e),T=p(null),se=p(null),ce=p(null),le=p(null),ue=p(null),E=p(null),de=p(null),D=p(null),{value:O}=e,fe=e.defaultCalendarStartTime??(Array.isArray(O)&&typeof O[0]==`number`?O[0]:Date.now()),k=p(fe),A=p(e.defaultCalendarEndTime??(Array.isArray(O)&&typeof O[1]==`number`?O[1]:K(V(fe,1))));z(!0);let pe=p(Date.now()),j=p(!1),M=p(0),N=f(()=>e.dateFormat||_.value.dateFormat),P=f(()=>e.calendarDayFormat||_.value.dayFormat),F=p(Array.isArray(O)?W(O[0],N.value,w.dateFnsOptions.value):``),me=p(Array.isArray(O)?W(O[1],N.value,w.dateFnsOptions.value):``),I=f(()=>j.value?`end`:`start`),he=f(()=>gr(k.value,e.value,pe.value,ae.value??_.value.firstDayOfWeek)),ge=f(()=>gr(A.value,e.value,pe.value,ae.value??_.value.firstDayOfWeek)),_e=f(()=>he.value.slice(0,7).map(e=>{let{ts:t}=e;return W(t,P.value,w.dateFnsOptions.value)})),ve=f(()=>W(k.value,e.calendarHeaderMonthFormat||_.value.monthFormat,w.dateFnsOptions.value)),ye=f(()=>W(A.value,e.calendarHeaderMonthFormat||_.value.monthFormat,w.dateFnsOptions.value)),be=f(()=>W(k.value,e.calendarHeaderYearFormat||_.value.yearFormat,w.dateFnsOptions.value)),xe=f(()=>W(A.value,e.calendarHeaderYearFormat||_.value.yearFormat,w.dateFnsOptions.value)),Se=f(()=>{let{value:t}=e;return Array.isArray(t)?t[0]:null}),Ce=f(()=>{let{value:t}=e;return Array.isArray(t)?t[1]:null}),we=f(()=>{let{shortcuts:t}=e;return t||v.value}),Te=f(()=>yr(wr(e.value,`start`),pe.value,{yearFormat:x.value},C)),Ee=f(()=>yr(wr(e.value,`end`),pe.value,{yearFormat:x.value},C)),De=f(()=>{let t=wr(e.value,`start`);return vr(t??Date.now(),t,pe.value,{quarterFormat:S.value})}),Oe=f(()=>{let t=wr(e.value,`end`);return vr(t??Date.now(),t,pe.value,{quarterFormat:S.value})}),ke=f(()=>{let t=wr(e.value,`start`);return _r(t??Date.now(),t,pe.value,{monthFormat:b.value})}),L=f(()=>{let t=wr(e.value,`end`);return _r(t??Date.now(),t,pe.value,{monthFormat:b.value})}),Ae=f(()=>e.calendarHeaderMonthBeforeYear??_.value.monthBeforeYear);te(f(()=>e.value),e=>{if(e!==null&&Array.isArray(e)){let[t,n]=e;F.value=W(t,N.value,w.dateFnsOptions.value),me.value=W(n,N.value,w.dateFnsOptions.value),j.value||Ve(e)}else F.value=``,me.value=``});function R(e,n){(t===`daterange`||t===`datetimerange`)&&(q(e)!==q(n)||G(e)!==G(n))&&w.disableTransitionOneTick()}te(k,R),te(A,R);function z(t){let n=tt(k.value),r=tt(A.value);(e.bindCalendarMonths||n>=r)&&(t?A.value=K(V(n,1)):k.value=K(V(r,-1)))}function je(){k.value=K(V(k.value,12)),z(!0)}function Me(){k.value=K(V(k.value,-12)),z(!0)}function B(){k.value=K(V(k.value,1)),z(!0)}function Ne(){k.value=K(V(k.value,-1)),z(!0)}function Pe(){A.value=K(V(A.value,12)),z(!1)}function Fe(){A.value=K(V(A.value,-12)),z(!1)}function Ie(){A.value=K(V(A.value,1)),z(!1)}function Le(){A.value=K(V(A.value,-1)),z(!1)}function Re(e){k.value=e,z(!0)}function ze(e){A.value=e,z(!1)}function Be(t){let r=n.value;if(!r)return!1;if(!Array.isArray(e.value)||I.value===`start`)return r(t,`start`,null);{let{value:e}=M;return t=M.value?Ye(M.value,e.ts,`wipPreview`):Ye(e.ts,M.value,`wipPreview`)}}function We(){ne.value||(w.doConfirm(),Ge())}function Ge(){j.value=!1,e.active&&w.doClose()}function qe(t){typeof t!=`number`&&(t=K(t)),e.value===null?w.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&w.doUpdateValue([t,Math.max(e.value[1],t)],e.panel)}function Je(t){typeof t!=`number`&&(t=K(t)),e.value===null?w.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&w.doUpdateValue([Math.min(e.value[0],t),t],e.panel)}function Ye(n,r,i){if(typeof n!=`number`&&(n=K(n)),i!==`shortcutPreview`&&i!==`shortcutDone`){let i,a;if(t===`datetimerange`){let{defaultTime:t}=e;typeof t==`function`?(i=Sr(n,t,`start`,[n,r]),a=Sr(r,t,`end`,[n,r])):Array.isArray(t)?(i=Cr(t[0]),a=Cr(t[1])):(i=Cr(t),a=i)}i&&(n=K($(n,i))),a&&(r=K($(r,a)))}w.doUpdateValue([n,r],e.panel&&(i===`done`||i===`shortcutDone`))}function H(e){return K(t===`datetimerange`?Yn(e):t===`monthrange`?tt(e):Ke(e))}function Xe(t){let n=br(t,N.value,new Date,w.dateFnsOptions.value);Qe(n)?e.value?Array.isArray(e.value)&&qe(H(K($(e.value[0],{year:q(n),month:G(n),date:At(n)})))):qe(H(K($(new Date,{year:q(n),month:G(n),date:At(n)})))):F.value=t}function Ze(t){let n=br(t,N.value,new Date,w.dateFnsOptions.value);Qe(n)?e.value===null?Je(H(K($(new Date,{year:q(n),month:G(n),date:At(n)})))):Array.isArray(e.value)&&Je(H(K($(e.value[1],{year:q(n),month:G(n),date:At(n)})))):me.value=t}function $e(){let t=br(F.value,N.value,new Date,w.dateFnsOptions.value),{value:n}=e;Qe(t)?n===null?qe(H(K($(new Date,{year:q(t),month:G(t),date:At(t)})))):Array.isArray(n)&&qe(H(K($(n[0],{year:q(t),month:G(t),date:At(t)})))):rt()}function nt(){let t=br(me.value,N.value,new Date,w.dateFnsOptions.value),{value:n}=e;Qe(t)?n===null?Je(H(K($(new Date,{year:q(t),month:G(t),date:At(t)})))):Array.isArray(n)&&Je(H(K($(n[1],{year:q(t),month:G(t),date:At(t)})))):rt()}function rt(t){let{value:n}=e;if(n===null||!Array.isArray(n)){F.value=``,me.value=``;return}t===void 0&&(t=n),F.value=W(t[0],N.value,w.dateFnsOptions.value),me.value=W(t[1],N.value,w.dateFnsOptions.value)}function it(e){e!==null&&qe(e)}function at(e){e!==null&&Je(e)}function ot(e){w.cachePendingValue();let t=w.getShortcutValue(e);Array.isArray(t)&&Ye(t[0],t[1],`shortcutPreview`)}function st(e){let t=w.getShortcutValue(e);Array.isArray(t)&&(Ye(t[0],t[1],`shortcutDone`),w.clearPendingValue(),We())}function U(t,n){let r=t===void 0?e.value:t;if(t===void 0||n===`start`){if(de.value){let e=G(Array.isArray(r)?r[0]:Date.now());de.value.scrollTo({debounce:!1,index:e,elSize:40})}if(ue.value){let e=q(Array.isArray(r)?r[0]:Date.now())-C.value[0];ue.value.scrollTo({index:e,debounce:!1})}}if(t===void 0||n===`end`){if(D.value){let e=G(Array.isArray(r)?r[1]:Date.now());D.value.scrollTo({debounce:!1,index:e,elSize:40})}if(E.value){let e=q(Array.isArray(r)?r[1]:Date.now())-C.value[0];E.value.scrollTo({index:e,debounce:!1})}}}function ct(n,r){let{value:i}=e,a=!Array.isArray(i),o=n.type===`year`&&t!==`yearrange`?a?$(n.ts,{month:G(t===`quarterrange`?et(new Date):new Date)}).valueOf():$(n.ts,{month:G(t===`quarterrange`?et(i[r===`start`?0:1]):i[r===`start`?0:1])}).valueOf():n.ts;if(a){let t=H(o),n=[t,t];w.doUpdateValue(n,e.panel),U(n,`start`),U(n,`end`),w.disableTransitionOneTick();return}let s=[i[0],i[1]],c=!1;switch(r===`start`?(s[0]=H(o),s[0]>s[1]&&(s[1]=s[0],c=!0)):(s[1]=H(o),s[0]>s[1]&&(s[0]=s[1],c=!0)),w.doUpdateValue(s,e.panel),t){case`monthrange`:case`quarterrange`:w.disableTransitionOneTick(),c?(U(s,`start`),U(s,`end`)):U(s,r);break;case`yearrange`:w.disableTransitionOneTick(),U(s,`start`),U(s,`end`)}}function lt(){var e;(e=ce.value)==null||e.sync()}function ut(){var e;(e=le.value)==null||e.sync()}function dt(e){return e===`start`?ue.value?.listElRef||null:E.value?.listElRef||null}function ft(e){return e===`start`?ue.value?.itemsElRef||null:E.value?.itemsElRef||null}let pt={startYearVlRef:ue,endYearVlRef:E,startMonthScrollbarRef:de,endMonthScrollbarRef:D,startYearScrollbarRef:ce,endYearScrollbarRef:le};return Object.assign(Object.assign(Object.assign(Object.assign({startDatesElRef:T,endDatesElRef:se,handleDateClick:He,handleColItemClick:ct,handleDateMouseEnter:Ue,handleConfirmClick:We,startCalendarPrevYear:Me,startCalendarPrevMonth:Ne,startCalendarNextYear:je,startCalendarNextMonth:B,endCalendarPrevYear:Fe,endCalendarPrevMonth:Le,endCalendarNextMonth:Ie,endCalendarNextYear:Pe,mergedIsDateDisabled:Be,changeStartEndTime:Ye,ranges:v,calendarMonthBeforeYear:Ae,startCalendarMonth:ve,startCalendarYear:be,endCalendarMonth:ye,endCalendarYear:xe,weekdays:_e,startDateArray:he,endDateArray:ge,startYearArray:Te,startMonthArray:ke,startQuarterArray:De,endYearArray:Ee,endMonthArray:L,endQuarterArray:Oe,isSelecting:j,handleRangeShortcutMouseenter:ot,handleRangeShortcutClick:st},w),oe),pt),{startDateDisplayString:F,endDateInput:me,timePickerSize:w.timePickerSize,startTimeValue:Se,endTimeValue:Ce,datePickerSlots:y,shortcuts:we,startCalendarDateTime:k,endCalendarDateTime:A,justifyColumnsScrollState:U,handleFocusDetectorFocus:w.handleFocusDetectorFocus,handleStartTimePickerChange:it,handleEndTimePickerChange:at,handleStartDateInput:Xe,handleStartDateInputBlur:$e,handleEndDateInput:Ze,handleEndDateInputBlur:nt,handleStartYearVlScroll:lt,handleEndYearVlScroll:ut,virtualListContainer:dt,virtualListContent:ft,onUpdateStartCalendarValue:Re,onUpdateEndCalendarValue:ze})}var Fr=h({name:`DateRangePanel`,props:Nr,setup(e){return Pr(e,`daterange`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,onRender:i,datePickerSlots:a}=this;return i?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--daterange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},F(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},F(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:e,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.startCalendarNextMonth},F(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},F(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.startDateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts)}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},F(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},F(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:e,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.endCalendarNextMonth},F(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},F(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.endDateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts)}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(j,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(a.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(a.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}});function Ir(e,t,n){let r=Nt(),i=zr(e,n.timeZone,n.locale??r.locale);return`formatToParts`in i?Lr(i,t):Rr(i,t)}function Lr(e,t){let n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if(n[e].type===`timeZoneName`)return n[e].value}function Rr(e,t){let n=e.format(t).replace(/\u200E/g,``),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):``}function zr(e,t,n){return new Intl.DateTimeFormat(n?[n.code,`en-US`]:void 0,{timeZone:t,timeZoneName:e})}function Br(e,t){let n=qr(t);return`formatToParts`in n?Hr(n,e):Ur(n,e)}var Vr={year:0,month:1,day:2,hour:3,minute:4,second:5};function Hr(e,t){try{let n=e.formatToParts(t),r=[];for(let e=0;e=0?a:1e3+a,r-i}function ti(e,t,n){let r=e.getTime()-t,i=ei(new Date(r),n);if(t===i)return t;r-=i-t;let a=ei(new Date(r),n);return i===a?i:Math.max(i,a)}function ni(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ri={};function ii(e){if(ri[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ri[e]=!0,!0}catch{return!1}}var ai=60*1e3,oi={X:function(e,t,n){let r=si(n.timeZone,e);if(r===0)return`Z`;switch(t){case`X`:return ui(r);case`XXXX`:case`XX`:return li(r);default:return li(r,`:`)}},x:function(e,t,n){let r=si(n.timeZone,e);switch(t){case`x`:return ui(r);case`xxxx`:case`xx`:return li(r);default:return li(r,`:`)}},O:function(e,t,n){let r=si(n.timeZone,e);switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+di(r,`:`);default:return`GMT`+li(r,`:`)}},z:function(e,t,n){switch(t){case`z`:case`zz`:case`zzz`:return Ir(`short`,e,n);default:return Ir(`long`,e,n)}}};function si(e,t){let n=e?Qr(e,t,!0)/ai:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw RangeError(`Invalid time zone specified: `+e);return n}function ci(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString();for(;r.length0?`-`:`+`,r=Math.abs(e),i=ci(Math.floor(r/60),2),a=ci(Math.floor(r%60),2);return n+i+t+a}function ui(e,t){return e%60==0?(e>0?`-`:`+`)+ci(Math.abs(e)/60,2):li(e,t)}function di(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+ci(a,2)}function fi(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e-+t}var pi=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,mi=36e5,hi=6e4,gi=2,_i={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:pi};function vi(e,t={}){if(arguments.length<1)throw TypeError(`1 argument required, but only `+arguments.length+` present`);if(e===null)return new Date(NaN);let n=t.additionalDigits==null?gi:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw RangeError(`additionalDigits must be 0, 1 or 2`);if(e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`)return new Date(e.getTime());if(typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`)return new Date(e);if(Object.prototype.toString.call(e)!==`[object String]`)return new Date(NaN);let r=yi(e),{year:i,restDateString:a}=bi(r.date,n),o=xi(a,i);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){let e=o.getTime(),n=0,i;if(r.time&&(n=Si(r.time),n===null||isNaN(n)))return new Date(NaN);if(r.timeZone||t.timeZone){if(i=Qr(r.timeZone||t.timeZone,new Date(e+n)),isNaN(i))return new Date(NaN)}else i=fi(new Date(e+n)),i=fi(new Date(e+n+i));return new Date(e+n+i)}else return new Date(NaN)}function yi(e){let t={},n=_i.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=_i.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){let e=_i.timeZone.exec(r);e?(t.time=r.replace(e[1],``),t.timeZone=e[1].trim()):t.time=r}return t}function bi(e,t){if(e){let n=_i.YYY[t],r=_i.YYYYY[t],i=_i.YYYY.exec(e)||r.exec(e);if(i){let t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=_i.YY.exec(e)||n.exec(e),i){let t=i[1];return{year:parseInt(t,10)*100,restDateString:e.slice(t.length)}}}return{year:null}}function xi(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=_i.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Di(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=_i.DDD.exec(e),a){n=new Date(0);let e=parseInt(a[1],10);return Oi(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=_i.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;let e=parseInt(a[2],10);return Di(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=_i.Www.exec(e),a)return i=parseInt(a[1],10)-1,ki(i)?Ci(t,i):new Date(NaN);if(a=_i.WwwD.exec(e),a){i=parseInt(a[1],10)-1;let e=parseInt(a[2],10)-1;return ki(i,e)?Ci(t,i,e):new Date(NaN)}return null}function Si(e){let t,n,r=_i.HH.exec(e);if(r)return t=parseFloat(r[1].replace(`,`,`.`)),Ai(t)?t%24*mi:NaN;if(r=_i.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(`,`,`.`)),Ai(t,n)?t%24*mi+n*hi:NaN;if(r=_i.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);let e=parseFloat(r[3].replace(`,`,`.`));return Ai(t,n,e)?t%24*mi+n*hi+e*1e3:NaN}return null}function Ci(e,t,n){t||=0,n||=0;let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var wi=[31,28,31,30,31,30,31,31,30,31,30,31],Ti=[31,29,31,30,31,30,31,31,30,31,30,31];function Ei(e){return e%400==0||e%4==0&&e%100!=0}function Di(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;let r=Ei(e);if(r&&n>Ti[t]||!r&&n>wi[t])return!1}return!0}function Oi(e,t){if(t<1)return!1;let n=Ei(e);return!(n&&t>366||!n&&t>365)}function ki(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Ai(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var ji=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Mi(e,t,n={}){t=String(t);let r=t.match(ji);if(r){let i=vi(n.originalDate||e,n);t=r.reduce(function(e,t){if(t[0]===`'`)return e;let r=e.indexOf(t),a=e[r-1]===`'`,o=e.replace(t,`'`+oi[t[0]](i,t,n)+`'`);return a?o.substring(0,r-1)+o.substring(r+1):o},t)}return W(e,t,n)}function Ni(e,t,n){e=vi(e,n);let r=Qr(t,e,!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}function Pi(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Mi(Ni(e,t,{timeZone:r.timeZone}),n,r)}var Fi=l(`n-time-picker`),Ii=h({name:`TimePickerPanelCol`,props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:[Number,String],default:null},onItemClick:Function},render(){let{activeValue:e,onItemClick:t,clsPrefix:n}=this;return this.data.map(i=>{let{label:a,disabled:o,value:s}=i,c=e===s;return r(`div`,{key:a,"data-active":c?``:null,class:[`${n}-time-picker-col__item`,c&&`${n}-time-picker-col__item--active`,o&&`${n}-time-picker-col__item--disabled`],onClick:t&&!o?()=>{t(s)}:void 0},a)})}}),Li={amHours:[`00`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`],pmHours:[`12`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`],hours:[`00`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`,`18`,`19`,`20`,`21`,`22`,`23`],minutes:`00.01.02.03.04.05.06.07.08.09.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59`.split(`.`),seconds:`00.01.02.03.04.05.06.07.08.09.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59`.split(`.`),period:[`AM`,`PM`]};function Ri(e){return`00${e}`.slice(-2)}function zi(e,t,n){return Array.isArray(t)?(n===`am`?t.filter(e=>e<12):n===`pm`?t.filter(e=>e>=12).map(e=>e===12?12:e-12):t).map(e=>Ri(e)):typeof t==`number`?n===`am`?e.filter(e=>{let n=Number(e);return n<12&&n%t===0}):n===`pm`?e.filter(e=>{let n=Number(e);return n>=12&&n%t===0}).map(e=>{let t=Number(e);return Ri(t===12?12:t-12)}):e.filter(e=>Number(e)%t===0):n===`am`?e.filter(e=>Number(e)<12):n===`pm`?e.map(e=>Number(e)).filter(e=>Number(e)>=12).map(e=>Ri(e===12?12:e-12)):e}function Bi(e,t,n){return n?typeof n==`number`?e%n===0:n.includes(e):!0}function Vi(e,t,r){let i=zi(Li[t],r).map(Number),a,o;for(let t=0;te){o=n;break}a=n}return a===void 0?(o||n(`time-picker`,`Please set 'hours' or 'minutes' or 'seconds' props`),o):o===void 0||o-e>e-a?a:o}function Hi(e){return Pt(e)<12?`am`:`pm`}var Ui=h({name:`TimePickerPanel`,props:{actions:{type:Array,default:()=>[`now`,`confirm`]},showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},showPeriod:{type:Boolean,default:!0},isHourInvalid:Boolean,isMinuteInvalid:Boolean,isSecondInvalid:Boolean,isAmPmInvalid:Boolean,isValueInvalid:Boolean,hourValue:{type:Number,default:null},minuteValue:{type:Number,default:null},secondValue:{type:Number,default:null},amPmValue:{type:String,default:null},isHourDisabled:Function,isMinuteDisabled:Function,isSecondDisabled:Function,onHourClick:{type:Function,required:!0},onMinuteClick:{type:Function,required:!0},onSecondClick:{type:Function,required:!0},onAmPmClick:{type:Function,required:!0},onNowClick:Function,clearText:String,nowText:String,confirmText:String,transitionDisabled:Boolean,onClearClick:Function,onConfirmClick:Function,onFocusin:Function,onFocusout:Function,onFocusDetectorFocus:Function,onKeydown:Function,hours:[Number,Array],minutes:[Number,Array],seconds:[Number,Array],use12Hours:Boolean},setup(e){let{mergedThemeRef:t,mergedClsPrefixRef:n}=i(Fi);return{mergedTheme:t,mergedClsPrefix:n,hours:f(()=>{let{isHourDisabled:t,hours:n,use12Hours:r,amPmValue:i}=e;if(r){let e=i??Hi(Date.now());return zi(Li.hours,n,e).map(n=>{let r=Number(n),i=e===`pm`&&r!==12?r+12:r;return{label:n,value:i,disabled:t?t(i):!1}})}else return zi(Li.hours,n).map(e=>({label:e,value:Number(e),disabled:t?t(Number(e)):!1}))}),minutes:f(()=>{let{isMinuteDisabled:t,minutes:n}=e;return zi(Li.minutes,n).map(n=>({label:n,value:Number(n),disabled:t?t(Number(n),e.hourValue):!1}))}),seconds:f(()=>{let{isSecondDisabled:t,seconds:n}=e;return zi(Li.seconds,n).map(n=>({label:n,value:Number(n),disabled:t?t(Number(n),e.minuteValue,e.hourValue):!1}))}),amPm:f(()=>{let{isHourDisabled:t}=e,n=!0,r=!0;for(let e=0;e<12;++e)if(!t?.(e)){n=!1;break}for(let e=12;e<24;++e)if(!t?.(e)){r=!1;break}return[{label:`AM`,value:`am`,disabled:n},{label:`PM`,value:`pm`,disabled:r}]}),hourScrollRef:p(null),minuteScrollRef:p(null),secondScrollRef:p(null),amPmScrollRef:p(null)}},render(){let{mergedClsPrefix:e,mergedTheme:t}=this;return r(`div`,{tabindex:0,class:`${e}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},r(`div`,{class:`${e}-time-picker-cols`},this.showHour?r(`div`,{class:[`${e}-time-picker-col`,this.isHourInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(E,{ref:`hourScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.showMinute?r(`div`,{class:[`${e}-time-picker-col`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${e}-time-picker-col--invalid`]},r(E,{ref:`minuteScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.showSecond?r(`div`,{class:[`${e}-time-picker-col`,this.isSecondInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(E,{ref:`secondScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.use12Hours?r(`div`,{class:[`${e}-time-picker-col`,this.isAmPmInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(E,{ref:`amPmScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null),this.actions?.length?r(`div`,{class:`${e}-time-picker-actions`},this.actions?.includes(`clear`)?r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.onClearClick},{default:()=>this.clearText}):null,this.actions?.includes(`now`)?r(M,{size:`tiny`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,this.actions?.includes(`confirm`)?r(M,{size:`tiny`,type:`primary`,class:`${e}-time-picker-actions__confirm`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,disabled:this.isValueInvalid,onClick:this.onConfirmClick},{default:()=>this.confirmText}):null):null,r(T,{onFocus:this.onFocusDetectorFocus}))}}),Wi=b([g(`time-picker`,` - z-index: auto; - position: relative; - `,[g(`time-picker-icon`,` - color: var(--n-icon-color-override); - transition: color .3s var(--n-bezier); - `),d(`disabled`,[g(`time-picker-icon`,` - color: var(--n-icon-color-disabled-override); - `)])]),g(`time-picker-panel`,` - transition: - box-shadow .3s var(--n-bezier), - background-color .3s var(--n-bezier); - outline: none; - font-size: var(--n-item-font-size); - border-radius: var(--n-border-radius); - margin: 4px 0; - min-width: 104px; - overflow: hidden; - background-color: var(--n-panel-color); - box-shadow: var(--n-panel-box-shadow); - `,[A(),g(`time-picker-actions`,` - padding: var(--n-panel-action-padding); - align-items: center; - display: flex; - justify-content: space-evenly; - `),g(`time-picker-cols`,` - height: calc(var(--n-item-height) * 6); - display: flex; - position: relative; - transition: border-color .3s var(--n-bezier); - border-bottom: 1px solid var(--n-panel-divider-color); - `),g(`time-picker-col`,` - flex-grow: 1; - min-width: var(--n-item-width); - height: calc(var(--n-item-height) * 6); - flex-direction: column; - transition: box-shadow .3s var(--n-bezier); - `,[d(`transition-disabled`,[m(`item`,`transition: none;`,[b(`&::before`,`transition: none;`)])]),m(`padding`,` - height: calc(var(--n-item-height) * 5); - `),b(`&:first-child`,`min-width: calc(var(--n-item-width) + 4px);`,[m(`item`,[b(`&::before`,`left: 4px;`)])]),m(`item`,` - cursor: pointer; - height: var(--n-item-height); - display: flex; - align-items: center; - justify-content: center; - transition: - color .3s var(--n-bezier), - background-color .3s var(--n-bezier), - opacity .3s var(--n-bezier), - text-decoration-color .3s var(--n-bezier); - background: #0000; - text-decoration-color: #0000; - color: var(--n-item-text-color); - z-index: 0; - box-sizing: border-box; - padding-top: 4px; - position: relative; - `,[b(`&::before`,` - content: ""; - transition: background-color .3s var(--n-bezier); - z-index: -1; - position: absolute; - left: 0; - right: 4px; - top: 4px; - bottom: 0; - border-radius: var(--n-item-border-radius); - `),ne(`disabled`,[b(`&:hover::before`,` - background-color: var(--n-item-color-hover); - `)]),d(`active`,` - color: var(--n-item-text-color-active); - `,[b(`&::before`,` - background-color: var(--n-item-color-hover); - `)]),d(`disabled`,` - opacity: var(--n-item-opacity-disabled); - cursor: not-allowed; - `)]),d(`invalid`,[m(`item`,[d(`active`,` - text-decoration: line-through; - text-decoration-color: var(--n-item-text-color-active); - `)])])])])]);function Gi(e,t){return e===void 0?!0:Array.isArray(e)?e.every(e=>e>=0&&e<=t):e>=0&&e<=t}var Ki=h({name:`TimePicker`,props:Object.assign(Object.assign({},_.props),{to:oe.propTo,bordered:{type:Boolean,default:void 0},actions:Array,defaultValue:{type:Number,default:null},defaultFormattedValue:String,placeholder:String,placement:{type:String,default:`bottom-start`},value:Number,format:{type:String,default:`HH:mm:ss`},valueFormat:String,formattedValue:String,isHourDisabled:Function,size:String,isMinuteDisabled:Function,isSecondDisabled:Function,inputReadonly:Boolean,clearable:Boolean,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:formattedValue":[Function,Array],onBlur:[Function,Array],onConfirm:[Function,Array],onClear:Function,onFocus:[Function,Array],timeZone:String,showIcon:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},show:{type:Boolean,default:void 0},hours:{type:[Number,Array],validator:e=>Gi(e,23)},minutes:{type:[Number,Array],validator:e=>Gi(e,59)},seconds:{type:[Number,Array],validator:e=>Gi(e,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),setup(e){let{mergedBorderedRef:n,mergedClsPrefixRef:r,namespaceRef:i,inlineThemeDisabled:s,mergedComponentPropsRef:c}=o(e),{localeRef:l,dateLocaleRef:u}=fe(`TimePicker`),d=he(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:c?.value?.TimePicker?.size||`medium`}}),{mergedSizeRef:m,mergedDisabledRef:h,mergedStatusRef:ee}=d,g=_(`TimePicker`,`-time-picker`,Wi,Se,e,r),ne=Ce(),v=p(null),re=p(null),ae=f(()=>({locale:u.value.locale}));function y(t){return t===null?null:br(t,e.valueFormat||e.format,new Date,ae.value).getTime()}let{defaultValue:b,defaultFormattedValue:S}=e,C=p(S===void 0?b:y(S)),w=f(()=>{let{formattedValue:t}=e;if(t!==void 0)return y(t);let{value:n}=e;return n===void 0?C.value:n}),T=f(()=>{let{timeZone:t}=e;return t?(e,n,r)=>Pi(e,t,n,r):(e,t,n)=>W(e,t,n)}),ce=p(``);te(()=>e.timeZone,()=>{let t=w.value;ce.value=t===null?``:T.value(t,e.format,ae.value)},{immediate:!0});let le=p(!1),E=pe(x(e,`show`),le),de=p(w.value),D=p(!1),O=f(()=>l.value.clear),k=f(()=>l.value.now),A=f(()=>e.placeholder===void 0?l.value.placeholder:e.placeholder),j=f(()=>l.value.negativeText),M=f(()=>l.value.positiveText),P=f(()=>/H|h|K|k/.test(e.format)),F=f(()=>e.format.includes(`m`)),me=f(()=>e.format.includes(`s`)),ge=f(()=>{let{value:e}=w;return e===null?null:Number(T.value(e,`HH`,ae.value))}),ve=f(()=>{let{value:e}=w;return e===null?null:Number(T.value(e,`mm`,ae.value))}),ye=f(()=>{let{value:e}=w;return e===null?null:Number(T.value(e,`ss`,ae.value))}),be=f(()=>{let{isHourDisabled:t}=e;return ge.value===null?!1:Bi(ge.value,`hours`,e.hours)?t?t(ge.value):!1:!0}),xe=f(()=>{let{value:t}=ve,{value:n}=ge;if(t===null||n===null)return!1;if(!Bi(t,`minutes`,e.minutes))return!0;let{isMinuteDisabled:r}=e;return r?r(t,n):!1}),we=f(()=>{let{value:t}=ve,{value:n}=ge,{value:r}=ye;if(r===null||t===null||n===null)return!1;if(!Bi(r,`seconds`,e.seconds))return!0;let{isSecondDisabled:i}=e;return i?i(r,t,n):!1}),Te=f(()=>be.value||xe.value||we.value),Ee=f(()=>e.format.length+4),De=f(()=>{let{value:e}=w;return e===null?null:Pt(e)<12?`am`:`pm`});function Oe(t,n){let{onUpdateFormattedValue:r,"onUpdate:formattedValue":i}=e;r&&I(r,t,n),i&&I(i,t,n)}function ke(t){return t===null?null:T.value(t,e.valueFormat||e.format)}function L(t){let{onUpdateValue:n,"onUpdate:value":r,onChange:i}=e,{nTriggerFormChange:a,nTriggerFormInput:o}=d,s=ke(t);n&&I(n,t,s),r&&I(r,t,s),i&&I(i,t,s),Oe(s,t),C.value=t,a(),o()}function Ae(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=d;n&&I(n,t),r()}function R(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=d;n&&I(n,t),r()}function z(){let{onConfirm:t}=e;t&&I(t,w.value,ke(w.value))}function je(t){var n;t.stopPropagation(),L(null),Ve(null),(n=e.onClear)==null||n.call(e)}function Me(){H({returnFocus:!0})}function B(){L(null),Ve(null),H({returnFocus:!0})}function Ne(e){e.key===`Escape`&&E.value&&N(e)}function Pe(e){switch(e.key){case`Escape`:E.value&&(N(e),H({returnFocus:!0}));break;case`Tab`:ne.shift&&e.target===re.value?.$el&&(e.preventDefault(),H({returnFocus:!0}));break}}function Fe(){D.value=!0,a(()=>{D.value=!1})}function Ie(e){h.value||se(e,`clear`)||E.value||Je()}function Le(e){typeof e!=`string`&&(w.value===null?L(K(Qn(Gn(new Date),e))):L(K(Qn(w.value,e))))}function Re(e){typeof e!=`string`&&(w.value===null?L(K($n(Kn(new Date),e))):L(K($n(w.value,e))))}function ze(e){typeof e!=`string`&&(w.value===null?L(K(tr(Yn(new Date),e))):L(K(tr(w.value,e))))}function Be(e){let{value:t}=w;if(t===null){let t=new Date,n=Pt(t);e===`pm`&&n<12?L(K(Qn(t,n+12))):e===`am`&&n>=12&&L(K(Qn(t,n-12))),L(K(t))}else{let n=Pt(t);e===`pm`&&n<12?L(K(Qn(t,n+12))):e===`am`&&n>=12&&L(K(Qn(t,n-12)))}}function Ve(t){t===void 0&&(t=w.value),t===null?ce.value=``:ce.value=T.value(t,e.format,ae.value)}function He(e){qe(e)||Ae(e)}function V(e){qe(e)||(E.value?(re.value?.$el)?.contains(e.relatedTarget)||(Ve(),R(e),H({returnFocus:!1})):(Ve(),R(e)))}function Ue(){h.value||E.value||Je()}function We(){h.value||(Ve(),H({returnFocus:!1}))}function Ge(){if(!re.value)return;let{hourScrollRef:e,minuteScrollRef:t,secondScrollRef:n,amPmScrollRef:r}=re.value;[e,t,n,r].forEach(e=>{if(!e)return;let t=e.contentRef?.querySelector(`[data-active]`);t&&e.scrollTo({top:t.offsetTop})})}function Ke(t){le.value=t;let{onUpdateShow:n,"onUpdate:show":r}=e;n&&I(n,t),r&&I(r,t)}function qe(e){return!!((v.value?.wrapperElRef)?.contains(e.relatedTarget)||re.value?.$el.contains(e.relatedTarget))}function Je(){de.value=w.value,Ke(!0),a(Ge)}function Ye(e){E.value&&!(v.value?.wrapperElRef)?.contains(ue(e))&&H({returnFocus:!1})}function H({returnFocus:e}){var t;E.value&&(Ke(!1),e&&((t=v.value)==null||t.focus()))}function Xe(t){if(t===``){L(null);return}let n=br(t,e.format,new Date,ae.value);if(ce.value=t,Qe(n)){let{value:e}=w;L(K(e===null?n:$(e,{hours:Pt(n),minutes:Lt(n),seconds:Rt(n),milliseconds:It(n)})))}}function Ze(){L(de.value),Ke(!1)}function $e(){let t=new Date,n={hours:Pt,minutes:Lt,seconds:Rt},[r,i,a]=[`hours`,`minutes`,`seconds`].map(r=>!e[r]||Bi(n[r](t),r,e[r])?n[r](t):Vi(n[r](t),r,e[r]));L(K(tr($n(Qn(w.value?w.value:K(t),r),i),a)))}function et(){Ve(),z(),H({returnFocus:!0})}function tt(e){qe(e)||(Ve(),R(e),H({returnFocus:!1}))}te(w,e=>{Ve(e),Fe(),a(Ge)}),te(E,()=>{Te.value&&L(de.value)}),ie(Fi,{mergedThemeRef:g,mergedClsPrefixRef:r});let nt={focus:()=>{var e;(e=v.value)==null||e.focus()},blur:()=>{var e;(e=v.value)==null||e.blur()}},rt=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=g.value;return{"--n-icon-color-override":t,"--n-icon-color-disabled-override":n,"--n-bezier":e}}),it=s?t(`time-picker-trigger`,void 0,rt,e):void 0,at=f(()=>{let{self:{panelColor:e,itemTextColor:t,itemTextColorActive:n,itemColorHover:r,panelDividerColor:i,panelBoxShadow:a,itemOpacityDisabled:o,borderRadius:s,itemFontSize:c,itemWidth:l,itemHeight:u,panelActionPadding:d,itemBorderRadius:f},common:{cubicBezierEaseInOut:p}}=g.value;return{"--n-bezier":p,"--n-border-radius":s,"--n-item-color-hover":r,"--n-item-font-size":c,"--n-item-height":u,"--n-item-opacity-disabled":o,"--n-item-text-color":t,"--n-item-text-color-active":n,"--n-item-width":l,"--n-panel-action-padding":d,"--n-panel-box-shadow":a,"--n-panel-color":e,"--n-panel-divider-color":i,"--n-item-border-radius":f}}),ot=s?t(`time-picker`,void 0,at,e):void 0;return{focus:nt.focus,blur:nt.blur,mergedStatus:ee,mergedBordered:n,mergedClsPrefix:r,namespace:i,uncontrolledValue:C,mergedValue:w,isMounted:_e(),inputInstRef:v,panelInstRef:re,adjustedTo:oe(e),mergedShow:E,localizedClear:O,localizedNow:k,localizedPlaceholder:A,localizedNegativeText:j,localizedPositiveText:M,hourInFormat:P,minuteInFormat:F,secondInFormat:me,mergedAttrSize:Ee,displayTimeString:ce,mergedSize:m,mergedDisabled:h,isValueInvalid:Te,isHourInvalid:be,isMinuteInvalid:xe,isSecondInvalid:we,transitionDisabled:D,hourValue:ge,minuteValue:ve,secondValue:ye,amPmValue:De,handleInputKeydown:Ne,handleTimeInputFocus:He,handleTimeInputBlur:V,handleNowClick:$e,handleConfirmClick:et,handleTimeInputUpdateValue:Xe,handleMenuFocusOut:tt,handleCancelClick:Ze,handleClickOutside:Ye,handleTimeInputActivate:Ue,handleTimeInputDeactivate:We,handleHourClick:Le,handleMinuteClick:Re,handleSecondClick:ze,handleAmPmClick:Be,handleTimeInputClear:je,handleFocusDetectorFocus:Me,handleMenuKeydown:Pe,handleTriggerClick:Ie,mergedTheme:g,triggerCssVars:s?void 0:rt,triggerThemeClass:it?.themeClass,triggerOnRender:it?.onRender,cssVars:s?void 0:at,themeClass:ot?.themeClass,onRender:ot?.onRender,clearSelectedValue:B}},render(){let{mergedClsPrefix:e,$slots:t,triggerOnRender:n}=this;return n?.(),r(`div`,{class:[`${e}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},r(S,null,{default:()=>[r(C,null,{default:()=>r(ge,{ref:`inputInstRef`,status:this.mergedStatus,value:this.displayTimeString,bordered:this.mergedBordered,passivelyActivated:!0,attrSize:this.mergedAttrSize,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,stateful:this.stateful,size:this.mergedSize,placeholder:this.localizedPlaceholder,clearable:this.clearable,disabled:this.mergedDisabled,textDecoration:this.isValueInvalid?`line-through`:void 0,onFocus:this.handleTimeInputFocus,onBlur:this.handleTimeInputBlur,onActivate:this.handleTimeInputActivate,onDeactivate:this.handleTimeInputDeactivate,onUpdateValue:this.handleTimeInputUpdateValue,onClear:this.handleTimeInputClear,internalDeactivateOnEnter:!0,internalForceFocus:this.mergedShow,readonly:this.inputReadonly||this.mergedDisabled,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown},this.showIcon?{[this.clearable?`clear-icon-placeholder`:`suffix`]:()=>r(xe,{clsPrefix:e,class:`${e}-time-picker-icon`},{default:()=>t.icon?t.icon():r(Be,null)})}:null)}),r(w,{teleportDisabled:this.adjustedTo===oe.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>r(be,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>{var e;return this.mergedShow?((e=this.onRender)==null||e.call(this),u(r(Ui,{ref:`panelInstRef`,actions:this.actions,class:this.themeClass,style:this.cssVars,seconds:this.seconds,minutes:this.minutes,hours:this.hours,transitionDisabled:this.transitionDisabled,hourValue:this.hourValue,showHour:this.hourInFormat,isHourInvalid:this.isHourInvalid,isHourDisabled:this.isHourDisabled,minuteValue:this.minuteValue,showMinute:this.minuteInFormat,isMinuteInvalid:this.isMinuteInvalid,isMinuteDisabled:this.isMinuteDisabled,secondValue:this.secondValue,amPmValue:this.amPmValue,showSecond:this.secondInFormat,isSecondInvalid:this.isSecondInvalid,isSecondDisabled:this.isSecondDisabled,isValueInvalid:this.isValueInvalid,clearText:this.localizedClear,nowText:this.localizedNow,confirmText:this.localizedPositiveText,use12Hours:this.use12Hours,onFocusout:this.handleMenuFocusOut,onKeydown:this.handleMenuKeydown,onHourClick:this.handleHourClick,onMinuteClick:this.handleMinuteClick,onSecondClick:this.handleSecondClick,onAmPmClick:this.handleAmPmClick,onNowClick:this.handleNowClick,onConfirmClick:this.handleConfirmClick,onClearClick:this.clearSelectedValue,onFocusDetectorFocus:this.handleFocusDetectorFocus}),[[k,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),qi=h({name:`DateTimePanel`,props:Or,setup(e){return kr(e,`datetime`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,timePickerProps:i,datePickerSlots:a,onRender:o}=this;return o?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--datetime`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{class:`${e}-date-panel-header`},r(ge,{value:this.dateInputValue,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isDateInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleDateInputBlur,onUpdateValue:this.handleDateInput}),r(Ki,Object.assign({size:this.timePickerSize,placeholder:this.locale.selectTime,format:this.timePickerFormat},Array.isArray(i)?void 0:i,{showIcon:!1,to:!1,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,value:Array.isArray(this.value)?null:this.value,isHourDisabled:this.isHourDisabled,isMinuteDisabled:this.isMinuteDisabled,isSecondDisabled:this.isSecondDisabled,onUpdateValue:this.handleTimePickerChange,stateful:!1}))),r(`div`,{class:`${e}-date-panel-calendar`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.prevYear},F(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.prevMonth},F(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:e,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.nextMonth},F(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.nextYear},F(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel-dates`},this.dateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts,{type:`date`,year:t.dateObject.year,month:t.dateObject.month,date:t.dateObject.date})}],onClick:()=>{this.handleDateClick(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(j,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.clearSelectedDateTime,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.clearSelectedDateTime},{default:()=>this.locale.clear})]):null,this.actions?.includes(`now`)?P(a.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,this.actions?.includes(`confirm`)?P(a.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}}),Ji=h({name:`DateTimeRangePanel`,props:Nr,setup(e){return Pr(e,`datetimerange`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,timePickerProps:i,onRender:a,datePickerSlots:o}=this;return a?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--datetimerange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{class:`${e}-date-panel-header`},r(ge,{value:this.startDateDisplayString,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,size:this.timePickerSize,stateful:!1,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isStartValueInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleStartDateInputBlur,onUpdateValue:this.handleStartDateInput}),r(Ki,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(i)?i[0]:i,{value:this.startTimeValue,to:!1,showIcon:!1,disabled:this.isSelecting,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,stateful:!1,isHourDisabled:this.isStartHourDisabled,isMinuteDisabled:this.isStartMinuteDisabled,isSecondDisabled:this.isStartSecondDisabled,onUpdateValue:this.handleStartTimePickerChange})),r(ge,{value:this.endDateInput,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isEndValueInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleEndDateInputBlur,onUpdateValue:this.handleEndDateInput}),r(Ki,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(i)?i[1]:i,{disabled:this.isSelecting,showIcon:!1,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,to:!1,stateful:!1,value:this.endTimeValue,isHourDisabled:this.isEndHourDisabled,isMinuteDisabled:this.isEndMinuteDisabled,isSecondDisabled:this.isEndSecondDisabled,onUpdateValue:this.handleEndTimePickerChange}))),r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},F(o[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},F(o[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:e,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.startCalendarNextMonth},F(o[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},F(o[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.startDateArray.map((t,n)=>{let i=this.mergedIsDateDisabled(t.ts);return r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:i}],onClick:i?void 0:()=>{this.handleDateClick(t)},onMouseenter:i?void 0:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)}))),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},F(o[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},F(o[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:e,monthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.endCalendarNextMonth},F(o[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},F(o[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.endDateArray.map((t,n)=>{let i=this.mergedIsDateDisabled(t.ts);return r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:i}],onClick:i?void 0:()=>{this.handleDateClick(t)},onMouseenter:i?void 0:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)}))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(j,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(o.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(o.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}}),Yi=h({name:`MonthRangePanel`,props:Object.assign(Object.assign({},Nr),{type:{type:String,required:!0}}),setup(e){let t=Pr(e,e.type),{dateLocaleRef:n}=fe(`DatePicker`);return s(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(e,i,a,o)=>{let{handleColItemClick:s}=t;return r(`div`,{"data-n-date":!0,key:i,class:[`${a}-date-panel-month-calendar__picker-col-item`,e.isCurrent&&`${a}-date-panel-month-calendar__picker-col-item--current`,e.selected&&`${a}-date-panel-month-calendar__picker-col-item--selected`,!1],onClick:()=>{s(e,o)}},e.type===`month`?lr(e.dateObject.month,e.monthFormat,n.value.locale):e.type===`quarter`?dr(e.dateObject.quarter,e.quarterFormat,n.value.locale):ur(e.dateObject.year,e.yearFormat,n.value.locale))}})},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,type:i,renderItem:a,onRender:o}=this;return o?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--daterange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month-calendar`},r(E,{ref:`startYearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:()=>this.virtualListContainer(`start`),content:()=>this.virtualListContent(`start`),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(ce,{ref:`startYearVlRef`,items:this.startYearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleStartYearVlScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e,`start`)})}),i===`monthrange`||i===`quarterrange`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(E,{ref:`startMonthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(i===`monthrange`?this.startMonthArray:this.startQuarterArray).map((t,n)=>a(t,n,e,`start`)),i===`monthrange`&&r(`div`,{class:`${e}-date-panel-month-calendar__padding`})]})):null)),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month-calendar`},r(E,{ref:`endYearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:()=>this.virtualListContainer(`end`),content:()=>this.virtualListContent(`end`),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(ce,{ref:`endYearVlRef`,items:this.endYearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleEndYearVlScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e,`end`)})}),i===`monthrange`||i===`quarterrange`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(E,{ref:`endMonthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(i===`monthrange`?this.endMonthArray:this.endQuarterArray).map((t,n)=>a(t,n,e,`end`)),i===`monthrange`&&r(`div`,{class:`${e}-date-panel-month-calendar__padding`})]})):null)),me(this.datePickerSlots.footer,t=>t?r(`div`,{class:`${e}-date-panel-footer`},t):null),this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(j,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(j,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(this.datePickerSlots.confirm,{disabled:this.isRangeInvalid,onConfirm:this.handleConfirmClick,text:this.locale.confirm},()=>[r(j,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(T,{onFocus:this.handleFocusDetectorFocus}))}}),Xi=Object.assign(Object.assign({},_.props),{to:oe.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,fastYearSelect:Boolean,fastMonthSelect:Boolean,updateValueOnClose:Boolean,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,default:` `},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},defaultValue:[Number,Array],defaultFormattedValue:[String,Array],defaultTime:[Number,String,Array,Function],disabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom-start`},value:[Number,Array],formattedValue:[String,Array],size:String,type:{type:String,default:`date`},valueFormat:String,separator:String,placeholder:String,startPlaceholder:String,endPlaceholder:String,format:String,dateFormat:String,timePickerFormat:String,actions:Array,shortcuts:Object,isDateDisabled:Function,isTimeDisabled:Function,show:{type:Boolean,default:void 0},panel:Boolean,ranges:Object,firstDayOfWeek:Number,inputReadonly:Boolean,closeOnSelect:Boolean,status:String,timePickerProps:[Object,Array],onClear:Function,onConfirm:Function,defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,monthFormat:{type:String,default:`M`},yearFormat:{type:String,default:`y`},quarterFormat:{type:String,default:`'Q'Q`},yearRange:{type:Array,default:()=>[1901,2100]},"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:formattedValue":[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function,onChange:[Function,Array]}),Zi=b([g(`date-picker`,` - position: relative; - z-index: auto; - `,[g(`date-picker-icon`,` - color: var(--n-icon-color-override); - transition: color .3s var(--n-bezier); - `),g(`icon`,` - color: var(--n-icon-color-override); - transition: color .3s var(--n-bezier); - `),d(`disabled`,[g(`date-picker-icon`,` - color: var(--n-icon-color-disabled-override); - `),g(`icon`,` - color: var(--n-icon-color-disabled-override); - `)])]),g(`date-panel`,` - width: fit-content; - outline: none; - margin: 4px 0; - display: grid; - grid-template-columns: 0fr; - border-radius: var(--n-panel-border-radius); - background-color: var(--n-panel-color); - color: var(--n-panel-text-color); - user-select: none; - `,[A(),d(`shadow`,` - box-shadow: var(--n-panel-box-shadow); - `),g(`date-panel-calendar`,{padding:`var(--n-calendar-left-padding)`,display:`grid`,gridTemplateColumns:`1fr`,gridArea:`left-calendar`},[d(`end`,{padding:`var(--n-calendar-right-padding)`,gridArea:`right-calendar`})]),g(`date-panel-month-calendar`,{display:`flex`,gridArea:`left-calendar`},[m(`picker-col`,` - min-width: var(--n-scroll-item-width); - height: calc(var(--n-scroll-item-height) * 6); - user-select: none; - -webkit-user-select: none; - `,[b(`&:first-child`,` - min-width: calc(var(--n-scroll-item-width) + 4px); - `,[m(`picker-col-item`,[b(`&::before`,`left: 4px;`)])]),m(`padding`,` - height: calc(var(--n-scroll-item-height) * 5) - `)]),m(`picker-col-item`,` - z-index: 0; - cursor: pointer; - height: var(--n-scroll-item-height); - box-sizing: border-box; - padding-top: 4px; - display: flex; - align-items: center; - justify-content: center; - position: relative; - transition: - color .3s var(--n-bezier), - background-color .3s var(--n-bezier); - background: #0000; - color: var(--n-item-text-color); - `,[b(`&::before`,` - z-index: -1; - content: ""; - position: absolute; - left: 0; - right: 4px; - top: 4px; - bottom: 0; - border-radius: var(--n-scroll-item-border-radius); - transition: - background-color .3s var(--n-bezier); - `),ne(`disabled`,[b(`&:hover::before`,` - background-color: var(--n-item-color-hover); - `),d(`selected`,` - color: var(--n-item-color-active); - `,[b(`&::before`,`background-color: var(--n-item-color-hover);`)])]),d(`disabled`,` - color: var(--n-item-text-color-disabled); - cursor: not-allowed; - `,[d(`selected`,[b(`&::before`,` - background-color: var(--n-item-color-disabled); - `)])])])]),d(`date`,{gridTemplateAreas:` - "left-calendar" - "footer" - "action" - `}),d(`week`,{gridTemplateAreas:` - "left-calendar" - "footer" - "action" - `}),d(`daterange`,{gridTemplateAreas:` - "left-calendar divider right-calendar" - "footer footer footer" - "action action action" - `}),d(`datetime`,{gridTemplateAreas:` - "header" - "left-calendar" - "footer" - "action" - `}),d(`datetimerange`,{gridTemplateAreas:` - "header header header" - "left-calendar divider right-calendar" - "footer footer footer" - "action action action" - `}),d(`month`,{gridTemplateAreas:` - "left-calendar" - "footer" - "action" - `}),g(`date-panel-footer`,{gridArea:`footer`}),g(`date-panel-actions`,{gridArea:`action`}),g(`date-panel-header`,{gridArea:`header`}),g(`date-panel-header`,` - box-sizing: border-box; - width: 100%; - align-items: center; - padding: var(--n-panel-header-padding); - display: flex; - justify-content: space-between; - border-bottom: 1px solid var(--n-panel-header-divider-color); - `,[b(`>`,[b(`*:not(:last-child)`,{marginRight:`10px`}),b(`*`,{flex:1,width:0}),g(`time-picker`,{zIndex:1})])]),g(`date-panel-month`,` - box-sizing: border-box; - display: grid; - grid-template-columns: var(--n-calendar-title-grid-template-columns); - align-items: center; - justify-items: center; - padding: var(--n-calendar-title-padding); - height: var(--n-calendar-title-height); - `,[m(`prev, next, fast-prev, fast-next`,` - line-height: 0; - cursor: pointer; - width: var(--n-arrow-size); - height: var(--n-arrow-size); - color: var(--n-arrow-color); - `),m(`month-year`,` - user-select: none; - -webkit-user-select: none; - flex-grow: 1; - position: relative; - `,[m(`text`,` - font-size: var(--n-calendar-title-font-size); - line-height: var(--n-calendar-title-font-size); - font-weight: var(--n-calendar-title-font-weight); - padding: 6px 8px; - text-align: center; - color: var(--n-calendar-title-text-color); - cursor: pointer; - transition: background-color .3s var(--n-bezier); - border-radius: var(--n-panel-border-radius); - `,[d(`active`,` - background-color: var(--n-calendar-title-color-hover); - `),b(`&:hover`,` - background-color: var(--n-calendar-title-color-hover); - `)])])]),g(`date-panel-weekdays`,` - display: grid; - margin: auto; - grid-template-columns: repeat(7, var(--n-item-cell-width)); - grid-template-rows: repeat(1, var(--n-item-cell-height)); - align-items: center; - justify-items: center; - margin-bottom: 4px; - border-bottom: 1px solid var(--n-calendar-days-divider-color); - `,[m(`day`,` - white-space: nowrap; - user-select: none; - -webkit-user-select: none; - line-height: 15px; - width: var(--n-item-size); - text-align: center; - font-size: var(--n-calendar-days-font-size); - color: var(--n-item-text-color); - display: flex; - align-items: center; - justify-content: center; - `)]),g(`date-panel-dates`,` - margin: auto; - display: grid; - grid-template-columns: repeat(7, var(--n-item-cell-width)); - grid-template-rows: repeat(6, var(--n-item-cell-height)); - align-items: center; - justify-items: center; - flex-wrap: wrap; - `,[g(`date-panel-date`,` - user-select: none; - -webkit-user-select: none; - position: relative; - width: var(--n-item-size); - height: var(--n-item-size); - line-height: var(--n-item-size); - text-align: center; - font-size: var(--n-item-font-size); - border-radius: var(--n-item-border-radius); - z-index: 0; - cursor: pointer; - transition: - background-color .2s var(--n-bezier), - color .2s var(--n-bezier); - `,[m(`trigger`,` - position: absolute; - left: calc(var(--n-item-size) / 2 - var(--n-item-cell-width) / 2); - top: calc(var(--n-item-size) / 2 - var(--n-item-cell-height) / 2); - width: var(--n-item-cell-width); - height: var(--n-item-cell-height); - `),d(`current`,[m(`sup`,` - position: absolute; - top: 2px; - right: 2px; - content: ""; - height: 4px; - width: 4px; - border-radius: 2px; - background-color: var(--n-item-color-active); - transition: - background-color .2s var(--n-bezier); - `)]),b(`&::after`,` - content: ""; - z-index: -1; - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - border-radius: inherit; - transition: background-color .3s var(--n-bezier); - `),d(`covered, start, end`,[ne(`excluded`,[b(`&::before`,` - content: ""; - z-index: -2; - position: absolute; - left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); - right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); - top: 0; - bottom: 0; - background-color: var(--n-item-color-included); - `),b(`&:nth-child(7n + 1)::before`,{borderTopLeftRadius:`var(--n-item-border-radius)`,borderBottomLeftRadius:`var(--n-item-border-radius)`}),b(`&:nth-child(7n + 7)::before`,{borderTopRightRadius:`var(--n-item-border-radius)`,borderBottomRightRadius:`var(--n-item-border-radius)`})])]),d(`selected`,{color:`var(--n-item-text-color-active)`},[b(`&::after`,{backgroundColor:`var(--n-item-color-active)`}),d(`start`,[b(`&::before`,{left:`50%`})]),d(`end`,[b(`&::before`,{right:`50%`})]),m(`sup`,{backgroundColor:`var(--n-panel-color)`})]),d(`excluded`,{color:`var(--n-item-text-color-disabled)`},[d(`selected`,[b(`&::after`,{backgroundColor:`var(--n-item-color-disabled)`})])]),d(`disabled`,{cursor:`not-allowed`,color:`var(--n-item-text-color-disabled)`},[d(`covered`,[b(`&::before`,{backgroundColor:`var(--n-item-color-disabled)`})]),d(`selected`,[b(`&::before`,{backgroundColor:`var(--n-item-color-disabled)`}),b(`&::after`,{backgroundColor:`var(--n-item-color-disabled)`})])]),d(`week-hovered`,[b(`&::before`,` - background-color: var(--n-item-color-included); - `),b(`&:nth-child(7n + 1)::before`,` - border-top-left-radius: var(--n-item-border-radius); - border-bottom-left-radius: var(--n-item-border-radius); - `),b(`&:nth-child(7n + 7)::before`,` - border-top-right-radius: var(--n-item-border-radius); - border-bottom-right-radius: var(--n-item-border-radius); - `)]),d(`week-selected`,` - color: var(--n-item-text-color-active) - `,[b(`&::before`,` - background-color: var(--n-item-color-active); - `),b(`&:nth-child(7n + 1)::before`,` - border-top-left-radius: var(--n-item-border-radius); - border-bottom-left-radius: var(--n-item-border-radius); - `),b(`&:nth-child(7n + 7)::before`,` - border-top-right-radius: var(--n-item-border-radius); - border-bottom-right-radius: var(--n-item-border-radius); - `)])])]),ne(`week`,[g(`date-panel-dates`,[g(`date-panel-date`,[ne(`disabled`,[ne(`selected`,[b(`&:hover`,` - background-color: var(--n-item-color-hover); - `)])])])])]),d(`week`,[g(`date-panel-dates`,[g(`date-panel-date`,[b(`&::before`,` - content: ""; - z-index: -2; - position: absolute; - left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); - right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); - top: 0; - bottom: 0; - transition: background-color .3s var(--n-bezier); - `)])])]),m(`vertical-divider`,` - grid-area: divider; - height: 100%; - width: 1px; - background-color: var(--n-calendar-divider-color); - `),g(`date-panel-footer`,` - border-top: 1px solid var(--n-panel-action-divider-color); - padding: var(--n-panel-extra-footer-padding); - `),g(`date-panel-actions`,` - flex: 1; - padding: var(--n-panel-action-padding); - display: flex; - align-items: center; - justify-content: space-between; - border-top: 1px solid var(--n-panel-action-divider-color); - `,[m(`prefix, suffix`,` - display: flex; - margin-bottom: -8px; - `),m(`suffix`,` - align-self: flex-end; - `),m(`prefix`,` - flex-wrap: wrap; - `),g(`button`,` - margin-bottom: 8px; - `,[b(`&:not(:last-child)`,` - margin-right: 8px; - `)])])]),b(`[data-n-date].transition-disabled`,{transition:`none !important`},[b(`&::before, &::after`,{transition:`none !important`})])]);function Qi(e,t){let n=f(()=>{let{isTimeDisabled:n}=e,{value:r}=t;if(!(r===null||Array.isArray(r)))return n?.(r)}),r=f(()=>n.value?.isHourDisabled),i=f(()=>n.value?.isMinuteDisabled),a=f(()=>n.value?.isSecondDisabled),o=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||Array.isArray(i)||![`date`,`datetime`].includes(n)||!r?!1:r(i,{type:`input`})}),s=f(()=>{let{type:n}=e,{value:o}=t;if(o===null||n===`datetime`||Array.isArray(o))return!1;let s=new Date(o),c=s.getHours(),l=s.getMinutes(),u=s.getMinutes();return(r.value?r.value(c):!1)||(i.value?i.value(l,c):!1)||(a.value?a.value(u,l,c):!1)}),c=f(()=>o.value||s.value);return{isValueInvalidRef:f(()=>{let{type:t}=e;return t===`date`?o.value:t===`datetime`?c.value:!1}),isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:c,isHourDisabledRef:r,isMinuteDisabledRef:i,isSecondDisabledRef:a}}function $i(e,t){let n=f(()=>{let{isTimeDisabled:n}=e,{value:r}=t;return!Array.isArray(r)||!n?[void 0,void 0]:[n?.(r[0],`start`,r),n?.(r[1],`end`,r)]}),r={isStartHourDisabledRef:f(()=>n.value[0]?.isHourDisabled),isEndHourDisabledRef:f(()=>n.value[1]?.isHourDisabled),isStartMinuteDisabledRef:f(()=>n.value[0]?.isMinuteDisabled),isEndMinuteDisabledRef:f(()=>n.value[1]?.isMinuteDisabled),isStartSecondDisabledRef:f(()=>n.value[0]?.isSecondDisabled),isEndSecondDisabledRef:f(()=>n.value[1]?.isSecondDisabled)},i=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||!Array.isArray(i)||![`daterange`,`datetimerange`].includes(n)||!r?!1:r(i[0],`start`,i)}),a=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||!Array.isArray(i)||![`daterange`,`datetimerange`].includes(n)||!r?!1:r(i[1],`end`,i)}),o=f(()=>{let{type:n}=e,{value:i}=t;if(i===null||!Array.isArray(i)||n!==`datetimerange`)return!1;let a=Pt(i[0]),o=Lt(i[0]),s=Rt(i[0]),{isStartHourDisabledRef:c,isStartMinuteDisabledRef:l,isStartSecondDisabledRef:u}=r;return(c.value?c.value(a):!1)||(l.value?l.value(o,a):!1)||(u.value?u.value(s,o,a):!1)}),s=f(()=>{let{type:n}=e,{value:i}=t;if(i===null||!Array.isArray(i)||n!==`datetimerange`)return!1;let a=Pt(i[1]),o=Lt(i[1]),s=Rt(i[1]),{isEndHourDisabledRef:c,isEndMinuteDisabledRef:l,isEndSecondDisabledRef:u}=r;return(c.value?c.value(a):!1)||(l.value?l.value(o,a):!1)||(u.value?u.value(s,o,a):!1)}),c=f(()=>i.value||o.value),l=f(()=>a.value||s.value),u=f(()=>c.value||l.value);return Object.assign(Object.assign({},r),{isStartDateInvalidRef:i,isEndDateInvalidRef:a,isStartTimeInvalidRef:o,isEndTimeInvalidRef:s,isStartValueInvalidRef:c,isEndValueInvalidRef:l,isRangeInvalidRef:u})}var ea=h({name:`DatePicker`,props:Xi,slots:Object,setup(e,{slots:n}){let{localeRef:r,dateLocaleRef:i}=fe(`DatePicker`),{mergedComponentPropsRef:a,mergedClsPrefixRef:s,mergedBorderedRef:c,namespaceRef:l,inlineThemeDisabled:u}=o(e),d=he(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:a?.value?.DatePicker?.size||`medium`}}),{mergedSizeRef:m,mergedDisabledRef:h,mergedStatusRef:ee}=d,g=p(null),ne=p(null),v=p(null),b=p(!1),S=pe(x(e,`show`),b),C=f(()=>({locale:i.value.locale,useAdditionalWeekYearTokens:!0})),w=f(()=>{let{format:t}=e;if(t)return t;switch(e.type){case`date`:case`daterange`:return r.value.dateFormat;case`datetime`:case`datetimerange`:return r.value.dateTimeFormat;case`year`:case`yearrange`:return r.value.yearTypeFormat;case`month`:case`monthrange`:return r.value.monthTypeFormat;case`quarter`:case`quarterrange`:return r.value.quarterFormat;case`week`:return r.value.weekFormat}}),T=f(()=>e.valueFormat??w.value);function ce(e){if(e===null)return null;let{value:t}=T,{value:n}=C;return Array.isArray(e)?[br(e[0],t,new Date,n).getTime(),br(e[1],t,new Date,n).getTime()]:br(e,t,new Date,n).getTime()}let{defaultFormattedValue:le,defaultValue:E}=e,de=p((le===void 0?E:ce(le))??null),D=pe(f(()=>{let{formattedValue:t}=e;return t===void 0?e.value:ce(t)}),de),O=p(null);ae(()=>{O.value=D.value});let k=p(``),A=p(``),j=p(``),M=_(`DatePicker`,`-date-picker`,Zi,ye,e,s),P=f(()=>a?.value?.DatePicker?.timePickerSize||`small`),F=f(()=>[`daterange`,`datetimerange`,`monthrange`,`quarterrange`,`yearrange`].includes(e.type)),me=f(()=>{let{placeholder:t}=e;if(t===void 0){let{type:t}=e;switch(t){case`date`:return r.value.datePlaceholder;case`datetime`:return r.value.datetimePlaceholder;case`month`:return r.value.monthPlaceholder;case`year`:return r.value.yearPlaceholder;case`quarter`:return r.value.quarterPlaceholder;case`week`:return r.value.weekPlaceholder;default:return``}}else return t}),ge=f(()=>e.startPlaceholder===void 0?e.type===`daterange`?r.value.startDatePlaceholder:e.type===`datetimerange`?r.value.startDatetimePlaceholder:e.type===`monthrange`?r.value.startMonthPlaceholder:``:e.startPlaceholder),ve=f(()=>e.endPlaceholder===void 0?e.type===`daterange`?r.value.endDatePlaceholder:e.type===`datetimerange`?r.value.endDatetimePlaceholder:e.type===`monthrange`?r.value.endMonthPlaceholder:``:e.endPlaceholder),be=f(()=>{let{actions:t,type:n,clearable:r}=e;if(t===null)return[];if(t!==void 0)return t;let i=r?[`clear`]:[];switch(n){case`date`:case`week`:return i.push(`now`),i;case`datetime`:return i.push(`now`,`confirm`),i;case`daterange`:return i.push(`confirm`),i;case`datetimerange`:return i.push(`confirm`),i;case`month`:return i.push(`now`,`confirm`),i;case`year`:return i.push(`now`),i;case`quarter`:return i.push(`now`,`confirm`),i;case`monthrange`:case`yearrange`:case`quarterrange`:return i.push(`confirm`),i;default:re(`date-picker`,"The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.");break}});function xe(e){if(e===null)return null;if(Array.isArray(e)){let{value:t}=T,{value:n}=C;return[W(e[0],t,n),W(e[1],t,C.value)]}else return W(e,T.value,C.value)}function Se(e){O.value=e}function Ce(t,n){let{"onUpdate:formattedValue":r,onUpdateFormattedValue:i}=e;r&&I(r,t,n),i&&I(i,t,n)}function we(t,n){let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=e,{nTriggerFormChange:o,nTriggerFormInput:s}=d,c=xe(t);n.doConfirm&&Ee(t,c),i&&I(i,t,c),r&&I(r,t,c),a&&I(a,t,c),de.value=t,Ce(c,t),o(),s()}function Te(){let{onClear:t}=e;t?.()}function Ee(t,n){let{onConfirm:r}=e;r&&r(t,n)}function De(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=d;n&&I(n,t),r()}function Oe(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=d;n&&I(n,t),r()}function ke(t){let{"onUpdate:show":n,onUpdateShow:r}=e;n&&I(n,t),r&&I(r,t),b.value=t}function L(e){e.key===`Escape`&&S.value&&(N(e),Ge({returnFocus:!0}))}function Ae(e){e.key===`Escape`&&S.value&&N(e)}function R(){var e;ke(!1),(e=v.value)==null||e.deactivate(),Te()}function z(){var e;(e=v.value)==null||e.deactivate(),Te()}function je(){Ge({returnFocus:!0})}function Me(e){S.value&&!ne.value?.contains(ue(e))&&Ge({returnFocus:!1})}function B(e){Ge({returnFocus:!0,disableUpdateOnClose:e})}function Ne(e,t){t?we(e,{doConfirm:!1}):Se(e)}function Pe(){let e=O.value;we(Array.isArray(e)?[e[0],e[1]]:e,{doConfirm:!0})}function Fe(){let{value:e}=O;F.value?(Array.isArray(e)||e===null)&&Le(e):Array.isArray(e)||Ie(e)}function Ie(e){e===null?k.value=``:k.value=W(e,w.value,C.value)}function Le(e){if(e===null)A.value=``,j.value=``;else{let t=C.value;A.value=W(e[0],w.value,t),j.value=W(e[1],w.value,t)}}function Re(){S.value||We()}function ze(e){g.value?.$el.contains(e.relatedTarget)||(Oe(e),Fe(),Ge({returnFocus:!1}))}function Be(){h.value||(Fe(),Ge({returnFocus:!1}))}function Ve(e){if(e===``){we(null,{doConfirm:!1}),O.value=null,k.value=``;return}let t=br(e,w.value,new Date,C.value);Qe(t)?(we(K(t),{doConfirm:!1}),Fe()):k.value=e}function He(e,{source:t}){if(e[0]===``&&e[1]===``){we(null,{doConfirm:!1}),O.value=null,A.value=``,j.value=``;return}let[n,r]=e,i=br(n,w.value,new Date,C.value),a=br(r,w.value,new Date,C.value);if(Qe(i)&&Qe(a)){let e=K(i),n=K(a);a{Fe()}),Fe(),te(S,e=>{e||(O.value=D.value)});let Ke=Qi(e,O),qe=$i(e,O);ie(Tr,Object.assign(Object.assign(Object.assign({mergedClsPrefixRef:s,mergedThemeRef:M,timePickerSizeRef:P,localeRef:r,dateLocaleRef:i,firstDayOfWeekRef:x(e,`firstDayOfWeek`),isDateDisabledRef:x(e,`isDateDisabled`),rangesRef:x(e,`ranges`),timePickerPropsRef:x(e,`timePickerProps`),closeOnSelectRef:x(e,`closeOnSelect`),updateValueOnCloseRef:x(e,`updateValueOnClose`),monthFormatRef:x(e,`monthFormat`),yearFormatRef:x(e,`yearFormat`),quarterFormatRef:x(e,`quarterFormat`),yearRangeRef:x(e,`yearRange`)},Ke),qe),{datePickerSlots:n}));let Je={focus:()=>{var e;(e=v.value)==null||e.focus()},blur:()=>{var e;(e=v.value)==null||e.blur()}},Ye=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=M.value;return{"--n-bezier":e,"--n-icon-color-override":t,"--n-icon-color-disabled-override":n}}),H=u?t(`date-picker-trigger`,void 0,Ye,e):void 0,Xe=f(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{calendarTitleFontSize:r,calendarDaysFontSize:i,itemFontSize:a,itemTextColor:o,itemColorDisabled:s,itemColorIncluded:c,itemColorHover:l,itemColorActive:u,itemBorderRadius:d,itemTextColorDisabled:f,itemTextColorActive:p,panelColor:m,panelTextColor:h,arrowColor:ee,calendarTitleTextColor:te,panelActionDividerColor:g,panelHeaderDividerColor:ne,calendarDaysDividerColor:_,panelBoxShadow:v,panelBorderRadius:re,calendarTitleFontWeight:ie,panelExtraFooterPadding:ae,panelActionPadding:b,itemSize:x,itemCellWidth:S,itemCellHeight:C,scrollItemWidth:oe,scrollItemHeight:w,calendarTitlePadding:T,calendarTitleHeight:se,calendarDaysHeight:ce,calendarDaysTextColor:le,arrowSize:ue,panelHeaderPadding:E,calendarDividerColor:de,calendarTitleGridTempateColumns:D,iconColor:O,iconColorDisabled:fe,scrollItemBorderRadius:k,calendarTitleColorHover:A,[y(`calendarLeftPadding`,t)]:pe,[y(`calendarRightPadding`,t)]:j}}=M.value;return{"--n-bezier":n,"--n-panel-border-radius":re,"--n-panel-color":m,"--n-panel-box-shadow":v,"--n-panel-text-color":h,"--n-panel-header-padding":E,"--n-panel-header-divider-color":ne,"--n-calendar-left-padding":pe,"--n-calendar-right-padding":j,"--n-calendar-title-color-hover":A,"--n-calendar-title-height":se,"--n-calendar-title-padding":T,"--n-calendar-title-font-size":r,"--n-calendar-title-font-weight":ie,"--n-calendar-title-text-color":te,"--n-calendar-title-grid-template-columns":D,"--n-calendar-days-height":ce,"--n-calendar-days-divider-color":_,"--n-calendar-days-font-size":i,"--n-calendar-days-text-color":le,"--n-calendar-divider-color":de,"--n-panel-action-padding":b,"--n-panel-extra-footer-padding":ae,"--n-panel-action-divider-color":g,"--n-item-font-size":a,"--n-item-border-radius":d,"--n-item-size":x,"--n-item-cell-width":S,"--n-item-cell-height":C,"--n-item-text-color":o,"--n-item-color-included":c,"--n-item-color-disabled":s,"--n-item-color-hover":l,"--n-item-color-active":u,"--n-item-text-color-disabled":f,"--n-item-text-color-active":p,"--n-scroll-item-width":oe,"--n-scroll-item-height":w,"--n-scroll-item-border-radius":k,"--n-arrow-size":ue,"--n-arrow-color":ee,"--n-icon-color":O,"--n-icon-color-disabled":fe}}),Ze=u?t(`date-picker`,f(()=>e.type),Xe,e):void 0;return Object.assign(Object.assign({},Je),{mergedStatus:ee,mergedClsPrefix:s,mergedBordered:c,namespace:l,uncontrolledValue:de,pendingValue:O,panelInstRef:g,triggerElRef:ne,inputInstRef:v,isMounted:_e(),displayTime:k,displayStartTime:A,displayEndTime:j,mergedShow:S,adjustedTo:oe(e),isRange:F,localizedStartPlaceholder:ge,localizedEndPlaceholder:ve,mergedSize:m,mergedDisabled:h,localizedPlacehoder:me,isValueInvalid:Ke.isValueInvalidRef,isStartValueInvalid:qe.isStartValueInvalidRef,isEndValueInvalid:qe.isEndValueInvalidRef,handleInputKeydown:Ae,handleClickOutside:Me,handleKeydown:L,handleClear:R,handlePanelClear:z,handleTriggerClick:V,handleInputActivate:Re,handleInputDeactivate:Be,handleInputFocus:Ue,handleInputBlur:ze,handlePanelTabOut:je,handlePanelClose:B,handleRangeUpdateValue:He,handleSingleUpdateValue:Ve,handlePanelUpdateValue:Ne,handlePanelConfirm:Pe,mergedTheme:M,actions:be,triggerCssVars:u?void 0:Ye,triggerThemeClass:H?.themeClass,triggerOnRender:H?.onRender,cssVars:u?void 0:Xe,themeClass:Ze?.themeClass,onRender:Ze?.onRender,onNextMonth:e.onNextMonth,onPrevMonth:e.onPrevMonth,onNextYear:e.onNextYear,onPrevYear:e.onPrevYear})},render(){let{clearable:e,triggerOnRender:t,mergedClsPrefix:n,$slots:i}=this,a={onUpdateValue:this.handlePanelUpdateValue,onTabOut:this.handlePanelTabOut,onClose:this.handlePanelClose,onClear:this.handlePanelClear,onKeydown:this.handleKeydown,onConfirm:this.handlePanelConfirm,ref:`panelInstRef`,value:this.pendingValue,active:this.mergedShow,actions:this.actions,shortcuts:this.shortcuts,style:this.cssVars,defaultTime:this.defaultTime,themeClass:this.themeClass,panel:this.panel,inputReadonly:this.inputReadonly||this.mergedDisabled,onRender:this.onRender,onNextMonth:this.onNextMonth,onPrevMonth:this.onPrevMonth,onNextYear:this.onNextYear,onPrevYear:this.onPrevYear,timePickerFormat:this.timePickerFormat,dateFormat:this.dateFormat,fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,calendarDayFormat:this.calendarDayFormat,calendarHeaderYearFormat:this.calendarHeaderYearFormat,calendarHeaderMonthFormat:this.calendarHeaderMonthFormat,calendarHeaderMonthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarHeaderMonthBeforeYear:this.calendarHeaderMonthBeforeYear},o=()=>{let{type:e}=this;return e===`datetime`?r(qi,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime}),i):e===`daterange`?r(Fr,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),i):e===`datetimerange`?r(Ji,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),i):e===`month`||e===`year`||e===`quarter`?r(Ar,Object.assign({},a,{type:e,key:e})):e===`monthrange`||e===`yearrange`||e===`quarterrange`?r(Yi,Object.assign({},a,{type:e})):r(Mr,Object.assign({},a,{type:e,defaultCalendarStartTime:this.defaultCalendarStartTime}),i)};if(this.panel)return o();t?.();let s={bordered:this.mergedBordered,size:this.mergedSize,passivelyActivated:!0,disabled:this.mergedDisabled,readonly:this.inputReadonly||this.mergedDisabled,clearable:e,onClear:this.handleClear,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown,onActivate:this.handleInputActivate,onDeactivate:this.handleInputDeactivate,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};return r(`div`,{ref:`triggerElRef`,class:[`${n}-date-picker`,this.mergedDisabled&&`${n}-date-picker--disabled`,this.isRange&&`${n}-date-picker--range`,this.triggerThemeClass],style:this.triggerCssVars,onKeydown:this.handleKeydown},r(S,null,{default:()=>[r(C,null,{default:()=>this.isRange?r(ge,Object.assign({ref:`inputInstRef`,status:this.mergedStatus,value:[this.displayStartTime,this.displayEndTime],placeholder:[this.localizedStartPlaceholder,this.localizedEndPlaceholder],textDecoration:[this.isStartValueInvalid?`line-through`:``,this.isEndValueInvalid?`line-through`:``],pair:!0,onUpdateValue:this.handleRangeUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},s),{separator:()=>this.separator===void 0?F(i.separator,()=>[r(xe,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>r(Ve,null)})]):this.separator,[e?`clear-icon-placeholder`:`suffix`]:()=>F(i[`date-icon`],()=>[r(xe,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>r(Ie,null)})])}):r(ge,Object.assign({ref:`inputInstRef`,status:this.mergedStatus,value:this.displayTime,placeholder:this.localizedPlacehoder,textDecoration:this.isValueInvalid&&!this.isRange?`line-through`:``,onUpdateValue:this.handleSingleUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},s),{[e?`clear-icon-placeholder`:`suffix`]:()=>r(xe,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>F(i[`date-icon`],()=>[r(Ie,null)])})})}),r(w,{show:this.mergedShow,containerClass:this.namespace,to:this.adjustedTo,teleportDisabled:this.adjustedTo===oe.tdkey,placement:this.placement},{default:()=>r(be,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>this.mergedShow?u(o(),[[k,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});export{Pe as n,ea as t}; \ No newline at end of file diff --git a/frontend/dist/assets/DatePicker-DGNqeOvv.js b/frontend/dist/assets/DatePicker-DGNqeOvv.js new file mode 100644 index 0000000..d75f38b --- /dev/null +++ b/frontend/dist/assets/DatePicker-DGNqeOvv.js @@ -0,0 +1,362 @@ +import{Bt as e,H as t,K as n,Mt as r,Pt as i,Rt as a,U as o,Ut as s,Vt as c,Y as l,an as u,at as d,bt as f,hn as p,it as m,kt as h,mn as ee,nn as te,nt as g,ot as ne,p as _,pn as v,q as re,qt as ie,rn as ae,st as y,tt as b,vn as x}from"./client-Bz0sY7Lm.js";import{a as S,i as C,o as w,t as T}from"./Follower-BaR8jvSz.js";import{c as E,d as oe,u as se}from"./utils-Dcx6g1AV.js";import{d as ce,f as le,i as D,u as ue}from"./Card-BGJkYb2B.js";import{S as O,a as k,i as de,m as A,n as j}from"./Suffix-BBRLYxYK.js";import{t as fe}from"./use-merged-state-z45UzW9G.js";import{n as M,t as N}from"./Button-MBUKfT_Z.js";import{r as pe}from"./keep-UirG4WK3.js";import{a as P,c as F,i as I,o as me}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as he}from"./use-form-item-Bl3X3aXB.js";import{t as ge}from"./Input-CEIE7mTC.js";import{J as _e,K as ve,at as ye,b as be,et as xe,x as Se}from"./index-NE0dsiiJ.js";function Ce(t={},n){let r=v({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:i,keyup:a}=t,o=e=>{switch(e.key){case`Control`:r.ctrl=!0;break;case`Meta`:r.command=!0,r.win=!0;break;case`Shift`:r.shift=!0;break;case`Tab`:r.tab=!0;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=e=>{switch(e.key){case`Control`:r.ctrl=!1;break;case`Meta`:r.command=!1,r.win=!1;break;case`Shift`:r.shift=!1;break;case`Tab`:r.tab=!1;break}a!==void 0&&Object.keys(a).forEach(t=>{if(t!==e.key)return;let n=a[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},l=()=>{(n===void 0||n.value)&&(ce(`keydown`,document,o),ce(`keyup`,document,s)),n!==void 0&&te(n,e=>{e?(ce(`keydown`,document,o),ce(`keyup`,document,s)):(ue(`keydown`,document,o),ue(`keyup`,document,s))})};return O()?(e(l),c(()=>{(n===void 0||n.value)&&(ue(`keydown`,document,o),ue(`keyup`,document,s))})):l(),ee(r)}var we=365.2425,Te=6048e5,Ee=864e5,De=6e4,Oe=36e5,ke=1e3,L=3600*24;L*7,L*we/12*3;var Ae=Symbol.for(`constructDateFrom`);function R(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Ae in e?e[Ae](t):e instanceof Date?new e.constructor(t):new Date(t)}function z(e,...t){let n=R.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var je={};function Me(){return je}function B(e,t){return R(t||e,e)}function Ne(e,t){let n=Me(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=B(e,t?.in),a=i.getDay(),o=(ar(`svg`,{width:`28px`,height:`28px`,viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},r(`g`,{"fill-rule":`nonzero`},r(`path`,{d:`M21.75,3 C23.5449254,3 25,4.45507456 25,6.25 L25,21.75 C25,23.5449254 23.5449254,25 21.75,25 L6.25,25 C4.45507456,25 3,23.5449254 3,21.75 L3,6.25 C3,4.45507456 4.45507456,3 6.25,3 L21.75,3 Z M23.5,9.503 L4.5,9.503 L4.5,21.75 C4.5,22.7164983 5.28350169,23.5 6.25,23.5 L21.75,23.5 C22.7164983,23.5 23.5,22.7164983 23.5,21.75 L23.5,9.503 Z M21.75,4.5 L6.25,4.5 C5.28350169,4.5 4.5,5.28350169 4.5,6.25 L4.5,8.003 L23.5,8.003 L23.5,6.25 C23.5,5.28350169 22.7164983,4.5 21.75,4.5 Z`}))))),Le=h({name:`FastBackward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z`}))))}}),Re=h({name:`FastForward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z`}))))}}),ze=h({name:`Forward`,render(){return r(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},r(`path`,{d:`M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z`,fill:`currentColor`}))}}),Be=ve(`time`,()=>r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},r(`path`,{d:`M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z`,style:` + fill: none; + stroke: currentColor; + stroke-miterlimit: 10; + stroke-width: 32px; + `}),r(`polyline`,{points:`256 128 256 272 352 272`,style:` + fill: none; + stroke: currentColor; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 32px; + `}))),Ve=ve(`to`,()=>r(`svg`,{viewBox:`0 0 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},r(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},r(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},r(`path`,{d:`M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z`})))));function He(e,t,n){let r=B(e,n?.in);return isNaN(t)?R(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function V(e,t,n){let r=B(e,n?.in);if(isNaN(t))return R(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=R(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function Ue(e,t){return Ne(e,{...t,weekStartsOn:1})}function We(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=R(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=Ue(i),o=R(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=Ue(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ge(e){let t=B(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Ke(e,t){let n=B(e,t?.in);return n.setHours(0,0,0,0),n}function qe(e,t,n){let[r,i]=z(n?.in,e,t),a=Ke(r),o=Ke(i),s=+a-Ge(a),c=+o-Ge(o);return Math.round((s-c)/Ee)}function Je(e,t){let n=We(e,t),r=R(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ue(r)}function Ye(e,t,n){return V(e,t*3,n)}function H(e,t,n){return V(e,t*12,n)}function Xe(e,t,n){let[r,i]=z(n?.in,e,t);return+Ke(r)==+Ke(i)}function Ze(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Qe(e){return!(!Ze(e)&&typeof e!=`number`||isNaN(+B(e)))}function $e(e,t){let n=B(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function et(e,t){let n=B(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function tt(e,t){let n=B(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function nt(e,t){let n=B(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rt(e,t){let n=B(e,t?.in);return qe(n,nt(n))+1}function it(e,t){let n=B(e,t?.in),r=Ue(n)-+Je(n);return Math.round(r/Te)+1}function at(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=Me(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=R(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=Ne(o,t),c=R(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=Ne(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function ot(e,t){let n=Me(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=at(e,t),a=R(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ne(a,t)}function st(e,t){let n=B(e,t?.in),r=Ne(n,t)-+ot(n,t);return Math.round(r/Te)+1}function U(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var ct={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return U(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):U(n+1,2)},d(e,t){return U(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return U(e.getHours()%12||12,t.length)},H(e,t){return U(e.getHours(),t.length)},m(e,t){return U(e.getMinutes(),t.length)},s(e,t){return U(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return U(Math.trunc(r*10**(n-3)),t.length)}},lt={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},ut={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return ct.y(e,t)},Y:function(e,t,n,r){let i=at(e,r),a=i>0?i:1-i;return t===`YY`?U(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):U(a,t.length)},R:function(e,t){return U(We(e),t.length)},u:function(e,t){return U(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return U(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return U(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return ct.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return U(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=st(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):U(i,t.length)},I:function(e,t,n){let r=it(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):U(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):ct.d(e,t)},D:function(e,t,n){let r=rt(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):U(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return U(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return U(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return U(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?lt.noon:r===0?lt.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?lt.evening:r>=12?lt.afternoon:r>=4?lt.morning:lt.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return ct.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):ct.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):U(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):U(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):ct.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):ct.s(e,t)},S:function(e,t){return ct.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return ft(r);case`XXXX`:case`XX`:return pt(r);default:return pt(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return ft(r);case`xxxx`:case`xx`:return pt(r);default:return pt(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+dt(r,`:`);default:return`GMT`+pt(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+dt(r,`:`);default:return`GMT`+pt(r,`:`)}},t:function(e,t,n){return U(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return U(+e,t.length)}};function dt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+U(a,2)}function ft(e,t){return e%60==0?(e>0?`-`:`+`)+U(Math.abs(e)/60,2):pt(e,t)}function pt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=U(Math.trunc(r/60),2),a=U(r%60,2);return n+i+t+a}var mt=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},ht=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},gt={p:ht,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return mt(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,mt(r,t)).replace(`{{time}}`,ht(i,t))}},_t=/^D+$/,vt=/^Y+$/,yt=[`D`,`DD`,`YY`,`YYYY`];function bt(e){return _t.test(e)}function xt(e){return vt.test(e)}function St(e,t,n){let r=Ct(e,t,n);if(console.warn(r),yt.includes(e))throw RangeError(r)}function Ct(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var wt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Et=/^'([^]*?)'?$/,Dt=/''/g,Ot=/[a-zA-Z]/;function W(e,t,n){let r=Me(),i=n?.locale??r.locale??k,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=B(e,n?.in);if(!Qe(s))throw RangeError(`Invalid time value`);let c=t.match(Tt).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=gt[t];return n(e,i.formatLong)}return e}).join(``).match(wt).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:kt(e)};if(ut[t])return{isToken:!0,value:e};if(t.match(Ot))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&xt(a)||!n?.useAdditionalDayOfYearTokens&&bt(a))&&St(a,t,String(e));let o=ut[a[0]];return o(s,a,i.localize,l)}).join(``)}function kt(e){let t=e.match(Et);return t?t[1].replace(Dt,`'`):e}function At(e,t){return B(e,t?.in).getDate()}function jt(e,t){return B(e,t?.in).getDay()}function Mt(e,t){let n=B(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=R(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Nt(){return Object.assign({},Me())}function Pt(e,t){return B(e,t?.in).getHours()}function Ft(e,t){let n=B(e,t?.in).getDay();return n===0?7:n}function It(e){return B(e).getMilliseconds()}function Lt(e,t){return B(e,t?.in).getMinutes()}function G(e,t){return B(e,t?.in).getMonth()}function Rt(e){return B(e).getSeconds()}function K(e){return+B(e)}function q(e,t){return B(e,t?.in).getFullYear()}function zt(e,t){let n=Bt(t)?new t(0):R(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Bt(e){return typeof e==`function`&&e.prototype?.constructor===e}var Vt=10,Ht=class{subPriority=0;validate(e,t){return!0}},Ut=class extends Ht{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},Wt=class extends Ht{priority=Vt;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>R(t,e))}set(e,t){return t.timestampIsSet?e:R(e,zt(e,this.context))}},J=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new Ut(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},Gt=class extends J{priority=140;parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`R`,`u`,`t`,`T`]},Y={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Kt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function X(e,t){return e&&{value:t(e.value),rest:e.rest}}function Z(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function qt(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*Oe+a*De+o*ke),rest:t.slice(n[0].length)}}function Jt(e){return Z(Y.anyDigitsSigned,e)}function Q(e,t){switch(e){case 1:return Z(Y.singleDigit,t);case 2:return Z(Y.twoDigits,t);case 3:return Z(Y.threeDigits,t);case 4:return Z(Y.fourDigits,t);default:return Z(RegExp(`^\\d{1,`+e+`}`),t)}}function Yt(e,t){switch(e){case 1:return Z(Y.singleDigitSigned,t);case 2:return Z(Y.twoDigitsSigned,t);case 3:return Z(Y.threeDigitsSigned,t);case 4:return Z(Y.fourDigitsSigned,t);default:return Z(RegExp(`^-?\\d{1,`+e+`}`),t)}}function Xt(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;default:return 0}}function Zt(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function Qt(e){return e%400==0||e%4==0&&e%100!=0}var $t=class extends J{priority=130;incompatibleTokens=[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return X(Q(4,e),r);case`yo`:return X(n.ordinalNumber(e,{unit:`year`}),r);default:return X(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Zt(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},en=class extends J{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return X(Q(4,e),r);case`Yo`:return X(n.ordinalNumber(e,{unit:`year`}),r);default:return X(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=at(e,r);if(n.isTwoDigitYear){let t=Zt(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ne(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ne(e,r)}incompatibleTokens=[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]},tn=class extends J{priority=130;parse(e,t){return Yt(t===`R`?4:t.length,e)}set(e,t,n){let r=R(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ue(r)}incompatibleTokens=[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},nn=class extends J{priority=130;parse(e,t){return Yt(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`]},rn=class extends J{priority=120;parse(e,t,n){switch(t){case`Q`:case`QQ`:return Q(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},an=class extends J{priority=120;parse(e,t,n){switch(t){case`q`:case`qq`:return Q(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},on=class extends J{incompatibleTokens=[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return X(Z(Y.month,e),r);case`MM`:return X(Q(2,e),r);case`Mo`:return X(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},sn=class extends J{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return X(Z(Y.month,e),r);case`LL`:return X(Q(2,e),r);case`Lo`:return X(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]};function cn(e,t,n){let r=B(e,n?.in),i=st(r,n)-t;return r.setDate(r.getDate()-i*7),B(r,n?.in)}var ln=class extends J{priority=100;parse(e,t,n){switch(t){case`w`:return Z(Y.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Ne(cn(e,n,r),r)}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]};function un(e,t,n){let r=B(e,n?.in),i=it(r,n)-t;return r.setDate(r.getDate()-i*7),r}var dn=class extends J{priority=100;parse(e,t,n){switch(t){case`I`:return Z(Y.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Ue(un(e,n))}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},fn=[31,28,31,30,31,30,31,31,30,31,30,31],pn=[31,29,31,30,31,30,31,31,30,31,30,31],mn=class extends J{priority=90;subPriority=1;parse(e,t,n){switch(t){case`d`:return Z(Y.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){let n=Qt(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=pn[r]:t>=1&&t<=fn[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]},hn=class extends J{priority=90;subpriority=1;parse(e,t,n){switch(t){case`D`:case`DD`:return Z(Y.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){return Qt(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`]};function gn(e,t,n){let r=Me(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=B(e,n?.in),o=a.getDay(),s=(t%7+7)%7,c=7-i;return He(a,t<0||t>6?t-(o+c)%7:(s+c)%7-(o+c)%7,n)}var _n=class extends J{priority=90;parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`D`,`i`,`e`,`c`,`t`,`T`]},vn=class extends J{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return X(Q(t.length,e),i);case`eo`:return X(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`]},yn=class extends J{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return X(Q(t.length,e),i);case`co`:return X(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=gn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`]};function bn(e,t,n){let r=B(e,n?.in);return He(r,t-Ft(r,n),n)}var xn=class extends J{priority=90;parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return Q(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return X(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return X(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return X(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);default:return X(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=bn(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`]},Sn=class extends J{priority=80;parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`b`,`B`,`H`,`k`,`t`,`T`]},Cn=class extends J{priority=80;parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`a`,`B`,`H`,`k`,`t`,`T`]},wn=class extends J{priority=80;parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Xt(n),0,0,0),e}incompatibleTokens=[`a`,`b`,`t`,`T`]},Tn=class extends J{priority=70;parse(e,t,n){switch(t){case`h`:return Z(Y.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`H`,`K`,`k`,`t`,`T`]},En=class extends J{priority=70;parse(e,t,n){switch(t){case`H`:return Z(Y.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`K`,`k`,`t`,`T`]},Dn=class extends J{priority=70;parse(e,t,n){switch(t){case`K`:return Z(Y.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`h`,`H`,`k`,`t`,`T`]},On=class extends J{priority=70;parse(e,t,n){switch(t){case`k`:return Z(Y.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`H`,`K`,`t`,`T`]},kn=class extends J{priority=60;parse(e,t,n){switch(t){case`m`:return Z(Y.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=[`t`,`T`]},An=class extends J{priority=50;parse(e,t,n){switch(t){case`s`:return Z(Y.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=[`t`,`T`]},jn=class extends J{priority=30;parse(e,t){return X(Q(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=[`t`,`T`]},Mn=class extends J{priority=10;parse(e,t){switch(t){case`X`:return qt(Kt.basicOptionalMinutes,e);case`XX`:return qt(Kt.basic,e);case`XXXX`:return qt(Kt.basicOptionalSeconds,e);case`XXXXX`:return qt(Kt.extendedOptionalSeconds,e);default:return qt(Kt.extended,e)}}set(e,t,n){return t.timestampIsSet?e:R(e,e.getTime()-Ge(e)-n)}incompatibleTokens=[`t`,`T`,`x`]},Nn=class extends J{priority=10;parse(e,t){switch(t){case`x`:return qt(Kt.basicOptionalMinutes,e);case`xx`:return qt(Kt.basic,e);case`xxxx`:return qt(Kt.basicOptionalSeconds,e);case`xxxxx`:return qt(Kt.extendedOptionalSeconds,e);default:return qt(Kt.extended,e)}}set(e,t,n){return t.timestampIsSet?e:R(e,e.getTime()-Ge(e)-n)}incompatibleTokens=[`t`,`T`,`X`]},Pn=class extends J{priority=40;parse(e){return Jt(e)}set(e,t,n){return[R(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens=`*`},Fn=class extends J{priority=20;parse(e){return Jt(e)}set(e,t,n){return[R(e,n),{timestampIsSet:!0}]}incompatibleTokens=`*`},In={G:new Gt,y:new $t,Y:new en,R:new tn,u:new nn,Q:new rn,q:new an,M:new on,L:new sn,w:new ln,I:new dn,d:new mn,D:new hn,E:new _n,e:new vn,c:new yn,i:new xn,a:new Sn,b:new Cn,B:new wn,h:new Tn,H:new En,K:new Dn,k:new On,m:new kn,s:new An,S:new jn,X:new Mn,x:new Nn,t:new Pn,T:new Fn},Ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zn=/^'([^]*?)'?$/,Bn=/''/g,Vn=/\S/,Hn=/[a-zA-Z]/;function Un(e,t,n,r){let i=()=>R(r?.in||n,NaN),a=Nt(),o=r?.locale??a.locale??k,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():B(n,r?.in);let l={firstWeekContainsDate:s,weekStartsOn:c,locale:o},u=[new Wt(r?.in,n)],d=t.match(Rn).map(e=>{let t=e[0];if(t in gt){let n=gt[t];return n(e,o.formatLong)}return e}).join(``).match(Ln),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&xt(n)&&St(n,t,e),!r?.useAdditionalDayOfYearTokens&&bt(n)&&St(n,t,e);let a=n[0],s=In[a];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=f.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(s.incompatibleTokens===`*`&&f.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:a,fullToken:n});let r=s.run(e,n,o.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(a.match(Hn))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=Wn(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&Vn.test(e))return i();let p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=B(n,r?.in);if(isNaN(+m))return i();let h={};for(let e of p){if(!e.validate(m,l))return i();let t=e.set(m,h,l);Array.isArray(t)?(m=t[0],Object.assign(h,t[1])):m=t}return m}function Wn(e){return e.match(zn)[1].replace(Bn,`'`)}function Gn(e,t){let n=B(e,t?.in);return n.setMinutes(0,0,0),n}function Kn(e,t){let n=B(e,t?.in);return n.setSeconds(0,0),n}function qn(e,t,n){let[r,i]=z(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Jn(e,t,n){let[r,i]=z(n?.in,e,t);return+et(r)==+et(i)}function Yn(e,t){let n=B(e,t?.in);return n.setMilliseconds(0),n}function Xn(e,t,n){let[r,i]=z(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Zn(e,t,n){let r=B(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=R(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Mt(o);return r.setMonth(t,Math.min(a,s)),r}function $(e,t,n){let r=B(e,n?.in);return isNaN(+r)?R(n?.in||e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Zn(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function Qn(e,t,n){let r=B(e,n?.in);return r.setHours(t),r}function $n(e,t,n){let r=B(e,n?.in);return r.setMinutes(t),r}function er(e,t,n){let r=B(e,n?.in),i=t-(Math.trunc(r.getMonth()/3)+1);return Zn(r,r.getMonth()+i*3)}function tr(e,t,n){let r=B(e,n?.in);return r.setSeconds(t),r}function nr(e,t,n){let r=B(e,n?.in);return isNaN(+r)?R(n?.in||e,NaN):(r.setFullYear(t),r)}var rr={date:Xe,month:qn,year:Xn,quarter:Jn};function ir(e){return(t,n)=>Pe(t,n,{weekStartsOn:ar(e)})}function ar(e){return(e+1)%7}function or(e,t,n,r=0){return(n===`week`?ir(r):rr[n])(e,t)}function sr(e,t,n,r,i,a){return i===`date`?cr(e,t,n,r):fr(e,t,n,r,a)}function cr(e,t,n,r){let i=!1,a=!1,o=!1;Array.isArray(n)&&(n[0]({locale:t.value.locale})),u=p(null),d=Ce();function m(){let{onClear:t}=e;t&&t()}function h(){let{onConfirm:t,value:n}=e;t&&t(n)}function ee(t,n){let{onUpdateValue:r}=e;r(t,n)}function te(t=!1){let{onClose:n}=e;n&&n(t)}function g(){let{onTabOut:t}=e;t&&t()}function ne(){ee(null,!0),te(!0),m()}function _(){g()}function v(){(e.active||e.panel)&&a(()=>{let{value:e}=u;if(!e)return;let t=e.querySelectorAll(`[data-n-date]`);t.forEach(e=>{e.classList.add(`transition-disabled`)}),e.offsetWidth,t.forEach(e=>{e.classList.remove(`transition-disabled`)})})}function re(e){e.key===`Tab`&&e.target===u.value&&d.shift&&(e.preventDefault(),g())}function ie(e){let{value:t}=u;d.tab&&e.target===t&&t?.contains(e.relatedTarget)&&g()}let ae=null,y=!1;function b(){ae=e.value,y=!0}function x(){y=!1}function S(){y&&=(ee(ae,!1),!1)}function C(e){return typeof e==`function`?e():e}let w=p(!1);function T(){w.value=!w.value}return{mergedTheme:c,mergedClsPrefix:s,dateFnsOptions:l,timePickerSize:n,timePickerProps:r,selfRef:u,locale:o,doConfirm:h,doClose:te,doUpdateValue:ee,doTabOut:g,handleClearClick:ne,handleFocusDetectorFocus:_,disableTransitionOneTick:v,handlePanelKeyDown:re,handlePanelFocus:ie,cachePendingValue:b,clearPendingValue:x,restorePendingValue:S,getShortcutValue:C,handleShortcutMouseleave:S,showMonthYearPanel:w,handleOpenQuickSelectMonthPanel:T}}var Or=Object.assign(Object.assign({},Er),{defaultCalendarStartTime:Number,actions:{type:Array,default:()=>[`now`,`clear`,`confirm`]}});function kr(e,t){let n=Dr(e),{isValueInvalidRef:r,isDateDisabledRef:a,isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:c,isHourDisabledRef:l,isMinuteDisabledRef:u,isSecondDisabledRef:d,localeRef:m,firstDayOfWeekRef:h,datePickerSlots:ee,yearFormatRef:g,monthFormatRef:ne,quarterFormatRef:_,yearRangeRef:v}=i(Tr),re={isValueInvalid:r,isDateDisabled:a,isDateInvalid:o,isTimeInvalid:s,isDateTimeInvalid:c,isHourDisabled:l,isMinuteDisabled:u,isSecondDisabled:d},ie=f(()=>e.dateFormat||m.value.dateFormat),ae=f(()=>e.calendarDayFormat||m.value.dayFormat),y=p(e.value===null||Array.isArray(e.value)?``:W(e.value,ie.value)),b=p(e.value===null||Array.isArray(e.value)?e.defaultCalendarStartTime??Date.now():e.value),x=p(null),S=p(null),C=p(null),w=p(Date.now()),T=f(()=>gr(b.value,e.value,w.value,h.value??m.value.firstDayOfWeek,!1,t===`week`)),E=f(()=>{let{value:t}=e;return _r(b.value,Array.isArray(t)?null:t,w.value,{monthFormat:ne.value})}),oe=f(()=>{let{value:t}=e;return yr(Array.isArray(t)?null:t,w.value,{yearFormat:g.value},v)}),se=f(()=>{let{value:t}=e;return vr(b.value,Array.isArray(t)?null:t,w.value,{quarterFormat:_.value})}),ce=f(()=>T.value.slice(0,7).map(e=>{let{ts:t}=e;return W(t,ae.value,n.dateFnsOptions.value)})),le=f(()=>W(b.value,e.calendarHeaderMonthFormat||m.value.monthFormat,n.dateFnsOptions.value)),D=f(()=>W(b.value,e.calendarHeaderYearFormat||m.value.yearFormat,n.dateFnsOptions.value)),ue=f(()=>e.calendarHeaderMonthBeforeYear??m.value.monthBeforeYear);te(b,(e,r)=>{(t===`date`||t===`datetime`)&&(qn(e,r)||n.disableTransitionOneTick())}),te(f(()=>e.value),e=>{e!==null&&!Array.isArray(e)?(y.value=W(e,ie.value,n.dateFnsOptions.value),b.value=e):y.value=``});function O(e){return K(t===`datetime`?Yn(e):t===`month`?tt(e):t===`year`?nt(e):t===`quarter`?et(e):t===`week`?Ne(e,{weekStartsOn:((h.value??m.value.firstDayOfWeek)+1)%7}):Ke(e))}function k(e,t){let{isDateDisabled:{value:n}}=re;return n?n(e,t):!1}function de(t){let r=br(t,ie.value,new Date,n.dateFnsOptions.value);if(Qe(r)){if(e.value===null)n.doUpdateValue(K(O(Date.now())),e.panel);else if(!Array.isArray(e.value)){let t=$(e.value,{year:q(r),month:G(r),date:At(r)});n.doUpdateValue(K(O(K(t))),e.panel)}}else y.value=t}function A(){let t=br(y.value,ie.value,new Date,n.dateFnsOptions.value);if(Qe(t)){if(e.value===null)n.doUpdateValue(K(O(Date.now())),!1);else if(!Array.isArray(e.value)){let r=$(e.value,{year:q(t),month:G(t),date:At(t)});n.doUpdateValue(K(O(K(r))),!1)}}else me()}function j(){n.doUpdateValue(null,!0),y.value=``,n.doClose(!0),n.handleClearClick()}function fe(){n.doUpdateValue(K(O(Date.now())),!0);let r=Date.now();b.value=r,n.doClose(!0),e.panel&&(t===`month`||t===`quarter`||t===`year`)&&(n.disableTransitionOneTick(),De(r))}let M=p(null);function N(e){e.type===`date`&&t===`week`&&(M.value=O(K(e.ts)))}function pe(e){return e.type===`date`&&t===`week`?O(K(e.ts))===M.value:!1}function P(r){if(k(r.ts,r.type===`date`?{type:`date`,year:r.dateObject.year,month:r.dateObject.month,date:r.dateObject.date}:r.type===`month`?{type:`month`,year:r.dateObject.year,month:r.dateObject.month}:r.type===`year`?{type:`year`,year:r.dateObject.year}:{type:`quarter`,year:r.dateObject.year,quarter:r.dateObject.quarter}))return;let i;if(i=e.value!==null&&!Array.isArray(e.value)?e.value:Date.now(),t===`datetime`&&e.defaultTime!==null&&!Array.isArray(e.defaultTime)){let t;t=typeof e.defaultTime==`function`?xr(r.ts,e.defaultTime):Cr(e.defaultTime),t&&(i=K($(i,t)))}switch(i=K(r.type===`quarter`&&r.dateObject.quarter?er(nr(i,r.dateObject.year),r.dateObject.quarter):$(i,r.dateObject)),n.doUpdateValue(O(i),e.panel||t===`date`||t===`week`||t===`year`),t){case`date`:case`week`:n.doClose();break;case`year`:e.panel&&n.disableTransitionOneTick(),n.doClose();break;case`month`:n.disableTransitionOneTick(),De(i);break;case`quarter`:n.disableTransitionOneTick(),De(i);break}}function F(t,n){let r;r=e.value!==null&&!Array.isArray(e.value)?e.value:Date.now(),r=K(t.type===`month`?Zn(r,t.dateObject.month):nr(r,t.dateObject.year)),n(r),De(r)}function I(e){b.value=e}function me(t){if(e.value===null||Array.isArray(e.value)){y.value=``;return}t===void 0&&(t=e.value),y.value=W(t,ie.value,n.dateFnsOptions.value)}function he(){re.isDateInvalid.value||re.isTimeInvalid.value||(n.doConfirm(),ge())}function ge(){e.active&&n.doClose()}function _e(){var t;b.value=K(H(b.value,1)),(t=e.onNextYear)==null||t.call(e)}function ve(){var t;b.value=K(H(b.value,-1)),(t=e.onPrevYear)==null||t.call(e)}function ye(){var t;b.value=K(V(b.value,1)),(t=e.onNextMonth)==null||t.call(e)}function be(){var t;b.value=K(V(b.value,-1)),(t=e.onPrevMonth)==null||t.call(e)}function xe(){let{value:e}=x;return e?.listElRef||null}function Se(){let{value:e}=x;return e?.itemsElRef||null}function Ce(){var e;(e=S.value)==null||e.sync()}function we(t){t!==null&&n.doUpdateValue(t,e.panel)}function Te(e){n.cachePendingValue();let t=n.getShortcutValue(e);typeof t==`number`&&n.doUpdateValue(t,!1)}function Ee(t){let r=n.getShortcutValue(t);typeof r==`number`&&(n.doUpdateValue(r,e.panel),n.clearPendingValue(),he())}function De(t){let{value:n}=e;if(C.value){let e=G(t===void 0?n===null?Date.now():n:t);C.value.scrollTo({top:e*40})}if(x.value){let e=q(t===void 0?n===null?Date.now():n:t)-v.value[0];x.value.scrollTo({top:e*40})}}let Oe={monthScrollbarRef:C,yearScrollbarRef:S,yearVlRef:x};return Object.assign(Object.assign(Object.assign(Object.assign({dateArray:T,monthArray:E,yearArray:oe,quarterArray:se,calendarYear:D,calendarMonth:le,weekdays:ce,calendarMonthBeforeYear:ue,mergedIsDateDisabled:k,nextYear:_e,prevYear:ve,nextMonth:ye,prevMonth:be,handleNowClick:fe,handleConfirmClick:he,handleSingleShortcutMouseenter:Te,handleSingleShortcutClick:Ee},re),n),Oe),{handleDateClick:P,handleDateInputBlur:A,handleDateInput:de,handleDateMouseEnter:N,isWeekHovered:pe,handleTimePickerChange:we,clearSelectedDateTime:j,virtualListContainer:xe,virtualListContent:Se,handleVirtualListScroll:Ce,timePickerSize:n.timePickerSize,dateInputValue:y,datePickerSlots:ee,handleQuickMonthClick:F,justifyColumnsScrollState:De,calendarValue:b,onUpdateCalendarValue:I})}var Ar=h({name:`MonthPanel`,props:Object.assign(Object.assign({},Or),{type:{type:String,required:!0},useAsQuickJump:Boolean}),setup(e){let t=kr(e,e.type),{dateLocaleRef:n}=de(`DatePicker`),i=e=>{switch(e.type){case`year`:return ur(e.dateObject.year,e.yearFormat,n.value.locale);case`month`:return lr(e.dateObject.month,e.monthFormat,n.value.locale);case`quarter`:return dr(e.dateObject.quarter,e.quarterFormat,n.value.locale)}},{useAsQuickJump:a}=e;return s(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(n,o,s)=>{let{mergedIsDateDisabled:c,handleDateClick:l,handleQuickMonthClick:u}=t;return r(`div`,{"data-n-date":!0,key:o,class:[`${s}-date-panel-month-calendar__picker-col-item`,n.isCurrent&&`${s}-date-panel-month-calendar__picker-col-item--current`,n.selected&&`${s}-date-panel-month-calendar__picker-col-item--selected`,!a&&c(n.ts,n.type===`year`?{type:`year`,year:n.dateObject.year}:n.type===`month`?{type:`month`,year:n.dateObject.year,month:n.dateObject.month}:n.type===`quarter`?{type:`month`,year:n.dateObject.year,month:n.dateObject.quarter}:null)&&`${s}-date-panel-month-calendar__picker-col-item--disabled`],onClick:()=>{var t,r;n.type===`year`?(t=e.onSelectYear)==null||t.call(e):n.type===`month`&&((r=e.onSelectMonth)==null||r.call(e)),a?u(n,t=>{e.onUpdateValue(t,!1)}):l(n)}},i(n))}})},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,actions:i,renderItem:a,type:o,onRender:s}=this;return s?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--month`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},r(`div`,{class:`${e}-date-panel-month-calendar`},r(D,{ref:`yearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:this.virtualListContainer,content:this.virtualListContent,horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(se,{ref:`yearVlRef`,items:this.yearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleVirtualListScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e)})}),o===`month`||o===`quarter`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(D,{ref:`monthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(o===`month`?this.monthArray:this.quarterArray).map((t,n)=>a(t,n,e)),r(`div`,{class:`${e}-date-panel-${o}-calendar__padding`})]})):null),me(this.datePickerSlots.footer,t=>t?r(`div`,{class:`${e}-date-panel-footer`},t):null),i?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(M,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},i?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,i?.includes(`now`)?P(this.datePickerSlots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,i?.includes(`confirm`)?P(this.datePickerSlots.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}}),jr=h({props:{mergedClsPrefix:{type:String,required:!0},value:Number,monthBeforeYear:{type:Boolean,required:!0},monthYearSeparator:{type:String,required:!0},fastYearSelect:Boolean,fastMonthSelect:Boolean,calendarMonth:{type:String,required:!0},calendarYear:{type:String,required:!0},onUpdateValue:{type:Function,required:!0}},setup(e){let t=p(null),n=p(null),r=p(!1);function i(){r.value=!r.value}function a(){e.fastYearSelect&&i()}function o(){e.fastMonthSelect&&i()}function s(e){r.value&&!t.value?.contains(le(e))&&(r.value=!1)}function c(){i()}return{show:r,triggerRef:t,monthPanelRef:n,handleSelectYear:a,handleSelectMonth:o,handleHeaderClick:c,handleClickOutside:s}},render(){let{handleClickOutside:e,mergedClsPrefix:t}=this;return r(`div`,{class:`${t}-date-panel-month__month-year`,ref:`triggerRef`},r(S,null,{default:()=>[r(C,null,{default:()=>r(`div`,{class:[`${t}-date-panel-month__text`,this.show&&`${t}-date-panel-month__text--active`],onClick:this.handleHeaderClick},this.monthBeforeYear?[this.calendarMonth,this.monthYearSeparator,this.calendarYear]:[this.calendarYear,this.monthYearSeparator,this.calendarMonth])}),r(T,{show:this.show,teleportDisabled:!0},{default:()=>r(ye,{name:`fade-in-scale-up-transition`,appear:!0},{default:()=>this.show?u(r(Ar,{ref:`monthPanelRef`,onUpdateValue:this.onUpdateValue,onSelectYear:this.handleSelectYear,onSelectMonth:this.handleSelectMonth,actions:[],calendarHeaderMonthYearSeparator:this.monthYearSeparator,type:`month`,key:`month`,useAsQuickJump:!0,value:this.value}),[[A,e,void 0,{capture:!0}]]):null})})]}))}}),Mr=h({name:`DatePanel`,props:Object.assign(Object.assign({},Or),{type:{type:String,required:!0}}),setup(e){return kr(e,e.type)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,onRender:i,datePickerSlots:a,type:o}=this;return i?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--${o}`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onFocus:this.handlePanelFocus,onKeydown:this.handlePanelKeyDown},r(`div`,{class:`${e}-date-panel-calendar`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.prevYear},I(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.prevMonth},I(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:e,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.nextMonth},I(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.nextYear},I(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel-dates`},this.dateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts,{type:`date`,year:t.dateObject.year,month:t.dateObject.month,date:t.dateObject.date}),[`${e}-date-panel-date--week-hovered`]:this.isWeekHovered(t),[`${e}-date-panel-date--week-selected`]:t.inSelectedWeek}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(M,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.$slots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`now`)?P(this.$slots.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}}),Nr=Object.assign(Object.assign({},Er),{defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,actions:{type:Array,default:()=>[`clear`,`confirm`]}});function Pr(e,t){let{isDateDisabledRef:n,isStartHourDisabledRef:r,isEndHourDisabledRef:a,isStartMinuteDisabledRef:o,isEndMinuteDisabledRef:s,isStartSecondDisabledRef:c,isEndSecondDisabledRef:l,isStartDateInvalidRef:u,isEndDateInvalidRef:d,isStartTimeInvalidRef:m,isEndTimeInvalidRef:h,isStartValueInvalidRef:ee,isEndValueInvalidRef:g,isRangeInvalidRef:ne,localeRef:_,rangesRef:v,closeOnSelectRef:re,updateValueOnCloseRef:ie,firstDayOfWeekRef:ae,datePickerSlots:y,monthFormatRef:b,yearFormatRef:x,quarterFormatRef:S,yearRangeRef:C}=i(Tr),w={isDateDisabled:n,isStartHourDisabled:r,isEndHourDisabled:a,isStartMinuteDisabled:o,isEndMinuteDisabled:s,isStartSecondDisabled:c,isEndSecondDisabled:l,isStartDateInvalid:u,isEndDateInvalid:d,isStartTimeInvalid:m,isEndTimeInvalid:h,isStartValueInvalid:ee,isEndValueInvalid:g,isRangeInvalid:ne},T=Dr(e),E=p(null),oe=p(null),se=p(null),ce=p(null),le=p(null),D=p(null),ue=p(null),O=p(null),{value:k}=e,de=e.defaultCalendarStartTime??(Array.isArray(k)&&typeof k[0]==`number`?k[0]:Date.now()),A=p(de),j=p(e.defaultCalendarEndTime??(Array.isArray(k)&&typeof k[1]==`number`?k[1]:K(V(de,1))));z(!0);let fe=p(Date.now()),M=p(!1),N=p(0),pe=f(()=>e.dateFormat||_.value.dateFormat),P=f(()=>e.calendarDayFormat||_.value.dayFormat),F=p(Array.isArray(k)?W(k[0],pe.value,T.dateFnsOptions.value):``),I=p(Array.isArray(k)?W(k[1],pe.value,T.dateFnsOptions.value):``),me=f(()=>M.value?`end`:`start`),he=f(()=>gr(A.value,e.value,fe.value,ae.value??_.value.firstDayOfWeek)),ge=f(()=>gr(j.value,e.value,fe.value,ae.value??_.value.firstDayOfWeek)),_e=f(()=>he.value.slice(0,7).map(e=>{let{ts:t}=e;return W(t,P.value,T.dateFnsOptions.value)})),ve=f(()=>W(A.value,e.calendarHeaderMonthFormat||_.value.monthFormat,T.dateFnsOptions.value)),ye=f(()=>W(j.value,e.calendarHeaderMonthFormat||_.value.monthFormat,T.dateFnsOptions.value)),be=f(()=>W(A.value,e.calendarHeaderYearFormat||_.value.yearFormat,T.dateFnsOptions.value)),xe=f(()=>W(j.value,e.calendarHeaderYearFormat||_.value.yearFormat,T.dateFnsOptions.value)),Se=f(()=>{let{value:t}=e;return Array.isArray(t)?t[0]:null}),Ce=f(()=>{let{value:t}=e;return Array.isArray(t)?t[1]:null}),we=f(()=>{let{shortcuts:t}=e;return t||v.value}),Te=f(()=>yr(wr(e.value,`start`),fe.value,{yearFormat:x.value},C)),Ee=f(()=>yr(wr(e.value,`end`),fe.value,{yearFormat:x.value},C)),De=f(()=>{let t=wr(e.value,`start`);return vr(t??Date.now(),t,fe.value,{quarterFormat:S.value})}),Oe=f(()=>{let t=wr(e.value,`end`);return vr(t??Date.now(),t,fe.value,{quarterFormat:S.value})}),ke=f(()=>{let t=wr(e.value,`start`);return _r(t??Date.now(),t,fe.value,{monthFormat:b.value})}),L=f(()=>{let t=wr(e.value,`end`);return _r(t??Date.now(),t,fe.value,{monthFormat:b.value})}),Ae=f(()=>e.calendarHeaderMonthBeforeYear??_.value.monthBeforeYear);te(f(()=>e.value),e=>{if(e!==null&&Array.isArray(e)){let[t,n]=e;F.value=W(t,pe.value,T.dateFnsOptions.value),I.value=W(n,pe.value,T.dateFnsOptions.value),M.value||Ve(e)}else F.value=``,I.value=``});function R(e,n){(t===`daterange`||t===`datetimerange`)&&(q(e)!==q(n)||G(e)!==G(n))&&T.disableTransitionOneTick()}te(A,R),te(j,R);function z(t){let n=tt(A.value),r=tt(j.value);(e.bindCalendarMonths||n>=r)&&(t?j.value=K(V(n,1)):A.value=K(V(r,-1)))}function je(){A.value=K(V(A.value,12)),z(!0)}function Me(){A.value=K(V(A.value,-12)),z(!0)}function B(){A.value=K(V(A.value,1)),z(!0)}function Ne(){A.value=K(V(A.value,-1)),z(!0)}function Pe(){j.value=K(V(j.value,12)),z(!1)}function Fe(){j.value=K(V(j.value,-12)),z(!1)}function Ie(){j.value=K(V(j.value,1)),z(!1)}function Le(){j.value=K(V(j.value,-1)),z(!1)}function Re(e){A.value=e,z(!0)}function ze(e){j.value=e,z(!1)}function Be(t){let r=n.value;if(!r)return!1;if(!Array.isArray(e.value)||me.value===`start`)return r(t,`start`,null);{let{value:e}=N;return t=N.value?Ye(N.value,e.ts,`wipPreview`):Ye(e.ts,N.value,`wipPreview`)}}function We(){ne.value||(T.doConfirm(),Ge())}function Ge(){M.value=!1,e.active&&T.doClose()}function qe(t){typeof t!=`number`&&(t=K(t)),e.value===null?T.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&T.doUpdateValue([t,Math.max(e.value[1],t)],e.panel)}function Je(t){typeof t!=`number`&&(t=K(t)),e.value===null?T.doUpdateValue([t,t],e.panel):Array.isArray(e.value)&&T.doUpdateValue([Math.min(e.value[0],t),t],e.panel)}function Ye(n,r,i){if(typeof n!=`number`&&(n=K(n)),i!==`shortcutPreview`&&i!==`shortcutDone`){let i,a;if(t===`datetimerange`){let{defaultTime:t}=e;typeof t==`function`?(i=Sr(n,t,`start`,[n,r]),a=Sr(r,t,`end`,[n,r])):Array.isArray(t)?(i=Cr(t[0]),a=Cr(t[1])):(i=Cr(t),a=i)}i&&(n=K($(n,i))),a&&(r=K($(r,a)))}T.doUpdateValue([n,r],e.panel&&(i===`done`||i===`shortcutDone`))}function H(e){return K(t===`datetimerange`?Yn(e):t===`monthrange`?tt(e):Ke(e))}function Xe(t){let n=br(t,pe.value,new Date,T.dateFnsOptions.value);Qe(n)?e.value?Array.isArray(e.value)&&qe(H(K($(e.value[0],{year:q(n),month:G(n),date:At(n)})))):qe(H(K($(new Date,{year:q(n),month:G(n),date:At(n)})))):F.value=t}function Ze(t){let n=br(t,pe.value,new Date,T.dateFnsOptions.value);Qe(n)?e.value===null?Je(H(K($(new Date,{year:q(n),month:G(n),date:At(n)})))):Array.isArray(e.value)&&Je(H(K($(e.value[1],{year:q(n),month:G(n),date:At(n)})))):I.value=t}function $e(){let t=br(F.value,pe.value,new Date,T.dateFnsOptions.value),{value:n}=e;Qe(t)?n===null?qe(H(K($(new Date,{year:q(t),month:G(t),date:At(t)})))):Array.isArray(n)&&qe(H(K($(n[0],{year:q(t),month:G(t),date:At(t)})))):rt()}function nt(){let t=br(I.value,pe.value,new Date,T.dateFnsOptions.value),{value:n}=e;Qe(t)?n===null?Je(H(K($(new Date,{year:q(t),month:G(t),date:At(t)})))):Array.isArray(n)&&Je(H(K($(n[1],{year:q(t),month:G(t),date:At(t)})))):rt()}function rt(t){let{value:n}=e;if(n===null||!Array.isArray(n)){F.value=``,I.value=``;return}t===void 0&&(t=n),F.value=W(t[0],pe.value,T.dateFnsOptions.value),I.value=W(t[1],pe.value,T.dateFnsOptions.value)}function it(e){e!==null&&qe(e)}function at(e){e!==null&&Je(e)}function ot(e){T.cachePendingValue();let t=T.getShortcutValue(e);Array.isArray(t)&&Ye(t[0],t[1],`shortcutPreview`)}function st(e){let t=T.getShortcutValue(e);Array.isArray(t)&&(Ye(t[0],t[1],`shortcutDone`),T.clearPendingValue(),We())}function U(t,n){let r=t===void 0?e.value:t;if(t===void 0||n===`start`){if(ue.value){let e=G(Array.isArray(r)?r[0]:Date.now());ue.value.scrollTo({debounce:!1,index:e,elSize:40})}if(le.value){let e=q(Array.isArray(r)?r[0]:Date.now())-C.value[0];le.value.scrollTo({index:e,debounce:!1})}}if(t===void 0||n===`end`){if(O.value){let e=G(Array.isArray(r)?r[1]:Date.now());O.value.scrollTo({debounce:!1,index:e,elSize:40})}if(D.value){let e=q(Array.isArray(r)?r[1]:Date.now())-C.value[0];D.value.scrollTo({index:e,debounce:!1})}}}function ct(n,r){let{value:i}=e,a=!Array.isArray(i),o=n.type===`year`&&t!==`yearrange`?a?$(n.ts,{month:G(t===`quarterrange`?et(new Date):new Date)}).valueOf():$(n.ts,{month:G(t===`quarterrange`?et(i[r===`start`?0:1]):i[r===`start`?0:1])}).valueOf():n.ts;if(a){let t=H(o),n=[t,t];T.doUpdateValue(n,e.panel),U(n,`start`),U(n,`end`),T.disableTransitionOneTick();return}let s=[i[0],i[1]],c=!1;switch(r===`start`?(s[0]=H(o),s[0]>s[1]&&(s[1]=s[0],c=!0)):(s[1]=H(o),s[0]>s[1]&&(s[0]=s[1],c=!0)),T.doUpdateValue(s,e.panel),t){case`monthrange`:case`quarterrange`:T.disableTransitionOneTick(),c?(U(s,`start`),U(s,`end`)):U(s,r);break;case`yearrange`:T.disableTransitionOneTick(),U(s,`start`),U(s,`end`)}}function lt(){var e;(e=se.value)==null||e.sync()}function ut(){var e;(e=ce.value)==null||e.sync()}function dt(e){return e===`start`?le.value?.listElRef||null:D.value?.listElRef||null}function ft(e){return e===`start`?le.value?.itemsElRef||null:D.value?.itemsElRef||null}let pt={startYearVlRef:le,endYearVlRef:D,startMonthScrollbarRef:ue,endMonthScrollbarRef:O,startYearScrollbarRef:se,endYearScrollbarRef:ce};return Object.assign(Object.assign(Object.assign(Object.assign({startDatesElRef:E,endDatesElRef:oe,handleDateClick:He,handleColItemClick:ct,handleDateMouseEnter:Ue,handleConfirmClick:We,startCalendarPrevYear:Me,startCalendarPrevMonth:Ne,startCalendarNextYear:je,startCalendarNextMonth:B,endCalendarPrevYear:Fe,endCalendarPrevMonth:Le,endCalendarNextMonth:Ie,endCalendarNextYear:Pe,mergedIsDateDisabled:Be,changeStartEndTime:Ye,ranges:v,calendarMonthBeforeYear:Ae,startCalendarMonth:ve,startCalendarYear:be,endCalendarMonth:ye,endCalendarYear:xe,weekdays:_e,startDateArray:he,endDateArray:ge,startYearArray:Te,startMonthArray:ke,startQuarterArray:De,endYearArray:Ee,endMonthArray:L,endQuarterArray:Oe,isSelecting:M,handleRangeShortcutMouseenter:ot,handleRangeShortcutClick:st},T),w),pt),{startDateDisplayString:F,endDateInput:I,timePickerSize:T.timePickerSize,startTimeValue:Se,endTimeValue:Ce,datePickerSlots:y,shortcuts:we,startCalendarDateTime:A,endCalendarDateTime:j,justifyColumnsScrollState:U,handleFocusDetectorFocus:T.handleFocusDetectorFocus,handleStartTimePickerChange:it,handleEndTimePickerChange:at,handleStartDateInput:Xe,handleStartDateInputBlur:$e,handleEndDateInput:Ze,handleEndDateInputBlur:nt,handleStartYearVlScroll:lt,handleEndYearVlScroll:ut,virtualListContainer:dt,virtualListContent:ft,onUpdateStartCalendarValue:Re,onUpdateEndCalendarValue:ze})}var Fr=h({name:`DateRangePanel`,props:Nr,setup(e){return Pr(e,`daterange`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,onRender:i,datePickerSlots:a}=this;return i?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--daterange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},I(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},I(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:e,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.startCalendarNextMonth},I(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},I(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.startDateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts)}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},I(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},I(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:e,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.endCalendarNextMonth},I(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},I(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.endDateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts)}],onClick:()=>{this.handleDateClick(t)},onMouseenter:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(M,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(a.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(a.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}});function Ir(e,t,n){let r=Nt(),i=zr(e,n.timeZone,n.locale??r.locale);return`formatToParts`in i?Lr(i,t):Rr(i,t)}function Lr(e,t){let n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if(n[e].type===`timeZoneName`)return n[e].value}function Rr(e,t){let n=e.format(t).replace(/\u200E/g,``),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):``}function zr(e,t,n){return new Intl.DateTimeFormat(n?[n.code,`en-US`]:void 0,{timeZone:t,timeZoneName:e})}function Br(e,t){let n=qr(t);return`formatToParts`in n?Hr(n,e):Ur(n,e)}var Vr={year:0,month:1,day:2,hour:3,minute:4,second:5};function Hr(e,t){try{let n=e.formatToParts(t),r=[];for(let e=0;e=0?a:1e3+a,r-i}function ti(e,t,n){let r=e.getTime()-t,i=ei(new Date(r),n);if(t===i)return t;r-=i-t;let a=ei(new Date(r),n);return i===a?i:Math.max(i,a)}function ni(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ri={};function ii(e){if(ri[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ri[e]=!0,!0}catch{return!1}}var ai=60*1e3,oi={X:function(e,t,n){let r=si(n.timeZone,e);if(r===0)return`Z`;switch(t){case`X`:return ui(r);case`XXXX`:case`XX`:return li(r);default:return li(r,`:`)}},x:function(e,t,n){let r=si(n.timeZone,e);switch(t){case`x`:return ui(r);case`xxxx`:case`xx`:return li(r);default:return li(r,`:`)}},O:function(e,t,n){let r=si(n.timeZone,e);switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+di(r,`:`);default:return`GMT`+li(r,`:`)}},z:function(e,t,n){switch(t){case`z`:case`zz`:case`zzz`:return Ir(`short`,e,n);default:return Ir(`long`,e,n)}}};function si(e,t){let n=e?Qr(e,t,!0)/ai:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw RangeError(`Invalid time zone specified: `+e);return n}function ci(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString();for(;r.length0?`-`:`+`,r=Math.abs(e),i=ci(Math.floor(r/60),2),a=ci(Math.floor(r%60),2);return n+i+t+a}function ui(e,t){return e%60==0?(e>0?`-`:`+`)+ci(Math.abs(e)/60,2):li(e,t)}function di(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+ci(a,2)}function fi(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e-+t}var pi=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,mi=36e5,hi=6e4,gi=2,_i={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:pi};function vi(e,t={}){if(arguments.length<1)throw TypeError(`1 argument required, but only `+arguments.length+` present`);if(e===null)return new Date(NaN);let n=t.additionalDigits==null?gi:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw RangeError(`additionalDigits must be 0, 1 or 2`);if(e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`)return new Date(e.getTime());if(typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`)return new Date(e);if(Object.prototype.toString.call(e)!==`[object String]`)return new Date(NaN);let r=yi(e),{year:i,restDateString:a}=bi(r.date,n),o=xi(a,i);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){let e=o.getTime(),n=0,i;if(r.time&&(n=Si(r.time),n===null||isNaN(n)))return new Date(NaN);if(r.timeZone||t.timeZone){if(i=Qr(r.timeZone||t.timeZone,new Date(e+n)),isNaN(i))return new Date(NaN)}else i=fi(new Date(e+n)),i=fi(new Date(e+n+i));return new Date(e+n+i)}else return new Date(NaN)}function yi(e){let t={},n=_i.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=_i.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){let e=_i.timeZone.exec(r);e?(t.time=r.replace(e[1],``),t.timeZone=e[1].trim()):t.time=r}return t}function bi(e,t){if(e){let n=_i.YYY[t],r=_i.YYYYY[t],i=_i.YYYY.exec(e)||r.exec(e);if(i){let t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=_i.YY.exec(e)||n.exec(e),i){let t=i[1];return{year:parseInt(t,10)*100,restDateString:e.slice(t.length)}}}return{year:null}}function xi(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=_i.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Di(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=_i.DDD.exec(e),a){n=new Date(0);let e=parseInt(a[1],10);return Oi(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=_i.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;let e=parseInt(a[2],10);return Di(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=_i.Www.exec(e),a)return i=parseInt(a[1],10)-1,ki(i)?Ci(t,i):new Date(NaN);if(a=_i.WwwD.exec(e),a){i=parseInt(a[1],10)-1;let e=parseInt(a[2],10)-1;return ki(i,e)?Ci(t,i,e):new Date(NaN)}return null}function Si(e){let t,n,r=_i.HH.exec(e);if(r)return t=parseFloat(r[1].replace(`,`,`.`)),Ai(t)?t%24*mi:NaN;if(r=_i.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(`,`,`.`)),Ai(t,n)?t%24*mi+n*hi:NaN;if(r=_i.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);let e=parseFloat(r[3].replace(`,`,`.`));return Ai(t,n,e)?t%24*mi+n*hi+e*1e3:NaN}return null}function Ci(e,t,n){t||=0,n||=0;let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var wi=[31,28,31,30,31,30,31,31,30,31,30,31],Ti=[31,29,31,30,31,30,31,31,30,31,30,31];function Ei(e){return e%400==0||e%4==0&&e%100!=0}function Di(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;let r=Ei(e);if(r&&n>Ti[t]||!r&&n>wi[t])return!1}return!0}function Oi(e,t){if(t<1)return!1;let n=Ei(e);return!(n&&t>366||!n&&t>365)}function ki(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Ai(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var ji=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Mi(e,t,n={}){t=String(t);let r=t.match(ji);if(r){let i=vi(n.originalDate||e,n);t=r.reduce(function(e,t){if(t[0]===`'`)return e;let r=e.indexOf(t),a=e[r-1]===`'`,o=e.replace(t,`'`+oi[t[0]](i,t,n)+`'`);return a?o.substring(0,r-1)+o.substring(r+1):o},t)}return W(e,t,n)}function Ni(e,t,n){e=vi(e,n);let r=Qr(t,e,!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}function Pi(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Mi(Ni(e,t,{timeZone:r.timeZone}),n,r)}var Fi=l(`n-time-picker`),Ii=h({name:`TimePickerPanelCol`,props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:[Number,String],default:null},onItemClick:Function},render(){let{activeValue:e,onItemClick:t,clsPrefix:n}=this;return this.data.map(i=>{let{label:a,disabled:o,value:s}=i,c=e===s;return r(`div`,{key:a,"data-active":c?``:null,class:[`${n}-time-picker-col__item`,c&&`${n}-time-picker-col__item--active`,o&&`${n}-time-picker-col__item--disabled`],onClick:t&&!o?()=>{t(s)}:void 0},a)})}}),Li={amHours:[`00`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`],pmHours:[`12`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`],hours:[`00`,`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`,`13`,`14`,`15`,`16`,`17`,`18`,`19`,`20`,`21`,`22`,`23`],minutes:`00.01.02.03.04.05.06.07.08.09.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59`.split(`.`),seconds:`00.01.02.03.04.05.06.07.08.09.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59`.split(`.`),period:[`AM`,`PM`]};function Ri(e){return`00${e}`.slice(-2)}function zi(e,t,n){return Array.isArray(t)?(n===`am`?t.filter(e=>e<12):n===`pm`?t.filter(e=>e>=12).map(e=>e===12?12:e-12):t).map(e=>Ri(e)):typeof t==`number`?n===`am`?e.filter(e=>{let n=Number(e);return n<12&&n%t===0}):n===`pm`?e.filter(e=>{let n=Number(e);return n>=12&&n%t===0}).map(e=>{let t=Number(e);return Ri(t===12?12:t-12)}):e.filter(e=>Number(e)%t===0):n===`am`?e.filter(e=>Number(e)<12):n===`pm`?e.map(e=>Number(e)).filter(e=>Number(e)>=12).map(e=>Ri(e===12?12:e-12)):e}function Bi(e,t,n){return n?typeof n==`number`?e%n===0:n.includes(e):!0}function Vi(e,t,r){let i=zi(Li[t],r).map(Number),a,o;for(let t=0;te){o=n;break}a=n}return a===void 0?(o||n(`time-picker`,`Please set 'hours' or 'minutes' or 'seconds' props`),o):o===void 0||o-e>e-a?a:o}function Hi(e){return Pt(e)<12?`am`:`pm`}var Ui=h({name:`TimePickerPanel`,props:{actions:{type:Array,default:()=>[`now`,`confirm`]},showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},showPeriod:{type:Boolean,default:!0},isHourInvalid:Boolean,isMinuteInvalid:Boolean,isSecondInvalid:Boolean,isAmPmInvalid:Boolean,isValueInvalid:Boolean,hourValue:{type:Number,default:null},minuteValue:{type:Number,default:null},secondValue:{type:Number,default:null},amPmValue:{type:String,default:null},isHourDisabled:Function,isMinuteDisabled:Function,isSecondDisabled:Function,onHourClick:{type:Function,required:!0},onMinuteClick:{type:Function,required:!0},onSecondClick:{type:Function,required:!0},onAmPmClick:{type:Function,required:!0},onNowClick:Function,clearText:String,nowText:String,confirmText:String,transitionDisabled:Boolean,onClearClick:Function,onConfirmClick:Function,onFocusin:Function,onFocusout:Function,onFocusDetectorFocus:Function,onKeydown:Function,hours:[Number,Array],minutes:[Number,Array],seconds:[Number,Array],use12Hours:Boolean},setup(e){let{mergedThemeRef:t,mergedClsPrefixRef:n}=i(Fi);return{mergedTheme:t,mergedClsPrefix:n,hours:f(()=>{let{isHourDisabled:t,hours:n,use12Hours:r,amPmValue:i}=e;if(r){let e=i??Hi(Date.now());return zi(Li.hours,n,e).map(n=>{let r=Number(n),i=e===`pm`&&r!==12?r+12:r;return{label:n,value:i,disabled:t?t(i):!1}})}else return zi(Li.hours,n).map(e=>({label:e,value:Number(e),disabled:t?t(Number(e)):!1}))}),minutes:f(()=>{let{isMinuteDisabled:t,minutes:n}=e;return zi(Li.minutes,n).map(n=>({label:n,value:Number(n),disabled:t?t(Number(n),e.hourValue):!1}))}),seconds:f(()=>{let{isSecondDisabled:t,seconds:n}=e;return zi(Li.seconds,n).map(n=>({label:n,value:Number(n),disabled:t?t(Number(n),e.minuteValue,e.hourValue):!1}))}),amPm:f(()=>{let{isHourDisabled:t}=e,n=!0,r=!0;for(let e=0;e<12;++e)if(!t?.(e)){n=!1;break}for(let e=12;e<24;++e)if(!t?.(e)){r=!1;break}return[{label:`AM`,value:`am`,disabled:n},{label:`PM`,value:`pm`,disabled:r}]}),hourScrollRef:p(null),minuteScrollRef:p(null),secondScrollRef:p(null),amPmScrollRef:p(null)}},render(){let{mergedClsPrefix:e,mergedTheme:t}=this;return r(`div`,{tabindex:0,class:`${e}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},r(`div`,{class:`${e}-time-picker-cols`},this.showHour?r(`div`,{class:[`${e}-time-picker-col`,this.isHourInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(D,{ref:`hourScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.showMinute?r(`div`,{class:[`${e}-time-picker-col`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${e}-time-picker-col--invalid`]},r(D,{ref:`minuteScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.showSecond?r(`div`,{class:[`${e}-time-picker-col`,this.isSecondInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(D,{ref:`secondScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null,this.use12Hours?r(`div`,{class:[`${e}-time-picker-col`,this.isAmPmInvalid&&`${e}-time-picker-col--invalid`,this.transitionDisabled&&`${e}-time-picker-col--transition-disabled`]},r(D,{ref:`amPmScrollRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[r(Ii,{clsPrefix:e,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),r(`div`,{class:`${e}-time-picker-col__padding`})]})):null),this.actions?.length?r(`div`,{class:`${e}-time-picker-actions`},this.actions?.includes(`clear`)?r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.onClearClick},{default:()=>this.clearText}):null,this.actions?.includes(`now`)?r(N,{size:`tiny`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,this.actions?.includes(`confirm`)?r(N,{size:`tiny`,type:`primary`,class:`${e}-time-picker-actions__confirm`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,disabled:this.isValueInvalid,onClick:this.onConfirmClick},{default:()=>this.confirmText}):null):null,r(E,{onFocus:this.onFocusDetectorFocus}))}}),Wi=b([g(`time-picker`,` + z-index: auto; + position: relative; + `,[g(`time-picker-icon`,` + color: var(--n-icon-color-override); + transition: color .3s var(--n-bezier); + `),d(`disabled`,[g(`time-picker-icon`,` + color: var(--n-icon-color-disabled-override); + `)])]),g(`time-picker-panel`,` + transition: + box-shadow .3s var(--n-bezier), + background-color .3s var(--n-bezier); + outline: none; + font-size: var(--n-item-font-size); + border-radius: var(--n-border-radius); + margin: 4px 0; + min-width: 104px; + overflow: hidden; + background-color: var(--n-panel-color); + box-shadow: var(--n-panel-box-shadow); + `,[j(),g(`time-picker-actions`,` + padding: var(--n-panel-action-padding); + align-items: center; + display: flex; + justify-content: space-evenly; + `),g(`time-picker-cols`,` + height: calc(var(--n-item-height) * 6); + display: flex; + position: relative; + transition: border-color .3s var(--n-bezier); + border-bottom: 1px solid var(--n-panel-divider-color); + `),g(`time-picker-col`,` + flex-grow: 1; + min-width: var(--n-item-width); + height: calc(var(--n-item-height) * 6); + flex-direction: column; + transition: box-shadow .3s var(--n-bezier); + `,[d(`transition-disabled`,[m(`item`,`transition: none;`,[b(`&::before`,`transition: none;`)])]),m(`padding`,` + height: calc(var(--n-item-height) * 5); + `),b(`&:first-child`,`min-width: calc(var(--n-item-width) + 4px);`,[m(`item`,[b(`&::before`,`left: 4px;`)])]),m(`item`,` + cursor: pointer; + height: var(--n-item-height); + display: flex; + align-items: center; + justify-content: center; + transition: + color .3s var(--n-bezier), + background-color .3s var(--n-bezier), + opacity .3s var(--n-bezier), + text-decoration-color .3s var(--n-bezier); + background: #0000; + text-decoration-color: #0000; + color: var(--n-item-text-color); + z-index: 0; + box-sizing: border-box; + padding-top: 4px; + position: relative; + `,[b(`&::before`,` + content: ""; + transition: background-color .3s var(--n-bezier); + z-index: -1; + position: absolute; + left: 0; + right: 4px; + top: 4px; + bottom: 0; + border-radius: var(--n-item-border-radius); + `),ne(`disabled`,[b(`&:hover::before`,` + background-color: var(--n-item-color-hover); + `)]),d(`active`,` + color: var(--n-item-text-color-active); + `,[b(`&::before`,` + background-color: var(--n-item-color-hover); + `)]),d(`disabled`,` + opacity: var(--n-item-opacity-disabled); + cursor: not-allowed; + `)]),d(`invalid`,[m(`item`,[d(`active`,` + text-decoration: line-through; + text-decoration-color: var(--n-item-text-color-active); + `)])])])])]);function Gi(e,t){return e===void 0?!0:Array.isArray(e)?e.every(e=>e>=0&&e<=t):e>=0&&e<=t}var Ki=h({name:`TimePicker`,props:Object.assign(Object.assign({},_.props),{to:w.propTo,bordered:{type:Boolean,default:void 0},actions:Array,defaultValue:{type:Number,default:null},defaultFormattedValue:String,placeholder:String,placement:{type:String,default:`bottom-start`},value:Number,format:{type:String,default:`HH:mm:ss`},valueFormat:String,formattedValue:String,isHourDisabled:Function,size:String,isMinuteDisabled:Function,isSecondDisabled:Function,inputReadonly:Boolean,clearable:Boolean,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:formattedValue":[Function,Array],onBlur:[Function,Array],onConfirm:[Function,Array],onClear:Function,onFocus:[Function,Array],timeZone:String,showIcon:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},show:{type:Boolean,default:void 0},hours:{type:[Number,Array],validator:e=>Gi(e,23)},minutes:{type:[Number,Array],validator:e=>Gi(e,59)},seconds:{type:[Number,Array],validator:e=>Gi(e,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),setup(e){let{mergedBorderedRef:n,mergedClsPrefixRef:r,namespaceRef:i,inlineThemeDisabled:s,mergedComponentPropsRef:c}=o(e),{localeRef:l,dateLocaleRef:u}=de(`TimePicker`),d=he(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:c?.value?.TimePicker?.size||`medium`}}),{mergedSizeRef:m,mergedDisabledRef:h,mergedStatusRef:ee}=d,g=_(`TimePicker`,`-time-picker`,Wi,Se,e,r),ne=Ce(),v=p(null),re=p(null),ae=f(()=>({locale:u.value.locale}));function y(t){return t===null?null:br(t,e.valueFormat||e.format,new Date,ae.value).getTime()}let{defaultValue:b,defaultFormattedValue:S}=e,C=p(S===void 0?b:y(S)),T=f(()=>{let{formattedValue:t}=e;if(t!==void 0)return y(t);let{value:n}=e;return n===void 0?C.value:n}),E=f(()=>{let{timeZone:t}=e;return t?(e,n,r)=>Pi(e,t,n,r):(e,t,n)=>W(e,t,n)}),se=p(``);te(()=>e.timeZone,()=>{let t=T.value;se.value=t===null?``:E.value(t,e.format,ae.value)},{immediate:!0});let ce=p(!1),D=fe(x(e,`show`),ce),ue=p(T.value),O=p(!1),k=f(()=>l.value.clear),A=f(()=>l.value.now),j=f(()=>e.placeholder===void 0?l.value.placeholder:e.placeholder),M=f(()=>l.value.negativeText),N=f(()=>l.value.positiveText),P=f(()=>/H|h|K|k/.test(e.format)),I=f(()=>e.format.includes(`m`)),me=f(()=>e.format.includes(`s`)),ge=f(()=>{let{value:e}=T;return e===null?null:Number(E.value(e,`HH`,ae.value))}),_e=f(()=>{let{value:e}=T;return e===null?null:Number(E.value(e,`mm`,ae.value))}),ve=f(()=>{let{value:e}=T;return e===null?null:Number(E.value(e,`ss`,ae.value))}),ye=f(()=>{let{isHourDisabled:t}=e;return ge.value===null?!1:Bi(ge.value,`hours`,e.hours)?t?t(ge.value):!1:!0}),be=f(()=>{let{value:t}=_e,{value:n}=ge;if(t===null||n===null)return!1;if(!Bi(t,`minutes`,e.minutes))return!0;let{isMinuteDisabled:r}=e;return r?r(t,n):!1}),we=f(()=>{let{value:t}=_e,{value:n}=ge,{value:r}=ve;if(r===null||t===null||n===null)return!1;if(!Bi(r,`seconds`,e.seconds))return!0;let{isSecondDisabled:i}=e;return i?i(r,t,n):!1}),Te=f(()=>ye.value||be.value||we.value),Ee=f(()=>e.format.length+4),De=f(()=>{let{value:e}=T;return e===null?null:Pt(e)<12?`am`:`pm`});function Oe(t,n){let{onUpdateFormattedValue:r,"onUpdate:formattedValue":i}=e;r&&F(r,t,n),i&&F(i,t,n)}function ke(t){return t===null?null:E.value(t,e.valueFormat||e.format)}function L(t){let{onUpdateValue:n,"onUpdate:value":r,onChange:i}=e,{nTriggerFormChange:a,nTriggerFormInput:o}=d,s=ke(t);n&&F(n,t,s),r&&F(r,t,s),i&&F(i,t,s),Oe(s,t),C.value=t,a(),o()}function Ae(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=d;n&&F(n,t),r()}function R(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=d;n&&F(n,t),r()}function z(){let{onConfirm:t}=e;t&&F(t,T.value,ke(T.value))}function je(t){var n;t.stopPropagation(),L(null),Ve(null),(n=e.onClear)==null||n.call(e)}function Me(){H({returnFocus:!0})}function B(){L(null),Ve(null),H({returnFocus:!0})}function Ne(e){e.key===`Escape`&&D.value&&pe(e)}function Pe(e){switch(e.key){case`Escape`:D.value&&(pe(e),H({returnFocus:!0}));break;case`Tab`:ne.shift&&e.target===re.value?.$el&&(e.preventDefault(),H({returnFocus:!0}));break}}function Fe(){O.value=!0,a(()=>{O.value=!1})}function Ie(e){h.value||oe(e,`clear`)||D.value||Je()}function Le(e){typeof e!=`string`&&(T.value===null?L(K(Qn(Gn(new Date),e))):L(K(Qn(T.value,e))))}function Re(e){typeof e!=`string`&&(T.value===null?L(K($n(Kn(new Date),e))):L(K($n(T.value,e))))}function ze(e){typeof e!=`string`&&(T.value===null?L(K(tr(Yn(new Date),e))):L(K(tr(T.value,e))))}function Be(e){let{value:t}=T;if(t===null){let t=new Date,n=Pt(t);e===`pm`&&n<12?L(K(Qn(t,n+12))):e===`am`&&n>=12&&L(K(Qn(t,n-12))),L(K(t))}else{let n=Pt(t);e===`pm`&&n<12?L(K(Qn(t,n+12))):e===`am`&&n>=12&&L(K(Qn(t,n-12)))}}function Ve(t){t===void 0&&(t=T.value),t===null?se.value=``:se.value=E.value(t,e.format,ae.value)}function He(e){qe(e)||Ae(e)}function V(e){qe(e)||(D.value?(re.value?.$el)?.contains(e.relatedTarget)||(Ve(),R(e),H({returnFocus:!1})):(Ve(),R(e)))}function Ue(){h.value||D.value||Je()}function We(){h.value||(Ve(),H({returnFocus:!1}))}function Ge(){if(!re.value)return;let{hourScrollRef:e,minuteScrollRef:t,secondScrollRef:n,amPmScrollRef:r}=re.value;[e,t,n,r].forEach(e=>{if(!e)return;let t=e.contentRef?.querySelector(`[data-active]`);t&&e.scrollTo({top:t.offsetTop})})}function Ke(t){ce.value=t;let{onUpdateShow:n,"onUpdate:show":r}=e;n&&F(n,t),r&&F(r,t)}function qe(e){return!!((v.value?.wrapperElRef)?.contains(e.relatedTarget)||re.value?.$el.contains(e.relatedTarget))}function Je(){ue.value=T.value,Ke(!0),a(Ge)}function Ye(e){D.value&&!(v.value?.wrapperElRef)?.contains(le(e))&&H({returnFocus:!1})}function H({returnFocus:e}){var t;D.value&&(Ke(!1),e&&((t=v.value)==null||t.focus()))}function Xe(t){if(t===``){L(null);return}let n=br(t,e.format,new Date,ae.value);if(se.value=t,Qe(n)){let{value:e}=T;L(K(e===null?n:$(e,{hours:Pt(n),minutes:Lt(n),seconds:Rt(n),milliseconds:It(n)})))}}function Ze(){L(ue.value),Ke(!1)}function $e(){let t=new Date,n={hours:Pt,minutes:Lt,seconds:Rt},[r,i,a]=[`hours`,`minutes`,`seconds`].map(r=>!e[r]||Bi(n[r](t),r,e[r])?n[r](t):Vi(n[r](t),r,e[r]));L(K(tr($n(Qn(T.value?T.value:K(t),r),i),a)))}function et(){Ve(),z(),H({returnFocus:!0})}function tt(e){qe(e)||(Ve(),R(e),H({returnFocus:!1}))}te(T,e=>{Ve(e),Fe(),a(Ge)}),te(D,()=>{Te.value&&L(ue.value)}),ie(Fi,{mergedThemeRef:g,mergedClsPrefixRef:r});let nt={focus:()=>{var e;(e=v.value)==null||e.focus()},blur:()=>{var e;(e=v.value)==null||e.blur()}},rt=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=g.value;return{"--n-icon-color-override":t,"--n-icon-color-disabled-override":n,"--n-bezier":e}}),it=s?t(`time-picker-trigger`,void 0,rt,e):void 0,at=f(()=>{let{self:{panelColor:e,itemTextColor:t,itemTextColorActive:n,itemColorHover:r,panelDividerColor:i,panelBoxShadow:a,itemOpacityDisabled:o,borderRadius:s,itemFontSize:c,itemWidth:l,itemHeight:u,panelActionPadding:d,itemBorderRadius:f},common:{cubicBezierEaseInOut:p}}=g.value;return{"--n-bezier":p,"--n-border-radius":s,"--n-item-color-hover":r,"--n-item-font-size":c,"--n-item-height":u,"--n-item-opacity-disabled":o,"--n-item-text-color":t,"--n-item-text-color-active":n,"--n-item-width":l,"--n-panel-action-padding":d,"--n-panel-box-shadow":a,"--n-panel-color":e,"--n-panel-divider-color":i,"--n-item-border-radius":f}}),ot=s?t(`time-picker`,void 0,at,e):void 0;return{focus:nt.focus,blur:nt.blur,mergedStatus:ee,mergedBordered:n,mergedClsPrefix:r,namespace:i,uncontrolledValue:C,mergedValue:T,isMounted:xe(),inputInstRef:v,panelInstRef:re,adjustedTo:w(e),mergedShow:D,localizedClear:k,localizedNow:A,localizedPlaceholder:j,localizedNegativeText:M,localizedPositiveText:N,hourInFormat:P,minuteInFormat:I,secondInFormat:me,mergedAttrSize:Ee,displayTimeString:se,mergedSize:m,mergedDisabled:h,isValueInvalid:Te,isHourInvalid:ye,isMinuteInvalid:be,isSecondInvalid:we,transitionDisabled:O,hourValue:ge,minuteValue:_e,secondValue:ve,amPmValue:De,handleInputKeydown:Ne,handleTimeInputFocus:He,handleTimeInputBlur:V,handleNowClick:$e,handleConfirmClick:et,handleTimeInputUpdateValue:Xe,handleMenuFocusOut:tt,handleCancelClick:Ze,handleClickOutside:Ye,handleTimeInputActivate:Ue,handleTimeInputDeactivate:We,handleHourClick:Le,handleMinuteClick:Re,handleSecondClick:ze,handleAmPmClick:Be,handleTimeInputClear:je,handleFocusDetectorFocus:Me,handleMenuKeydown:Pe,handleTriggerClick:Ie,mergedTheme:g,triggerCssVars:s?void 0:rt,triggerThemeClass:it?.themeClass,triggerOnRender:it?.onRender,cssVars:s?void 0:at,themeClass:ot?.themeClass,onRender:ot?.onRender,clearSelectedValue:B}},render(){let{mergedClsPrefix:e,$slots:t,triggerOnRender:n}=this;return n?.(),r(`div`,{class:[`${e}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},r(S,null,{default:()=>[r(C,null,{default:()=>r(ge,{ref:`inputInstRef`,status:this.mergedStatus,value:this.displayTimeString,bordered:this.mergedBordered,passivelyActivated:!0,attrSize:this.mergedAttrSize,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,stateful:this.stateful,size:this.mergedSize,placeholder:this.localizedPlaceholder,clearable:this.clearable,disabled:this.mergedDisabled,textDecoration:this.isValueInvalid?`line-through`:void 0,onFocus:this.handleTimeInputFocus,onBlur:this.handleTimeInputBlur,onActivate:this.handleTimeInputActivate,onDeactivate:this.handleTimeInputDeactivate,onUpdateValue:this.handleTimeInputUpdateValue,onClear:this.handleTimeInputClear,internalDeactivateOnEnter:!0,internalForceFocus:this.mergedShow,readonly:this.inputReadonly||this.mergedDisabled,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown},this.showIcon?{[this.clearable?`clear-icon-placeholder`:`suffix`]:()=>r(_e,{clsPrefix:e,class:`${e}-time-picker-icon`},{default:()=>t.icon?t.icon():r(Be,null)})}:null)}),r(T,{teleportDisabled:this.adjustedTo===w.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>r(ye,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>{var e;return this.mergedShow?((e=this.onRender)==null||e.call(this),u(r(Ui,{ref:`panelInstRef`,actions:this.actions,class:this.themeClass,style:this.cssVars,seconds:this.seconds,minutes:this.minutes,hours:this.hours,transitionDisabled:this.transitionDisabled,hourValue:this.hourValue,showHour:this.hourInFormat,isHourInvalid:this.isHourInvalid,isHourDisabled:this.isHourDisabled,minuteValue:this.minuteValue,showMinute:this.minuteInFormat,isMinuteInvalid:this.isMinuteInvalid,isMinuteDisabled:this.isMinuteDisabled,secondValue:this.secondValue,amPmValue:this.amPmValue,showSecond:this.secondInFormat,isSecondInvalid:this.isSecondInvalid,isSecondDisabled:this.isSecondDisabled,isValueInvalid:this.isValueInvalid,clearText:this.localizedClear,nowText:this.localizedNow,confirmText:this.localizedPositiveText,use12Hours:this.use12Hours,onFocusout:this.handleMenuFocusOut,onKeydown:this.handleMenuKeydown,onHourClick:this.handleHourClick,onMinuteClick:this.handleMinuteClick,onSecondClick:this.handleSecondClick,onAmPmClick:this.handleAmPmClick,onNowClick:this.handleNowClick,onConfirmClick:this.handleConfirmClick,onClearClick:this.clearSelectedValue,onFocusDetectorFocus:this.handleFocusDetectorFocus}),[[A,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),qi=h({name:`DateTimePanel`,props:Or,setup(e){return kr(e,`datetime`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,timePickerProps:i,datePickerSlots:a,onRender:o}=this;return o?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--datetime`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{class:`${e}-date-panel-header`},r(ge,{value:this.dateInputValue,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isDateInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleDateInputBlur,onUpdateValue:this.handleDateInput}),r(Ki,Object.assign({size:this.timePickerSize,placeholder:this.locale.selectTime,format:this.timePickerFormat},Array.isArray(i)?void 0:i,{showIcon:!1,to:!1,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,value:Array.isArray(this.value)?null:this.value,isHourDisabled:this.isHourDisabled,isMinuteDisabled:this.isMinuteDisabled,isSecondDisabled:this.isSecondDisabled,onUpdateValue:this.handleTimePickerChange,stateful:!1}))),r(`div`,{class:`${e}-date-panel-calendar`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.prevYear},I(a[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.prevMonth},I(a[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.calendarValue,onUpdateValue:this.onUpdateCalendarValue,mergedClsPrefix:e,calendarMonth:this.calendarMonth,calendarYear:this.calendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.nextMonth},I(a[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.nextYear},I(a[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel-dates`},this.dateArray.map((t,n)=>r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--disabled`]:this.mergedIsDateDisabled(t.ts,{type:`date`,year:t.dateObject.year,month:t.dateObject.month,date:t.dateObject.date})}],onClick:()=>{this.handleDateClick(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)?null:r(M,{size:`tiny`,onMouseenter:()=>{this.handleSingleShortcutMouseenter(t)},onClick:()=>{this.handleSingleShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e})})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.clearSelectedDateTime,text:this.locale.clear},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.clearSelectedDateTime},{default:()=>this.locale.clear})]):null,this.actions?.includes(`now`)?P(a.now,{onNow:this.handleNowClick,text:this.locale.now},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleNowClick},{default:()=>this.locale.now})]):null,this.actions?.includes(`confirm`)?P(a.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isDateInvalid,text:this.locale.confirm},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isDateInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}}),Ji=h({name:`DateTimeRangePanel`,props:Nr,setup(e){return Pr(e,`datetimerange`)},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,timePickerProps:i,onRender:a,datePickerSlots:o}=this;return a?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--datetimerange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{class:`${e}-date-panel-header`},r(ge,{value:this.startDateDisplayString,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,size:this.timePickerSize,stateful:!1,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isStartValueInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleStartDateInputBlur,onUpdateValue:this.handleStartDateInput}),r(Ki,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(i)?i[0]:i,{value:this.startTimeValue,to:!1,showIcon:!1,disabled:this.isSelecting,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,stateful:!1,isHourDisabled:this.isStartHourDisabled,isMinuteDisabled:this.isStartMinuteDisabled,isSecondDisabled:this.isStartSecondDisabled,onUpdateValue:this.handleStartTimePickerChange})),r(ge,{value:this.endDateInput,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,stateful:!1,size:this.timePickerSize,readonly:this.inputReadonly,class:`${e}-date-panel-date-input`,textDecoration:this.isEndValueInvalid?`line-through`:``,placeholder:this.locale.selectDate,onBlur:this.handleEndDateInputBlur,onUpdateValue:this.handleEndDateInput}),r(Ki,Object.assign({placeholder:this.locale.selectTime,format:this.timePickerFormat,size:this.timePickerSize},Array.isArray(i)?i[1]:i,{disabled:this.isSelecting,showIcon:!1,theme:t.peers.TimePicker,themeOverrides:t.peerOverrides.TimePicker,to:!1,stateful:!1,value:this.endTimeValue,isHourDisabled:this.isEndHourDisabled,isMinuteDisabled:this.isEndMinuteDisabled,isSecondDisabled:this.isEndSecondDisabled,onUpdateValue:this.handleEndTimePickerChange}))),r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.startCalendarPrevYear},I(o[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.startCalendarPrevMonth},I(o[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthYearSeparator:this.calendarHeaderMonthYearSeparator,monthBeforeYear:this.calendarMonthBeforeYear,value:this.startCalendarDateTime,onUpdateValue:this.onUpdateStartCalendarValue,mergedClsPrefix:e,calendarMonth:this.startCalendarMonth,calendarYear:this.startCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.startCalendarNextMonth},I(o[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.startCalendarNextYear},I(o[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.startDateArray.map((t,n)=>{let i=this.mergedIsDateDisabled(t.ts);return r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:i}],onClick:i?void 0:()=>{this.handleDateClick(t)},onMouseenter:i?void 0:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)}))),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month`},r(`div`,{class:`${e}-date-panel-month__fast-prev`,onClick:this.endCalendarPrevYear},I(o[`prev-year`],()=>[r(Le,null)])),r(`div`,{class:`${e}-date-panel-month__prev`,onClick:this.endCalendarPrevMonth},I(o[`prev-month`],()=>[r(Fe,null)])),r(jr,{fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,monthBeforeYear:this.calendarMonthBeforeYear,value:this.endCalendarDateTime,onUpdateValue:this.onUpdateEndCalendarValue,mergedClsPrefix:e,monthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarMonth:this.endCalendarMonth,calendarYear:this.endCalendarYear}),r(`div`,{class:`${e}-date-panel-month__next`,onClick:this.endCalendarNextMonth},I(o[`next-month`],()=>[r(ze,null)])),r(`div`,{class:`${e}-date-panel-month__fast-next`,onClick:this.endCalendarNextYear},I(o[`next-year`],()=>[r(Re,null)]))),r(`div`,{class:`${e}-date-panel-weekdays`},this.weekdays.map(t=>r(`div`,{key:t,class:`${e}-date-panel-weekdays__day`},t))),r(`div`,{class:`${e}-date-panel__divider`}),r(`div`,{class:`${e}-date-panel-dates`},this.endDateArray.map((t,n)=>{let i=this.mergedIsDateDisabled(t.ts);return r(`div`,{"data-n-date":!0,key:n,class:[`${e}-date-panel-date`,{[`${e}-date-panel-date--excluded`]:!t.inCurrentMonth,[`${e}-date-panel-date--current`]:t.isCurrentDate,[`${e}-date-panel-date--selected`]:t.selected,[`${e}-date-panel-date--covered`]:t.inSpan,[`${e}-date-panel-date--start`]:t.startOfSpan,[`${e}-date-panel-date--end`]:t.endOfSpan,[`${e}-date-panel-date--disabled`]:i}],onClick:i?void 0:()=>{this.handleDateClick(t)},onMouseenter:i?void 0:()=>{this.handleDateMouseEnter(t)}},r(`div`,{class:`${e}-date-panel-date__trigger`}),t.dateObject.date,t.isCurrentDate?r(`div`,{class:`${e}-date-panel-date__sup`}):null)}))),this.datePickerSlots.footer?r(`div`,{class:`${e}-date-panel-footer`},this.datePickerSlots.footer()):null,this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(M,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(o.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(o.confirm,{onConfirm:this.handleConfirmClick,disabled:this.isRangeInvalid||this.isSelecting,text:this.locale.confirm},()=>[r(N,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid||this.isSelecting,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}}),Yi=h({name:`MonthRangePanel`,props:Object.assign(Object.assign({},Nr),{type:{type:String,required:!0}}),setup(e){let t=Pr(e,e.type),{dateLocaleRef:n}=de(`DatePicker`);return s(()=>{t.justifyColumnsScrollState()}),Object.assign(Object.assign({},t),{renderItem:(e,i,a,o)=>{let{handleColItemClick:s}=t;return r(`div`,{"data-n-date":!0,key:i,class:[`${a}-date-panel-month-calendar__picker-col-item`,e.isCurrent&&`${a}-date-panel-month-calendar__picker-col-item--current`,e.selected&&`${a}-date-panel-month-calendar__picker-col-item--selected`,!1],onClick:()=>{s(e,o)}},e.type===`month`?lr(e.dateObject.month,e.monthFormat,n.value.locale):e.type===`quarter`?dr(e.dateObject.quarter,e.quarterFormat,n.value.locale):ur(e.dateObject.year,e.yearFormat,n.value.locale))}})},render(){let{mergedClsPrefix:e,mergedTheme:t,shortcuts:n,type:i,renderItem:a,onRender:o}=this;return o?.(),r(`div`,{ref:`selfRef`,tabindex:0,class:[`${e}-date-panel`,`${e}-date-panel--daterange`,!this.panel&&`${e}-date-panel--shadow`,this.themeClass],onKeydown:this.handlePanelKeyDown,onFocus:this.handlePanelFocus},r(`div`,{ref:`startDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--start`},r(`div`,{class:`${e}-date-panel-month-calendar`},r(D,{ref:`startYearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:()=>this.virtualListContainer(`start`),content:()=>this.virtualListContent(`start`),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(se,{ref:`startYearVlRef`,items:this.startYearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleStartYearVlScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e,`start`)})}),i===`monthrange`||i===`quarterrange`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(D,{ref:`startMonthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(i===`monthrange`?this.startMonthArray:this.startQuarterArray).map((t,n)=>a(t,n,e,`start`)),i===`monthrange`&&r(`div`,{class:`${e}-date-panel-month-calendar__padding`})]})):null)),r(`div`,{class:`${e}-date-panel__vertical-divider`}),r(`div`,{ref:`endDatesElRef`,class:`${e}-date-panel-calendar ${e}-date-panel-calendar--end`},r(`div`,{class:`${e}-date-panel-month-calendar`},r(D,{ref:`endYearScrollbarRef`,class:`${e}-date-panel-month-calendar__picker-col`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:()=>this.virtualListContainer(`end`),content:()=>this.virtualListContent(`end`),horizontalRailStyle:{zIndex:1},verticalRailStyle:{zIndex:1}},{default:()=>r(se,{ref:`endYearVlRef`,items:this.endYearArray,itemSize:40,showScrollbar:!1,keyField:`ts`,onScroll:this.handleEndYearVlScroll,paddingBottom:4},{default:({item:t,index:n})=>a(t,n,e,`end`)})}),i===`monthrange`||i===`quarterrange`?r(`div`,{class:`${e}-date-panel-month-calendar__picker-col`},r(D,{ref:`endMonthScrollbarRef`,theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar},{default:()=>[(i===`monthrange`?this.endMonthArray:this.endQuarterArray).map((t,n)=>a(t,n,e,`end`)),i===`monthrange`&&r(`div`,{class:`${e}-date-panel-month-calendar__padding`})]})):null)),me(this.datePickerSlots.footer,t=>t?r(`div`,{class:`${e}-date-panel-footer`},t):null),this.actions?.length||n?r(`div`,{class:`${e}-date-panel-actions`},r(`div`,{class:`${e}-date-panel-actions__prefix`},n&&Object.keys(n).map(e=>{let t=n[e];return Array.isArray(t)||typeof t==`function`?r(M,{size:`tiny`,onMouseenter:()=>{this.handleRangeShortcutMouseenter(t)},onClick:()=>{this.handleRangeShortcutClick(t)},onMouseleave:()=>{this.handleShortcutMouseleave()}},{default:()=>e}):null})),r(`div`,{class:`${e}-date-panel-actions__suffix`},this.actions?.includes(`clear`)?P(this.datePickerSlots.clear,{onClear:this.handleClearClick,text:this.locale.clear},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,onClick:this.handleClearClick},{default:()=>this.locale.clear})]):null,this.actions?.includes(`confirm`)?P(this.datePickerSlots.confirm,{disabled:this.isRangeInvalid,onConfirm:this.handleConfirmClick,text:this.locale.confirm},()=>[r(M,{theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,size:`tiny`,type:`primary`,disabled:this.isRangeInvalid,onClick:this.handleConfirmClick},{default:()=>this.locale.confirm})]):null)):null,r(E,{onFocus:this.handleFocusDetectorFocus}))}}),Xi=Object.assign(Object.assign({},_.props),{to:w.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,fastYearSelect:Boolean,fastMonthSelect:Boolean,updateValueOnClose:Boolean,calendarDayFormat:String,calendarHeaderYearFormat:String,calendarHeaderMonthFormat:String,calendarHeaderMonthYearSeparator:{type:String,default:` `},calendarHeaderMonthBeforeYear:{type:Boolean,default:void 0},defaultValue:[Number,Array],defaultFormattedValue:[String,Array],defaultTime:[Number,String,Array,Function],disabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom-start`},value:[Number,Array],formattedValue:[String,Array],size:String,type:{type:String,default:`date`},valueFormat:String,separator:String,placeholder:String,startPlaceholder:String,endPlaceholder:String,format:String,dateFormat:String,timePickerFormat:String,actions:Array,shortcuts:Object,isDateDisabled:Function,isTimeDisabled:Function,show:{type:Boolean,default:void 0},panel:Boolean,ranges:Object,firstDayOfWeek:Number,inputReadonly:Boolean,closeOnSelect:Boolean,status:String,timePickerProps:[Object,Array],onClear:Function,onConfirm:Function,defaultCalendarStartTime:Number,defaultCalendarEndTime:Number,bindCalendarMonths:Boolean,monthFormat:{type:String,default:`M`},yearFormat:{type:String,default:`y`},quarterFormat:{type:String,default:`'Q'Q`},yearRange:{type:Array,default:()=>[1901,2100]},"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:formattedValue":[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onNextMonth:Function,onPrevMonth:Function,onNextYear:Function,onPrevYear:Function,onChange:[Function,Array]}),Zi=b([g(`date-picker`,` + position: relative; + z-index: auto; + `,[g(`date-picker-icon`,` + color: var(--n-icon-color-override); + transition: color .3s var(--n-bezier); + `),g(`icon`,` + color: var(--n-icon-color-override); + transition: color .3s var(--n-bezier); + `),d(`disabled`,[g(`date-picker-icon`,` + color: var(--n-icon-color-disabled-override); + `),g(`icon`,` + color: var(--n-icon-color-disabled-override); + `)])]),g(`date-panel`,` + width: fit-content; + outline: none; + margin: 4px 0; + display: grid; + grid-template-columns: 0fr; + border-radius: var(--n-panel-border-radius); + background-color: var(--n-panel-color); + color: var(--n-panel-text-color); + user-select: none; + `,[j(),d(`shadow`,` + box-shadow: var(--n-panel-box-shadow); + `),g(`date-panel-calendar`,{padding:`var(--n-calendar-left-padding)`,display:`grid`,gridTemplateColumns:`1fr`,gridArea:`left-calendar`},[d(`end`,{padding:`var(--n-calendar-right-padding)`,gridArea:`right-calendar`})]),g(`date-panel-month-calendar`,{display:`flex`,gridArea:`left-calendar`},[m(`picker-col`,` + min-width: var(--n-scroll-item-width); + height: calc(var(--n-scroll-item-height) * 6); + user-select: none; + -webkit-user-select: none; + `,[b(`&:first-child`,` + min-width: calc(var(--n-scroll-item-width) + 4px); + `,[m(`picker-col-item`,[b(`&::before`,`left: 4px;`)])]),m(`padding`,` + height: calc(var(--n-scroll-item-height) * 5) + `)]),m(`picker-col-item`,` + z-index: 0; + cursor: pointer; + height: var(--n-scroll-item-height); + box-sizing: border-box; + padding-top: 4px; + display: flex; + align-items: center; + justify-content: center; + position: relative; + transition: + color .3s var(--n-bezier), + background-color .3s var(--n-bezier); + background: #0000; + color: var(--n-item-text-color); + `,[b(`&::before`,` + z-index: -1; + content: ""; + position: absolute; + left: 0; + right: 4px; + top: 4px; + bottom: 0; + border-radius: var(--n-scroll-item-border-radius); + transition: + background-color .3s var(--n-bezier); + `),ne(`disabled`,[b(`&:hover::before`,` + background-color: var(--n-item-color-hover); + `),d(`selected`,` + color: var(--n-item-color-active); + `,[b(`&::before`,`background-color: var(--n-item-color-hover);`)])]),d(`disabled`,` + color: var(--n-item-text-color-disabled); + cursor: not-allowed; + `,[d(`selected`,[b(`&::before`,` + background-color: var(--n-item-color-disabled); + `)])])])]),d(`date`,{gridTemplateAreas:` + "left-calendar" + "footer" + "action" + `}),d(`week`,{gridTemplateAreas:` + "left-calendar" + "footer" + "action" + `}),d(`daterange`,{gridTemplateAreas:` + "left-calendar divider right-calendar" + "footer footer footer" + "action action action" + `}),d(`datetime`,{gridTemplateAreas:` + "header" + "left-calendar" + "footer" + "action" + `}),d(`datetimerange`,{gridTemplateAreas:` + "header header header" + "left-calendar divider right-calendar" + "footer footer footer" + "action action action" + `}),d(`month`,{gridTemplateAreas:` + "left-calendar" + "footer" + "action" + `}),g(`date-panel-footer`,{gridArea:`footer`}),g(`date-panel-actions`,{gridArea:`action`}),g(`date-panel-header`,{gridArea:`header`}),g(`date-panel-header`,` + box-sizing: border-box; + width: 100%; + align-items: center; + padding: var(--n-panel-header-padding); + display: flex; + justify-content: space-between; + border-bottom: 1px solid var(--n-panel-header-divider-color); + `,[b(`>`,[b(`*:not(:last-child)`,{marginRight:`10px`}),b(`*`,{flex:1,width:0}),g(`time-picker`,{zIndex:1})])]),g(`date-panel-month`,` + box-sizing: border-box; + display: grid; + grid-template-columns: var(--n-calendar-title-grid-template-columns); + align-items: center; + justify-items: center; + padding: var(--n-calendar-title-padding); + height: var(--n-calendar-title-height); + `,[m(`prev, next, fast-prev, fast-next`,` + line-height: 0; + cursor: pointer; + width: var(--n-arrow-size); + height: var(--n-arrow-size); + color: var(--n-arrow-color); + `),m(`month-year`,` + user-select: none; + -webkit-user-select: none; + flex-grow: 1; + position: relative; + `,[m(`text`,` + font-size: var(--n-calendar-title-font-size); + line-height: var(--n-calendar-title-font-size); + font-weight: var(--n-calendar-title-font-weight); + padding: 6px 8px; + text-align: center; + color: var(--n-calendar-title-text-color); + cursor: pointer; + transition: background-color .3s var(--n-bezier); + border-radius: var(--n-panel-border-radius); + `,[d(`active`,` + background-color: var(--n-calendar-title-color-hover); + `),b(`&:hover`,` + background-color: var(--n-calendar-title-color-hover); + `)])])]),g(`date-panel-weekdays`,` + display: grid; + margin: auto; + grid-template-columns: repeat(7, var(--n-item-cell-width)); + grid-template-rows: repeat(1, var(--n-item-cell-height)); + align-items: center; + justify-items: center; + margin-bottom: 4px; + border-bottom: 1px solid var(--n-calendar-days-divider-color); + `,[m(`day`,` + white-space: nowrap; + user-select: none; + -webkit-user-select: none; + line-height: 15px; + width: var(--n-item-size); + text-align: center; + font-size: var(--n-calendar-days-font-size); + color: var(--n-item-text-color); + display: flex; + align-items: center; + justify-content: center; + `)]),g(`date-panel-dates`,` + margin: auto; + display: grid; + grid-template-columns: repeat(7, var(--n-item-cell-width)); + grid-template-rows: repeat(6, var(--n-item-cell-height)); + align-items: center; + justify-items: center; + flex-wrap: wrap; + `,[g(`date-panel-date`,` + user-select: none; + -webkit-user-select: none; + position: relative; + width: var(--n-item-size); + height: var(--n-item-size); + line-height: var(--n-item-size); + text-align: center; + font-size: var(--n-item-font-size); + border-radius: var(--n-item-border-radius); + z-index: 0; + cursor: pointer; + transition: + background-color .2s var(--n-bezier), + color .2s var(--n-bezier); + `,[m(`trigger`,` + position: absolute; + left: calc(var(--n-item-size) / 2 - var(--n-item-cell-width) / 2); + top: calc(var(--n-item-size) / 2 - var(--n-item-cell-height) / 2); + width: var(--n-item-cell-width); + height: var(--n-item-cell-height); + `),d(`current`,[m(`sup`,` + position: absolute; + top: 2px; + right: 2px; + content: ""; + height: 4px; + width: 4px; + border-radius: 2px; + background-color: var(--n-item-color-active); + transition: + background-color .2s var(--n-bezier); + `)]),b(`&::after`,` + content: ""; + z-index: -1; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + border-radius: inherit; + transition: background-color .3s var(--n-bezier); + `),d(`covered, start, end`,[ne(`excluded`,[b(`&::before`,` + content: ""; + z-index: -2; + position: absolute; + left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); + right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); + top: 0; + bottom: 0; + background-color: var(--n-item-color-included); + `),b(`&:nth-child(7n + 1)::before`,{borderTopLeftRadius:`var(--n-item-border-radius)`,borderBottomLeftRadius:`var(--n-item-border-radius)`}),b(`&:nth-child(7n + 7)::before`,{borderTopRightRadius:`var(--n-item-border-radius)`,borderBottomRightRadius:`var(--n-item-border-radius)`})])]),d(`selected`,{color:`var(--n-item-text-color-active)`},[b(`&::after`,{backgroundColor:`var(--n-item-color-active)`}),d(`start`,[b(`&::before`,{left:`50%`})]),d(`end`,[b(`&::before`,{right:`50%`})]),m(`sup`,{backgroundColor:`var(--n-panel-color)`})]),d(`excluded`,{color:`var(--n-item-text-color-disabled)`},[d(`selected`,[b(`&::after`,{backgroundColor:`var(--n-item-color-disabled)`})])]),d(`disabled`,{cursor:`not-allowed`,color:`var(--n-item-text-color-disabled)`},[d(`covered`,[b(`&::before`,{backgroundColor:`var(--n-item-color-disabled)`})]),d(`selected`,[b(`&::before`,{backgroundColor:`var(--n-item-color-disabled)`}),b(`&::after`,{backgroundColor:`var(--n-item-color-disabled)`})])]),d(`week-hovered`,[b(`&::before`,` + background-color: var(--n-item-color-included); + `),b(`&:nth-child(7n + 1)::before`,` + border-top-left-radius: var(--n-item-border-radius); + border-bottom-left-radius: var(--n-item-border-radius); + `),b(`&:nth-child(7n + 7)::before`,` + border-top-right-radius: var(--n-item-border-radius); + border-bottom-right-radius: var(--n-item-border-radius); + `)]),d(`week-selected`,` + color: var(--n-item-text-color-active) + `,[b(`&::before`,` + background-color: var(--n-item-color-active); + `),b(`&:nth-child(7n + 1)::before`,` + border-top-left-radius: var(--n-item-border-radius); + border-bottom-left-radius: var(--n-item-border-radius); + `),b(`&:nth-child(7n + 7)::before`,` + border-top-right-radius: var(--n-item-border-radius); + border-bottom-right-radius: var(--n-item-border-radius); + `)])])]),ne(`week`,[g(`date-panel-dates`,[g(`date-panel-date`,[ne(`disabled`,[ne(`selected`,[b(`&:hover`,` + background-color: var(--n-item-color-hover); + `)])])])])]),d(`week`,[g(`date-panel-dates`,[g(`date-panel-date`,[b(`&::before`,` + content: ""; + z-index: -2; + position: absolute; + left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); + right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2); + top: 0; + bottom: 0; + transition: background-color .3s var(--n-bezier); + `)])])]),m(`vertical-divider`,` + grid-area: divider; + height: 100%; + width: 1px; + background-color: var(--n-calendar-divider-color); + `),g(`date-panel-footer`,` + border-top: 1px solid var(--n-panel-action-divider-color); + padding: var(--n-panel-extra-footer-padding); + `),g(`date-panel-actions`,` + flex: 1; + padding: var(--n-panel-action-padding); + display: flex; + align-items: center; + justify-content: space-between; + border-top: 1px solid var(--n-panel-action-divider-color); + `,[m(`prefix, suffix`,` + display: flex; + margin-bottom: -8px; + `),m(`suffix`,` + align-self: flex-end; + `),m(`prefix`,` + flex-wrap: wrap; + `),g(`button`,` + margin-bottom: 8px; + `,[b(`&:not(:last-child)`,` + margin-right: 8px; + `)])])]),b(`[data-n-date].transition-disabled`,{transition:`none !important`},[b(`&::before, &::after`,{transition:`none !important`})])]);function Qi(e,t){let n=f(()=>{let{isTimeDisabled:n}=e,{value:r}=t;if(!(r===null||Array.isArray(r)))return n?.(r)}),r=f(()=>n.value?.isHourDisabled),i=f(()=>n.value?.isMinuteDisabled),a=f(()=>n.value?.isSecondDisabled),o=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||Array.isArray(i)||![`date`,`datetime`].includes(n)||!r?!1:r(i,{type:`input`})}),s=f(()=>{let{type:n}=e,{value:o}=t;if(o===null||n===`datetime`||Array.isArray(o))return!1;let s=new Date(o),c=s.getHours(),l=s.getMinutes(),u=s.getMinutes();return(r.value?r.value(c):!1)||(i.value?i.value(l,c):!1)||(a.value?a.value(u,l,c):!1)}),c=f(()=>o.value||s.value);return{isValueInvalidRef:f(()=>{let{type:t}=e;return t===`date`?o.value:t===`datetime`?c.value:!1}),isDateInvalidRef:o,isTimeInvalidRef:s,isDateTimeInvalidRef:c,isHourDisabledRef:r,isMinuteDisabledRef:i,isSecondDisabledRef:a}}function $i(e,t){let n=f(()=>{let{isTimeDisabled:n}=e,{value:r}=t;return!Array.isArray(r)||!n?[void 0,void 0]:[n?.(r[0],`start`,r),n?.(r[1],`end`,r)]}),r={isStartHourDisabledRef:f(()=>n.value[0]?.isHourDisabled),isEndHourDisabledRef:f(()=>n.value[1]?.isHourDisabled),isStartMinuteDisabledRef:f(()=>n.value[0]?.isMinuteDisabled),isEndMinuteDisabledRef:f(()=>n.value[1]?.isMinuteDisabled),isStartSecondDisabledRef:f(()=>n.value[0]?.isSecondDisabled),isEndSecondDisabledRef:f(()=>n.value[1]?.isSecondDisabled)},i=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||!Array.isArray(i)||![`daterange`,`datetimerange`].includes(n)||!r?!1:r(i[0],`start`,i)}),a=f(()=>{let{type:n,isDateDisabled:r}=e,{value:i}=t;return i===null||!Array.isArray(i)||![`daterange`,`datetimerange`].includes(n)||!r?!1:r(i[1],`end`,i)}),o=f(()=>{let{type:n}=e,{value:i}=t;if(i===null||!Array.isArray(i)||n!==`datetimerange`)return!1;let a=Pt(i[0]),o=Lt(i[0]),s=Rt(i[0]),{isStartHourDisabledRef:c,isStartMinuteDisabledRef:l,isStartSecondDisabledRef:u}=r;return(c.value?c.value(a):!1)||(l.value?l.value(o,a):!1)||(u.value?u.value(s,o,a):!1)}),s=f(()=>{let{type:n}=e,{value:i}=t;if(i===null||!Array.isArray(i)||n!==`datetimerange`)return!1;let a=Pt(i[1]),o=Lt(i[1]),s=Rt(i[1]),{isEndHourDisabledRef:c,isEndMinuteDisabledRef:l,isEndSecondDisabledRef:u}=r;return(c.value?c.value(a):!1)||(l.value?l.value(o,a):!1)||(u.value?u.value(s,o,a):!1)}),c=f(()=>i.value||o.value),l=f(()=>a.value||s.value),u=f(()=>c.value||l.value);return Object.assign(Object.assign({},r),{isStartDateInvalidRef:i,isEndDateInvalidRef:a,isStartTimeInvalidRef:o,isEndTimeInvalidRef:s,isStartValueInvalidRef:c,isEndValueInvalidRef:l,isRangeInvalidRef:u})}var ea=h({name:`DatePicker`,props:Xi,slots:Object,setup(e,{slots:n}){let{localeRef:r,dateLocaleRef:i}=de(`DatePicker`),{mergedComponentPropsRef:a,mergedClsPrefixRef:s,mergedBorderedRef:c,namespaceRef:l,inlineThemeDisabled:u}=o(e),d=he(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:a?.value?.DatePicker?.size||`medium`}}),{mergedSizeRef:m,mergedDisabledRef:h,mergedStatusRef:ee}=d,g=p(null),ne=p(null),v=p(null),b=p(!1),S=fe(x(e,`show`),b),C=f(()=>({locale:i.value.locale,useAdditionalWeekYearTokens:!0})),T=f(()=>{let{format:t}=e;if(t)return t;switch(e.type){case`date`:case`daterange`:return r.value.dateFormat;case`datetime`:case`datetimerange`:return r.value.dateTimeFormat;case`year`:case`yearrange`:return r.value.yearTypeFormat;case`month`:case`monthrange`:return r.value.monthTypeFormat;case`quarter`:case`quarterrange`:return r.value.quarterFormat;case`week`:return r.value.weekFormat}}),E=f(()=>e.valueFormat??T.value);function se(e){if(e===null)return null;let{value:t}=E,{value:n}=C;return Array.isArray(e)?[br(e[0],t,new Date,n).getTime(),br(e[1],t,new Date,n).getTime()]:br(e,t,new Date,n).getTime()}let{defaultFormattedValue:ce,defaultValue:D}=e,ue=p((ce===void 0?D:se(ce))??null),O=fe(f(()=>{let{formattedValue:t}=e;return t===void 0?e.value:se(t)}),ue),k=p(null);ae(()=>{k.value=O.value});let A=p(``),j=p(``),M=p(``),N=_(`DatePicker`,`-date-picker`,Zi,be,e,s),P=f(()=>a?.value?.DatePicker?.timePickerSize||`small`),I=f(()=>[`daterange`,`datetimerange`,`monthrange`,`quarterrange`,`yearrange`].includes(e.type)),me=f(()=>{let{placeholder:t}=e;if(t===void 0){let{type:t}=e;switch(t){case`date`:return r.value.datePlaceholder;case`datetime`:return r.value.datetimePlaceholder;case`month`:return r.value.monthPlaceholder;case`year`:return r.value.yearPlaceholder;case`quarter`:return r.value.quarterPlaceholder;case`week`:return r.value.weekPlaceholder;default:return``}}else return t}),ge=f(()=>e.startPlaceholder===void 0?e.type===`daterange`?r.value.startDatePlaceholder:e.type===`datetimerange`?r.value.startDatetimePlaceholder:e.type===`monthrange`?r.value.startMonthPlaceholder:``:e.startPlaceholder),_e=f(()=>e.endPlaceholder===void 0?e.type===`daterange`?r.value.endDatePlaceholder:e.type===`datetimerange`?r.value.endDatetimePlaceholder:e.type===`monthrange`?r.value.endMonthPlaceholder:``:e.endPlaceholder),ve=f(()=>{let{actions:t,type:n,clearable:r}=e;if(t===null)return[];if(t!==void 0)return t;let i=r?[`clear`]:[];switch(n){case`date`:case`week`:return i.push(`now`),i;case`datetime`:return i.push(`now`,`confirm`),i;case`daterange`:return i.push(`confirm`),i;case`datetimerange`:return i.push(`confirm`),i;case`month`:return i.push(`now`,`confirm`),i;case`year`:return i.push(`now`),i;case`quarter`:return i.push(`now`,`confirm`),i;case`monthrange`:case`yearrange`:case`quarterrange`:return i.push(`confirm`),i;default:re(`date-picker`,"The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.");break}});function ye(e){if(e===null)return null;if(Array.isArray(e)){let{value:t}=E,{value:n}=C;return[W(e[0],t,n),W(e[1],t,C.value)]}else return W(e,E.value,C.value)}function Se(e){k.value=e}function Ce(t,n){let{"onUpdate:formattedValue":r,onUpdateFormattedValue:i}=e;r&&F(r,t,n),i&&F(i,t,n)}function we(t,n){let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=e,{nTriggerFormChange:o,nTriggerFormInput:s}=d,c=ye(t);n.doConfirm&&Ee(t,c),i&&F(i,t,c),r&&F(r,t,c),a&&F(a,t,c),ue.value=t,Ce(c,t),o(),s()}function Te(){let{onClear:t}=e;t?.()}function Ee(t,n){let{onConfirm:r}=e;r&&r(t,n)}function De(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=d;n&&F(n,t),r()}function Oe(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=d;n&&F(n,t),r()}function ke(t){let{"onUpdate:show":n,onUpdateShow:r}=e;n&&F(n,t),r&&F(r,t),b.value=t}function L(e){e.key===`Escape`&&S.value&&(pe(e),Ge({returnFocus:!0}))}function Ae(e){e.key===`Escape`&&S.value&&pe(e)}function R(){var e;ke(!1),(e=v.value)==null||e.deactivate(),Te()}function z(){var e;(e=v.value)==null||e.deactivate(),Te()}function je(){Ge({returnFocus:!0})}function Me(e){S.value&&!ne.value?.contains(le(e))&&Ge({returnFocus:!1})}function B(e){Ge({returnFocus:!0,disableUpdateOnClose:e})}function Ne(e,t){t?we(e,{doConfirm:!1}):Se(e)}function Pe(){let e=k.value;we(Array.isArray(e)?[e[0],e[1]]:e,{doConfirm:!0})}function Fe(){let{value:e}=k;I.value?(Array.isArray(e)||e===null)&&Le(e):Array.isArray(e)||Ie(e)}function Ie(e){e===null?A.value=``:A.value=W(e,T.value,C.value)}function Le(e){if(e===null)j.value=``,M.value=``;else{let t=C.value;j.value=W(e[0],T.value,t),M.value=W(e[1],T.value,t)}}function Re(){S.value||We()}function ze(e){g.value?.$el.contains(e.relatedTarget)||(Oe(e),Fe(),Ge({returnFocus:!1}))}function Be(){h.value||(Fe(),Ge({returnFocus:!1}))}function Ve(e){if(e===``){we(null,{doConfirm:!1}),k.value=null,A.value=``;return}let t=br(e,T.value,new Date,C.value);Qe(t)?(we(K(t),{doConfirm:!1}),Fe()):A.value=e}function He(e,{source:t}){if(e[0]===``&&e[1]===``){we(null,{doConfirm:!1}),k.value=null,j.value=``,M.value=``;return}let[n,r]=e,i=br(n,T.value,new Date,C.value),a=br(r,T.value,new Date,C.value);if(Qe(i)&&Qe(a)){let e=K(i),n=K(a);a{Fe()}),Fe(),te(S,e=>{e||(k.value=O.value)});let Ke=Qi(e,k),qe=$i(e,k);ie(Tr,Object.assign(Object.assign(Object.assign({mergedClsPrefixRef:s,mergedThemeRef:N,timePickerSizeRef:P,localeRef:r,dateLocaleRef:i,firstDayOfWeekRef:x(e,`firstDayOfWeek`),isDateDisabledRef:x(e,`isDateDisabled`),rangesRef:x(e,`ranges`),timePickerPropsRef:x(e,`timePickerProps`),closeOnSelectRef:x(e,`closeOnSelect`),updateValueOnCloseRef:x(e,`updateValueOnClose`),monthFormatRef:x(e,`monthFormat`),yearFormatRef:x(e,`yearFormat`),quarterFormatRef:x(e,`quarterFormat`),yearRangeRef:x(e,`yearRange`)},Ke),qe),{datePickerSlots:n}));let Je={focus:()=>{var e;(e=v.value)==null||e.focus()},blur:()=>{var e;(e=v.value)==null||e.blur()}},Ye=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{iconColor:t,iconColorDisabled:n}}=N.value;return{"--n-bezier":e,"--n-icon-color-override":t,"--n-icon-color-disabled-override":n}}),H=u?t(`date-picker-trigger`,void 0,Ye,e):void 0,Xe=f(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{calendarTitleFontSize:r,calendarDaysFontSize:i,itemFontSize:a,itemTextColor:o,itemColorDisabled:s,itemColorIncluded:c,itemColorHover:l,itemColorActive:u,itemBorderRadius:d,itemTextColorDisabled:f,itemTextColorActive:p,panelColor:m,panelTextColor:h,arrowColor:ee,calendarTitleTextColor:te,panelActionDividerColor:g,panelHeaderDividerColor:ne,calendarDaysDividerColor:_,panelBoxShadow:v,panelBorderRadius:re,calendarTitleFontWeight:ie,panelExtraFooterPadding:ae,panelActionPadding:b,itemSize:x,itemCellWidth:S,itemCellHeight:C,scrollItemWidth:w,scrollItemHeight:T,calendarTitlePadding:E,calendarTitleHeight:oe,calendarDaysHeight:se,calendarDaysTextColor:ce,arrowSize:le,panelHeaderPadding:D,calendarDividerColor:ue,calendarTitleGridTempateColumns:O,iconColor:k,iconColorDisabled:de,scrollItemBorderRadius:A,calendarTitleColorHover:j,[y(`calendarLeftPadding`,t)]:fe,[y(`calendarRightPadding`,t)]:M}}=N.value;return{"--n-bezier":n,"--n-panel-border-radius":re,"--n-panel-color":m,"--n-panel-box-shadow":v,"--n-panel-text-color":h,"--n-panel-header-padding":D,"--n-panel-header-divider-color":ne,"--n-calendar-left-padding":fe,"--n-calendar-right-padding":M,"--n-calendar-title-color-hover":j,"--n-calendar-title-height":oe,"--n-calendar-title-padding":E,"--n-calendar-title-font-size":r,"--n-calendar-title-font-weight":ie,"--n-calendar-title-text-color":te,"--n-calendar-title-grid-template-columns":O,"--n-calendar-days-height":se,"--n-calendar-days-divider-color":_,"--n-calendar-days-font-size":i,"--n-calendar-days-text-color":ce,"--n-calendar-divider-color":ue,"--n-panel-action-padding":b,"--n-panel-extra-footer-padding":ae,"--n-panel-action-divider-color":g,"--n-item-font-size":a,"--n-item-border-radius":d,"--n-item-size":x,"--n-item-cell-width":S,"--n-item-cell-height":C,"--n-item-text-color":o,"--n-item-color-included":c,"--n-item-color-disabled":s,"--n-item-color-hover":l,"--n-item-color-active":u,"--n-item-text-color-disabled":f,"--n-item-text-color-active":p,"--n-scroll-item-width":w,"--n-scroll-item-height":T,"--n-scroll-item-border-radius":A,"--n-arrow-size":le,"--n-arrow-color":ee,"--n-icon-color":k,"--n-icon-color-disabled":de}}),Ze=u?t(`date-picker`,f(()=>e.type),Xe,e):void 0;return Object.assign(Object.assign({},Je),{mergedStatus:ee,mergedClsPrefix:s,mergedBordered:c,namespace:l,uncontrolledValue:ue,pendingValue:k,panelInstRef:g,triggerElRef:ne,inputInstRef:v,isMounted:xe(),displayTime:A,displayStartTime:j,displayEndTime:M,mergedShow:S,adjustedTo:w(e),isRange:I,localizedStartPlaceholder:ge,localizedEndPlaceholder:_e,mergedSize:m,mergedDisabled:h,localizedPlacehoder:me,isValueInvalid:Ke.isValueInvalidRef,isStartValueInvalid:qe.isStartValueInvalidRef,isEndValueInvalid:qe.isEndValueInvalidRef,handleInputKeydown:Ae,handleClickOutside:Me,handleKeydown:L,handleClear:R,handlePanelClear:z,handleTriggerClick:V,handleInputActivate:Re,handleInputDeactivate:Be,handleInputFocus:Ue,handleInputBlur:ze,handlePanelTabOut:je,handlePanelClose:B,handleRangeUpdateValue:He,handleSingleUpdateValue:Ve,handlePanelUpdateValue:Ne,handlePanelConfirm:Pe,mergedTheme:N,actions:ve,triggerCssVars:u?void 0:Ye,triggerThemeClass:H?.themeClass,triggerOnRender:H?.onRender,cssVars:u?void 0:Xe,themeClass:Ze?.themeClass,onRender:Ze?.onRender,onNextMonth:e.onNextMonth,onPrevMonth:e.onPrevMonth,onNextYear:e.onNextYear,onPrevYear:e.onPrevYear})},render(){let{clearable:e,triggerOnRender:t,mergedClsPrefix:n,$slots:i}=this,a={onUpdateValue:this.handlePanelUpdateValue,onTabOut:this.handlePanelTabOut,onClose:this.handlePanelClose,onClear:this.handlePanelClear,onKeydown:this.handleKeydown,onConfirm:this.handlePanelConfirm,ref:`panelInstRef`,value:this.pendingValue,active:this.mergedShow,actions:this.actions,shortcuts:this.shortcuts,style:this.cssVars,defaultTime:this.defaultTime,themeClass:this.themeClass,panel:this.panel,inputReadonly:this.inputReadonly||this.mergedDisabled,onRender:this.onRender,onNextMonth:this.onNextMonth,onPrevMonth:this.onPrevMonth,onNextYear:this.onNextYear,onPrevYear:this.onPrevYear,timePickerFormat:this.timePickerFormat,dateFormat:this.dateFormat,fastYearSelect:this.fastYearSelect,fastMonthSelect:this.fastMonthSelect,calendarDayFormat:this.calendarDayFormat,calendarHeaderYearFormat:this.calendarHeaderYearFormat,calendarHeaderMonthFormat:this.calendarHeaderMonthFormat,calendarHeaderMonthYearSeparator:this.calendarHeaderMonthYearSeparator,calendarHeaderMonthBeforeYear:this.calendarHeaderMonthBeforeYear},o=()=>{let{type:e}=this;return e===`datetime`?r(qi,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime}),i):e===`daterange`?r(Fr,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),i):e===`datetimerange`?r(Ji,Object.assign({},a,{defaultCalendarStartTime:this.defaultCalendarStartTime,defaultCalendarEndTime:this.defaultCalendarEndTime,bindCalendarMonths:this.bindCalendarMonths}),i):e===`month`||e===`year`||e===`quarter`?r(Ar,Object.assign({},a,{type:e,key:e})):e===`monthrange`||e===`yearrange`||e===`quarterrange`?r(Yi,Object.assign({},a,{type:e})):r(Mr,Object.assign({},a,{type:e,defaultCalendarStartTime:this.defaultCalendarStartTime}),i)};if(this.panel)return o();t?.();let s={bordered:this.mergedBordered,size:this.mergedSize,passivelyActivated:!0,disabled:this.mergedDisabled,readonly:this.inputReadonly||this.mergedDisabled,clearable:e,onClear:this.handleClear,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown,onActivate:this.handleInputActivate,onDeactivate:this.handleInputDeactivate,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};return r(`div`,{ref:`triggerElRef`,class:[`${n}-date-picker`,this.mergedDisabled&&`${n}-date-picker--disabled`,this.isRange&&`${n}-date-picker--range`,this.triggerThemeClass],style:this.triggerCssVars,onKeydown:this.handleKeydown},r(S,null,{default:()=>[r(C,null,{default:()=>this.isRange?r(ge,Object.assign({ref:`inputInstRef`,status:this.mergedStatus,value:[this.displayStartTime,this.displayEndTime],placeholder:[this.localizedStartPlaceholder,this.localizedEndPlaceholder],textDecoration:[this.isStartValueInvalid?`line-through`:``,this.isEndValueInvalid?`line-through`:``],pair:!0,onUpdateValue:this.handleRangeUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},s),{separator:()=>this.separator===void 0?I(i.separator,()=>[r(_e,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>r(Ve,null)})]):this.separator,[e?`clear-icon-placeholder`:`suffix`]:()=>I(i[`date-icon`],()=>[r(_e,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>r(Ie,null)})])}):r(ge,Object.assign({ref:`inputInstRef`,status:this.mergedStatus,value:this.displayTime,placeholder:this.localizedPlacehoder,textDecoration:this.isValueInvalid&&!this.isRange?`line-through`:``,onUpdateValue:this.handleSingleUpdateValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,internalForceFocus:this.mergedShow,internalDeactivateOnEnter:!0},s),{[e?`clear-icon-placeholder`:`suffix`]:()=>r(_e,{clsPrefix:n,class:`${n}-date-picker-icon`},{default:()=>I(i[`date-icon`],()=>[r(Ie,null)])})})}),r(T,{show:this.mergedShow,containerClass:this.namespace,to:this.adjustedTo,teleportDisabled:this.adjustedTo===w.tdkey,placement:this.placement},{default:()=>r(ye,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>this.mergedShow?u(o(),[[A,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});export{Pe as n,ea as t}; \ No newline at end of file diff --git a/frontend/dist/assets/DocsPage-D65XguoR.js b/frontend/dist/assets/DocsPage-Bhdw6IT7.js similarity index 88% rename from frontend/dist/assets/DocsPage-D65XguoR.js rename to frontend/dist/assets/DocsPage-Bhdw6IT7.js index ebf1a20..debd1ce 100644 --- a/frontend/dist/assets/DocsPage-D65XguoR.js +++ b/frontend/dist/assets/DocsPage-Bhdw6IT7.js @@ -1 +1 @@ -import{Dt as e,Kt as t,Ot as n,Rn as r,St as i,Ut as a,a as o,bn as s,hn as c,in as l,kt as u,wt as d,xt as f}from"./client-Bz0sY7Lm.js";import{t as p}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as m}from"./Alert-CUBw4GSK.js";import{t as h}from"./Spin-g9SI3Frb.js";import{i as g}from"./index-6B3OmSLg.js";import{t as _}from"./HeaderText-CJTPL4m_.js";var v={class:`center-block-custom`},y={class:`width700 doc-page`},b={class:`doc-title`},x={key:0,class:`doc-loading`},S={key:2,class:`paper-block`},C={class:`paper`},w={class:`doc-text`},T={class:`docs-links`},E=p(u({__name:`DocsPage`,props:{kind:{}},setup(u){let p=u,E={terms:`Пользовательское соглашение`,privacy:`Политика конфиденциальности`,consent:`Согласие на обработку персональных данных`},D=c(``),O=c(!0),k=c(``);return a(async()=>{let e=g(),t={terms:()=>e.GetTerms({}),privacy:()=>e.GetPrivacy({}),consent:()=>e.GetConsent({})};try{let e=await t[p.kind]();D.value=e.text||``}catch(e){k.value=e instanceof Error?e.message:`Не удалось загрузить документ`}finally{O.value=!1}}),(a,c)=>(t(),d(`div`,v,[f(`div`,y,[f(`h1`,b,[n(_,null,{default:l(()=>[e(r(E[p.kind]),1)]),_:1})]),O.value?(t(),d(`div`,x,[n(s(h),{size:`large`})])):k.value?(t(),i(s(m),{key:1,type:`error`,"show-icon":!1,class:`doc-error`},{default:l(()=>[e(r(k.value),1)]),_:1})):(t(),d(`div`,S,[f(`div`,C,[f(`p`,w,r(D.value),1)]),c[0]||=f(`div`,{class:`paper-shadow paper-shadow-left`},null,-1),c[1]||=f(`div`,{class:`paper-shadow paper-shadow-right`},null,-1)])),f(`div`,T,[c[5]||=e(` Смотрите также: `,-1),n(s(o),{to:`/user-agreement`,class:`docs-link`},{default:l(()=>[...c[2]||=[e(`Пользовательское соглашение`,-1)]]),_:1}),c[6]||=e(` · `,-1),n(s(o),{to:`/privacy-policy`,class:`docs-link`},{default:l(()=>[...c[3]||=[e(`Политика конфиденциальности`,-1)]]),_:1}),c[7]||=e(` · `,-1),n(s(o),{to:`/consent`,class:`docs-link`},{default:l(()=>[...c[4]||=[e(`Согласие на обработку персональных данных`,-1)]]),_:1})])])]))}}),[[`__scopeId`,`data-v-a0534098`]]);export{E as t}; \ No newline at end of file +import{Dt as e,Kt as t,Ot as n,Rn as r,St as i,Ut as a,a as o,bn as s,hn as c,in as l,kt as u,wt as d,xt as f}from"./client-Bz0sY7Lm.js";import{t as p}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as m}from"./Alert-BoUmQeXf.js";import{t as h}from"./Spin-CYkXlOyb.js";import{i as g}from"./index-NE0dsiiJ.js";import{t as _}from"./HeaderText-DnXJEr19.js";var v={class:`center-block-custom`},y={class:`width700 doc-page`},b={class:`doc-title`},x={key:0,class:`doc-loading`},S={key:2,class:`paper-block`},C={class:`paper`},w={class:`doc-text`},T={class:`docs-links`},E=p(u({__name:`DocsPage`,props:{kind:{}},setup(u){let p=u,E={terms:`Пользовательское соглашение`,privacy:`Политика конфиденциальности`,consent:`Согласие на обработку персональных данных`},D=c(``),O=c(!0),k=c(``);return a(async()=>{let e=g(),t={terms:()=>e.GetTerms({}),privacy:()=>e.GetPrivacy({}),consent:()=>e.GetConsent({})};try{let e=await t[p.kind]();D.value=e.text||``}catch(e){k.value=e instanceof Error?e.message:`Не удалось загрузить документ`}finally{O.value=!1}}),(a,c)=>(t(),d(`div`,v,[f(`div`,y,[f(`h1`,b,[n(_,null,{default:l(()=>[e(r(E[p.kind]),1)]),_:1})]),O.value?(t(),d(`div`,x,[n(s(h),{size:`large`})])):k.value?(t(),i(s(m),{key:1,type:`error`,"show-icon":!1,class:`doc-error`},{default:l(()=>[e(r(k.value),1)]),_:1})):(t(),d(`div`,S,[f(`div`,C,[f(`p`,w,r(D.value),1)]),c[0]||=f(`div`,{class:`paper-shadow paper-shadow-left`},null,-1),c[1]||=f(`div`,{class:`paper-shadow paper-shadow-right`},null,-1)])),f(`div`,T,[c[5]||=e(` Смотрите также: `,-1),n(s(o),{to:`/user-agreement`,class:`docs-link`},{default:l(()=>[...c[2]||=[e(`Пользовательское соглашение`,-1)]]),_:1}),c[6]||=e(` · `,-1),n(s(o),{to:`/privacy-policy`,class:`docs-link`},{default:l(()=>[...c[3]||=[e(`Политика конфиденциальности`,-1)]]),_:1}),c[7]||=e(` · `,-1),n(s(o),{to:`/consent`,class:`docs-link`},{default:l(()=>[...c[4]||=[e(`Согласие на обработку персональных данных`,-1)]]),_:1})])])]))}}),[[`__scopeId`,`data-v-a0534098`]]);export{E as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Flex-BUYalFhW.js b/frontend/dist/assets/Flex-Dsa9FxiA.js similarity index 90% rename from frontend/dist/assets/Flex-BUYalFhW.js rename to frontend/dist/assets/Flex-Dsa9FxiA.js index 0957baa..e51fb7e 100644 --- a/frontend/dist/assets/Flex-BUYalFhW.js +++ b/frontend/dist/assets/Flex-Dsa9FxiA.js @@ -1 +1 @@ -import{Mt as e,U as t,bt as n,g as r,kt as i,p as a,st as o}from"./client-Bz0sY7Lm.js";import{a as s,i as c}from"./es-BhJOHfSF.js";import{t as l}from"./flatten-WgHPAFED.js";import{t as u}from"./get-slot-6kXJmSMP.js";import{m as d}from"./index-6B3OmSLg.js";function f(){return d}var p={name:`Flex`,self:f},m=i({name:`Flex`,props:Object.assign(Object.assign({},a.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:`medium`},wrap:{type:Boolean,default:!0}}),setup(e){let{mergedClsPrefixRef:i,mergedRtlRef:l}=t(e),u=a(`Flex`,`-flex`,void 0,p,e,i);return{rtlEnabled:r(`Flex`,l,i),mergedClsPrefix:i,margin:n(()=>{let{size:t}=e;if(Array.isArray(t))return{horizontal:t[0],vertical:t[1]};if(typeof t==`number`)return{horizontal:t,vertical:t};let{self:{[o(`gap`,t)]:n}}=u.value,{row:r,col:i}=s(n);return{horizontal:c(i),vertical:c(r)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:a,margin:o,wrap:s,mergedClsPrefix:c,rtlEnabled:d}=this,f=l(u(this),!1);return f.length?e(`div`,{role:`none`,class:[`${c}-flex`,d&&`${c}-flex--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:a,flexWrap:!s||t?`nowrap`:`wrap`,alignItems:r,gap:`${o.vertical}px ${o.horizontal}px`}},f):null}});export{m as t}; \ No newline at end of file +import{Mt as e,U as t,bt as n,g as r,kt as i,p as a,st as o}from"./client-Bz0sY7Lm.js";import{a as s,i as c}from"./es-Qklex053.js";import{t as l}from"./flatten-WgHPAFED.js";import{t as u}from"./get-slot-6kXJmSMP.js";import{m as d}from"./index-NE0dsiiJ.js";function f(){return d}var p={name:`Flex`,self:f},m=i({name:`Flex`,props:Object.assign(Object.assign({},a.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:`medium`},wrap:{type:Boolean,default:!0}}),setup(e){let{mergedClsPrefixRef:i,mergedRtlRef:l}=t(e),u=a(`Flex`,`-flex`,void 0,p,e,i);return{rtlEnabled:r(`Flex`,l,i),mergedClsPrefix:i,margin:n(()=>{let{size:t}=e;if(Array.isArray(t))return{horizontal:t[0],vertical:t[1]};if(typeof t==`number`)return{horizontal:t,vertical:t};let{self:{[o(`gap`,t)]:n}}=u.value,{row:r,col:i}=s(n);return{horizontal:c(i),vertical:c(r)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:a,margin:o,wrap:s,mergedClsPrefix:c,rtlEnabled:d}=this,f=l(u(this),!1);return f.length?e(`div`,{role:`none`,class:[`${c}-flex`,d&&`${c}-flex--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:a,flexWrap:!s||t?`nowrap`:`wrap`,alignItems:r,gap:`${o.vertical}px ${o.horizontal}px`}},f):null}});export{m as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Follower-BaR8jvSz.js b/frontend/dist/assets/Follower-BaR8jvSz.js new file mode 100644 index 0000000..21d4a46 --- /dev/null +++ b/frontend/dist/assets/Follower-BaR8jvSz.js @@ -0,0 +1 @@ +import{At as e,J as t,Mt as n,Pt as r,Rt as i,Ut as a,Vt as o,Y as s,an as c,hn as l,kt as u,nn as d,qt as f,ut as p,vn as m}from"./client-Bz0sY7Lm.js";import{d as h,u as g}from"./Card-BGJkYb2B.js";import{C as _,_ as v,f as y,g as b,h as x,p as S,v as C,x as w}from"./Suffix-BBRLYxYK.js";import{et as T,tt as E}from"./index-NE0dsiiJ.js";var D=[],O=new WeakMap;function k(){D.forEach(e=>e(...O.get(e))),D=[]}function A(e,...t){O.set(e,t),!D.includes(e)&&D.push(e)===1&&requestAnimationFrame(k)}var j=_?document?.fonts?.ready:void 0,M=!1;j===void 0?M=!0:j.then(()=>{M=!0});function N(e){if(M)return;let t=!1;a(()=>{M||j?.then(()=>{t||e()})}),o(()=>{t=!0})}var P=s(`n-internal-select-menu`),F=s(`n-internal-select-menu-body`),I=`__disabled__`;function L(e){let t=r(C,null),n=r(w,null),i=r(v,null),s=r(F,null),c=l();if(typeof document<`u`){c.value=document.fullscreenElement;let e=()=>{c.value=document.fullscreenElement};a(()=>{h(`fullscreenchange`,document,e)}),o(()=>{g(`fullscreenchange`,document,e)})}return E(()=>{let{to:r}=e;return r===void 0?t?.value?t.value.$el??t.value:n?.value?n.value:i?.value?i.value:s?.value?s.value:r??(c.value||`body`):r===!1?I:r===!0?c.value||`body`:r})}L.tdkey=I,L.propTo={type:[String,Object,Boolean],default:void 0};var R=null;function z(){if(R===null&&(R=document.getElementById(`v-binder-view-measurer`),R===null)){R=document.createElement(`div`),R.id=`v-binder-view-measurer`;let{style:e}=R;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(R)}return R.getBoundingClientRect()}function B(e,t){let n=z();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function V(e){let t=e.getBoundingClientRect(),n=z();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function H(e){return e.nodeType===9?null:e.parentNode}function U(e){if(e===null)return null;let t=H(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return U(t)}var W=u({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(t){f(`VBinder`,e()?.proxy);let n=r(`VBinder`,null),i=l(null),a=e=>{i.value=e,n&&t.syncTargetWithParent&&n.setTargetRef(e)},s=[],c=()=>{let e=i.value;for(;e=U(e),e!==null;)s.push(e);for(let e of s)h(`scroll`,e,_,!0)},u=()=>{for(let e of s)g(`scroll`,e,_,!0);s=[]},d=new Set,p=e=>{d.size===0&&c(),d.has(e)||d.add(e)},m=e=>{d.has(e)&&d.delete(e),d.size===0&&u()},_=()=>{A(v)},v=()=>{d.forEach(e=>e())},y=new Set,b=e=>{y.size===0&&h(`resize`,window,S),y.has(e)||y.add(e)},x=e=>{y.has(e)&&y.delete(e),y.size===0&&g(`resize`,window,S)},S=()=>{y.forEach(e=>e())};return o(()=>{g(`resize`,window,S),u()}),{targetRef:i,setTargetRef:a,addScrollListener:p,removeScrollListener:m,addResizeListener:b,removeResizeListener:x}},render(){return b(`binder`,this.$slots)}}),G=u({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=r(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?c(x(`follower`,this.$slots),[[t]]):x(`follower`,this.$slots)}}),{c:K}=p(),q=`vueuc-style`,J={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Y={start:`end`,center:`center`,end:`start`},X={top:`height`,bottom:`height`,left:`width`,right:`width`},Z={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},ee={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},te={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},Q={top:!0,bottom:!1,left:!0,right:!1},$={top:`end`,bottom:`start`,left:`end`,right:`start`};function ne(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=Q[i]?c:-c:o=Q[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=te[e],i=J[r],a=X[r];if(n[a]>t[a]){if(t[r]+t[a]t[i]&&(c=Y[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=J[e],i=X[e],a=(n[i]-t[i])/2;(t[e]t[r]?(c=$[e],l=u(i,e,d)):(c=$[r],l=u(i,r,d)))}let f=o;return t[o] *`,{pointerEvents:`all`})])]),oe=u({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let n=r(`VBinder`),s=E(()=>e.enabled===void 0?e.show:e.enabled),c=l(null),u=l(null),f=()=>{let{syncTrigger:t}=e;t.includes(`scroll`)&&n.addScrollListener(g),t.includes(`resize`)&&n.addResizeListener(g)},p=()=>{n.removeScrollListener(g),n.removeResizeListener(g)};a(()=>{s.value&&(g(),f())});let h=t();ae.mount({id:`vueuc/binder`,head:!0,anchorMetaName:q,ssr:h}),o(()=>{p()}),N(()=>{s.value&&g()});let g=()=>{if(!s.value)return;let t=c.value;if(t===null)return;let r=n.targetRef,{x:i,y:a,overlap:o}=e,l=i!==void 0&&a!==void 0?B(i,a):V(r);t.style.setProperty(`--v-target-width`,`${Math.round(l.width)}px`),t.style.setProperty(`--v-target-height`,`${Math.round(l.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;t.setAttribute(`v-placement`,p),o?t.setAttribute(`v-overlap`,``):t.removeAttribute(`v-overlap`);let{style:g}=t;d===`target`?g.width=`${l.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${l.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=V(t),v=V(u.value),{left:y,top:b,placement:x}=ne(p,l,_,m,h,o),S=re(x,o),{left:C,top:w,transform:T}=ie(x,v,l,b,y,o);t.setAttribute(`v-placement`,x),t.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),t.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),t.style.transform=`translateX(${C}) translateY(${w}) ${T}`,t.style.setProperty(`--v-transform-origin`,S),t.style.transformOrigin=S};d(s,e=>{e?(f(),_()):p()});let _=()=>{i().then(g).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(t=>{d(m(e,t),g)}),[`teleportDisabled`].forEach(t=>{d(m(e,t),_)}),d(m(e,`syncTrigger`),e=>{e.includes(`resize`)?n.addResizeListener(g):n.removeResizeListener(g),e.includes(`scroll`)?n.addScrollListener(g):n.removeScrollListener(g)});let v=T();return{VBinder:n,mergedEnabled:s,offsetContainerRef:u,followerRef:c,mergedTo:E(()=>{let{to:t}=e;if(t!==void 0)return t;v.value}),syncPosition:g}},render(){return n(y,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=n(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[n(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?c(t,[[S,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}});export{W as a,P as c,G as i,N as l,K as n,L as o,q as r,F as s,oe as t,A as u}; \ No newline at end of file diff --git a/frontend/dist/assets/Follower-C1zQmxY2.js b/frontend/dist/assets/Follower-C1zQmxY2.js deleted file mode 100644 index 57e7bea..0000000 --- a/frontend/dist/assets/Follower-C1zQmxY2.js +++ /dev/null @@ -1 +0,0 @@ -import{At as e,J as t,Mt as n,Pt as r,Rt as i,Ut as a,Vt as o,Y as s,an as c,hn as l,kt as u,nn as d,qt as f,ut as p,vn as m}from"./client-Bz0sY7Lm.js";import{d as h,u as g}from"./Card-D1LVu21r.js";import{C as _,_ as v,f as y,g as b,h as x,p as S,v as C,x as w}from"./Suffix-JLavbuLO.js";import{$ as T,et as E}from"./index-6B3OmSLg.js";var D=[],O=new WeakMap;function k(){D.forEach(e=>e(...O.get(e))),D=[]}function A(e,...t){O.set(e,t),!D.includes(e)&&D.push(e)===1&&requestAnimationFrame(k)}var j=_?document?.fonts?.ready:void 0,M=!1;j===void 0?M=!0:j.then(()=>{M=!0});function N(e){if(M)return;let t=!1;a(()=>{M||j?.then(()=>{t||e()})}),o(()=>{t=!0})}var P=s(`n-internal-select-menu`),F=s(`n-internal-select-menu-body`),I=`__disabled__`;function L(e){let t=r(C,null),n=r(w,null),i=r(v,null),s=r(F,null),c=l();if(typeof document<`u`){c.value=document.fullscreenElement;let e=()=>{c.value=document.fullscreenElement};a(()=>{h(`fullscreenchange`,document,e)}),o(()=>{g(`fullscreenchange`,document,e)})}return E(()=>{let{to:r}=e;return r===void 0?t?.value?t.value.$el??t.value:n?.value?n.value:i?.value?i.value:s?.value?s.value:r??(c.value||`body`):r===!1?I:r===!0?c.value||`body`:r})}L.tdkey=I,L.propTo={type:[String,Object,Boolean],default:void 0};var R=null;function z(){if(R===null&&(R=document.getElementById(`v-binder-view-measurer`),R===null)){R=document.createElement(`div`),R.id=`v-binder-view-measurer`;let{style:e}=R;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(R)}return R.getBoundingClientRect()}function B(e,t){let n=z();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function V(e){let t=e.getBoundingClientRect(),n=z();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function H(e){return e.nodeType===9?null:e.parentNode}function U(e){if(e===null)return null;let t=H(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return U(t)}var W=u({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(t){f(`VBinder`,e()?.proxy);let n=r(`VBinder`,null),i=l(null),a=e=>{i.value=e,n&&t.syncTargetWithParent&&n.setTargetRef(e)},s=[],c=()=>{let e=i.value;for(;e=U(e),e!==null;)s.push(e);for(let e of s)h(`scroll`,e,_,!0)},u=()=>{for(let e of s)g(`scroll`,e,_,!0);s=[]},d=new Set,p=e=>{d.size===0&&c(),d.has(e)||d.add(e)},m=e=>{d.has(e)&&d.delete(e),d.size===0&&u()},_=()=>{A(v)},v=()=>{d.forEach(e=>e())},y=new Set,b=e=>{y.size===0&&h(`resize`,window,S),y.has(e)||y.add(e)},x=e=>{y.has(e)&&y.delete(e),y.size===0&&g(`resize`,window,S)},S=()=>{y.forEach(e=>e())};return o(()=>{g(`resize`,window,S),u()}),{targetRef:i,setTargetRef:a,addScrollListener:p,removeScrollListener:m,addResizeListener:b,removeResizeListener:x}},render(){return b(`binder`,this.$slots)}}),G=u({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=r(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?c(x(`follower`,this.$slots),[[t]]):x(`follower`,this.$slots)}}),{c:K}=p(),q=`vueuc-style`,J={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Y={start:`end`,center:`center`,end:`start`},X={top:`height`,bottom:`height`,left:`width`,right:`width`},Z={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},ee={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},te={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},Q={top:!0,bottom:!1,left:!0,right:!1},$={top:`end`,bottom:`start`,left:`end`,right:`start`};function ne(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=Q[i]?c:-c:o=Q[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=te[e],i=J[r],a=X[r];if(n[a]>t[a]){if(t[r]+t[a]t[i]&&(c=Y[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=J[e],i=X[e],a=(n[i]-t[i])/2;(t[e]t[r]?(c=$[e],l=u(i,e,d)):(c=$[r],l=u(i,r,d)))}let f=o;return t[o] *`,{pointerEvents:`all`})])]),oe=u({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let n=r(`VBinder`),s=E(()=>e.enabled===void 0?e.show:e.enabled),c=l(null),u=l(null),f=()=>{let{syncTrigger:t}=e;t.includes(`scroll`)&&n.addScrollListener(g),t.includes(`resize`)&&n.addResizeListener(g)},p=()=>{n.removeScrollListener(g),n.removeResizeListener(g)};a(()=>{s.value&&(g(),f())});let h=t();ae.mount({id:`vueuc/binder`,head:!0,anchorMetaName:q,ssr:h}),o(()=>{p()}),N(()=>{s.value&&g()});let g=()=>{if(!s.value)return;let t=c.value;if(t===null)return;let r=n.targetRef,{x:i,y:a,overlap:o}=e,l=i!==void 0&&a!==void 0?B(i,a):V(r);t.style.setProperty(`--v-target-width`,`${Math.round(l.width)}px`),t.style.setProperty(`--v-target-height`,`${Math.round(l.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;t.setAttribute(`v-placement`,p),o?t.setAttribute(`v-overlap`,``):t.removeAttribute(`v-overlap`);let{style:g}=t;d===`target`?g.width=`${l.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${l.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=V(t),v=V(u.value),{left:y,top:b,placement:x}=ne(p,l,_,m,h,o),S=re(x,o),{left:C,top:w,transform:T}=ie(x,v,l,b,y,o);t.setAttribute(`v-placement`,x),t.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),t.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),t.style.transform=`translateX(${C}) translateY(${w}) ${T}`,t.style.setProperty(`--v-transform-origin`,S),t.style.transformOrigin=S};d(s,e=>{e?(f(),_()):p()});let _=()=>{i().then(g).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(t=>{d(m(e,t),g)}),[`teleportDisabled`].forEach(t=>{d(m(e,t),_)}),d(m(e,`syncTrigger`),e=>{e.includes(`resize`)?n.addResizeListener(g):n.removeResizeListener(g),e.includes(`scroll`)?n.addScrollListener(g):n.removeScrollListener(g)});let v=T();return{VBinder:n,mergedEnabled:s,offsetContainerRef:u,followerRef:c,mergedTo:E(()=>{let{to:t}=e;if(t!==void 0)return t;v.value}),syncPosition:g}},render(){return n(y,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=n(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[n(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?c(t,[[S,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}});export{W as a,P as c,G as i,N as l,K as n,L as o,q as r,F as s,oe as t,A as u}; \ No newline at end of file diff --git a/frontend/dist/assets/FormItem-CLDJT3hM.js b/frontend/dist/assets/FormItem-k4AtNXqm.js similarity index 56% rename from frontend/dist/assets/FormItem-CLDJT3hM.js rename to frontend/dist/assets/FormItem-k4AtNXqm.js index 887591e..10eb99a 100644 --- a/frontend/dist/assets/FormItem-CLDJT3hM.js +++ b/frontend/dist/assets/FormItem-k4AtNXqm.js @@ -1,4 +1,4 @@ -import{At as e,H as t,Mt as n,Pt as r,U as i,Ut as a,Vt as o,Y as s,at as c,bt as l,h as u,hn as d,it as f,kt as p,nn as m,nt as h,p as g,q as _,qt as v,st as y,tt as b,vn as x}from"./client-Bz0sY7Lm.js";import{s as S}from"./Card-D1LVu21r.js";import{o as C}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{o as w,t as T}from"./get-peGRPzxS.js";import{t as ee}from"./use-form-item-Bl3X3aXB.js";import{it as E,p as te,tt as ne}from"./index-6B3OmSLg.js";function re(t,n,i){let a=r(t,null);if(a===null)return;let s=e()?.proxy;m(i,c),c(i.value),o(()=>{c(void 0,i.value)});function c(e,t){if(!a)return;let r=a[n];t!==void 0&&l(r,t),e!==void 0&&u(r,e)}function l(e,t){e[t]||(e[t]=[]),e[t].splice(e[t].findIndex(e=>e===s),1)}function u(e,t){e[t]||(e[t]=[]),~e[t].findIndex(e=>e===s)||e[t].push(s)}}var D=s(`n-form`),ie=s(`n-form-item-insts`);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(e,t,n){return N=M()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&j(i,n.prototype),i},N.apply(null,arguments)}function P(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function F(e){var t=typeof Map==`function`?new Map:void 0;return F=function(e){if(e===null||!P(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return N(e,arguments,A(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,e)},F(e)}var I=/%[sdj%]/g,ae=function(){};function L(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function R(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(I,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function z(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`}function B(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||z(t)&&typeof e==`string`&&!e)}function V(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,e||[]),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function H(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,s{c(void 0,i.value)});function c(e,t){if(!a)return;let r=a[n];t!==void 0&&l(r,t),e!==void 0&&u(r,e)}function l(e,t){e[t]||(e[t]=[]),e[t].splice(e[t].findIndex(e=>e===s),1)}function u(e,t){e[t]||(e[t]=[]),~e[t].findIndex(e=>e===s)||e[t].push(s)}}var D=s(`n-form`),ie=s(`n-form-item-insts`);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(e,t,n){return N=M()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&j(i,n.prototype),i},N.apply(null,arguments)}function P(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function F(e){var t=typeof Map==`function`?new Map:void 0;return F=function(e){if(e===null||!P(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return N(e,arguments,A(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,e)},F(e)}var ae=/%[sdj%]/g,oe=function(){};function I(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function L(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(ae,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function R(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`}function z(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||R(t)&&typeof e==`string`&&!e)}function B(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,e||[]),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function V(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},K={integer:function(e){return K.number(e)&&parseInt(e,10)===e},float:function(e){return K.number(e)&&!K.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return typeof e==`object`&&!K.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(me.email)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(pe())},hex:function(e){return typeof e==`string`&&!!e.match(me.hex)}},he=function(e,t,n,r,i){if(e.required&&t===void 0){de(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?K[o](t)||r.push(R(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(R(i.messages.types[o],e.fullField,e.type))},ge=function(e,t,n,r,i){var a=typeof e.len==`number`,o=typeof e.min==`number`,s=typeof e.max==`number`,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,u=null,d=typeof t==`number`,f=typeof t==`string`,p=Array.isArray(t);if(d?u=`number`:f?u=`string`:p&&(u=`array`),!u)return!1;p&&(l=t.length),f&&(l=t.replace(c,`_`).length),a?l!==e.len&&r.push(R(i.messages[u].len,e.fullField,e.len)):o&&!s&&le.max?r.push(R(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(R(i.messages[u].range,e.fullField,e.min,e.max))},q=`enum`,J={required:de,whitespace:fe,type:he,range:ge,enum:function(e,t,n,r,i){e[q]=Array.isArray(e[q])?e[q]:[],e[q].indexOf(t)===-1&&r.push(R(i.messages[q],e.fullField,e[q].join(`, `)))},pattern:function(e,t,n,r,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(R(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern==`string`&&(new RegExp(e.pattern).test(t)||r.push(R(i.messages.pattern.mismatch,e.fullField,t,e.pattern))))}},_e=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t,`string`)&&!e.required)return n();J.required(e,t,r,a,i,`string`),B(t,`string`)||(J.type(e,t,r,a,i),J.range(e,t,r,a,i),J.pattern(e,t,r,a,i),e.whitespace===!0&&J.whitespace(e,t,r,a,i))}n(a)},ve=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},ye=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},be=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},xe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),B(t)||J.type(e,t,r,a,i)}n(a)},Se=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},Ce=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},we=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();J.required(e,t,r,a,i,`array`),t!=null&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},Te=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},Ee=`enum`,De=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J[Ee](e,t,r,a,i)}n(a)},Oe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t,`string`)&&!e.required)return n();J.required(e,t,r,a,i),B(t,`string`)||J.pattern(e,t,r,a,i)}n(a)},ke=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t,`date`)&&!e.required)return n();if(J.required(e,t,r,a,i),!B(t,`date`)){var o=t instanceof Date?t:new Date(t);J.type(e,o,r,a,i),o&&J.range(e,o.getTime(),r,a,i)}}n(a)},Ae=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:typeof t;J.required(e,t,r,a,i,o),n(a)},Y=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t,a)&&!e.required)return n();J.required(e,t,r,o,i,a),B(t,a)||J.type(e,t,r,o,i)}n(o)},X={string:_e,method:ve,number:ye,boolean:be,regexp:xe,integer:Se,float:Ce,array:we,object:Te,enum:De,pattern:Oe,date:ke,url:Y,hex:Y,email:Y,required:Ae,any:function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(B(t)&&!e.required)return n();J.required(e,t,r,a,i)}n(a)}};function Z(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Q=Z(),$=function(){function e(e){this.rules=null,this._messages=Q,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(typeof e!=`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})},t.messages=function(e){return e&&(this._messages=ue(Z(),e)),this._messages},t.validate=function(t,n,r){var i=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var a=t,o=n,s=r;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,e)}else t.push(e)}for(var i=0;i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},K={integer:function(e){return K.number(e)&&parseInt(e,10)===e},float:function(e){return K.number(e)&&!K.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return typeof e==`object`&&!K.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(me.email)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(pe())},hex:function(e){return typeof e==`string`&&!!e.match(me.hex)}},he=function(e,t,n,r,i){if(e.required&&t===void 0){de(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?K[o](t)||r.push(L(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(L(i.messages.types[o],e.fullField,e.type))},ge=function(e,t,n,r,i){var a=typeof e.len==`number`,o=typeof e.min==`number`,s=typeof e.max==`number`,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,u=null,d=typeof t==`number`,f=typeof t==`string`,p=Array.isArray(t);if(d?u=`number`:f?u=`string`:p&&(u=`array`),!u)return!1;p&&(l=t.length),f&&(l=t.replace(c,`_`).length),a?l!==e.len&&r.push(L(i.messages[u].len,e.fullField,e.len)):o&&!s&&le.max?r.push(L(i.messages[u].max,e.fullField,e.max)):o&&s&&(le.max)&&r.push(L(i.messages[u].range,e.fullField,e.min,e.max))},q=`enum`,J={required:de,whitespace:fe,type:he,range:ge,enum:function(e,t,n,r,i){e[q]=Array.isArray(e[q])?e[q]:[],e[q].indexOf(t)===-1&&r.push(L(i.messages[q],e.fullField,e[q].join(`, `)))},pattern:function(e,t,n,r,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(L(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern==`string`&&(new RegExp(e.pattern).test(t)||r.push(L(i.messages.pattern.mismatch,e.fullField,t,e.pattern))))}},_e=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`string`)&&!e.required)return n();J.required(e,t,r,a,i,`string`),z(t,`string`)||(J.type(e,t,r,a,i),J.range(e,t,r,a,i),J.pattern(e,t,r,a,i),e.whitespace===!0&&J.whitespace(e,t,r,a,i))}n(a)},ve=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},ye=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},be=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},xe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),z(t)||J.type(e,t,r,a,i)}n(a)},Se=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},Ce=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},we=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();J.required(e,t,r,a,i,`array`),t!=null&&(J.type(e,t,r,a,i),J.range(e,t,r,a,i))}n(a)},Te=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J.type(e,t,r,a,i)}n(a)},Ee=`enum`,De=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i),t!==void 0&&J[Ee](e,t,r,a,i)}n(a)},Oe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`string`)&&!e.required)return n();J.required(e,t,r,a,i),z(t,`string`)||J.pattern(e,t,r,a,i)}n(a)},ke=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`date`)&&!e.required)return n();if(J.required(e,t,r,a,i),!z(t,`date`)){var o=t instanceof Date?t:new Date(t);J.type(e,o,r,a,i),o&&J.range(e,o.getTime(),r,a,i)}}n(a)},Ae=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:typeof t;J.required(e,t,r,a,i,o),n(a)},Y=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,a)&&!e.required)return n();J.required(e,t,r,o,i,a),z(t,a)||J.type(e,t,r,o,i)}n(o)},X={string:_e,method:ve,number:ye,boolean:be,regexp:xe,integer:Se,float:Ce,array:we,object:Te,enum:De,pattern:Oe,date:ke,url:Y,hex:Y,email:Y,required:Ae,any:function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();J.required(e,t,r,a,i)}n(a)}};function Z(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Q=Z(),$=function(){function e(e){this.rules=null,this._messages=Q,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(typeof e!=`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})},t.messages=function(e){return e&&(this._messages=W(Z(),e)),this._messages},t.validate=function(t,n,r){var i=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var a=t,o=n,s=r;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,e)}else t.push(e)}for(var i=0;ie.size===void 0?t?.props.size===void 0?n?.value?.Form?.size||`medium`:t.props.size:e.size)}}function Fe(e){let t=r(D,null),n=l(()=>{let{labelPlacement:n}=e;return n===void 0?t?.props.labelPlacement?t.props.labelPlacement:`top`:n}),i=l(()=>n.value===`left`&&(e.labelWidth===`auto`||t?.props.labelWidth===`auto`)),a=l(()=>{if(n.value===`top`)return;let{labelWidth:r}=e;if(r!==void 0&&r!==`auto`)return w(r);if(i.value){let e=t?.maxChildLabelWidthRef.value;return e===void 0?void 0:w(e)}if(t?.props.labelWidth!==void 0)return w(t.props.labelWidth)}),o=l(()=>{let{labelAlign:n}=e;if(n)return n;if(t?.props.labelAlign)return t.props.labelAlign}),s=l(()=>[e.labelProps?.style,e.labelStyle,{width:a.value}]),c=l(()=>{let{showRequireMark:n}=e;return n===void 0?t?.props.showRequireMark:n}),u=l(()=>{let{requireMarkPlacement:n}=e;return n===void 0?t?.props.requireMarkPlacement||`right`:n}),f=d(!1),p=d(!1);return{validationErrored:f,validationWarned:p,mergedLabelStyle:s,mergedLabelPlacement:n,mergedLabelAlign:o,mergedShowRequireMark:c,mergedRequireMarkPlacement:u,mergedValidationStatus:l(()=>{let{validationStatus:t}=e;if(t!==void 0)return t;if(f.value)return`error`;if(p.value)return`warning`}),mergedShowFeedback:l(()=>{let{showFeedback:n}=e;return n===void 0?t?.props.showFeedback===void 0?!0:t.props.showFeedback:n}),mergedShowLabel:l(()=>{let{showLabel:n}=e;return n===void 0?t?.props.showLabel===void 0?!0:t.props.showLabel:n}),isAutoLabelWidth:i}}function Ie(e){let t=r(D,null),n=l(()=>{let{rulePath:t}=e;if(t!==void 0)return t;let{path:n}=e;if(n!==void 0)return n}),i=l(()=>{let r=[],{rule:i}=e;if(i!==void 0&&(Array.isArray(i)?r.push(...i):r.push(i)),t){let{rules:e}=t.props,{value:i}=n;if(e!==void 0&&i!==void 0){let t=T(e,i);t!==void 0&&(Array.isArray(t)?r.push(...t):r.push(t))}}return r}),a=l(()=>i.value.some(e=>e.required));return{mergedRules:i,mergedRequired:l(()=>a.value||e.required)}}var Le=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Re=Object.assign(Object.assign({},g.props),{label:String,labelWidth:[Number,String],labelStyle:[String,Object],labelAlign:String,labelPlacement:String,path:String,first:Boolean,rulePath:String,required:Boolean,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:void 0},rule:[Object,Array],size:String,ignorePathChange:Boolean,validationStatus:String,feedback:String,feedbackClass:String,feedbackStyle:[String,Object],showLabel:{type:Boolean,default:void 0},labelProps:Object,contentClass:String,contentStyle:[String,Object]});S(Re);function ze(e,t){return(...n)=>{try{let r=e(...n);return!t&&(typeof r==`boolean`||r instanceof Error||Array.isArray(r))||r?.then?r:(r===void 0||_(`form-item/validate`,`You return a ${typeof r} typed value in the validator method, which is not recommended. Please use ${t?"`Promise`":"`boolean`, `Error` or `Promise`"} typed value instead.`),!0)}catch(e){_(`form-item/validate`,"An error is catched in the validation, so the validation won't be done. Your callback in `validate` method of `n-form` or `n-form-item` won't be called in this validation."),console.error(e);return}}}var Be=p({name:`FormItem`,props:Re,slots:Object,setup(e){re(ie,`formItems`,x(e,`path`));let{mergedClsPrefixRef:n,inlineThemeDisabled:o}=i(e),s=r(D,null),c=Pe(e),u=Fe(e),{validationErrored:f,validationWarned:p}=u,{mergedRequired:h,mergedRules:_}=Ie(e),{mergedSize:b}=c,{mergedLabelPlacement:S,mergedLabelAlign:C,mergedRequireMarkPlacement:w}=u,E=d([]),O=d(ne()),k=d(null),A=s?x(s.props,`disabled`):d(!1),j=g(`Form`,`-form-item`,Ne,te,e,n);m(x(e,`path`),()=>{e.ignorePathChange||N()});function M(){if(!u.isAutoLabelWidth.value)return;let e=k.value;if(e!==null){let t=e.style.whiteSpace;e.style.whiteSpace=`nowrap`,e.style.width=``,s?.deriveMaxChildLabelWidth(Number(getComputedStyle(e).width.slice(0,-2))),e.style.whiteSpace=t}}function N(){E.value=[],f.value=!1,p.value=!1,e.feedback&&(O.value=ne())}let P=(...t)=>Le(this,[...t],void 0,function*(t=null,n=()=>!0,r={suppressWarning:!0}){let{path:i}=e;r?r.first||=e.first:r={};let{value:a}=_,o=s?T(s.props.model,i||``):void 0,c={},l={},u=(t?a.filter(e=>Array.isArray(e.trigger)?e.trigger.includes(t):e.trigger===t):a).filter(n).map((e,t)=>{let n=Object.assign({},e);if(n.validator&&=ze(n.validator,!1),n.asyncValidator&&=ze(n.asyncValidator,!0),n.renderMessage){let e=`__renderMessage__${t}`;l[e]=n.message,n.message=e,c[e]=n.renderMessage}return n}),d=u.filter(e=>e.level!==`warning`),m=u.filter(e=>e.level===`warning`),h={valid:!0,errors:void 0,warnings:void 0};if(!u.length)return h;let g=i??`__n_no_path__`,v=new $({[g]:d}),y=new $({[g]:m}),{validateMessages:b}=s?.props||{};b&&(v.messages(b),y.messages(b));let x=e=>{E.value=e.map(e=>{let t=e?.message||``;return{key:t,render:()=>t.startsWith(`__renderMessage__`)?c[t]():t}}),e.forEach(e=>{e.message?.startsWith(`__renderMessage__`)&&(e.message=l[e.message])})};if(d.length){let e=yield new Promise(e=>{v.validate({[g]:o},r,e)});e?.length&&(h.valid=!1,h.errors=e,x(e))}if(m.length&&!h.errors){let e=yield new Promise(e=>{y.validate({[g]:o},r,e)});e?.length&&(x(e),h.warnings=e)}return!h.errors&&!h.warnings?N():(f.value=!!h.errors,p.value=!!h.warnings),h});function F(){P(`blur`)}function I(){P(`change`)}function ae(){P(`focus`)}function L(){P(`input`)}function R(e,t){return Le(this,void 0,void 0,function*(){let n,r,i,a;return typeof e==`string`?(n=e,r=t):typeof e==`object`&&e&&(n=e.trigger,r=e.callback,i=e.shouldRuleBeApplied,a=e.options),yield new Promise((e,t)=>{P(n,i,a).then(({valid:n,errors:i,warnings:a})=>{n?(r&&r(void 0,{warnings:a}),e({warnings:a})):(r&&r(i,{warnings:a}),t(i))})})})}v(ee,{path:x(e,`path`),disabled:A,mergedSize:c.mergedSize,mergedValidationStatus:u.mergedValidationStatus,restoreValidation:N,handleContentBlur:F,handleContentChange:I,handleContentFocus:ae,handleContentInput:L});let z={validate:R,restoreValidation:N,internalValidate:P,invalidateLabelWidth:M};a(M);let B=l(()=>{let{value:e}=b,{value:t}=S,n=t===`top`?`vertical`:`horizontal`,{common:{cubicBezierEaseInOut:r},self:{labelTextColor:i,asteriskColor:a,lineHeight:o,feedbackTextColor:s,feedbackTextColorWarning:c,feedbackTextColorError:l,feedbackPadding:u,labelFontWeight:d,[y(`labelHeight`,e)]:f,[y(`blankHeight`,e)]:p,[y(`feedbackFontSize`,e)]:m,[y(`feedbackHeight`,e)]:h,[y(`labelPadding`,n)]:g,[y(`labelTextAlign`,n)]:_,[y(y(`labelFontSize`,t),e)]:v}}=j.value,x=C.value??_;return t===`top`&&(x=x===`right`?`flex-end`:`flex-start`),{"--n-bezier":r,"--n-line-height":o,"--n-blank-height":p,"--n-label-font-size":v,"--n-label-text-align":x,"--n-label-height":f,"--n-label-padding":g,"--n-label-font-weight":d,"--n-asterisk-color":a,"--n-label-text-color":i,"--n-feedback-padding":u,"--n-feedback-font-size":m,"--n-feedback-height":h,"--n-feedback-text-color":s,"--n-feedback-text-color-warning":c,"--n-feedback-text-color-error":l}}),V=o?t(`form-item`,l(()=>`${b.value[0]}${S.value[0]}${C.value?.[0]||``}`),B,e):void 0,H=l(()=>S.value===`left`&&w.value===`left`&&C.value===`left`);return Object.assign(Object.assign(Object.assign(Object.assign({labelElementRef:k,mergedClsPrefix:n,mergedRequired:h,feedbackId:O,renderExplains:E,reverseColSpace:H},u),c),z),{cssVars:o?void 0:B,themeClass:V?.themeClass,onRender:V?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,mergedShowLabel:r,mergedShowRequireMark:i,mergedRequireMarkPlacement:a,onRender:o}=this,s=i===void 0?this.mergedRequired:i;return o?.(),n(`div`,{class:[`${t}-form-item`,this.themeClass,`${t}-form-item--${this.mergedSize}-size`,`${t}-form-item--${this.mergedLabelPlacement}-labelled`,this.isAutoLabelWidth&&`${t}-form-item--auto-label-width`,!r&&`${t}-form-item--no-label`],style:this.cssVars},r&&(()=>{let e=this.$slots.label?this.$slots.label():this.label;if(!e)return null;let r=n(`span`,{class:`${t}-form-item-label__text`},e),i=s?n(`span`,{class:`${t}-form-item-label__asterisk`},a===`left`?`*\xA0`:`\xA0*`):a===`right-hanging`&&n(`span`,{class:`${t}-form-item-label__asterisk-placeholder`},`\xA0*`),{labelProps:o}=this;return n(`label`,Object.assign({},o,{class:[o?.class,`${t}-form-item-label`,`${t}-form-item-label--${a}-mark`,this.reverseColSpace&&`${t}-form-item-label--reverse-columns-space`],style:this.mergedLabelStyle,ref:`labelElementRef`}),a===`left`?[i,r]:[r,i])})(),n(`div`,{class:[`${t}-form-item-blank`,this.contentClass,this.mergedValidationStatus&&`${t}-form-item-blank--${this.mergedValidationStatus}`],style:this.contentStyle},e),this.mergedShowFeedback?n(`div`,{key:this.feedbackId,style:this.feedbackStyle,class:[`${t}-form-item-feedback-wrapper`,this.feedbackClass]},n(E,{name:`fade-down-transition`,mode:`out-in`},{default:()=>{let{mergedValidationStatus:r}=this;return C(e.feedback,e=>{let{feedback:i}=this,a=e||i?n(`div`,{key:`__feedback__`,class:`${t}-form-item-feedback__line`},e||i):this.renderExplains.length?this.renderExplains?.map(({key:e,render:r})=>n(`div`,{key:e,class:`${t}-form-item-feedback__line`},r())):null;return a?r===`warning`?n(`div`,{key:`controlled-warning`,class:`${t}-form-item-feedback ${t}-form-item-feedback--warning`},a):r===`error`?n(`div`,{key:`controlled-error`,class:`${t}-form-item-feedback ${t}-form-item-feedback--error`},a):r===`success`?n(`div`,{key:`controlled-success`,class:`${t}-form-item-feedback ${t}-form-item-feedback--success`},a):n(`div`,{key:`controlled-default`,class:`${t}-form-item-feedback`},a):null})}})):null)}});export{Be as t}; \ No newline at end of file + `),h(`form-item-feedback`,{transition:`color .3s var(--n-bezier)`,color:`var(--n-feedback-text-color)`},[c(`warning`,{color:`var(--n-feedback-text-color-warning)`}),c(`error`,{color:`var(--n-feedback-text-color-error)`}),Me({fromOffset:`-3px`,enterDuration:`.3s`,leaveDuration:`.2s`})])])]);function Pe(e){let t=r(D,null),{mergedComponentPropsRef:n}=i(e);return{mergedSize:l(()=>e.size===void 0?t?.props.size===void 0?n?.value?.Form?.size||`medium`:t.props.size:e.size)}}function Fe(e){let t=r(D,null),n=l(()=>{let{labelPlacement:n}=e;return n===void 0?t?.props.labelPlacement?t.props.labelPlacement:`top`:n}),i=l(()=>n.value===`left`&&(e.labelWidth===`auto`||t?.props.labelWidth===`auto`)),a=l(()=>{if(n.value===`top`)return;let{labelWidth:r}=e;if(r!==void 0&&r!==`auto`)return w(r);if(i.value){let e=t?.maxChildLabelWidthRef.value;return e===void 0?void 0:w(e)}if(t?.props.labelWidth!==void 0)return w(t.props.labelWidth)}),o=l(()=>{let{labelAlign:n}=e;if(n)return n;if(t?.props.labelAlign)return t.props.labelAlign}),s=l(()=>[e.labelProps?.style,e.labelStyle,{width:a.value}]),c=l(()=>{let{showRequireMark:n}=e;return n===void 0?t?.props.showRequireMark:n}),u=l(()=>{let{requireMarkPlacement:n}=e;return n===void 0?t?.props.requireMarkPlacement||`right`:n}),f=d(!1),p=d(!1);return{validationErrored:f,validationWarned:p,mergedLabelStyle:s,mergedLabelPlacement:n,mergedLabelAlign:o,mergedShowRequireMark:c,mergedRequireMarkPlacement:u,mergedValidationStatus:l(()=>{let{validationStatus:t}=e;if(t!==void 0)return t;if(f.value)return`error`;if(p.value)return`warning`}),mergedShowFeedback:l(()=>{let{showFeedback:n}=e;return n===void 0?t?.props.showFeedback===void 0?!0:t.props.showFeedback:n}),mergedShowLabel:l(()=>{let{showLabel:n}=e;return n===void 0?t?.props.showLabel===void 0?!0:t.props.showLabel:n}),isAutoLabelWidth:i}}function Ie(e){let t=r(D,null),n=l(()=>{let{rulePath:t}=e;if(t!==void 0)return t;let{path:n}=e;if(n!==void 0)return n}),i=l(()=>{let r=[],{rule:i}=e;if(i!==void 0&&(Array.isArray(i)?r.push(...i):r.push(i)),t){let{rules:e}=t.props,{value:i}=n;if(e!==void 0&&i!==void 0){let t=T(e,i);t!==void 0&&(Array.isArray(t)?r.push(...t):r.push(t))}}return r}),a=l(()=>i.value.some(e=>e.required));return{mergedRules:i,mergedRequired:l(()=>a.value||e.required)}}var Le=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Re=Object.assign(Object.assign({},g.props),{label:String,labelWidth:[Number,String],labelStyle:[String,Object],labelAlign:String,labelPlacement:String,path:String,first:Boolean,rulePath:String,required:Boolean,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:void 0},rule:[Object,Array],size:String,ignorePathChange:Boolean,validationStatus:String,feedback:String,feedbackClass:String,feedbackStyle:[String,Object],showLabel:{type:Boolean,default:void 0},labelProps:Object,contentClass:String,contentStyle:[String,Object]});S(Re);function ze(e,t){return(...n)=>{try{let r=e(...n);return!t&&(typeof r==`boolean`||r instanceof Error||Array.isArray(r))||r?.then?r:(r===void 0||_(`form-item/validate`,`You return a ${typeof r} typed value in the validator method, which is not recommended. Please use ${t?"`Promise`":"`boolean`, `Error` or `Promise`"} typed value instead.`),!0)}catch(e){_(`form-item/validate`,"An error is catched in the validation, so the validation won't be done. Your callback in `validate` method of `n-form` or `n-form-item` won't be called in this validation."),console.error(e);return}}}var Be=p({name:`FormItem`,props:Re,slots:Object,setup(e){re(ie,`formItems`,x(e,`path`));let{mergedClsPrefixRef:n,inlineThemeDisabled:o}=i(e),s=r(D,null),c=Pe(e),u=Fe(e),{validationErrored:f,validationWarned:p}=u,{mergedRequired:h,mergedRules:_}=Ie(e),{mergedSize:b}=c,{mergedLabelPlacement:S,mergedLabelAlign:C,mergedRequireMarkPlacement:w}=u,E=d([]),O=d(te()),k=d(null),A=s?x(s.props,`disabled`):d(!1),j=g(`Form`,`-form-item`,Ne,ne,e,n);m(x(e,`path`),()=>{e.ignorePathChange||N()});function M(){if(!u.isAutoLabelWidth.value)return;let e=k.value;if(e!==null){let t=e.style.whiteSpace;e.style.whiteSpace=`nowrap`,e.style.width=``,s?.deriveMaxChildLabelWidth(Number(getComputedStyle(e).width.slice(0,-2))),e.style.whiteSpace=t}}function N(){E.value=[],f.value=!1,p.value=!1,e.feedback&&(O.value=te())}let P=(...t)=>Le(this,[...t],void 0,function*(t=null,n=()=>!0,r={suppressWarning:!0}){let{path:i}=e;r?r.first||=e.first:r={};let{value:a}=_,o=s?T(s.props.model,i||``):void 0,c={},l={},u=(t?a.filter(e=>Array.isArray(e.trigger)?e.trigger.includes(t):e.trigger===t):a).filter(n).map((e,t)=>{let n=Object.assign({},e);if(n.validator&&=ze(n.validator,!1),n.asyncValidator&&=ze(n.asyncValidator,!0),n.renderMessage){let e=`__renderMessage__${t}`;l[e]=n.message,n.message=e,c[e]=n.renderMessage}return n}),d=u.filter(e=>e.level!==`warning`),m=u.filter(e=>e.level===`warning`),h={valid:!0,errors:void 0,warnings:void 0};if(!u.length)return h;let g=i??`__n_no_path__`,v=new $({[g]:d}),y=new $({[g]:m}),{validateMessages:b}=s?.props||{};b&&(v.messages(b),y.messages(b));let x=e=>{E.value=e.map(e=>{let t=e?.message||``;return{key:t,render:()=>t.startsWith(`__renderMessage__`)?c[t]():t}}),e.forEach(e=>{e.message?.startsWith(`__renderMessage__`)&&(e.message=l[e.message])})};if(d.length){let e=yield new Promise(e=>{v.validate({[g]:o},r,e)});e?.length&&(h.valid=!1,h.errors=e,x(e))}if(m.length&&!h.errors){let e=yield new Promise(e=>{y.validate({[g]:o},r,e)});e?.length&&(x(e),h.warnings=e)}return!h.errors&&!h.warnings?N():(f.value=!!h.errors,p.value=!!h.warnings),h});function F(){P(`blur`)}function ae(){P(`change`)}function oe(){P(`focus`)}function I(){P(`input`)}function L(e,t){return Le(this,void 0,void 0,function*(){let n,r,i,a;return typeof e==`string`?(n=e,r=t):typeof e==`object`&&e&&(n=e.trigger,r=e.callback,i=e.shouldRuleBeApplied,a=e.options),yield new Promise((e,t)=>{P(n,i,a).then(({valid:n,errors:i,warnings:a})=>{n?(r&&r(void 0,{warnings:a}),e({warnings:a})):(r&&r(i,{warnings:a}),t(i))})})})}v(ee,{path:x(e,`path`),disabled:A,mergedSize:c.mergedSize,mergedValidationStatus:u.mergedValidationStatus,restoreValidation:N,handleContentBlur:F,handleContentChange:ae,handleContentFocus:oe,handleContentInput:I});let R={validate:L,restoreValidation:N,internalValidate:P,invalidateLabelWidth:M};a(M);let z=l(()=>{let{value:e}=b,{value:t}=S,n=t===`top`?`vertical`:`horizontal`,{common:{cubicBezierEaseInOut:r},self:{labelTextColor:i,asteriskColor:a,lineHeight:o,feedbackTextColor:s,feedbackTextColorWarning:c,feedbackTextColorError:l,feedbackPadding:u,labelFontWeight:d,[y(`labelHeight`,e)]:f,[y(`blankHeight`,e)]:p,[y(`feedbackFontSize`,e)]:m,[y(`feedbackHeight`,e)]:h,[y(`labelPadding`,n)]:g,[y(`labelTextAlign`,n)]:_,[y(y(`labelFontSize`,t),e)]:v}}=j.value,x=C.value??_;return t===`top`&&(x=x===`right`?`flex-end`:`flex-start`),{"--n-bezier":r,"--n-line-height":o,"--n-blank-height":p,"--n-label-font-size":v,"--n-label-text-align":x,"--n-label-height":f,"--n-label-padding":g,"--n-label-font-weight":d,"--n-asterisk-color":a,"--n-label-text-color":i,"--n-feedback-padding":u,"--n-feedback-font-size":m,"--n-feedback-height":h,"--n-feedback-text-color":s,"--n-feedback-text-color-warning":c,"--n-feedback-text-color-error":l}}),B=o?t(`form-item`,l(()=>`${b.value[0]}${S.value[0]}${C.value?.[0]||``}`),z,e):void 0,V=l(()=>S.value===`left`&&w.value===`left`&&C.value===`left`);return Object.assign(Object.assign(Object.assign(Object.assign({labelElementRef:k,mergedClsPrefix:n,mergedRequired:h,feedbackId:O,renderExplains:E,reverseColSpace:V},u),c),R),{cssVars:o?void 0:z,themeClass:B?.themeClass,onRender:B?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,mergedShowLabel:r,mergedShowRequireMark:i,mergedRequireMarkPlacement:a,onRender:o}=this,s=i===void 0?this.mergedRequired:i;return o?.(),n(`div`,{class:[`${t}-form-item`,this.themeClass,`${t}-form-item--${this.mergedSize}-size`,`${t}-form-item--${this.mergedLabelPlacement}-labelled`,this.isAutoLabelWidth&&`${t}-form-item--auto-label-width`,!r&&`${t}-form-item--no-label`],style:this.cssVars},r&&(()=>{let e=this.$slots.label?this.$slots.label():this.label;if(!e)return null;let r=n(`span`,{class:`${t}-form-item-label__text`},e),i=s?n(`span`,{class:`${t}-form-item-label__asterisk`},a===`left`?`*\xA0`:`\xA0*`):a===`right-hanging`&&n(`span`,{class:`${t}-form-item-label__asterisk-placeholder`},`\xA0*`),{labelProps:o}=this;return n(`label`,Object.assign({},o,{class:[o?.class,`${t}-form-item-label`,`${t}-form-item-label--${a}-mark`,this.reverseColSpace&&`${t}-form-item-label--reverse-columns-space`],style:this.mergedLabelStyle,ref:`labelElementRef`}),a===`left`?[i,r]:[r,i])})(),n(`div`,{class:[`${t}-form-item-blank`,this.contentClass,this.mergedValidationStatus&&`${t}-form-item-blank--${this.mergedValidationStatus}`],style:this.contentStyle},e),this.mergedShowFeedback?n(`div`,{key:this.feedbackId,style:this.feedbackStyle,class:[`${t}-form-item-feedback-wrapper`,this.feedbackClass]},n(E,{name:`fade-down-transition`,mode:`out-in`},{default:()=>{let{mergedValidationStatus:r}=this;return C(e.feedback,e=>{let{feedback:i}=this,a=e||i?n(`div`,{key:`__feedback__`,class:`${t}-form-item-feedback__line`},e||i):this.renderExplains.length?this.renderExplains?.map(({key:e,render:r})=>n(`div`,{key:e,class:`${t}-form-item-feedback__line`},r())):null;return a?r===`warning`?n(`div`,{key:`controlled-warning`,class:`${t}-form-item-feedback ${t}-form-item-feedback--warning`},a):r===`error`?n(`div`,{key:`controlled-error`,class:`${t}-form-item-feedback ${t}-form-item-feedback--error`},a):r===`success`?n(`div`,{key:`controlled-success`,class:`${t}-form-item-feedback ${t}-form-item-feedback--success`},a):n(`div`,{key:`controlled-default`,class:`${t}-form-item-feedback`},a):null})}})):null)}});export{Be as t}; \ No newline at end of file diff --git a/frontend/dist/assets/GameResultsView-PDteDzO7.js b/frontend/dist/assets/GameResultsView-VzcTF_I1.js similarity index 93% rename from frontend/dist/assets/GameResultsView-PDteDzO7.js rename to frontend/dist/assets/GameResultsView-VzcTF_I1.js index f9bb96d..73d1e5a 100644 --- a/frontend/dist/assets/GameResultsView-PDteDzO7.js +++ b/frontend/dist/assets/GameResultsView-VzcTF_I1.js @@ -1 +1 @@ -import{Ct as e,Dt as t,In as ee,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,l as p,u as te,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{n as g,t as _}from"./es-BhJOHfSF.js";import{t as v}from"./Button-lcMg8vK2.js";import{t as y}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as b}from"./Flex-BUYalFhW.js";import{i as x,o as S}from"./index-6B3OmSLg.js";import{t as C}from"./HeaderMenu-BhocR0ua.js";var w={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},ne=f({name:`TrophyFilled`,render:function(e,t){return r(),m(`svg`,w,t[0]||=[h(`path`,{d:`M26 7h-2V6a2.002 2.002 0 0 0-2-2H10a2.002 2.002 0 0 0-2 2v1H6a2.002 2.002 0 0 0-2 2v3a4.005 4.005 0 0 0 4 4h.322A8.169 8.169 0 0 0 15 21.934V26h-5v2h12v-2h-5v-4.069A7.966 7.966 0 0 0 23.74 16H24a4.005 4.005 0 0 0 4-4V9a2.002 2.002 0 0 0-2-2zM8 14a2.002 2.002 0 0 1-2-2V9h2zm18-2a2.002 2.002 0 0 1-2 2V9h2z`,fill:`currentColor`},null,-1)])}}),re={class:`center-block-custom`},ie={class:`width1200`},ae={class:`page-header`},oe={key:0,class:`game-name`},T={key:0,class:`winner-block`},E={class:`winner-cup`,"aria-hidden":`true`},D={class:`winner-label`},O={class:`winner-names`},k={class:`winner-stats`},A={key:1,class:`info-block`},j={key:2,class:`info-block`},M={class:`info-title`},N={key:3,class:`info-block`},P={key:4,class:`table-scroll`},F={class:`results-table`},I=[`title`],L={class:`question-text`},R={class:`place-col`},z={key:1,class:`place-plain`},se={class:`team-col`},B={class:`number-col`},V={class:`number-col`},H=y(f({__name:`GameResultsPage`,setup(o){let f=x(),y=S(),w=g(),H=p(),U=te(),W=H.params.id,G=l(!1),K=l(!1),q=l(``),J=l(!1),Y=l(!1),X=l([]),Z=l([]),Q=l(``);async function ce(){G.value=!1,K.value=!1,Y.value=!1,J.value=!1;try{let e=await f.GetGameResults({gameID:Number(W)});X.value=e.questions||[],Z.value=e.teams||[],G.value=!0}catch{y.isAuthenticated?(q.value=`Не удалось загрузить результаты`,w.error(q.value),J.value=!0,K.value=!0):Y.value=!0}}ce();async function le(){try{let e=await f.GetGame({ID:Number(W)});Q.value=e.game?.name||``}catch{}}le();function ue(e,t){return(e.answers||[]).find(e=>e.questionCode==t)?.score??`—`}let $=c(()=>{let e=Z.value.map(e=>e.place).filter(e=>e!=null);if(e.length==0)return[];let t=Math.min(...e);return Z.value.filter(e=>e.place===t)}),de=c(()=>$.value.length>1?`Победители`:`Победитель`),fe=c(()=>{let e=$.value.map(e=>e.team?.name||``).filter(e=>e!=``);return e.length<=1?e[0]||``:e.length==2?e[0]+` и `+e[1]:e.slice(0,-1).join(`, `)+` и `+e[e.length-1]});function pe(){U.push(`/login`)}function me(){y.logout(),U.push(`/login`)}function he(){if(window.history.state?.back){U.back();return}U.push(`/games`)}return(o,c)=>(r(),m(u,null,[h(`div`,re,[h(`div`,ie,[h(`div`,ae,[i(s(b),{justify:`space-between`,align:`center`},{default:d(()=>[h(`div`,null,[c[0]||=h(`div`,{class:`page-title`},`Итоги игры`,-1),Q.value?(r(),m(`div`,oe,a(Q.value),1)):e(``,!0)]),i(s(v),{quaternary:``,onClick:he},{default:d(()=>[...c[1]||=[t(`Назад`,-1)]]),_:1})]),_:1})]),G.value&&$.value.length>0?(r(),m(`div`,T,[h(`span`,E,[i(s(_),{size:`56`},{default:d(()=>[i(s(ne))]),_:1})]),h(`div`,D,a(de.value),1),h(`div`,O,a(fe.value),1),h(`div`,k,` Баллы: `+a($.value[0]?.totalScore??0)+` · Поездки: `+a($.value[0]?.actionsCount??0),1),c[2]||=h(`div`,{class:`winner-congrats`},`Поздравляем!`,-1)])):e(``,!0),Y.value?(r(),m(`div`,A,[c[4]||=h(`p`,{class:`info-title`},`Для просмотра итогов игры нужно войти в систему`,-1),i(s(b),{justify:`end`},{default:d(()=>[i(s(v),{onClick:pe},{default:d(()=>[...c[3]||=[t(`Войти`,-1)]]),_:1})]),_:1})])):K.value?(r(),m(`div`,j,[h(`p`,M,a(q.value),1),J.value?(r(),m(u,{key:0},[c[6]||=h(`p`,{class:`info-subtitle`},`Сессия могла истечь — попробуйте войти заново`,-1),i(s(b),{justify:`end`},{default:d(()=>[i(s(v),{onClick:me},{default:d(()=>[...c[5]||=[t(`Войти заново`,-1)]]),_:1})]),_:1})],64)):e(``,!0)])):G.value&&Z.value.length==0?(r(),m(`div`,N,[...c[7]||=[h(`p`,{class:`info-title`},`Результаты пока не готовы`,-1)]])):G.value?(r(),m(`div`,P,[h(`table`,F,[h(`thead`,null,[h(`tr`,null,[c[8]||=h(`th`,{class:`place-col`},`Место`,-1),c[9]||=h(`th`,{class:`team-col`},`Команда`,-1),(r(!0),m(u,null,n(X.value,e=>(r(),m(`th`,{key:e.code,class:`question-col`,title:e.text},[h(`div`,L,a(e.text),1)],8,I))),128)),c[10]||=h(`th`,{class:`number-col`},`Сумма`,-1),c[11]||=h(`th`,{class:`number-col`},`Поездки`,-1)])]),h(`tbody`,null,[(r(!0),m(u,null,n(Z.value,e=>(r(),m(`tr`,{key:e.team?.ID},[h(`td`,R,[e.place!=null&&e.place>=1&&e.place<=3?(r(),m(`span`,{key:0,class:ee([`place-badge`,`place-`+e.place])},a(e.place),3)):(r(),m(`span`,z,a(e.place),1))]),h(`td`,se,a(e.team?.name),1),(r(!0),m(u,null,n(X.value,t=>(r(),m(`td`,{key:t.code,class:`number-col`},a(ue(e,t.code)),1))),128)),h(`td`,B,a(e.totalScore),1),h(`td`,V,a(e.actionsCount),1)]))),128))])])])):e(``,!0)])]),i(C,{active:`games`})],64))}}),[[`__scopeId`,`data-v-ed9aeaf7`]]),U=f({__name:`GameResultsView`,setup(e){return(e,t)=>(r(),o(H))}});export{U as default}; \ No newline at end of file +import{Ct as e,Dt as t,In as ee,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,l as p,u as te,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{n as g,t as _}from"./es-Qklex053.js";import{t as v}from"./Button-MBUKfT_Z.js";import{t as y}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as b}from"./Flex-Dsa9FxiA.js";import{i as x,o as S}from"./index-NE0dsiiJ.js";import{t as C}from"./HeaderMenu-vnmT21Il.js";var w={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},ne=f({name:`TrophyFilled`,render:function(e,t){return r(),m(`svg`,w,t[0]||=[h(`path`,{d:`M26 7h-2V6a2.002 2.002 0 0 0-2-2H10a2.002 2.002 0 0 0-2 2v1H6a2.002 2.002 0 0 0-2 2v3a4.005 4.005 0 0 0 4 4h.322A8.169 8.169 0 0 0 15 21.934V26h-5v2h12v-2h-5v-4.069A7.966 7.966 0 0 0 23.74 16H24a4.005 4.005 0 0 0 4-4V9a2.002 2.002 0 0 0-2-2zM8 14a2.002 2.002 0 0 1-2-2V9h2zm18-2a2.002 2.002 0 0 1-2 2V9h2z`,fill:`currentColor`},null,-1)])}}),re={class:`center-block-custom`},ie={class:`width1200`},ae={class:`page-header`},oe={key:0,class:`game-name`},T={key:0,class:`winner-block`},E={class:`winner-cup`,"aria-hidden":`true`},D={class:`winner-label`},O={class:`winner-names`},k={class:`winner-stats`},A={key:1,class:`info-block`},j={key:2,class:`info-block`},M={class:`info-title`},N={key:3,class:`info-block`},P={key:4,class:`table-scroll`},F={class:`results-table`},I=[`title`],L={class:`question-text`},R={class:`place-col`},z={key:1,class:`place-plain`},se={class:`team-col`},B={class:`number-col`},V={class:`number-col`},H=y(f({__name:`GameResultsPage`,setup(o){let f=x(),y=S(),w=g(),H=p(),U=te(),W=H.params.id,G=l(!1),K=l(!1),q=l(``),J=l(!1),Y=l(!1),X=l([]),Z=l([]),Q=l(``);async function ce(){G.value=!1,K.value=!1,Y.value=!1,J.value=!1;try{let e=await f.GetGameResults({gameID:Number(W)});X.value=e.questions||[],Z.value=e.teams||[],G.value=!0}catch{y.isAuthenticated?(q.value=`Не удалось загрузить результаты`,w.error(q.value),J.value=!0,K.value=!0):Y.value=!0}}ce();async function le(){try{let e=await f.GetGame({ID:Number(W)});Q.value=e.game?.name||``}catch{}}le();function ue(e,t){return(e.answers||[]).find(e=>e.questionCode==t)?.score??`—`}let $=c(()=>{let e=Z.value.map(e=>e.place).filter(e=>e!=null);if(e.length==0)return[];let t=Math.min(...e);return Z.value.filter(e=>e.place===t)}),de=c(()=>$.value.length>1?`Победители`:`Победитель`),fe=c(()=>{let e=$.value.map(e=>e.team?.name||``).filter(e=>e!=``);return e.length<=1?e[0]||``:e.length==2?e[0]+` и `+e[1]:e.slice(0,-1).join(`, `)+` и `+e[e.length-1]});function pe(){U.push(`/login`)}function me(){y.logout(),U.push(`/login`)}function he(){if(window.history.state?.back){U.back();return}U.push(`/games`)}return(o,c)=>(r(),m(u,null,[h(`div`,re,[h(`div`,ie,[h(`div`,ae,[i(s(b),{justify:`space-between`,align:`center`},{default:d(()=>[h(`div`,null,[c[0]||=h(`div`,{class:`page-title`},`Итоги игры`,-1),Q.value?(r(),m(`div`,oe,a(Q.value),1)):e(``,!0)]),i(s(v),{quaternary:``,onClick:he},{default:d(()=>[...c[1]||=[t(`Назад`,-1)]]),_:1})]),_:1})]),G.value&&$.value.length>0?(r(),m(`div`,T,[h(`span`,E,[i(s(_),{size:`56`},{default:d(()=>[i(s(ne))]),_:1})]),h(`div`,D,a(de.value),1),h(`div`,O,a(fe.value),1),h(`div`,k,` Баллы: `+a($.value[0]?.totalScore??0)+` · Поездки: `+a($.value[0]?.actionsCount??0),1),c[2]||=h(`div`,{class:`winner-congrats`},`Поздравляем!`,-1)])):e(``,!0),Y.value?(r(),m(`div`,A,[c[4]||=h(`p`,{class:`info-title`},`Для просмотра итогов игры нужно войти в систему`,-1),i(s(b),{justify:`end`},{default:d(()=>[i(s(v),{onClick:pe},{default:d(()=>[...c[3]||=[t(`Войти`,-1)]]),_:1})]),_:1})])):K.value?(r(),m(`div`,j,[h(`p`,M,a(q.value),1),J.value?(r(),m(u,{key:0},[c[6]||=h(`p`,{class:`info-subtitle`},`Сессия могла истечь — попробуйте войти заново`,-1),i(s(b),{justify:`end`},{default:d(()=>[i(s(v),{onClick:me},{default:d(()=>[...c[5]||=[t(`Войти заново`,-1)]]),_:1})]),_:1})],64)):e(``,!0)])):G.value&&Z.value.length==0?(r(),m(`div`,N,[...c[7]||=[h(`p`,{class:`info-title`},`Результаты пока не готовы`,-1)]])):G.value?(r(),m(`div`,P,[h(`table`,F,[h(`thead`,null,[h(`tr`,null,[c[8]||=h(`th`,{class:`place-col`},`Место`,-1),c[9]||=h(`th`,{class:`team-col`},`Команда`,-1),(r(!0),m(u,null,n(X.value,e=>(r(),m(`th`,{key:e.code,class:`question-col`,title:e.text},[h(`div`,L,a(e.text),1)],8,I))),128)),c[10]||=h(`th`,{class:`number-col`},`Сумма`,-1),c[11]||=h(`th`,{class:`number-col`},`Поездки`,-1)])]),h(`tbody`,null,[(r(!0),m(u,null,n(Z.value,e=>(r(),m(`tr`,{key:e.team?.ID},[h(`td`,R,[e.place!=null&&e.place>=1&&e.place<=3?(r(),m(`span`,{key:0,class:ee([`place-badge`,`place-`+e.place])},a(e.place),3)):(r(),m(`span`,z,a(e.place),1))]),h(`td`,se,a(e.team?.name),1),(r(!0),m(u,null,n(X.value,t=>(r(),m(`td`,{key:t.code,class:`number-col`},a(ue(e,t.code)),1))),128)),h(`td`,B,a(e.totalScore),1),h(`td`,V,a(e.actionsCount),1)]))),128))])])])):e(``,!0)])]),i(C,{active:`games`})],64))}}),[[`__scopeId`,`data-v-ed9aeaf7`]]),U=f({__name:`GameResultsView`,setup(e){return(e,t)=>(r(),o(H))}});export{U as default}; \ No newline at end of file diff --git a/frontend/dist/assets/GameView-7R4L26Pq.js b/frontend/dist/assets/GameView-7R4L26Pq.js new file mode 100644 index 0000000..a12a0bb --- /dev/null +++ b/frontend/dist/assets/GameView-7R4L26Pq.js @@ -0,0 +1,47 @@ +import{Ct as e,Dt as t,H as n,In as r,It as i,Jt as a,K as o,Kt as s,Ln as c,Mt as l,Ot as u,Pt as d,Q as f,Rn as p,Rt as m,St as h,U as g,Ut as _,Vt as v,Wt as y,Xt as b,Y as x,Yt as S,Zt as ee,an as C,at as w,bn as T,bt as E,d as D,en as O,f as te,fn as ne,g as re,hn as k,ht as A,in as j,it as M,kt as N,l as ie,nn as ae,nt as P,ot as oe,p as se,qt as ce,tt as le,u as ue,vn as de,wt as F,xt as I}from"./client-Bz0sY7Lm.js";import{d as fe}from"./utils-Dcx6g1AV.js";import{d as L,t as R}from"./Card-BGJkYb2B.js";import{n as pe,r as z,t as me}from"./es-Qklex053.js";import{i as he,w as ge}from"./Suffix-BBRLYxYK.js";import{t as _e}from"./Modal-xM6cEDIr.js";import{t as B}from"./use-merged-state-z45UzW9G.js";import{n as ve,t as V}from"./Button-MBUKfT_Z.js";import{n as ye,t as be}from"./Tabs-BaVejAu8.js";import{t as xe}from"./Select-CfXdJUVK.js";import{a as Se,c as H,i as Ce,o as we,s as Te,t as U}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as Ee}from"./Upload-DxQHkPqo.js";import{n as De}from"./use-form-item-Bl3X3aXB.js";import{t as Oe}from"./Add-BlaQeLtQ.js";import{t as W}from"./Input-CEIE7mTC.js";import{n as ke,t as Ae}from"./Switch-DEzgODFH.js";import{t as G}from"./Alert-BoUmQeXf.js";import{t as K}from"./Space-CstX9TL6.js";import{t as q}from"./Flex-Dsa9FxiA.js";import{t as je}from"./Rate-D7hhdTpC.js";import{t as Me}from"./QrCode-MTPi5t58.js";import{t as Ne}from"./Spin-CYkXlOyb.js";import{t as Pe}from"./text-LOpQkUng.js";import{A as Fe,D as Ie,J,T as Le,ct as Re,i as ze,k as Be,lt as Ve,nt as He,o as Ue,r as We,tt as Ge,ut as Ke,z as qe}from"./index-NE0dsiiJ.js";import{n as Je,t as Ye}from"./HeaderMenu-vnmT21Il.js";import{t as Xe}from"./binary_client-BOO__dKx.js";import{n as Ze,r as Qe}from"./application-Bg005825.js";import{n as $e,t as et}from"./datetime-BJNH0M1T.js";import{t as tt}from"./useDeviceContext-mGSTXKkG.js";var Y=N({name:`ChevronLeft`,render(){return l(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},l(`path`,{d:`M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z`,fill:`currentColor`}))}}),X=N({name:`ChevronRight`,render(){return l(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},l(`path`,{d:`M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z`,fill:`currentColor`}))}}),nt=P(`collapse`,`width: 100%;`,[P(`collapse-item`,` + font-size: var(--n-font-size); + color: var(--n-text-color); + transition: + color .3s var(--n-bezier), + border-color .3s var(--n-bezier); + margin: var(--n-item-margin); + `,[w(`disabled`,[M(`header`,`cursor: not-allowed;`,[M(`header-main`,` + color: var(--n-title-text-color-disabled); + `),P(`collapse-item-arrow`,` + color: var(--n-arrow-color-disabled); + `)])]),P(`collapse-item`,`margin-left: 32px;`),le(`&:first-child`,`margin-top: 0;`),le(`&:first-child >`,[M(`header`,`padding-top: 0;`)]),w(`left-arrow-placement`,[M(`header`,[P(`collapse-item-arrow`,`margin-right: 4px;`)])]),w(`right-arrow-placement`,[M(`header`,[P(`collapse-item-arrow`,`margin-left: 4px;`)])]),M(`content-wrapper`,[M(`content-inner`,`padding-top: 16px;`),Fe({duration:`0.15s`})]),w(`active`,[M(`header`,[w(`active`,[P(`collapse-item-arrow`,`transform: rotate(90deg);`)])])]),le(`&:not(:first-child)`,`border-top: 1px solid var(--n-divider-color);`),oe(`disabled`,[w(`trigger-area-main`,[M(`header`,[M(`header-main`,`cursor: pointer;`),P(`collapse-item-arrow`,`cursor: default;`)])]),w(`trigger-area-arrow`,[M(`header`,[P(`collapse-item-arrow`,`cursor: pointer;`)])]),w(`trigger-area-extra`,[M(`header`,[M(`header-extra`,`cursor: pointer;`)])])]),M(`header`,` + font-size: var(--n-title-font-size); + display: flex; + flex-wrap: nowrap; + align-items: center; + transition: color .3s var(--n-bezier); + position: relative; + padding: var(--n-title-padding); + color: var(--n-title-text-color); + `,[M(`header-main`,` + display: flex; + flex-wrap: nowrap; + align-items: center; + font-weight: var(--n-title-font-weight); + transition: color .3s var(--n-bezier); + flex: 1; + color: var(--n-title-text-color); + `),M(`header-extra`,` + display: flex; + align-items: center; + transition: color .3s var(--n-bezier); + color: var(--n-text-color); + `),P(`collapse-item-arrow`,` + display: flex; + transition: + transform .15s var(--n-bezier), + color .3s var(--n-bezier); + font-size: 18px; + color: var(--n-arrow-color); + `)])])]),rt=Object.assign(Object.assign({},se.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:`left`},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:`if`},triggerAreas:{type:Array,default:()=>[`main`,`extra`,`arrow`]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),it=x(`n-collapse`),at=N({name:`Collapse`,props:rt,slots:Object,setup(e,{slots:t}){let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=g(e),o=k(e.defaultExpandedNames),s=B(E(()=>e.expandedNames),o),c=se(`Collapse`,`-collapse`,nt,Le,e,r);function l(t){let{"onUpdate:expandedNames":n,onUpdateExpandedNames:r,onExpandedNamesChange:i}=e;r&&H(r,t),n&&H(n,t),i&&H(i,t),o.value=t}function u(t){let{onItemHeaderClick:n}=e;n&&H(n,t)}function d(t,n,r){let{accordion:i}=e,{value:a}=s;if(i)t?(l([n]),u({name:n,expanded:!0,event:r})):(l([]),u({name:n,expanded:!1,event:r}));else if(!Array.isArray(a))l([n]),u({name:n,expanded:!0,event:r});else{let e=a.slice(),t=e.findIndex(e=>n===e);~t?(e.splice(t,1),l(e),u({name:n,expanded:!1,event:r})):(e.push(n),l(e),u({name:n,expanded:!0,event:r}))}}ce(it,{props:e,mergedClsPrefixRef:r,expandedNamesRef:s,slots:t,toggleItem:d});let f=re(`Collapse`,a,r),p=E(()=>{let{common:{cubicBezierEaseInOut:e},self:{titleFontWeight:t,dividerColor:n,titlePadding:r,titleTextColor:i,titleTextColorDisabled:a,textColor:o,arrowColor:s,fontSize:l,titleFontSize:u,arrowColorDisabled:d,itemMargin:f}}=c.value;return{"--n-font-size":l,"--n-bezier":e,"--n-text-color":o,"--n-divider-color":n,"--n-title-padding":r,"--n-title-font-size":u,"--n-title-text-color":i,"--n-title-text-color-disabled":a,"--n-title-font-weight":t,"--n-arrow-color":s,"--n-arrow-color-disabled":d,"--n-item-margin":f}}),m=i?n(`collapse`,void 0,p,e):void 0;return{rtlEnabled:f,mergedTheme:c,mergedClsPrefix:r,cssVars:i?void 0:p,themeClass:m?.themeClass,onRender:m?.onRender}},render(){var e;return(e=this.onRender)==null||e.call(this),l(`div`,{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),ot=N({name:`CollapseItemContent`,props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:ge(de(e,`show`))}},render(){return l(qe,null,{default:()=>{let{show:e,displayDirective:t,onceTrue:n,clsPrefix:r}=this,i=t===`show`&&n,a=l(`div`,{class:`${r}-collapse-item__content-wrapper`},l(`div`,{class:`${r}-collapse-item__content-inner`},this.$slots));return i?C(a,[[Re,e]]):e?a:null}})}}),st=N({name:`CollapseItem`,props:{title:String,name:[String,Number],disabled:Boolean,displayDirective:String},setup(e){let{mergedRtlRef:t}=g(e),n=He(),r=Ge(()=>e.name??n),i=d(it);i||o(`collapse-item`,"`n-collapse-item` must be placed inside `n-collapse`.");let{expandedNamesRef:a,props:s,mergedClsPrefixRef:c,slots:l}=i,u=E(()=>{let{value:e}=a;if(Array.isArray(e)){let{value:t}=r;return!~e.findIndex(e=>e===t)}else if(e){let{value:t}=r;return t!==e}return!0});return{rtlEnabled:re(`Collapse`,t,c),collapseSlots:l,randomName:n,mergedClsPrefix:c,collapsed:u,triggerAreas:de(s,`triggerAreas`),mergedDisplayDirective:E(()=>{let{displayDirective:t}=e;return t||s.displayDirective}),arrowPlacement:E(()=>s.arrowPlacement),handleClick(t){let n=`main`;fe(t,`arrow`)&&(n=`arrow`),fe(t,`extra`)&&(n=`extra`),s.triggerAreas.includes(n)&&i&&!e.disabled&&i.toggleItem(u.value,r.value,t)}}},render(){let{collapseSlots:e,$slots:t,arrowPlacement:n,collapsed:r,mergedDisplayDirective:i,mergedClsPrefix:a,disabled:o,triggerAreas:s}=this,c=Se(t.header,{collapsed:r},()=>[this.title]),u=t[`header-extra`]||e[`header-extra`],d=t.arrow||e.arrow;return l(`div`,{class:[`${a}-collapse-item`,`${a}-collapse-item--${n}-arrow-placement`,o&&`${a}-collapse-item--disabled`,!r&&`${a}-collapse-item--active`,s.map(e=>`${a}-collapse-item--trigger-area-${e}`)]},l(`div`,{class:[`${a}-collapse-item__header`,!r&&`${a}-collapse-item__header--active`]},l(`div`,{class:`${a}-collapse-item__header-main`,onClick:this.handleClick},n===`right`&&c,l(`div`,{class:`${a}-collapse-item-arrow`,key:+!this.rtlEnabled,"data-arrow":!0},Se(d,{collapsed:r},()=>[l(J,{clsPrefix:a},{default:()=>this.rtlEnabled?l(Y,null):l(X,null)})])),n===`left`&&c),Te(u,{collapsed:r},e=>l(`div`,{class:`${a}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},e))),l(ot,{clsPrefix:a,displayDirective:i,show:!r},t))}});function ct(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var lt=te({name:`InputNumber`,common:D,peers:{Button:Ie,Input:Be},self:ct}),ut=le([P(`input-number-suffix`,` + display: inline-block; + margin-right: 10px; + `),P(`input-number-prefix`,` + display: inline-block; + margin-left: 10px; + `)]);function dt(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function Z(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function ft(e){return e==null?!0:!Number.isNaN(e)}function pt(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function mt(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var ht=800,gt=100,_t=N({name:`InputNumber`,props:Object.assign(Object.assign({},se.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r,mergedComponentPropsRef:i}=g(e),a=se(`InputNumber`,`-input-number`,ut,lt,e,n),{localeRef:o}=he(`InputNumber`),s=De(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:i?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:c,mergedDisabledRef:l,mergedStatusRef:u}=s,d=k(null),p=k(null),h=k(null),_=k(e.defaultValue),v=B(de(e,`value`),_),y=k(``),b=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},x=t=>{let n=[e.min,e.max,e.step,t].map(e=>e===void 0?0:b(e));return Math.max(...n)},S=Ge(()=>{let{placeholder:t}=e;return t===void 0?o.value.placeholder:t}),ee=Ge(()=>{let t=mt(e.step);return t===null||t===0?1:Math.abs(t)}),C=Ge(()=>{let t=mt(e.min);return t===null?null:t}),w=Ge(()=>{let t=mt(e.max);return t===null?null:t}),T=()=>{let{value:t}=v;if(ft(t)){let{format:n,precision:r}=e;n?y.value=n(t):t===null||r===void 0||b(t)>r?y.value=pt(t,void 0):y.value=pt(t,r)}else y.value=String(t)};T();let D=t=>{let{value:n}=v;if(t===n){T();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=e,{nTriggerFormInput:o,nTriggerFormChange:c}=s;a&&H(a,t),i&&H(i,t),r&&H(r,t),_.value=t,o(),c()},O=({offset:t,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=y;if(i&&Z(a))return!1;let o=(e.parse||dt)(a);if(o===null)return n&&D(null),null;if(ft(o)){let a=b(o),{precision:s}=e;if(s!==void 0&&st){if(!n||i)return!1;c=t}if(r!==null&&cO({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),ne=Ge(()=>{let{value:t}=v;if(e.validator&&t===null)return!1;let{value:n}=ee;return O({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),A=Ge(()=>{let{value:t}=v;if(e.validator&&t===null)return!1;let{value:n}=ee;return O({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function j(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=s;n&&H(n,t),r()}function M(t){if(t.target===d.value?.wrapperElRef)return;let n=O({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(n!==!1){let e=d.value?.inputElRef;e&&(e.value=String(n||``)),v.value===n&&T()}else T();let{onBlur:r}=e,{nTriggerFormBlur:i}=s;r&&H(r,t),i(),m(()=>{T()})}function N(t){let{onClear:n}=e;n&&H(n,t)}function ie(){let{value:t}=A;if(!t){me();return}let{value:n}=v;if(n===null)e.validator||D(le());else{let{value:e}=ee;O({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function P(){let{value:t}=ne;if(!t){pe();return}let{value:n}=v;if(n===null)e.validator||D(le());else{let{value:e}=ee;O({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let oe=j,ce=M;function le(){if(e.validator)return null;let{value:t}=C,{value:n}=w;return t===null?n===null?0:Math.min(0,n):Math.max(0,t)}function ue(e){N(e),D(null)}function F(e){var t;h.value?.$el.contains(e.target)&&e.preventDefault(),p.value?.$el.contains(e.target)&&e.preventDefault(),(t=d.value)==null||t.activate()}let I=null,fe=null,R=null;function pe(){R&&=(window.clearTimeout(R),null),I&&=(window.clearInterval(I),null)}let z=null;function me(){z&&=(window.clearTimeout(z),null),fe&&=(window.clearInterval(fe),null)}function ge(){pe(),R=window.setTimeout(()=>{I=window.setInterval(()=>{P()},gt)},ht),L(`mouseup`,document,pe,{once:!0})}function _e(){me(),z=window.setTimeout(()=>{fe=window.setInterval(()=>{ie()},gt)},ht),L(`mouseup`,document,me,{once:!0})}let ve=()=>{fe||ie()},V=()=>{I||P()};function ye(t){var n;if(t.key===`Enter`){if(t.target===d.value?.wrapperElRef)return;O({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=d.value)==null||n.deactivate())}else if(t.key===`ArrowUp`){if(!A.value||e.keyboard.ArrowUp===!1)return;t.preventDefault(),O({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&ie()}else if(t.key===`ArrowDown`){if(!ne.value||e.keyboard.ArrowDown===!1)return;t.preventDefault(),O({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&P()}}function be(t){y.value=t,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&O({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}ae(v,()=>{T()});let xe={focus:()=>d.value?.focus(),blur:()=>d.value?.blur(),select:()=>d.value?.select()},Se=re(`InputNumber`,r,n);return Object.assign(Object.assign({},xe),{rtlEnabled:Se,inputInstRef:d,minusButtonInstRef:p,addButtonInstRef:h,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:_,mergedValue:v,mergedPlaceholder:S,displayedValueInvalid:te,mergedSize:c,mergedDisabled:l,displayedValue:y,addable:A,minusable:ne,mergedStatus:u,handleFocus:oe,handleBlur:ce,handleClear:ue,handleMouseDown:F,handleAddClick:ve,handleMinusClick:V,handleAddMousedown:_e,handleMinusMousedown:ge,handleKeyDown:ye,handleUpdateDisplayedValue:be,mergedTheme:a,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:E(()=>{let{self:{iconColorDisabled:e}}=a.value,[t,n,r,i]=f(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:e,$slots:t}=this,n=()=>l(ve,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>Ce(t[`minus-icon`],()=>[l(J,{clsPrefix:e},{default:()=>l(ke,null)})])}),r=()=>l(ve,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>Ce(t[`add-icon`],()=>[l(J,{clsPrefix:e},{default:()=>l(Oe,null)})])});return l(`div`,{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},l(W,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[n(),we(t.prefix,t=>t?l(`span`,{class:`${e}-input-number-prefix`},t):null)]:t.prefix?.call(t),suffix:()=>this.showButton?[we(t.suffix,t=>t?l(`span`,{class:`${e}-input-number-suffix`},t):null),this.buttonPlacement===`right`?n():null,r()]:t.suffix?.call(t)}))}}),vt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},yt=N({name:`Flag`,render:function(e,t){return s(),F(`svg`,vt,t[0]||=[I(`path`,{d:`M6 30H4V2h24l-5.8 9l5.8 9H6zm0-12h18.33l-4.53-7l4.53-7H6z`,fill:`currentColor`},null,-1)])}}),bt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},xt=N({name:`Pause`,render:function(e,t){return s(),F(`svg`,bt,t[0]||=[I(`path`,{d:`M12 8v16H8V8h4m0-2H8a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z`,fill:`currentColor`},null,-1),I(`path`,{d:`M24 8v16h-4V8h4m0-2h-4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z`,fill:`currentColor`},null,-1)])}}),St={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Ct=N({name:`Play`,render:function(e,t){return s(),F(`svg`,St,t[0]||=[I(`path`,{d:`M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28zM8 6.69V25.31L24.925 16z`,fill:`currentColor`},null,-1)])}}),wt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Tt=N({name:`Reset`,render:function(e,t){return s(),F(`svg`,wt,t[0]||=[I(`path`,{d:`M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10z`,fill:`currentColor`},null,-1)])}}),Et={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Dt=N({name:`Trophy`,render:function(e,t){return s(),F(`svg`,Et,t[0]||=[I(`path`,{d:`M26 7h-2V6a2.002 2.002 0 0 0-2-2H10a2.002 2.002 0 0 0-2 2v1H6a2.002 2.002 0 0 0-2 2v3a4.005 4.005 0 0 0 4 4h.322A8.169 8.169 0 0 0 15 21.934V26h-5v2h12v-2h-5v-4.069A7.966 7.966 0 0 0 23.74 16H24a4.005 4.005 0 0 0 4-4V9a2.002 2.002 0 0 0-2-2zM8 14a2.002 2.002 0 0 1-2-2V9h2zm14 0a6 6 0 0 1-6.186 5.997A6.2 6.2 0 0 1 10 13.707V6h12zm4-2a2.002 2.002 0 0 1-2 2V9h2z`,fill:`currentColor`},null,-1)])}}),Ot={key:0,class:`timer-preview`},kt=[`src`],At=[`src`],jt={key:3,class:`preview-message`},Mt={key:4,class:`preview-message`},Nt={key:5,class:`preview-message`},Pt={key:6,class:`preview-message`},Ft={key:7,class:`preview-results`},It=[`src`],Lt=U(N({__name:`ScreenPreview`,props:{state:{},questions:{},teams:{}},setup(t){let n=t,r=k(Date.now()),i=k(0),o=k(Date.now()),l=k(),u=null,d=E(()=>{let e=n.state.backgroundImage||n.state.coverImage;return e?{backgroundImage:`linear-gradient(rgb(0 0 0 / 55%), rgb(0 0 0 / 55%)), url("${e}")`}:{}}),f=E(()=>n.state.timerState===`SCREEN_TIMER_STATE_RUNNING`?Math.max(0,i.value-(r.value-o.value)/1e3):i.value),m=E(()=>{let e=Math.floor(f.value/60),t=Math.floor(f.value%60);return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}),h=E(()=>Qe(n.state.introAudio)),g=E(()=>Qe(n.state.conclusionVideo));return ae(()=>[n.state.timerRemainingSeconds,n.state.timerState,n.state.stateVersion],()=>{let e=Math.max(0,Number(n.state.timerRemainingSeconds||0));if(n.state.timerState===`SCREEN_TIMER_STATE_RUNNING`&&l.value===n.state.timerState){let t=Math.max(0,i.value-(Date.now()-o.value)/1e3);if(Math.abs(e-t)<=.5)return}i.value=e,o.value=Date.now(),l.value=n.state.timerState},{immediate:!0}),_(()=>{u=window.setInterval(()=>{r.value=Date.now()},250)}),y(()=>{u!=null&&window.clearInterval(u)}),(n,r)=>(s(),F(`div`,{class:`screen-preview`,style:c(d.value)},[t.state.mode===`SCREEN_MODE_TIMER`?(s(),F(`div`,Ot,[I(`h2`,null,p(t.state.timerLabel||`Перерыв`),1),I(`strong`,null,p(m.value),1)])):t.state.mode===`SCREEN_MODE_INTRO`&&h.value?(s(),F(`audio`,{key:1,src:h.value,controls:``},null,8,kt)):t.state.mode===`SCREEN_MODE_CONCLUSION`&&g.value?(s(),F(`video`,{key:2,src:g.value,autoplay:``,class:`preview-video`,loop:``,muted:``,playsinline:``},null,8,At)):t.state.mode===`SCREEN_MODE_CONCLUSION`?(s(),F(`div`,jt,` Видео закрывашки не задано `)):t.state.mode===`SCREEN_MODE_INTRO_DONE`?(s(),F(`div`,Mt,`Успехов`)):t.state.mode===`SCREEN_MODE_CONCLUSION_DONE`?(s(),F(`div`,Nt,` Спасибо за игру! `)):t.state.mode===`SCREEN_MODE_TEXT`?(s(),F(`div`,Pt,p(t.state.text),1)):t.state.mode===`SCREEN_MODE_RESULTS`?(s(),F(`div`,Ft,[r[4]||=I(`h2`,null,`Результаты`,-1),I(`table`,null,[I(`thead`,null,[I(`tr`,null,[r[0]||=I(`th`,null,`Место`,-1),r[1]||=I(`th`,null,`Команда`,-1),(s(!0),F(A,null,a(t.questions,e=>(s(),F(`th`,{key:e.code},p(e.code),1))),128)),r[2]||=I(`th`,null,`Сумма`,-1),r[3]||=I(`th`,null,`Ходы`,-1)])]),I(`tbody`,null,[(s(!0),F(A,null,a(t.teams,e=>(s(),F(`tr`,{key:e.team?.ID},[I(`td`,null,p(e.place),1),I(`td`,null,p(e.team?.name),1),(s(!0),F(A,null,a(t.questions,t=>(s(),F(`td`,{key:t.code},p(e.answers?.find(e=>e.questionCode===t.code)?.score??0),1))),128)),I(`td`,null,p(e.totalScore),1),I(`td`,null,p(e.actionsCount),1)]))),128))])])])):t.state.coverImage?(s(),F(`img`,{key:8,src:t.state.coverImage,alt:`Обложка дела`,class:`preview-cover`},null,8,It)):e(``,!0)],4))}}),[[`__scopeId`,`data-v-d5134fb8`]]),Q=U(N({__name:`UiBlock`,props:{tag:{default:`div`}},setup(e){return(t,n)=>(s(),h(ee(e.tag),{class:`ui-block`},{default:j(()=>[S(t.$slots,`default`,{},void 0,!0)]),_:3}))}}),[[`__scopeId`,`data-v-80193f22`]]),Rt={class:`map-preview-layout`},zt=[`onPointerdown`],Bt=[`onPointerdown`],Vt={key:2},Ht=[`onClick`],Ut={key:1,class:`screen-preview-placeholder`},Wt={class:`screen-plan`},Gt={key:0,class:`screen-empty`},Kt=20,qt=U(N({__name:`GameMapPanel`,props:{mapItems:{},teams:{},screens:{},previewQuestions:{},previewTeams:{},screenPlan:{},screenPlanDraft:{},screenPlanDirty:{type:Boolean},screenPlanSaving:{type:Boolean},screenPlanMode:{},screenVolume:{},screenPosition:{}},emits:[`saveItem`,`dragging`,`giveApplication`,`addStep`,`edit`,`cancel`,`removeStep`,`moveStep`,`dirty`,`clearPlan`,`save`,`setStep`,`command`,`update:screenVolume`,`update:screenPosition`],setup(n,{emit:i}){let o=n,l=i,d=k(1),f=k({x:0,y:0}),m=k(),g=E(()=>o.screens.find(e=>e.status===`connected`)||o.screens[0]),_=E(()=>new Map(o.teams.filter(e=>e.applications?.length).map(e=>[e.ID,e]))),y=[{label:`Обложка`,value:`SCREEN_MODE_COVER`},{label:`Введение`,value:`SCREEN_MODE_INTRO`},{label:`Успехов`,value:`SCREEN_MODE_INTRO_DONE`},{label:`Закрывашка`,value:`SCREEN_MODE_CONCLUSION`},{label:`Спасибо за игру`,value:`SCREEN_MODE_CONCLUSION_DONE`},{label:`Результаты`,value:`SCREEN_MODE_RESULTS`},{label:`Таймер`,value:`SCREEN_MODE_TIMER`},{label:`Текст`,value:`SCREEN_MODE_TEXT`}],b,x;function S(e){let t=m.value;if(!t)return;let n=t.getBoundingClientRect();return{x:(e.clientX-n.left-t.clientLeft-f.value.x)/d.value,y:(e.clientY-n.top-t.clientTop-f.value.y)/d.value}}function ee(e,t){let n=S(t);n&&(b={item:e,offsetX:n.x-(e.x||0),offsetY:n.y-(e.y||0)},l(`dragging`,!0),window.addEventListener(`pointermove`,w),window.addEventListener(`pointerup`,D,{once:!0}),window.addEventListener(`pointercancel`,D,{once:!0}))}function w(e){if(!b)return;let t=S(e);t&&(b.item.x=Math.round((t.x-b.offsetX)/Kt)*Kt,b.item.y=Math.round((t.y-b.offsetY)/Kt)*Kt)}function D(){if(!b)return;let e=b.item;b=void 0,window.removeEventListener(`pointermove`,w),window.removeEventListener(`pointerup`,D),window.removeEventListener(`pointercancel`,D),l(`dragging`,!1),l(`saveItem`,e)}function O(e){e.hidden=!e.hidden,l(`saveItem`,e,e.hidden)}function te(e){d.value=Math.min(2,Math.max(.5,Number((d.value+e).toFixed(2))))}function ne(){d.value=1,f.value={x:0,y:0}}function re(e){e.button===0&&(x={startX:e.clientX,startY:e.clientY,offsetX:f.value.x,offsetY:f.value.y},window.addEventListener(`pointermove`,M),window.addEventListener(`pointerup`,N,{once:!0}))}function M(e){x&&(f.value={x:x.offsetX+e.clientX-x.startX,y:x.offsetY+e.clientY-x.startY})}function N(){x=void 0,window.removeEventListener(`pointermove`,M)}function ie(e){e.preventDefault(),te(e.deltaY<0?.1:-.1)}return v(()=>{b&&l(`dragging`,!1),window.removeEventListener(`pointermove`,w),window.removeEventListener(`pointerup`,D),window.removeEventListener(`pointercancel`,D),window.removeEventListener(`pointermove`,M),window.removeEventListener(`pointerup`,N)}),(i,o)=>(s(),F(`div`,Rt,[u(Q,null,{default:j(()=>[u(T(q),{align:`center`,justify:`space-between`,class:`screen-header`},{default:j(()=>[o[18]||=I(`p`,{class:`screens-title`},`Карта помещения`,-1),u(T(K),null,{default:j(()=>[u(T(V),{size:`small`,onClick:o[0]||=e=>te(-.1)},{default:j(()=>[...o[15]||=[t(`−`,-1)]]),_:1}),u(T(Pe),null,{default:j(()=>[t(p(Math.round(d.value*100))+`%`,1)]),_:1}),u(T(V),{size:`small`,onClick:o[1]||=e=>te(.1)},{default:j(()=>[...o[16]||=[t(`+`,-1)]]),_:1}),u(T(V),{size:`small`,onClick:ne},{default:j(()=>[...o[17]||=[t(`Сбросить`,-1)]]),_:1})]),_:1})]),_:1}),I(`div`,{ref_key:`mapField`,ref:m,class:`map-field`,onPointerdown:re,onWheel:ie},[I(`div`,{class:`map-canvas`,style:c({transform:`translate(${f.value.x}px, ${f.value.y}px) scale(${d.value})`})},[(s(!0),F(A,null,a(n.mapItems,n=>C((s(),F(`div`,{key:`${n.kind}-${n.itemID}`,class:r([`map-item`,[n.kind===`screen`?`map-screen`:n.kind===`organizer_desk`?`map-organizer-desk`:`map-team`,{"map-team-needs-applications":n.kind===`team`&&_.value.has(n.itemID)}]]),style:c({left:`${n.x||0}px`,top:`${n.y||0}px`}),onPointerdown:Ke(e=>n.kind!==`team`&&ee(n,e),[`stop`])},[n.kind===`team`?(s(),F(`div`,{key:0,class:`map-team-handle`,onPointerdown:Ke(e=>ee(n,e),[`stop`])},null,40,Bt)):e(``,!0),I(`span`,null,p(n.label),1),n.kind===`team`&&_.value.has(n.itemID)?(s(),h(T(K),{key:1,class:`map-team-applications`,vertical:``},{default:j(()=>[(s(!0),F(A,null,a(_.value.get(n.itemID)?.applications,e=>(s(),h(T(V),{key:e.name,size:`small`,onClick:t=>l(`giveApplication`,_.value.get(n.itemID),e)},{default:j(()=>[t(` Выдать: `+p(e.name),1)]),_:2},1032,[`onClick`]))),128))]),_:2},1024)):e(``,!0),n.kind===`screen`?(s(),F(`small`,Vt,p(n.status)+p(n.soundEnabled?` · звук`:``),1)):e(``,!0),I(`button`,{class:`map-item-hide`,type:`button`,onPointerdown:o[2]||=Ke(()=>{},[`stop`]),onClick:Ke(e=>O(n),[`stop`])},` × `,40,Ht)],46,zt)),[[Re,!n.hidden]])),128))],4)],544),n.mapItems.some(e=>e.hidden)?(s(),h(T(K),{key:0,class:`map-hidden-items`},{default:j(()=>[(s(!0),F(A,null,a(n.mapItems.filter(e=>e.hidden),e=>(s(),h(T(V),{key:`hidden-${e.kind}-${e.itemID}`,size:`small`,onClick:t=>O(e)},{default:j(()=>[t(` Добавить `+p(e.label),1)]),_:2},1032,[`onClick`]))),128))]),_:1})):e(``,!0)]),_:1}),u(Q,{tag:`aside`,class:`screen-preview-panel`},{default:j(()=>[o[41]||=I(`p`,{class:`screens-title`},`Превью экрана`,-1),g.value?.status===`connected`?(s(),h(Lt,{key:0,state:g.value,questions:n.previewQuestions,teams:n.previewTeams},null,8,[`state`,`questions`,`teams`])):(s(),F(`div`,Ut,`Экран не подключён`)),I(`div`,Wt,[u(T(q),{align:`center`,justify:`space-between`,class:`screen-header`},{default:j(()=>[o[23]||=I(`p`,{class:`screens-title`},`План экранов`,-1),u(T(K),null,{default:j(()=>[!n.screenPlan&&n.screenPlanMode===`use`?(s(),h(T(V),{key:0,size:`small`,onClick:o[3]||=e=>l(`addStep`)},{default:j(()=>[...o[19]||=[t(` Создать план `,-1)]]),_:1})):e(``,!0),n.screenPlan&&n.screenPlanMode===`use`?(s(),h(T(V),{key:1,size:`small`,onClick:o[4]||=e=>l(`edit`)},{default:j(()=>[...o[20]||=[t(` Редактировать `,-1)]]),_:1})):e(``,!0),n.screenPlanMode===`edit`?(s(),F(A,{key:2},[u(T(V),{size:`small`,disabled:n.screenPlanSaving,onClick:o[5]||=e=>l(`cancel`)},{default:j(()=>[...o[21]||=[t(` Отменить `,-1)]]),_:1},8,[`disabled`]),u(T(V),{size:`small`,type:`primary`,loading:n.screenPlanSaving,disabled:n.screenPlanSaving,onClick:o[6]||=e=>l(`save`)},{default:j(()=>[...o[22]||=[t(` Сохранить план `,-1)]]),_:1},8,[`loading`,`disabled`])],64)):e(``,!0)]),_:1})]),_:1}),!n.screenPlan&&n.screenPlanMode===`use`?(s(),F(`p`,Gt,` План экранов ещё не создан. `)):n.screenPlanMode===`edit`?(s(),F(A,{key:1},[(s(!0),F(A,null,a(n.screenPlanDraft,(r,i)=>(s(),h(T(K),{key:i,class:`screen-plan-step`,align:`center`,justify:`space-between`,wrap:``},{default:j(()=>[u(T(K),{align:`center`,wrap:``},{default:j(()=>[u(T(Pe),null,{default:j(()=>[t(p(i+1),1)]),_:2},1024),u(T(xe),{value:r.mode,"onUpdate:value":[e=>r.mode=e,o[7]||=e=>l(`dirty`)],options:y,disabled:n.screenPlanSaving,size:`small`,style:{width:`180px`}},null,8,[`value`,`onUpdate:value`,`disabled`]),r.mode===`SCREEN_MODE_TEXT`?(s(),h(T(W),{key:0,value:r.text,"onUpdate:value":[e=>r.text=e,o[8]||=e=>l(`dirty`)],disabled:n.screenPlanSaving,size:`small`,placeholder:`Текст экрана`,style:{"min-width":`240px`}},null,8,[`value`,`onUpdate:value`,`disabled`])):e(``,!0),r.mode===`SCREEN_MODE_TIMER`?(s(),F(A,{key:1},[u(T(W),{value:r.timerLabel,"onUpdate:value":[e=>r.timerLabel=e,o[9]||=e=>l(`dirty`)],disabled:n.screenPlanSaving,size:`small`,placeholder:`Надпись таймера`},null,8,[`value`,`onUpdate:value`,`disabled`]),u(T(_t),{value:r.timerDurationSeconds,"onUpdate:value":[e=>r.timerDurationSeconds=e,o[10]||=e=>l(`dirty`)],min:1,max:86400,disabled:n.screenPlanSaving,size:`small`,placeholder:`Секунды`},null,8,[`value`,`onUpdate:value`,`disabled`])],64)):e(``,!0)]),_:2},1024),u(T(K),{class:`screen-plan-actions`},{default:j(()=>[u(T(V),{size:`small`,disabled:n.screenPlanSaving||i===0,onClick:e=>l(`moveStep`,i,-1)},{default:j(()=>[...o[24]||=[t(` ↑ `,-1)]]),_:1},8,[`disabled`,`onClick`]),u(T(V),{size:`small`,disabled:n.screenPlanSaving||i===n.screenPlanDraft.length-1,onClick:e=>l(`moveStep`,i,1)},{default:j(()=>[...o[25]||=[t(` ↓ `,-1)]]),_:1},8,[`disabled`,`onClick`]),u(T(V),{size:`small`,type:`error`,ghost:``,disabled:n.screenPlanSaving,onClick:e=>l(`removeStep`,i)},{default:j(()=>[...o[26]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`,`onClick`])]),_:2},1024)]),_:2},1024))),128)),u(T(K),null,{default:j(()=>[u(T(V),{size:`small`,disabled:n.screenPlanSaving,onClick:o[11]||=e=>l(`addStep`)},{default:j(()=>[...o[27]||=[t(` Добавить шаг `,-1)]]),_:1},8,[`disabled`]),n.screenPlanDraft.length?(s(),h(T(V),{key:0,size:`small`,disabled:n.screenPlanSaving,onClick:o[12]||=e=>l(`clearPlan`)},{default:j(()=>[...o[28]||=[t(` Удалить план `,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})],64)):n.screenPlan?(s(!0),F(A,{key:2},a(n.screenPlan.steps||[],(r,i)=>(s(),h(T(K),{key:i,class:`screen-plan-step`,align:`center`,justify:`space-between`,wrap:``},{default:j(()=>[u(T(K),{align:`center`},{default:j(()=>[u(T(Pe),null,{default:j(()=>[t(p(i+1),1)]),_:2},1024),u(T(Pe),null,{default:j(()=>[t(p(y.find(e=>e.value===r.mode)?.label)+` `,1),r.mode===`SCREEN_MODE_TEXT`?(s(),F(A,{key:0},[t(`: `+p(r.text),1)],64)):r.mode===`SCREEN_MODE_TIMER`?(s(),F(A,{key:1},[t(` : `+p(r.timerLabel)+` (`+p(r.timerDurationSeconds)+` с) `,1)],64)):e(``,!0)]),_:2},1024)]),_:2},1024),u(T(K),{class:`screen-plan-actions`},{default:j(()=>[u(T(V),{size:`small`,type:n.screenPlan.currentStep===i?`primary`:`default`,disabled:n.screenPlan.currentStep===i,onClick:e=>l(`setStep`,i)},{default:j(()=>[...o[29]||=[t(` Показать `,-1)]]),_:1},8,[`type`,`disabled`,`onClick`]),n.screenPlan.currentStep===i?(s(),F(A,{key:0},[r.mode===`SCREEN_MODE_TIMER`?(s(),F(A,{key:0},[u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_TIMER_START`)},{default:j(()=>[...o[30]||=[t(` Старт `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_TIMER_PAUSE`)},{default:j(()=>[...o[31]||=[t(` Пауза `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_TIMER_RESUME`)},{default:j(()=>[...o[32]||=[t(` Продолжить `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_TIMER_RESET`)},{default:j(()=>[...o[33]||=[t(` Сбросить `,-1)]]),_:1},8,[`onClick`])],64)):r.mode===`SCREEN_MODE_INTRO`||r.mode===`SCREEN_MODE_CONCLUSION`?(s(),F(A,{key:1},[u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_PLAY`)},{default:j(()=>[...o[34]||=[t(` Запуск `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_PAUSE`)},{default:j(()=>[...o[35]||=[t(` Пауза `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_RESUME`)},{default:j(()=>[...o[36]||=[t(` Продолжить `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_STOP`)},{default:j(()=>[...o[37]||=[t(` Стоп `,-1)]]),_:1},8,[`onClick`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_REPLAY`)},{default:j(()=>[...o[38]||=[t(` Повтор `,-1)]]),_:1},8,[`onClick`]),u(T(_t),{value:n.screenVolume,min:0,max:100,step:5,size:`small`,"onUpdate:value":o[13]||=e=>l(`update:screenVolume`,e)},null,8,[`value`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_VOLUME`)},{default:j(()=>[...o[39]||=[t(` Громкость `,-1)]]),_:1},8,[`onClick`]),u(T(_t),{value:n.screenPosition,min:0,step:5,size:`small`,"onUpdate:value":o[14]||=e=>l(`update:screenPosition`,e)},null,8,[`value`]),u(T(V),{size:`small`,onClick:e=>l(`command`,r.mode,`SCREEN_COMMAND_SEEK`)},{default:j(()=>[...o[40]||=[t(` Перемотать `,-1)]]),_:1},8,[`onClick`])],64)):e(``,!0)],64)):e(``,!0)]),_:2},1024)]),_:2},1024))),128)):e(``,!0)])]),_:1})]))}}),[[`__scopeId`,`data-v-1e1af018`]]),Jt=U(N({__name:`ScreenBindingModal`,props:i({binding:{type:Boolean}},{show:{type:Boolean,required:!0},showModifiers:{}}),emits:i([`scanned`],[`update:show`]),setup(n,{emit:r}){let i=O(n,`show`),a=r,o=k(``),c=k(),l=k(!1),d,f=0;function g(){cancelAnimationFrame(f),d?.getTracks().forEach(e=>e.stop()),d=void 0,l.value=!1}function _(e){try{let t=new URL(e,window.location.origin),n=t.searchParams.get(`screenId`),r=t.searchParams.get(`accessToken`);return t.pathname!==`/screen`||!n||!r?void 0:{screenID:n,accessToken:r}}catch{return}}async function y(){let e=window.BarcodeDetector;if(!e||!navigator.mediaDevices?.getUserMedia){o.value=`Сканирование камерой не поддерживается в этом браузере.`;return}o.value=``;try{if(d=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),l.value=!0,await m(),!c.value)return;c.value.srcObject=d,await c.value.play();let t=new e,n=async()=>{if(!(!c.value||!d))try{let e=(await t.detect(c.value))[0]?.rawValue;if(e){let t=_(e);if(t){g(),i.value=!1,a(`scanned`,t.screenID,t.accessToken);return}o.value=`Это не QR-код экрана.`}f=requestAnimationFrame(n)}catch{o.value=`Не удалось распознать QR-код.`,g()}};f=requestAnimationFrame(n)}catch{o.value=`Не удалось открыть камеру.`,g()}}function b(){g(),i.value=!1}return ae(i,e=>{e?y():g()}),v(g),(r,a)=>(s(),h(T(_e),{show:i.value,"onUpdate:show":a[0]||=e=>i.value=e},{default:j(()=>[u(T(R),{style:{width:`min(600px, 94vw)`},title:`Привязать экран`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:b},{default:j(()=>[...a[1]||=[t(` x `,-1)]]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[I(`video`,{ref_key:`scannerVideo`,ref:c,class:`screen-scanner-video`,muted:``,playsinline:``},null,512),o.value?(s(),h(T(G),{key:0,type:`error`},{default:j(()=>[t(p(o.value),1)]),_:1})):e(``,!0),!l.value&&!n.binding?(s(),h(T(V),{key:1,type:`primary`,onClick:y},{default:j(()=>[...a[2]||=[t(` Сканировать QR-код `,-1)]]),_:1})):e(``,!0),l.value?(s(),h(T(V),{key:2,onClick:g},{default:j(()=>[...a[3]||=[t(`Остановить камеру`,-1)]]),_:1})):e(``,!0),n.binding?(s(),h(T(V),{key:3,type:`primary`,loading:``},{default:j(()=>[...a[4]||=[t(`Привязка…`,-1)]]),_:1})):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-5f530845`]]),Yt={key:1,class:`screen-empty`},Xt={class:`screen-status`},Zt={key:0,class:`screen-error`},Qt={key:0,class:`track-list`},$t={key:0,class:`track-empty`},en={class:`track-main`},tn={class:`track-number`},nn={class:`track-details`},$={class:`track-name`},rn={class:`volume-control`},an=U(N({__name:`GameScreensPanel`,props:{screens:{},screenBinding:{type:Boolean},playlists:{},music:{}},emits:[`bind`,`setSound`,`unbind`,`setMusic`,`createPlaylist`,`deletePlaylist`,`uploadTrack`,`deleteTrack`],setup(n,{emit:i}){let o=n,c=i,l=k(!1),d=k(``);function f(e){e.file.file&&c(`uploadTrack`,e.file.file)}function m(e){e!==o.music?.trackIndex&&c(`setMusic`,{trackIndex:e,positionMs:0})}return(i,g)=>{let _=b(`n-tag`);return s(),F(A,null,[u(Q,null,{default:j(()=>[u(T(q),{align:`center`,justify:`space-between`,class:`screen-header`},{default:j(()=>[g[13]||=I(`p`,{class:`screens-title`},`Экраны`,-1),u(T(V),{size:`small`,onClick:g[0]||=e=>l.value=!0},{default:j(()=>[...g[12]||=[t(` Привязать экран `,-1)]]),_:1})]),_:1}),n.screens.some(e=>e.status===`disconnected`)?(s(),h(T(G),{key:0,type:`warning`,title:`Проверьте подключение экрана`},{default:j(()=>[...g[14]||=[t(` Один или несколько экранов не выходят на связь более минуты. `,-1)]]),_:1})):e(``,!0),n.screens.length===0?(s(),F(`p`,Yt,`К игре пока не привязаны экраны.`)):(s(!0),F(A,{key:2},a(n.screens,n=>(s(),F(`div`,{key:n.ID,class:`screen-row`},[I(`div`,null,[I(`div`,null,`Экран `+p(n.ID),1),I(`div`,Xt,p(n.status===`connected`?`Онлайн`:`Оффлайн`),1),n.error?(s(),F(`div`,Zt,p(n.error),1)):e(``,!0)]),u(T(q),{justify:`end`},{default:j(()=>[n.soundEnabled?(s(),h(_,{key:0,type:`success`},{default:j(()=>[...g[15]||=[t(`Со звуком`,-1)]]),_:1})):(s(),h(T(V),{key:1,size:`small`,onClick:e=>c(`setSound`,n)},{default:j(()=>[...g[16]||=[t(`Назначить звук`,-1)]]),_:1},8,[`onClick`])),u(T(V),{size:`small`,type:`error`,ghost:``,onClick:e=>c(`unbind`,n)},{default:j(()=>[...g[17]||=[t(` Отвязать `,-1)]]),_:1},8,[`onClick`])]),_:2},1024)]))),128))]),_:1}),u(Jt,{show:l.value,"onUpdate:show":g[1]||=e=>l.value=e,binding:o.screenBinding,onScanned:g[2]||=(e,t)=>c(`bind`,e,t)},null,8,[`show`,`binding`]),u(Q,{class:`music-block`},{default:j(()=>[g[29]||=I(`p`,{class:`screens-title`},`Музыка`,-1),u(T(q),{align:`center`,wrap:``,class:`playlist-actions`},{default:j(()=>[u(T(W),{value:d.value,"onUpdate:value":g[3]||=e=>d.value=e,placeholder:`Новый плейлист`,style:{"max-width":`220px`}},null,8,[`value`]),u(T(V),{size:`small`,disabled:!d.value.trim(),onClick:g[4]||=e=>{c(`createPlaylist`,d.value.trim()),d.value=``}},{default:j(()=>[...g[18]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`]),o.music?.playlist?.ID?(s(),h(T(V),{key:0,size:`small`,type:`error`,ghost:``,onClick:g[5]||=e=>c(`deletePlaylist`,o.music.playlist.ID)},{default:j(()=>[...g[19]||=[t(` Удалить плейлист `,-1)]]),_:1})):e(``,!0),u(T(Ee),{accept:`.mp3,audio/mpeg`,"default-upload":!1,"show-file-list":!1,onChange:f},{default:j(()=>[u(T(V),{size:`small`},{default:j(()=>[...g[20]||=[t(`Добавить MP3`,-1)]]),_:1})]),_:1})]),_:1}),u(T(q),{align:`center`,wrap:``},{default:j(()=>[u(T(xe),{value:o.music?.playlist?.ID,options:o.playlists.map(e=>({label:e.name,value:e.ID})),placeholder:`Плейлист`,clearable:``,style:{"min-width":`220px`},"onUpdate:value":g[6]||=e=>c(`setMusic`,{playlistID:e||0,trackIndex:0,playback:`MUSIC_PLAYBACK_STOPPED`})},null,8,[`value`,`options`]),o.music?.playlist?(s(),F(`div`,Qt,[o.music.playlist.tracks?.length?e(``,!0):(s(),F(`p`,$t,`В плейлисте пока нет треков.`)),(s(!0),F(A,null,a(o.music.playlist.tracks,(e,n)=>(s(),F(`div`,{key:e.ID,class:r([`track-row`,{"track-row-active":n===(o.music.trackIndex??0)}])},[I(`div`,en,[I(`span`,tn,p(n+1),1),I(`span`,nn,[I(`span`,$,p(e.name||`Трек ${n+1}`),1)])]),u(T(q),{align:`center`,class:`track-actions`},{default:j(()=>[u(T(V),{size:`small`,type:n===(o.music.trackIndex??0)?`success`:`primary`,ghost:``,class:r({"track-switch-active":n===(o.music.trackIndex??0)}),onClick:e=>m(n)},{default:j(()=>[t(p(n===(o.music.trackIndex??0)?o.music.playback===`MUSIC_PLAYBACK_PLAYING`?`Играет`:`Выбран`:`Включить`),1)]),_:2},1032,[`type`,`class`,`onClick`]),u(T(V),{size:`small`,type:`error`,ghost:``,onClick:t=>c(`deleteTrack`,e.ID)},{default:j(()=>[...g[21]||=[t(` Удалить `,-1)]]),_:1},8,[`onClick`])]),_:2},1024)],2))),128))])):e(``,!0),u(T(V),{size:`small`,onClick:g[7]||=e=>c(`setMusic`,{playback:`MUSIC_PLAYBACK_PLAYING`})},{default:j(()=>[...g[22]||=[t(`Старт`,-1)]]),_:1}),u(T(V),{size:`small`,onClick:g[8]||=e=>c(`setMusic`,{playback:`MUSIC_PLAYBACK_PAUSED`})},{default:j(()=>[...g[23]||=[t(`Пауза`,-1)]]),_:1}),u(T(V),{size:`small`,onClick:g[9]||=e=>c(`setMusic`,{playback:`MUSIC_PLAYBACK_STOPPED`,positionMs:0})},{default:j(()=>[...g[24]||=[t(`Стоп`,-1)]]),_:1}),I(`div`,rn,[g[26]||=I(`span`,{class:`volume-label`},`Громкость`,-1),u(T(_t),{value:o.music?.volume??100,min:0,max:100,step:5,size:`small`,"show-button":!0,"aria-label":`Громкость музыки`,class:`volume-input`,"onUpdate:value":g[10]||=e=>e!=null&&c(`setMusic`,{volume:e})},{suffix:j(()=>[...g[25]||=[t(`%`,-1)]]),_:1},8,[`value`])]),u(T(Ae),{value:o.music?.loop,round:!1,"onUpdate:value":g[11]||=e=>c(`setMusic`,{loop:e})},{checked:j(()=>[...g[27]||=[t(`Loop`,-1)]]),unchecked:j(()=>[...g[28]||=[t(`Loop`,-1)]]),_:1},8,[`value`])]),_:1})]),_:1})],64)}}}),[[`__scopeId`,`data-v-c8e2dfff`]]),on={key:0},sn={key:3},cn={key:4},ln={key:0},un={key:2},dn={key:0},fn={class:`device-details`},pn={key:0},mn={key:1},hn=U(N({__name:`GameStatePanel`,props:{devices:{},wifi:{},serverTime:{},isLoading:{type:Boolean},hasError:{type:Boolean},summary:{}},emits:[`reload`],setup(n){let r={browser:`Браузер`,organizer:`Организатор`,team:`Команда`,screen:`Экран`};return(i,o)=>(s(),F(A,null,[u(Q,null,{default:j(()=>[u(T(q),null,{default:j(()=>[u(T(z),{type:`success`},{default:j(()=>[t(`Доступны: `+p(n.summary.connected),1)]),_:1}),u(T(z),{type:`warning`},{default:j(()=>[t(`Нет связи: `+p(n.summary.disconnected),1)]),_:1}),u(T(z),null,{default:j(()=>[t(`Подключения: `+p(n.summary.connections),1)]),_:1})]),_:1}),n.serverTime?(s(),F(`p`,on,`Последнее обновление: `+p(T(et)(n.serverTime)),1)):e(``,!0),o[2]||=I(`p`,null,`«Нет связи» означает отсутствие heartbeat сайта. UUID обозначает браузерный профиль.`,-1),n.hasError?(s(),h(T(G),{key:1,type:`error`,title:`Не удалось обновить состояние`},{default:j(()=>[u(T(V),{loading:n.isLoading,onClick:o[0]||=e=>i.$emit(`reload`)},{default:j(()=>[...o[1]||=[t(`Повторить`,-1)]]),_:1},8,[`loading`])]),_:1})):e(``,!0),n.isLoading&&!n.serverTime?(s(),h(T(Ne),{key:2})):!n.hasError&&!n.serverTime&&!n.isLoading?(s(),F(`p`,sn,`Загружаем состояние…`)):n.serverTime&&!n.devices.length?(s(),F(`p`,cn,`Устройства этой игры пока не зарегистрированы`)):e(``,!0)]),_:1}),u(Q,null,{default:j(()=>[o[4]||=I(`h3`,null,`Wi-Fi площадки`,-1),o[5]||=I(`p`,null,` Все Wi-Fi-клиенты Cudy, независимо от выбранной игры. MAC устройства и UUID браузера различаются. `,-1),n.wifi?.enabled?(s(),F(A,{key:1},[n.wifi.hasError?(s(),h(T(G),{key:0,type:`warning`,role:`alert`,title:`Не удалось обновить данные Cudy`})):e(``,!0),n.wifi.stale?(s(),h(T(z),{key:1,type:`warning`},{default:j(()=>[...o[3]||=[t(`Данные устарели`,-1)]]),_:1})):e(``,!0),n.wifi.collectedAt?(s(),F(`p`,un,` Последний снимок Cudy: `+p(T(et)(n.wifi.collectedAt)),1)):e(``,!0),n.wifi.collectedAt?(s(),F(A,{key:3},[I(`p`,null,`Wi-Fi-клиентов: `+p(n.wifi.clients?.length||0),1),n.wifi.clients?.length?e(``,!0):(s(),F(`p`,dn,`Wi-Fi-клиенты пока не подключены`)),(s(!0),F(A,null,a(n.wifi.clients,e=>(s(),F(`div`,{key:e.MAC,class:`connection device-details`},[I(`strong`,null,p(e.MAC),1),I(`p`,null,`IP: `+p(e.IP||`—`)+` · `+p(e.band),1),I(`p`,null,`Сигнал: `+p(e.signal===void 0?`Нет данных`:`${e.signal} dBm`),1)]))),128))],64)):e(``,!0)],64)):(s(),F(`p`,ln,`Сбор данных Cudy не настроен`))]),_:1}),(s(!0),F(A,null,a(n.devices,n=>(s(),h(Q,{key:n.ID},{default:j(()=>[I(`div`,fn,[I(`strong`,null,p(n.ID),1),I(`p`,null,[u(T(z),{type:n.connected?`success`:`warning`},{default:j(()=>[t(p(n.connected?`Доступно`:`Нет связи`),1)]),_:2},1032,[`type`])]),I(`p`,null,`Последнее обращение: `+p(T(et)(n.lastSeenAt)||`—`),1),u(T(at),null,{default:j(()=>[u(T(st),{title:`Подключения`,name:n.ID||``},{default:j(()=>[(s(!0),F(A,null,a(n.connections,t=>(s(),F(`div`,{key:t.ID,class:`connection`},[I(`strong`,null,p(r[t.kind||``]||t.kind),1),t.teamID?(s(),F(`p`,pn,`ID команды: `+p(t.teamID),1)):e(``,!0),t.screenID?(s(),F(`p`,mn,`ID экрана: `+p(t.screenID),1)):e(``,!0),I(`p`,null,p(t.connected?`Доступно`:`Нет связи`),1),I(`p`,null,`Последнее обращение: `+p(T(et)(t.lastSeenAt)||`—`),1),I(`p`,null,`IP: `+p(t.IP||`—`),1),I(`p`,null,`User-Agent: `+p(t.userAgent||`—`),1)]))),128))]),_:2},1032,[`name`])]),_:2},1024)])]),_:2},1024))),128))],64))}}),[[`__scopeId`,`data-v-a670747a`]]),gn={class:`team-content-block`},_n={class:`title-block`},vn={class:`team-name-block`},yn={key:0},bn={key:1},xn={key:0},Sn={key:0},Cn={key:1},wn={key:2},Tn={key:3},En={key:4},Dn=U(N({__name:`GameTeamsPanel`,props:{teams:{},participationOptions:{}},emits:[`add`,`open-qr`,`preview`,`delete`,`give-application`],setup(n,{emit:r}){let i=r;return(r,o)=>(s(),F(A,null,[u(Q,{class:`team-block-hover`,onClick:o[0]||=e=>i(`add`)},{default:j(()=>[...o[1]||=[I(`p`,{class:`place-image-plus`},`+`,-1)]]),_:1}),(s(!0),F(A,null,a(n.teams,r=>(s(),h(Q,{key:r.ID},{default:j(()=>[I(`div`,gn,[u(T(q),{justify:`space-between`},{default:j(()=>[I(`div`,_n,[I(`span`,vn,[t(p(r.name)+` `,1),r.captainEmail?(s(),F(`small`,yn,` — `+p(r.captainEmail),1)):e(``,!0),r.participantsCount?(s(),F(`small`,bn,` · Участников: `+p(r.participantsCount),1)):e(``,!0)]),r.captainEmail||r.participationStatus!==`pending`?(s(),F(`div`,xn,[t(p(n.participationOptions.find(e=>e.value===r.participationStatus)?.label),1),r.participationSource===`automatic`?(s(),F(`span`,Sn,` · автоматически`)):e(``,!0)])):e(``,!0),r.captainEmail?r.participationEmailError?(s(),F(`div`,wn,` Ошибка отправки: `+p(r.participationEmailError),1)):r.participationEmailSent?(s(),F(`div`,Tn,`Письмо отправлено`)):e(``,!0):(s(),F(`div`,Cn,`Почта капитана не указана`)),r.participationStatus===`cancelled`?e(``,!0):(s(),F(`div`,En,` Поездки: `+p(r.actionsCount),1))]),u(T(q),{justify:`end`},{default:j(()=>[r.participationStatus===`cancelled`?e(``,!0):(s(),h(T(V),{key:0,onClick:e=>i(`open-qr`,r)},{default:j(()=>[...o[2]||=[t(`QR`,-1)]]),_:1},8,[`onClick`])),r.participationStatus===`cancelled`?e(``,!0):(s(),h(T(V),{key:1,onClick:e=>i(`preview`,r.ID,r.password)},{default:j(()=>[...o[3]||=[t(`Подсмотреть игру`,-1)]]),_:1},8,[`onClick`])),u(T(V),{type:`error`,ghost:``,onClick:e=>i(`delete`,r)},{default:j(()=>[...o[4]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1024),(s(!0),F(A,null,a(r.applications,e=>(s(),h(T(V),{key:e.name,class:`link-button`,onClick:t=>i(`give-application`,r,e)},{default:j(()=>[t(` Выдать: `+p(e.name),1)]),_:2},1032,[`onClick`]))),128))])]),_:2},1024))),128))],64))}}),[[`__scopeId`,`data-v-561486cb`]]),On={key:0},kn={key:1},An={key:2},jn=U(N({__name:`TicketCheckModal`,props:{show:{type:Boolean,required:!0},showModifiers:{}},emits:[`update:show`],setup(n){let r=O(n,`show`),i=ze(),a=pe(),o=k(``),c=k(),l=k(``),d=k(!1),f=k(),g=k(!1),_,y=0,b=E(()=>{try{return new URL(o.value.trim()).pathname.match(/\/tickets\/([^/]+)/)?.[1]||``}catch{return o.value.trim()}});async function x(){if(!(!b.value||d.value)){d.value=!0,l.value=``,c.value=void 0;try{let e=await i.GetTicket({token:b.value});e.ticket?c.value=e.ticket:l.value=`Билет не найден`}catch(e){l.value=e instanceof Error?e.message:`Не удалось проверить билет`}finally{d.value=!1}}}async function S(){if(!(!b.value||d.value)){d.value=!0,l.value=``;try{let e=await i.AcceptTicket({token:b.value});e.ticket?(c.value=e.ticket,a.success(`Билет принят`)):l.value=`Не удалось принять билет`}catch(e){l.value=e instanceof Error?e.message:`Не удалось принять билет`}finally{d.value=!1}}}async function ee(){let e=window.BarcodeDetector;if(!e||!navigator.mediaDevices?.getUserMedia){l.value=`Сканирование камерой не поддерживается. Введите ссылку вручную.`;return}l.value=``;try{if(_=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),g.value=!0,await m(),!f.value)return;f.value.srcObject=_,await f.value.play();let t=new e,n=async()=>{if(!(!g.value||!f.value))try{let e=(await t.detect(f.value))[0]?.rawValue;if(e){o.value=e,C(),await x();return}y=requestAnimationFrame(n)}catch{l.value=`Не удалось распознать QR-код.`,C()}};y=requestAnimationFrame(n)}catch{l.value=`Не удалось открыть камеру. Введите ссылку вручную.`,C()}}function C(){cancelAnimationFrame(y),_?.getTracks().forEach(e=>e.stop()),_=void 0,g.value=!1}function w(){C(),r.value=!1}return ae(r,e=>{e?ee():C()}),v(C),(n,i)=>(s(),h(T(_e),{show:r.value,"onUpdate:show":i[1]||=e=>r.value=e},{default:j(()=>[u(T(R),{style:{width:`min(600px, 94vw)`},title:`Проверка билета`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:w},{default:j(()=>[...i[2]||=[t(` x `,-1)]]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[g.value?(s(),F(`video`,{key:0,ref_key:`video`,ref:f,class:`ticket-scanner-video`,muted:``,playsinline:``},null,512)):e(``,!0),l.value?(s(),h(T(G),{key:1,type:`error`},{default:j(()=>[t(p(l.value),1)]),_:1})):e(``,!0),g.value?(s(),h(T(V),{key:3,onClick:C},{default:j(()=>[...i[4]||=[t(`Остановить камеру`,-1)]]),_:1})):(s(),h(T(V),{key:2,onClick:ee},{default:j(()=>[...i[3]||=[t(`Сканировать QR-код`,-1)]]),_:1})),u(T(W),{value:o.value,"onUpdate:value":i[0]||=e=>o.value=e,placeholder:`Или вставьте ссылку на билет`,onKeyup:Ve(x,[`enter`])},null,8,[`value`]),u(T(V),{type:`primary`,loading:d.value,onClick:x},{default:j(()=>[...i[5]||=[t(` Проверить билет `,-1)]]),_:1},8,[`loading`]),c.value?(s(),F(A,{key:4},[u(T(G),{type:c.value.status===`active`?`success`:`warning`},{default:j(()=>[t(p(c.value.gameName),1),i[6]||=I(`br`,null,null,-1),t(` Статус: `+p(c.value.status===`active`?`действителен`:`уже использован`)+` `,1),c.value.usedBy?(s(),F(`span`,On,` · `+p(c.value.usedBy),1)):e(``,!0),c.value.usedAt?(s(),F(`br`,kn)):e(``,!0),c.value.usedAt?(s(),F(`span`,An,`Использован: `+p(T(et)(c.value.usedAt)),1)):e(``,!0)]),_:1},8,[`type`]),c.value.status===`active`&&c.value.gameStatus!==`finish`?(s(),h(T(V),{key:0,type:`primary`,loading:d.value,onClick:S},{default:j(()=>[...i[7]||=[t(` Принять билет `,-1)]]),_:1},8,[`loading`])):e(``,!0)],64)):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-fe322487`]]);function Mn(e,t){let n=ze(),r=k([]),i=k(),a=k(),o=k(!1),s=k(!1),c=0,l=!1,u=!1,d=E(()=>({connected:r.value.filter(e=>e.connected).length,disconnected:r.value.filter(e=>!e.connected).length,connections:r.value.reduce((e,t)=>e+(t.connections?.length||0),0)}));async function f(){if(!t()||l||u)return;let d=c,p=e();u=!0,o.value=!0;try{let e=await n.GetDevices({gameID:p});if(l||!t()||d!==c)return;r.value=[...e.devices||[]].sort((e,t)=>Number(!!e.connected)-Number(!!t.connected)||(e.ID||``).localeCompare(t.ID||``)),i.value=e.wifi,a.value=e.serverTime,s.value=!1}catch{!l&&t()&&d===c&&(s.value=!0)}finally{u=!1,!l&&d===c&&(o.value=!1),!l&&t()&&d!==c&&f()}}return ae([e,t],([e],[n])=>{c++,o.value=!1,e!==n&&(r.value=[],i.value=void 0,a.value=void 0,s.value=!1),t()&&f()},{flush:`sync`}),We(()=>{f()},5e3),ne(()=>{l=!0,c++}),{devices:r,wifi:i,serverTime:a,isLoading:o,hasError:s,summary:d,reload:f}}var Nn={class:`center-block-custom`},Pn={class:`width1200`},Fn={class:`game-tab-content`},In={key:5},Ln=[`href`],Rn={class:`game-tab-content`},zn={class:`game-tab-content`},Bn={class:`game-tab-content`},Vn={class:`game-tab-content`},Hn={class:`qr-block`},Un={class:`game-tab-content`},Wn={key:0,class:`answers-empty`},Gn={class:`answers-question-title`},Kn={class:`answers-question-answer`},qn={class:`correct-answer`},Jn={class:`answers-team-name`},Yn={class:`answers-team-answer`},Xn={key:0,class:`give-application-image-block`},Zn=[`src`],Qn=[`src`],$n=[`href`],er={class:`qr-block`},tr={key:0,class:`answers-empty`},nr=`https://www.sberbank.ru/ru/choise_bank?requisiteNumber=79609361994&bankCode=100000000111`,rr=U(N({__name:`GamePage`,emits:[`resultsApplied`],setup(n,{emit:r}){let i=r,o=ze(),c=Xe(),l=k(!1),d=ue(),f=ie(),m=f.params.id;function g(e){return[`settings`,`teams`,`screens`,`game`,`payment`,`answers`,`state`].includes(e)}let _=typeof f.query.tab==`string`?f.query.tab:``,v=k(g(_)?_:`game`);async function y(e){!g(e)||(e===`state`?!ve.value:!B.value)||(v.value=e,await d.replace({query:{...f.query,tab:e}}),e===`answers`&&await ar())}function b(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y(`state`))}let x=pe(),S=k({name:``,description:``,format:`online`,location:``}),ee=k(!1),C=k(!1),w=k(!1),D=k(!1),O=k(!1),te=k(``),ne=k(``),re=k(1),M=k(``),N=k(!1),P=k(``),oe=k(``),se=k(!1),ce=k(1),le=k([]),de=k(!1),fe=k(!1),L=k({ID:void 0,name:void 0,description:void 0,startAt:void 0,status:void 0,format:void 0,location:void 0,scenario:void 0,teams:void 0,export:void 0}),he=Ue(),ge=Je(),B=E(()=>he.hasAnyRole([`admin`,`organizer`,`author`])),ve=E(()=>ge.environment===`venue`&&he.hasAnyRole([`admin`,`organizer`,`developer`])),Se=E(()=>ve.value&&!B.value);tt(()=>B.value?{organizerGameID:Number(m)}:{});let{devices:H,wifi:Ce,serverTime:we,isLoading:Te,hasError:U,summary:De,reload:Oe}=Mn(()=>Number(f.params.id),()=>ve.value&&v.value===`state`);ae([()=>f.query.tab,ve,B],()=>{let e=typeof f.query.tab==`string`?f.query.tab:``;v.value=Se.value?`state`:g(e)&&(e!==`state`||ve.value)?e:`game`,Se.value&&e!==`state`&&d.replace({query:{...f.query,tab:`state`}})},{immediate:!0}),ae(Se,e=>{e&&(L.value={ID:void 0,name:void 0,description:void 0,startAt:void 0,status:void 0,format:void 0,location:void 0,scenario:void 0,teams:void 0,export:void 0},Z(Number(m)))},{immediate:!0});let ke=E(()=>Number(L.value.ID)>0&&ge.environment===`prod`&&he.hasAnyRole([`admin`,`organizer`,`developer`])),Ae=k(!1),Ne=k(!1),Fe=E(()=>ge.environment===`venue`&&L.value.status===`finish`&&he.hasAnyRole([`admin`,`organizer`,`developer`])),Ie=k(!1),J=k(!1),Le=k([]),Re=k(``),Be=[{label:`Ожидает ответа`,value:`pending`},{label:`Подтверждено`,value:`confirmed`},{label:`Отменено`,value:`cancelled`}],Ve=E(()=>(L.value.teams||[]).filter(e=>e.participationStatus!==`cancelled`).length),He=k([]),Ge=k([]),Ke=k(),qe=k(),Y=k([]),X=k(!1),nt=k(!1),rt=k(`use`),it=0,at=k([]),ot=k([]),st=k([]),ct=k(!1),lt=k(!1),ut=k(100),dt=k(0);async function Z(e){let t=B.value,n=await o.GetGame({ID:e});t===B.value&&(L.value=n.game,ee.value||=(S.value={name:L.value.name||``,description:L.value.description||``,format:L.value.format||`online`,location:L.value.location||``},!0),L.value.teams=L.value.teams?.sort((e,t)=>{let n=0;(e.applications?.length||0)>0&&(n=1);let r=0;if((t.applications?.length||0)>0&&(r=1),n>r)return-1;if(na?1:ie.status===`connected`)||He.value[0])?.mode===`SCREEN_MODE_RESULTS`){let e=await o.GetGameResults({gameID:Number(m)});at.value=e.questions||[],ot.value=e.teams||[]}else at.value=[],ot.value=[]}B.value&&ft();async function pt(){try{let e=await o.GetGameMusic({gameID:Number(m)});Ge.value=e.playlists||[],Ke.value=e.state}catch(e){x.error(e instanceof Error?e.message:`Не удалось получить музыку игры`)}}B.value&&pt();function mt(){return rt.value===`edit`}async function ht(){if(console.log(`getScreenPlan`),mt()||X.value)return;console.log(`no skip getScreenPlan`);let e=++it,t=await o.GetScreenPlan({gameID:Number(m)});e!==it||mt()||X.value||(qe.value=t.plan,Y.value=t.plan?.steps?.map(e=>({...e}))||[])}B.value&&ht();function gt(){Y.value.push({mode:`SCREEN_MODE_TEXT`,text:`Новый экран`,timerLabel:`Перерыв`,timerDurationSeconds:600}),X.value=!0,rt.value=`edit`}function vt(){qe.value&&(Y.value=qe.value.steps?.map(e=>({...e}))||[],rt.value=`edit`)}function bt(){X.value&&!window.confirm(`Отменить несохранённые изменения плана?`)||(Y.value=qe.value?.steps?.map(e=>({...e}))||[],X.value=!1,rt.value=`use`)}function St(e){Y.value.splice(e,1),X.value=!0}function wt(e,t){let n=e+t;if(n<0||n>=Y.value.length)return;let[r]=Y.value.splice(e,1);Y.value.splice(n,0,r),X.value=!0}function Et(){X.value=!0}function Ot(){Y.value=[],Et()}async function kt(){if(!nt.value){it+=1,nt.value=!0;try{let e=Math.min(qe.value?.currentStep||0,Math.max(0,Y.value.length-1)),t=await o.SaveScreenPlan({gameID:Number(m),steps:Y.value,currentStep:e});qe.value=t.plan,Y.value=t.plan?.steps?.map(e=>({...e}))||[],X.value=!1,rt.value=`use`,x.success(t.plan?`План экранов сохранён`:`План экранов удалён`)}catch(e){x.error(e instanceof Error?e.message:`Не удалось сохранить план экранов`)}finally{nt.value=!1}}}async function At(e){if(!(X.value||!qe.value))try{let t=await o.SetScreenPlanStep({gameID:Number(m),currentStep:e});qe.value=t.plan,await ft()}catch(e){x.error(e instanceof Error?e.message:`Не удалось перейти на шаг плана`)}}async function jt(e,t){if(!(X.value||e!==`SCREEN_MODE_TIMER`&&e!==`SCREEN_MODE_INTRO`&&e!==`SCREEN_MODE_CONCLUSION`))try{await o.SendScreenCommand({gameID:Number(m),command:t,positionMs:Math.max(0,Math.round(dt.value*1e3)),volume:Math.max(0,Math.min(100,Math.round(ut.value)))}),await ft()}catch(e){x.error(e instanceof Error?e.message:`Не удалось управлять экраном`)}}async function Mt(e,t){if(!fe.value){fe.value=!0;try{await o.BindScreen({screenID:e,accessToken:t,gameID:Number(m)}),x.success(`Экран привязан к игре`),await ft()}catch(e){x.error(e instanceof Error?e.message:`Не удалось привязать экран`)}finally{fe.value=!1}}}async function Nt(){if(ct.value||lt.value)return;let e=await o.GetGameMap({gameID:Number(m)});ct.value||lt.value||(st.value=e.items||[])}B.value&&Nt();async function Pt(e,t=e.hidden){ct.value=!0;try{await o.UpdateGameMapItem({gameID:Number(m),kind:e.kind,itemID:e.itemID,x:Math.round(e.x||0),y:Math.round(e.y||0),hidden:t})}finally{ct.value=!1}}async function Ft(e,t=e.hidden){await Pt(e,t),await Nt()}async function It(e){await o.SetScreenSound({screenID:e.ID,soundEnabled:!0}),await ft()}async function Lt(e){let t=Ke.value;try{let n=await o.SetGameMusic({gameID:Number(m),playlistID:e.playlistID??t?.playlist?.ID??0,trackIndex:e.trackIndex??t?.trackIndex??0,positionMs:e.positionMs??t?.positionMs??0,volume:e.volume??t?.volume??100,loop:e.loop??t?.loop??!1,playback:e.playback??t?.playback??`MUSIC_PLAYBACK_STOPPED`});Ke.value=n.state}catch(e){x.error(e instanceof Error?e.message:`Не удалось изменить музыку`)}}async function Rt(e){try{await o.CreatePlaylist({name:e}),await pt()}catch(e){x.error(e instanceof Error?e.message:`Не удалось создать плейлист`)}}async function zt(e){try{await o.DeletePlaylist({ID:e}),await pt()}catch(e){x.error(e instanceof Error?e.message:`Не удалось удалить плейлист`)}}async function Bt(e){let t=Ke.value?.playlist?.ID;if(!t){x.warning(`Сначала выберите плейлист`);return}try{let n=Ht(new Uint8Array(await e.arrayBuffer()));await o.UploadPlaylistTrack({playlistID:t,name:e.name,filename:e.name,data:n}),await pt()}catch(e){x.error(e instanceof Error?e.message:`Не удалось загрузить MP3`)}}async function Vt(e){let t=Ke.value?.playlist?.ID;if(t)try{await o.DeletePlaylistTrack({playlistID:t,trackID:e}),await pt()}catch(e){x.error(e instanceof Error?e.message:`Не удалось удалить трек`)}}function Ht(e){let t=``;for(let n=0;nURL.revokeObjectURL(n),1e3)}catch(e){x.error(e instanceof Error?e.message:`Не удалось скачать пакет`)}finally{Ne.value=!1}}}function Jt({fileList:e}){J.value||(Le.value=e.slice(-1),Re.value=``)}async function Yt(){if(!(!Fe.value||Ie.value)){Ie.value=!0;try{let{blob:e,filename:t}=await c.downloadGameResultsPackage(L.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){x.error(e instanceof Error?e.message:`Не удалось скачать результаты`)}finally{Ie.value=!1}}}async function Xt(){if(!ke.value||J.value)return;let e=Le.value[0]?.file;if(!e||e.size===0){Re.value=`Выберите непустой ZIP-файл`;return}if(!e.name.toLowerCase().endsWith(`.zip`)){Re.value=`Выберите файл с расширением .zip`;return}if(e.size>1024**3){Re.value=`Размер пакета не должен превышать 1 ГиБ`;return}J.value=!0,Re.value=``;try{await c.applyGameResultsPackage(L.value.ID,e),x.success(`Результаты приняты`),i(`resultsApplied`)}catch(e){Re.value=e instanceof Error?e.message:`Не удалось применить результаты`}finally{J.value=!1}}async function Zt(){if(!(l.value||!L.value.teams?.length)){l.value=!0;try{let{blob:e,filename:t}=await c.downloadTeamQR(L.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){x.error(e instanceof Error?e.message:`Не удалось скачать QR команд`)}finally{l.value=!1}}}function Qt(){d.push(`/games/`+m+`/results`)}async function $t(){await o.UpdateGame({ID:L.value.ID,name:S.value.name,description:S.value.description,format:S.value.format,location:S.value.location.trim(),startAt:L.value.startAt,scenarioID:L.value.scenario?.ID}),await Z(L.value.ID)}let en=k({ID:0,name:``,status:``,password:``,actionsCount:0,applications:[],captainEmail:void 0,participantsCount:void 0,participationStatus:void 0,participationSource:void 0,participationEmailError:void 0,participationEmailSent:void 0}),tn=k(``),nn=k({ID:0,name:``,status:``,password:``,actionsCount:0,applications:[],captainEmail:void 0,participantsCount:void 0,participationStatus:void 0,participationSource:void 0,participationEmailError:void 0,participationEmailSent:void 0}),$=k({name:``,image:``,file_type:``}),rn=window.location.href;function on(e,t){en.value=e,$.value=t,C.value=!0}async function sn(){if(re.value<1||re.value>8){x.error(`Укажите от 1 до 8 игроков`);return}await o.AddTeam({gameID:L.value.ID,name:te.value,captainEmail:ne.value.trim(),participantsCount:re.value}),await Z(L.value.ID),w.value=!1,ne.value=``,re.value=1}async function cn(){await o.GiveTeamApplications({ID:en.value.ID,name:$.value.name}),await Z(L.value.ID),C.value=!1}async function ln(e){nn.value=e,D.value=!0}async function un(){await o.DeleteTeam({ID:nn.value.ID}),await Z(L.value.ID),D.value=!1}async function dn(){await o.DeleteGame({ID:L.value.ID}),x.success(`Игра удалена`),d.push(`/games`)}function fn(e,t){let n=new URL(`/team-story/${e}`,window.location.origin);return n.searchParams.set(`password`,t),n.toString()}function pn(e){mn(fn(e.ID,e.password),`Подсмотреть игру`)}async function mn(e,t){P.value=e,oe.value=t,N.value=!0}async function gn(){if(!(de.value||!L.value.ID)){de.value=!0;try{let e=await o.IssueGameTickets({gameID:L.value.ID,count:ce.value});le.value=e.tickets||[],x.success(`Выпущено билетов: ${le.value.length}`)}catch(e){x.error(e instanceof Error?e.message:`Не удалось выпустить билеты`)}finally{de.value=!1}}}We(()=>{!B.value||J.value||(Z(Number(m)),ft(),pt(),ht(),Nt())},2e3);async function _n(){await o.ResetGame({ID:L.value.ID}),await Z(L.value.ID)}async function vn(){await o.StartGame({ID:L.value.ID}),await Z(L.value.ID)}async function yn(){await o.PauseGame({ID:L.value.ID}),await Z(L.value.ID)}async function bn(){await o.PlayGame({ID:L.value.ID}),await Z(L.value.ID)}async function xn(){await o.FinishGame({ID:L.value.ID}),await Z(L.value.ID)}let Sn=k(!1),Cn=k([]),wn=k(0),Tn=k(0),En=k([]),On=k([]),kn=k({});function An(e,t){return(e??``)+`:`+(t??``)}function rr(e,t){return(e.answers||[]).find(e=>e.questionCode==t)?.answer||``}function ir(e,t){kn.value[e]=t===null?void 0:t}async function ar(){let e=await o.GetGameAnswers({gameID:Number(m)});En.value=e.questions||[],On.value=e.teams||[];let t={};for(let e of On.value)for(let n of e.answers||[])t[An(e.team?.ID,n.questionCode)]=n.score;kn.value=t}async function or(){Sn.value=!0;let e=await o.GetGameReviewsForModeration({gameID:Number(m)});Cn.value=e.reviews||[],wn.value=e.averageRating||0,Tn.value=e.reviewsCount||0}async function sr(e,t){await o.ModerateGameReview({ID:e.ID,status:t}),await or()}async function cr(){for(let e of En.value)for(let t of On.value){let n=kn.value[An(t.team?.ID,e.code)];await o.SetTeamAnswerScore({ID:t.team?.ID,questionCode:e.code,score:n??void 0})}x.success(`Баллы сохранены`),await ar()}B.value&&v.value===`answers`&&ar();function lr(){let e=new Date;return new Date(e.getTime()-e.getTimezoneOffset()*6e4)}function ur(e,t){if(e==``)return`Игра ещё не началась`;let n=$e(e),r=lr();t!=``&&(r=$e(t));let i=r.getTime()-n.getTime();if(i<0)return`Игра ещё не началась`;let a=Math.floor(i/1e3),o=Math.floor(a/60),s=Math.floor(o/60),c=Math.floor(s/24),l=Math.floor(c/30),u=Math.floor(c/365);return u>0?`${u}г ${c%365}д`:l>0?`${l}мес ${c%30}д`:c>0?`${c}д ${s%24}ч`:s>0?`${s}ч ${o%60}м`:o>0?`${o}м ${a%60}с`:`${a}с`}let dr=k(``);return We(()=>{dr.value=ur(L.value.startedAt||``,L.value.endedAt||``)},1e3),(n,r)=>(s(),F(A,null,[I(`div`,Nn,[I(`div`,Pn,[B.value&&(L.value.export?.state===`preparing`||L.value.export?.state===`ready`)?(s(),h(Q,{key:0},{default:j(()=>[u(T(G),{type:`info`,title:L.value.export.state===`ready`?`Игра в офлайн-режиме`:`Подготовка офлайн-пакета`},{default:j(()=>[t(p(L.value.export.state===`ready`?`Изменения на онлайн-сервере не синхронизируются с офлайн-площадкой.`:`Создаётся пакет для офлайн-площадки.`),1)]),_:1},8,[`title`])]),_:1})):e(``,!0),Se.value?(s(),h(Q,{key:1},{default:j(()=>[I(`h2`,null,p(L.value.name),1)]),_:1})):e(``,!0),u(T(be),{value:v.value,type:`line`,animated:``,"onUpdate:value":y},{default:j(()=>[B.value?(s(),h(T(ye),{key:0,name:`settings`,tab:`Настройки`},{default:j(()=>[I(`div`,Fn,[u(Q,null,{default:j(()=>[u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{quaternary:``,onClick:r[0]||=e=>mn(T(rn),`Админка`)},{default:j(()=>[...r[45]||=[t(`QR`,-1)]]),_:1}),L.value.status==`finish`?(s(),h(T(V),{key:0,quaternary:``,onClick:r[1]||=e=>Qt()},{default:j(()=>[u(T(me),{class:`settings-icon`},{default:j(()=>[u(T(Dt))]),_:1}),r[46]||=t(` Итоги `,-1)]),_:1})):e(``,!0),(L.value.teams?.length||0)==0?(s(),h(T(V),{key:1,type:`error`,quaternary:``,onClick:r[2]||=e=>O.value=!0},{default:j(()=>[...r[47]||=[t(` Удалить игру `,-1)]]),_:1})):e(``,!0)]),_:1})]),_:1}),u(Q,null,{default:j(()=>[r[53]||=I(`p`,{class:`screens-title`},`Настройки игры`,-1),u(T(K),{vertical:``},{default:j(()=>[r[48]||=I(`p`,null,`Название`,-1),u(T(W),{value:S.value.name,"onUpdate:value":r[3]||=e=>S.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),r[49]||=I(`p`,{class:`settings-header`},`Формат игры`,-1),u(T(xe),{value:S.value.format,"onUpdate:value":r[4]||=e=>S.value.format=e,options:[{label:`Online`,value:`online`},{label:`Offline`,value:`offline`}],"aria-label":`Формат игры`},null,8,[`value`]),r[50]||=I(`p`,{class:`settings-header`},`Описание`,-1),u(T(W),{value:S.value.description,"onUpdate:value":r[5]||=e=>S.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),r[51]||=I(`p`,{class:`settings-header`},`Место проведения`,-1),u(T(W),{value:S.value.location,"onUpdate:value":r[6]||=e=>S.value.location=e,type:`text`,placeholder:`Оставьте пустым для онлайн-игры`},null,8,[`value`])]),_:1}),u(T(q),{justify:`end`,class:`settings-actions`},{default:j(()=>[u(T(V),{onClick:r[7]||=e=>$t()},{default:j(()=>[...r[52]||=[t(`Сохранить изменения`,-1)]]),_:1})]),_:1})]),_:1}),Fe.value?(s(),h(Q,{key:0},{default:j(()=>[u(T(V),{loading:Ie.value,disabled:Ie.value,onClick:Yt},{default:j(()=>[...r[54]||=[t(` Скачать результаты `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})):e(``,!0),ke.value?(s(),h(Q,{key:1},{default:j(()=>[r[58]||=I(`p`,{class:`screens-title`},`Возврат результатов с площадки`,-1),u(T(K),{vertical:``},{default:j(()=>[u(T(G),{type:`warning`},{default:j(()=>[...r[55]||=[t(` Команды, билеты, результаты и игровой сценарий будут заменены данными пакета. Онлайн-правки этих данных потеряются. Оформление и музыка сохраняются. `,-1)]]),_:1}),u(T(Ee),{"file-list":Le.value,"default-upload":!1,max:1,accept:`.zip`,disabled:J.value,onChange:Jt},{default:j(()=>[u(T(V),{disabled:J.value},{default:j(()=>[...r[56]||=[t(`Выбрать ZIP результатов`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),Re.value?(s(),h(T(G),{key:0,type:`error`,role:`alert`},{default:j(()=>[t(p(Re.value),1)]),_:1})):e(``,!0),u(T(V),{loading:J.value,disabled:J.value||!Le.value.length,onClick:Xt},{default:j(()=>[...r[57]||=[t(` Применить ZIP и перезаписать результаты `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})):e(``,!0),ke.value?(s(),h(Q,{key:2},{default:j(()=>[r[63]||=I(`p`,{class:`screens-title`},`Передача игры на площадку`,-1),u(T(K),{vertical:``},{default:j(()=>[r[62]||=I(`p`,null,` Пакет содержит снимок на момент подготовки. Последующие онлайн-изменения в него не попадут. Готовность пакета не подтверждает импорт на площадку. `,-1),L.value.export?.state===`preparing`?(s(),h(T(G),{key:0,type:`info`,role:`status`},{default:j(()=>[...r[59]||=[t(`Подготовка пакета…`,-1)]]),_:1})):L.value.export?.state===`ready`?(s(),h(T(G),{key:1,type:`success`,role:`status`},{default:j(()=>[...r[60]||=[t(`Пакет готов`,-1)]]),_:1})):L.value.export?.state===`failed`?(s(),h(T(G),{key:2,type:`error`,role:`alert`},{default:j(()=>[t(p(L.value.export.failure||`Не удалось подготовить пакет`),1)]),_:1})):e(``,!0),L.value.export?.state===`ready`?(s(),h(T(V),{key:3,loading:Ne.value,disabled:Ne.value,onClick:Kt},{default:j(()=>[...r[61]||=[t(`Скачать пакет`,-1)]]),_:1},8,[`loading`,`disabled`])):(s(),h(T(V),{key:4,loading:Ae.value||L.value.export?.state===`preparing`,disabled:Ae.value||L.value.export?.state===`preparing`||L.value.status!==`draft`,onClick:Gt},{default:j(()=>[t(p(L.value.export?.state===`failed`?`Повторить подготовку`:`Подготовить пакет`),1)]),_:1},8,[`loading`,`disabled`])),L.value.status&&L.value.status!==`draft`?(s(),F(`p`,In,` Подготовка доступна до старта игры. `)):e(``,!0)]),_:1})]),_:1})):e(``,!0),u(Q,null,{default:j(()=>[r[66]||=I(`p`,{class:`screens-title`},`Выпуск билетов`,-1),u(T(K),{vertical:``},{default:j(()=>[u(T(_t),{value:ce.value,"onUpdate:value":r[8]||=e=>ce.value=e,min:1,max:100},null,8,[`value`]),(s(!0),F(A,null,a(le.value,e=>(s(),F(`div`,{key:e.ID,class:`issued-ticket`},[I(`div`,null,`Билет №`+p(e.ID),1),I(`a`,{href:e.URL,class:`payment-link`,target:`_blank`,rel:`noreferrer`},` Открыть страницу билета `,8,Ln),u(T(V),{size:`small`,onClick:t=>mn(e.URL,`Билет №${e.ID}`)},{default:j(()=>[...r[64]||=[t(` Показать QR `,-1)]]),_:1},8,[`onClick`])]))),128))]),_:1}),u(T(q),{justify:`end`,class:`settings-actions`},{default:j(()=>[u(T(V),{loading:de.value,disabled:de.value,onClick:r[9]||=e=>gn()},{default:j(()=>[...r[65]||=[t(` Выпустить `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})])]),_:1})):e(``,!0),B.value?(s(),h(T(ye),{key:1,name:`teams`,tab:`Команды`},{default:j(()=>[I(`div`,Rn,[u(T(q),{justify:`space-between`,align:`center`},{default:j(()=>[u(T(z),{bordered:!1,type:`info`},{default:j(()=>[t(` Участвуют команд: `+p(Ve.value),1)]),_:1}),Ve.value?(s(),h(T(V),{key:0,quaternary:``,loading:l.value,disabled:l.value,onClick:r[10]||=e=>Zt()},{default:j(()=>[...r[67]||=[t(` QR команд `,-1)]]),_:1},8,[`loading`,`disabled`])):e(``,!0)]),_:1}),u(Dn,{teams:L.value.teams||[],"participation-options":Be,onAdd:r[11]||=e=>w.value=!0,onOpenQr:pn,onPreview:r[12]||=(e,t)=>Wt(e,t,!0),onDelete:ln,onGiveApplication:on},null,8,[`teams`])])]),_:1})):e(``,!0),B.value?(s(),h(T(ye),{key:2,name:`screens`,tab:`Экраны`},{default:j(()=>[I(`div`,zn,[u(an,{screens:He.value,"screen-binding":fe.value,playlists:Ge.value,music:Ke.value,onBind:Mt,onSetSound:It,onUnbind:Ut,onSetMusic:Lt,onCreatePlaylist:Rt,onDeletePlaylist:zt,onUploadTrack:Bt,onDeleteTrack:Vt},null,8,[`screens`,`screen-binding`,`playlists`,`music`])])]),_:1})):e(``,!0),B.value?(s(),h(T(ye),{key:3,name:`game`,tab:`Игра`},{default:j(()=>[I(`div`,Bn,[u(Q,null,{default:j(()=>[u(T(q),{justify:`space-between`},{default:j(()=>[u(T(K),null,{default:j(()=>[u(T(z),{type:`info`},{default:j(()=>[t(p(dr.value),1)]),_:1}),T(et)(L.value.startAt)?(s(),h(T(z),{key:0,type:`info`},{default:j(()=>[t(` Начало: `+p(T(et)(L.value.startAt)),1)]),_:1})):e(``,!0)]),_:1}),u(T(q),{justify:`end`},{default:j(()=>[L.value.status==`draft`?e(``,!0):(s(),h(T(V),{key:0,type:`info`,dashed:``,"aria-label":`Сбросить игру`,onClick:r[13]||=e=>_n()},{default:j(()=>[u(T(me),null,{default:j(()=>[u(T(Tt))]),_:1})]),_:1})),L.value.status==`draft`?(s(),h(T(V),{key:1,type:`info`,dashed:``,"aria-label":`Начать игру`,onClick:r[14]||=e=>vn()},{default:j(()=>[u(T(me),null,{default:j(()=>[u(T(Ct))]),_:1})]),_:1})):e(``,!0),L.value.status==`pause`?(s(),h(T(V),{key:2,type:`info`,dashed:``,"aria-label":`Продолжить игру`,onClick:r[15]||=e=>bn()},{default:j(()=>[u(T(me),null,{default:j(()=>[u(T(Ct))]),_:1})]),_:1})):e(``,!0),L.value.status==`run`?(s(),h(T(V),{key:3,type:`info`,dashed:``,"aria-label":`Поставить игру на паузу`,onClick:r[16]||=e=>yn()},{default:j(()=>[u(T(me),null,{default:j(()=>[u(T(xt))]),_:1})]),_:1})):e(``,!0),L.value.status==`finish`?e(``,!0):(s(),h(T(V),{key:4,type:`info`,dashed:``,"aria-label":`Завершить игру`,onClick:r[17]||=e=>xn()},{default:j(()=>[u(T(me),null,{default:j(()=>[u(T(yt))]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1}),u(qt,{"map-items":st.value,teams:L.value.teams||[],screens:He.value,"preview-questions":at.value,"preview-teams":ot.value,"screen-plan":qe.value,"screen-plan-draft":Y.value,"screen-plan-dirty":X.value,"screen-plan-saving":nt.value,"screen-plan-mode":rt.value,"screen-volume":ut.value,"screen-position":dt.value,onSaveItem:Ft,onDragging:r[18]||=e=>lt.value=e,onGiveApplication:on,onAddStep:gt,onEdit:vt,onCancel:bt,onRemoveStep:St,onMoveStep:wt,onDirty:Et,onClearPlan:Ot,onSave:kt,onSetStep:At,onCommand:jt,"onUpdate:screenVolume":r[19]||=e=>ut.value=e??0,"onUpdate:screenPosition":r[20]||=e=>dt.value=e??0},null,8,[`map-items`,`teams`,`screens`,`preview-questions`,`preview-teams`,`screen-plan`,`screen-plan-draft`,`screen-plan-dirty`,`screen-plan-saving`,`screen-plan-mode`,`screen-volume`,`screen-position`])])]),_:1})):e(``,!0),B.value?(s(),h(T(ye),{key:4,name:`payment`,tab:`Оплата`},{default:j(()=>[I(`div`,Vn,[u(Q,null,{default:j(()=>[u(T(q),{align:`center`,justify:`space-between`},{default:j(()=>[r[69]||=I(`p`,{class:`screens-title`},`Билеты`,-1),u(T(V),{size:`small`,onClick:r[21]||=e=>se.value=!0},{default:j(()=>[...r[68]||=[t(` Проверить билет `,-1)]]),_:1})]),_:1})]),_:1}),u(Q,null,{default:j(()=>[r[70]||=I(`p`,{class:`screens-title`},`Оплата игры`,-1),I(`div`,Hn,[u(T(Me),{value:nr,size:300,padding:0})]),I(`p`,null,[I(`a`,{href:nr,class:`payment-link`,target:`_blank`,rel:`noreferrer`},` Открыть ссылку оплаты `)])]),_:1})])]),_:1})):e(``,!0),B.value?(s(),h(T(ye),{key:5,name:`answers`,tab:`Проверка ответов`},{default:j(()=>[I(`div`,Un,[En.value.length==0?(s(),F(`div`,Wn,` Вопросы дела не заданы или команды ещё не отвечали. `)):e(``,!0),(s(!0),F(A,null,a(En.value,e=>(s(),h(Q,{key:e.code},{default:j(()=>[I(`p`,Gn,p(e.code)+`: `+p(e.text),1),I(`p`,Kn,[r[71]||=t(` Правильный ответ:`,-1),r[72]||=I(`br`,null,null,-1),I(`span`,qn,p(e.answer||`—`),1)]),(s(!0),F(A,null,a(On.value,t=>(s(),F(`div`,{key:t.team?.ID,class:`answers-team-row`},[I(`div`,Jn,p(t.team?.name),1),I(`div`,Yn,p(rr(t,e.code)||`—`),1),u(T(_t),{value:kn.value[An(t.team?.ID,e.code)],"onUpdate:value":n=>ir(An(t.team?.ID,e.code),n),placeholder:`Балл`,class:`answers-score-input`},null,8,[`value`,`onUpdate:value`])]))),128))]),_:2},1024))),128)),u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{onClick:r[22]||=e=>cr(),disabled:En.value.length==0},{default:j(()=>[...r[73]||=[t(` Сохранить баллы `,-1)]]),_:1},8,[`disabled`])]),_:1})])]),_:1})):e(``,!0),ve.value?(s(),h(T(ye),{key:6,name:`state`,tab:`Состояние`,"tab-props":{tabindex:0,role:`tab`,"aria-selected":v.value===`state`,onKeydown:b}},{default:j(()=>[u(hn,{devices:T(H),wifi:T(Ce),"server-time":T(we),"is-loading":T(Te),"has-error":T(U),summary:T(De),onReload:T(Oe)},null,8,[`devices`,`wifi`,`server-time`,`is-loading`,`has-error`,`summary`,`onReload`])]),_:1},8,[`tab-props`])):e(``,!0)]),_:1},8,[`value`])])]),B.value?(s(),h(jn,{key:0,show:se.value,"onUpdate:show":r[23]||=e=>se.value=e},null,8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:1,show:C.value,"onUpdate:show":r[26]||=e=>C.value=e},{default:j(()=>[u(T(R),{style:{width:`600px`},title:`Настройки игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:r[24]||=e=>C.value=!1},{default:j(()=>[...r[74]||=[t(` x `,-1)]]),_:1})]),footer:j(()=>[u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{onClick:r[25]||=e=>cn(),ghost:``},{default:j(()=>[...r[77]||=[t(` Выдать `,-1)]]),_:1})]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[r[75]||=I(`p`,null,`Команда`,-1),I(`h3`,null,p(en.value.name),1),r[76]||=I(`p`,null,`Улика`,-1),I(`h3`,null,p($.value.name),1),T(Ze)($.value)==`image`&&$.value.image?(s(),F(`div`,Xn,[I(`img`,{src:T(Qe)($.value.image),class:`give-application-image`},null,8,Zn)])):T(Ze)($.value)==`audio`&&$.value.image?(s(),F(`audio`,{key:1,src:T(Qe)($.value.image),controls:``,preload:`none`,class:`give-application-audio`},null,8,Qn)):T(Ze)($.value)==`pdf`&&$.value.image?(s(),F(`a`,{key:2,href:T(Qe)($.value.image),target:`_blank`,rel:`noopener`,class:`give-application-pdf-link`},` PDF `,8,$n)):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:2,show:w.value,"onUpdate:show":r[32]||=e=>w.value=e},{default:j(()=>[u(T(R),{style:{width:`600px`},title:`Создание команды`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:r[27]||=e=>w.value=!1},{default:j(()=>[...r[78]||=[t(` x `,-1)]]),_:1})]),footer:j(()=>[u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{onClick:r[31]||=e=>sn(),disabled:te.value.length==0},{default:j(()=>[...r[79]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[u(T(W),{value:te.value,"onUpdate:value":r[28]||=e=>te.value=e,type:`text`,placeholder:`Три дебила`},null,8,[`value`]),u(T(W),{value:ne.value,"onUpdate:value":r[29]||=e=>ne.value=e,"input-props":{type:`email`,autocomplete:`email`},placeholder:`Почта капитана (необязательно)`,"aria-label":`Почта капитана (необязательно)`},null,8,[`value`]),u(T(_t),{value:re.value,"onUpdate:value":r[30]||=e=>re.value=e,min:1,max:8,precision:0,placeholder:`Количество игроков`,"aria-label":`Количество игроков`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:3,show:D.value,"onUpdate:show":r[36]||=e=>D.value=e},{default:j(()=>[u(T(R),{style:{width:`600px`},title:`Удаление команды`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:r[33]||=e=>D.value=!1},{default:j(()=>[...r[80]||=[t(` x `,-1)]]),_:1})]),footer:j(()=>[u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{onClick:r[35]||=e=>un(),disabled:tn.value!=nn.value.name},{default:j(()=>[...r[83]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[I(`p`,null,[r[81]||=t(` Введите название команды `,-1),u(T(Pe),{class:`name-text`,strong:``},{default:j(()=>[t(p(nn.value.name),1)]),_:1}),r[82]||=t(` чтобы удалить его `,-1)]),u(T(W),{value:tn.value,"onUpdate:value":r[34]||=e=>tn.value=e,type:`text`,placeholder:`Три дебила`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:4,show:O.value,"onUpdate:show":r[40]||=e=>O.value=e},{default:j(()=>[u(T(R),{style:{width:`600px`},title:`Удаление игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:r[37]||=e=>O.value=!1},{default:j(()=>[...r[84]||=[t(` x `,-1)]]),_:1})]),footer:j(()=>[u(T(q),{justify:`end`},{default:j(()=>[u(T(V),{onClick:r[39]||=e=>dn(),disabled:M.value!=L.value.name},{default:j(()=>[...r[87]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[I(`p`,null,[r[85]||=t(` Введите название игры `,-1),u(T(Pe),{class:`name-text`,strong:``},{default:j(()=>[t(p(L.value.name),1)]),_:1}),r[86]||=t(` чтобы удалить её `,-1)]),u(T(W),{value:M.value,"onUpdate:value":r[38]||=e=>M.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:5,show:N.value,"onUpdate:show":r[42]||=e=>N.value=e},{default:j(()=>[u(T(R),{style:{width:`600px`},title:oe.value,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":j(()=>[u(T(V),{onClick:r[41]||=e=>N.value=!1},{default:j(()=>[...r[88]||=[t(` x `,-1)]]),_:1})]),footer:j(()=>[...r[89]||=[]]),default:j(()=>[u(T(K),{vertical:``},{default:j(()=>[I(`div`,er,[u(T(Me),{value:P.value,size:300,padding:0},null,8,[`value`])])]),_:1})]),_:1},8,[`title`])]),_:1},8,[`show`])):e(``,!0),B.value?(s(),h(T(_e),{key:6,show:Sn.value,"onUpdate:show":r[44]||=e=>Sn.value=e},{default:j(()=>[u(T(R),{style:{width:`min(94vw, 800px)`},title:`Отзывы игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`,"content-style":{maxHeight:`70vh`,overflow:`auto`}},{"header-extra":j(()=>[u(T(V),{onClick:r[43]||=e=>Sn.value=!1},{default:j(()=>[...r[90]||=[t(` x `,-1)]]),_:1})]),default:j(()=>[u(T(q),{align:`center`,class:`reviews-summary`},{default:j(()=>[u(T(je),{value:wn.value,readonly:``,"allow-half":``},null,8,[`value`]),I(`span`,null,p(Tn.value?`${wn.value.toFixed(1)} · ${Tn.value}`:`Пока нет отзывов`),1)]),_:1}),Cn.value.length==0?(s(),F(`div`,tr,`Отзывов пока нет.`)):e(``,!0),(s(!0),F(A,null,a(Cn.value,n=>(s(),F(`div`,{key:n.ID,class:`review-row`},[u(T(q),{justify:`space-between`,align:`center`},{default:j(()=>[I(`strong`,null,p(n.teamName),1),u(T(z),null,{default:j(()=>[t(p(n.status),1)]),_:2},1024)]),_:2},1024),u(T(je),{value:n.rating,readonly:``,size:`small`},null,8,[`value`]),I(`div`,null,`Сложность: `+p([``,`лёгкая`,`средняя`,`тяжёлая`][n.difficulty||0]),1),I(`p`,null,p(n.text),1),n.status==`pending`?(s(),h(T(q),{key:0,justify:`end`},{default:j(()=>[u(T(V),{type:`success`,onClick:e=>sr(n,`approved`)},{default:j(()=>[...r[91]||=[t(`Одобрить`,-1)]]),_:1},8,[`onClick`]),u(T(V),{type:`error`,ghost:``,onClick:e=>sr(n,`rejected`)},{default:j(()=>[...r[92]||=[t(`Отклонить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):n.status==`approved`?(s(),h(T(q),{key:1,justify:`end`},{default:j(()=>[u(T(V),{type:`error`,ghost:``,onClick:e=>sr(n,`hidden`)},{default:j(()=>[...r[93]||=[t(`Скрыть`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):e(``,!0)]))),128))]),_:1})]),_:1},8,[`show`])):e(``,!0),u(Ye,{active:`games`})],64))}}),[[`__scopeId`,`data-v-2e81f45d`]]),ir=N({__name:`GameView`,setup(e){let t=k(0),n=ie();return(e,r)=>(s(),h(rr,{key:`${T(n).params.id}-${t.value}`,onResultsApplied:r[0]||=e=>t.value++}))}});export{ir as default}; \ No newline at end of file diff --git a/frontend/dist/assets/GameView-C3nY2DKo.css b/frontend/dist/assets/GameView-DygrgAkI.css similarity index 51% rename from frontend/dist/assets/GameView-C3nY2DKo.css rename to frontend/dist/assets/GameView-DygrgAkI.css index fa8cc21..f1dfbe8 100644 --- a/frontend/dist/assets/GameView-C3nY2DKo.css +++ b/frontend/dist/assets/GameView-DygrgAkI.css @@ -1 +1 @@ -.screen-preview[data-v-d5134fb8]{aspect-ratio:16/9;color:#eee;text-align:center;background-color:#111;background-position:50%;background-size:cover;justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}.timer-preview[data-v-d5134fb8]{max-width:95%}.timer-preview h2[data-v-d5134fb8],.preview-message[data-v-d5134fb8],.preview-results h2[data-v-d5134fb8]{margin:0 0 10px;font-size:clamp(16px,3vw,32px)}.timer-preview strong[data-v-d5134fb8]{font-variant-numeric:tabular-nums;font-size:clamp(48px,10vw,120px);line-height:.9;display:block}.screen-preview audio[data-v-d5134fb8],.preview-video[data-v-d5134fb8]{pointer-events:none;width:90%;max-width:90%}.preview-video[data-v-d5134fb8]{object-fit:contain;height:100%}.preview-cover[data-v-d5134fb8]{object-fit:contain;width:100%;height:100%}.preview-results[data-v-d5134fb8]{width:100%;max-width:96%;max-height:90%;overflow:hidden}.preview-results table[data-v-d5134fb8]{border-collapse:collapse;width:100%;font-size:10px}.preview-results th[data-v-d5134fb8],.preview-results td[data-v-d5134fb8]{text-align:left;border-bottom:1px solid #ffffff2e;padding:3px}.ui-block[data-v-80193f22]{background-color:#222;border-radius:10px;margin:8px 0;padding:16px}.map-preview-layout[data-v-1e1af018]{grid-template-columns:minmax(0,1fr) minmax(280px,420px);gap:8px;display:grid}.screens-title[data-v-1e1af018]{margin:0;font-size:18px;font-weight:600}.screen-header[data-v-1e1af018]{margin-bottom:8px}.screen-preview-placeholder[data-v-1e1af018]{aspect-ratio:16/9;color:#aaa;text-align:center;background-color:#111;justify-content:center;align-items:center;display:flex}.screen-preview-panel>.screens-title[data-v-1e1af018]{margin-bottom:8px}.screen-plan[data-v-1e1af018]{margin-top:16px}.screen-plan-step[data-v-1e1af018]{border-top:1px solid #ffffff1a;padding:8px 0}.map-field[data-v-1e1af018]{aspect-ratio:1;cursor:grab;resize:vertical;touch-action:none;background-color:#151515;border:1px dashed #fff3;height:auto;min-height:200px;position:relative;overflow:hidden}.map-field[data-v-1e1af018]:active{cursor:grabbing}.map-canvas[data-v-1e1af018]{transform-origin:0 0;background-image:linear-gradient(#ffffff14 1px,#0000 1px),linear-gradient(90deg,#ffffff14 1px,#0000 1px);background-size:20px 20px;width:2000px;height:1000px;position:absolute}.map-item[data-v-1e1af018]{cursor:grab;-webkit-user-select:none;user-select:none;border-radius:6px;min-width:90px;padding:8px 24px 8px 8px;position:absolute}.map-item[data-v-1e1af018]:active{cursor:grabbing}.map-screen[data-v-1e1af018]{background-color:#355b75}.map-organizer-desk[data-v-1e1af018]{background-color:#48633a}.map-team[data-v-1e1af018]{background-color:#222}.map-team[data-v-1e1af018],.map-team[data-v-1e1af018]:active{cursor:default}.map-team-handle[data-v-1e1af018]{cursor:grab;background-color:#48633a;border-radius:6px 6px 0 0;margin:-8px -24px 8px -8px;padding:8px 24px 8px 8px}.map-team-handle[data-v-1e1af018]:active{cursor:grabbing}.map-team-applications[data-v-1e1af018]{margin-top:8px}.map-team-needs-applications[data-v-1e1af018]{outline:2px solid gold}.map-item small[data-v-1e1af018]{opacity:.75;display:block}.map-item-hide[data-v-1e1af018]{color:inherit;cursor:pointer;background:0 0;border:0;font-size:16px;position:absolute;top:5px;right:5px}.map-team .map-item-hide[data-v-1e1af018]{padding:0 2px;line-height:16px;top:0}.map-hidden-items[data-v-1e1af018]{margin-top:16px}@media (width<1024px){.map-preview-layout[data-v-1e1af018]{grid-template-columns:1fr}}.screen-scanner-video[data-v-5f530845]{aspect-ratio:1;object-fit:cover;background-color:#000;width:100%;max-height:60vh}.screens-title[data-v-c8e2dfff]{margin:0;font-size:18px;font-weight:600}.screen-header[data-v-c8e2dfff]{margin-bottom:8px}.music-block[data-v-c8e2dfff]{margin-top:12px}.playlist-actions[data-v-c8e2dfff]{margin:8px 0}.volume-control[data-v-c8e2dfff]{align-items:center;gap:6px;display:inline-flex}.volume-label[data-v-c8e2dfff]{white-space:nowrap}.volume-input[data-v-c8e2dfff]{width:108px}.screen-row[data-v-c8e2dfff]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}.screen-status[data-v-c8e2dfff]{color:#aaa;font-size:13px}.screen-empty[data-v-c8e2dfff]{color:#aaa;margin:16px 0 0}.screen-error[data-v-c8e2dfff]{color:#f2a2a2;font-size:13px}.track-list[data-v-c8e2dfff]{flex-basis:100%;margin-top:8px;padding:0 8px}.track-empty[data-v-c8e2dfff]{color:#aaa;margin:0}.track-row[data-v-c8e2dfff]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;min-height:56px;padding:12px 8px;display:flex}.track-row-active[data-v-c8e2dfff]{background:#ffffff1f}.track-main[data-v-c8e2dfff]{flex:1;align-items:center;gap:12px;display:flex;overflow:hidden}.track-number[data-v-c8e2dfff]{color:#aaa;font-variant-numeric:tabular-nums;text-align:left;flex:0 0 20px}.track-details[data-v-c8e2dfff]{text-align:left;flex-direction:column;min-width:0;display:flex}.track-name[data-v-c8e2dfff]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.track-actions[data-v-c8e2dfff]{flex:none}.track-switch-active[data-v-c8e2dfff]{font-weight:600}@media (width<1024px){.track-list[data-v-c8e2dfff]{padding:0}.track-row[data-v-c8e2dfff]{flex-direction:column;align-items:stretch;gap:12px;padding:12px}.track-main[data-v-c8e2dfff]{width:100%}.track-actions[data-v-c8e2dfff]{justify-content:flex-end;width:100%}.track-actions .n-button[data-v-c8e2dfff]{flex:1}.volume-control[data-v-c8e2dfff]{justify-content:space-between;width:100%}.volume-input[data-v-c8e2dfff]{flex:1;width:auto}}.team-block-hover[data-v-561486cb]:hover{cursor:pointer;background-color:#333}.team-content-block[data-v-561486cb]{padding:8px 16px}.team-name-block[data-v-561486cb]{font-size:20px}.link-button[data-v-561486cb]{margin:8px 8px 0 0}.place-image-plus[data-v-561486cb]{text-align:center;margin:0;padding:16px;font-size:32px}.ticket-scanner-video[data-v-fe322487]{aspect-ratio:1;object-fit:cover;background-color:#000;width:100%;max-height:60vh}.reviews-summary[data-v-010e1897]{margin-bottom:16px}.game-tab-content[data-v-010e1897]{padding-top:0}.review-row[data-v-010e1897]{border-top:1px solid #777;padding:16px 0}.review-row p[data-v-010e1897]{white-space:pre-wrap}.team-block-hover[data-v-010e1897]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.team-content-block[data-v-010e1897]{padding:20px}.team-name-block[data-v-010e1897]{font-size:20px;font-weight:600}.settings-icon[data-v-010e1897]{width:20px}.settings-actions[data-v-010e1897]{margin-top:16px}.link-button[data-v-010e1897]{width:100%;margin-top:16px}.place-image-plus[data-v-010e1897]{justify-content:center;align-items:center;font-size:30px;display:flex}.name-text[data-v-010e1897]{background-color:#ffffff1a;border-radius:3px;padding:3px}.qr-block[data-v-010e1897]{background-color:#fff;margin:0 auto;padding:16px;line-height:0;display:inline-block}.payment-link[data-v-010e1897]{color:#63e2b7}.payment-link[data-v-010e1897]:focus,.payment-link[data-v-010e1897]:hover{color:#8ff0cc}.give-application-image-block[data-v-010e1897]{background-image:url(/assets/paper_white-ZSlTzOTx.jpg);background-size:cover;max-width:320px;margin:8px 0;padding:8px;box-shadow:0 3px 15px #626262}.give-application-image[data-v-010e1897]{width:100%}.give-application-audio[data-v-010e1897]{width:100%;margin:8px 0}.give-application-pdf-link[data-v-010e1897]{margin:8px 0;text-decoration:underline;display:inline-block}.answers-empty[data-v-010e1897]{color:#777}.answers-question-title[data-v-010e1897]{margin:0 0 8px;font-size:17px;font-weight:600}.answers-question-answer[data-v-010e1897]{color:#aaa;margin:0 0 16px}.correct-answer[data-v-010e1897]{color:gold;white-space:pre-wrap;margin-top:8px;font-weight:500;display:inline-block}.answers-team-row[data-v-010e1897]{background-color:#ffffff0d;border-radius:6px;flex-flow:wrap;align-items:center;gap:8px;margin:8px 0;padding:8px;display:flex}.answers-team-name[data-v-010e1897]{width:180px;font-weight:600}.answers-team-answer[data-v-010e1897]{color:#aaa;white-space:pre-wrap;flex:200px}.answers-score-input[data-v-010e1897]{width:110px}.screens-title[data-v-010e1897]{margin-bottom:8px;font-size:18px;font-weight:600}.screen-row[data-v-010e1897]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;padding:16px 0;display:flex}.screen-status[data-v-010e1897]{color:#aaa;font-size:13px}.screen-empty[data-v-010e1897]{color:#aaa;margin:16px 0 0}.screen-error[data-v-010e1897]{color:#f2a2a2;font-size:13px}.map-preview-layout[data-v-010e1897]{grid-template-columns:minmax(0,1fr) minmax(280px,420px);gap:16px;display:grid}.screen-preview-placeholder[data-v-010e1897]{aspect-ratio:16/9;color:#aaa;text-align:center;background-color:#111;justify-content:center;align-items:center;display:flex}.map-field[data-v-010e1897]{cursor:grab;resize:vertical;touch-action:none;background-color:#151515;border:1px dashed #fff3;height:420px;min-height:200px;position:relative;overflow:hidden}.map-field[data-v-010e1897]:active{cursor:grabbing}.map-canvas[data-v-010e1897]{transform-origin:0 0;background-image:linear-gradient(#ffffff14 1px,#0000 1px),linear-gradient(90deg,#ffffff14 1px,#0000 1px);background-size:20px 20px;width:2000px;height:1000px;position:absolute}.map-item[data-v-010e1897]{cursor:grab;-webkit-user-select:none;user-select:none;border-radius:6px;min-width:90px;padding:8px 24px 8px 8px;position:absolute}.map-item[data-v-010e1897]:active{cursor:grabbing}.map-screen[data-v-010e1897]{background-color:#355b75}.map-organizer-desk[data-v-010e1897]{background-color:#48633a}.map-team[data-v-010e1897]{background-color:#222}.map-team[data-v-010e1897],.map-team[data-v-010e1897]:active{cursor:default}.map-team-handle[data-v-010e1897]{cursor:grab;background-color:#48633a;border-radius:6px 6px 0 0;margin:-8px -24px 8px -8px;padding:8px 24px 8px 10px}.map-team-handle[data-v-010e1897]:active{cursor:grabbing}.map-team-applications[data-v-010e1897]{margin-top:8px}.map-team-needs-applications[data-v-010e1897]{outline:2px solid gold}.map-item small[data-v-010e1897]{opacity:.75;display:block}.map-item-hide[data-v-010e1897]{color:inherit;cursor:pointer;background:0 0;border:0;font-size:16px;position:absolute;top:5px;right:5px}.map-team .map-item-hide[data-v-010e1897]{padding:0 2px;line-height:16px;top:0}.map-hidden-items[data-v-010e1897]{margin-top:16px}@media (width<1024px){.map-preview-layout[data-v-010e1897]{grid-template-columns:1fr}}.issued-ticket[data-v-010e1897]{border-top:1px solid #777;flex-wrap:wrap;align-items:center;gap:8px;padding-top:8px;display:flex} +.screen-preview[data-v-d5134fb8]{aspect-ratio:16/9;color:#eee;text-align:center;background-color:#111;background-position:50%;background-size:cover;justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}.timer-preview[data-v-d5134fb8]{max-width:95%}.timer-preview h2[data-v-d5134fb8],.preview-message[data-v-d5134fb8],.preview-results h2[data-v-d5134fb8]{margin:0 0 10px;font-size:clamp(16px,3vw,32px)}.timer-preview strong[data-v-d5134fb8]{font-variant-numeric:tabular-nums;font-size:clamp(48px,10vw,120px);line-height:.9;display:block}.screen-preview audio[data-v-d5134fb8],.preview-video[data-v-d5134fb8]{pointer-events:none;width:90%;max-width:90%}.preview-video[data-v-d5134fb8]{object-fit:contain;height:100%}.preview-cover[data-v-d5134fb8]{object-fit:contain;width:100%;height:100%}.preview-results[data-v-d5134fb8]{width:100%;max-width:96%;max-height:90%;overflow:hidden}.preview-results table[data-v-d5134fb8]{border-collapse:collapse;width:100%;font-size:10px}.preview-results th[data-v-d5134fb8],.preview-results td[data-v-d5134fb8]{text-align:left;border-bottom:1px solid #ffffff2e;padding:3px}.ui-block[data-v-80193f22]{background-color:#222;border-radius:10px;margin:8px 0;padding:16px}.map-preview-layout[data-v-1e1af018]{grid-template-columns:minmax(0,1fr) minmax(280px,420px);gap:8px;display:grid}.screens-title[data-v-1e1af018]{margin:0;font-size:18px;font-weight:600}.screen-header[data-v-1e1af018]{margin-bottom:8px}.screen-preview-placeholder[data-v-1e1af018]{aspect-ratio:16/9;color:#aaa;text-align:center;background-color:#111;justify-content:center;align-items:center;display:flex}.screen-preview-panel>.screens-title[data-v-1e1af018]{margin-bottom:8px}.screen-plan[data-v-1e1af018]{margin-top:16px}.screen-plan-step[data-v-1e1af018]{border-top:1px solid #ffffff1a;padding:8px 0}.map-field[data-v-1e1af018]{aspect-ratio:1;cursor:grab;resize:vertical;touch-action:none;background-color:#151515;border:1px dashed #fff3;height:auto;min-height:200px;position:relative;overflow:hidden}.map-field[data-v-1e1af018]:active{cursor:grabbing}.map-canvas[data-v-1e1af018]{transform-origin:0 0;background-image:linear-gradient(#ffffff14 1px,#0000 1px),linear-gradient(90deg,#ffffff14 1px,#0000 1px);background-size:20px 20px;width:2000px;height:1000px;position:absolute}.map-item[data-v-1e1af018]{cursor:grab;-webkit-user-select:none;user-select:none;border-radius:6px;min-width:90px;padding:8px 24px 8px 8px;position:absolute}.map-item[data-v-1e1af018]:active{cursor:grabbing}.map-screen[data-v-1e1af018]{background-color:#355b75}.map-organizer-desk[data-v-1e1af018]{background-color:#48633a}.map-team[data-v-1e1af018]{background-color:#222}.map-team[data-v-1e1af018],.map-team[data-v-1e1af018]:active{cursor:default}.map-team-handle[data-v-1e1af018]{cursor:grab;background-color:#48633a;border-radius:6px 6px 0 0;margin:-8px -24px 8px -8px;padding:8px 24px 8px 8px}.map-team-handle[data-v-1e1af018]:active{cursor:grabbing}.map-team-applications[data-v-1e1af018]{margin-top:8px}.map-team-needs-applications[data-v-1e1af018]{outline:2px solid gold}.map-item small[data-v-1e1af018]{opacity:.75;display:block}.map-item-hide[data-v-1e1af018]{color:inherit;cursor:pointer;background:0 0;border:0;font-size:16px;position:absolute;top:5px;right:5px}.map-team .map-item-hide[data-v-1e1af018]{padding:0 2px;line-height:16px;top:0}.map-hidden-items[data-v-1e1af018]{margin-top:16px}@media (width<1024px){.map-preview-layout[data-v-1e1af018]{grid-template-columns:1fr}}.screen-scanner-video[data-v-5f530845]{aspect-ratio:1;object-fit:cover;background-color:#000;width:100%;max-height:60vh}.screens-title[data-v-c8e2dfff]{margin:0;font-size:18px;font-weight:600}.screen-header[data-v-c8e2dfff]{margin-bottom:8px}.music-block[data-v-c8e2dfff]{margin-top:12px}.playlist-actions[data-v-c8e2dfff]{margin:8px 0}.volume-control[data-v-c8e2dfff]{align-items:center;gap:6px;display:inline-flex}.volume-label[data-v-c8e2dfff]{white-space:nowrap}.volume-input[data-v-c8e2dfff]{width:108px}.screen-row[data-v-c8e2dfff]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}.screen-status[data-v-c8e2dfff]{color:#aaa;font-size:13px}.screen-empty[data-v-c8e2dfff]{color:#aaa;margin:16px 0 0}.screen-error[data-v-c8e2dfff]{color:#f2a2a2;font-size:13px}.track-list[data-v-c8e2dfff]{flex-basis:100%;margin-top:8px;padding:0 8px}.track-empty[data-v-c8e2dfff]{color:#aaa;margin:0}.track-row[data-v-c8e2dfff]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;min-height:56px;padding:12px 8px;display:flex}.track-row-active[data-v-c8e2dfff]{background:#ffffff1f}.track-main[data-v-c8e2dfff]{flex:1;align-items:center;gap:12px;display:flex;overflow:hidden}.track-number[data-v-c8e2dfff]{color:#aaa;font-variant-numeric:tabular-nums;text-align:left;flex:0 0 20px}.track-details[data-v-c8e2dfff]{text-align:left;flex-direction:column;min-width:0;display:flex}.track-name[data-v-c8e2dfff]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.track-actions[data-v-c8e2dfff]{flex:none}.track-switch-active[data-v-c8e2dfff]{font-weight:600}@media (width<1024px){.track-list[data-v-c8e2dfff]{padding:0}.track-row[data-v-c8e2dfff]{flex-direction:column;align-items:stretch;gap:12px;padding:12px}.track-main[data-v-c8e2dfff]{width:100%}.track-actions[data-v-c8e2dfff]{justify-content:flex-end;width:100%}.track-actions .n-button[data-v-c8e2dfff]{flex:1}.volume-control[data-v-c8e2dfff]{justify-content:space-between;width:100%}.volume-input[data-v-c8e2dfff]{flex:1;width:auto}}.device-details[data-v-a670747a]{overflow-wrap:anywhere}.connection[data-v-a670747a]{margin-top:16px}.team-block-hover[data-v-561486cb]:hover{cursor:pointer;background-color:#333}.team-content-block[data-v-561486cb]{padding:8px 16px}.team-name-block[data-v-561486cb]{font-size:20px}.link-button[data-v-561486cb]{margin:8px 8px 0 0}.place-image-plus[data-v-561486cb]{text-align:center;margin:0;padding:16px;font-size:32px}.ticket-scanner-video[data-v-fe322487]{aspect-ratio:1;object-fit:cover;background-color:#000;width:100%;max-height:60vh}.reviews-summary[data-v-2e81f45d]{margin-bottom:16px}.game-tab-content[data-v-2e81f45d]{padding-top:0}.review-row[data-v-2e81f45d]{border-top:1px solid #777;padding:16px 0}.review-row p[data-v-2e81f45d]{white-space:pre-wrap}.team-block-hover[data-v-2e81f45d]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.team-content-block[data-v-2e81f45d]{padding:20px}.team-name-block[data-v-2e81f45d]{font-size:20px;font-weight:600}.settings-icon[data-v-2e81f45d]{width:20px}.settings-actions[data-v-2e81f45d]{margin-top:16px}.link-button[data-v-2e81f45d]{width:100%;margin-top:16px}.place-image-plus[data-v-2e81f45d]{justify-content:center;align-items:center;font-size:30px;display:flex}.name-text[data-v-2e81f45d]{background-color:#ffffff1a;border-radius:3px;padding:3px}.qr-block[data-v-2e81f45d]{background-color:#fff;margin:0 auto;padding:16px;line-height:0;display:inline-block}.payment-link[data-v-2e81f45d]{color:#63e2b7}.payment-link[data-v-2e81f45d]:focus,.payment-link[data-v-2e81f45d]:hover{color:#8ff0cc}.give-application-image-block[data-v-2e81f45d]{background-image:url(/assets/paper_white-ZSlTzOTx.jpg);background-size:cover;max-width:320px;margin:8px 0;padding:8px;box-shadow:0 3px 15px #626262}.give-application-image[data-v-2e81f45d]{width:100%}.give-application-audio[data-v-2e81f45d]{width:100%;margin:8px 0}.give-application-pdf-link[data-v-2e81f45d]{margin:8px 0;text-decoration:underline;display:inline-block}.answers-empty[data-v-2e81f45d]{color:#777}.answers-question-title[data-v-2e81f45d]{margin:0 0 8px;font-size:17px;font-weight:600}.answers-question-answer[data-v-2e81f45d]{color:#aaa;margin:0 0 16px}.correct-answer[data-v-2e81f45d]{color:gold;white-space:pre-wrap;margin-top:8px;font-weight:500;display:inline-block}.answers-team-row[data-v-2e81f45d]{background-color:#ffffff0d;border-radius:6px;flex-flow:wrap;align-items:center;gap:8px;margin:8px 0;padding:8px;display:flex}.answers-team-name[data-v-2e81f45d]{width:180px;font-weight:600}.answers-team-answer[data-v-2e81f45d]{color:#aaa;white-space:pre-wrap;flex:200px}.answers-score-input[data-v-2e81f45d]{width:110px}.screens-title[data-v-2e81f45d]{margin-bottom:8px;font-size:18px;font-weight:600}.screen-row[data-v-2e81f45d]{border-top:1px solid #ffffff1a;justify-content:space-between;align-items:center;gap:8px;padding:16px 0;display:flex}.screen-status[data-v-2e81f45d]{color:#aaa;font-size:13px}.screen-empty[data-v-2e81f45d]{color:#aaa;margin:16px 0 0}.screen-error[data-v-2e81f45d]{color:#f2a2a2;font-size:13px}.map-preview-layout[data-v-2e81f45d]{grid-template-columns:minmax(0,1fr) minmax(280px,420px);gap:16px;display:grid}.screen-preview-placeholder[data-v-2e81f45d]{aspect-ratio:16/9;color:#aaa;text-align:center;background-color:#111;justify-content:center;align-items:center;display:flex}.map-field[data-v-2e81f45d]{cursor:grab;resize:vertical;touch-action:none;background-color:#151515;border:1px dashed #fff3;height:420px;min-height:200px;position:relative;overflow:hidden}.map-field[data-v-2e81f45d]:active{cursor:grabbing}.map-canvas[data-v-2e81f45d]{transform-origin:0 0;background-image:linear-gradient(#ffffff14 1px,#0000 1px),linear-gradient(90deg,#ffffff14 1px,#0000 1px);background-size:20px 20px;width:2000px;height:1000px;position:absolute}.map-item[data-v-2e81f45d]{cursor:grab;-webkit-user-select:none;user-select:none;border-radius:6px;min-width:90px;padding:8px 24px 8px 8px;position:absolute}.map-item[data-v-2e81f45d]:active{cursor:grabbing}.map-screen[data-v-2e81f45d]{background-color:#355b75}.map-organizer-desk[data-v-2e81f45d]{background-color:#48633a}.map-team[data-v-2e81f45d]{background-color:#222}.map-team[data-v-2e81f45d],.map-team[data-v-2e81f45d]:active{cursor:default}.map-team-handle[data-v-2e81f45d]{cursor:grab;background-color:#48633a;border-radius:6px 6px 0 0;margin:-8px -24px 8px -8px;padding:8px 24px 8px 10px}.map-team-handle[data-v-2e81f45d]:active{cursor:grabbing}.map-team-applications[data-v-2e81f45d]{margin-top:8px}.map-team-needs-applications[data-v-2e81f45d]{outline:2px solid gold}.map-item small[data-v-2e81f45d]{opacity:.75;display:block}.map-item-hide[data-v-2e81f45d]{color:inherit;cursor:pointer;background:0 0;border:0;font-size:16px;position:absolute;top:5px;right:5px}.map-team .map-item-hide[data-v-2e81f45d]{padding:0 2px;line-height:16px;top:0}.map-hidden-items[data-v-2e81f45d]{margin-top:16px}@media (width<1024px){.map-preview-layout[data-v-2e81f45d]{grid-template-columns:1fr}}.issued-ticket[data-v-2e81f45d]{border-top:1px solid #777;flex-wrap:wrap;align-items:center;gap:8px;padding-top:8px;display:flex} diff --git a/frontend/dist/assets/GameView-r2HR0IkN.js b/frontend/dist/assets/GameView-r2HR0IkN.js deleted file mode 100644 index 8bd5d0c..0000000 --- a/frontend/dist/assets/GameView-r2HR0IkN.js +++ /dev/null @@ -1,7 +0,0 @@ -import{Ct as e,Dt as t,In as n,It as r,Jt as i,Kt as a,Ln as o,Mt as s,Ot as c,Q as l,Rn as u,Rt as d,St as f,U as p,Ut as m,Vt as h,Wt as g,Xt as _,Yt as v,Zt as y,an as b,bn as x,bt as S,d as C,en as w,f as T,g as E,hn as D,ht as O,in as k,kt as A,l as j,nn as M,nt as N,p as ee,tt as P,u as te,vn as ne,wt as F,xt as I}from"./client-Bz0sY7Lm.js";import{d as re,t as ie}from"./Card-D1LVu21r.js";import{n as ae,r as oe,t as se}from"./es-BhJOHfSF.js";import{i as ce}from"./Suffix-JLavbuLO.js";import{t as le}from"./Modal-Bsm1tUwA.js";import{t as ue}from"./use-merged-state-z45UzW9G.js";import{n as de,t as L}from"./Button-lcMg8vK2.js";import{n as fe,t as pe}from"./Tabs-BuPkDDy2.js";import{t as me}from"./Select-DCgo5W2R.js";import{i as he,o as ge,s as R,t as z}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as _e}from"./Upload-B7-f9-Dk.js";import{n as B}from"./use-form-item-Bl3X3aXB.js";import{t as ve}from"./Add-BlaQeLtQ.js";import{t as V}from"./Input-DeqNzuJd.js";import{n as ye,t as be}from"./Switch-BQ4oql65.js";import{t as H}from"./Alert-CUBw4GSK.js";import{t as U}from"./Space-Ka5Z-MRX.js";import{t as W}from"./Flex-BUYalFhW.js";import{t as xe}from"./Rate-CmLMszwf.js";import{t as Se}from"./QrCode-MTPi5t58.js";import{t as Ce}from"./text-BblwgAv2.js";import{E as we,O as Te,ct as Ee,et as G,i as De,lt as K,o as Oe,q as ke,r as Ae,st as q}from"./index-6B3OmSLg.js";import{n as je,t as Me}from"./HeaderMenu-BhocR0ua.js";import{t as Ne}from"./binary_client-DXOBYp6r.js";import{n as Pe,r as Fe}from"./application-Bg005825.js";import{n as Ie,t as Le}from"./datetime-BJNH0M1T.js";import{t as Re}from"./useDeviceContext-dfnN0nNy.js";function ze(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var Be=T({name:`InputNumber`,common:C,peers:{Button:we,Input:Te},self:ze}),Ve=P([N(`input-number-suffix`,` - display: inline-block; - margin-right: 10px; - `),N(`input-number-prefix`,` - display: inline-block; - margin-left: 10px; - `)]);function He(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function Ue(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function J(e){return e==null?!0:!Number.isNaN(e)}function Y(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function X(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var We=800,Ge=100,Ke=A({name:`InputNumber`,props:Object.assign(Object.assign({},ee.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r,mergedComponentPropsRef:i}=p(e),a=ee(`InputNumber`,`-input-number`,Ve,Be,e,n),{localeRef:o}=ce(`InputNumber`),s=B(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:i?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:c,mergedDisabledRef:u,mergedStatusRef:f}=s,m=D(null),h=D(null),g=D(null),_=D(e.defaultValue),v=ue(ne(e,`value`),_),y=D(``),b=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},x=t=>{let n=[e.min,e.max,e.step,t].map(e=>e===void 0?0:b(e));return Math.max(...n)},C=G(()=>{let{placeholder:t}=e;return t===void 0?o.value.placeholder:t}),w=G(()=>{let t=X(e.step);return t===null||t===0?1:Math.abs(t)}),T=G(()=>{let t=X(e.min);return t===null?null:t}),O=G(()=>{let t=X(e.max);return t===null?null:t}),k=()=>{let{value:t}=v;if(J(t)){let{format:n,precision:r}=e;n?y.value=n(t):t===null||r===void 0||b(t)>r?y.value=Y(t,void 0):y.value=Y(t,r)}else y.value=String(t)};k();let A=t=>{let{value:n}=v;if(t===n){k();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=e,{nTriggerFormInput:o,nTriggerFormChange:c}=s;a&&R(a,t),i&&R(i,t),r&&R(r,t),_.value=t,o(),c()},j=({offset:t,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=y;if(i&&Ue(a))return!1;let o=(e.parse||He)(a);if(o===null)return n&&A(null),null;if(J(o)){let a=b(o),{precision:s}=e;if(s!==void 0&&st){if(!n||i)return!1;c=t}if(r!==null&&cj({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),P=G(()=>{let{value:t}=v;if(e.validator&&t===null)return!1;let{value:n}=w;return j({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),te=G(()=>{let{value:t}=v;if(e.validator&&t===null)return!1;let{value:n}=w;return j({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function F(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=s;n&&R(n,t),r()}function I(t){if(t.target===m.value?.wrapperElRef)return;let n=j({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(n!==!1){let e=m.value?.inputElRef;e&&(e.value=String(n||``)),v.value===n&&k()}else k();let{onBlur:r}=e,{nTriggerFormBlur:i}=s;r&&R(r,t),i(),d(()=>{k()})}function ie(t){let{onClear:n}=e;n&&R(n,t)}function ae(){let{value:t}=te;if(!t){_e();return}let{value:n}=v;if(n===null)e.validator||A(de());else{let{value:e}=w;j({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function oe(){let{value:t}=P;if(!t){ge();return}let{value:n}=v;if(n===null)e.validator||A(de());else{let{value:e}=w;j({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let se=F,le=I;function de(){if(e.validator)return null;let{value:t}=T,{value:n}=O;return t===null?n===null?0:Math.min(0,n):Math.max(0,t)}function L(e){ie(e),A(null)}function fe(e){var t;g.value?.$el.contains(e.target)&&e.preventDefault(),h.value?.$el.contains(e.target)&&e.preventDefault(),(t=m.value)==null||t.activate()}let pe=null,me=null,he=null;function ge(){he&&=(window.clearTimeout(he),null),pe&&=(window.clearInterval(pe),null)}let z=null;function _e(){z&&=(window.clearTimeout(z),null),me&&=(window.clearInterval(me),null)}function ve(){ge(),he=window.setTimeout(()=>{pe=window.setInterval(()=>{oe()},Ge)},We),re(`mouseup`,document,ge,{once:!0})}function V(){_e(),z=window.setTimeout(()=>{me=window.setInterval(()=>{ae()},Ge)},We),re(`mouseup`,document,_e,{once:!0})}let ye=()=>{me||ae()},be=()=>{pe||oe()};function H(t){var n;if(t.key===`Enter`){if(t.target===m.value?.wrapperElRef)return;j({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=m.value)==null||n.deactivate())}else if(t.key===`ArrowUp`){if(!te.value||e.keyboard.ArrowUp===!1)return;t.preventDefault(),j({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&ae()}else if(t.key===`ArrowDown`){if(!P.value||e.keyboard.ArrowDown===!1)return;t.preventDefault(),j({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&oe()}}function U(t){y.value=t,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&j({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}M(v,()=>{k()});let W={focus:()=>m.value?.focus(),blur:()=>m.value?.blur(),select:()=>m.value?.select()},xe=E(`InputNumber`,r,n);return Object.assign(Object.assign({},W),{rtlEnabled:xe,inputInstRef:m,minusButtonInstRef:h,addButtonInstRef:g,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:_,mergedValue:v,mergedPlaceholder:C,displayedValueInvalid:N,mergedSize:c,mergedDisabled:u,displayedValue:y,addable:te,minusable:P,mergedStatus:f,handleFocus:se,handleBlur:le,handleClear:L,handleMouseDown:fe,handleAddClick:ye,handleMinusClick:be,handleAddMousedown:V,handleMinusMousedown:ve,handleKeyDown:H,handleUpdateDisplayedValue:U,mergedTheme:a,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:S(()=>{let{self:{iconColorDisabled:e}}=a.value,[t,n,r,i]=l(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:e,$slots:t}=this,n=()=>s(de,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>he(t[`minus-icon`],()=>[s(ke,{clsPrefix:e},{default:()=>s(ye,null)})])}),r=()=>s(de,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>he(t[`add-icon`],()=>[s(ke,{clsPrefix:e},{default:()=>s(ve,null)})])});return s(`div`,{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},s(V,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[n(),ge(t.prefix,t=>t?s(`span`,{class:`${e}-input-number-prefix`},t):null)]:t.prefix?.call(t),suffix:()=>this.showButton?[ge(t.suffix,t=>t?s(`span`,{class:`${e}-input-number-suffix`},t):null),this.buttonPlacement===`right`?n():null,r()]:t.suffix?.call(t)}))}}),qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Je=A({name:`Flag`,render:function(e,t){return a(),F(`svg`,qe,t[0]||=[I(`path`,{d:`M6 30H4V2h24l-5.8 9l5.8 9H6zm0-12h18.33l-4.53-7l4.53-7H6z`,fill:`currentColor`},null,-1)])}}),Ye={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Xe=A({name:`Pause`,render:function(e,t){return a(),F(`svg`,Ye,t[0]||=[I(`path`,{d:`M12 8v16H8V8h4m0-2H8a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z`,fill:`currentColor`},null,-1),I(`path`,{d:`M24 8v16h-4V8h4m0-2h-4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z`,fill:`currentColor`},null,-1)])}}),Ze={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},Qe=A({name:`Play`,render:function(e,t){return a(),F(`svg`,Ze,t[0]||=[I(`path`,{d:`M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28zM8 6.69V25.31L24.925 16z`,fill:`currentColor`},null,-1)])}}),$e={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},et=A({name:`Reset`,render:function(e,t){return a(),F(`svg`,$e,t[0]||=[I(`path`,{d:`M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10z`,fill:`currentColor`},null,-1)])}}),tt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},nt=A({name:`Trophy`,render:function(e,t){return a(),F(`svg`,tt,t[0]||=[I(`path`,{d:`M26 7h-2V6a2.002 2.002 0 0 0-2-2H10a2.002 2.002 0 0 0-2 2v1H6a2.002 2.002 0 0 0-2 2v3a4.005 4.005 0 0 0 4 4h.322A8.169 8.169 0 0 0 15 21.934V26h-5v2h12v-2h-5v-4.069A7.966 7.966 0 0 0 23.74 16H24a4.005 4.005 0 0 0 4-4V9a2.002 2.002 0 0 0-2-2zM8 14a2.002 2.002 0 0 1-2-2V9h2zm14 0a6 6 0 0 1-6.186 5.997A6.2 6.2 0 0 1 10 13.707V6h12zm4-2a2.002 2.002 0 0 1-2 2V9h2z`,fill:`currentColor`},null,-1)])}}),rt={key:0,class:`timer-preview`},it=[`src`],at=[`src`],Z={key:3,class:`preview-message`},ot={key:4,class:`preview-message`},st={key:5,class:`preview-message`},ct={key:6,class:`preview-message`},lt={key:7,class:`preview-results`},ut=[`src`],dt=z(A({__name:`ScreenPreview`,props:{state:{},questions:{},teams:{}},setup(t){let n=t,r=D(Date.now()),s=D(0),c=D(Date.now()),l=D(),d=null,f=S(()=>{let e=n.state.backgroundImage||n.state.coverImage;return e?{backgroundImage:`linear-gradient(rgb(0 0 0 / 55%), rgb(0 0 0 / 55%)), url("${e}")`}:{}}),p=S(()=>n.state.timerState===`SCREEN_TIMER_STATE_RUNNING`?Math.max(0,s.value-(r.value-c.value)/1e3):s.value),h=S(()=>{let e=Math.floor(p.value/60),t=Math.floor(p.value%60);return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}),_=S(()=>Fe(n.state.introAudio)),v=S(()=>Fe(n.state.conclusionVideo));return M(()=>[n.state.timerRemainingSeconds,n.state.timerState,n.state.stateVersion],()=>{let e=Math.max(0,Number(n.state.timerRemainingSeconds||0));if(n.state.timerState===`SCREEN_TIMER_STATE_RUNNING`&&l.value===n.state.timerState){let t=Math.max(0,s.value-(Date.now()-c.value)/1e3);if(Math.abs(e-t)<=.5)return}s.value=e,c.value=Date.now(),l.value=n.state.timerState},{immediate:!0}),m(()=>{d=window.setInterval(()=>{r.value=Date.now()},250)}),g(()=>{d!=null&&window.clearInterval(d)}),(n,r)=>(a(),F(`div`,{class:`screen-preview`,style:o(f.value)},[t.state.mode===`SCREEN_MODE_TIMER`?(a(),F(`div`,rt,[I(`h2`,null,u(t.state.timerLabel||`Перерыв`),1),I(`strong`,null,u(h.value),1)])):t.state.mode===`SCREEN_MODE_INTRO`&&_.value?(a(),F(`audio`,{key:1,src:_.value,controls:``},null,8,it)):t.state.mode===`SCREEN_MODE_CONCLUSION`&&v.value?(a(),F(`video`,{key:2,src:v.value,autoplay:``,class:`preview-video`,loop:``,muted:``,playsinline:``},null,8,at)):t.state.mode===`SCREEN_MODE_CONCLUSION`?(a(),F(`div`,Z,` Видео закрывашки не задано `)):t.state.mode===`SCREEN_MODE_INTRO_DONE`?(a(),F(`div`,ot,`Успехов`)):t.state.mode===`SCREEN_MODE_CONCLUSION_DONE`?(a(),F(`div`,st,` Спасибо за игру! `)):t.state.mode===`SCREEN_MODE_TEXT`?(a(),F(`div`,ct,u(t.state.text),1)):t.state.mode===`SCREEN_MODE_RESULTS`?(a(),F(`div`,lt,[r[4]||=I(`h2`,null,`Результаты`,-1),I(`table`,null,[I(`thead`,null,[I(`tr`,null,[r[0]||=I(`th`,null,`Место`,-1),r[1]||=I(`th`,null,`Команда`,-1),(a(!0),F(O,null,i(t.questions,e=>(a(),F(`th`,{key:e.code},u(e.code),1))),128)),r[2]||=I(`th`,null,`Сумма`,-1),r[3]||=I(`th`,null,`Ходы`,-1)])]),I(`tbody`,null,[(a(!0),F(O,null,i(t.teams,e=>(a(),F(`tr`,{key:e.team?.ID},[I(`td`,null,u(e.place),1),I(`td`,null,u(e.team?.name),1),(a(!0),F(O,null,i(t.questions,t=>(a(),F(`td`,{key:t.code},u(e.answers?.find(e=>e.questionCode===t.code)?.score??0),1))),128)),I(`td`,null,u(e.totalScore),1),I(`td`,null,u(e.actionsCount),1)]))),128))])])])):t.state.coverImage?(a(),F(`img`,{key:8,src:t.state.coverImage,alt:`Обложка дела`,class:`preview-cover`},null,8,ut)):e(``,!0)],4))}}),[[`__scopeId`,`data-v-d5134fb8`]]),Q=z(A({__name:`UiBlock`,props:{tag:{default:`div`}},setup(e){return(t,n)=>(a(),f(y(e.tag),{class:`ui-block`},{default:k(()=>[v(t.$slots,`default`,{},void 0,!0)]),_:3}))}}),[[`__scopeId`,`data-v-80193f22`]]),ft={class:`map-preview-layout`},pt=[`onPointerdown`],mt=[`onPointerdown`],ht={key:2},gt=[`onClick`],_t={key:1,class:`screen-preview-placeholder`},vt={class:`screen-plan`},yt={key:0,class:`screen-empty`},bt=20,xt=z(A({__name:`GameMapPanel`,props:{mapItems:{},teams:{},screens:{},previewQuestions:{},previewTeams:{},screenPlan:{},screenPlanDraft:{},screenPlanDirty:{type:Boolean},screenPlanSaving:{type:Boolean},screenPlanMode:{},screenVolume:{},screenPosition:{}},emits:[`saveItem`,`dragging`,`giveApplication`,`addStep`,`edit`,`cancel`,`removeStep`,`moveStep`,`dirty`,`clearPlan`,`save`,`setStep`,`command`,`update:screenVolume`,`update:screenPosition`],setup(r,{emit:s}){let l=r,d=s,p=D(1),m=D({x:0,y:0}),g=D(),_=S(()=>l.screens.find(e=>e.status===`connected`)||l.screens[0]),v=S(()=>new Map(l.teams.filter(e=>e.applications?.length).map(e=>[e.ID,e]))),y=[{label:`Обложка`,value:`SCREEN_MODE_COVER`},{label:`Введение`,value:`SCREEN_MODE_INTRO`},{label:`Успехов`,value:`SCREEN_MODE_INTRO_DONE`},{label:`Закрывашка`,value:`SCREEN_MODE_CONCLUSION`},{label:`Спасибо за игру`,value:`SCREEN_MODE_CONCLUSION_DONE`},{label:`Результаты`,value:`SCREEN_MODE_RESULTS`},{label:`Таймер`,value:`SCREEN_MODE_TIMER`},{label:`Текст`,value:`SCREEN_MODE_TEXT`}],C,w;function T(e){let t=g.value;if(!t)return;let n=t.getBoundingClientRect();return{x:(e.clientX-n.left-t.clientLeft-m.value.x)/p.value,y:(e.clientY-n.top-t.clientTop-m.value.y)/p.value}}function E(e,t){let n=T(t);n&&(C={item:e,offsetX:n.x-(e.x||0),offsetY:n.y-(e.y||0)},d(`dragging`,!0),window.addEventListener(`pointermove`,A),window.addEventListener(`pointerup`,j,{once:!0}),window.addEventListener(`pointercancel`,j,{once:!0}))}function A(e){if(!C)return;let t=T(e);t&&(C.item.x=Math.round((t.x-C.offsetX)/bt)*bt,C.item.y=Math.round((t.y-C.offsetY)/bt)*bt)}function j(){if(!C)return;let e=C.item;C=void 0,window.removeEventListener(`pointermove`,A),window.removeEventListener(`pointerup`,j),window.removeEventListener(`pointercancel`,j),d(`dragging`,!1),d(`saveItem`,e)}function M(e){e.hidden=!e.hidden,d(`saveItem`,e,e.hidden)}function N(e){p.value=Math.min(2,Math.max(.5,Number((p.value+e).toFixed(2))))}function ee(){p.value=1,m.value={x:0,y:0}}function P(e){e.button===0&&(w={startX:e.clientX,startY:e.clientY,offsetX:m.value.x,offsetY:m.value.y},window.addEventListener(`pointermove`,te),window.addEventListener(`pointerup`,ne,{once:!0}))}function te(e){w&&(m.value={x:w.offsetX+e.clientX-w.startX,y:w.offsetY+e.clientY-w.startY})}function ne(){w=void 0,window.removeEventListener(`pointermove`,te)}function re(e){e.preventDefault(),N(e.deltaY<0?.1:-.1)}return h(()=>{C&&d(`dragging`,!1),window.removeEventListener(`pointermove`,A),window.removeEventListener(`pointerup`,j),window.removeEventListener(`pointercancel`,j),window.removeEventListener(`pointermove`,te),window.removeEventListener(`pointerup`,ne)}),(s,l)=>(a(),F(`div`,ft,[c(Q,null,{default:k(()=>[c(x(W),{align:`center`,justify:`space-between`,class:`screen-header`},{default:k(()=>[l[18]||=I(`p`,{class:`screens-title`},`Карта помещения`,-1),c(x(U),null,{default:k(()=>[c(x(L),{size:`small`,onClick:l[0]||=e=>N(-.1)},{default:k(()=>[...l[15]||=[t(`−`,-1)]]),_:1}),c(x(Ce),null,{default:k(()=>[t(u(Math.round(p.value*100))+`%`,1)]),_:1}),c(x(L),{size:`small`,onClick:l[1]||=e=>N(.1)},{default:k(()=>[...l[16]||=[t(`+`,-1)]]),_:1}),c(x(L),{size:`small`,onClick:ee},{default:k(()=>[...l[17]||=[t(`Сбросить`,-1)]]),_:1})]),_:1})]),_:1}),I(`div`,{ref_key:`mapField`,ref:g,class:`map-field`,onPointerdown:P,onWheel:re},[I(`div`,{class:`map-canvas`,style:o({transform:`translate(${m.value.x}px, ${m.value.y}px) scale(${p.value})`})},[(a(!0),F(O,null,i(r.mapItems,r=>b((a(),F(`div`,{key:`${r.kind}-${r.itemID}`,class:n([`map-item`,[r.kind===`screen`?`map-screen`:r.kind===`organizer_desk`?`map-organizer-desk`:`map-team`,{"map-team-needs-applications":r.kind===`team`&&v.value.has(r.itemID)}]]),style:o({left:`${r.x||0}px`,top:`${r.y||0}px`}),onPointerdown:K(e=>r.kind!==`team`&&E(r,e),[`stop`])},[r.kind===`team`?(a(),F(`div`,{key:0,class:`map-team-handle`,onPointerdown:K(e=>E(r,e),[`stop`])},null,40,mt)):e(``,!0),I(`span`,null,u(r.label),1),r.kind===`team`&&v.value.has(r.itemID)?(a(),f(x(U),{key:1,class:`map-team-applications`,vertical:``},{default:k(()=>[(a(!0),F(O,null,i(v.value.get(r.itemID)?.applications,e=>(a(),f(x(L),{key:e.name,size:`small`,onClick:t=>d(`giveApplication`,v.value.get(r.itemID),e)},{default:k(()=>[t(` Выдать: `+u(e.name),1)]),_:2},1032,[`onClick`]))),128))]),_:2},1024)):e(``,!0),r.kind===`screen`?(a(),F(`small`,ht,u(r.status)+u(r.soundEnabled?` · звук`:``),1)):e(``,!0),I(`button`,{class:`map-item-hide`,type:`button`,onPointerdown:l[2]||=K(()=>{},[`stop`]),onClick:K(e=>M(r),[`stop`])},` × `,40,gt)],46,pt)),[[q,!r.hidden]])),128))],4)],544),r.mapItems.some(e=>e.hidden)?(a(),f(x(U),{key:0,class:`map-hidden-items`},{default:k(()=>[(a(!0),F(O,null,i(r.mapItems.filter(e=>e.hidden),e=>(a(),f(x(L),{key:`hidden-${e.kind}-${e.itemID}`,size:`small`,onClick:t=>M(e)},{default:k(()=>[t(` Добавить `+u(e.label),1)]),_:2},1032,[`onClick`]))),128))]),_:1})):e(``,!0)]),_:1}),c(Q,{tag:`aside`,class:`screen-preview-panel`},{default:k(()=>[l[41]||=I(`p`,{class:`screens-title`},`Превью экрана`,-1),_.value?.status===`connected`?(a(),f(dt,{key:0,state:_.value,questions:r.previewQuestions,teams:r.previewTeams},null,8,[`state`,`questions`,`teams`])):(a(),F(`div`,_t,`Экран не подключён`)),I(`div`,vt,[c(x(W),{align:`center`,justify:`space-between`,class:`screen-header`},{default:k(()=>[l[23]||=I(`p`,{class:`screens-title`},`План экранов`,-1),c(x(U),null,{default:k(()=>[!r.screenPlan&&r.screenPlanMode===`use`?(a(),f(x(L),{key:0,size:`small`,onClick:l[3]||=e=>d(`addStep`)},{default:k(()=>[...l[19]||=[t(` Создать план `,-1)]]),_:1})):e(``,!0),r.screenPlan&&r.screenPlanMode===`use`?(a(),f(x(L),{key:1,size:`small`,onClick:l[4]||=e=>d(`edit`)},{default:k(()=>[...l[20]||=[t(` Редактировать `,-1)]]),_:1})):e(``,!0),r.screenPlanMode===`edit`?(a(),F(O,{key:2},[c(x(L),{size:`small`,disabled:r.screenPlanSaving,onClick:l[5]||=e=>d(`cancel`)},{default:k(()=>[...l[21]||=[t(` Отменить `,-1)]]),_:1},8,[`disabled`]),c(x(L),{size:`small`,type:`primary`,loading:r.screenPlanSaving,disabled:r.screenPlanSaving,onClick:l[6]||=e=>d(`save`)},{default:k(()=>[...l[22]||=[t(` Сохранить план `,-1)]]),_:1},8,[`loading`,`disabled`])],64)):e(``,!0)]),_:1})]),_:1}),!r.screenPlan&&r.screenPlanMode===`use`?(a(),F(`p`,yt,` План экранов ещё не создан. `)):r.screenPlanMode===`edit`?(a(),F(O,{key:1},[(a(!0),F(O,null,i(r.screenPlanDraft,(n,i)=>(a(),f(x(U),{key:i,class:`screen-plan-step`,align:`center`,justify:`space-between`,wrap:``},{default:k(()=>[c(x(U),{align:`center`,wrap:``},{default:k(()=>[c(x(Ce),null,{default:k(()=>[t(u(i+1),1)]),_:2},1024),c(x(me),{value:n.mode,"onUpdate:value":[e=>n.mode=e,l[7]||=e=>d(`dirty`)],options:y,disabled:r.screenPlanSaving,size:`small`,style:{width:`180px`}},null,8,[`value`,`onUpdate:value`,`disabled`]),n.mode===`SCREEN_MODE_TEXT`?(a(),f(x(V),{key:0,value:n.text,"onUpdate:value":[e=>n.text=e,l[8]||=e=>d(`dirty`)],disabled:r.screenPlanSaving,size:`small`,placeholder:`Текст экрана`,style:{"min-width":`240px`}},null,8,[`value`,`onUpdate:value`,`disabled`])):e(``,!0),n.mode===`SCREEN_MODE_TIMER`?(a(),F(O,{key:1},[c(x(V),{value:n.timerLabel,"onUpdate:value":[e=>n.timerLabel=e,l[9]||=e=>d(`dirty`)],disabled:r.screenPlanSaving,size:`small`,placeholder:`Надпись таймера`},null,8,[`value`,`onUpdate:value`,`disabled`]),c(x(Ke),{value:n.timerDurationSeconds,"onUpdate:value":[e=>n.timerDurationSeconds=e,l[10]||=e=>d(`dirty`)],min:1,max:86400,disabled:r.screenPlanSaving,size:`small`,placeholder:`Секунды`},null,8,[`value`,`onUpdate:value`,`disabled`])],64)):e(``,!0)]),_:2},1024),c(x(U),{class:`screen-plan-actions`},{default:k(()=>[c(x(L),{size:`small`,disabled:r.screenPlanSaving||i===0,onClick:e=>d(`moveStep`,i,-1)},{default:k(()=>[...l[24]||=[t(` ↑ `,-1)]]),_:1},8,[`disabled`,`onClick`]),c(x(L),{size:`small`,disabled:r.screenPlanSaving||i===r.screenPlanDraft.length-1,onClick:e=>d(`moveStep`,i,1)},{default:k(()=>[...l[25]||=[t(` ↓ `,-1)]]),_:1},8,[`disabled`,`onClick`]),c(x(L),{size:`small`,type:`error`,ghost:``,disabled:r.screenPlanSaving,onClick:e=>d(`removeStep`,i)},{default:k(()=>[...l[26]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`,`onClick`])]),_:2},1024)]),_:2},1024))),128)),c(x(U),null,{default:k(()=>[c(x(L),{size:`small`,disabled:r.screenPlanSaving,onClick:l[11]||=e=>d(`addStep`)},{default:k(()=>[...l[27]||=[t(` Добавить шаг `,-1)]]),_:1},8,[`disabled`]),r.screenPlanDraft.length?(a(),f(x(L),{key:0,size:`small`,disabled:r.screenPlanSaving,onClick:l[12]||=e=>d(`clearPlan`)},{default:k(()=>[...l[28]||=[t(` Удалить план `,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})],64)):r.screenPlan?(a(!0),F(O,{key:2},i(r.screenPlan.steps||[],(n,i)=>(a(),f(x(U),{key:i,class:`screen-plan-step`,align:`center`,justify:`space-between`,wrap:``},{default:k(()=>[c(x(U),{align:`center`},{default:k(()=>[c(x(Ce),null,{default:k(()=>[t(u(i+1),1)]),_:2},1024),c(x(Ce),null,{default:k(()=>[t(u(y.find(e=>e.value===n.mode)?.label)+` `,1),n.mode===`SCREEN_MODE_TEXT`?(a(),F(O,{key:0},[t(`: `+u(n.text),1)],64)):n.mode===`SCREEN_MODE_TIMER`?(a(),F(O,{key:1},[t(` : `+u(n.timerLabel)+` (`+u(n.timerDurationSeconds)+` с) `,1)],64)):e(``,!0)]),_:2},1024)]),_:2},1024),c(x(U),{class:`screen-plan-actions`},{default:k(()=>[c(x(L),{size:`small`,type:r.screenPlan.currentStep===i?`primary`:`default`,disabled:r.screenPlan.currentStep===i,onClick:e=>d(`setStep`,i)},{default:k(()=>[...l[29]||=[t(` Показать `,-1)]]),_:1},8,[`type`,`disabled`,`onClick`]),r.screenPlan.currentStep===i?(a(),F(O,{key:0},[n.mode===`SCREEN_MODE_TIMER`?(a(),F(O,{key:0},[c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_TIMER_START`)},{default:k(()=>[...l[30]||=[t(` Старт `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_TIMER_PAUSE`)},{default:k(()=>[...l[31]||=[t(` Пауза `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_TIMER_RESUME`)},{default:k(()=>[...l[32]||=[t(` Продолжить `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_TIMER_RESET`)},{default:k(()=>[...l[33]||=[t(` Сбросить `,-1)]]),_:1},8,[`onClick`])],64)):n.mode===`SCREEN_MODE_INTRO`||n.mode===`SCREEN_MODE_CONCLUSION`?(a(),F(O,{key:1},[c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_PLAY`)},{default:k(()=>[...l[34]||=[t(` Запуск `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_PAUSE`)},{default:k(()=>[...l[35]||=[t(` Пауза `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_RESUME`)},{default:k(()=>[...l[36]||=[t(` Продолжить `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_STOP`)},{default:k(()=>[...l[37]||=[t(` Стоп `,-1)]]),_:1},8,[`onClick`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_REPLAY`)},{default:k(()=>[...l[38]||=[t(` Повтор `,-1)]]),_:1},8,[`onClick`]),c(x(Ke),{value:r.screenVolume,min:0,max:100,step:5,size:`small`,"onUpdate:value":l[13]||=e=>d(`update:screenVolume`,e)},null,8,[`value`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_VOLUME`)},{default:k(()=>[...l[39]||=[t(` Громкость `,-1)]]),_:1},8,[`onClick`]),c(x(Ke),{value:r.screenPosition,min:0,step:5,size:`small`,"onUpdate:value":l[14]||=e=>d(`update:screenPosition`,e)},null,8,[`value`]),c(x(L),{size:`small`,onClick:e=>d(`command`,n.mode,`SCREEN_COMMAND_SEEK`)},{default:k(()=>[...l[40]||=[t(` Перемотать `,-1)]]),_:1},8,[`onClick`])],64)):e(``,!0)],64)):e(``,!0)]),_:2},1024)]),_:2},1024))),128)):e(``,!0)])]),_:1})]))}}),[[`__scopeId`,`data-v-1e1af018`]]),St=z(A({__name:`ScreenBindingModal`,props:r({binding:{type:Boolean}},{show:{type:Boolean,required:!0},showModifiers:{}}),emits:r([`scanned`],[`update:show`]),setup(n,{emit:r}){let i=w(n,`show`),o=r,s=D(``),l=D(),p=D(!1),m,g=0;function _(){cancelAnimationFrame(g),m?.getTracks().forEach(e=>e.stop()),m=void 0,p.value=!1}function v(e){try{let t=new URL(e,window.location.origin),n=t.searchParams.get(`screenId`),r=t.searchParams.get(`accessToken`);return t.pathname!==`/screen`||!n||!r?void 0:{screenID:n,accessToken:r}}catch{return}}async function y(){let e=window.BarcodeDetector;if(!e||!navigator.mediaDevices?.getUserMedia){s.value=`Сканирование камерой не поддерживается в этом браузере.`;return}s.value=``;try{if(m=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),p.value=!0,await d(),!l.value)return;l.value.srcObject=m,await l.value.play();let t=new e,n=async()=>{if(!(!l.value||!m))try{let e=(await t.detect(l.value))[0]?.rawValue;if(e){let t=v(e);if(t){_(),i.value=!1,o(`scanned`,t.screenID,t.accessToken);return}s.value=`Это не QR-код экрана.`}g=requestAnimationFrame(n)}catch{s.value=`Не удалось распознать QR-код.`,_()}};g=requestAnimationFrame(n)}catch{s.value=`Не удалось открыть камеру.`,_()}}function b(){_(),i.value=!1}return M(i,e=>{e?y():_()}),h(_),(r,o)=>(a(),f(x(le),{show:i.value,"onUpdate:show":o[0]||=e=>i.value=e},{default:k(()=>[c(x(ie),{style:{width:`min(600px, 94vw)`},title:`Привязать экран`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:b},{default:k(()=>[...o[1]||=[t(` x `,-1)]]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[I(`video`,{ref_key:`scannerVideo`,ref:l,class:`screen-scanner-video`,muted:``,playsinline:``},null,512),s.value?(a(),f(x(H),{key:0,type:`error`},{default:k(()=>[t(u(s.value),1)]),_:1})):e(``,!0),!p.value&&!n.binding?(a(),f(x(L),{key:1,type:`primary`,onClick:y},{default:k(()=>[...o[2]||=[t(` Сканировать QR-код `,-1)]]),_:1})):e(``,!0),p.value?(a(),f(x(L),{key:2,onClick:_},{default:k(()=>[...o[3]||=[t(`Остановить камеру`,-1)]]),_:1})):e(``,!0),n.binding?(a(),f(x(L),{key:3,type:`primary`,loading:``},{default:k(()=>[...o[4]||=[t(`Привязка…`,-1)]]),_:1})):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-5f530845`]]),Ct={key:1,class:`screen-empty`},wt={class:`screen-status`},Tt={key:0,class:`screen-error`},Et={key:0,class:`track-list`},Dt={key:0,class:`track-empty`},Ot={class:`track-main`},kt={class:`track-number`},At={class:`track-details`},jt={class:`track-name`},Mt={class:`volume-control`},Nt=z(A({__name:`GameScreensPanel`,props:{screens:{},screenBinding:{type:Boolean},playlists:{},music:{}},emits:[`bind`,`setSound`,`unbind`,`setMusic`,`createPlaylist`,`deletePlaylist`,`uploadTrack`,`deleteTrack`],setup(r,{emit:o}){let s=r,l=o,d=D(!1),p=D(``);function m(e){e.file.file&&l(`uploadTrack`,e.file.file)}function h(e){e!==s.music?.trackIndex&&l(`setMusic`,{trackIndex:e,positionMs:0})}return(o,g)=>{let v=_(`n-tag`);return a(),F(O,null,[c(Q,null,{default:k(()=>[c(x(W),{align:`center`,justify:`space-between`,class:`screen-header`},{default:k(()=>[g[13]||=I(`p`,{class:`screens-title`},`Экраны`,-1),c(x(L),{size:`small`,onClick:g[0]||=e=>d.value=!0},{default:k(()=>[...g[12]||=[t(` Привязать экран `,-1)]]),_:1})]),_:1}),r.screens.some(e=>e.status===`disconnected`)?(a(),f(x(H),{key:0,type:`warning`,title:`Проверьте подключение экрана`},{default:k(()=>[...g[14]||=[t(` Один или несколько экранов не выходят на связь более минуты. `,-1)]]),_:1})):e(``,!0),r.screens.length===0?(a(),F(`p`,Ct,`К игре пока не привязаны экраны.`)):(a(!0),F(O,{key:2},i(r.screens,n=>(a(),F(`div`,{key:n.ID,class:`screen-row`},[I(`div`,null,[I(`div`,null,`Экран `+u(n.ID),1),I(`div`,wt,u(n.status===`connected`?`Онлайн`:`Оффлайн`),1),n.error?(a(),F(`div`,Tt,u(n.error),1)):e(``,!0)]),c(x(W),{justify:`end`},{default:k(()=>[n.soundEnabled?(a(),f(v,{key:0,type:`success`},{default:k(()=>[...g[15]||=[t(`Со звуком`,-1)]]),_:1})):(a(),f(x(L),{key:1,size:`small`,onClick:e=>l(`setSound`,n)},{default:k(()=>[...g[16]||=[t(`Назначить звук`,-1)]]),_:1},8,[`onClick`])),c(x(L),{size:`small`,type:`error`,ghost:``,onClick:e=>l(`unbind`,n)},{default:k(()=>[...g[17]||=[t(` Отвязать `,-1)]]),_:1},8,[`onClick`])]),_:2},1024)]))),128))]),_:1}),c(St,{show:d.value,"onUpdate:show":g[1]||=e=>d.value=e,binding:s.screenBinding,onScanned:g[2]||=(e,t)=>l(`bind`,e,t)},null,8,[`show`,`binding`]),c(Q,{class:`music-block`},{default:k(()=>[g[29]||=I(`p`,{class:`screens-title`},`Музыка`,-1),c(x(W),{align:`center`,wrap:``,class:`playlist-actions`},{default:k(()=>[c(x(V),{value:p.value,"onUpdate:value":g[3]||=e=>p.value=e,placeholder:`Новый плейлист`,style:{"max-width":`220px`}},null,8,[`value`]),c(x(L),{size:`small`,disabled:!p.value.trim(),onClick:g[4]||=e=>{l(`createPlaylist`,p.value.trim()),p.value=``}},{default:k(()=>[...g[18]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`]),s.music?.playlist?.ID?(a(),f(x(L),{key:0,size:`small`,type:`error`,ghost:``,onClick:g[5]||=e=>l(`deletePlaylist`,s.music.playlist.ID)},{default:k(()=>[...g[19]||=[t(` Удалить плейлист `,-1)]]),_:1})):e(``,!0),c(x(_e),{accept:`.mp3,audio/mpeg`,"default-upload":!1,"show-file-list":!1,onChange:m},{default:k(()=>[c(x(L),{size:`small`},{default:k(()=>[...g[20]||=[t(`Добавить MP3`,-1)]]),_:1})]),_:1})]),_:1}),c(x(W),{align:`center`,wrap:``},{default:k(()=>[c(x(me),{value:s.music?.playlist?.ID,options:s.playlists.map(e=>({label:e.name,value:e.ID})),placeholder:`Плейлист`,clearable:``,style:{"min-width":`220px`},"onUpdate:value":g[6]||=e=>l(`setMusic`,{playlistID:e||0,trackIndex:0,playback:`MUSIC_PLAYBACK_STOPPED`})},null,8,[`value`,`options`]),s.music?.playlist?(a(),F(`div`,Et,[s.music.playlist.tracks?.length?e(``,!0):(a(),F(`p`,Dt,`В плейлисте пока нет треков.`)),(a(!0),F(O,null,i(s.music.playlist.tracks,(e,r)=>(a(),F(`div`,{key:e.ID,class:n([`track-row`,{"track-row-active":r===(s.music.trackIndex??0)}])},[I(`div`,Ot,[I(`span`,kt,u(r+1),1),I(`span`,At,[I(`span`,jt,u(e.name||`Трек ${r+1}`),1)])]),c(x(W),{align:`center`,class:`track-actions`},{default:k(()=>[c(x(L),{size:`small`,type:r===(s.music.trackIndex??0)?`success`:`primary`,ghost:``,class:n({"track-switch-active":r===(s.music.trackIndex??0)}),onClick:e=>h(r)},{default:k(()=>[t(u(r===(s.music.trackIndex??0)?s.music.playback===`MUSIC_PLAYBACK_PLAYING`?`Играет`:`Выбран`:`Включить`),1)]),_:2},1032,[`type`,`class`,`onClick`]),c(x(L),{size:`small`,type:`error`,ghost:``,onClick:t=>l(`deleteTrack`,e.ID)},{default:k(()=>[...g[21]||=[t(` Удалить `,-1)]]),_:1},8,[`onClick`])]),_:2},1024)],2))),128))])):e(``,!0),c(x(L),{size:`small`,onClick:g[7]||=e=>l(`setMusic`,{playback:`MUSIC_PLAYBACK_PLAYING`})},{default:k(()=>[...g[22]||=[t(`Старт`,-1)]]),_:1}),c(x(L),{size:`small`,onClick:g[8]||=e=>l(`setMusic`,{playback:`MUSIC_PLAYBACK_PAUSED`})},{default:k(()=>[...g[23]||=[t(`Пауза`,-1)]]),_:1}),c(x(L),{size:`small`,onClick:g[9]||=e=>l(`setMusic`,{playback:`MUSIC_PLAYBACK_STOPPED`,positionMs:0})},{default:k(()=>[...g[24]||=[t(`Стоп`,-1)]]),_:1}),I(`div`,Mt,[g[26]||=I(`span`,{class:`volume-label`},`Громкость`,-1),c(x(Ke),{value:s.music?.volume??100,min:0,max:100,step:5,size:`small`,"show-button":!0,"aria-label":`Громкость музыки`,class:`volume-input`,"onUpdate:value":g[10]||=e=>e!=null&&l(`setMusic`,{volume:e})},{suffix:k(()=>[...g[25]||=[t(`%`,-1)]]),_:1},8,[`value`])]),c(x(be),{value:s.music?.loop,round:!1,"onUpdate:value":g[11]||=e=>l(`setMusic`,{loop:e})},{checked:k(()=>[...g[27]||=[t(`Loop`,-1)]]),unchecked:k(()=>[...g[28]||=[t(`Loop`,-1)]]),_:1},8,[`value`])]),_:1})]),_:1})],64)}}}),[[`__scopeId`,`data-v-c8e2dfff`]]),Pt={class:`team-content-block`},Ft={class:`title-block`},It={class:`team-name-block`},Lt={key:0},Rt={key:1},zt={key:0},Bt={key:0},Vt={key:1},Ht={key:2},Ut={key:3},Wt={key:4},Gt=z(A({__name:`GameTeamsPanel`,props:{teams:{},participationOptions:{}},emits:[`add`,`open-qr`,`preview`,`delete`,`give-application`],setup(n,{emit:r}){let o=r;return(r,s)=>(a(),F(O,null,[c(Q,{class:`team-block-hover`,onClick:s[0]||=e=>o(`add`)},{default:k(()=>[...s[1]||=[I(`p`,{class:`place-image-plus`},`+`,-1)]]),_:1}),(a(!0),F(O,null,i(n.teams,r=>(a(),f(Q,{key:r.ID},{default:k(()=>[I(`div`,Pt,[c(x(W),{justify:`space-between`},{default:k(()=>[I(`div`,Ft,[I(`span`,It,[t(u(r.name)+` `,1),r.captainEmail?(a(),F(`small`,Lt,` — `+u(r.captainEmail),1)):e(``,!0),r.participantsCount?(a(),F(`small`,Rt,` · Участников: `+u(r.participantsCount),1)):e(``,!0)]),r.captainEmail||r.participationStatus!==`pending`?(a(),F(`div`,zt,[t(u(n.participationOptions.find(e=>e.value===r.participationStatus)?.label),1),r.participationSource===`automatic`?(a(),F(`span`,Bt,` · автоматически`)):e(``,!0)])):e(``,!0),r.captainEmail?r.participationEmailError?(a(),F(`div`,Ht,` Ошибка отправки: `+u(r.participationEmailError),1)):r.participationEmailSent?(a(),F(`div`,Ut,`Письмо отправлено`)):e(``,!0):(a(),F(`div`,Vt,`Почта капитана не указана`)),r.participationStatus===`cancelled`?e(``,!0):(a(),F(`div`,Wt,` Поездки: `+u(r.actionsCount),1))]),c(x(W),{justify:`end`},{default:k(()=>[r.participationStatus===`cancelled`?e(``,!0):(a(),f(x(L),{key:0,onClick:e=>o(`open-qr`,r)},{default:k(()=>[...s[2]||=[t(`QR`,-1)]]),_:1},8,[`onClick`])),r.participationStatus===`cancelled`?e(``,!0):(a(),f(x(L),{key:1,onClick:e=>o(`preview`,r.ID,r.password)},{default:k(()=>[...s[3]||=[t(`Подсмотреть игру`,-1)]]),_:1},8,[`onClick`])),c(x(L),{type:`error`,ghost:``,onClick:e=>o(`delete`,r)},{default:k(()=>[...s[4]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1024),(a(!0),F(O,null,i(r.applications,e=>(a(),f(x(L),{key:e.name,class:`link-button`,onClick:t=>o(`give-application`,r,e)},{default:k(()=>[t(` Выдать: `+u(e.name),1)]),_:2},1032,[`onClick`]))),128))])]),_:2},1024))),128))],64))}}),[[`__scopeId`,`data-v-561486cb`]]),Kt={key:0},$={key:1},qt={key:2},Jt=z(A({__name:`TicketCheckModal`,props:{show:{type:Boolean,required:!0},showModifiers:{}},emits:[`update:show`],setup(n){let r=w(n,`show`),i=De(),o=ae(),s=D(``),l=D(),p=D(``),m=D(!1),g=D(),_=D(!1),v,y=0,b=S(()=>{try{return new URL(s.value.trim()).pathname.match(/\/tickets\/([^/]+)/)?.[1]||``}catch{return s.value.trim()}});async function C(){if(!(!b.value||m.value)){m.value=!0,p.value=``,l.value=void 0;try{let e=await i.GetTicket({token:b.value});e.ticket?l.value=e.ticket:p.value=`Билет не найден`}catch(e){p.value=e instanceof Error?e.message:`Не удалось проверить билет`}finally{m.value=!1}}}async function T(){if(!(!b.value||m.value)){m.value=!0,p.value=``;try{let e=await i.AcceptTicket({token:b.value});e.ticket?(l.value=e.ticket,o.success(`Билет принят`)):p.value=`Не удалось принять билет`}catch(e){p.value=e instanceof Error?e.message:`Не удалось принять билет`}finally{m.value=!1}}}async function E(){let e=window.BarcodeDetector;if(!e||!navigator.mediaDevices?.getUserMedia){p.value=`Сканирование камерой не поддерживается. Введите ссылку вручную.`;return}p.value=``;try{if(v=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),_.value=!0,await d(),!g.value)return;g.value.srcObject=v,await g.value.play();let t=new e,n=async()=>{if(!(!_.value||!g.value))try{let e=(await t.detect(g.value))[0]?.rawValue;if(e){s.value=e,A(),await C();return}y=requestAnimationFrame(n)}catch{p.value=`Не удалось распознать QR-код.`,A()}};y=requestAnimationFrame(n)}catch{p.value=`Не удалось открыть камеру. Введите ссылку вручную.`,A()}}function A(){cancelAnimationFrame(y),v?.getTracks().forEach(e=>e.stop()),v=void 0,_.value=!1}function j(){A(),r.value=!1}return M(r,e=>{e?E():A()}),h(A),(n,i)=>(a(),f(x(le),{show:r.value,"onUpdate:show":i[1]||=e=>r.value=e},{default:k(()=>[c(x(ie),{style:{width:`min(600px, 94vw)`},title:`Проверка билета`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:j},{default:k(()=>[...i[2]||=[t(` x `,-1)]]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[_.value?(a(),F(`video`,{key:0,ref_key:`video`,ref:g,class:`ticket-scanner-video`,muted:``,playsinline:``},null,512)):e(``,!0),p.value?(a(),f(x(H),{key:1,type:`error`},{default:k(()=>[t(u(p.value),1)]),_:1})):e(``,!0),_.value?(a(),f(x(L),{key:3,onClick:A},{default:k(()=>[...i[4]||=[t(`Остановить камеру`,-1)]]),_:1})):(a(),f(x(L),{key:2,onClick:E},{default:k(()=>[...i[3]||=[t(`Сканировать QR-код`,-1)]]),_:1})),c(x(V),{value:s.value,"onUpdate:value":i[0]||=e=>s.value=e,placeholder:`Или вставьте ссылку на билет`,onKeyup:Ee(C,[`enter`])},null,8,[`value`]),c(x(L),{type:`primary`,loading:m.value,onClick:C},{default:k(()=>[...i[5]||=[t(` Проверить билет `,-1)]]),_:1},8,[`loading`]),l.value?(a(),F(O,{key:4},[c(x(H),{type:l.value.status===`active`?`success`:`warning`},{default:k(()=>[t(u(l.value.gameName),1),i[6]||=I(`br`,null,null,-1),t(` Статус: `+u(l.value.status===`active`?`действителен`:`уже использован`)+` `,1),l.value.usedBy?(a(),F(`span`,Kt,` · `+u(l.value.usedBy),1)):e(``,!0),l.value.usedAt?(a(),F(`br`,$)):e(``,!0),l.value.usedAt?(a(),F(`span`,qt,`Использован: `+u(x(Le)(l.value.usedAt)),1)):e(``,!0)]),_:1},8,[`type`]),l.value.status===`active`&&l.value.gameStatus!==`finish`?(a(),f(x(L),{key:0,type:`primary`,loading:m.value,onClick:T},{default:k(()=>[...i[7]||=[t(` Принять билет `,-1)]]),_:1},8,[`loading`])):e(``,!0)],64)):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-fe322487`]]),Yt={class:`center-block-custom`},Xt={class:`width1200`},Zt={class:`game-tab-content`},Qt={key:5},$t=[`href`],en={class:`game-tab-content`},tn={class:`game-tab-content`},nn={class:`game-tab-content`},rn={class:`game-tab-content`},an={class:`qr-block`},on={class:`game-tab-content`},sn={key:0,class:`answers-empty`},cn={class:`answers-question-title`},ln={class:`answers-question-answer`},un={class:`correct-answer`},dn={class:`answers-team-name`},fn={class:`answers-team-answer`},pn={key:0,class:`give-application-image-block`},mn=[`src`],hn=[`src`],gn=[`href`],_n={class:`qr-block`},vn={key:0,class:`answers-empty`},yn=`https://www.sberbank.ru/ru/choise_bank?requisiteNumber=79609361994&bankCode=100000000111`,bn=z(A({__name:`GamePage`,emits:[`resultsApplied`],setup(n,{emit:r}){let o=r,s=De(),l=Ne(),d=D(!1),p=te(),m=j(),h=m.params.id;Re(()=>({organizerGameID:Number(h)}));function g(e){return[`settings`,`teams`,`screens`,`game`,`payment`,`answers`].includes(e)}let _=typeof m.query.tab==`string`?m.query.tab:``,v=D(g(_)?_:`game`);async function y(e){g(e)&&(v.value=e,await p.replace({query:{...m.query,tab:e}}),e===`answers`&&await Gn())}let b=ae(),C=D({name:``,description:``,format:`online`,location:``}),w=D(!1),T=D(!1),E=D(!1),A=D(!1),M=D(!1),N=D(``),ee=D(``),P=D(1),ne=D(``),re=D(!1),ce=D(``),ue=D(``),de=D(!1),he=D(1),ge=D([]),R=D(!1),z=D(!1),B=D({ID:void 0,name:void 0,description:void 0,startAt:void 0,status:void 0,format:void 0,location:void 0,scenario:void 0,teams:void 0,export:void 0}),ve=Oe(),ye=je(),be=S(()=>ye.environment===`prod`&&ve.hasAnyRole([`admin`,`organizer`,`developer`])),we=D(!1),Te=D(!1),Ee=S(()=>ye.environment===`venue`&&B.value.status===`finish`&&ve.hasAnyRole([`admin`,`organizer`,`developer`])),G=D(!1),K=D(!1),ke=D([]),q=D(``),ze=[{label:`Ожидает ответа`,value:`pending`},{label:`Подтверждено`,value:`confirmed`},{label:`Отменено`,value:`cancelled`}],Be=S(()=>(B.value.teams||[]).filter(e=>e.participationStatus!==`cancelled`).length),Ve=D([]),He=D([]),Ue=D(),J=D(),Y=D([]),X=D(!1),We=D(!1),Ge=D(`use`),qe=0,Ye=D([]),Ze=D([]),$e=D([]),tt=D(!1),rt=D(!1),it=D(100),at=D(0);async function Z(e){let t=await s.GetGame({ID:e});B.value=t.game,w.value||=(C.value={name:B.value.name||``,description:B.value.description||``,format:B.value.format||`online`,location:B.value.location||``},!0),B.value.teams=B.value.teams?.sort((e,t)=>{let n=0;(e.applications?.length||0)>0&&(n=1);let r=0;if((t.applications?.length||0)>0&&(r=1),n>r)return-1;if(na?1:ie.status===`connected`)||Ve.value[0])?.mode===`SCREEN_MODE_RESULTS`){let e=await s.GetGameResults({gameID:Number(h)});Ye.value=e.questions||[],Ze.value=e.teams||[]}else Ye.value=[],Ze.value=[]}ot();async function st(){try{let e=await s.GetGameMusic({gameID:Number(h)});He.value=e.playlists||[],Ue.value=e.state}catch(e){b.error(e instanceof Error?e.message:`Не удалось получить музыку игры`)}}st();function ct(){return Ge.value===`edit`}async function lt(){if(console.log(`getScreenPlan`),ct()||X.value)return;console.log(`no skip getScreenPlan`);let e=++qe,t=await s.GetScreenPlan({gameID:Number(h)});e!==qe||ct()||X.value||(J.value=t.plan,Y.value=t.plan?.steps?.map(e=>({...e}))||[])}lt();function ut(){Y.value.push({mode:`SCREEN_MODE_TEXT`,text:`Новый экран`,timerLabel:`Перерыв`,timerDurationSeconds:600}),X.value=!0,Ge.value=`edit`}function dt(){J.value&&(Y.value=J.value.steps?.map(e=>({...e}))||[],Ge.value=`edit`)}function ft(){X.value&&!window.confirm(`Отменить несохранённые изменения плана?`)||(Y.value=J.value?.steps?.map(e=>({...e}))||[],X.value=!1,Ge.value=`use`)}function pt(e){Y.value.splice(e,1),X.value=!0}function mt(e,t){let n=e+t;if(n<0||n>=Y.value.length)return;let[r]=Y.value.splice(e,1);Y.value.splice(n,0,r),X.value=!0}function ht(){X.value=!0}function gt(){Y.value=[],ht()}async function _t(){if(!We.value){qe+=1,We.value=!0;try{let e=Math.min(J.value?.currentStep||0,Math.max(0,Y.value.length-1)),t=await s.SaveScreenPlan({gameID:Number(h),steps:Y.value,currentStep:e});J.value=t.plan,Y.value=t.plan?.steps?.map(e=>({...e}))||[],X.value=!1,Ge.value=`use`,b.success(t.plan?`План экранов сохранён`:`План экранов удалён`)}catch(e){b.error(e instanceof Error?e.message:`Не удалось сохранить план экранов`)}finally{We.value=!1}}}async function vt(e){if(!(X.value||!J.value))try{let t=await s.SetScreenPlanStep({gameID:Number(h),currentStep:e});J.value=t.plan,await ot()}catch(e){b.error(e instanceof Error?e.message:`Не удалось перейти на шаг плана`)}}async function yt(e,t){if(!(X.value||e!==`SCREEN_MODE_TIMER`&&e!==`SCREEN_MODE_INTRO`&&e!==`SCREEN_MODE_CONCLUSION`))try{await s.SendScreenCommand({gameID:Number(h),command:t,positionMs:Math.max(0,Math.round(at.value*1e3)),volume:Math.max(0,Math.min(100,Math.round(it.value)))}),await ot()}catch(e){b.error(e instanceof Error?e.message:`Не удалось управлять экраном`)}}async function bt(e,t){if(!z.value){z.value=!0;try{await s.BindScreen({screenID:e,accessToken:t,gameID:Number(h)}),b.success(`Экран привязан к игре`),await ot()}catch(e){b.error(e instanceof Error?e.message:`Не удалось привязать экран`)}finally{z.value=!1}}}async function St(){if(tt.value||rt.value)return;let e=await s.GetGameMap({gameID:Number(h)});tt.value||rt.value||($e.value=e.items||[])}St();async function Ct(e,t=e.hidden){tt.value=!0;try{await s.UpdateGameMapItem({gameID:Number(h),kind:e.kind,itemID:e.itemID,x:Math.round(e.x||0),y:Math.round(e.y||0),hidden:t})}finally{tt.value=!1}}async function wt(e,t=e.hidden){await Ct(e,t),await St()}async function Tt(e){await s.SetScreenSound({screenID:e.ID,soundEnabled:!0}),await ot()}async function Et(e){let t=Ue.value;try{let n=await s.SetGameMusic({gameID:Number(h),playlistID:e.playlistID??t?.playlist?.ID??0,trackIndex:e.trackIndex??t?.trackIndex??0,positionMs:e.positionMs??t?.positionMs??0,volume:e.volume??t?.volume??100,loop:e.loop??t?.loop??!1,playback:e.playback??t?.playback??`MUSIC_PLAYBACK_STOPPED`});Ue.value=n.state}catch(e){b.error(e instanceof Error?e.message:`Не удалось изменить музыку`)}}async function Dt(e){try{await s.CreatePlaylist({name:e}),await st()}catch(e){b.error(e instanceof Error?e.message:`Не удалось создать плейлист`)}}async function Ot(e){try{await s.DeletePlaylist({ID:e}),await st()}catch(e){b.error(e instanceof Error?e.message:`Не удалось удалить плейлист`)}}async function kt(e){let t=Ue.value?.playlist?.ID;if(!t){b.warning(`Сначала выберите плейлист`);return}try{let n=jt(new Uint8Array(await e.arrayBuffer()));await s.UploadPlaylistTrack({playlistID:t,name:e.name,filename:e.name,data:n}),await st()}catch(e){b.error(e instanceof Error?e.message:`Не удалось загрузить MP3`)}}async function At(e){let t=Ue.value?.playlist?.ID;if(t)try{await s.DeletePlaylistTrack({playlistID:t,trackID:e}),await st()}catch(e){b.error(e instanceof Error?e.message:`Не удалось удалить трек`)}}function jt(e){let t=``;for(let n=0;nURL.revokeObjectURL(n),1e3)}catch(e){b.error(e instanceof Error?e.message:`Не удалось скачать пакет`)}finally{Te.value=!1}}}function Lt({fileList:e}){K.value||(ke.value=e.slice(-1),q.value=``)}async function Rt(){if(!(!Ee.value||G.value)){G.value=!0;try{let{blob:e,filename:t}=await l.downloadGameResultsPackage(B.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){b.error(e instanceof Error?e.message:`Не удалось скачать результаты`)}finally{G.value=!1}}}async function zt(){if(!be.value||K.value)return;let e=ke.value[0]?.file;if(!e||e.size===0){q.value=`Выберите непустой ZIP-файл`;return}if(!e.name.toLowerCase().endsWith(`.zip`)){q.value=`Выберите файл с расширением .zip`;return}if(e.size>1024**3){q.value=`Размер пакета не должен превышать 1 ГиБ`;return}K.value=!0,q.value=``;try{await l.applyGameResultsPackage(B.value.ID,e),b.success(`Результаты приняты`),o(`resultsApplied`)}catch(e){q.value=e instanceof Error?e.message:`Не удалось применить результаты`}finally{K.value=!1}}async function Bt(){if(!(d.value||!B.value.teams?.length)){d.value=!0;try{let{blob:e,filename:t}=await l.downloadTeamQR(B.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){b.error(e instanceof Error?e.message:`Не удалось скачать QR команд`)}finally{d.value=!1}}}function Vt(){p.push(`/games/`+h+`/results`)}async function Ht(){await s.UpdateGame({ID:B.value.ID,name:C.value.name,description:C.value.description,format:C.value.format,location:C.value.location.trim(),startAt:B.value.startAt,scenarioID:B.value.scenario?.ID}),await Z(B.value.ID)}let Ut=D({ID:0,name:``,status:``,password:``,actionsCount:0,applications:[],captainEmail:void 0,participantsCount:void 0,participationStatus:void 0,participationSource:void 0,participationEmailError:void 0,participationEmailSent:void 0}),Wt=D(``),Kt=D({ID:0,name:``,status:``,password:``,actionsCount:0,applications:[],captainEmail:void 0,participantsCount:void 0,participationStatus:void 0,participationSource:void 0,participationEmailError:void 0,participationEmailSent:void 0}),$=D({name:``,image:``,file_type:``}),qt=window.location.href;function bn(e,t){Ut.value=e,$.value=t,T.value=!0}async function xn(){if(P.value<1||P.value>8){b.error(`Укажите от 1 до 8 игроков`);return}await s.AddTeam({gameID:B.value.ID,name:N.value,captainEmail:ee.value.trim(),participantsCount:P.value}),await Z(B.value.ID),E.value=!1,ee.value=``,P.value=1}async function Sn(){await s.GiveTeamApplications({ID:Ut.value.ID,name:$.value.name}),await Z(B.value.ID),T.value=!1}async function Cn(e){Kt.value=e,A.value=!0}async function wn(){await s.DeleteTeam({ID:Kt.value.ID}),await Z(B.value.ID),A.value=!1}async function Tn(){await s.DeleteGame({ID:B.value.ID}),b.success(`Игра удалена`),p.push(`/games`)}function En(e,t){let n=new URL(`/team-story/${e}`,window.location.origin);return n.searchParams.set(`password`,t),n.toString()}function Dn(e){On(En(e.ID,e.password),`Подсмотреть игру`)}async function On(e,t){ce.value=e,ue.value=t,re.value=!0}async function kn(){if(!(R.value||!B.value.ID)){R.value=!0;try{let e=await s.IssueGameTickets({gameID:B.value.ID,count:he.value});ge.value=e.tickets||[],b.success(`Выпущено билетов: ${ge.value.length}`)}catch(e){b.error(e instanceof Error?e.message:`Не удалось выпустить билеты`)}finally{R.value=!1}}}Ae(()=>{K.value||(Z(Number(h)),ot(),st(),lt(),St())},2e3);async function An(){await s.ResetGame({ID:B.value.ID}),await Z(B.value.ID)}async function jn(){await s.StartGame({ID:B.value.ID}),await Z(B.value.ID)}async function Mn(){await s.PauseGame({ID:B.value.ID}),await Z(B.value.ID)}async function Nn(){await s.PlayGame({ID:B.value.ID}),await Z(B.value.ID)}async function Pn(){await s.FinishGame({ID:B.value.ID}),await Z(B.value.ID)}let Fn=D(!1),In=D([]),Ln=D(0),Rn=D(0),zn=D([]),Bn=D([]),Vn=D({});function Hn(e,t){return(e??``)+`:`+(t??``)}function Un(e,t){return(e.answers||[]).find(e=>e.questionCode==t)?.answer||``}function Wn(e,t){Vn.value[e]=t===null?void 0:t}async function Gn(){let e=await s.GetGameAnswers({gameID:Number(h)});zn.value=e.questions||[],Bn.value=e.teams||[];let t={};for(let e of Bn.value)for(let n of e.answers||[])t[Hn(e.team?.ID,n.questionCode)]=n.score;Vn.value=t}async function Kn(){Fn.value=!0;let e=await s.GetGameReviewsForModeration({gameID:Number(h)});In.value=e.reviews||[],Ln.value=e.averageRating||0,Rn.value=e.reviewsCount||0}async function qn(e,t){await s.ModerateGameReview({ID:e.ID,status:t}),await Kn()}async function Jn(){for(let e of zn.value)for(let t of Bn.value){let n=Vn.value[Hn(t.team?.ID,e.code)];await s.SetTeamAnswerScore({ID:t.team?.ID,questionCode:e.code,score:n??void 0})}b.success(`Баллы сохранены`),await Gn()}v.value===`answers`&&Gn();function Yn(){let e=new Date;return new Date(e.getTime()-e.getTimezoneOffset()*6e4)}function Xn(e,t){if(e==``)return`Игра ещё не началась`;let n=Ie(e),r=Yn();t!=``&&(r=Ie(t));let i=r.getTime()-n.getTime();if(i<0)return`Игра ещё не началась`;let a=Math.floor(i/1e3),o=Math.floor(a/60),s=Math.floor(o/60),c=Math.floor(s/24),l=Math.floor(c/30),u=Math.floor(c/365);return u>0?`${u}г ${c%365}д`:l>0?`${l}мес ${c%30}д`:c>0?`${c}д ${s%24}ч`:s>0?`${s}ч ${o%60}м`:o>0?`${o}м ${a%60}с`:`${a}с`}let Zn=D(``);return Ae(()=>{Zn.value=Xn(B.value.startedAt||``,B.value.endedAt||``)},1e3),(n,r)=>(a(),F(O,null,[I(`div`,Yt,[I(`div`,Xt,[B.value.export?.state===`preparing`||B.value.export?.state===`ready`?(a(),f(Q,{key:0},{default:k(()=>[c(x(H),{type:`info`,title:B.value.export.state===`ready`?`Игра в офлайн-режиме`:`Подготовка офлайн-пакета`},{default:k(()=>[t(u(B.value.export.state===`ready`?`Изменения на онлайн-сервере не синхронизируются с офлайн-площадкой.`:`Создаётся пакет для офлайн-площадки.`),1)]),_:1},8,[`title`])]),_:1})):e(``,!0),c(x(pe),{value:v.value,type:`line`,animated:``,"onUpdate:value":y},{default:k(()=>[c(x(fe),{name:`settings`,tab:`Настройки`},{default:k(()=>[I(`div`,Zt,[c(Q,null,{default:k(()=>[c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{quaternary:``,onClick:r[0]||=e=>On(x(qt),`Админка`)},{default:k(()=>[...r[45]||=[t(`QR`,-1)]]),_:1}),B.value.status==`finish`?(a(),f(x(L),{key:0,quaternary:``,onClick:r[1]||=e=>Vt()},{default:k(()=>[c(x(se),{class:`settings-icon`},{default:k(()=>[c(x(nt))]),_:1}),r[46]||=t(` Итоги `,-1)]),_:1})):e(``,!0),(B.value.teams?.length||0)==0?(a(),f(x(L),{key:1,type:`error`,quaternary:``,onClick:r[2]||=e=>M.value=!0},{default:k(()=>[...r[47]||=[t(` Удалить игру `,-1)]]),_:1})):e(``,!0)]),_:1})]),_:1}),c(Q,null,{default:k(()=>[r[53]||=I(`p`,{class:`screens-title`},`Настройки игры`,-1),c(x(U),{vertical:``},{default:k(()=>[r[48]||=I(`p`,null,`Название`,-1),c(x(V),{value:C.value.name,"onUpdate:value":r[3]||=e=>C.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),r[49]||=I(`p`,{class:`settings-header`},`Формат игры`,-1),c(x(me),{value:C.value.format,"onUpdate:value":r[4]||=e=>C.value.format=e,options:[{label:`Online`,value:`online`},{label:`Offline`,value:`offline`}],"aria-label":`Формат игры`},null,8,[`value`]),r[50]||=I(`p`,{class:`settings-header`},`Описание`,-1),c(x(V),{value:C.value.description,"onUpdate:value":r[5]||=e=>C.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),r[51]||=I(`p`,{class:`settings-header`},`Место проведения`,-1),c(x(V),{value:C.value.location,"onUpdate:value":r[6]||=e=>C.value.location=e,type:`text`,placeholder:`Оставьте пустым для онлайн-игры`},null,8,[`value`])]),_:1}),c(x(W),{justify:`end`,class:`settings-actions`},{default:k(()=>[c(x(L),{onClick:r[7]||=e=>Ht()},{default:k(()=>[...r[52]||=[t(`Сохранить изменения`,-1)]]),_:1})]),_:1})]),_:1}),Ee.value?(a(),f(Q,{key:0},{default:k(()=>[c(x(L),{loading:G.value,disabled:G.value,onClick:Rt},{default:k(()=>[...r[54]||=[t(` Скачать результаты `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})):e(``,!0),be.value?(a(),f(Q,{key:1},{default:k(()=>[r[58]||=I(`p`,{class:`screens-title`},`Возврат результатов с площадки`,-1),c(x(U),{vertical:``},{default:k(()=>[c(x(H),{type:`warning`},{default:k(()=>[...r[55]||=[t(` Команды, билеты, результаты и игровой сценарий будут заменены данными пакета. Онлайн-правки этих данных потеряются. Оформление и музыка сохраняются. `,-1)]]),_:1}),c(x(_e),{"file-list":ke.value,"default-upload":!1,max:1,accept:`.zip`,disabled:K.value,onChange:Lt},{default:k(()=>[c(x(L),{disabled:K.value},{default:k(()=>[...r[56]||=[t(`Выбрать ZIP результатов`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),q.value?(a(),f(x(H),{key:0,type:`error`,role:`alert`},{default:k(()=>[t(u(q.value),1)]),_:1})):e(``,!0),c(x(L),{loading:K.value,disabled:K.value||!ke.value.length,onClick:zt},{default:k(()=>[...r[57]||=[t(` Применить ZIP и перезаписать результаты `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})):e(``,!0),be.value?(a(),f(Q,{key:2},{default:k(()=>[r[63]||=I(`p`,{class:`screens-title`},`Передача игры на площадку`,-1),c(x(U),{vertical:``},{default:k(()=>[r[62]||=I(`p`,null,` Пакет содержит снимок на момент подготовки. Последующие онлайн-изменения в него не попадут. Готовность пакета не подтверждает импорт на площадку. `,-1),B.value.export?.state===`preparing`?(a(),f(x(H),{key:0,type:`info`,role:`status`},{default:k(()=>[...r[59]||=[t(`Подготовка пакета…`,-1)]]),_:1})):B.value.export?.state===`ready`?(a(),f(x(H),{key:1,type:`success`,role:`status`},{default:k(()=>[...r[60]||=[t(`Пакет готов`,-1)]]),_:1})):B.value.export?.state===`failed`?(a(),f(x(H),{key:2,type:`error`,role:`alert`},{default:k(()=>[t(u(B.value.export.failure||`Не удалось подготовить пакет`),1)]),_:1})):e(``,!0),B.value.export?.state===`ready`?(a(),f(x(L),{key:3,loading:Te.value,disabled:Te.value,onClick:It},{default:k(()=>[...r[61]||=[t(`Скачать пакет`,-1)]]),_:1},8,[`loading`,`disabled`])):(a(),f(x(L),{key:4,loading:we.value||B.value.export?.state===`preparing`,disabled:we.value||B.value.export?.state===`preparing`||B.value.status!==`draft`,onClick:Ft},{default:k(()=>[t(u(B.value.export?.state===`failed`?`Повторить подготовку`:`Подготовить пакет`),1)]),_:1},8,[`loading`,`disabled`])),B.value.status&&B.value.status!==`draft`?(a(),F(`p`,Qt,` Подготовка доступна до старта игры. `)):e(``,!0)]),_:1})]),_:1})):e(``,!0),c(Q,null,{default:k(()=>[r[66]||=I(`p`,{class:`screens-title`},`Выпуск билетов`,-1),c(x(U),{vertical:``},{default:k(()=>[c(x(Ke),{value:he.value,"onUpdate:value":r[8]||=e=>he.value=e,min:1,max:100},null,8,[`value`]),(a(!0),F(O,null,i(ge.value,e=>(a(),F(`div`,{key:e.ID,class:`issued-ticket`},[I(`div`,null,`Билет №`+u(e.ID),1),I(`a`,{href:e.URL,class:`payment-link`,target:`_blank`,rel:`noreferrer`},` Открыть страницу билета `,8,$t),c(x(L),{size:`small`,onClick:t=>On(e.URL,`Билет №${e.ID}`)},{default:k(()=>[...r[64]||=[t(` Показать QR `,-1)]]),_:1},8,[`onClick`])]))),128))]),_:1}),c(x(W),{justify:`end`,class:`settings-actions`},{default:k(()=>[c(x(L),{loading:R.value,disabled:R.value,onClick:r[9]||=e=>kn()},{default:k(()=>[...r[65]||=[t(` Выпустить `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})])]),_:1}),c(x(fe),{name:`teams`,tab:`Команды`},{default:k(()=>[I(`div`,en,[c(x(W),{justify:`space-between`,align:`center`},{default:k(()=>[c(x(oe),{bordered:!1,type:`info`},{default:k(()=>[t(` Участвуют команд: `+u(Be.value),1)]),_:1}),Be.value?(a(),f(x(L),{key:0,quaternary:``,loading:d.value,disabled:d.value,onClick:r[10]||=e=>Bt()},{default:k(()=>[...r[67]||=[t(` QR команд `,-1)]]),_:1},8,[`loading`,`disabled`])):e(``,!0)]),_:1}),c(Gt,{teams:B.value.teams||[],"participation-options":ze,onAdd:r[11]||=e=>E.value=!0,onOpenQr:Dn,onPreview:r[12]||=(e,t)=>Pt(e,t,!0),onDelete:Cn,onGiveApplication:bn},null,8,[`teams`])])]),_:1}),c(x(fe),{name:`screens`,tab:`Экраны`},{default:k(()=>[I(`div`,tn,[c(Nt,{screens:Ve.value,"screen-binding":z.value,playlists:He.value,music:Ue.value,onBind:bt,onSetSound:Tt,onUnbind:Mt,onSetMusic:Et,onCreatePlaylist:Dt,onDeletePlaylist:Ot,onUploadTrack:kt,onDeleteTrack:At},null,8,[`screens`,`screen-binding`,`playlists`,`music`])])]),_:1}),c(x(fe),{name:`game`,tab:`Игра`},{default:k(()=>[I(`div`,nn,[c(Q,null,{default:k(()=>[c(x(W),{justify:`space-between`},{default:k(()=>[c(x(U),null,{default:k(()=>[c(x(oe),{type:`info`},{default:k(()=>[t(u(Zn.value),1)]),_:1}),x(Le)(B.value.startAt)?(a(),f(x(oe),{key:0,type:`info`},{default:k(()=>[t(` Начало: `+u(x(Le)(B.value.startAt)),1)]),_:1})):e(``,!0)]),_:1}),c(x(W),{justify:`end`},{default:k(()=>[B.value.status==`draft`?e(``,!0):(a(),f(x(L),{key:0,type:`info`,dashed:``,"aria-label":`Сбросить игру`,onClick:r[13]||=e=>An()},{default:k(()=>[c(x(se),null,{default:k(()=>[c(x(et))]),_:1})]),_:1})),B.value.status==`draft`?(a(),f(x(L),{key:1,type:`info`,dashed:``,"aria-label":`Начать игру`,onClick:r[14]||=e=>jn()},{default:k(()=>[c(x(se),null,{default:k(()=>[c(x(Qe))]),_:1})]),_:1})):e(``,!0),B.value.status==`pause`?(a(),f(x(L),{key:2,type:`info`,dashed:``,"aria-label":`Продолжить игру`,onClick:r[15]||=e=>Nn()},{default:k(()=>[c(x(se),null,{default:k(()=>[c(x(Qe))]),_:1})]),_:1})):e(``,!0),B.value.status==`run`?(a(),f(x(L),{key:3,type:`info`,dashed:``,"aria-label":`Поставить игру на паузу`,onClick:r[16]||=e=>Mn()},{default:k(()=>[c(x(se),null,{default:k(()=>[c(x(Xe))]),_:1})]),_:1})):e(``,!0),B.value.status==`finish`?e(``,!0):(a(),f(x(L),{key:4,type:`info`,dashed:``,"aria-label":`Завершить игру`,onClick:r[17]||=e=>Pn()},{default:k(()=>[c(x(se),null,{default:k(()=>[c(x(Je))]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1}),c(xt,{"map-items":$e.value,teams:B.value.teams||[],screens:Ve.value,"preview-questions":Ye.value,"preview-teams":Ze.value,"screen-plan":J.value,"screen-plan-draft":Y.value,"screen-plan-dirty":X.value,"screen-plan-saving":We.value,"screen-plan-mode":Ge.value,"screen-volume":it.value,"screen-position":at.value,onSaveItem:wt,onDragging:r[18]||=e=>rt.value=e,onGiveApplication:bn,onAddStep:ut,onEdit:dt,onCancel:ft,onRemoveStep:pt,onMoveStep:mt,onDirty:ht,onClearPlan:gt,onSave:_t,onSetStep:vt,onCommand:yt,"onUpdate:screenVolume":r[19]||=e=>it.value=e??0,"onUpdate:screenPosition":r[20]||=e=>at.value=e??0},null,8,[`map-items`,`teams`,`screens`,`preview-questions`,`preview-teams`,`screen-plan`,`screen-plan-draft`,`screen-plan-dirty`,`screen-plan-saving`,`screen-plan-mode`,`screen-volume`,`screen-position`])])]),_:1}),c(x(fe),{name:`payment`,tab:`Оплата`},{default:k(()=>[I(`div`,rn,[c(Q,null,{default:k(()=>[c(x(W),{align:`center`,justify:`space-between`},{default:k(()=>[r[69]||=I(`p`,{class:`screens-title`},`Билеты`,-1),c(x(L),{size:`small`,onClick:r[21]||=e=>de.value=!0},{default:k(()=>[...r[68]||=[t(` Проверить билет `,-1)]]),_:1})]),_:1})]),_:1}),c(Q,null,{default:k(()=>[r[70]||=I(`p`,{class:`screens-title`},`Оплата игры`,-1),I(`div`,an,[c(x(Se),{value:yn,size:300,padding:0})]),I(`p`,null,[I(`a`,{href:yn,class:`payment-link`,target:`_blank`,rel:`noreferrer`},` Открыть ссылку оплаты `)])]),_:1})])]),_:1}),c(x(fe),{name:`answers`,tab:`Проверка ответов`},{default:k(()=>[I(`div`,on,[zn.value.length==0?(a(),F(`div`,sn,` Вопросы дела не заданы или команды ещё не отвечали. `)):e(``,!0),(a(!0),F(O,null,i(zn.value,e=>(a(),f(Q,{key:e.code},{default:k(()=>[I(`p`,cn,u(e.code)+`: `+u(e.text),1),I(`p`,ln,[r[71]||=t(` Правильный ответ:`,-1),r[72]||=I(`br`,null,null,-1),I(`span`,un,u(e.answer||`—`),1)]),(a(!0),F(O,null,i(Bn.value,t=>(a(),F(`div`,{key:t.team?.ID,class:`answers-team-row`},[I(`div`,dn,u(t.team?.name),1),I(`div`,fn,u(Un(t,e.code)||`—`),1),c(x(Ke),{value:Vn.value[Hn(t.team?.ID,e.code)],"onUpdate:value":n=>Wn(Hn(t.team?.ID,e.code),n),placeholder:`Балл`,class:`answers-score-input`},null,8,[`value`,`onUpdate:value`])]))),128))]),_:2},1024))),128)),c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{onClick:r[22]||=e=>Jn(),disabled:zn.value.length==0},{default:k(()=>[...r[73]||=[t(` Сохранить баллы `,-1)]]),_:1},8,[`disabled`])]),_:1})])]),_:1})]),_:1},8,[`value`])])]),c(Jt,{show:de.value,"onUpdate:show":r[23]||=e=>de.value=e},null,8,[`show`]),c(x(le),{show:T.value,"onUpdate:show":r[26]||=e=>T.value=e},{default:k(()=>[c(x(ie),{style:{width:`600px`},title:`Настройки игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:r[24]||=e=>T.value=!1},{default:k(()=>[...r[74]||=[t(` x `,-1)]]),_:1})]),footer:k(()=>[c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{onClick:r[25]||=e=>Sn(),ghost:``},{default:k(()=>[...r[77]||=[t(` Выдать `,-1)]]),_:1})]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[r[75]||=I(`p`,null,`Команда`,-1),I(`h3`,null,u(Ut.value.name),1),r[76]||=I(`p`,null,`Улика`,-1),I(`h3`,null,u($.value.name),1),x(Pe)($.value)==`image`&&$.value.image?(a(),F(`div`,pn,[I(`img`,{src:x(Fe)($.value.image),class:`give-application-image`},null,8,mn)])):x(Pe)($.value)==`audio`&&$.value.image?(a(),F(`audio`,{key:1,src:x(Fe)($.value.image),controls:``,preload:`none`,class:`give-application-audio`},null,8,hn)):x(Pe)($.value)==`pdf`&&$.value.image?(a(),F(`a`,{key:2,href:x(Fe)($.value.image),target:`_blank`,rel:`noopener`,class:`give-application-pdf-link`},` PDF `,8,gn)):e(``,!0)]),_:1})]),_:1})]),_:1},8,[`show`]),c(x(le),{show:E.value,"onUpdate:show":r[32]||=e=>E.value=e},{default:k(()=>[c(x(ie),{style:{width:`600px`},title:`Создание команды`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:r[27]||=e=>E.value=!1},{default:k(()=>[...r[78]||=[t(` x `,-1)]]),_:1})]),footer:k(()=>[c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{onClick:r[31]||=e=>xn(),disabled:N.value.length==0},{default:k(()=>[...r[79]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[c(x(V),{value:N.value,"onUpdate:value":r[28]||=e=>N.value=e,type:`text`,placeholder:`Три дебила`},null,8,[`value`]),c(x(V),{value:ee.value,"onUpdate:value":r[29]||=e=>ee.value=e,"input-props":{type:`email`,autocomplete:`email`},placeholder:`Почта капитана (необязательно)`,"aria-label":`Почта капитана (необязательно)`},null,8,[`value`]),c(x(Ke),{value:P.value,"onUpdate:value":r[30]||=e=>P.value=e,min:1,max:8,precision:0,placeholder:`Количество игроков`,"aria-label":`Количество игроков`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`]),c(x(le),{show:A.value,"onUpdate:show":r[36]||=e=>A.value=e},{default:k(()=>[c(x(ie),{style:{width:`600px`},title:`Удаление команды`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:r[33]||=e=>A.value=!1},{default:k(()=>[...r[80]||=[t(` x `,-1)]]),_:1})]),footer:k(()=>[c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{onClick:r[35]||=e=>wn(),disabled:Wt.value!=Kt.value.name},{default:k(()=>[...r[83]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[I(`p`,null,[r[81]||=t(` Введите название команды `,-1),c(x(Ce),{class:`name-text`,strong:``},{default:k(()=>[t(u(Kt.value.name),1)]),_:1}),r[82]||=t(` чтобы удалить его `,-1)]),c(x(V),{value:Wt.value,"onUpdate:value":r[34]||=e=>Wt.value=e,type:`text`,placeholder:`Три дебила`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`]),c(x(le),{show:M.value,"onUpdate:show":r[40]||=e=>M.value=e},{default:k(()=>[c(x(ie),{style:{width:`600px`},title:`Удаление игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:r[37]||=e=>M.value=!1},{default:k(()=>[...r[84]||=[t(` x `,-1)]]),_:1})]),footer:k(()=>[c(x(W),{justify:`end`},{default:k(()=>[c(x(L),{onClick:r[39]||=e=>Tn(),disabled:ne.value!=B.value.name},{default:k(()=>[...r[87]||=[t(` Удалить `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[I(`p`,null,[r[85]||=t(` Введите название игры `,-1),c(x(Ce),{class:`name-text`,strong:``},{default:k(()=>[t(u(B.value.name),1)]),_:1}),r[86]||=t(` чтобы удалить её `,-1)]),c(x(V),{value:ne.value,"onUpdate:value":r[38]||=e=>ne.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`]),c(x(le),{show:re.value,"onUpdate:show":r[42]||=e=>re.value=e},{default:k(()=>[c(x(ie),{style:{width:`600px`},title:ue.value,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":k(()=>[c(x(L),{onClick:r[41]||=e=>re.value=!1},{default:k(()=>[...r[88]||=[t(` x `,-1)]]),_:1})]),footer:k(()=>[...r[89]||=[]]),default:k(()=>[c(x(U),{vertical:``},{default:k(()=>[I(`div`,_n,[c(x(Se),{value:ce.value,size:300,padding:0},null,8,[`value`])])]),_:1})]),_:1},8,[`title`])]),_:1},8,[`show`]),c(x(le),{show:Fn.value,"onUpdate:show":r[44]||=e=>Fn.value=e},{default:k(()=>[c(x(ie),{style:{width:`min(94vw, 800px)`},title:`Отзывы игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`,"content-style":{maxHeight:`70vh`,overflow:`auto`}},{"header-extra":k(()=>[c(x(L),{onClick:r[43]||=e=>Fn.value=!1},{default:k(()=>[...r[90]||=[t(` x `,-1)]]),_:1})]),default:k(()=>[c(x(W),{align:`center`,class:`reviews-summary`},{default:k(()=>[c(x(xe),{value:Ln.value,readonly:``,"allow-half":``},null,8,[`value`]),I(`span`,null,u(Rn.value?`${Ln.value.toFixed(1)} · ${Rn.value}`:`Пока нет отзывов`),1)]),_:1}),In.value.length==0?(a(),F(`div`,vn,`Отзывов пока нет.`)):e(``,!0),(a(!0),F(O,null,i(In.value,n=>(a(),F(`div`,{key:n.ID,class:`review-row`},[c(x(W),{justify:`space-between`,align:`center`},{default:k(()=>[I(`strong`,null,u(n.teamName),1),c(x(oe),null,{default:k(()=>[t(u(n.status),1)]),_:2},1024)]),_:2},1024),c(x(xe),{value:n.rating,readonly:``,size:`small`},null,8,[`value`]),I(`div`,null,`Сложность: `+u([``,`лёгкая`,`средняя`,`тяжёлая`][n.difficulty||0]),1),I(`p`,null,u(n.text),1),n.status==`pending`?(a(),f(x(W),{key:0,justify:`end`},{default:k(()=>[c(x(L),{type:`success`,onClick:e=>qn(n,`approved`)},{default:k(()=>[...r[91]||=[t(`Одобрить`,-1)]]),_:1},8,[`onClick`]),c(x(L),{type:`error`,ghost:``,onClick:e=>qn(n,`rejected`)},{default:k(()=>[...r[92]||=[t(`Отклонить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):n.status==`approved`?(a(),f(x(W),{key:1,justify:`end`},{default:k(()=>[c(x(L),{type:`error`,ghost:``,onClick:e=>qn(n,`hidden`)},{default:k(()=>[...r[93]||=[t(`Скрыть`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):e(``,!0)]))),128))]),_:1})]),_:1},8,[`show`]),c(Me,{active:`games`})],64))}}),[[`__scopeId`,`data-v-010e1897`]]),xn=A({__name:`GameView`,setup(e){let t=D(0),n=j();return(e,r)=>(a(),f(bn,{key:`${x(n).params.id}-${t.value}`,onResultsApplied:r[0]||=e=>t.value++}))}});export{xn as default}; \ No newline at end of file diff --git a/frontend/dist/assets/GamesView-CfuY2HbV.css b/frontend/dist/assets/GamesView-CfuY2HbV.css deleted file mode 100644 index 8767a9b..0000000 --- a/frontend/dist/assets/GamesView-CfuY2HbV.css +++ /dev/null @@ -1 +0,0 @@ -.game-block[data-v-c3285f17]{background-color:#222;border:1px solid #222;border-radius:10px;margin:10px 0;padding:20px}.game-block-hover[data-v-c3285f17]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.game-create-content[data-v-c3285f17]{justify-content:center;align-items:center;gap:12px;display:flex}.game-create-plus[data-v-c3285f17]{font-size:30px}.game-block[data-v-c3285f17]:hover{color:#63e2b7;cursor:pointer}.game-title[data-v-c3285f17]{margin-bottom:10px;font-size:24px}.game-actions[data-v-c3285f17]{justify-content:flex-end;margin-top:10px;display:flex}.game-date[data-v-c3285f17],.game-description[data-v-c3285f17]{color:#aaa;margin-bottom:10px}.create-hint[data-v-c3285f17]{color:#aaa} diff --git a/frontend/dist/assets/GamesView-CyqroMvG.js b/frontend/dist/assets/GamesView-CyqroMvG.js new file mode 100644 index 0000000..ad178a8 --- /dev/null +++ b/frontend/dist/assets/GamesView-CyqroMvG.js @@ -0,0 +1 @@ +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,u as ee,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{t as h}from"./Card-BGJkYb2B.js";import{n as te,r as g}from"./es-Qklex053.js";import{t as _}from"./Modal-xM6cEDIr.js";import{t as ne}from"./DatePicker-DGNqeOvv.js";import{t as v}from"./Button-MBUKfT_Z.js";import{t as y}from"./Select-CfXdJUVK.js";import{t as b}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as x}from"./Upload-DxQHkPqo.js";import{t as S}from"./Input-CEIE7mTC.js";import{t as C}from"./Alert-BoUmQeXf.js";import{t as w}from"./Space-CstX9TL6.js";import{t as re}from"./Flex-Dsa9FxiA.js";import{i as ie,o as ae,ut as oe}from"./index-NE0dsiiJ.js";import{n as T,t as se}from"./HeaderMenu-vnmT21Il.js";import{t as ce}from"./binary_client-BOO__dKx.js";import{t as E}from"./datetime-BJNH0M1T.js";var le={class:`center-block-custom`},ue={class:`width1200`},D=[`onClick`],de={class:`game-title`},fe={class:`game-description`},pe={key:2,class:`game-date`},me={key:3,class:`game-date`},he={key:4,class:`game-actions`},ge={key:0},_e={key:0,class:`create-hint`},ve={key:1,class:`create-hint`},O=b(f({__name:`GamesPage`,setup(f){let b=ie(),O=te(),k=ee(),A=l([]),ye=T(),j=ae(),M=ce(),N=c(()=>j.hasAnyRole([`admin`,`organizer`,`author`])),P=c(()=>ye.environment===`venue`&&j.hasAnyRole([`admin`,`organizer`,`developer`])),F=l(!1),I=l([]),L=l(null),R=l(``),z=l(!1),B=l(!1);function be(){I.value=[],L.value=null,R.value=``,F.value=!0}function xe({fileList:e}){z.value||(I.value=e.slice(-1),R.value=``,L.value=null)}async function Se(){if(!P.value||z.value)return;let e=I.value[0]?.file;if(!e||e.size===0){R.value=`Выберите непустой ZIP-файл`;return}if(!e.name.toLowerCase().endsWith(`.zip`)){R.value=`Выберите файл с расширением .zip`;return}if(e.size>1024**3){R.value=`Размер пакета не должен превышать 1 ГиБ`;return}z.value=!0,R.value=``;try{L.value=await M.uploadGamePackage(e),await V()}catch(e){R.value=e instanceof Error?e.message:`Не удалось импортировать игру`}finally{z.value=!1}}async function Ce(){let e=L.value?.gameID;if(!(!e||B.value)){B.value=!0,R.value=``;try{if(!(await b.GetGame({ID:e})).game?.ID)throw Error(`Импортированная игра недоступна или удалена. Повторный импорт пакета не восстанавливает удалённую игру.`);await k.push(`/games/`+e)}catch(e){R.value=e instanceof Error?e.message:`Не удалось проверить доступность игры`}finally{B.value=!1}}}async function V(){try{A.value=[];let e=await b.GetGames({});A.value=e.games||[]}catch(e){O.error(e instanceof Error?e.message:`Не удалось загрузить игры`)}}V();async function we(e){k.push(`/games/`+e)}function Te(e){k.push(`/games/`+e+`/results`)}let H=l(!1),U=l(``),W=l(`online`),G=l(``),K=l(``),q=l(null),J=l(null),Y=l(!1),X=l(!1),Z=l(!1),Q=l([]),$=c(()=>Q.value.filter(e=>e.status==`public`&&e.ID!=null).map(e=>({label:e.name||``,value:e.ID})));async function Ee(){X.value=!0,Z.value=!1;try{let e=await b.GetScenariosCatalog({});Q.value=e.scenarios||[]}catch(e){Z.value=!0,O.error(e instanceof Error?e.message:`Не удалось загрузить сценарии`)}finally{X.value=!1}}function De(){U.value=``,W.value=`online`,G.value=``,K.value=``,q.value=null,J.value=null,H.value=!0,Ee()}async function Oe(){let e=U.value.trim(),t=q.value,n=J.value;if(!(e==``||t==null||n==null)){Y.value=!0;try{let r=await b.AddGame({name:e,description:G.value,location:K.value.trim(),format:W.value,startAt:new Date(n).toISOString(),scenarioID:t});O.success(`Игра создана`),H.value=!1,k.push(`/games/`+r.ID)}catch(e){O.error(e instanceof Error?e.message:`Не удалось создать игру`)}finally{Y.value=!1}}}return(c,l)=>(r(),p(u,null,[m(`div`,le,[m(`div`,ue,[P.value?(r(),o(s(v),{key:0,onClick:be},{default:d(()=>[...l[12]||=[t(`Импорт игры`,-1)]]),_:1})):e(``,!0),N.value?(r(),p(`div`,{key:1,class:`game-block game-block-hover`,onClick:l[0]||=e=>De()},[...l[13]||=[m(`div`,{class:`game-create-content`},[m(`span`,{class:`game-create-plus`},`+`),m(`span`,null,`Создать игру`)],-1)]])):e(``,!0),(r(!0),p(u,null,n(A.value,n=>(r(),p(`div`,{key:n.ID,class:`game-block`,onClick:e=>we(n.ID)},[m(`div`,de,a(n.name)+` — `+a(n.format===`offline`?`Offline`:`Online`),1),n.export?.state===`preparing`?(r(),o(s(g),{key:0,type:`warning`,size:`small`},{default:d(()=>[...l[14]||=[t(` Подготовка офлайн-пакета `,-1)]]),_:1})):n.export?.state===`ready`?(r(),o(s(g),{key:1,type:`info`,size:`small`},{default:d(()=>[...l[15]||=[t(` Игра в офлайн-режиме `,-1)]]),_:1})):e(``,!0),m(`div`,fe,a(n.description),1),s(E)(n.startAt)?(r(),p(`div`,pe,` Начало: `+a(s(E)(n.startAt)),1)):e(``,!0),n.location?(r(),p(`div`,me,`Место: `+a(n.location),1)):e(``,!0),N.value&&n.status==`finish`?(r(),p(`div`,he,[i(s(v),{size:`small`,ghost:``,onClick:oe(e=>Te(n.ID),[`stop`])},{default:d(()=>[...l[16]||=[t(`Результаты`,-1)]]),_:1},8,[`onClick`])])):e(``,!0)],8,D))),128))])]),i(s(_),{show:F.value,"onUpdate:show":l[2]||=e=>F.value=e,"mask-closable":!z.value,"close-on-esc":!z.value},{default:d(()=>[i(s(h),{style:{width:`min(94vw, 600px)`},title:`Импорт игры`,bordered:!1,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(v),{disabled:z.value,"aria-label":`Закрыть импорт`,onClick:l[1]||=e=>F.value=!1},{default:d(()=>[...l[17]||=[t(`Закрыть`,-1)]]),_:1},8,[`disabled`])]),default:d(()=>[i(s(w),{vertical:``},{default:d(()=>[l[22]||=m(`p`,null,`Выберите один ZIP-пакет размером до 1 ГиБ. Содержимое проверит сервер.`,-1),i(s(x),{"file-list":I.value,"default-upload":!1,max:1,accept:`.zip`,disabled:z.value,onChange:xe},{default:d(()=>[i(s(v),{disabled:z.value},{default:d(()=>[...l[18]||=[t(`Выбрать ZIP`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),I.value[0]?.file?(r(),p(`p`,ge,a(I.value[0].name)+` — `+a(I.value[0].file.size.toLocaleString(`ru-RU`))+` байт `,1)):e(``,!0),z.value?(r(),o(s(C),{key:1,type:`info`,role:`status`},{default:d(()=>[...l[19]||=[t(`Импортируем пакет…`,-1)]]),_:1})):e(``,!0),R.value?(r(),o(s(C),{key:2,type:`error`,role:`alert`},{default:d(()=>[t(a(R.value),1)]),_:1})):e(``,!0),L.value?(r(),o(s(C),{key:3,type:`success`,role:`status`},{default:d(()=>[t(a(L.value.repeated?`Пакет уже импортирован`:`Игра импортирована`),1)]),_:1})):e(``,!0),L.value?(r(),o(s(v),{key:4,loading:B.value,disabled:B.value,onClick:Ce},{default:d(()=>[...l[20]||=[t(`Открыть игру`,-1)]]),_:1},8,[`loading`,`disabled`])):(r(),o(s(v),{key:5,loading:z.value,disabled:z.value||!I.value.length||!P.value,onClick:Se},{default:d(()=>[...l[21]||=[t(`Загрузить пакет`,-1)]]),_:1},8,[`loading`,`disabled`]))]),_:1})]),_:1})]),_:1},8,[`show`,`mask-closable`,`close-on-esc`]),i(s(_),{show:H.value,"onUpdate:show":l[11]||=e=>H.value=e},{default:d(()=>[i(s(h),{style:{width:`min(94vw, 600px)`},title:`Создание игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(v),{onClick:l[3]||=e=>H.value=!1},{default:d(()=>[...l[23]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[i(s(re),{justify:`end`},{default:d(()=>[i(s(v),{onClick:l[10]||=e=>Oe(),loading:Y.value,disabled:U.value.trim().length==0||q.value==null||J.value==null||Y.value},{default:d(()=>[...l[30]||=[t(` Создать `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),default:d(()=>[i(s(w),{vertical:``},{default:d(()=>[l[24]||=m(`p`,null,`Название`,-1),i(s(S),{value:U.value,"onUpdate:value":l[4]||=e=>U.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),l[25]||=m(`p`,null,`Формат игры`,-1),i(s(y),{value:W.value,"onUpdate:value":l[5]||=e=>W.value=e,options:[{label:`Online`,value:`online`},{label:`Offline`,value:`offline`}],"aria-label":`Формат игры`},null,8,[`value`]),l[26]||=m(`p`,null,`Описание`,-1),i(s(S),{value:G.value,"onUpdate:value":l[6]||=e=>G.value=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),l[27]||=m(`p`,null,`Место проведения`,-1),i(s(S),{value:K.value,"onUpdate:value":l[7]||=e=>K.value=e,type:`text`,placeholder:`Оставьте пустым для онлайн-игры`},null,8,[`value`]),l[28]||=m(`p`,null,`Сценарий (дело из каталога)`,-1),i(s(y),{value:q.value,"onUpdate:value":l[8]||=e=>q.value=e,options:$.value,placeholder:`Выберите дело из каталога`},null,8,[`value`,`options`]),X.value?(r(),p(`p`,_e,`Загружаем сценарии...`)):$.value.length==0?(r(),p(`p`,ve,a(Z.value?`Не удалось загрузить список сценариев`:`В каталоге пока нет опубликованных сценариев`),1)):e(``,!0),l[29]||=m(`p`,null,`Дата и время проведения`,-1),i(s(ne),{value:J.value,"onUpdate:value":l[9]||=e=>J.value=e,type:`datetime`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`]),i(se,{active:`games`})],64))}}),[[`__scopeId`,`data-v-e8cd7764`]]),k=f({__name:`GamesView`,setup(e){return(e,t)=>(r(),o(O))}});export{k as default}; \ No newline at end of file diff --git a/frontend/dist/assets/GamesView-DRcdkoqc.css b/frontend/dist/assets/GamesView-DRcdkoqc.css new file mode 100644 index 0000000..e39ecdf --- /dev/null +++ b/frontend/dist/assets/GamesView-DRcdkoqc.css @@ -0,0 +1 @@ +.game-block[data-v-e8cd7764]{background-color:#222;border:1px solid #222;border-radius:10px;margin:10px 0;padding:20px}.game-block-hover[data-v-e8cd7764]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.game-create-content[data-v-e8cd7764]{justify-content:center;align-items:center;gap:12px;display:flex}.game-create-plus[data-v-e8cd7764]{font-size:30px}.game-block[data-v-e8cd7764]:hover{color:#63e2b7;cursor:pointer}.game-title[data-v-e8cd7764]{margin-bottom:10px;font-size:24px}.game-actions[data-v-e8cd7764]{justify-content:flex-end;margin-top:10px;display:flex}.game-date[data-v-e8cd7764],.game-description[data-v-e8cd7764]{color:#aaa;margin-bottom:10px}.create-hint[data-v-e8cd7764]{color:#aaa} diff --git a/frontend/dist/assets/GamesView-YyTca4Lb.js b/frontend/dist/assets/GamesView-YyTca4Lb.js deleted file mode 100644 index dc28f35..0000000 --- a/frontend/dist/assets/GamesView-YyTca4Lb.js +++ /dev/null @@ -1 +0,0 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,u as ee,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{t as h}from"./Card-D1LVu21r.js";import{n as te,r as g}from"./es-BhJOHfSF.js";import{t as _}from"./Modal-Bsm1tUwA.js";import{t as ne}from"./DatePicker-BpsGcifz.js";import{t as v}from"./Button-lcMg8vK2.js";import{t as y}from"./Select-DCgo5W2R.js";import{t as b}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as x}from"./Upload-B7-f9-Dk.js";import{t as S}from"./Input-DeqNzuJd.js";import{t as C}from"./Alert-CUBw4GSK.js";import{t as w}from"./Space-Ka5Z-MRX.js";import{t as T}from"./Flex-BUYalFhW.js";import{i as re,lt as ie,o as ae}from"./index-6B3OmSLg.js";import{n as oe,t as se}from"./HeaderMenu-BhocR0ua.js";import{t as E}from"./binary_client-DXOBYp6r.js";import{t as D}from"./datetime-BJNH0M1T.js";var ce={class:`center-block-custom`},le={class:`width1200`},ue=[`onClick`],de={class:`game-title`},fe={class:`game-description`},pe={key:2,class:`game-date`},me={key:3,class:`game-date`},he={key:4,class:`game-actions`},ge={key:0},_e={key:0,class:`create-hint`},ve={key:1,class:`create-hint`},O=b(f({__name:`GamesPage`,setup(f){let b=re(),O=te(),k=ee(),A=l([]),j=oe(),M=ae(),N=E(),P=c(()=>j.environment===`venue`&&M.hasAnyRole([`admin`,`organizer`,`developer`])),F=l(!1),I=l([]),L=l(null),R=l(``),z=l(!1),B=l(!1);function ye(){I.value=[],L.value=null,R.value=``,F.value=!0}function be({fileList:e}){z.value||(I.value=e.slice(-1),R.value=``,L.value=null)}async function xe(){if(!P.value||z.value)return;let e=I.value[0]?.file;if(!e||e.size===0){R.value=`Выберите непустой ZIP-файл`;return}if(!e.name.toLowerCase().endsWith(`.zip`)){R.value=`Выберите файл с расширением .zip`;return}if(e.size>1024**3){R.value=`Размер пакета не должен превышать 1 ГиБ`;return}z.value=!0,R.value=``;try{L.value=await N.uploadGamePackage(e),await V()}catch(e){R.value=e instanceof Error?e.message:`Не удалось импортировать игру`}finally{z.value=!1}}async function Se(){let e=L.value?.gameID;if(!(!e||B.value)){B.value=!0,R.value=``;try{if(!(await b.GetGame({ID:e})).game?.ID)throw Error(`Импортированная игра недоступна или удалена. Повторный импорт пакета не восстанавливает удалённую игру.`);await k.push(`/games/`+e)}catch(e){R.value=e instanceof Error?e.message:`Не удалось проверить доступность игры`}finally{B.value=!1}}}async function V(){try{A.value=[];let e=await b.GetGames({});A.value=e.games||[]}catch(e){O.error(e instanceof Error?e.message:`Не удалось загрузить игры`)}}V();async function Ce(e){k.push(`/games/`+e)}function we(e){k.push(`/games/`+e+`/results`)}let H=l(!1),U=l(``),W=l(`online`),G=l(``),K=l(``),q=l(null),J=l(null),Y=l(!1),X=l(!1),Z=l(!1),Q=l([]),$=c(()=>Q.value.filter(e=>e.status==`public`&&e.ID!=null).map(e=>({label:e.name||``,value:e.ID})));async function Te(){X.value=!0,Z.value=!1;try{let e=await b.GetScenariosCatalog({});Q.value=e.scenarios||[]}catch(e){Z.value=!0,O.error(e instanceof Error?e.message:`Не удалось загрузить сценарии`)}finally{X.value=!1}}function Ee(){U.value=``,W.value=`online`,G.value=``,K.value=``,q.value=null,J.value=null,H.value=!0,Te()}async function De(){let e=U.value.trim(),t=q.value,n=J.value;if(!(e==``||t==null||n==null)){Y.value=!0;try{let r=await b.AddGame({name:e,description:G.value,location:K.value.trim(),format:W.value,startAt:new Date(n).toISOString(),scenarioID:t});O.success(`Игра создана`),H.value=!1,k.push(`/games/`+r.ID)}catch(e){O.error(e instanceof Error?e.message:`Не удалось создать игру`)}finally{Y.value=!1}}}return(c,l)=>(r(),p(u,null,[m(`div`,ce,[m(`div`,le,[P.value?(r(),o(s(v),{key:0,onClick:ye},{default:d(()=>[...l[12]||=[t(`Импорт игры`,-1)]]),_:1})):e(``,!0),m(`div`,{class:`game-block game-block-hover`,onClick:l[0]||=e=>Ee()},[...l[13]||=[m(`div`,{class:`game-create-content`},[m(`span`,{class:`game-create-plus`},`+`),m(`span`,null,`Создать игру`)],-1)]]),(r(!0),p(u,null,n(A.value,n=>(r(),p(`div`,{key:n.ID,class:`game-block`,onClick:e=>Ce(n.ID)},[m(`div`,de,a(n.name)+` — `+a(n.format===`offline`?`Offline`:`Online`),1),n.export?.state===`preparing`?(r(),o(s(g),{key:0,type:`warning`,size:`small`},{default:d(()=>[...l[14]||=[t(` Подготовка офлайн-пакета `,-1)]]),_:1})):n.export?.state===`ready`?(r(),o(s(g),{key:1,type:`info`,size:`small`},{default:d(()=>[...l[15]||=[t(` Игра в офлайн-режиме `,-1)]]),_:1})):e(``,!0),m(`div`,fe,a(n.description),1),s(D)(n.startAt)?(r(),p(`div`,pe,` Начало: `+a(s(D)(n.startAt)),1)):e(``,!0),n.location?(r(),p(`div`,me,`Место: `+a(n.location),1)):e(``,!0),n.status==`finish`?(r(),p(`div`,he,[i(s(v),{size:`small`,ghost:``,onClick:ie(e=>we(n.ID),[`stop`])},{default:d(()=>[...l[16]||=[t(`Результаты`,-1)]]),_:1},8,[`onClick`])])):e(``,!0)],8,ue))),128))])]),i(s(_),{show:F.value,"onUpdate:show":l[2]||=e=>F.value=e,"mask-closable":!z.value,"close-on-esc":!z.value},{default:d(()=>[i(s(h),{style:{width:`min(94vw, 600px)`},title:`Импорт игры`,bordered:!1,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(v),{disabled:z.value,"aria-label":`Закрыть импорт`,onClick:l[1]||=e=>F.value=!1},{default:d(()=>[...l[17]||=[t(`Закрыть`,-1)]]),_:1},8,[`disabled`])]),default:d(()=>[i(s(w),{vertical:``},{default:d(()=>[l[22]||=m(`p`,null,`Выберите один ZIP-пакет размером до 1 ГиБ. Содержимое проверит сервер.`,-1),i(s(x),{"file-list":I.value,"default-upload":!1,max:1,accept:`.zip`,disabled:z.value,onChange:be},{default:d(()=>[i(s(v),{disabled:z.value},{default:d(()=>[...l[18]||=[t(`Выбрать ZIP`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),I.value[0]?.file?(r(),p(`p`,ge,a(I.value[0].name)+` — `+a(I.value[0].file.size.toLocaleString(`ru-RU`))+` байт `,1)):e(``,!0),z.value?(r(),o(s(C),{key:1,type:`info`,role:`status`},{default:d(()=>[...l[19]||=[t(`Импортируем пакет…`,-1)]]),_:1})):e(``,!0),R.value?(r(),o(s(C),{key:2,type:`error`,role:`alert`},{default:d(()=>[t(a(R.value),1)]),_:1})):e(``,!0),L.value?(r(),o(s(C),{key:3,type:`success`,role:`status`},{default:d(()=>[t(a(L.value.repeated?`Пакет уже импортирован`:`Игра импортирована`),1)]),_:1})):e(``,!0),L.value?(r(),o(s(v),{key:4,loading:B.value,disabled:B.value,onClick:Se},{default:d(()=>[...l[20]||=[t(`Открыть игру`,-1)]]),_:1},8,[`loading`,`disabled`])):(r(),o(s(v),{key:5,loading:z.value,disabled:z.value||!I.value.length||!P.value,onClick:xe},{default:d(()=>[...l[21]||=[t(`Загрузить пакет`,-1)]]),_:1},8,[`loading`,`disabled`]))]),_:1})]),_:1})]),_:1},8,[`show`,`mask-closable`,`close-on-esc`]),i(s(_),{show:H.value,"onUpdate:show":l[11]||=e=>H.value=e},{default:d(()=>[i(s(h),{style:{width:`min(94vw, 600px)`},title:`Создание игры`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(v),{onClick:l[3]||=e=>H.value=!1},{default:d(()=>[...l[23]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[i(s(T),{justify:`end`},{default:d(()=>[i(s(v),{onClick:l[10]||=e=>De(),loading:Y.value,disabled:U.value.trim().length==0||q.value==null||J.value==null||Y.value},{default:d(()=>[...l[30]||=[t(` Создать `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),default:d(()=>[i(s(w),{vertical:``},{default:d(()=>[l[24]||=m(`p`,null,`Название`,-1),i(s(S),{value:U.value,"onUpdate:value":l[4]||=e=>U.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),l[25]||=m(`p`,null,`Формат игры`,-1),i(s(y),{value:W.value,"onUpdate:value":l[5]||=e=>W.value=e,options:[{label:`Online`,value:`online`},{label:`Offline`,value:`offline`}],"aria-label":`Формат игры`},null,8,[`value`]),l[26]||=m(`p`,null,`Описание`,-1),i(s(S),{value:G.value,"onUpdate:value":l[6]||=e=>G.value=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),l[27]||=m(`p`,null,`Место проведения`,-1),i(s(S),{value:K.value,"onUpdate:value":l[7]||=e=>K.value=e,type:`text`,placeholder:`Оставьте пустым для онлайн-игры`},null,8,[`value`]),l[28]||=m(`p`,null,`Сценарий (дело из каталога)`,-1),i(s(y),{value:q.value,"onUpdate:value":l[8]||=e=>q.value=e,options:$.value,placeholder:`Выберите дело из каталога`},null,8,[`value`,`options`]),X.value?(r(),p(`p`,_e,`Загружаем сценарии...`)):$.value.length==0?(r(),p(`p`,ve,a(Z.value?`Не удалось загрузить список сценариев`:`В каталоге пока нет опубликованных сценариев`),1)):e(``,!0),l[29]||=m(`p`,null,`Дата и время проведения`,-1),i(s(ne),{value:J.value,"onUpdate:value":l[9]||=e=>J.value=e,type:`datetime`},null,8,[`value`])]),_:1})]),_:1})]),_:1},8,[`show`]),i(se,{active:`games`})],64))}}),[[`__scopeId`,`data-v-c3285f17`]]),k=f({__name:`GamesView`,setup(e){return(e,t)=>(r(),o(O))}});export{k as default}; \ No newline at end of file diff --git a/frontend/dist/assets/HeaderMenu-BhocR0ua.js b/frontend/dist/assets/HeaderMenu-vnmT21Il.js similarity index 72% rename from frontend/dist/assets/HeaderMenu-BhocR0ua.js rename to frontend/dist/assets/HeaderMenu-vnmT21Il.js index 028327d..c8cb31a 100644 --- a/frontend/dist/assets/HeaderMenu-BhocR0ua.js +++ b/frontend/dist/assets/HeaderMenu-vnmT21Il.js @@ -1 +1 @@ -import{Ct as e,Dt as t,In as n,Kt as r,Ot as i,Rn as a,bn as o,bt as s,hn as c,in as l,kt as u,nn as d,u as f,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{n as h,r as g,t as _}from"./es-BhJOHfSF.js";import{t as v}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{i as y,nt as b,o as x,rt as S}from"./index-6B3OmSLg.js";var C={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},w=u({name:`MenuOutlined`,render:function(e,t){return r(),p(`svg`,C,t[0]||=[m(`path`,{d:`M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z`,fill:`currentColor`},null,-1)])}}),T=b(`ui`,()=>{let e=c([]),t=c(null),n=c(!0),r=0;async function i(){let i=x(),a=i.getToken(),o=++r;e.value=[],t.value=null,n.value=!0;try{let n=await y().GetPermissions({});if(o!==r)return;a===i.getToken()&&(e.value=n.permissions||[]),(n.environment===`prod`||n.environment===`venue`)&&(t.value=n.environment)}catch(e){if(o===r)throw e}finally{o===r&&(n.value=!1)}}return{permissions:e,environment:t,isLoadingEnvironment:n,load:i}}),E={class:`menu-block`},D=[`aria-expanded`,`aria-label`],O={class:`right-group`},k=v(u({__name:`HeaderMenu`,props:{active:{}},setup(u){let v=u,y=x(),b=f(),C=T(),k=h(),{permissions:A,environment:j,isLoadingEnvironment:M}=S(C),N=s(()=>M.value?`Среда: …`:j.value===`prod`?`Сервер`:j.value===`venue`?`Локальная сеть`:`Среда: ?`);d(()=>y.user,async()=>{try{await C.load()}catch(e){k.error(`Не удалось загрузить сведения сервера`),console.error(`Failed to load server information:`,e)}},{immediate:!0});function P(e){return A.value.includes(e)}let F=()=>{b.push(`/login`)},I=()=>{y.logout(),b.push(`/login`)},L=c(!1);return(s,c)=>(r(),p(`div`,E,[m(`button`,{type:`button`,class:`burger-button`,"aria-expanded":L.value,"aria-label":L.value?`Закрыть меню`:`Открыть меню`,onClick:c[0]||=e=>L.value=!L.value},[i(o(_),{class:`burger-icon`,size:`28`},{default:l(()=>[i(o(w))]),_:1})],8,D),m(`div`,{class:n([`left-group menu-buttons-block`,L.value?``:`menu-buttons-block-active`])},[m(`button`,{type:`button`,class:n([`menu-item-block`,{active:v.active==`main`}]),onClick:c[1]||=e=>o(b).push(`/`)},` Главная `,2),o(y).hasRole(`user`)?(r(),p(`button`,{key:0,type:`button`,class:n([`menu-item-block`,{active:v.active==`office`}]),onClick:c[2]||=e=>o(b).push(`/office`)},` Кабинет `,2)):e(``,!0),P(`games_page`)?(r(),p(`button`,{key:1,type:`button`,class:n([`menu-item-block`,{active:v.active==`games`}]),onClick:c[3]||=e=>o(b).push(`/games`)},` Игры `,2)):e(``,!0),m(`button`,{type:`button`,class:`menu-item-block`,onClick:c[4]||=e=>o(b).push(`/screen`)},`Экран`),m(`button`,{type:`button`,class:n([`menu-item-block`,{active:v.active==`catalog`}]),onClick:c[5]||=e=>o(b).push(`/catalog`)},` Каталог `,2),P(`scenarios_page`)?(r(),p(`button`,{key:2,type:`button`,class:n([`menu-item-block`,{active:v.active==`scenarios`}]),onClick:c[6]||=e=>o(b).push(`/scenarios`)},` Сценарии `,2)):e(``,!0),P(`tasks_page`)?(r(),p(`button`,{key:3,type:`button`,class:n([`menu-item-block`,{active:v.active==`tasks`}]),onClick:c[7]||=e=>o(b).push(`/tasks`)},` Задачи `,2)):e(``,!0),P(`users_page`)?(r(),p(`button`,{key:4,type:`button`,class:n([`menu-item-block`,{active:v.active==`users`}]),onClick:c[8]||=e=>o(b).push(`/users`)},` Пользователи `,2)):e(``,!0),P(`reviews_page`)?(r(),p(`button`,{key:5,type:`button`,class:n([`menu-item-block`,{active:v.active==`reviews`}]),onClick:c[9]||=e=>o(b).push(`/reviews`)},` Отзывы `,2)):e(``,!0)],2),m(`div`,O,[i(o(g),{size:`small`,type:o(j)===`venue`?`warning`:`default`,title:o(j)?`Среда подключённого сервера`:`Среда сервера не определена`,role:`status`},{default:l(()=>[t(a(N.value),1)]),_:1},8,[`type`,`title`]),o(y).isAuthenticated?e(``,!0):(r(),p(`button`,{key:0,type:`button`,class:`menu-item-block right`,onClick:F},` Войти `)),o(y).isAuthenticated?(r(),p(`button`,{key:1,type:`button`,class:`menu-item-block right`,onClick:I},` Выйти `)):e(``,!0)])]))}}),[[`__scopeId`,`data-v-90c8cda8`]]);export{T as n,k as t}; \ No newline at end of file +import{Ct as e,Dt as t,In as n,Kt as r,Ot as i,Rn as a,bn as o,bt as s,hn as c,in as l,kt as u,nn as d,u as f,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{n as h,r as g,t as _}from"./es-Qklex053.js";import{t as v}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{i as y,it as b,o as x,rt as S}from"./index-NE0dsiiJ.js";var C={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},w=u({name:`MenuOutlined`,render:function(e,t){return r(),p(`svg`,C,t[0]||=[m(`path`,{d:`M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z`,fill:`currentColor`},null,-1)])}}),T=S(`ui`,()=>{let e=c([]),t=c(null),n=c(!0),r=0;async function i(){let i=x(),a=i.getToken(),o=++r;e.value=[],t.value=null,n.value=!0;try{let n=await y().GetPermissions({});if(o!==r)return;a===i.getToken()&&(e.value=n.permissions||[]),(n.environment===`prod`||n.environment===`venue`)&&(t.value=n.environment)}catch(e){if(o===r)throw e}finally{o===r&&(n.value=!1)}}return{permissions:e,environment:t,isLoadingEnvironment:n,load:i}}),E={class:`menu-block`},D=[`aria-expanded`,`aria-label`],O={class:`right-group`},k=v(u({__name:`HeaderMenu`,props:{active:{}},setup(u){let v=u,y=x(),S=f(),C=T(),k=h(),{permissions:A,environment:j,isLoadingEnvironment:M}=b(C),N=s(()=>M.value?`Среда: …`:j.value===`prod`?`Сервер`:j.value===`venue`?`Локальная сеть`:`Среда: ?`);d(()=>y.user,async()=>{try{await C.load()}catch(e){k.error(`Не удалось загрузить сведения сервера`),console.error(`Failed to load server information:`,e)}},{immediate:!0});function P(e){return A.value.includes(e)}let F=()=>{S.push(`/login`)},I=()=>{y.logout(),S.push(`/login`)},L=c(!1);return(s,c)=>(r(),p(`div`,E,[m(`button`,{type:`button`,class:`burger-button`,"aria-expanded":L.value,"aria-label":L.value?`Закрыть меню`:`Открыть меню`,onClick:c[0]||=e=>L.value=!L.value},[i(o(_),{class:`burger-icon`,size:`28`},{default:l(()=>[i(o(w))]),_:1})],8,D),m(`div`,{class:n([`left-group menu-buttons-block`,L.value?``:`menu-buttons-block-active`])},[m(`button`,{type:`button`,class:n([`menu-item-block`,{active:v.active==`main`}]),onClick:c[1]||=e=>o(S).push(`/`)},` Главная `,2),o(y).hasRole(`user`)?(r(),p(`button`,{key:0,type:`button`,class:n([`menu-item-block`,{active:v.active==`office`}]),onClick:c[2]||=e=>o(S).push(`/office`)},` Кабинет `,2)):e(``,!0),P(`games_page`)?(r(),p(`button`,{key:1,type:`button`,class:n([`menu-item-block`,{active:v.active==`games`}]),onClick:c[3]||=e=>o(S).push(`/games`)},` Игры `,2)):e(``,!0),m(`button`,{type:`button`,class:`menu-item-block`,onClick:c[4]||=e=>o(S).push(`/screen`)},`Экран`),m(`button`,{type:`button`,class:n([`menu-item-block`,{active:v.active==`catalog`}]),onClick:c[5]||=e=>o(S).push(`/catalog`)},` Каталог `,2),P(`scenarios_page`)?(r(),p(`button`,{key:2,type:`button`,class:n([`menu-item-block`,{active:v.active==`scenarios`}]),onClick:c[6]||=e=>o(S).push(`/scenarios`)},` Сценарии `,2)):e(``,!0),P(`tasks_page`)?(r(),p(`button`,{key:3,type:`button`,class:n([`menu-item-block`,{active:v.active==`tasks`}]),onClick:c[7]||=e=>o(S).push(`/tasks`)},` Задачи `,2)):e(``,!0),P(`users_page`)?(r(),p(`button`,{key:4,type:`button`,class:n([`menu-item-block`,{active:v.active==`users`}]),onClick:c[8]||=e=>o(S).push(`/users`)},` Пользователи `,2)):e(``,!0),P(`reviews_page`)?(r(),p(`button`,{key:5,type:`button`,class:n([`menu-item-block`,{active:v.active==`reviews`}]),onClick:c[9]||=e=>o(S).push(`/reviews`)},` Отзывы `,2)):e(``,!0)],2),m(`div`,O,[i(o(g),{size:`small`,type:o(j)===`venue`?`warning`:`default`,title:o(j)?`Среда подключённого сервера`:`Среда сервера не определена`,role:`status`},{default:l(()=>[t(a(N.value),1)]),_:1},8,[`type`,`title`]),o(y).isAuthenticated?e(``,!0):(r(),p(`button`,{key:0,type:`button`,class:`menu-item-block right`,onClick:F},` Войти `)),o(y).isAuthenticated?(r(),p(`button`,{key:1,type:`button`,class:`menu-item-block right`,onClick:I},` Выйти `)):e(``,!0)])]))}}),[[`__scopeId`,`data-v-90c8cda8`]]);export{T as n,k as t}; \ No newline at end of file diff --git a/frontend/dist/assets/HeaderText-CJTPL4m_.js b/frontend/dist/assets/HeaderText-DnXJEr19.js similarity index 79% rename from frontend/dist/assets/HeaderText-CJTPL4m_.js rename to frontend/dist/assets/HeaderText-DnXJEr19.js index f26e92e..6911211 100644 --- a/frontend/dist/assets/HeaderText-CJTPL4m_.js +++ b/frontend/dist/assets/HeaderText-DnXJEr19.js @@ -1 +1 @@ -import{Kt as e,Yt as t,kt as n,wt as r}from"./client-Bz0sY7Lm.js";import{t as i}from"./_plugin-vue_export-helper-CtHwEvHL.js";var a={class:`text-with-font`},o=i(n({__name:`HeaderText`,setup(n){return(n,i)=>(e(),r(`span`,a,[t(n.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-689794e0`]]);export{o as t}; \ No newline at end of file +import{Kt as e,Yt as t,kt as n,wt as r}from"./client-Bz0sY7Lm.js";import{t as i}from"./_plugin-vue_export-helper-CaiaXQaI.js";var a={class:`text-with-font`},o=i(n({__name:`HeaderText`,setup(n){return(n,i)=>(e(),r(`span`,a,[t(n.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-689794e0`]]);export{o as t}; \ No newline at end of file diff --git a/frontend/dist/assets/HomeView-DuQ_iIPq.js b/frontend/dist/assets/HomeView-De2Wt4BH.js similarity index 90% rename from frontend/dist/assets/HomeView-DuQ_iIPq.js rename to frontend/dist/assets/HomeView-De2Wt4BH.js index e09318b..9686349 100644 --- a/frontend/dist/assets/HomeView-DuQ_iIPq.js +++ b/frontend/dist/assets/HomeView-De2Wt4BH.js @@ -1 +1 @@ -import{Kt as e,Ot as t,St as n,ht as r,kt as i,wt as a,xt as o}from"./client-Bz0sY7Lm.js";import{t as s}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as c}from"./HeaderMenu-BhocR0ua.js";var l=s(i({__name:`HomePage`,setup(n){return(n,i)=>(e(),a(r,null,[i[0]||=o(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[o(`div`,null,[o(`h1`,{class:`font-text`},`Вечерний детектив`),o(`h3`,{class:`font-text`},`Дело №0`),o(`p`,{class:`content-text`},`Поиграем?`)])],-1),t(c,{active:`main`})],64))}}),[[`__scopeId`,`data-v-3ca82fba`]]),u=i({__name:`HomeView`,setup(t){return(t,r)=>(e(),n(l))}});export{u as default}; \ No newline at end of file +import{Kt as e,Ot as t,St as n,ht as r,kt as i,wt as a,xt as o}from"./client-Bz0sY7Lm.js";import{t as s}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as c}from"./HeaderMenu-vnmT21Il.js";var l=s(i({__name:`HomePage`,setup(n){return(n,i)=>(e(),a(r,null,[i[0]||=o(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[o(`div`,null,[o(`h1`,{class:`font-text`},`Вечерний детектив`),o(`h3`,{class:`font-text`},`Дело №0`),o(`p`,{class:`content-text`},`Поиграем?`)])],-1),t(c,{active:`main`})],64))}}),[[`__scopeId`,`data-v-3ca82fba`]]),u=i({__name:`HomeView`,setup(t){return(t,r)=>(e(),n(l))}});export{u as default}; \ No newline at end of file diff --git a/frontend/dist/assets/Input-DeqNzuJd.js b/frontend/dist/assets/Input-CEIE7mTC.js similarity index 56% rename from frontend/dist/assets/Input-DeqNzuJd.js rename to frontend/dist/assets/Input-CEIE7mTC.js index 67df2d7..b179f21 100644 --- a/frontend/dist/assets/Input-DeqNzuJd.js +++ b/frontend/dist/assets/Input-CEIE7mTC.js @@ -1,4 +1,4 @@ -import{At as e,H as t,Mt as n,Pt as r,Rt as i,U as a,Ut as o,Y as s,at as c,bt as l,g as ee,hn as u,ht as d,it as f,kt as p,m as te,nn as m,nt as h,ot as g,p as _,qt as ne,rn as v,st as y,tt as b,vn as x}from"./client-Bz0sY7Lm.js";import{c as S,d as C,i as w,u as T}from"./Card-D1LVu21r.js";import{o as re}from"./es-BhJOHfSF.js";import{i as ie,r as E,t as D}from"./Suffix-JLavbuLO.js";import{t as ae}from"./use-merged-state-z45UzW9G.js";import{i as oe}from"./Button-lcMg8vK2.js";import{a as O,i as k,o as A,s as j}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as se}from"./use-form-item-Bl3X3aXB.js";import{O as ce,et as M,q as N}from"./index-6B3OmSLg.js";var P=p({name:`Eye`,render(){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},n(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),n(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),F=p({name:`EyeOff`,render(){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},n(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),n(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),n(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),n(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),n(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),I=s(`n-input`),le=h(`input`,` +import{At as e,H as t,Mt as n,Pt as r,Rt as i,U as a,Ut as o,Y as s,at as c,bt as l,g as ee,hn as u,ht as d,it as f,kt as p,m as te,nn as m,nt as h,ot as g,p as _,qt as ne,rn as v,st as y,tt as b,vn as x}from"./client-Bz0sY7Lm.js";import{c as S,d as C,i as w,u as T}from"./Card-BGJkYb2B.js";import{o as re}from"./es-Qklex053.js";import{i as ie,r as E,t as D}from"./Suffix-BBRLYxYK.js";import{t as ae}from"./use-merged-state-z45UzW9G.js";import{i as oe}from"./Button-MBUKfT_Z.js";import{a as O,c as k,i as A,o as j}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as se}from"./use-form-item-Bl3X3aXB.js";import{J as M,k as ce,tt as le}from"./index-NE0dsiiJ.js";var N=p({name:`Eye`,render(){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},n(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),n(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),P=p({name:`EyeOff`,render(){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},n(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),n(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),n(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),n(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),n(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),F=s(`n-input`),ue=h(`input`,` max-width: 100%; cursor: text; line-height: 1.5; @@ -229,6 +229,6 @@ import{At as e,H as t,Mt as n,Pt as r,Rt as i,U as a,Ut as o,Y as s,at as c,bt a `,[f(`state-border`,` box-shadow: var(--n-box-shadow-focus-${e}); border: var(--n-border-focus-${e}); - `)])])]))]),ue=h(`input`,[c(`disabled`,[f(`input-el, textarea-el`,` + `)])])]))]),de=h(`input`,[c(`disabled`,[f(`input-el, textarea-el`,` -webkit-text-fill-color: var(--n-text-color-disabled); - `)])]);function L(e){let t=0;for(let n of e)t++;return t}function R(e){return e===``||e==null}function de(e){let t=u(null);function n(){let{value:n}=e;if(!n?.focus){i();return}let{selectionStart:r,selectionEnd:a,value:o}=n;if(r==null||a==null){i();return}t.value={start:r,end:a,beforeText:o.slice(0,r),afterText:o.slice(a)}}function r(){var n;let{value:r}=t,{value:i}=e;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(n=i.setSelectionRange)==null||n.call(i,l,l)}function i(){t.value=null}return m(e,i),{recordCursor:n,restoreCursor:r}}var z=p({name:`InputWordCount`,setup(e,{slots:t}){let{mergedValueRef:i,maxlengthRef:a,mergedClsPrefixRef:o,countGraphemesRef:s}=r(I),c=l(()=>{let{value:e}=i;return e===null||Array.isArray(e)?0:(s.value||L)(e)});return()=>{let{value:e}=a,{value:r}=i;return n(`span`,{class:`${o.value}-input-word-count`},O(t.default,{value:r===null||Array.isArray(r)?``:r},()=>[e===void 0?c.value:`${c.value} / ${e}`]))}}}),B=p({name:`Input`,props:Object.assign(Object.assign({},_.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(n){let{mergedClsPrefixRef:r,mergedBorderedRef:s,inlineThemeDisabled:c,mergedRtlRef:d,mergedComponentPropsRef:f}=a(n),p=_(`Input`,`-input`,le,ce,n,r);oe&&te(`-input-safari`,ue,r);let h=u(null),g=u(null),b=u(null),S=u(null),w=u(null),E=u(null),D=u(null),O=de(D),k=u(null),{localeRef:A}=ie(`Input`),N=u(n.defaultValue),P=ae(x(n,`value`),N),F=se(n,{mergedSize:e=>{let{size:t}=n;if(t)return t;let{mergedSize:r}=e||{};return r?.value?r.value:f?.value?.Input?.size||`medium`}}),{mergedSizeRef:L,mergedDisabledRef:z,mergedStatusRef:B}=F,V=u(!1),H=u(!1),U=u(!1),W=u(!1),G=null,K=l(()=>{let{placeholder:e,pair:t}=n;return t?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[A.value.placeholder]:[e]}),fe=l(()=>{let{value:e}=U,{value:t}=P,{value:n}=K;return!e&&(R(t)||Array.isArray(t)&&R(t[0]))&&n[0]}),pe=l(()=>{let{value:e}=U,{value:t}=P,{value:n}=K;return!e&&n[1]&&(R(t)||Array.isArray(t)&&R(t[1]))}),me=M(()=>n.internalForceFocus||V.value),he=M(()=>{if(z.value||n.readonly||!n.clearable||!me.value&&!H.value)return!1;let{value:e}=P,{value:t}=me;return n.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(H.value||t):!!e&&(H.value||t)}),q=l(()=>{let{showPasswordOn:e}=n;if(e)return e;if(n.showPasswordToggle)return`click`}),J=u(!1),ge=l(()=>{let{textDecoration:e}=n;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),_e=u(void 0),ve=()=>{if(n.type===`textarea`){let{autosize:e}=n;if(e&&(_e.value=k.value?.$el?.offsetWidth),!g.value||typeof e==`boolean`)return;let{paddingTop:t,paddingBottom:r,lineHeight:i}=window.getComputedStyle(g.value),a=Number(t.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=b;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},ye=l(()=>{let{maxlength:e}=n;return e===void 0?void 0:Number(e)});o(()=>{let{value:e}=P;Array.isArray(e)||nt(e)});let be=e().proxy;function Y(e,t){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=n,{nTriggerFormInput:o}=F;r&&j(r,e,t),i&&j(i,e,t),a&&j(a,e,t),N.value=e,o()}function X(e,t){let{onChange:r}=n,{nTriggerFormChange:i}=F;r&&j(r,e,t),N.value=e,i()}function xe(e){let{onBlur:t}=n,{nTriggerFormBlur:r}=F;t&&j(t,e),r()}function Se(e){let{onFocus:t}=n,{nTriggerFormFocus:r}=F;t&&j(t,e),r()}function Ce(e){let{onClear:t}=n;t&&j(t,e)}function we(e){let{onInputBlur:t}=n;t&&j(t,e)}function Te(e){let{onInputFocus:t}=n;t&&j(t,e)}function Ee(){let{onDeactivate:e}=n;e&&j(e)}function De(){let{onActivate:e}=n;e&&j(e)}function Oe(e){let{onClick:t}=n;t&&j(t,e)}function ke(e){let{onWrapperFocus:t}=n;t&&j(t,e)}function Ae(e){let{onWrapperBlur:t}=n;t&&j(t,e)}function je(){U.value=!0}function Me(e){U.value=!1,e.target===E.value?Z(e,1):Z(e,0)}function Z(e,t=0,r=`input`){let a=e.target.value;if(nt(a),e instanceof InputEvent&&!e.isComposing&&(U.value=!1),n.type===`textarea`){let{value:e}=k;e&&e.syncUnifiedContainer()}if(G=a,U.value)return;O.recordCursor();let o=Ne(a);if(o)if(!n.pair)r===`input`?Y(a,{source:t}):X(a,{source:t});else{let{value:e}=P;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[t]=a,r===`input`?Y(e,{source:t}):X(e,{source:t})}be.$forceUpdate(),o||i(O.restoreCursor)}function Ne(e){let{countGraphemes:t,maxlength:r,minlength:i}=n;if(t){let n;if(r!==void 0&&(n===void 0&&(n=t(e)),n>Number(r))||i!==void 0&&(n===void 0&&(n=t(e)),n{e.preventDefault(),T(`mouseup`,document,t)};if(C(`mouseup`,document,t),q.value!==`mousedown`)return;J.value=!0;let n=()=>{J.value=!1,T(`mouseup`,document,n)};C(`mouseup`,document,n)}function qe(e){n.onKeyup&&j(n.onKeyup,e)}function Je(e){switch(n.onKeydown&&j(n.onKeydown,e),e.key){case`Escape`:$();break;case`Enter`:Ye(e);break}}function Ye(e){var t,r;if(n.passivelyActivated){let{value:i}=W;if(i){n.internalDeactivateOnEnter&&$();return}e.preventDefault(),n.type===`textarea`?(t=g.value)==null||t.focus():(r=w.value)==null||r.focus()}}function $(){n.passivelyActivated&&(W.value=!1,i(()=>{var e;(e=h.value)==null||e.focus()}))}function Xe(){var e,t,r;z.value||(n.passivelyActivated?(e=h.value)==null||e.focus():((t=g.value)==null||t.focus(),(r=w.value)==null||r.focus()))}function Ze(){h.value?.contains(document.activeElement)&&document.activeElement.blur()}function Qe(){var e,t;(e=g.value)==null||e.select(),(t=w.value)==null||t.select()}function $e(){z.value||(g.value?g.value.focus():w.value&&w.value.focus())}function et(){let{value:e}=h;e?.contains(document.activeElement)&&e!==document.activeElement&&$()}function tt(e){if(n.type===`textarea`){let{value:t}=g;t?.scrollTo(e)}else{let{value:t}=w;t?.scrollTo(e)}}function nt(e){let{type:t,pair:r,autosize:i}=n;if(!r&&i)if(t===`textarea`){let{value:t}=b;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=S;t&&(e?t.textContent=e:t.innerHTML=` `)}}function rt(){ve()}let it=u({top:`0`});function at(e){var t;let{scrollTop:n}=e.target;it.value.top=`${-n}px`,(t=k.value)==null||t.syncUnifiedContainer()}let ot=null;v(()=>{let{autosize:e,type:t}=n;e&&t===`textarea`?ot=m(P,e=>{!Array.isArray(e)&&e!==G&&nt(e)}):ot?.()});let st=null;v(()=>{n.type===`textarea`?st=m(P,e=>{var t;!Array.isArray(e)&&e!==G&&((t=k.value)==null||t.syncUnifiedContainer())}):st?.()}),ne(I,{mergedValueRef:P,maxlengthRef:ye,mergedClsPrefixRef:r,countGraphemesRef:x(n,`countGraphemes`)});let ct={wrapperElRef:h,inputElRef:w,textareaElRef:g,isCompositing:U,clear:Ve,focus:Xe,blur:Ze,select:Qe,deactivate:et,activate:$e,scrollTo:tt},lt=ee(`Input`,d,r),ut=l(()=>{let{value:e}=L,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:s,textDecorationColor:c,border:l,borderDisabled:ee,borderHover:u,borderFocus:d,placeholderColor:f,placeholderColorDisabled:te,lineHeightTextarea:m,colorDisabled:h,colorFocus:g,textColorDisabled:_,boxShadowFocus:ne,iconSize:v,colorFocusWarning:b,boxShadowFocusWarning:x,borderWarning:S,borderFocusWarning:C,borderHoverWarning:w,colorFocusError:T,boxShadowFocusError:ie,borderError:E,borderFocusError:D,borderHoverError:ae,clearSize:oe,clearColor:O,clearColorHover:k,clearColorPressed:A,iconColor:j,iconColorDisabled:se,suffixTextColor:ce,countTextColor:M,countTextColorDisabled:N,iconColorHover:P,iconColorPressed:F,loadingColor:I,loadingColorError:le,loadingColorWarning:ue,fontWeight:R,[y(`padding`,e)]:de,[y(`fontSize`,e)]:z,[y(`height`,e)]:B}}=p.value,{left:V,right:H}=re(de);return{"--n-bezier":t,"--n-count-text-color":M,"--n-count-text-color-disabled":N,"--n-color":n,"--n-font-size":z,"--n-font-weight":R,"--n-border-radius":r,"--n-height":B,"--n-padding-left":V,"--n-padding-right":H,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":l,"--n-border-disabled":ee,"--n-border-hover":u,"--n-border-focus":d,"--n-placeholder-color":f,"--n-placeholder-color-disabled":te,"--n-icon-size":v,"--n-line-height-textarea":m,"--n-color-disabled":h,"--n-color-focus":g,"--n-text-color-disabled":_,"--n-box-shadow-focus":ne,"--n-loading-color":I,"--n-caret-color-warning":s,"--n-color-focus-warning":b,"--n-box-shadow-focus-warning":x,"--n-border-warning":S,"--n-border-focus-warning":C,"--n-border-hover-warning":w,"--n-loading-color-warning":ue,"--n-caret-color-error":o,"--n-color-focus-error":T,"--n-box-shadow-focus-error":ie,"--n-border-error":E,"--n-border-focus-error":D,"--n-border-hover-error":ae,"--n-loading-color-error":le,"--n-clear-color":O,"--n-clear-size":oe,"--n-clear-color-hover":k,"--n-clear-color-pressed":A,"--n-icon-color":j,"--n-icon-color-hover":P,"--n-icon-color-pressed":F,"--n-icon-color-disabled":se,"--n-suffix-text-color":ce}}),dt=c?t(`input`,l(()=>{let{value:e}=L;return e[0]}),ut,n):void 0;return Object.assign(Object.assign({},ct),{wrapperElRef:h,inputElRef:w,inputMirrorElRef:S,inputEl2Ref:E,textareaElRef:g,textareaMirrorElRef:b,textareaScrollbarInstRef:k,rtlEnabled:lt,uncontrolledValue:N,mergedValue:P,passwordVisible:J,mergedPlaceholder:K,showPlaceholder1:fe,showPlaceholder2:pe,mergedFocus:me,isComposing:U,activated:W,showClearButton:he,mergedSize:L,mergedDisabled:z,textDecorationStyle:ge,mergedClsPrefix:r,mergedBordered:s,mergedShowPasswordOn:q,placeholderStyle:it,mergedStatus:B,textAreaScrollContainerWidth:_e,handleTextAreaScroll:at,handleCompositionStart:je,handleCompositionEnd:Me,handleInput:Z,handleInputBlur:Pe,handleInputFocus:Fe,handleWrapperBlur:Ie,handleWrapperFocus:Le,handleMouseEnter:Ue,handleMouseLeave:We,handleMouseDown:He,handleChange:Re,handleClick:ze,handleClear:Be,handlePasswordToggleClick:Ge,handlePasswordToggleMousedown:Ke,handleWrapperKeydown:Je,handleWrapperKeyup:qe,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>g.value,mergedTheme:p,cssVars:c?void 0:ut,themeClass:dt?.themeClass,onRender:dt?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:r,type:i,countGraphemes:a,onRender:o}=this,s=this.$slots;return o?.(),n(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,r,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:i===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&i!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},n(`div`,{class:`${e}-input-wrapper`},A(s.prefix,t=>t&&n(`div`,{class:`${e}-input__prefix`},t)),i===`textarea`?n(w,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,r={width:this.autosize&&t&&`${t}px`};return n(d,null,n(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,r],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?n(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,r],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?n(S,{onResize:this.handleTextAreaMirrorResize},{default:()=>n(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):n(`div`,{class:`${e}-input__input`},n(`input`,Object.assign({type:i===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:i},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?n(`div`,{class:`${e}-input__placeholder`},n(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?n(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&A(s.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?n(`div`,{class:`${e}-input__suffix`},[A(s[`clear-icon-placeholder`],t=>(this.clearable||t)&&n(E,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:n(D,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?n(z,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?n(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?k(s[`password-visible-icon`],()=>[n(N,{clsPrefix:e},{default:()=>n(P,null)})]):k(s[`password-invisible-icon`],()=>[n(N,{clsPrefix:e},{default:()=>n(F,null)})])):null]):null)),this.pair?n(`span`,{class:`${e}-input__separator`},k(s.separator,()=>[this.separator])):null,this.pair?n(`div`,{class:`${e}-input-wrapper`},n(`div`,{class:`${e}-input__input`},n(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?n(`div`,{class:`${e}-input__placeholder`},n(`span`,null,this.mergedPlaceholder[1])):null),A(s.suffix,t=>(this.clearable||t)&&n(`div`,{class:`${e}-input__suffix`},[this.clearable&&n(E,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>s[`clear-icon`]?.call(s),placeholder:()=>s[`clear-icon-placeholder`]?.call(s)}),t]))):null,this.mergedBordered?n(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?n(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&i===`textarea`?n(z,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null)}});export{P as n,B as t}; \ No newline at end of file + `)])]);function I(e){let t=0;for(let n of e)t++;return t}function L(e){return e===``||e==null}function fe(e){let t=u(null);function n(){let{value:n}=e;if(!n?.focus){i();return}let{selectionStart:r,selectionEnd:a,value:o}=n;if(r==null||a==null){i();return}t.value={start:r,end:a,beforeText:o.slice(0,r),afterText:o.slice(a)}}function r(){var n;let{value:r}=t,{value:i}=e;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(n=i.setSelectionRange)==null||n.call(i,l,l)}function i(){t.value=null}return m(e,i),{recordCursor:n,restoreCursor:r}}var R=p({name:`InputWordCount`,setup(e,{slots:t}){let{mergedValueRef:i,maxlengthRef:a,mergedClsPrefixRef:o,countGraphemesRef:s}=r(F),c=l(()=>{let{value:e}=i;return e===null||Array.isArray(e)?0:(s.value||I)(e)});return()=>{let{value:e}=a,{value:r}=i;return n(`span`,{class:`${o.value}-input-word-count`},O(t.default,{value:r===null||Array.isArray(r)?``:r},()=>[e===void 0?c.value:`${c.value} / ${e}`]))}}}),z=p({name:`Input`,props:Object.assign(Object.assign({},_.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(n){let{mergedClsPrefixRef:r,mergedBorderedRef:s,inlineThemeDisabled:c,mergedRtlRef:d,mergedComponentPropsRef:f}=a(n),p=_(`Input`,`-input`,ue,ce,n,r);oe&&te(`-input-safari`,de,r);let h=u(null),g=u(null),b=u(null),S=u(null),w=u(null),E=u(null),D=u(null),O=fe(D),A=u(null),{localeRef:j}=ie(`Input`),M=u(n.defaultValue),N=ae(x(n,`value`),M),P=se(n,{mergedSize:e=>{let{size:t}=n;if(t)return t;let{mergedSize:r}=e||{};return r?.value?r.value:f?.value?.Input?.size||`medium`}}),{mergedSizeRef:I,mergedDisabledRef:R,mergedStatusRef:z}=P,B=u(!1),V=u(!1),H=u(!1),U=u(!1),W=null,G=l(()=>{let{placeholder:e,pair:t}=n;return t?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[j.value.placeholder]:[e]}),pe=l(()=>{let{value:e}=H,{value:t}=N,{value:n}=G;return!e&&(L(t)||Array.isArray(t)&&L(t[0]))&&n[0]}),me=l(()=>{let{value:e}=H,{value:t}=N,{value:n}=G;return!e&&n[1]&&(L(t)||Array.isArray(t)&&L(t[1]))}),he=le(()=>n.internalForceFocus||B.value),ge=le(()=>{if(R.value||n.readonly||!n.clearable||!he.value&&!V.value)return!1;let{value:e}=N,{value:t}=he;return n.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(V.value||t):!!e&&(V.value||t)}),K=l(()=>{let{showPasswordOn:e}=n;if(e)return e;if(n.showPasswordToggle)return`click`}),q=u(!1),_e=l(()=>{let{textDecoration:e}=n;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),ve=u(void 0),ye=()=>{if(n.type===`textarea`){let{autosize:e}=n;if(e&&(ve.value=A.value?.$el?.offsetWidth),!g.value||typeof e==`boolean`)return;let{paddingTop:t,paddingBottom:r,lineHeight:i}=window.getComputedStyle(g.value),a=Number(t.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=b;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},be=l(()=>{let{maxlength:e}=n;return e===void 0?void 0:Number(e)});o(()=>{let{value:e}=N;Array.isArray(e)||$(e)});let xe=e().proxy;function J(e,t){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=n,{nTriggerFormInput:o}=P;r&&k(r,e,t),i&&k(i,e,t),a&&k(a,e,t),M.value=e,o()}function Y(e,t){let{onChange:r}=n,{nTriggerFormChange:i}=P;r&&k(r,e,t),M.value=e,i()}function Se(e){let{onBlur:t}=n,{nTriggerFormBlur:r}=P;t&&k(t,e),r()}function Ce(e){let{onFocus:t}=n,{nTriggerFormFocus:r}=P;t&&k(t,e),r()}function we(e){let{onClear:t}=n;t&&k(t,e)}function Te(e){let{onInputBlur:t}=n;t&&k(t,e)}function Ee(e){let{onInputFocus:t}=n;t&&k(t,e)}function De(){let{onDeactivate:e}=n;e&&k(e)}function Oe(){let{onActivate:e}=n;e&&k(e)}function ke(e){let{onClick:t}=n;t&&k(t,e)}function Ae(e){let{onWrapperFocus:t}=n;t&&k(t,e)}function je(e){let{onWrapperBlur:t}=n;t&&k(t,e)}function Me(){H.value=!0}function Ne(e){H.value=!1,e.target===E.value?X(e,1):X(e,0)}function X(e,t=0,r=`input`){let a=e.target.value;if($(a),e instanceof InputEvent&&!e.isComposing&&(H.value=!1),n.type===`textarea`){let{value:e}=A;e&&e.syncUnifiedContainer()}if(W=a,H.value)return;O.recordCursor();let o=Pe(a);if(o)if(!n.pair)r===`input`?J(a,{source:t}):Y(a,{source:t});else{let{value:e}=N;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[t]=a,r===`input`?J(e,{source:t}):Y(e,{source:t})}xe.$forceUpdate(),o||i(O.restoreCursor)}function Pe(e){let{countGraphemes:t,maxlength:r,minlength:i}=n;if(t){let n;if(r!==void 0&&(n===void 0&&(n=t(e)),n>Number(r))||i!==void 0&&(n===void 0&&(n=t(e)),n{e.preventDefault(),T(`mouseup`,document,t)};if(C(`mouseup`,document,t),K.value!==`mousedown`)return;q.value=!0;let n=()=>{q.value=!1,T(`mouseup`,document,n)};C(`mouseup`,document,n)}function Je(e){n.onKeyup&&k(n.onKeyup,e)}function Ye(e){switch(n.onKeydown&&k(n.onKeydown,e),e.key){case`Escape`:Q();break;case`Enter`:Xe(e);break}}function Xe(e){var t,r;if(n.passivelyActivated){let{value:i}=U;if(i){n.internalDeactivateOnEnter&&Q();return}e.preventDefault(),n.type===`textarea`?(t=g.value)==null||t.focus():(r=w.value)==null||r.focus()}}function Q(){n.passivelyActivated&&(U.value=!1,i(()=>{var e;(e=h.value)==null||e.focus()}))}function Ze(){var e,t,r;R.value||(n.passivelyActivated?(e=h.value)==null||e.focus():((t=g.value)==null||t.focus(),(r=w.value)==null||r.focus()))}function Qe(){h.value?.contains(document.activeElement)&&document.activeElement.blur()}function $e(){var e,t;(e=g.value)==null||e.select(),(t=w.value)==null||t.select()}function et(){R.value||(g.value?g.value.focus():w.value&&w.value.focus())}function tt(){let{value:e}=h;e?.contains(document.activeElement)&&e!==document.activeElement&&Q()}function nt(e){if(n.type===`textarea`){let{value:t}=g;t?.scrollTo(e)}else{let{value:t}=w;t?.scrollTo(e)}}function $(e){let{type:t,pair:r,autosize:i}=n;if(!r&&i)if(t===`textarea`){let{value:t}=b;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=S;t&&(e?t.textContent=e:t.innerHTML=` `)}}function rt(){ye()}let it=u({top:`0`});function at(e){var t;let{scrollTop:n}=e.target;it.value.top=`${-n}px`,(t=A.value)==null||t.syncUnifiedContainer()}let ot=null;v(()=>{let{autosize:e,type:t}=n;e&&t===`textarea`?ot=m(N,e=>{!Array.isArray(e)&&e!==W&&$(e)}):ot?.()});let st=null;v(()=>{n.type===`textarea`?st=m(N,e=>{var t;!Array.isArray(e)&&e!==W&&((t=A.value)==null||t.syncUnifiedContainer())}):st?.()}),ne(F,{mergedValueRef:N,maxlengthRef:be,mergedClsPrefixRef:r,countGraphemesRef:x(n,`countGraphemes`)});let ct={wrapperElRef:h,inputElRef:w,textareaElRef:g,isCompositing:H,clear:He,focus:Ze,blur:Qe,select:$e,deactivate:tt,activate:et,scrollTo:nt},lt=ee(`Input`,d,r),ut=l(()=>{let{value:e}=I,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:s,textDecorationColor:c,border:l,borderDisabled:ee,borderHover:u,borderFocus:d,placeholderColor:f,placeholderColorDisabled:te,lineHeightTextarea:m,colorDisabled:h,colorFocus:g,textColorDisabled:_,boxShadowFocus:ne,iconSize:v,colorFocusWarning:b,boxShadowFocusWarning:x,borderWarning:S,borderFocusWarning:C,borderHoverWarning:w,colorFocusError:T,boxShadowFocusError:ie,borderError:E,borderFocusError:D,borderHoverError:ae,clearSize:oe,clearColor:O,clearColorHover:k,clearColorPressed:A,iconColor:j,iconColorDisabled:se,suffixTextColor:M,countTextColor:ce,countTextColorDisabled:le,iconColorHover:N,iconColorPressed:P,loadingColor:F,loadingColorError:ue,loadingColorWarning:de,fontWeight:L,[y(`padding`,e)]:fe,[y(`fontSize`,e)]:R,[y(`height`,e)]:z}}=p.value,{left:B,right:V}=re(fe);return{"--n-bezier":t,"--n-count-text-color":ce,"--n-count-text-color-disabled":le,"--n-color":n,"--n-font-size":R,"--n-font-weight":L,"--n-border-radius":r,"--n-height":z,"--n-padding-left":B,"--n-padding-right":V,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":l,"--n-border-disabled":ee,"--n-border-hover":u,"--n-border-focus":d,"--n-placeholder-color":f,"--n-placeholder-color-disabled":te,"--n-icon-size":v,"--n-line-height-textarea":m,"--n-color-disabled":h,"--n-color-focus":g,"--n-text-color-disabled":_,"--n-box-shadow-focus":ne,"--n-loading-color":F,"--n-caret-color-warning":s,"--n-color-focus-warning":b,"--n-box-shadow-focus-warning":x,"--n-border-warning":S,"--n-border-focus-warning":C,"--n-border-hover-warning":w,"--n-loading-color-warning":de,"--n-caret-color-error":o,"--n-color-focus-error":T,"--n-box-shadow-focus-error":ie,"--n-border-error":E,"--n-border-focus-error":D,"--n-border-hover-error":ae,"--n-loading-color-error":ue,"--n-clear-color":O,"--n-clear-size":oe,"--n-clear-color-hover":k,"--n-clear-color-pressed":A,"--n-icon-color":j,"--n-icon-color-hover":N,"--n-icon-color-pressed":P,"--n-icon-color-disabled":se,"--n-suffix-text-color":M}}),dt=c?t(`input`,l(()=>{let{value:e}=I;return e[0]}),ut,n):void 0;return Object.assign(Object.assign({},ct),{wrapperElRef:h,inputElRef:w,inputMirrorElRef:S,inputEl2Ref:E,textareaElRef:g,textareaMirrorElRef:b,textareaScrollbarInstRef:A,rtlEnabled:lt,uncontrolledValue:M,mergedValue:N,passwordVisible:q,mergedPlaceholder:G,showPlaceholder1:pe,showPlaceholder2:me,mergedFocus:he,isComposing:H,activated:U,showClearButton:ge,mergedSize:I,mergedDisabled:R,textDecorationStyle:_e,mergedClsPrefix:r,mergedBordered:s,mergedShowPasswordOn:K,placeholderStyle:it,mergedStatus:z,textAreaScrollContainerWidth:ve,handleTextAreaScroll:at,handleCompositionStart:Me,handleCompositionEnd:Ne,handleInput:X,handleInputBlur:Fe,handleInputFocus:Ie,handleWrapperBlur:Le,handleWrapperFocus:Re,handleMouseEnter:We,handleMouseLeave:Ge,handleMouseDown:Ue,handleChange:ze,handleClick:Be,handleClear:Ve,handlePasswordToggleClick:Ke,handlePasswordToggleMousedown:qe,handleWrapperKeydown:Ye,handleWrapperKeyup:Je,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>g.value,mergedTheme:p,cssVars:c?void 0:ut,themeClass:dt?.themeClass,onRender:dt?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:r,type:i,countGraphemes:a,onRender:o}=this,s=this.$slots;return o?.(),n(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,r,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:i===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&i!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},n(`div`,{class:`${e}-input-wrapper`},j(s.prefix,t=>t&&n(`div`,{class:`${e}-input__prefix`},t)),i===`textarea`?n(w,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,r={width:this.autosize&&t&&`${t}px`};return n(d,null,n(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,r],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?n(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,r],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?n(S,{onResize:this.handleTextAreaMirrorResize},{default:()=>n(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):n(`div`,{class:`${e}-input__input`},n(`input`,Object.assign({type:i===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:i},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?n(`div`,{class:`${e}-input__placeholder`},n(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?n(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&j(s.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?n(`div`,{class:`${e}-input__suffix`},[j(s[`clear-icon-placeholder`],t=>(this.clearable||t)&&n(E,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:n(D,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?n(R,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?n(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?A(s[`password-visible-icon`],()=>[n(M,{clsPrefix:e},{default:()=>n(N,null)})]):A(s[`password-invisible-icon`],()=>[n(M,{clsPrefix:e},{default:()=>n(P,null)})])):null]):null)),this.pair?n(`span`,{class:`${e}-input__separator`},A(s.separator,()=>[this.separator])):null,this.pair?n(`div`,{class:`${e}-input-wrapper`},n(`div`,{class:`${e}-input__input`},n(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?n(`div`,{class:`${e}-input__placeholder`},n(`span`,null,this.mergedPlaceholder[1])):null),j(s.suffix,t=>(this.clearable||t)&&n(`div`,{class:`${e}-input__suffix`},[this.clearable&&n(E,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>s[`clear-icon`]?.call(s),placeholder:()=>s[`clear-icon-placeholder`]?.call(s)}),t]))):null,this.mergedBordered?n(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?n(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&i===`textarea`?n(R,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null)}});export{N as n,z as t}; \ No newline at end of file diff --git a/frontend/dist/assets/LoginView-BMrgeJuj.js b/frontend/dist/assets/LoginView-Bp9RClQt.js similarity index 88% rename from frontend/dist/assets/LoginView-BMrgeJuj.js rename to frontend/dist/assets/LoginView-Bp9RClQt.js index c142442..195cb09 100644 --- a/frontend/dist/assets/LoginView-BMrgeJuj.js +++ b/frontend/dist/assets/LoginView-Bp9RClQt.js @@ -1,4 +1,4 @@ -import{Dt as e,H as t,Kt as n,Mt as r,Ot as i,Pt as a,U as o,Y as s,an as c,at as l,bn as u,bt as d,ct as f,g as p,hn as m,ht as h,in as g,it as _,kt as v,lt as y,nt as b,p as x,qt as S,st as C,tt as w,u as T,vn as E,wt as D,xt as O}from"./client-Bz0sY7Lm.js";import{a as k,i as A,o as j,t as M}from"./Follower-C1zQmxY2.js";import{a as N,s as ee,t as te}from"./utils-Bog0tJH6.js";import{d as P,f as ne,t as F}from"./Card-D1LVu21r.js";import{n as I}from"./es-BhJOHfSF.js";import{d as L,m as R,n as z}from"./Suffix-JLavbuLO.js";import{t as B}from"./use-merged-state-z45UzW9G.js";import{t as V}from"./Button-lcMg8vK2.js";import{n as H,t as U}from"./Tabs-BuPkDDy2.js";import{o as W,s as G,t as K}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as q}from"./use-form-item-Bl3X3aXB.js";import{t as J}from"./Input-DeqNzuJd.js";import{t as Y}from"./Space-Ka5Z-MRX.js";import{$ as re,B as ie,D as ae,K as oe,T as se,et as ce,it as le,o as ue,tt as de}from"./index-6B3OmSLg.js";import{t as fe}from"./HeaderMenu-BhocR0ua.js";var pe=w([b(`auto-complete`,` +import{Dt as e,H as t,Kt as n,Mt as r,Ot as i,Pt as a,U as o,Y as s,an as c,at as l,bn as u,bt as d,ct as f,g as p,hn as m,ht as h,in as g,it as _,kt as v,lt as y,nt as b,p as x,qt as S,st as C,tt as w,u as T,vn as E,wt as D,xt as O}from"./client-Bz0sY7Lm.js";import{a as k,i as A,o as j,t as M}from"./Follower-BaR8jvSz.js";import{a as N,s as ee,t as te}from"./utils-Dcx6g1AV.js";import{d as P,f as ne,t as F}from"./Card-BGJkYb2B.js";import{n as I}from"./es-Qklex053.js";import{d as L,m as R,n as z}from"./Suffix-BBRLYxYK.js";import{t as B}from"./use-merged-state-z45UzW9G.js";import{t as V}from"./Button-MBUKfT_Z.js";import{n as H,t as U}from"./Tabs-BaVejAu8.js";import{c as W,o as G,t as K}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as q}from"./use-form-item-Bl3X3aXB.js";import{t as J}from"./Input-CEIE7mTC.js";import{t as Y}from"./Space-CstX9TL6.js";import{E as re,O as ie,V as ae,at as oe,et as se,nt as ce,o as le,q as ue,tt as de}from"./index-NE0dsiiJ.js";import{t as fe}from"./HeaderMenu-vnmT21Il.js";var pe=w([b(`auto-complete`,` z-index: auto; position: relative; display: inline-flex; @@ -6,7 +6,7 @@ import{Dt as e,H as t,Kt as n,Mt as r,Ot as i,Pt as a,U as o,Y as s,an as c,at a `),b(`auto-complete-menu`,` margin: 4px 0; box-shadow: var(--n-menu-box-shadow); - `,[z({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]);function me(e){return e.map(X)}function X(e){return typeof e==`string`?{label:e,value:e}:e.type===`group`?{type:`group`,label:e.label??e.name,value:e.value??e.name,key:e.key||e.name,children:e.children.map(e=>X(e))}:e}var Z=v({name:`AutoComplete`,props:Object.assign(Object.assign({},x.props),{to:j.propTo,menuProps:Object,append:Boolean,bordered:{type:Boolean,default:void 0},clearable:{type:Boolean,default:void 0},defaultValue:{type:String,default:null},loading:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},placeholder:String,placement:{type:String,default:`bottom-start`},value:String,blurAfterSelect:Boolean,clearAfterSelect:Boolean,getShow:Function,showEmpty:Boolean,inputProps:Object,renderOption:Function,renderLabel:Function,size:String,options:{type:Array,default:()=>[]},zIndex:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onSelect:[Function,Array],onBlur:[Function,Array],onFocus:[Function,Array],scrollbarProps:Object,onInput:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:n,namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a,mergedComponentPropsRef:s}=o(e),c=q(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:s?.value?.AutoComplete?.size||`medium`}}),{mergedSizeRef:l,mergedDisabledRef:u,mergedStatusRef:f}=c,p=m(null),h=m(null),g=m(e.defaultValue),_=B(E(e,`value`),g),v=m(!1),y=m(!1),b=x(`AutoComplete`,`-auto-complete`,pe,ae,e,i),S=d(()=>me(e.options)),C=d(()=>{let{getShow:t}=e;return t?t(_.value||``):!!_.value}),w=d(()=>C.value&&v.value&&(e.showEmpty?!0:!!S.value.length)),T=d(()=>ee(S.value,te(`value`,`children`)));function D(t){let{"onUpdate:value":n,onUpdateValue:r,onInput:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=c;r&&G(r,t),n&&G(n,t),i&&G(i,t),g.value=t,a(),o()}function O(t){let{onSelect:n}=e,{nTriggerFormInput:r,nTriggerFormChange:i}=c;n&&G(n,t),r(),i()}function k(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=c;n&&G(n,t),r()}function A(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=c;n&&G(n,t),r()}function M(){y.value=!0}function N(){window.setTimeout(()=>{y.value=!1},0)}function P(e){var t,n;switch(e.key){case`Enter`:if(!y.value){let t=h.value?.getPendingTmNode();t&&(F(t.rawNode),e.preventDefault())}break;case`ArrowDown`:(t=h.value)==null||t.next();break;case`ArrowUp`:(n=h.value)==null||n.prev();break}}function F(t){t?.value!==void 0&&(O(t.value),e.clearAfterSelect?D(null):t.label!==void 0&&D(e.append?`${_.value}${t.label}`:t.label),v.value=!1,e.blurAfterSelect&&U())}function I(){D(null)}function L(e){v.value=!0,A(e)}function R(e){v.value=!1,k(e)}function z(e){v.value=!0,D(e)}function V(e){F(e.rawNode)}function H(e){p.value?.contains(ne(e))||(v.value=!1)}function U(){var e;p.value?.contains(document.activeElement)&&((e=document.activeElement)==null||e.blur())}let W=d(()=>{let{common:{cubicBezierEaseInOut:e},self:{menuBoxShadow:t}}=b.value;return{"--n-menu-box-shadow":t,"--n-bezier":e}}),K=a?t(`auto-complete`,void 0,W,e):void 0,J=m(null),Y={focus:()=>{var e;(e=J.value)==null||e.focus()},blur:()=>{var e;(e=J.value)==null||e.blur()}};return{focus:Y.focus,blur:Y.blur,inputInstRef:J,uncontrolledValue:g,mergedValue:_,isMounted:re(),adjustedTo:j(e),menuInstRef:h,triggerElRef:p,treeMate:T,mergedSize:l,mergedDisabled:u,active:w,mergedStatus:f,handleClear:I,handleFocus:L,handleBlur:R,handleInput:z,handleToggle:V,handleClickOutsideMenu:H,handleCompositionStart:M,handleCompositionEnd:N,handleKeyDown:P,mergedTheme:b,cssVars:a?void 0:W,themeClass:K?.themeClass,onRender:K?.onRender,mergedBordered:n,namespace:r,mergedClsPrefix:i}},render(){let{mergedClsPrefix:e}=this;return r(`div`,{class:`${e}-auto-complete`,ref:`triggerElRef`,onKeydown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd},r(k,null,{default:()=>[r(A,null,{default:()=>{let e=this.$slots.default;if(e)return L(`default`,e,{handleInput:this.handleInput,handleFocus:this.handleFocus,handleBlur:this.handleBlur,value:this.mergedValue});let{mergedTheme:t}=this;return r(J,{ref:`inputInstRef`,status:this.mergedStatus,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,bordered:this.mergedBordered,value:this.mergedValue,placeholder:this.placeholder,size:this.mergedSize,disabled:this.mergedDisabled,clearable:this.clearable,loading:this.loading,inputProps:this.inputProps,onClear:this.handleClear,onFocus:this.handleFocus,onUpdateValue:this.handleInput,onBlur:this.handleBlur},{suffix:()=>{var e;return(e=this.$slots).suffix?.call(e)},prefix:()=>{var e;return(e=this.$slots).prefix?.call(e)}})}}),r(M,{show:this.active,to:this.adjustedTo,containerClass:this.namespace,zIndex:this.zIndex,teleportDisabled:this.adjustedTo===j.tdkey,placement:this.placement,width:`target`},{default:()=>r(le,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>{var t;if((t=this.onRender)==null||t.call(this),!this.active)return null;let{menuProps:n}=this;return c(r(N,Object.assign({},n,{clsPrefix:e,ref:`menuInstRef`,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,"auto-pending":!0,class:[`${e}-auto-complete-menu`,this.themeClass,n?.class],style:[n?.style,this.cssVars],treeMate:this.treeMate,multiple:!1,renderLabel:this.renderLabel,renderOption:this.renderOption,size:`medium`,onToggle:this.handleToggle,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return(e=this.$slots).empty?.call(e)}}),[[R,this.handleClickOutsideMenu,void 0,{capture:!0}]])}})})]}))}}),Q=s(`n-checkbox-group`);v({name:`CheckboxGroup`,props:{min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]},setup(e){let{mergedClsPrefixRef:t}=o(e),n=q(e),{mergedSizeRef:r,mergedDisabledRef:i}=n,a=m(e.defaultValue),s=B(d(()=>e.value),a),c=d(()=>s.value?.length||0),l=d(()=>Array.isArray(s.value)?new Set(s.value):new Set);function u(t,r){let{nTriggerFormInput:i,nTriggerFormChange:o}=n,{onChange:c,"onUpdate:value":l,onUpdateValue:u}=e;if(Array.isArray(s.value)){let e=Array.from(s.value),n=e.findIndex(e=>e===r);t?~n||(e.push(r),u&&G(u,e,{actionType:`check`,value:r}),l&&G(l,e,{actionType:`check`,value:r}),i(),o(),a.value=e,c&&G(c,e)):~n&&(e.splice(n,1),u&&G(u,e,{actionType:`uncheck`,value:r}),l&&G(l,e,{actionType:`uncheck`,value:r}),c&&G(c,e),a.value=e,i(),o())}else t?(u&&G(u,[r],{actionType:`check`,value:r}),l&&G(l,[r],{actionType:`check`,value:r}),c&&G(c,[r]),a.value=[r],i(),o()):(u&&G(u,[],{actionType:`uncheck`,value:r}),l&&G(l,[],{actionType:`uncheck`,value:r}),c&&G(c,[]),a.value=[],i(),o())}return S(Q,{checkedCountRef:c,maxRef:E(e,`max`),minRef:E(e,`min`),valueSetRef:l,disabledRef:i,mergedSizeRef:r,toggleCheckbox:u}),{mergedClsPrefix:t}},render(){return r(`div`,{class:`${this.mergedClsPrefix}-checkbox-group`,role:`group`},this.$slots)}});var he=()=>r(`svg`,{viewBox:`0 0 64 64`,class:`check-icon`},r(`path`,{d:`M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z`})),ge=()=>r(`svg`,{viewBox:`0 0 100 100`,class:`line-icon`},r(`path`,{d:`M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z`})),_e=w([b(`checkbox`,` + `,[z({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]);function me(e){return e.map(X)}function X(e){return typeof e==`string`?{label:e,value:e}:e.type===`group`?{type:`group`,label:e.label??e.name,value:e.value??e.name,key:e.key||e.name,children:e.children.map(e=>X(e))}:e}var Z=v({name:`AutoComplete`,props:Object.assign(Object.assign({},x.props),{to:j.propTo,menuProps:Object,append:Boolean,bordered:{type:Boolean,default:void 0},clearable:{type:Boolean,default:void 0},defaultValue:{type:String,default:null},loading:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},placeholder:String,placement:{type:String,default:`bottom-start`},value:String,blurAfterSelect:Boolean,clearAfterSelect:Boolean,getShow:Function,showEmpty:Boolean,inputProps:Object,renderOption:Function,renderLabel:Function,size:String,options:{type:Array,default:()=>[]},zIndex:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onSelect:[Function,Array],onBlur:[Function,Array],onFocus:[Function,Array],scrollbarProps:Object,onInput:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:n,namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a,mergedComponentPropsRef:s}=o(e),c=q(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:s?.value?.AutoComplete?.size||`medium`}}),{mergedSizeRef:l,mergedDisabledRef:u,mergedStatusRef:f}=c,p=m(null),h=m(null),g=m(e.defaultValue),_=B(E(e,`value`),g),v=m(!1),y=m(!1),b=x(`AutoComplete`,`-auto-complete`,pe,ie,e,i),S=d(()=>me(e.options)),C=d(()=>{let{getShow:t}=e;return t?t(_.value||``):!!_.value}),w=d(()=>C.value&&v.value&&(e.showEmpty?!0:!!S.value.length)),T=d(()=>ee(S.value,te(`value`,`children`)));function D(t){let{"onUpdate:value":n,onUpdateValue:r,onInput:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=c;r&&W(r,t),n&&W(n,t),i&&W(i,t),g.value=t,a(),o()}function O(t){let{onSelect:n}=e,{nTriggerFormInput:r,nTriggerFormChange:i}=c;n&&W(n,t),r(),i()}function k(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=c;n&&W(n,t),r()}function A(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=c;n&&W(n,t),r()}function M(){y.value=!0}function N(){window.setTimeout(()=>{y.value=!1},0)}function P(e){var t,n;switch(e.key){case`Enter`:if(!y.value){let t=h.value?.getPendingTmNode();t&&(F(t.rawNode),e.preventDefault())}break;case`ArrowDown`:(t=h.value)==null||t.next();break;case`ArrowUp`:(n=h.value)==null||n.prev();break}}function F(t){t?.value!==void 0&&(O(t.value),e.clearAfterSelect?D(null):t.label!==void 0&&D(e.append?`${_.value}${t.label}`:t.label),v.value=!1,e.blurAfterSelect&&U())}function I(){D(null)}function L(e){v.value=!0,A(e)}function R(e){v.value=!1,k(e)}function z(e){v.value=!0,D(e)}function V(e){F(e.rawNode)}function H(e){p.value?.contains(ne(e))||(v.value=!1)}function U(){var e;p.value?.contains(document.activeElement)&&((e=document.activeElement)==null||e.blur())}let G=d(()=>{let{common:{cubicBezierEaseInOut:e},self:{menuBoxShadow:t}}=b.value;return{"--n-menu-box-shadow":t,"--n-bezier":e}}),K=a?t(`auto-complete`,void 0,G,e):void 0,J=m(null),Y={focus:()=>{var e;(e=J.value)==null||e.focus()},blur:()=>{var e;(e=J.value)==null||e.blur()}};return{focus:Y.focus,blur:Y.blur,inputInstRef:J,uncontrolledValue:g,mergedValue:_,isMounted:se(),adjustedTo:j(e),menuInstRef:h,triggerElRef:p,treeMate:T,mergedSize:l,mergedDisabled:u,active:w,mergedStatus:f,handleClear:I,handleFocus:L,handleBlur:R,handleInput:z,handleToggle:V,handleClickOutsideMenu:H,handleCompositionStart:M,handleCompositionEnd:N,handleKeyDown:P,mergedTheme:b,cssVars:a?void 0:G,themeClass:K?.themeClass,onRender:K?.onRender,mergedBordered:n,namespace:r,mergedClsPrefix:i}},render(){let{mergedClsPrefix:e}=this;return r(`div`,{class:`${e}-auto-complete`,ref:`triggerElRef`,onKeydown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd},r(k,null,{default:()=>[r(A,null,{default:()=>{let e=this.$slots.default;if(e)return L(`default`,e,{handleInput:this.handleInput,handleFocus:this.handleFocus,handleBlur:this.handleBlur,value:this.mergedValue});let{mergedTheme:t}=this;return r(J,{ref:`inputInstRef`,status:this.mergedStatus,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,bordered:this.mergedBordered,value:this.mergedValue,placeholder:this.placeholder,size:this.mergedSize,disabled:this.mergedDisabled,clearable:this.clearable,loading:this.loading,inputProps:this.inputProps,onClear:this.handleClear,onFocus:this.handleFocus,onUpdateValue:this.handleInput,onBlur:this.handleBlur},{suffix:()=>{var e;return(e=this.$slots).suffix?.call(e)},prefix:()=>{var e;return(e=this.$slots).prefix?.call(e)}})}}),r(M,{show:this.active,to:this.adjustedTo,containerClass:this.namespace,zIndex:this.zIndex,teleportDisabled:this.adjustedTo===j.tdkey,placement:this.placement,width:`target`},{default:()=>r(oe,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>{var t;if((t=this.onRender)==null||t.call(this),!this.active)return null;let{menuProps:n}=this;return c(r(N,Object.assign({},n,{clsPrefix:e,ref:`menuInstRef`,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,"auto-pending":!0,class:[`${e}-auto-complete-menu`,this.themeClass,n?.class],style:[n?.style,this.cssVars],treeMate:this.treeMate,multiple:!1,renderLabel:this.renderLabel,renderOption:this.renderOption,size:`medium`,onToggle:this.handleToggle,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return(e=this.$slots).empty?.call(e)}}),[[R,this.handleClickOutsideMenu,void 0,{capture:!0}]])}})})]}))}}),Q=s(`n-checkbox-group`);v({name:`CheckboxGroup`,props:{min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]},setup(e){let{mergedClsPrefixRef:t}=o(e),n=q(e),{mergedSizeRef:r,mergedDisabledRef:i}=n,a=m(e.defaultValue),s=B(d(()=>e.value),a),c=d(()=>s.value?.length||0),l=d(()=>Array.isArray(s.value)?new Set(s.value):new Set);function u(t,r){let{nTriggerFormInput:i,nTriggerFormChange:o}=n,{onChange:c,"onUpdate:value":l,onUpdateValue:u}=e;if(Array.isArray(s.value)){let e=Array.from(s.value),n=e.findIndex(e=>e===r);t?~n||(e.push(r),u&&W(u,e,{actionType:`check`,value:r}),l&&W(l,e,{actionType:`check`,value:r}),i(),o(),a.value=e,c&&W(c,e)):~n&&(e.splice(n,1),u&&W(u,e,{actionType:`uncheck`,value:r}),l&&W(l,e,{actionType:`uncheck`,value:r}),c&&W(c,e),a.value=e,i(),o())}else t?(u&&W(u,[r],{actionType:`check`,value:r}),l&&W(l,[r],{actionType:`check`,value:r}),c&&W(c,[r]),a.value=[r],i(),o()):(u&&W(u,[],{actionType:`uncheck`,value:r}),l&&W(l,[],{actionType:`uncheck`,value:r}),c&&W(c,[]),a.value=[],i(),o())}return S(Q,{checkedCountRef:c,maxRef:E(e,`max`),minRef:E(e,`min`),valueSetRef:l,disabledRef:i,mergedSizeRef:r,toggleCheckbox:u}),{mergedClsPrefix:t}},render(){return r(`div`,{class:`${this.mergedClsPrefix}-checkbox-group`,role:`group`},this.$slots)}});var he=()=>r(`svg`,{viewBox:`0 0 64 64`,class:`check-icon`},r(`path`,{d:`M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z`})),ge=()=>r(`svg`,{viewBox:`0 0 100 100`,class:`line-icon`},r(`path`,{d:`M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z`})),_e=w([b(`checkbox`,` font-size: var(--n-font-size); outline: none; cursor: pointer; @@ -99,7 +99,7 @@ import{Dt as e,H as t,Kt as n,Mt as r,Ot as i,Pt as a,U as o,Y as s,an as c,at a transform 0.3s var(--n-bezier), opacity 0.3s var(--n-bezier), border-color 0.3s var(--n-bezier); - `),ie({left:`1px`,top:`1px`})])]),_(`label`,` + `),ae({left:`1px`,top:`1px`})])]),_(`label`,` color: var(--n-text-color); transition: color .3s var(--n-bezier); user-select: none; @@ -110,4 +110,4 @@ import{Dt as e,H as t,Kt as n,Mt as r,Ot as i,Pt as a,U as o,Y as s,an as c,at a --n-merged-color-table: var(--n-color-table-modal); `)),y(b(`checkbox`,` --n-merged-color-table: var(--n-color-table-popover); - `))]),$=v({name:`Checkbox`,props:Object.assign(Object.assign({},x.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),setup(e){let n=a(Q,null),r=m(null),{mergedClsPrefixRef:i,inlineThemeDisabled:s,mergedRtlRef:c,mergedComponentPropsRef:l}=o(e),u=m(e.defaultChecked),f=B(E(e,`checked`),u),h=ce(()=>{if(n){let t=n.valueSetRef.value;return t&&e.value!==void 0?t.has(e.value):!1}else return f.value===e.checkedValue}),g=q(e,{mergedSize(t){let{size:r}=e;if(r!==void 0)return r;if(n){let{value:e}=n.mergedSizeRef;if(e!==void 0)return e}if(t){let{mergedSize:e}=t;if(e!==void 0)return e.value}return l?.value?.Checkbox?.size||`medium`},mergedDisabled(t){let{disabled:r}=e;if(r!==void 0)return r;if(n){if(n.disabledRef.value)return!0;let{maxRef:{value:e},checkedCountRef:t}=n;if(e!==void 0&&t.value>=e&&!h.value)return!0;let{minRef:{value:r}}=n;if(r!==void 0&&t.value<=r&&h.value)return!0}return t?t.disabled.value:!1}}),{mergedDisabledRef:_,mergedSizeRef:v}=g,y=x(`Checkbox`,`-checkbox`,_e,se,e,i);function b(t){if(n&&e.value!==void 0)n.toggleCheckbox(!h.value,e.value);else{let{onChange:n,"onUpdate:checked":r,onUpdateChecked:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=g,s=h.value?e.uncheckedValue:e.checkedValue;r&&G(r,s,t),i&&G(i,s,t),n&&G(n,s,t),a(),o(),u.value=s}}function S(e){_.value||b(e)}function w(e){if(!_.value)switch(e.key){case` `:case`Enter`:b(e)}}function T(e){switch(e.key){case` `:e.preventDefault()}}let D={focus:()=>{var e;(e=r.value)==null||e.focus()},blur:()=>{var e;(e=r.value)==null||e.blur()}},O=p(`Checkbox`,c,i),k=d(()=>{let{value:e}=v,{common:{cubicBezierEaseInOut:t},self:{borderRadius:n,color:r,colorChecked:i,colorDisabled:a,colorTableHeader:o,colorTableHeaderModal:s,colorTableHeaderPopover:c,checkMarkColor:l,checkMarkColorDisabled:u,border:d,borderFocus:f,borderDisabled:p,borderChecked:m,boxShadowFocus:h,textColor:g,textColorDisabled:_,checkMarkColorDisabledChecked:b,colorDisabledChecked:x,borderDisabledChecked:S,labelPadding:w,labelLineHeight:T,labelFontWeight:E,[C(`fontSize`,e)]:D,[C(`size`,e)]:O}}=y.value;return{"--n-label-line-height":T,"--n-label-font-weight":E,"--n-size":O,"--n-bezier":t,"--n-border-radius":n,"--n-border":d,"--n-border-checked":m,"--n-border-focus":f,"--n-border-disabled":p,"--n-border-disabled-checked":S,"--n-box-shadow-focus":h,"--n-color":r,"--n-color-checked":i,"--n-color-table":o,"--n-color-table-modal":s,"--n-color-table-popover":c,"--n-color-disabled":a,"--n-color-disabled-checked":x,"--n-text-color":g,"--n-text-color-disabled":_,"--n-check-mark-color":l,"--n-check-mark-color-disabled":u,"--n-check-mark-color-disabled-checked":b,"--n-font-size":D,"--n-label-padding":w}}),A=s?t(`checkbox`,d(()=>v.value[0]),k,e):void 0;return Object.assign(g,D,{rtlEnabled:O,selfRef:r,mergedClsPrefix:i,mergedDisabled:_,renderedChecked:h,mergedTheme:y,labelId:de(),handleClick:S,handleKeyUp:w,handleKeyDown:T,cssVars:s?void 0:k,themeClass:A?.themeClass,onRender:A?.onRender})},render(){var e;let{$slots:t,renderedChecked:n,mergedDisabled:i,indeterminate:a,privateInsideTable:o,cssVars:s,labelId:c,label:l,mergedClsPrefix:u,focusable:d,handleKeyUp:f,handleKeyDown:p,handleClick:m}=this;(e=this.onRender)==null||e.call(this);let h=W(t.default,e=>l||e?r(`span`,{class:`${u}-checkbox__label`,id:c},l||e):null);return r(`div`,{ref:`selfRef`,class:[`${u}-checkbox`,this.themeClass,this.rtlEnabled&&`${u}-checkbox--rtl`,n&&`${u}-checkbox--checked`,i&&`${u}-checkbox--disabled`,a&&`${u}-checkbox--indeterminate`,o&&`${u}-checkbox--inside-table`,h&&`${u}-checkbox--show-label`],tabindex:i||!d?void 0:0,role:`checkbox`,"aria-checked":a?`mixed`:n,"aria-labelledby":c,style:s,onKeyup:f,onKeydown:p,onClick:m,onMousedown:()=>{P(`selectstart`,window,e=>{e.preventDefault()},{once:!0})}},r(`div`,{class:`${u}-checkbox-box-wrapper`},`\xA0`,r(`div`,{class:`${u}-checkbox-box`},r(oe,null,{default:()=>this.indeterminate?r(`div`,{key:`indeterminate`,class:`${u}-checkbox-icon`},ge()):r(`div`,{key:`check`,class:`${u}-checkbox-icon`},he())}),r(`div`,{class:`${u}-checkbox-box__border`}))),h)}}),ve={class:`center-block-custom content-block center-middle-block-custom height80`},ye={class:`form-button-wrapper`},be={class:`form-label`},xe={key:0},Se={key:1},Ce={class:`form-label`},we={class:`form-label`},Te={class:`form-button-wrapper`},Ee={class:`form-label`},De={key:0},Oe={key:1},ke={class:`form-button-wrapper`},Ae={class:`form-label`},je={key:0},Me={key:1},Ne=K(v({__name:`LoginPage`,setup(t){let r=ue(),a=T(),o=I(),s=m(``),c=m(``),l=m(``),f=m(!1),p=m(!1),h=d(()=>[`@mail.ru`,`@yandex.ru`,`@gmail.com`].map(e=>{let t=c.value.split(`@`)[0];return{label:t+e,value:t+e}}));async function _(){if(!await r.login(c.value,l.value)&&r.error!=null){o.error(r.error);return}a.push(`/office`)}async function v(){if(!(!f.value||!p.value)){if(!await r.signup(s.value,c.value,f.value,p.value)&&r.error!=null){o.error(r.error);return}o.info(`Пароль отправлен на почту`),f.value=!1,p.value=!1}}async function y(){if(!await r.refreshPassword(c.value)&&r.error!=null){o.error(r.error);return}o.info(`Пароль отправлен на почту`)}return(t,a)=>(n(),D(`div`,ve,[i(u(F),{style:{"margin-bottom":`16px`},class:`sign-card`},{default:g(()=>[i(u(U),{type:`line`,animated:``},{default:g(()=>[i(u(H),{name:`signin`,tab:`Вход`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[7]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[0]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),a[8]||=O(`div`,{class:`form-label`},`Пароль`,-1),i(u(J),{value:l.value,"onUpdate:value":a[1]||=e=>l.value=e,type:`password`,"show-password-on":`click`,placeholder:`********`},null,8,[`value`]),O(`div`,ye,[O(`div`,be,[i(u(V),{onClick:_,disabled:c.value.length==0||l.value.length==0},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Se,` Подождите... `)):(n(),D(`span`,xe,` Вход `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),i(u(H),{name:`signup`,tab:`Регистрация`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[11]||=O(`div`,{class:`form-label`},`Позывной`,-1),i(u(J),{value:s.value,"onUpdate:value":a[2]||=e=>s.value=e,type:`text`,placeholder:`Шерлок`},null,8,[`value`]),a[12]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[3]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),O(`div`,Ce,[i(u($),{checked:f.value,"onUpdate:checked":a[4]||=e=>f.value=e},{default:g(()=>[...a[9]||=[e(` Я принимаю условия `,-1),O(`a`,{href:`/user-agreement`,target:`_blank`,class:`docs-link`},`пользовательского соглашения`,-1)]]),_:1},8,[`checked`])]),O(`div`,we,[i(u($),{checked:p.value,"onUpdate:checked":a[5]||=e=>p.value=e},{default:g(()=>[...a[10]||=[e(` Я даю согласие на обработку `,-1),O(`a`,{href:`/privacy-policy`,target:`_blank`,class:`docs-link`},`персональных данных`,-1)]]),_:1},8,[`checked`])]),O(`div`,Te,[O(`div`,Ee,[i(u(V),{onClick:v,disabled:s.value.length==0||c.value.length==0||!f.value||!p.value},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Oe,` Подождите... `)):(n(),D(`span`,De,` Регистрация `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),i(u(H),{name:`new-password`,tab:`Новый пароль`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[13]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[6]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),O(`div`,ke,[O(`div`,Ae,[i(u(V),{onClick:y,disabled:c.value.length==0},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Me,` Подождите... `)):(n(),D(`span`,je,` Прислать новый пароль `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),[[`__scopeId`,`data-v-e7ea0635`]]),Pe=v({__name:`LoginView`,setup(e){return(e,t)=>(n(),D(h,null,[i(Ne),i(fe)],64))}});export{Pe as default}; \ No newline at end of file + `))]),$=v({name:`Checkbox`,props:Object.assign(Object.assign({},x.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),setup(e){let n=a(Q,null),r=m(null),{mergedClsPrefixRef:i,inlineThemeDisabled:s,mergedRtlRef:c,mergedComponentPropsRef:l}=o(e),u=m(e.defaultChecked),f=B(E(e,`checked`),u),h=de(()=>{if(n){let t=n.valueSetRef.value;return t&&e.value!==void 0?t.has(e.value):!1}else return f.value===e.checkedValue}),g=q(e,{mergedSize(t){let{size:r}=e;if(r!==void 0)return r;if(n){let{value:e}=n.mergedSizeRef;if(e!==void 0)return e}if(t){let{mergedSize:e}=t;if(e!==void 0)return e.value}return l?.value?.Checkbox?.size||`medium`},mergedDisabled(t){let{disabled:r}=e;if(r!==void 0)return r;if(n){if(n.disabledRef.value)return!0;let{maxRef:{value:e},checkedCountRef:t}=n;if(e!==void 0&&t.value>=e&&!h.value)return!0;let{minRef:{value:r}}=n;if(r!==void 0&&t.value<=r&&h.value)return!0}return t?t.disabled.value:!1}}),{mergedDisabledRef:_,mergedSizeRef:v}=g,y=x(`Checkbox`,`-checkbox`,_e,re,e,i);function b(t){if(n&&e.value!==void 0)n.toggleCheckbox(!h.value,e.value);else{let{onChange:n,"onUpdate:checked":r,onUpdateChecked:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=g,s=h.value?e.uncheckedValue:e.checkedValue;r&&W(r,s,t),i&&W(i,s,t),n&&W(n,s,t),a(),o(),u.value=s}}function S(e){_.value||b(e)}function w(e){if(!_.value)switch(e.key){case` `:case`Enter`:b(e)}}function T(e){switch(e.key){case` `:e.preventDefault()}}let D={focus:()=>{var e;(e=r.value)==null||e.focus()},blur:()=>{var e;(e=r.value)==null||e.blur()}},O=p(`Checkbox`,c,i),k=d(()=>{let{value:e}=v,{common:{cubicBezierEaseInOut:t},self:{borderRadius:n,color:r,colorChecked:i,colorDisabled:a,colorTableHeader:o,colorTableHeaderModal:s,colorTableHeaderPopover:c,checkMarkColor:l,checkMarkColorDisabled:u,border:d,borderFocus:f,borderDisabled:p,borderChecked:m,boxShadowFocus:h,textColor:g,textColorDisabled:_,checkMarkColorDisabledChecked:b,colorDisabledChecked:x,borderDisabledChecked:S,labelPadding:w,labelLineHeight:T,labelFontWeight:E,[C(`fontSize`,e)]:D,[C(`size`,e)]:O}}=y.value;return{"--n-label-line-height":T,"--n-label-font-weight":E,"--n-size":O,"--n-bezier":t,"--n-border-radius":n,"--n-border":d,"--n-border-checked":m,"--n-border-focus":f,"--n-border-disabled":p,"--n-border-disabled-checked":S,"--n-box-shadow-focus":h,"--n-color":r,"--n-color-checked":i,"--n-color-table":o,"--n-color-table-modal":s,"--n-color-table-popover":c,"--n-color-disabled":a,"--n-color-disabled-checked":x,"--n-text-color":g,"--n-text-color-disabled":_,"--n-check-mark-color":l,"--n-check-mark-color-disabled":u,"--n-check-mark-color-disabled-checked":b,"--n-font-size":D,"--n-label-padding":w}}),A=s?t(`checkbox`,d(()=>v.value[0]),k,e):void 0;return Object.assign(g,D,{rtlEnabled:O,selfRef:r,mergedClsPrefix:i,mergedDisabled:_,renderedChecked:h,mergedTheme:y,labelId:ce(),handleClick:S,handleKeyUp:w,handleKeyDown:T,cssVars:s?void 0:k,themeClass:A?.themeClass,onRender:A?.onRender})},render(){var e;let{$slots:t,renderedChecked:n,mergedDisabled:i,indeterminate:a,privateInsideTable:o,cssVars:s,labelId:c,label:l,mergedClsPrefix:u,focusable:d,handleKeyUp:f,handleKeyDown:p,handleClick:m}=this;(e=this.onRender)==null||e.call(this);let h=G(t.default,e=>l||e?r(`span`,{class:`${u}-checkbox__label`,id:c},l||e):null);return r(`div`,{ref:`selfRef`,class:[`${u}-checkbox`,this.themeClass,this.rtlEnabled&&`${u}-checkbox--rtl`,n&&`${u}-checkbox--checked`,i&&`${u}-checkbox--disabled`,a&&`${u}-checkbox--indeterminate`,o&&`${u}-checkbox--inside-table`,h&&`${u}-checkbox--show-label`],tabindex:i||!d?void 0:0,role:`checkbox`,"aria-checked":a?`mixed`:n,"aria-labelledby":c,style:s,onKeyup:f,onKeydown:p,onClick:m,onMousedown:()=>{P(`selectstart`,window,e=>{e.preventDefault()},{once:!0})}},r(`div`,{class:`${u}-checkbox-box-wrapper`},`\xA0`,r(`div`,{class:`${u}-checkbox-box`},r(ue,null,{default:()=>this.indeterminate?r(`div`,{key:`indeterminate`,class:`${u}-checkbox-icon`},ge()):r(`div`,{key:`check`,class:`${u}-checkbox-icon`},he())}),r(`div`,{class:`${u}-checkbox-box__border`}))),h)}}),ve={class:`center-block-custom content-block center-middle-block-custom height80`},ye={class:`form-button-wrapper`},be={class:`form-label`},xe={key:0},Se={key:1},Ce={class:`form-label`},we={class:`form-label`},Te={class:`form-button-wrapper`},Ee={class:`form-label`},De={key:0},Oe={key:1},ke={class:`form-button-wrapper`},Ae={class:`form-label`},je={key:0},Me={key:1},Ne=K(v({__name:`LoginPage`,setup(t){let r=le(),a=T(),o=I(),s=m(``),c=m(``),l=m(``),f=m(!1),p=m(!1),h=d(()=>[`@mail.ru`,`@yandex.ru`,`@gmail.com`].map(e=>{let t=c.value.split(`@`)[0];return{label:t+e,value:t+e}}));async function _(){if(!await r.login(c.value,l.value)&&r.error!=null){o.error(r.error);return}a.push(`/office`)}async function v(){if(!(!f.value||!p.value)){if(!await r.signup(s.value,c.value,f.value,p.value)&&r.error!=null){o.error(r.error);return}o.info(`Пароль отправлен на почту`),f.value=!1,p.value=!1}}async function y(){if(!await r.refreshPassword(c.value)&&r.error!=null){o.error(r.error);return}o.info(`Пароль отправлен на почту`)}return(t,a)=>(n(),D(`div`,ve,[i(u(F),{style:{"margin-bottom":`16px`},class:`sign-card`},{default:g(()=>[i(u(U),{type:`line`,animated:``},{default:g(()=>[i(u(H),{name:`signin`,tab:`Вход`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[7]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[0]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),a[8]||=O(`div`,{class:`form-label`},`Пароль`,-1),i(u(J),{value:l.value,"onUpdate:value":a[1]||=e=>l.value=e,type:`password`,"show-password-on":`click`,placeholder:`********`},null,8,[`value`]),O(`div`,ye,[O(`div`,be,[i(u(V),{onClick:_,disabled:c.value.length==0||l.value.length==0},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Se,` Подождите... `)):(n(),D(`span`,xe,` Вход `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),i(u(H),{name:`signup`,tab:`Регистрация`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[11]||=O(`div`,{class:`form-label`},`Позывной`,-1),i(u(J),{value:s.value,"onUpdate:value":a[2]||=e=>s.value=e,type:`text`,placeholder:`Шерлок`},null,8,[`value`]),a[12]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[3]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),O(`div`,Ce,[i(u($),{checked:f.value,"onUpdate:checked":a[4]||=e=>f.value=e},{default:g(()=>[...a[9]||=[e(` Я принимаю условия `,-1),O(`a`,{href:`/user-agreement`,target:`_blank`,class:`docs-link`},`пользовательского соглашения`,-1)]]),_:1},8,[`checked`])]),O(`div`,we,[i(u($),{checked:p.value,"onUpdate:checked":a[5]||=e=>p.value=e},{default:g(()=>[...a[10]||=[e(` Я даю согласие на обработку `,-1),O(`a`,{href:`/privacy-policy`,target:`_blank`,class:`docs-link`},`персональных данных`,-1)]]),_:1},8,[`checked`])]),O(`div`,Te,[O(`div`,Ee,[i(u(V),{onClick:v,disabled:s.value.length==0||c.value.length==0||!f.value||!p.value},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Oe,` Подождите... `)):(n(),D(`span`,De,` Регистрация `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),i(u(H),{name:`new-password`,tab:`Новый пароль`},{default:g(()=>[i(u(Y),{vertical:``},{default:g(()=>[a[13]||=O(`div`,{class:`form-label`},`Почта`,-1),i(u(Z),{value:c.value,"onUpdate:value":a[6]||=e=>c.value=e,"input-props":{autocomplete:`disabled`},options:h.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),O(`div`,ke,[O(`div`,Ae,[i(u(V),{onClick:y,disabled:c.value.length==0},{default:g(()=>[u(r).isLoading?(n(),D(`span`,Me,` Подождите... `)):(n(),D(`span`,je,` Прислать новый пароль `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),[[`__scopeId`,`data-v-e7ea0635`]]),Pe=v({__name:`LoginView`,setup(e){return(e,t)=>(n(),D(h,null,[i(Ne),i(fe)],64))}});export{Pe as default}; \ No newline at end of file diff --git a/frontend/dist/assets/MessagePaper-CFegNMJR.js b/frontend/dist/assets/MessagePaper-C6R1Irzd.js similarity index 71% rename from frontend/dist/assets/MessagePaper-CFegNMJR.js rename to frontend/dist/assets/MessagePaper-C6R1Irzd.js index 515f02e..d89a038 100644 --- a/frontend/dist/assets/MessagePaper-CFegNMJR.js +++ b/frontend/dist/assets/MessagePaper-C6R1Irzd.js @@ -1 +1 @@ -import{Kt as e,Yt as t,kt as n,wt as r,xt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./_plugin-vue_export-helper-CtHwEvHL.js";var o={class:`main`},s={class:`message-cloud`},c=a(n({__name:`MessagePaper`,setup(n){return(n,a)=>(e(),r(`div`,o,[a[0]||=i(`div`,{class:`message-cloud-3`},null,-1),a[1]||=i(`div`,{class:`message-cloud-2`},null,-1),i(`div`,s,[t(n.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-0b1b8d3f`]]);export{c as t}; \ No newline at end of file +import{Kt as e,Yt as t,kt as n,wt as r,xt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./_plugin-vue_export-helper-CaiaXQaI.js";var o={class:`main`},s={class:`message-cloud`},c=a(n({__name:`MessagePaper`,setup(n){return(n,a)=>(e(),r(`div`,o,[a[0]||=i(`div`,{class:`message-cloud-3`},null,-1),a[1]||=i(`div`,{class:`message-cloud-2`},null,-1),i(`div`,s,[t(n.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-0b1b8d3f`]]);export{c as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Modal-Bsm1tUwA.js b/frontend/dist/assets/Modal-xM6cEDIr.js similarity index 78% rename from frontend/dist/assets/Modal-Bsm1tUwA.js rename to frontend/dist/assets/Modal-xM6cEDIr.js index 37603c8..b2c0e6c 100644 --- a/frontend/dist/assets/Modal-Bsm1tUwA.js +++ b/frontend/dist/assets/Modal-xM6cEDIr.js @@ -1,4 +1,4 @@ -import{Bt as e,H as t,In as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,Wt as u,Y as d,an as f,at as p,bt as m,ct as h,et as g,g as _,hn as v,it as y,kt as b,mn as x,nn as S,nt as C,p as w,q as T,qt as E,st as D,tt as O,vn as k,yt as A}from"./client-Bz0sY7Lm.js";import{d as j,f as ee,i as te,n as ne,r as re,s as ie,t as ae,u as M}from"./Card-D1LVu21r.js";import{o as oe}from"./es-BhJOHfSF.js";import{C as se,S as N,_ as ce,b as le,d as ue,f as de,m as fe,n as pe,p as me,v as he,x as ge,y as P}from"./Suffix-JLavbuLO.js";import{a as _e,t as F}from"./Button-lcMg8vK2.js";import{i as ve,n as ye,t as I}from"./keep-YWFBE5Rh.js";import{i as L,o as R,s as z}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as be}from"./fade-in.cssr-0rRavIDG.js";import{$ as xe,H as Se,U as B,V as Ce,W as we,Z as V,it as H,q as Te,st as U,v as Ee,y as De,z as Oe}from"./index-6B3OmSLg.js";var W=v(null);function G(e){if(e.clientX>0||e.clientY>0)W.value={x:e.clientX,y:e.clientY};else{let{target:t}=e;if(t instanceof Element){let{left:e,top:n,width:r,height:i}=t.getBoundingClientRect();e>0||n>0?W.value={x:e+r/2,y:n+i/2}:W.value={x:0,y:0}}else W.value=null}}var K=0,ke=!0;function Ae(){if(!se)return x(v(null));K===0&&j(`click`,document,G,!0);let t=()=>{K+=1};return(ke&&=N())?(e(t),l(()=>{--K,K===0&&M(`click`,document,G,!0)})):t(),x(W)}var je=v(void 0),q=0;function Me(){je.value=Date.now()}var Ne=!0;function Pe(t){if(!se)return x(v(!1));let n=v(!1),r=null;function i(){r!==null&&window.clearTimeout(r)}function a(){i(),n.value=!0,r=window.setTimeout(()=>{n.value=!1},t)}q===0&&j(`click`,window,Me,!0);let o=()=>{q+=1,j(`click`,window,a,!0)};return(Ne&&=N())?(e(o),l(()=>{--q,q===0&&M(`click`,window,Me,!0),M(`click`,window,a,!0),i()})):o(),x(n)}var J=v(!1);function Fe(){J.value=!0}function Ie(){J.value=!1}var Y=0;function Le(){return _e&&(e(()=>{Y||(window.addEventListener(`compositionstart`,Fe),window.addEventListener(`compositionend`,Ie)),Y++}),l(()=>{Y<=1?(window.removeEventListener(`compositionstart`,Fe),window.removeEventListener(`compositionend`,Ie),Y=0):Y--})),J}var X=0,Re=``,ze=``,Be=``,Ve=``,He=v(`0px`);function Ue(e){if(typeof document>`u`)return;let t=document.documentElement,n,r=!1,i=()=>{t.style.marginRight=Re,t.style.overflow=ze,t.style.overflowX=Be,t.style.overflowY=Ve,He.value=`0px`};c(()=>{n=S(e,e=>{if(e){if(!X){let e=window.innerWidth-t.offsetWidth;e>0&&(Re=t.style.marginRight,t.style.marginRight=`${e}px`,He.value=`${e}px`),ze=t.style.overflow,Be=t.style.overflowX,Ve=t.style.overflowY,t.style.overflow=`hidden`,t.style.overflowX=`hidden`,t.style.overflowY=`hidden`}r=!0,X++}else X--,X||i(),r=!1},{immediate:!0})}),l(()=>{n?.(),r&&=(X--,X||i(),!1)})}var We=d(`n-dialog-provider`);d(`n-dialog-api`),d(`n-dialog-reactive-list`);var Z={icon:Function,type:{type:String,default:`default`},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},Ge=ie(Z),Ke=O([C(`dialog`,` +import{Bt as e,H as t,In as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,Wt as u,Y as d,an as f,at as p,bt as m,ct as h,et as g,g as _,hn as v,it as y,kt as b,mn as x,nn as S,nt as C,p as w,q as T,qt as E,st as D,tt as O,vn as k,yt as A}from"./client-Bz0sY7Lm.js";import{d as j,f as ee,i as te,n as ne,r as re,s as ie,t as ae,u as M}from"./Card-BGJkYb2B.js";import{o as oe}from"./es-Qklex053.js";import{C as se,S as N,_ as ce,b as le,d as ue,f as de,m as fe,n as pe,p as me,v as he,x as ge,y as P}from"./Suffix-BBRLYxYK.js";import{a as _e,t as F}from"./Button-MBUKfT_Z.js";import{i as ve,n as ye,t as I}from"./keep-UirG4WK3.js";import{c as L,i as R,o as z}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as be}from"./fade-in.cssr-0rRavIDG.js";import{B as xe,G as Se,H as Ce,J as we,Q as B,U as Te,W as V,at as H,ct as U,et as Ee,v as De,y as Oe}from"./index-NE0dsiiJ.js";var W=v(null);function G(e){if(e.clientX>0||e.clientY>0)W.value={x:e.clientX,y:e.clientY};else{let{target:t}=e;if(t instanceof Element){let{left:e,top:n,width:r,height:i}=t.getBoundingClientRect();e>0||n>0?W.value={x:e+r/2,y:n+i/2}:W.value={x:0,y:0}}else W.value=null}}var K=0,ke=!0;function Ae(){if(!se)return x(v(null));K===0&&j(`click`,document,G,!0);let t=()=>{K+=1};return(ke&&=N())?(e(t),l(()=>{--K,K===0&&M(`click`,document,G,!0)})):t(),x(W)}var je=v(void 0),q=0;function Me(){je.value=Date.now()}var Ne=!0;function Pe(t){if(!se)return x(v(!1));let n=v(!1),r=null;function i(){r!==null&&window.clearTimeout(r)}function a(){i(),n.value=!0,r=window.setTimeout(()=>{n.value=!1},t)}q===0&&j(`click`,window,Me,!0);let o=()=>{q+=1,j(`click`,window,a,!0)};return(Ne&&=N())?(e(o),l(()=>{--q,q===0&&M(`click`,window,Me,!0),M(`click`,window,a,!0),i()})):o(),x(n)}var J=v(!1);function Fe(){J.value=!0}function Ie(){J.value=!1}var Y=0;function Le(){return _e&&(e(()=>{Y||(window.addEventListener(`compositionstart`,Fe),window.addEventListener(`compositionend`,Ie)),Y++}),l(()=>{Y<=1?(window.removeEventListener(`compositionstart`,Fe),window.removeEventListener(`compositionend`,Ie),Y=0):Y--})),J}var X=0,Re=``,ze=``,Be=``,Ve=``,He=v(`0px`);function Ue(e){if(typeof document>`u`)return;let t=document.documentElement,n,r=!1,i=()=>{t.style.marginRight=Re,t.style.overflow=ze,t.style.overflowX=Be,t.style.overflowY=Ve,He.value=`0px`};c(()=>{n=S(e,e=>{if(e){if(!X){let e=window.innerWidth-t.offsetWidth;e>0&&(Re=t.style.marginRight,t.style.marginRight=`${e}px`,He.value=`${e}px`),ze=t.style.overflow,Be=t.style.overflowX,Ve=t.style.overflowY,t.style.overflow=`hidden`,t.style.overflowX=`hidden`,t.style.overflowY=`hidden`}r=!0,X++}else X--,X||i(),r=!1},{immediate:!0})}),l(()=>{n?.(),r&&=(X--,X||i(),!1)})}var We=d(`n-dialog-provider`);d(`n-dialog-api`),d(`n-dialog-reactive-list`);var Z={icon:Function,type:{type:String,default:`default`},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},Ge=ie(Z),Ke=O([C(`dialog`,` --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left); word-break: break-word; line-height: var(--n-line-height); @@ -69,7 +69,7 @@ import{Bt as e,H as t,In as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt `)),C(`dialog`,[g(` width: 446px; max-width: calc(100vw - 32px); - `)])]),qe={default:()=>i(B,null),info:()=>i(B,null),success:()=>i(Se,null),warning:()=>i(Ce,null),error:()=>i(we,null)},Je=b({name:`Dialog`,alias:[`NimbusConfirmCard`,`Confirm`],props:Object.assign(Object.assign({},w.props),Z),slots:Object,setup(e){let{mergedComponentPropsRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=s(e),o=_(`Dialog`,a,r),c=m(()=>{let{iconPlacement:t}=e;return t||n?.value?.Dialog?.iconPlacement||`left`});function l(t){let{onPositiveClick:n}=e;n&&n(t)}function u(t){let{onNegativeClick:n}=e;n&&n(t)}function d(){let{onClose:t}=e;t&&t()}let f=w(`Dialog`,`-dialog`,Ke,De,e,r),p=m(()=>{let{type:t}=e,n=c.value,{common:{cubicBezierEaseInOut:r},self:{fontSize:i,lineHeight:a,border:o,titleTextColor:s,textColor:l,color:u,closeBorderRadius:d,closeColorHover:p,closeColorPressed:m,closeIconColor:h,closeIconColorHover:g,closeIconColorPressed:_,closeIconSize:v,borderRadius:y,titleFontWeight:b,titleFontSize:x,padding:S,iconSize:C,actionSpace:w,contentMargin:T,closeSize:E,[n===`top`?`iconMarginIconTop`:`iconMargin`]:O,[n===`top`?`closeMarginIconTop`:`closeMargin`]:k,[D(`iconColor`,t)]:A}}=f.value,j=oe(O);return{"--n-font-size":i,"--n-icon-color":A,"--n-bezier":r,"--n-close-margin":k,"--n-icon-margin-top":j.top,"--n-icon-margin-right":j.right,"--n-icon-margin-bottom":j.bottom,"--n-icon-margin-left":j.left,"--n-icon-size":C,"--n-close-size":E,"--n-close-icon-size":v,"--n-close-border-radius":d,"--n-close-color-hover":p,"--n-close-color-pressed":m,"--n-close-icon-color":h,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":_,"--n-color":u,"--n-text-color":l,"--n-border-radius":y,"--n-padding":S,"--n-line-height":a,"--n-border":o,"--n-content-margin":T,"--n-title-font-size":x,"--n-title-font-weight":b,"--n-title-text-color":s,"--n-action-space":w}}),h=i?t(`dialog`,m(()=>`${e.type[0]}${c.value[0]}`),p,e):void 0;return{mergedClsPrefix:r,rtlEnabled:o,mergedIconPlacement:c,mergedTheme:f,handlePositiveClick:l,handleNegativeClick:u,handleCloseClick:d,cssVars:i?void 0:p,themeClass:h?.themeClass,onRender:h?.onRender}},render(){var e;let{bordered:t,mergedIconPlacement:n,cssVars:r,closable:a,showIcon:o,title:s,content:c,action:l,negativeText:u,positiveText:d,positiveButtonProps:f,negativeButtonProps:p,handlePositiveClick:m,handleNegativeClick:h,mergedTheme:g,loading:_,type:v,mergedClsPrefix:y}=this;(e=this.onRender)==null||e.call(this);let b=o?i(Te,{clsPrefix:y,class:`${y}-dialog__icon`},{default:()=>R(this.$slots.icon,e=>e||(this.icon?V(this.icon):qe[this.type]()))}):null,x=R(this.$slots.action,e=>e||d||u||l?i(`div`,{class:[`${y}-dialog__action`,this.actionClass],style:this.actionStyle},e||(l?[V(l)]:[this.negativeText&&i(F,Object.assign({theme:g.peers.Button,themeOverrides:g.peerOverrides.Button,ghost:!0,size:`small`,onClick:h},p),{default:()=>V(this.negativeText)}),this.positiveText&&i(F,Object.assign({theme:g.peers.Button,themeOverrides:g.peerOverrides.Button,size:`small`,type:v==="default"?`primary`:v,disabled:_,loading:_,onClick:m},f),{default:()=>V(this.positiveText)})])):null);return i(`div`,{class:[`${y}-dialog`,this.themeClass,this.closable&&`${y}-dialog--closable`,`${y}-dialog--icon-${n}`,t&&`${y}-dialog--bordered`,this.rtlEnabled&&`${y}-dialog--rtl`],style:r,role:`dialog`},a?R(this.$slots.close,e=>{let t=[`${y}-dialog__close`,this.rtlEnabled&&`${y}-dialog--rtl`];return e?i(`div`,{class:t},e):i(Oe,{focusable:this.closeFocusable,clsPrefix:y,class:t,onClick:this.handleCloseClick})}):null,o&&n===`top`?i(`div`,{class:`${y}-dialog-icon-container`},b):null,i(`div`,{class:[`${y}-dialog__title`,this.titleClass],style:this.titleStyle},o&&n===`left`?b:null,L(this.$slots.header,()=>[V(s)])),i(`div`,{class:[`${y}-dialog__content`,x?``:`${y}-dialog__content--last`,this.contentClass],style:this.contentStyle},L(this.$slots.default,()=>[V(c)])),x)}}),Q=`n-draggable`;function Ye(e,t){let n,r=m(()=>e.value!==!1),i=m(()=>r.value?Q:``),a=m(()=>{let t=e.value;return t===!0||t===!1?!0:t?t.bounds!==`none`:!0});function o(e){let r=e.querySelector(`.${Q}`);if(!r||!i.value)return;let o=0,s=0,c=0,l=0,u=0,d=0,f,p=null,m=null;function h(t){t.preventDefault(),f=t;let{x:n,y:r,right:i,bottom:a}=e.getBoundingClientRect();s=n,l=r,o=window.innerWidth-i,c=window.innerHeight-a;let{left:p,top:m}=e.style;u=+m.slice(0,-2),d=+p.slice(0,-2)}function g(){m&&=(e.style.top=`${m.y}px`,e.style.left=`${m.x}px`,null),p=null}function _(e){if(!f)return;let{clientX:t,clientY:n}=f,r=e.clientX-t,i=e.clientY-n;a.value&&(r>o?r=o:-r>s&&(r=-s),i>c?i=c:-i>l&&(i=-l)),m={x:r+d,y:i+u},p||=requestAnimationFrame(g)}function v(){f=void 0,p&&=(cancelAnimationFrame(p),null),m&&=(e.style.top=`${m.y}px`,e.style.left=`${m.x}px`,null),t.onEnd(e)}j(`mousedown`,r,h),j(`mousemove`,window,_),j(`mouseup`,window,v),n=()=>{p&&cancelAnimationFrame(p),M(`mousedown`,r,h),M(`mousemove`,window,_),M(`mouseup`,window,v)}}function s(){n&&=(n(),void 0)}return u(s),{stopDrag:s,startDrag:o,draggableRef:r,draggableClassRef:i}}var $=Object.assign(Object.assign({},re),Z),Xe=ie($),Ze=b({name:`ModalBody`,inheritAttrs:!1,slots:Object,props:Object.assign(Object.assign({show:{type:Boolean,required:!0},preset:String,displayDirective:{type:String,required:!0},trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},blockScroll:Boolean,draggable:{type:[Boolean,Object],default:!1},maskHidden:Boolean},$),{renderMask:Function,onClickoutside:Function,onBeforeLeave:{type:Function,required:!0},onAfterLeave:{type:Function,required:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0},onClose:{type:Function,required:!0},onAfterEnter:Function,onEsc:Function}),setup(e){let t=v(null),r=v(null),i=v(e.show),s=v(null),c=v(null),l=a(P),u=null;S(k(e,`show`),e=>{e&&(u=l.getMousePosition())},{immediate:!0});let{stopDrag:d,startDrag:f,draggableRef:p,draggableClassRef:h}=Ye(k(e,`draggable`),{onEnd:e=>{b(e)}}),g=m(()=>n([e.titleClass,h.value])),_=m(()=>n([e.headerClass,h.value]));S(k(e,`show`),e=>{e&&(i.value=!0)}),Ue(m(()=>e.blockScroll&&i.value));function y(){if(l.transformOriginRef.value===`center`)return``;let{value:e}=s,{value:t}=c;return e===null||t===null?``:r.value?`${e}px ${t+r.value.containerScrollTop}px`:``}function b(e){if(l.transformOriginRef.value===`center`||!u||!r.value)return;let t=r.value.containerScrollTop,{offsetLeft:n,offsetTop:i}=e,a=u.y,o=u.x;s.value=-(n-o),c.value=-(i-a-t),e.style.transformOrigin=y()}function x(e){o(()=>{b(e)})}function C(t){t.style.transformOrigin=y(),e.onBeforeLeave()}function w(t){let n=t;p.value&&f(n),e.onAfterEnter&&e.onAfterEnter(n)}function T(){i.value=!1,s.value=null,c.value=null,d(),e.onAfterLeave()}function D(){let{onClose:t}=e;t&&t()}function O(){e.onNegativeClick()}function A(){e.onPositiveClick()}let j=v(null);return S(j,e=>{e&&o(()=>{let n=e.el;n&&t.value!==n&&(t.value=n)})}),E(he,t),E(ge,null),E(ce,null),{mergedTheme:l.mergedThemeRef,appear:l.appearRef,isMounted:l.isMountedRef,mergedClsPrefix:l.mergedClsPrefixRef,bodyRef:t,scrollbarRef:r,draggableClass:h,displayed:i,childNodeRef:j,cardHeaderClass:_,dialogTitleClass:g,handlePositiveClick:A,handleNegativeClick:O,handleCloseClick:D,handleAfterEnter:w,handleAfterLeave:T,handleBeforeLeave:C,handleEnter:x}},render(){let{$slots:e,$attrs:t,handleEnter:n,handleAfterEnter:a,handleAfterLeave:o,handleBeforeLeave:s,preset:c,mergedClsPrefix:l}=this,u=null;if(!c){if(u=ue(`default`,e.default,{draggableClass:this.draggableClass}),!u){T(`modal`,`default slot is empty`);return}u=A(u),u.props=r({class:`${l}-modal`},t,u.props||{})}return this.displayDirective===`show`||this.displayed||this.show?f(i(`div`,{role:`none`,class:[`${l}-modal-body-wrapper`,this.maskHidden&&`${l}-modal-body-wrapper--mask-hidden`]},i(te,{ref:`scrollbarRef`,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:`${l}-modal-scroll-content`},{default:()=>[this.renderMask?.call(this),i(ve,{disabled:!this.trapFocus||this.maskHidden,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>i(H,{name:`fade-in-scale-up-transition`,appear:this.appear??this.isMounted,onEnter:n,onAfterEnter:a,onAfterLeave:o,onBeforeLeave:s},{default:()=>{let t=[[U,this.show]],{onClickoutside:n}=this;return n&&t.push([fe,this.onClickoutside,void 0,{capture:!0}]),f(this.preset===`confirm`||this.preset===`dialog`?i(Je,Object.assign({},this.$attrs,{class:[`${l}-modal`,this.$attrs.class],ref:`bodyRef`,theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},I(this.$props,Ge),{titleClass:this.dialogTitleClass,"aria-modal":`true`}),e):this.preset===`card`?i(ae,Object.assign({},this.$attrs,{ref:`bodyRef`,class:[`${l}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},I(this.$props,ne),{headerClass:this.cardHeaderClass,"aria-modal":`true`,role:`dialog`}),e):this.childNodeRef=u,t)}})})]})),[[U,this.displayDirective===`if`||this.displayed||this.show]]):null}}),Qe=O([C(`modal-container`,` + `)])]),qe={default:()=>i(V,null),info:()=>i(V,null),success:()=>i(Te,null),warning:()=>i(Ce,null),error:()=>i(Se,null)},Je=b({name:`Dialog`,alias:[`NimbusConfirmCard`,`Confirm`],props:Object.assign(Object.assign({},w.props),Z),slots:Object,setup(e){let{mergedComponentPropsRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=s(e),o=_(`Dialog`,a,r),c=m(()=>{let{iconPlacement:t}=e;return t||n?.value?.Dialog?.iconPlacement||`left`});function l(t){let{onPositiveClick:n}=e;n&&n(t)}function u(t){let{onNegativeClick:n}=e;n&&n(t)}function d(){let{onClose:t}=e;t&&t()}let f=w(`Dialog`,`-dialog`,Ke,Oe,e,r),p=m(()=>{let{type:t}=e,n=c.value,{common:{cubicBezierEaseInOut:r},self:{fontSize:i,lineHeight:a,border:o,titleTextColor:s,textColor:l,color:u,closeBorderRadius:d,closeColorHover:p,closeColorPressed:m,closeIconColor:h,closeIconColorHover:g,closeIconColorPressed:_,closeIconSize:v,borderRadius:y,titleFontWeight:b,titleFontSize:x,padding:S,iconSize:C,actionSpace:w,contentMargin:T,closeSize:E,[n===`top`?`iconMarginIconTop`:`iconMargin`]:O,[n===`top`?`closeMarginIconTop`:`closeMargin`]:k,[D(`iconColor`,t)]:A}}=f.value,j=oe(O);return{"--n-font-size":i,"--n-icon-color":A,"--n-bezier":r,"--n-close-margin":k,"--n-icon-margin-top":j.top,"--n-icon-margin-right":j.right,"--n-icon-margin-bottom":j.bottom,"--n-icon-margin-left":j.left,"--n-icon-size":C,"--n-close-size":E,"--n-close-icon-size":v,"--n-close-border-radius":d,"--n-close-color-hover":p,"--n-close-color-pressed":m,"--n-close-icon-color":h,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":_,"--n-color":u,"--n-text-color":l,"--n-border-radius":y,"--n-padding":S,"--n-line-height":a,"--n-border":o,"--n-content-margin":T,"--n-title-font-size":x,"--n-title-font-weight":b,"--n-title-text-color":s,"--n-action-space":w}}),h=i?t(`dialog`,m(()=>`${e.type[0]}${c.value[0]}`),p,e):void 0;return{mergedClsPrefix:r,rtlEnabled:o,mergedIconPlacement:c,mergedTheme:f,handlePositiveClick:l,handleNegativeClick:u,handleCloseClick:d,cssVars:i?void 0:p,themeClass:h?.themeClass,onRender:h?.onRender}},render(){var e;let{bordered:t,mergedIconPlacement:n,cssVars:r,closable:a,showIcon:o,title:s,content:c,action:l,negativeText:u,positiveText:d,positiveButtonProps:f,negativeButtonProps:p,handlePositiveClick:m,handleNegativeClick:h,mergedTheme:g,loading:_,type:v,mergedClsPrefix:y}=this;(e=this.onRender)==null||e.call(this);let b=o?i(we,{clsPrefix:y,class:`${y}-dialog__icon`},{default:()=>z(this.$slots.icon,e=>e||(this.icon?B(this.icon):qe[this.type]()))}):null,x=z(this.$slots.action,e=>e||d||u||l?i(`div`,{class:[`${y}-dialog__action`,this.actionClass],style:this.actionStyle},e||(l?[B(l)]:[this.negativeText&&i(F,Object.assign({theme:g.peers.Button,themeOverrides:g.peerOverrides.Button,ghost:!0,size:`small`,onClick:h},p),{default:()=>B(this.negativeText)}),this.positiveText&&i(F,Object.assign({theme:g.peers.Button,themeOverrides:g.peerOverrides.Button,size:`small`,type:v==="default"?`primary`:v,disabled:_,loading:_,onClick:m},f),{default:()=>B(this.positiveText)})])):null);return i(`div`,{class:[`${y}-dialog`,this.themeClass,this.closable&&`${y}-dialog--closable`,`${y}-dialog--icon-${n}`,t&&`${y}-dialog--bordered`,this.rtlEnabled&&`${y}-dialog--rtl`],style:r,role:`dialog`},a?z(this.$slots.close,e=>{let t=[`${y}-dialog__close`,this.rtlEnabled&&`${y}-dialog--rtl`];return e?i(`div`,{class:t},e):i(xe,{focusable:this.closeFocusable,clsPrefix:y,class:t,onClick:this.handleCloseClick})}):null,o&&n===`top`?i(`div`,{class:`${y}-dialog-icon-container`},b):null,i(`div`,{class:[`${y}-dialog__title`,this.titleClass],style:this.titleStyle},o&&n===`left`?b:null,R(this.$slots.header,()=>[B(s)])),i(`div`,{class:[`${y}-dialog__content`,x?``:`${y}-dialog__content--last`,this.contentClass],style:this.contentStyle},R(this.$slots.default,()=>[B(c)])),x)}}),Q=`n-draggable`;function Ye(e,t){let n,r=m(()=>e.value!==!1),i=m(()=>r.value?Q:``),a=m(()=>{let t=e.value;return t===!0||t===!1?!0:t?t.bounds!==`none`:!0});function o(e){let r=e.querySelector(`.${Q}`);if(!r||!i.value)return;let o=0,s=0,c=0,l=0,u=0,d=0,f,p=null,m=null;function h(t){t.preventDefault(),f=t;let{x:n,y:r,right:i,bottom:a}=e.getBoundingClientRect();s=n,l=r,o=window.innerWidth-i,c=window.innerHeight-a;let{left:p,top:m}=e.style;u=+m.slice(0,-2),d=+p.slice(0,-2)}function g(){m&&=(e.style.top=`${m.y}px`,e.style.left=`${m.x}px`,null),p=null}function _(e){if(!f)return;let{clientX:t,clientY:n}=f,r=e.clientX-t,i=e.clientY-n;a.value&&(r>o?r=o:-r>s&&(r=-s),i>c?i=c:-i>l&&(i=-l)),m={x:r+d,y:i+u},p||=requestAnimationFrame(g)}function v(){f=void 0,p&&=(cancelAnimationFrame(p),null),m&&=(e.style.top=`${m.y}px`,e.style.left=`${m.x}px`,null),t.onEnd(e)}j(`mousedown`,r,h),j(`mousemove`,window,_),j(`mouseup`,window,v),n=()=>{p&&cancelAnimationFrame(p),M(`mousedown`,r,h),M(`mousemove`,window,_),M(`mouseup`,window,v)}}function s(){n&&=(n(),void 0)}return u(s),{stopDrag:s,startDrag:o,draggableRef:r,draggableClassRef:i}}var $=Object.assign(Object.assign({},re),Z),Xe=ie($),Ze=b({name:`ModalBody`,inheritAttrs:!1,slots:Object,props:Object.assign(Object.assign({show:{type:Boolean,required:!0},preset:String,displayDirective:{type:String,required:!0},trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},blockScroll:Boolean,draggable:{type:[Boolean,Object],default:!1},maskHidden:Boolean},$),{renderMask:Function,onClickoutside:Function,onBeforeLeave:{type:Function,required:!0},onAfterLeave:{type:Function,required:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0},onClose:{type:Function,required:!0},onAfterEnter:Function,onEsc:Function}),setup(e){let t=v(null),r=v(null),i=v(e.show),s=v(null),c=v(null),l=a(P),u=null;S(k(e,`show`),e=>{e&&(u=l.getMousePosition())},{immediate:!0});let{stopDrag:d,startDrag:f,draggableRef:p,draggableClassRef:h}=Ye(k(e,`draggable`),{onEnd:e=>{b(e)}}),g=m(()=>n([e.titleClass,h.value])),_=m(()=>n([e.headerClass,h.value]));S(k(e,`show`),e=>{e&&(i.value=!0)}),Ue(m(()=>e.blockScroll&&i.value));function y(){if(l.transformOriginRef.value===`center`)return``;let{value:e}=s,{value:t}=c;return e===null||t===null?``:r.value?`${e}px ${t+r.value.containerScrollTop}px`:``}function b(e){if(l.transformOriginRef.value===`center`||!u||!r.value)return;let t=r.value.containerScrollTop,{offsetLeft:n,offsetTop:i}=e,a=u.y,o=u.x;s.value=-(n-o),c.value=-(i-a-t),e.style.transformOrigin=y()}function x(e){o(()=>{b(e)})}function C(t){t.style.transformOrigin=y(),e.onBeforeLeave()}function w(t){let n=t;p.value&&f(n),e.onAfterEnter&&e.onAfterEnter(n)}function T(){i.value=!1,s.value=null,c.value=null,d(),e.onAfterLeave()}function D(){let{onClose:t}=e;t&&t()}function O(){e.onNegativeClick()}function A(){e.onPositiveClick()}let j=v(null);return S(j,e=>{e&&o(()=>{let n=e.el;n&&t.value!==n&&(t.value=n)})}),E(he,t),E(ge,null),E(ce,null),{mergedTheme:l.mergedThemeRef,appear:l.appearRef,isMounted:l.isMountedRef,mergedClsPrefix:l.mergedClsPrefixRef,bodyRef:t,scrollbarRef:r,draggableClass:h,displayed:i,childNodeRef:j,cardHeaderClass:_,dialogTitleClass:g,handlePositiveClick:A,handleNegativeClick:O,handleCloseClick:D,handleAfterEnter:w,handleAfterLeave:T,handleBeforeLeave:C,handleEnter:x}},render(){let{$slots:e,$attrs:t,handleEnter:n,handleAfterEnter:a,handleAfterLeave:o,handleBeforeLeave:s,preset:c,mergedClsPrefix:l}=this,u=null;if(!c){if(u=ue(`default`,e.default,{draggableClass:this.draggableClass}),!u){T(`modal`,`default slot is empty`);return}u=A(u),u.props=r({class:`${l}-modal`},t,u.props||{})}return this.displayDirective===`show`||this.displayed||this.show?f(i(`div`,{role:`none`,class:[`${l}-modal-body-wrapper`,this.maskHidden&&`${l}-modal-body-wrapper--mask-hidden`]},i(te,{ref:`scrollbarRef`,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:`${l}-modal-scroll-content`},{default:()=>[this.renderMask?.call(this),i(ve,{disabled:!this.trapFocus||this.maskHidden,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>i(H,{name:`fade-in-scale-up-transition`,appear:this.appear??this.isMounted,onEnter:n,onAfterEnter:a,onAfterLeave:o,onBeforeLeave:s},{default:()=>{let t=[[U,this.show]],{onClickoutside:n}=this;return n&&t.push([fe,this.onClickoutside,void 0,{capture:!0}]),f(this.preset===`confirm`||this.preset===`dialog`?i(Je,Object.assign({},this.$attrs,{class:[`${l}-modal`,this.$attrs.class],ref:`bodyRef`,theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},I(this.$props,Ge),{titleClass:this.dialogTitleClass,"aria-modal":`true`}),e):this.preset===`card`?i(ae,Object.assign({},this.$attrs,{ref:`bodyRef`,class:[`${l}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},I(this.$props,ne),{headerClass:this.cardHeaderClass,"aria-modal":`true`,role:`dialog`}),e):this.childNodeRef=u,t)}})})]})),[[U,this.displayDirective===`if`||this.displayed||this.show]]):null}}),Qe=O([C(`modal-container`,` position: fixed; left: 0; top: 0; @@ -105,4 +105,4 @@ import{Bt as e,H as t,In as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt `,[pe({duration:`.25s`,enterScale:`.5`}),O(`.${Q}`,` cursor: move; user-select: none; - `)])]),$e=b({name:`Modal`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign(Object.assign({},w.props),{show:Boolean,showMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},preset:String,to:[String,Object],displayDirective:{type:String,default:`if`},transformOrigin:{type:String,default:`mouse`},zIndex:Number,autoFocus:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0}}),$),{draggable:[Boolean,Object],onEsc:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onBeforeLeave:Function,onAfterLeave:Function,onClose:Function,onPositiveClick:Function,onNegativeClick:Function,onMaskClick:Function,internalDialog:Boolean,internalModal:Boolean,internalAppear:{type:Boolean,default:void 0},overlayStyle:[String,Object],onBeforeHide:Function,onAfterHide:Function,onHide:Function,unstableShowMask:{type:Boolean,default:void 0}}),slots:Object,setup(e){let n=v(null),{mergedClsPrefixRef:r,namespaceRef:i,inlineThemeDisabled:o}=s(e),c=w(`Modal`,`-modal`,Qe,Ee,e,r),l=Pe(64),u=Ae(),d=xe(),f=e.internalDialog?a(We,null):null,p=e.internalModal?a(le,null):null,h=Le();function g(t){let{onUpdateShow:n,"onUpdate:show":r,onHide:i}=e;n&&z(n,t),r&&z(r,t),i&&!t&&i(t)}function _(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function y(){let{onPositiveClick:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function b(){let{onNegativeClick:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function x(){let{onBeforeLeave:t,onBeforeHide:n}=e;t&&z(t),n&&n()}function S(){let{onAfterLeave:t,onAfterHide:n}=e;t&&z(t),n&&n()}function C(t){let{onMaskClick:r}=e;r&&r(t),e.maskClosable&&n.value?.contains(ee(t))&&g(!1)}function T(t){var n;(n=e.onEsc)==null||n.call(e),e.show&&e.closeOnEsc&&ye(t)&&(h.value||g(!1))}E(P,{getMousePosition:()=>{let e=f||p;if(e){let{clickedRef:t,clickedPositionRef:n}=e;if(t.value&&n.value)return n.value}return l.value?u.value:null},mergedClsPrefixRef:r,mergedThemeRef:c,isMountedRef:d,appearRef:k(e,`internalAppear`),transformOriginRef:k(e,`transformOrigin`)});let D=m(()=>{let{common:{cubicBezierEaseOut:e},self:{boxShadow:t,color:n,textColor:r}}=c.value;return{"--n-bezier-ease-out":e,"--n-box-shadow":t,"--n-color":n,"--n-text-color":r}}),O=o?t(`theme-class`,void 0,D,e):void 0;return{mergedClsPrefix:r,namespace:i,isMounted:d,containerRef:n,presetProps:m(()=>I(e,Xe)),handleEsc:T,handleAfterLeave:S,handleClickoutside:C,handleBeforeLeave:x,doUpdateShow:g,handleNegativeClick:b,handlePositiveClick:y,handleCloseClick:_,cssVars:o?void 0:D,themeClass:O?.themeClass,onRender:O?.onRender}},render(){let{mergedClsPrefix:e}=this;return i(de,{to:this.to,show:this.show},{default:()=>{var t;(t=this.onRender)==null||t.call(this);let{showMask:n}=this;return f(i(`div`,{role:`none`,ref:`containerRef`,class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},i(Ze,Object.assign({style:this.overlayStyle},this.$attrs,{ref:`bodyWrapper`,displayDirective:this.displayDirective,show:this.show,preset:this.preset,autoFocus:this.autoFocus,trapFocus:this.trapFocus,draggable:this.draggable,blockScroll:this.blockScroll,maskHidden:!n},this.presetProps,{onEsc:this.handleEsc,onClose:this.handleCloseClick,onNegativeClick:this.handleNegativeClick,onPositiveClick:this.handlePositiveClick,onBeforeLeave:this.handleBeforeLeave,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave,onClickoutside:n?void 0:this.handleClickoutside,renderMask:n?()=>i(H,{name:`fade-in-transition`,key:`mask`,appear:this.internalAppear??this.isMounted},{default:()=>this.show?i(`div`,{"aria-hidden":!0,ref:`containerRef`,class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null}):void 0}),this.$slots)),[[me,{zIndex:this.zIndex,enabled:this.show}]])}})}});export{$e as t}; \ No newline at end of file + `)])]),$e=b({name:`Modal`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign(Object.assign({},w.props),{show:Boolean,showMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},preset:String,to:[String,Object],displayDirective:{type:String,default:`if`},transformOrigin:{type:String,default:`mouse`},zIndex:Number,autoFocus:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0}}),$),{draggable:[Boolean,Object],onEsc:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onBeforeLeave:Function,onAfterLeave:Function,onClose:Function,onPositiveClick:Function,onNegativeClick:Function,onMaskClick:Function,internalDialog:Boolean,internalModal:Boolean,internalAppear:{type:Boolean,default:void 0},overlayStyle:[String,Object],onBeforeHide:Function,onAfterHide:Function,onHide:Function,unstableShowMask:{type:Boolean,default:void 0}}),slots:Object,setup(e){let n=v(null),{mergedClsPrefixRef:r,namespaceRef:i,inlineThemeDisabled:o}=s(e),c=w(`Modal`,`-modal`,Qe,De,e,r),l=Pe(64),u=Ae(),d=Ee(),f=e.internalDialog?a(We,null):null,p=e.internalModal?a(le,null):null,h=Le();function g(t){let{onUpdateShow:n,"onUpdate:show":r,onHide:i}=e;n&&L(n,t),r&&L(r,t),i&&!t&&i(t)}function _(){let{onClose:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function y(){let{onPositiveClick:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function b(){let{onNegativeClick:t}=e;t?Promise.resolve(t()).then(e=>{e!==!1&&g(!1)}):g(!1)}function x(){let{onBeforeLeave:t,onBeforeHide:n}=e;t&&L(t),n&&n()}function S(){let{onAfterLeave:t,onAfterHide:n}=e;t&&L(t),n&&n()}function C(t){let{onMaskClick:r}=e;r&&r(t),e.maskClosable&&n.value?.contains(ee(t))&&g(!1)}function T(t){var n;(n=e.onEsc)==null||n.call(e),e.show&&e.closeOnEsc&&ye(t)&&(h.value||g(!1))}E(P,{getMousePosition:()=>{let e=f||p;if(e){let{clickedRef:t,clickedPositionRef:n}=e;if(t.value&&n.value)return n.value}return l.value?u.value:null},mergedClsPrefixRef:r,mergedThemeRef:c,isMountedRef:d,appearRef:k(e,`internalAppear`),transformOriginRef:k(e,`transformOrigin`)});let D=m(()=>{let{common:{cubicBezierEaseOut:e},self:{boxShadow:t,color:n,textColor:r}}=c.value;return{"--n-bezier-ease-out":e,"--n-box-shadow":t,"--n-color":n,"--n-text-color":r}}),O=o?t(`theme-class`,void 0,D,e):void 0;return{mergedClsPrefix:r,namespace:i,isMounted:d,containerRef:n,presetProps:m(()=>I(e,Xe)),handleEsc:T,handleAfterLeave:S,handleClickoutside:C,handleBeforeLeave:x,doUpdateShow:g,handleNegativeClick:b,handlePositiveClick:y,handleCloseClick:_,cssVars:o?void 0:D,themeClass:O?.themeClass,onRender:O?.onRender}},render(){let{mergedClsPrefix:e}=this;return i(de,{to:this.to,show:this.show},{default:()=>{var t;(t=this.onRender)==null||t.call(this);let{showMask:n}=this;return f(i(`div`,{role:`none`,ref:`containerRef`,class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},i(Ze,Object.assign({style:this.overlayStyle},this.$attrs,{ref:`bodyWrapper`,displayDirective:this.displayDirective,show:this.show,preset:this.preset,autoFocus:this.autoFocus,trapFocus:this.trapFocus,draggable:this.draggable,blockScroll:this.blockScroll,maskHidden:!n},this.presetProps,{onEsc:this.handleEsc,onClose:this.handleCloseClick,onNegativeClick:this.handleNegativeClick,onPositiveClick:this.handlePositiveClick,onBeforeLeave:this.handleBeforeLeave,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave,onClickoutside:n?void 0:this.handleClickoutside,renderMask:n?()=>i(H,{name:`fade-in-transition`,key:`mask`,appear:this.internalAppear??this.isMounted},{default:()=>this.show?i(`div`,{"aria-hidden":!0,ref:`containerRef`,class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null}):void 0}),this.$slots)),[[me,{zIndex:this.zIndex,enabled:this.show}]])}})}});export{$e as t}; \ No newline at end of file diff --git a/frontend/dist/assets/OfficeView-B4No5Dce.js b/frontend/dist/assets/OfficeView-CAsOcT4l.js similarity index 96% rename from frontend/dist/assets/OfficeView-B4No5Dce.js rename to frontend/dist/assets/OfficeView-CAsOcT4l.js index 3603b54..f550bd2 100644 --- a/frontend/dist/assets/OfficeView-B4No5Dce.js +++ b/frontend/dist/assets/OfficeView-CAsOcT4l.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Kt as n,Ot as r,Rn as i,St as a,bn as o,hn as s,ht as c,in as l,kt as u,u as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-D1LVu21r.js";import{n as h}from"./es-BhJOHfSF.js";import{t as g}from"./Modal-Bsm1tUwA.js";import{t as _}from"./Button-lcMg8vK2.js";import{t as v}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as y}from"./Input-DeqNzuJd.js";import{t as b}from"./Alert-CUBw4GSK.js";import{ct as x,i as S,o as C}from"./index-6B3OmSLg.js";import{t as w}from"./HeaderMenu-BhocR0ua.js";var T={class:`center-block-custom`},E={class:`width700`},D={class:`danger-zone`},O={key:0,class:`delete-modal-error`},k={class:`delete-modal-buttons`},A=v(u({__name:`OfficePage`,setup(a){let u=C(),v=d(),A=h(),j=S(),M=s([]);async function N(){M.value=[];try{let e=await j.GetPermissions({});M.value=e.permissions||[]}catch(e){A.error(`Не удалось загрузить права доступа`),console.error(`Failed to load permissions:`,e)}}N();function P(){let e=new Date,t=e.getDay(),n=e.getDate(),r=e.getMonth()+1,i=t===1,a=t===5&&n===13,o=r===1&&n===1||r===12&&n===31,s=r>=6&&r<=8,c=r===12||r<=2,l=n%5==0,u=[`Всегда носи с собой запасную ручку — признания любят записывать в самый неподходящий момент.`,`Если подозреваемый слишком вежлив, он либо дипломат, либо прячет труп в гараже.`,`Кофе в участке — это не напиток, это яд для улик. Пей только свой.`,`Следы на месте преступления всегда ведут к тому, кто забыл закрыть дверь.`,`Лучший способ разговорить молчуна — предложить ему чай с тремя ложками сахара.`,`Если всё указывает на дворецкого, ищи того, кто нанимал дворецкого.`,`Записывай каждую мелочь. Особенно цвет носков убитого.`,`Не верь алиби, которое начинается со слов 'Я бы никогда...'`,`Преступник всегда возвращается на место преступления. Или за забытым телефоном.`,`Ищи того, кому есть что терять, кроме своего времени.`,`Если женщина плачет в кабинете — дай ей платок. Если мужчина — дай ему стакан воды.`,`Самое опасное оружие — не пистолет, а бухгалтерская книга.`,`Собака всегда знает убийцу. Но она не говорит, потому что у неё контракт.`,`Проверяй чеки, билеты и смс. Ложь не терпит документации.`,`Если у тела нет врагов — ты плохо искал врагов.`,`Лупа нужна не для увеличения улик, а для того, чтобы выглядеть умнее.`,`Интуиция — это когда ты уже знаешь ответ, но хочешь убедиться, что не ошибся.`,`Подозревай всех, даже самого себя. Иногда преступник — это ты в прошлом.`,`Хороший детектив видит улики. Великий — видит их отсутствие.`,`Никогда не допрашивай свидетеля на голодный желудок. И себя тоже.`,`Если дело зашло в тупик, переверни бумаги вверх ногами.`,`Самый ценный свидетель — это камера наблюдения, у которой сломана защита.`,`Не ищи мотив. Ищи возможность.`,`Преступник не оставляет следов. Он оставляет выбор.`,`Если дверь была закрыта изнутри — ищи люк, который открывается снаружи.`,`Лучший детектив — тот, кого не замечают в толпе.`,`Учись читать по губам. Пригодится на допросах с адвокатом.`,`Запах духов на месте преступления важнее запаха пороха.`,`Если ты нашел отпечаток пальца — проверь, не твой ли он.`,`Раскрыть дело — это искусство. Не раскрыть — тоже искусство, но другое.`,`Никогда не спорь с баллистикой. Она всегда права, даже если ты не согласен.`,`В каждом деле есть одна странная деталь. Найди её — и пазл сложится.`,`Если преступник умный — он оставит ложный след. Если глупый — он оставит следы в соцсетях.`,`Лучший друг детектива — тишина. Второй друг — кофе.`,`Если свидетель говорит слишком много, он врет. Если молчит — он тоже врет.`,`Преступление редко бывает идеальным. Идеальным бывает только алиби жены.`,`Всегда смотри на часы на трупе. Возможно, они показывают время, когда он перестал верить в людей.`,`Воры любят темноту. Детективы — свет. А маньяки — полную луну.`,`Если ты поймал преступника, не радуйся раньше времени — может, он просто лжец.`,`В каждом городе есть одно место, где собираются все сплетники. Начни оттуда.`,`Не верь в совпадения. Но верь в удачу.`,`Если у тебя нет улик — придумай их. Но только мысленно, чтобы знать, где искать.`,`Жертва всегда знала убийцу. Даже если она не знала, что знает.`,`Проверяй алиби на разрыв. Если оно выдерживает — ты ошибся.`,`Самый страшный враг детектива — не маньяк, а его собственная лень.`,`Если преступник оставил записку — прочитай её. И сожги, чтобы никто не узнал твой почерк.`,`Всегда носи с собой фонарик. Даже днём. Для эффекта.`,`В деле важно всё: от укуса комара до размера обуви.`,`Если ты думаешь, что дело простое — значит, ты не додумал.`,`Убийца всегда ищет внимания. Или наоборот, избегает его.`,`Стук в дверь в полночь — это либо полиция, либо заказчик.`,`Никогда не давай обещаний родственникам жертвы. Только факты.`,`Если у тебя есть три версии — выбирай четвёртую.`,`Лучшее оружие — это бумага. На ней можно написать что угодно.`,`Когда ты смотришь на улику, смотри на неё глазами преступника.`,`Все любят детективы, пока не становятся подозреваемыми.`,`Следы крови важны. Но важнее — следы лжи.`,`Если ты не спишь третьи сутки, значит, ты либо гений, либо дурак.`,`Проверяй каждого, кто говорит 'Я ничего не видел'.`,`В каждом деле есть один человек, который знает всё. И он не говорит.`,`Не суди преступника по одежде. Суди по тому, как он её снимал.`,`Дыра в алиби — это как дыра в лодке. Рано или поздно она утонет.`,`Если преступник использует перчатки — он профессионал. Если нет — он любитель.`,`Запомни: первая версия — всегда неверная.`,`Если у тебя кончились идеи, иди в бар. Там всегда есть кто-то, кто расскажет тебе дело.`,`Свидетель с фотороботом — это как слепой с компасом.`,`Никогда не смейся над уликами. Они могут обидеться и исчезнуть.`,`Если ты нашёл оружие — не трогай его. Иначе твои отпечатки будут на нём.`,`Преступник умён, но ты умнее. Потому что ты пьёшь правильный кофе.`,`Всегда пересматривай видеозаписи. Особенно в два раза медленнее.`,`Если на месте преступления есть кот — он видел всё. Но он не скажет.`,`Лучший способ поймать преступника — пригласить его на обед.`,`Если подозреваемый улыбается, он либо невиновен, либо психопат.`,`Проверяй мусор. В нём всегда есть что-то полезное.`,`Никогда не доверяй красивым историям. Только уродливым фактам.`,`Если ты нашёл улику слишком легко — это ловушка.`,`Убийца всегда оставляет послание. Даже если это просто тишина.`,`Если ты запнулся на допросе — делай вид, что так и задумано.`,`Помни: все врут. Даже я тебе советую.`,`Если ты боишься темноты — стань детективом. Страх пройдёт.`,`Самые лучшие признания случаются под утро, когда все устали.`,`Если преступник использовал компьютер, значит, он либо хакер, либо дурак.`,`Следы шин — это как подпись на дороге.`,`Никогда не забывай про запах. Он помнит дольше, чем люди.`,`Если ты не знаешь, что делать — съешь шоколадку.`,`В каждом деле есть одна минута слабости. Найди её.`,`Преступник всегда нервничает. Даже если он не нервничает.`,`Если у тебя есть подозреваемый и нет улик — подожди. Улики появятся.`,`Не верь в чудеса. Верь в логику.`,`Если ты устал — возьми отпуск. Преступление никуда не денется.`,`Запомни: самый опасный преступник — тот, кто читал детективы.`,`Если ты думаешь, что всё кончено — значит, ты пропустил поворот.`,`Следы на полу важнее следов в душе.`,`Если преступник оставил окурок — он курил. Или хотел, чтобы ты так думал.`,`Хороший детектив всегда голоден. Это помогает мыслить.`,`Не суди по первому впечатлению. Суди по второму, когда увидишь его в наручниках.`,`Если у тебя есть тайный агент — не доверяй ему.`,`В деле всегда есть тот, кто знает больше, чем говорит.`,`Если ты не можешь найти убийцу — стань им (в мыслях).`,`И последнее: всегда проверяй, закрыл ли ты дверь участка.`],d=[];i&&d.push(`☕ Понедельник: Сегодня даже преступники не хотят работать. Проверь тех, кто был слишком бодр.`),a&&d.push(`🔮 Пятница 13-е: Если улики ведут к чёрной кошке, ищи чёрного кота с алиби.`),o&&d.push(`🎄 Новый год: Свидетель в костюме Деда Мороза врёт. Настоящий Дед Мороз всегда в отпуске.`),s&&d.push(`☀️ Лето: В жару преступники забывают улики в карманах, потому что снимают пиджаки.`),c&&d.push(`❄️ Зима: Следы на снегу ведут к тому, у кого самые холодные руки.`),l&&d.push(`🌕 Полнолуние: Если подозреваемый воет на луну, он либо оборотень, либо фанат рока.`);let f=u.concat(d),p=f[Math.floor(Math.random()*f.length)],m=[`🔍 Заметки сыщика:`,`📓 Из дневника инспектора:`,`🕵️ Мудрость Шерлока:`,`🧠 Гениально и просто:`,`📌 Правило большого пальца:`,`☕ Кофейная истина:`];return{header:m[Math.floor(Math.random()*m.length)],text:p}}let F=P(),I=s(!1),L=s(``),R=s(``);async function z(){if(R.value=``,!await u.deleteAccount(L.value)){R.value=u.error||`Не удалось удалить аккаунт`;return}A.success(`Аккаунт и персональные данные удалены`),I.value=!1,v.push(`/login`)}return(a,s)=>(n(),f(c,null,[p(`div`,T,[p(`div`,E,[r(o(b),{title:o(F).header,"show-icon":!1,type:`info`,style:{"margin-bottom":`20px`}},{default:l(()=>[t(i(o(F).text),1)]),_:1},8,[`title`]),p(`p`,null,`Доброго времени суток, `+i(o(u).username)+`.`,1),p(`div`,D,[s[6]||=p(`div`,{class:`danger-zone-text`},[p(`div`,{class:`danger-zone-title`},`Удаление аккаунта`),p(`div`,{class:`danger-zone-hint`},` Удаление необратимо: аккаунт и все персональные данные будут стёрты (ст. 21 152-ФЗ). `)],-1),r(o(_),{type:`error`,ghost:``,onClick:s[0]||=e=>I.value=!0},{default:l(()=>[...s[5]||=[t(`Удалить аккаунт`,-1)]]),_:1})])])]),r(o(g),{show:I.value,"onUpdate:show":s[4]||=e=>I.value=e,class:`delete-modal`},{default:l(()=>[r(o(m),{title:`Удаление аккаунта`,bordered:!1,role:`dialog`,"aria-modal":`true`,closable:``,onClose:s[3]||=e=>I.value=!1},{default:l(()=>[s[9]||=p(`p`,{class:`delete-modal-text`},` Это действие необратимо. Для подтверждения удаления введите пароль от учётной записи — он понадобится, чтобы убедиться, что аккаунт удаляет его владелец. `,-1),r(o(y),{value:L.value,"onUpdate:value":s[1]||=e=>L.value=e,type:`password`,placeholder:`Пароль для подтверждения`,onKeyup:x(z,[`enter`])},null,8,[`value`]),R.value?(n(),f(`p`,O,i(R.value),1)):e(``,!0),p(`div`,k,[r(o(_),{onClick:s[2]||=e=>I.value=!1},{default:l(()=>[...s[7]||=[t(`Отмена`,-1)]]),_:1}),r(o(_),{type:`error`,disabled:L.value.length==0,loading:o(u).isLoading,onClick:z},{default:l(()=>[...s[8]||=[t(` Удалить навсегда `,-1)]]),_:1},8,[`disabled`,`loading`])])]),_:1})]),_:1},8,[`show`]),r(w,{active:`office`})],64))}}),[[`__scopeId`,`data-v-37e6a597`]]),j=u({__name:`OfficeView`,setup(e){return(e,t)=>(n(),a(A))}});export{j as default}; \ No newline at end of file +import{Ct as e,Dt as t,Kt as n,Ot as r,Rn as i,St as a,bn as o,hn as s,ht as c,in as l,kt as u,u as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-BGJkYb2B.js";import{n as h}from"./es-Qklex053.js";import{t as g}from"./Modal-xM6cEDIr.js";import{t as _}from"./Button-MBUKfT_Z.js";import{t as v}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as y}from"./Input-CEIE7mTC.js";import{t as b}from"./Alert-BoUmQeXf.js";import{i as x,lt as S,o as C}from"./index-NE0dsiiJ.js";import{t as w}from"./HeaderMenu-vnmT21Il.js";var T={class:`center-block-custom`},E={class:`width700`},D={class:`danger-zone`},O={key:0,class:`delete-modal-error`},k={class:`delete-modal-buttons`},A=v(u({__name:`OfficePage`,setup(a){let u=C(),v=d(),A=h(),j=x(),M=s([]);async function N(){M.value=[];try{let e=await j.GetPermissions({});M.value=e.permissions||[]}catch(e){A.error(`Не удалось загрузить права доступа`),console.error(`Failed to load permissions:`,e)}}N();function P(){let e=new Date,t=e.getDay(),n=e.getDate(),r=e.getMonth()+1,i=t===1,a=t===5&&n===13,o=r===1&&n===1||r===12&&n===31,s=r>=6&&r<=8,c=r===12||r<=2,l=n%5==0,u=[`Всегда носи с собой запасную ручку — признания любят записывать в самый неподходящий момент.`,`Если подозреваемый слишком вежлив, он либо дипломат, либо прячет труп в гараже.`,`Кофе в участке — это не напиток, это яд для улик. Пей только свой.`,`Следы на месте преступления всегда ведут к тому, кто забыл закрыть дверь.`,`Лучший способ разговорить молчуна — предложить ему чай с тремя ложками сахара.`,`Если всё указывает на дворецкого, ищи того, кто нанимал дворецкого.`,`Записывай каждую мелочь. Особенно цвет носков убитого.`,`Не верь алиби, которое начинается со слов 'Я бы никогда...'`,`Преступник всегда возвращается на место преступления. Или за забытым телефоном.`,`Ищи того, кому есть что терять, кроме своего времени.`,`Если женщина плачет в кабинете — дай ей платок. Если мужчина — дай ему стакан воды.`,`Самое опасное оружие — не пистолет, а бухгалтерская книга.`,`Собака всегда знает убийцу. Но она не говорит, потому что у неё контракт.`,`Проверяй чеки, билеты и смс. Ложь не терпит документации.`,`Если у тела нет врагов — ты плохо искал врагов.`,`Лупа нужна не для увеличения улик, а для того, чтобы выглядеть умнее.`,`Интуиция — это когда ты уже знаешь ответ, но хочешь убедиться, что не ошибся.`,`Подозревай всех, даже самого себя. Иногда преступник — это ты в прошлом.`,`Хороший детектив видит улики. Великий — видит их отсутствие.`,`Никогда не допрашивай свидетеля на голодный желудок. И себя тоже.`,`Если дело зашло в тупик, переверни бумаги вверх ногами.`,`Самый ценный свидетель — это камера наблюдения, у которой сломана защита.`,`Не ищи мотив. Ищи возможность.`,`Преступник не оставляет следов. Он оставляет выбор.`,`Если дверь была закрыта изнутри — ищи люк, который открывается снаружи.`,`Лучший детектив — тот, кого не замечают в толпе.`,`Учись читать по губам. Пригодится на допросах с адвокатом.`,`Запах духов на месте преступления важнее запаха пороха.`,`Если ты нашел отпечаток пальца — проверь, не твой ли он.`,`Раскрыть дело — это искусство. Не раскрыть — тоже искусство, но другое.`,`Никогда не спорь с баллистикой. Она всегда права, даже если ты не согласен.`,`В каждом деле есть одна странная деталь. Найди её — и пазл сложится.`,`Если преступник умный — он оставит ложный след. Если глупый — он оставит следы в соцсетях.`,`Лучший друг детектива — тишина. Второй друг — кофе.`,`Если свидетель говорит слишком много, он врет. Если молчит — он тоже врет.`,`Преступление редко бывает идеальным. Идеальным бывает только алиби жены.`,`Всегда смотри на часы на трупе. Возможно, они показывают время, когда он перестал верить в людей.`,`Воры любят темноту. Детективы — свет. А маньяки — полную луну.`,`Если ты поймал преступника, не радуйся раньше времени — может, он просто лжец.`,`В каждом городе есть одно место, где собираются все сплетники. Начни оттуда.`,`Не верь в совпадения. Но верь в удачу.`,`Если у тебя нет улик — придумай их. Но только мысленно, чтобы знать, где искать.`,`Жертва всегда знала убийцу. Даже если она не знала, что знает.`,`Проверяй алиби на разрыв. Если оно выдерживает — ты ошибся.`,`Самый страшный враг детектива — не маньяк, а его собственная лень.`,`Если преступник оставил записку — прочитай её. И сожги, чтобы никто не узнал твой почерк.`,`Всегда носи с собой фонарик. Даже днём. Для эффекта.`,`В деле важно всё: от укуса комара до размера обуви.`,`Если ты думаешь, что дело простое — значит, ты не додумал.`,`Убийца всегда ищет внимания. Или наоборот, избегает его.`,`Стук в дверь в полночь — это либо полиция, либо заказчик.`,`Никогда не давай обещаний родственникам жертвы. Только факты.`,`Если у тебя есть три версии — выбирай четвёртую.`,`Лучшее оружие — это бумага. На ней можно написать что угодно.`,`Когда ты смотришь на улику, смотри на неё глазами преступника.`,`Все любят детективы, пока не становятся подозреваемыми.`,`Следы крови важны. Но важнее — следы лжи.`,`Если ты не спишь третьи сутки, значит, ты либо гений, либо дурак.`,`Проверяй каждого, кто говорит 'Я ничего не видел'.`,`В каждом деле есть один человек, который знает всё. И он не говорит.`,`Не суди преступника по одежде. Суди по тому, как он её снимал.`,`Дыра в алиби — это как дыра в лодке. Рано или поздно она утонет.`,`Если преступник использует перчатки — он профессионал. Если нет — он любитель.`,`Запомни: первая версия — всегда неверная.`,`Если у тебя кончились идеи, иди в бар. Там всегда есть кто-то, кто расскажет тебе дело.`,`Свидетель с фотороботом — это как слепой с компасом.`,`Никогда не смейся над уликами. Они могут обидеться и исчезнуть.`,`Если ты нашёл оружие — не трогай его. Иначе твои отпечатки будут на нём.`,`Преступник умён, но ты умнее. Потому что ты пьёшь правильный кофе.`,`Всегда пересматривай видеозаписи. Особенно в два раза медленнее.`,`Если на месте преступления есть кот — он видел всё. Но он не скажет.`,`Лучший способ поймать преступника — пригласить его на обед.`,`Если подозреваемый улыбается, он либо невиновен, либо психопат.`,`Проверяй мусор. В нём всегда есть что-то полезное.`,`Никогда не доверяй красивым историям. Только уродливым фактам.`,`Если ты нашёл улику слишком легко — это ловушка.`,`Убийца всегда оставляет послание. Даже если это просто тишина.`,`Если ты запнулся на допросе — делай вид, что так и задумано.`,`Помни: все врут. Даже я тебе советую.`,`Если ты боишься темноты — стань детективом. Страх пройдёт.`,`Самые лучшие признания случаются под утро, когда все устали.`,`Если преступник использовал компьютер, значит, он либо хакер, либо дурак.`,`Следы шин — это как подпись на дороге.`,`Никогда не забывай про запах. Он помнит дольше, чем люди.`,`Если ты не знаешь, что делать — съешь шоколадку.`,`В каждом деле есть одна минута слабости. Найди её.`,`Преступник всегда нервничает. Даже если он не нервничает.`,`Если у тебя есть подозреваемый и нет улик — подожди. Улики появятся.`,`Не верь в чудеса. Верь в логику.`,`Если ты устал — возьми отпуск. Преступление никуда не денется.`,`Запомни: самый опасный преступник — тот, кто читал детективы.`,`Если ты думаешь, что всё кончено — значит, ты пропустил поворот.`,`Следы на полу важнее следов в душе.`,`Если преступник оставил окурок — он курил. Или хотел, чтобы ты так думал.`,`Хороший детектив всегда голоден. Это помогает мыслить.`,`Не суди по первому впечатлению. Суди по второму, когда увидишь его в наручниках.`,`Если у тебя есть тайный агент — не доверяй ему.`,`В деле всегда есть тот, кто знает больше, чем говорит.`,`Если ты не можешь найти убийцу — стань им (в мыслях).`,`И последнее: всегда проверяй, закрыл ли ты дверь участка.`],d=[];i&&d.push(`☕ Понедельник: Сегодня даже преступники не хотят работать. Проверь тех, кто был слишком бодр.`),a&&d.push(`🔮 Пятница 13-е: Если улики ведут к чёрной кошке, ищи чёрного кота с алиби.`),o&&d.push(`🎄 Новый год: Свидетель в костюме Деда Мороза врёт. Настоящий Дед Мороз всегда в отпуске.`),s&&d.push(`☀️ Лето: В жару преступники забывают улики в карманах, потому что снимают пиджаки.`),c&&d.push(`❄️ Зима: Следы на снегу ведут к тому, у кого самые холодные руки.`),l&&d.push(`🌕 Полнолуние: Если подозреваемый воет на луну, он либо оборотень, либо фанат рока.`);let f=u.concat(d),p=f[Math.floor(Math.random()*f.length)],m=[`🔍 Заметки сыщика:`,`📓 Из дневника инспектора:`,`🕵️ Мудрость Шерлока:`,`🧠 Гениально и просто:`,`📌 Правило большого пальца:`,`☕ Кофейная истина:`];return{header:m[Math.floor(Math.random()*m.length)],text:p}}let F=P(),I=s(!1),L=s(``),R=s(``);async function z(){if(R.value=``,!await u.deleteAccount(L.value)){R.value=u.error||`Не удалось удалить аккаунт`;return}A.success(`Аккаунт и персональные данные удалены`),I.value=!1,v.push(`/login`)}return(a,s)=>(n(),f(c,null,[p(`div`,T,[p(`div`,E,[r(o(b),{title:o(F).header,"show-icon":!1,type:`info`,style:{"margin-bottom":`20px`}},{default:l(()=>[t(i(o(F).text),1)]),_:1},8,[`title`]),p(`p`,null,`Доброго времени суток, `+i(o(u).username)+`.`,1),p(`div`,D,[s[6]||=p(`div`,{class:`danger-zone-text`},[p(`div`,{class:`danger-zone-title`},`Удаление аккаунта`),p(`div`,{class:`danger-zone-hint`},` Удаление необратимо: аккаунт и все персональные данные будут стёрты (ст. 21 152-ФЗ). `)],-1),r(o(_),{type:`error`,ghost:``,onClick:s[0]||=e=>I.value=!0},{default:l(()=>[...s[5]||=[t(`Удалить аккаунт`,-1)]]),_:1})])])]),r(o(g),{show:I.value,"onUpdate:show":s[4]||=e=>I.value=e,class:`delete-modal`},{default:l(()=>[r(o(m),{title:`Удаление аккаунта`,bordered:!1,role:`dialog`,"aria-modal":`true`,closable:``,onClose:s[3]||=e=>I.value=!1},{default:l(()=>[s[9]||=p(`p`,{class:`delete-modal-text`},` Это действие необратимо. Для подтверждения удаления введите пароль от учётной записи — он понадобится, чтобы убедиться, что аккаунт удаляет его владелец. `,-1),r(o(y),{value:L.value,"onUpdate:value":s[1]||=e=>L.value=e,type:`password`,placeholder:`Пароль для подтверждения`,onKeyup:S(z,[`enter`])},null,8,[`value`]),R.value?(n(),f(`p`,O,i(R.value),1)):e(``,!0),p(`div`,k,[r(o(_),{onClick:s[2]||=e=>I.value=!1},{default:l(()=>[...s[7]||=[t(`Отмена`,-1)]]),_:1}),r(o(_),{type:`error`,disabled:L.value.length==0,loading:o(u).isLoading,onClick:z},{default:l(()=>[...s[8]||=[t(` Удалить навсегда `,-1)]]),_:1},8,[`disabled`,`loading`])])]),_:1})]),_:1},8,[`show`]),r(w,{active:`office`})],64))}}),[[`__scopeId`,`data-v-37e6a597`]]),j=u({__name:`OfficeView`,setup(e){return(e,t)=>(n(),a(A))}});export{j as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ParticipationView-23fnBpOl.js b/frontend/dist/assets/ParticipationView-TaV4rzMo.js similarity index 92% rename from frontend/dist/assets/ParticipationView-23fnBpOl.js rename to frontend/dist/assets/ParticipationView-TaV4rzMo.js index a3b98bf..1e5d65f 100644 --- a/frontend/dist/assets/ParticipationView-23fnBpOl.js +++ b/frontend/dist/assets/ParticipationView-TaV4rzMo.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Kt as n,Ot as r,Rn as i,St as a,Ut as o,bn as s,hn as c,ht as l,in as u,kt as d,l as f,t as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Card-D1LVu21r.js";import{t as _}from"./Button-lcMg8vK2.js";import{t as v}from"./Space-Ka5Z-MRX.js";import{o as y}from"./index-6B3OmSLg.js";import{t as b}from"./HeaderMenu-BhocR0ua.js";import{t as x}from"./datetime-BJNH0M1T.js";var S={class:`center-block-custom`},C={class:`width700`},w={key:0,role:`alert`},T={key:0,role:`status`},E={key:1,role:`status`},D={key:2},O=d({__name:`ParticipationPage`,setup(d){let O=f(),k=new URLSearchParams(O.hash.slice(1)),A=k.get(`token`)||``,j=c(k.get(`answer`)===`cancelled`?`cancelled`:`confirmed`),M=p(),N=y(),P=c(),F=c(!1),I=c(``);async function L(){F.value=!0,I.value=``;try{let e=await M.GetParticipation({token:A});P.value=e}catch{I.value=`Не удалось загрузить данные. Попробуйте ещё раз.`}finally{F.value=!1}}async function R(){if(!F.value){F.value=!0,I.value=``;try{let e=await M.AnswerParticipation({token:A,answer:j.value});P.value=e}catch{I.value=`Не удалось сохранить ответ. Попробуйте ещё раз.`}finally{F.value=!1}}}return o(L),(o,c)=>(n(),m(l,null,[s(N).isAuthenticated?(n(),a(b,{key:0})):e(``,!0),h(`div`,S,[h(`div`,C,[r(s(g),{title:`Участие в игре`},{default:u(()=>[I.value?(n(),m(`p`,w,i(I.value),1)):e(``,!0),P.value?(n(),m(l,{key:1},[h(`h2`,null,i(P.value.gameName),1),h(`p`,null,`Команда: `+i(P.value.teamName),1),h(`p`,null,`Начало: `+i(s(x)(P.value.startAt)),1),h(`p`,null,`Участников: `+i(P.value.participantsCount),1),P.value.status===`confirmed`?(n(),m(`p`,T,` Участие подтверждено. Ждём вас на игре! Решение окончательное. `)):P.value.status===`cancelled`?(n(),m(`p`,E,` Запись отменена. Решение окончательное. `)):P.value.closed?(n(),m(`p`,D,` Приём ответов закрыт. Ваша запись сохранена со статусом «Ожидает ответа». `)):(n(),m(l,{key:3},[c[4]||=h(`p`,null,[h(`strong`,null,`Решение окончательное: изменить его нельзя.`)],-1),c[5]||=h(`p`,null,`Без ответа запись сохраняется со статусом «Ожидает ответа».`,-1),r(s(v),{vertical:``},{default:u(()=>[r(s(v),null,{default:u(()=>[r(s(_),{disabled:F.value,type:j.value===`confirmed`?`primary`:`default`,"aria-pressed":j.value===`confirmed`,onClick:c[0]||=e=>j.value=`confirmed`},{default:u(()=>[...c[2]||=[t(`Мы участвуем`,-1)]]),_:1},8,[`disabled`,`type`,`aria-pressed`]),r(s(_),{disabled:F.value,type:j.value===`cancelled`?`error`:`default`,"aria-pressed":j.value===`cancelled`,onClick:c[1]||=e=>j.value=`cancelled`},{default:u(()=>[...c[3]||=[t(`Мы не участвуем`,-1)]]),_:1},8,[`disabled`,`type`,`aria-pressed`])]),_:1}),r(s(_),{loading:F.value,disabled:F.value,type:j.value===`cancelled`?`error`:`primary`,onClick:R},{default:u(()=>[t(i(j.value===`confirmed`?`Подтверждаю участие`:`Подтверждаю отмену`),1)]),_:1},8,[`loading`,`disabled`,`type`])]),_:1})],64))],64)):(n(),a(s(_),{key:2,loading:F.value,onClick:L},{default:u(()=>[t(i(F.value?`Загрузка`:`Повторить`),1)]),_:1},8,[`loading`]))]),_:1})])])],64))}}),k=d({__name:`ParticipationView`,setup(e){return(e,t)=>(n(),a(O))}});export{k as default}; \ No newline at end of file +import{Ct as e,Dt as t,Kt as n,Ot as r,Rn as i,St as a,Ut as o,bn as s,hn as c,ht as l,in as u,kt as d,l as f,t as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Card-BGJkYb2B.js";import{t as _}from"./Button-MBUKfT_Z.js";import{t as v}from"./Space-CstX9TL6.js";import{o as y}from"./index-NE0dsiiJ.js";import{t as b}from"./HeaderMenu-vnmT21Il.js";import{t as x}from"./datetime-BJNH0M1T.js";var S={class:`center-block-custom`},C={class:`width700`},w={key:0,role:`alert`},T={key:0,role:`status`},E={key:1,role:`status`},D={key:2},O=d({__name:`ParticipationPage`,setup(d){let O=f(),k=new URLSearchParams(O.hash.slice(1)),A=k.get(`token`)||``,j=c(k.get(`answer`)===`cancelled`?`cancelled`:`confirmed`),M=p(),N=y(),P=c(),F=c(!1),I=c(``);async function L(){F.value=!0,I.value=``;try{let e=await M.GetParticipation({token:A});P.value=e}catch{I.value=`Не удалось загрузить данные. Попробуйте ещё раз.`}finally{F.value=!1}}async function R(){if(!F.value){F.value=!0,I.value=``;try{let e=await M.AnswerParticipation({token:A,answer:j.value});P.value=e}catch{I.value=`Не удалось сохранить ответ. Попробуйте ещё раз.`}finally{F.value=!1}}}return o(L),(o,c)=>(n(),m(l,null,[s(N).isAuthenticated?(n(),a(b,{key:0})):e(``,!0),h(`div`,S,[h(`div`,C,[r(s(g),{title:`Участие в игре`},{default:u(()=>[I.value?(n(),m(`p`,w,i(I.value),1)):e(``,!0),P.value?(n(),m(l,{key:1},[h(`h2`,null,i(P.value.gameName),1),h(`p`,null,`Команда: `+i(P.value.teamName),1),h(`p`,null,`Начало: `+i(s(x)(P.value.startAt)),1),h(`p`,null,`Участников: `+i(P.value.participantsCount),1),P.value.status===`confirmed`?(n(),m(`p`,T,` Участие подтверждено. Ждём вас на игре! Решение окончательное. `)):P.value.status===`cancelled`?(n(),m(`p`,E,` Запись отменена. Решение окончательное. `)):P.value.closed?(n(),m(`p`,D,` Приём ответов закрыт. Ваша запись сохранена со статусом «Ожидает ответа». `)):(n(),m(l,{key:3},[c[4]||=h(`p`,null,[h(`strong`,null,`Решение окончательное: изменить его нельзя.`)],-1),c[5]||=h(`p`,null,`Без ответа запись сохраняется со статусом «Ожидает ответа».`,-1),r(s(v),{vertical:``},{default:u(()=>[r(s(v),null,{default:u(()=>[r(s(_),{disabled:F.value,type:j.value===`confirmed`?`primary`:`default`,"aria-pressed":j.value===`confirmed`,onClick:c[0]||=e=>j.value=`confirmed`},{default:u(()=>[...c[2]||=[t(`Мы участвуем`,-1)]]),_:1},8,[`disabled`,`type`,`aria-pressed`]),r(s(_),{disabled:F.value,type:j.value===`cancelled`?`error`:`default`,"aria-pressed":j.value===`cancelled`,onClick:c[1]||=e=>j.value=`cancelled`},{default:u(()=>[...c[3]||=[t(`Мы не участвуем`,-1)]]),_:1},8,[`disabled`,`type`,`aria-pressed`])]),_:1}),r(s(_),{loading:F.value,disabled:F.value,type:j.value===`cancelled`?`error`:`primary`,onClick:R},{default:u(()=>[t(i(j.value===`confirmed`?`Подтверждаю участие`:`Подтверждаю отмену`),1)]),_:1},8,[`loading`,`disabled`,`type`])]),_:1})],64))],64)):(n(),a(s(_),{key:2,loading:F.value,onClick:L},{default:u(()=>[t(i(F.value?`Загрузка`:`Повторить`),1)]),_:1},8,[`loading`]))]),_:1})])])],64))}}),k=d({__name:`ParticipationView`,setup(e){return(e,t)=>(n(),a(O))}});export{k as default}; \ No newline at end of file diff --git a/frontend/dist/assets/PlaceBlock-BQyPRoGX.js b/frontend/dist/assets/PlaceBlock-BQyPRoGX.js new file mode 100644 index 0000000..1cc10fd --- /dev/null +++ b/frontend/dist/assets/PlaceBlock-BQyPRoGX.js @@ -0,0 +1,106 @@ +import{Ct as e,Dt as t,Et as n,H as r,In as i,Jt as a,Kt as o,Ln as s,Mt as c,Ot as l,Pt as u,Rn as d,St as f,U as p,Y as m,Yt as h,_n as g,at as _,bn as v,bt as y,cn as b,d as ee,f as x,g as S,hn as C,ht as w,in as T,it as E,kt as D,m as O,nt as k,ot as A,p as j,qt as M,r as te,tt as N,vn as P,wt as F,xt as I}from"./client-Bz0sY7Lm.js";import{t as ne}from"./Card-BGJkYb2B.js";import{r as re,t as ie}from"./es-Qklex053.js";import{i as ae}from"./Suffix-BBRLYxYK.js";import{t as oe}from"./Modal-xM6cEDIr.js";import{t as L}from"./use-merged-state-z45UzW9G.js";import{r as se,t as R}from"./Button-MBUKfT_Z.js";import{a as z,c as ce,i as le,t as ue}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as de,t as B}from"./Upload-DxQHkPqo.js";import{t as fe}from"./use-form-item-Bl3X3aXB.js";import{t as pe}from"./Add-BlaQeLtQ.js";import{t as V}from"./Input-CEIE7mTC.js";import{n as me,t as he}from"./Switch-DEzgODFH.js";import{t as H}from"./Space-CstX9TL6.js";import{t as U}from"./text-LOpQkUng.js";import{D as ge,J as W,g as _e,k as ve,nt as ye,ut as G}from"./index-NE0dsiiJ.js";import{n as K,r as q,t as be}from"./application-Bg005825.js";import{t as xe}from"./MessagePaper-C6R1Irzd.js";var Se=D({name:`ArrowDown`,render(){return c(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},c(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},c(`g`,{"fill-rule":`nonzero`},c(`path`,{d:`M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z`}))))}}),Ce=D({name:`ArrowUp`,render(){return c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},c(`g`,{fill:`none`},c(`path`,{d:`M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z`,fill:`currentColor`})))}}),we=k(`input-group`,` + display: inline-flex; + width: 100%; + flex-wrap: nowrap; + vertical-align: bottom; +`,[N(`>`,[k(`input`,[N(`&:not(:last-child)`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `),N(`&:not(:first-child)`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + margin-left: -1px!important; + `)]),k(`button`,[N(`&:not(:last-child)`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `,[E(`state-border, border`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `)]),N(`&:not(:first-child)`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `,[E(`state-border, border`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `)])]),N(`*`,[N(`&:not(:last-child)`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `,[N(`>`,[k(`input`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `),k(`base-selection`,[k(`base-selection-label`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `),k(`base-selection-tags`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `),E(`box-shadow, border, state-border`,` + border-top-right-radius: 0!important; + border-bottom-right-radius: 0!important; + `)])])]),N(`&:not(:first-child)`,` + margin-left: -1px!important; + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `,[N(`>`,[k(`input`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `),k(`base-selection`,[k(`base-selection-label`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `),k(`base-selection-tags`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `),E(`box-shadow, border, state-border`,` + border-top-left-radius: 0!important; + border-bottom-left-radius: 0!important; + `)])])])])])]),J=D({name:`InputGroup`,props:{},setup(e){let{mergedClsPrefixRef:t}=p(e);return O(`-input-group`,we,t),{mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return c(`div`,{class:`${e}-input-group`},this.$slots)}}),Y=`0!important`,Te=`-1px!important`;function X(e){return _(`${e}-type`,[N(`& +`,[k(`button`,{},[_(`${e}-type`,[E(`border`,{borderLeftWidth:Y}),E(`state-border`,{left:Te})])])])])}function Z(e){return _(`${e}-type`,[N(`& +`,[k(`button`,[_(`${e}-type`,[E(`border`,{borderTopWidth:Y}),E(`state-border`,{top:Te})])])])])}var Ee=k(`button-group`,` + flex-wrap: nowrap; + display: inline-flex; + position: relative; +`,[A(`vertical`,{flexDirection:`row`},[A(`rtl`,[k(`button`,[N(`&:first-child:not(:last-child)`,` + margin-right: ${Y}; + border-top-right-radius: ${Y}; + border-bottom-right-radius: ${Y}; + `),N(`&:last-child:not(:first-child)`,` + margin-left: ${Y}; + border-top-left-radius: ${Y}; + border-bottom-left-radius: ${Y}; + `),N(`&:not(:first-child):not(:last-child)`,` + margin-left: ${Y}; + margin-right: ${Y}; + border-radius: ${Y}; + `),X(`default`),_(`ghost`,[X(`primary`),X(`info`),X(`success`),X(`warning`),X(`error`)])])])]),_(`vertical`,{flexDirection:`column`},[k(`button`,[N(`&:first-child:not(:last-child)`,` + margin-bottom: ${Y}; + margin-left: ${Y}; + margin-right: ${Y}; + border-bottom-left-radius: ${Y}; + border-bottom-right-radius: ${Y}; + `),N(`&:last-child:not(:first-child)`,` + margin-top: ${Y}; + margin-left: ${Y}; + margin-right: ${Y}; + border-top-left-radius: ${Y}; + border-top-right-radius: ${Y}; + `),N(`&:not(:first-child):not(:last-child)`,` + margin: ${Y}; + border-radius: ${Y}; + `),Z(`default`),_(`ghost`,[Z(`primary`),Z(`info`),Z(`success`),Z(`warning`),Z(`error`)])])])]),De=D({name:`ButtonGroup`,props:{size:String,vertical:Boolean},setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=p(e);return O(`-button-group`,Ee,t),M(se,e),{rtlEnabled:S(`ButtonGroup`,n,t),mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return c(`div`,{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:`group`},this.$slots)}});function Oe(){return _e}var ke=x({name:`DynamicInput`,common:ee,peers:{Input:ve,Button:ge},self:Oe}),Ae=m(`n-dynamic-input`),je=D({name:`DynamicInputInputPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:String,default:``},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){let{mergedThemeRef:e,placeholderRef:t}=u(Ae);return{mergedTheme:e,placeholder:t}},render(){let{mergedTheme:e,placeholder:t,value:n,clsPrefix:r,onUpdateValue:i,disabled:a}=this;return c(`div`,{class:`${r}-dynamic-input-preset-input`},c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n,placeholder:t,onUpdateValue:i,disabled:a}))}}),Me=D({name:`DynamicInputPairPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:``,value:``})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){let{mergedThemeRef:t,keyPlaceholderRef:n,valuePlaceholderRef:r}=u(Ae);return{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:r,handleKeyInput(t){e.onUpdateValue({key:t,value:e.value.value})},handleValueInput(t){e.onUpdateValue({key:e.value.key,value:t})}}},render(){let{mergedTheme:e,keyPlaceholder:t,valuePlaceholder:n,value:r,clsPrefix:i,disabled:a}=this;return c(`div`,{class:`${i}-dynamic-input-preset-pair`},c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.key,class:`${i}-dynamic-input-pair-input`,placeholder:t,onUpdateValue:this.handleKeyInput,disabled:a}),c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.value,class:`${i}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleValueInput,disabled:a}))}}),Ne=k(`dynamic-input`,{width:`100%`},[k(`dynamic-input-item`,` + margin-bottom: 10px; + display: flex; + flex-wrap: nowrap; + `,[k(`dynamic-input-preset-input`,{flex:1,alignItems:`center`}),k(`dynamic-input-preset-pair`,` + flex: 1; + display: flex; + align-items: center; + `,[k(`dynamic-input-pair-input`,[N(`&:first-child`,{"margin-right":`12px`})])]),E(`action`,` + align-self: flex-start; + display: flex; + justify-content: flex-end; + flex-shrink: 0; + flex-grow: 0; + margin: var(--action-margin); + `,[_(`icon`,{cursor:`pointer`})]),N(`&:last-child`,{marginBottom:0})]),k(`form-item`,` + padding-top: 0 !important; + margin-right: 0 !important; + `,[k(`form-item-blank`,{paddingTop:`0 !important`})])]),Q=new WeakMap,$=D({name:`DynamicInput`,props:Object.assign(Object.assign({},j.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:`input`},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:``},valuePlaceholder:{type:String,default:``},placeholder:{type:String,default:``},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),setup(e,{slots:t}){let{mergedComponentPropsRef:n,mergedClsPrefixRef:i,mergedRtlRef:a,inlineThemeDisabled:o}=p(),s=u(fe,null),c=C(e.defaultValue),l=L(P(e,`value`),c),d=j(`DynamicInput`,`-dynamic-input`,Ne,ke,e,i),f=y(()=>{let{value:t}=l;if(Array.isArray(t)){let{max:n}=e;return n!==void 0&&t.length>=n}return!1}),m=y(()=>{let{value:t}=l;return Array.isArray(t)?t.length<=e.min:!0}),h=y(()=>n?.value?.DynamicInput?.buttonSize);function _(t){let{onInput:n,"onUpdate:value":r,onUpdateValue:i}=e;n&&ce(n,t),r&&ce(r,t),i&&ce(i,t),c.value=t}function v(e,t){if(typeof e!=`object`||!e)return t;let n=b(e)?g(e):e,r=Q.get(n);return r===void 0&&Q.set(n,r=ye()),r}function ee(e,t){let{value:n}=l,r=Array.from(n??[]),i=r[e];if(r[e]=t,i&&t&&typeof i==`object`&&typeof t==`object`){let e=b(i)?g(i):i,n=b(t)?g(t):t,r=Q.get(e);r!==void 0&&Q.set(n,r)}_(r)}function x(){w(-1)}function w(n){let{value:r}=l,{onCreate:i}=e,a=Array.from(r??[]);if(i)a.splice(n+1,0,i(n+1)),_(a);else if(t.default)a.splice(n+1,0,null),_(a);else switch(e.preset){case`input`:a.splice(n+1,0,``),_(a);break;case`pair`:a.splice(n+1,0,{key:``,value:``}),_(a);break}}function T(t){let{value:n}=l;if(!Array.isArray(n))return;let{min:r}=e;if(n.length<=r)return;let{onRemove:i}=e;i&&i(t);let a=Array.from(n);a.splice(t,1),_(a)}function E(e,t,n){if(t<0||n<0||t>=e.length||n>=e.length||t===n)return;let r=e[t];e[t]=e[n],e[n]=r}function D(e,t){let{value:n}=l;if(!Array.isArray(n))return;let r=Array.from(n);e===`up`&&E(r,t,t-1),e===`down`&&E(r,t,t+1),_(r)}M(Ae,{mergedThemeRef:d,keyPlaceholderRef:P(e,`keyPlaceholder`),valuePlaceholderRef:P(e,`valuePlaceholder`),placeholderRef:P(e,`placeholder`)});let O=S(`DynamicInput`,a,i),k=y(()=>{let{self:{actionMargin:e,actionMarginRtl:t}}=d.value;return{"--action-margin":e,"--action-margin-rtl":t}}),A=o?r(`dynamic-input`,void 0,k,e):void 0;return{locale:ae(`DynamicInput`).localeRef,rtlEnabled:O,buttonSize:h,mergedClsPrefix:i,NFormItem:s,uncontrolledValue:c,mergedValue:l,insertionDisabled:f,removeDisabled:m,handleCreateClick:x,ensureKey:v,handleValueChange:ee,remove:T,move:D,createItem:w,mergedTheme:d,cssVars:o?void 0:k,themeClass:A?.themeClass,onRender:A?.onRender}},render(){let{$slots:e,itemClass:t,buttonSize:n,mergedClsPrefix:r,mergedValue:i,locale:a,mergedTheme:o,keyField:s,itemStyle:l,preset:u,showSortButton:d,NFormItem:f,ensureKey:p,handleValueChange:m,remove:h,createItem:g,move:_,onRender:v,disabled:y}=this;return v?.(),c(`div`,{class:[`${r}-dynamic-input`,this.rtlEnabled&&`${r}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(i)||i.length===0?c(R,Object.assign({block:!0,ghost:!0,dashed:!0,size:n},this.createButtonProps,{disabled:this.insertionDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>le(e[`create-button-default`],()=>[a.create]),icon:()=>le(e[`create-button-icon`],()=>[c(W,{clsPrefix:r},{default:()=>c(pe,null)})])}):i.map((a,v)=>c(`div`,{key:s?a[s]:p(a,v),"data-key":s?a[s]:p(a,v),class:[`${r}-dynamic-input-item`,t],style:l},z(e.default,{value:i[v],index:v},()=>[u===`input`?c(je,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):u===`pair`?c(Me,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):null]),z(e.action,{value:i[v],index:v,create:g,remove:h,move:_},()=>[c(`div`,{class:`${r}-dynamic-input-item__action`},c(De,{size:n},{default:()=>[c(R,{disabled:this.removeDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,circle:!0,onClick:()=>{h(v)}},{icon:()=>c(W,{clsPrefix:r},{default:()=>c(me,null)})}),c(R,{disabled:this.insertionDisabled||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{g(v)}},{icon:()=>c(W,{clsPrefix:r},{default:()=>c(pe,null)})}),d?c(R,{disabled:v===0||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`up`,v)}},{icon:()=>c(W,{clsPrefix:r},{default:()=>c(Ce,null)})}):null,d?c(R,{disabled:v===i.length-1||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`down`,v)}},{icon:()=>c(W,{clsPrefix:r},{default:()=>c(Se,null)})}):null]}))]))))}}),Pe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Fe=D({name:`CloseOutlined`,render:function(e,t){return o(),F(`svg`,Pe,t[0]||=[I(`path`,{d:`M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z`,fill:`currentColor`},null,-1)])}}),Ie={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Le=D({name:`LockOutlined`,render:function(e,t){return o(),F(`svg`,Ie,t[0]||=[I(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2z`,fill:`currentColor`},null,-1)])}}),Re={key:0},ze={class:`intro-text font`},Be={key:0,class:`intro-audio-block`},Ve=[`src`],He={class:`message-content`},Ue={key:0},We={key:1,class:`intro-empty`},Ge={key:2,class:`intro-audio-block`},Ke=[`src`],qe={key:2,class:`place-block`},Je={class:`intro-edit-audio`},Ye=[`src`],Xe={class:`slot-block`},Ze=ue(D({__name:`IntroBlock`,props:{introduction:{},mode:{}},emits:[`update:mode`],setup(n,{emit:r}){let i=n,a=r,s=e=>{a(`update:mode`,e)},c=y(()=>!!i.introduction?.text),u=y(()=>!!i.introduction?.audio),p=y(()=>{let e=i.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${te()}/api/files/${encodeURIComponent(e)}`}),m=()=>{i.introduction&&(i.introduction.audio=``,i.introduction.fileList=void 0)};return(r,a)=>(o(),F(w,null,[n.mode==`show`?(o(),F(`div`,Re,[l(xe,null,{default:T(()=>[a[4]||=I(`div`,{class:`font`},`Вступление`,-1),a[5]||=I(`hr`,{class:`intro-hr`},null,-1),I(`div`,ze,d(n.introduction.text),1),u.value?(o(),F(`div`,Be,[I(`audio`,{src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ve)])):e(``,!0)]),_:1})])):e(``,!0),n.mode==`show-editor`?(o(),F(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:a[0]||=e=>s(`edit`)},[a[6]||=I(`div`,{class:`message-header`},`Вступление`,-1),a[7]||=I(`hr`,{class:`hr`},null,-1),I(`div`,He,[c.value?(o(),F(`span`,Ue,d(n.introduction.text),1)):(o(),F(`span`,We,`Введение не задано — нажмите, чтобы добавить`)),u.value?(o(),F(`div`,Ge,[I(`audio`,{src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ke)])):e(``,!0)])])):e(``,!0),n.mode==`edit`?(o(),F(`div`,qe,[l(v(H),{vertical:``},{default:T(()=>[a[11]||=I(`p`,{class:`settings-header`},`Текст вступления`,-1),l(v(V),{value:i.introduction.text,"onUpdate:value":a[1]||=e=>i.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),a[12]||=I(`p`,{class:`settings-header`},`Аудио вступления`,-1),I(`div`,Je,[l(v(H),{vertical:``},{default:T(()=>[u.value?(o(),F(`audio`,{key:0,src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ye)):(o(),f(v(U),{key:1,depth:`3`},{default:T(()=>[...a[8]||=[t(`Аудио не задано`,-1)]]),_:1})),l(v(R),{onClick:a[2]||=e=>m(),disabled:!u.value},{default:T(()=>[...a[9]||=[t(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),l(v(B),{"directory-dnd":``,max:1,"file-list":i.introduction.fileList,"onUpdate:fileList":a[3]||=e=>i.introduction.fileList=e},{default:T(()=>[l(v(de),null,{default:T(()=>[l(v(U),{style:{"font-size":`16px`}},{default:T(()=>[...a[10]||=[t(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),I(`div`,Xe,[h(r.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0)],64))}}),[[`__scopeId`,`data-v-11f63e45`]]),Qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},$e=D({name:`Key24Regular`,render:function(e,t){return o(),F(`svg`,Qe,t[0]||=[I(`g`,{fill:`none`},[I(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),et={key:1,class:`place-block`},tt={class:`message-header`},nt={class:`message-content`},rt={key:0},it=[`src`,`alt`],at={class:`door-button-label`},ot={key:0,class:`hr`},st={class:`application-name`},ct=[`onClick`],lt=[`src`,`alt`],ut=[`src`],dt=[`href`],ft={class:`gray-block`},pt={key:0},mt={key:3},ht={class:`message-show-header font`},gt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},_t={class:`message-show-content font`},vt={key:0},yt=[`src`,`alt`],bt=[`src`,`alt`],xt={key:2,class:`show-applications-block`},St=[`onClick`],Ct=[`src`,`alt`],wt={key:0,class:`show-hr`},Tt=[`onClick`],Et={class:`button-dialog-text`},Dt={key:1,class:`show-hr`},Ot=[`href`],kt={class:`application-label`},At=[`src`],jt={key:4},Mt={class:`message-header font`},Nt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},Pt={key:5,class:`place-block`},Ft=[`src`,`alt`],It={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Lt={key:0,class:`application-edit-file`},Rt=[`src`,`alt`],zt=[`src`],Bt=[`href`],Vt={style:{display:`flex`,"flex-direction":`column`}},Ht={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Ut={class:`door-add-block`},Wt={class:`door-field`},Gt={style:{"align-items":`center`,display:`flex`,width:`100%`}},Kt={style:{"align-items":`center`,display:`flex`,width:`100%`}},qt={class:`slot-block`},Jt={key:0,class:`view-application-image-block`},Yt=[`src`,`alt`],Xt=[`src`],Zt=[`src`],Qt={key:3,class:`view-application-image-block`},$t=[`src`,`alt`],en=ue(D({__name:`PlaceBlock`,props:{newPlaceCode:{},newPlaceName:{},newPlaceText:{},place:{},mode:{},mcp:{type:Boolean,default:!1},addAction:{}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`,`navigate`],setup(r,{emit:c}){let u=r,f=c,p=e=>{f(`update:newPlaceCode`,e)},m=e=>{f(`update:newPlaceName`,e)},g=e=>{f(`update:newPlaceText`,e)},_=e=>{f(`update:mode`,e)};function b(){return{name:void 0,image:void 0,file_type:void 0}}function ee(){return{code:void 0,name:void 0,keys:void 0}}function x(){return{name:void 0}}function S(e){return e}function E(e){e.image=void 0,e.file_type=void 0,e.fileList=void 0}let D=C(null),O=C(null),k=C(!1),A=y(()=>O.value?O.value.url:K(D.value||void 0)==`image`?q(D.value?.image):``);function j(e){D.value=e,O.value=null,k.value=!0}function M(e,t){O.value={title:e,url:t},D.value=null,k.value=!0}function te(){k.value=!1,D.value=null,O.value=null}function N(e){let t=e||``;if(t.length==0)return{before:``,after:``};let n=Math.min(t.length,Math.max(120,Math.floor(t.length*.45))),r=-1,i=1/0;for(let e=0;eN(u.place?.text).before),ae=y(()=>N(u.place?.text).after),L=y(()=>u.place?.image?null:(u.place?.applications||[]).find(e=>K(e)==`image`&&e.image)||null),se=y(()=>(u.place?.applications||[]).filter(e=>e===L.value?!1:K(e)==`image`&&e.image)),z=y(()=>(u.place?.applications||[]).filter(e=>e===L.value?!1:!(K(e)==`image`&&e.image)));return(c,y)=>(o(),F(w,null,[r.mode==`mini-add`?(o(),F(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:y[0]||=e=>_(`add`)},[...y[21]||=[I(`p`,{class:`place-image-plus`},`+`,-1)]])):e(``,!0),r.mode==`add`?(o(),F(`div`,et,[l(v(H),{vertical:``},{default:T(()=>[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`20%`},value:r.newPlaceCode,"onUpdate:value":p,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),l(v(V),{style:{width:`80%`},value:r.newPlaceName,"onUpdate:value":m,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),l(v(V),{value:r.newPlaceText,"onUpdate:value":g,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),h(c.$slots,`default`,{},void 0,!0)]),_:3})])):e(``,!0),r.mode==`show-editor`?(o(),F(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:y[4]||=e=>_(`edit`)},[I(`div`,tt,d(u.place?.code)+`: `+d(u.place?.name),1),y[22]||=I(`hr`,{class:`hr`},null,-1),I(`div`,nt,[u.place?.image?(o(),F(`div`,rt,[I(`div`,{class:`message-image-border`,onClick:y[1]||=G(e=>M(u.place?.name||``,u.place?.image||``),[`stop`])},[I(`img`,{src:u.place?.image,alt:u.place?.name||`Изображение точки`,class:`message-image`},null,8,it)])])):e(``,!0),I(`span`,null,d(u.place?.text),1)]),(o(!0),F(w,null,a(u.place?.doors,e=>(o(),F(`div`,{key:e.code,class:`door-block`},[l(v(R),{class:`door-button`,onClick:G(t=>f(`navigate`,e.code),[`stop`])},{default:T(()=>[I(`span`,at,d(e.name||e.code||`Перейти к точке`),1)]),_:2},1032,[`onClick`]),(o(!0),F(w,null,a(e.keys,e=>(o(),F(`span`,{key:e.name,class:`key-block`},[l(v(ie),{class:`lock-icon`},{default:T(()=>[l(v(Le))]),_:1}),t(` `+d(e.name),1)]))),128))]))),128)),u.place?.applications?.length?(o(),F(`hr`,ot)):e(``,!0),(o(!0),F(w,null,a(u.place?.applications,t=>(o(),F(`div`,{class:`message-footer application-block`,key:t.name},[I(`div`,st,`Приложение: `+d(t.name),1),v(K)(t)==`image`&&t.image?(o(),F(`div`,{key:0,class:`application-image-border`,onClick:G(e=>j(t),[`stop`])},[I(`img`,{src:v(q)(t.image),alt:t.name||`Изображение улики`,class:`application-image`},null,8,lt)],8,ct)):v(K)(t)==`audio`&&t.image?(o(),F(`audio`,{key:1,src:v(q)(t.image),controls:``,preload:`none`,class:`application-audio`,onClick:y[2]||=G(()=>{},[`stop`])},null,8,ut)):v(K)(t)==`pdf`&&t.image?(o(),F(`a`,{key:2,href:v(q)(t.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`,onClick:y[3]||=G(()=>{},[`stop`])},` PDF `,8,dt)):e(``,!0)]))),128)),I(`p`,ft,[u.place?.hidden?(o(),F(`span`,pt,` Скрытая точка `)):e(``,!0),(o(!0),F(w,null,a(u.place?.keys,e=>(o(),F(`span`,{key:e.name,class:`key-block`},[l(v(ie),{class:`lock-icon`},{default:T(()=>[l(v($e))]),_:1}),t(` `+d(e.name),1)]))),128))])])):e(``,!0),r.mode==`show`?(o(),F(`div`,mt,[l(xe,null,{default:T(()=>[I(`div`,ht,[r.mcp?(o(),F(`span`,gt,`MCP`)):e(``,!0),t(` `+d(r.place?.code)+`: `+d(r.place?.name)+` `,1),I(`span`,{class:`collapse-icon collapse-icon-up`,onClick:y[5]||=e=>_(`show-collapse`)})]),y[23]||=I(`hr`,{class:`show-hr`},null,-1),I(`div`,_t,[r.place?.image?.length?(o(),F(`div`,vt,[I(`div`,{class:`message-image-border`,onClick:y[6]||=e=>M(r.place?.name||``,r.place?.image||``)},[I(`img`,{src:r.place?.image,alt:r.place?.name||`Изображение точки`,class:`message-image`},null,8,yt)])])):L.value?(o(),F(`div`,{key:1,class:`message-image-border`,onClick:y[7]||=e=>j(L.value)},[I(`img`,{src:v(q)(L.value.image),alt:L.value.name||`Изображение улики`,class:`message-image`},null,8,bt)])):e(``,!0),I(`span`,null,d(P.value),1),se.value.length?(o(),F(`div`,xt,[(o(!0),F(w,null,a(se.value,e=>(o(),F(`div`,{class:`show-application`,key:e.name},[I(`div`,{class:`application-image-block`,onClick:t=>j(e)},[I(`img`,{src:v(q)(e.image),alt:e.name||`Изображение улики`,class:`application-image`},null,8,Ct)],8,St)]))),128))])):e(``,!0),I(`span`,null,d(ae.value),1)]),u.place?.doors?.length?(o(),F(`hr`,wt)):e(``,!0),(o(!0),F(w,null,a(u.place?.doors,e=>(o(),F(`div`,{key:e.code,class:`button-dialog font`,onClick:t=>r.addAction(e.code)},[I(`div`,Et,d(e.code)+` `+d(e.name),1)],8,Tt))),128)),z.value.length?(o(),F(`hr`,Dt)):e(``,!0),(o(!0),F(w,null,a(z.value,t=>(o(),F(`div`,{class:`message-show-footer font`,key:t.name},[v(K)(t)==`pdf`&&t.image?(o(),F(`a`,{key:0,href:v(q)(t.image),target:`_blank`,rel:`noopener`,class:`pdf-application-name`},` Приложение: `+d(t.name),9,Ot)):(o(),F(w,{key:1},[I(`div`,kt,`Приложение: `+d(t.name),1),v(K)(t)==`audio`&&t.image?(o(),F(`audio`,{key:0,src:v(q)(t.image),controls:``,preload:`none`,class:`application-audio`},null,8,At)):e(``,!0)],64))]))),128))]),_:1})])):e(``,!0),r.mode==`show-collapse`?(o(),F(`div`,jt,[l(xe,null,{default:T(()=>[I(`div`,Mt,[r.mcp?(o(),F(`span`,Nt,`MCP`)):e(``,!0),t(` `+d(r.place?.code)+`: `+d(r.place?.name)+` `,1),I(`span`,{class:`collapse-icon`,onClick:y[8]||=e=>_(`show`)})])]),_:1})])):e(``,!0),r.mode==`edit`?(o(),F(`div`,Pt,[l(v(H),{vertical:``},{default:T(()=>[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`20%`},value:u.place.code,"onUpdate:value":y[9]||=e=>u.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),l(v(V),{style:{width:`80%`},value:u.place.name,"onUpdate:value":y[10]||=e=>u.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),l(v(V),{value:u.place.text,"onUpdate:value":y[11]||=e=>u.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),y[37]||=I(`p`,{class:`settings-header`},`Картинка`,-1),I(`div`,null,[l(v(H),null,{default:T(()=>[l(v(H),{vertical:``},{default:T(()=>[I(`img`,{src:u.place.image,alt:u.place?.name||`Изображение точки`,class:`message-edit-image`},null,8,Ft),l(v(R),{onClick:y[12]||=e=>(u.place.image=``,u.place.fileList=void 0)},{default:T(()=>[...y[24]||=[t(`Убрать картинку`,-1)]]),_:1})]),_:1}),l(v(H),{vertical:``},{default:T(()=>[l(v(V),{value:u.place.image,"onUpdate:value":y[13]||=e=>u.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),l(v(B),{"directory-dnd":``,max:1,"file-list":u.place.fileList,"onUpdate:fileList":y[14]||=e=>u.place.fileList=e},{default:T(()=>[l(v(de),null,{default:T(()=>[l(v(U),{style:{"font-size":`16px`}},{default:T(()=>[...y[25]||=[t(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),y[38]||=I(`p`,{class:`settings-header`},`Видимость точки`,-1),l(v(he),{value:u.place.hidden,"onUpdate:value":y[15]||=e=>u.place.hidden=e},{checked:T(()=>[...y[26]||=[t(` Скрытая точка `,-1)]]),unchecked:T(()=>[...y[27]||=[t(` Обычная точка `,-1)]]),_:1},8,[`value`]),y[39]||=t(` Улики `,-1),l(v($),{value:u.place.applications,"onUpdate:value":y[16]||=e=>u.place.applications=e,"on-create":b},{"create-button-default":T(()=>[...y[28]||=[t(` Добавить улику `,-1)]]),default:T(({value:n})=>[I(`div`,It,[l(v(V),{value:n.name,"onUpdate:value":e=>n.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`]),n.image?(o(),F(`div`,Lt,[l(v(H),{align:`center`,justify:`space-between`},{default:T(()=>[l(v(U),{depth:`3`},{default:T(()=>[t(d(v(be)(n.image))+` `,1),l(v(re),{size:`small`,bordered:!1},{default:T(()=>[t(d(v(K)(n)||`файл`),1)]),_:2},1024)]),_:2},1024),l(v(R),{size:`small`,quaternary:``,onClick:e=>E(S(n))},{default:T(()=>[...y[29]||=[t(` Убрать файл `,-1)]]),_:1},8,[`onClick`])]),_:2},1024),v(K)(n)==`image`?(o(),F(`img`,{key:0,src:v(q)(n.image),alt:n.name||`Изображение улики`,class:`application-edit-image`},null,8,Rt)):v(K)(n)==`audio`?(o(),F(`audio`,{key:1,src:v(q)(n.image),controls:``,preload:`none`,class:`application-edit-audio`},null,8,zt)):v(K)(n)==`pdf`?(o(),F(`a`,{key:2,href:v(q)(n.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`},` PDF `,8,Bt)):e(``,!0)])):e(``,!0),l(v(B),{max:1,"file-list":S(n).fileList,"onUpdate:fileList":e=>S(n).fileList=e,accept:`image/*,application/pdf,audio/*`},{default:T(()=>[l(v(R),{size:`small`},{default:T(()=>[...y[30]||=[t(`Загрузить файл улики`,-1)]]),_:1})]),_:1},8,[`file-list`,`onUpdate:fileList`])])]),_:1},8,[`value`]),y[40]||=t(` Действия `,-1),l(v($),{value:u.place.doors,"onUpdate:value":y[17]||=e=>u.place.doors=e,"on-create":ee},{"create-button-default":T(()=>[...y[31]||=[t(` Добавить действие `,-1)]]),action:T(({index:e,create:n,remove:r})=>[I(`div`,Vt,[l(v(R),{onClick:()=>n(e),class:`plus-minus-buttons`},{default:T(()=>[...y[32]||=[t(`+`,-1)]]),_:1},8,[`onClick`]),l(v(R),{onClick:()=>r(e),class:`plus-minus-buttons`},{default:T(()=>[...y[33]||=[t(`-`,-1)]]),_:1},8,[`onClick`])])]),default:T(({value:e})=>[I(`div`,Ht,[I(`div`,Ut,[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`30%`},value:e.code,"onUpdate:value":t=>e.code=t,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),l(v(V),{style:{width:`70%`},value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),y[35]||=I(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),I(`div`,Wt,[l(v($),{value:e.keys,"onUpdate:value":t=>e.keys=t,"on-create":x},{"create-button-default":T(()=>[...y[34]||=[t(` Добавить ключ `,-1)]]),default:T(({value:e})=>[I(`div`,Gt,[l(v(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),y[41]||=t(` Получаемые ключи `,-1),l(v($),{value:u.place.keys,"onUpdate:value":y[18]||=e=>u.place.keys=e,"on-create":x},{"create-button-default":T(()=>[...y[36]||=[t(` Добавить ключ `,-1)]]),default:T(({value:e})=>[I(`div`,Kt,[l(v(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),I(`div`,qt,[h(c.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0),l(v(oe),{show:k.value,"onUpdate:show":y[20]||=e=>k.value=e,"mask-closable":!0},{default:T(()=>[l(v(ne),{class:i({"photo-paper":A.value}),"theme-overrides":A.value?{titleTextColor:`black`,actionColor:`transparent`,paddingMedium:`14px`,borderRadius:`10px`}:void 0,style:s({maxWidth:`min(94vw, 1200px)`,width:A.value?`max-content`:`min(94vw, 1200px)`}),bordered:!1,role:`dialog`,"aria-modal":`true`,"header-style":A.value?{paddingBottom:`10px`}:void 0,"content-style":{padding:A.value?`0 14px`:`14px`}},n({header:T(()=>[I(`span`,{class:i({"photo-paper-title":A.value})},d(D.value?.name||O.value?.title),3)]),"header-extra":T(()=>[l(v(R),{quaternary:``,circle:``,"theme-overrides":A.value?{textColor:`black`,textColorHover:`#63e2b7`}:void 0,"aria-label":`Закрыть`,onClick:y[19]||=e=>te()},{default:T(()=>[l(v(ie),{size:`20`},{default:T(()=>[l(v(Fe))]),_:1})]),_:1},8,[`theme-overrides`])]),default:T(()=>[D.value&&v(K)(D.value)==`image`?(o(),F(`div`,Jt,[I(`img`,{src:v(q)(D.value.image),alt:D.value.name||`Фото улики`,class:`view-application-image`},null,8,Yt)])):D.value&&v(K)(D.value)==`pdf`?(o(),F(`iframe`,{key:1,src:v(q)(D.value.image),class:`view-application-pdf`},null,8,Xt)):D.value&&v(K)(D.value)==`audio`?(o(),F(`audio`,{key:2,src:v(q)(D.value.image),controls:``,autoplay:``,class:`view-application-audio`},null,8,Zt)):O.value?(o(),F(`div`,Qt,[I(`img`,{src:O.value.url,alt:O.value.title||`Фото точки`,class:`view-application-image`},null,8,$t)])):e(``,!0)]),_:2},[A.value?{name:`action`,fn:T(()=>[l(v(R),{class:`photo-paper-action`,tag:`a`,href:A.value,target:`_blank`,rel:`noopener noreferrer`,bordered:!1,"theme-overrides":{textColor:`#bfa07d`,textColorHover:`#63e2b7`}},{default:T(()=>[...y[42]||=[t(` Открыть в новой вкладке `,-1)]]),_:1},8,[`href`])]),key:`0`}:void 0]),1032,[`class`,`theme-overrides`,`style`,`header-style`,`content-style`])]),_:1},8,[`show`])],64))}}),[[`__scopeId`,`data-v-c907363d`]]);export{Ze as n,J as r,en as t}; \ No newline at end of file diff --git a/frontend/dist/assets/PlaceBlock-cxDh8Kvp.js b/frontend/dist/assets/PlaceBlock-cxDh8Kvp.js deleted file mode 100644 index b6345c4..0000000 --- a/frontend/dist/assets/PlaceBlock-cxDh8Kvp.js +++ /dev/null @@ -1,106 +0,0 @@ -import{Ct as e,Dt as t,Et as n,H as r,In as i,Jt as a,Kt as o,Ln as s,Mt as c,Ot as l,Pt as u,Rn as d,St as f,U as p,Y as m,Yt as h,_n as g,at as _,bn as v,bt as y,cn as b,d as ee,f as x,g as S,hn as C,ht as w,in as T,it as E,kt as D,m as O,nt as k,ot as A,p as j,qt as M,r as te,tt as N,vn as P,wt as F,xt as I}from"./client-Bz0sY7Lm.js";import{t as ne}from"./Card-D1LVu21r.js";import{r as re,t as ie}from"./es-BhJOHfSF.js";import{i as ae}from"./Suffix-JLavbuLO.js";import{t as oe}from"./Modal-Bsm1tUwA.js";import{t as L}from"./use-merged-state-z45UzW9G.js";import{r as se,t as R}from"./Button-lcMg8vK2.js";import{a as z,i as ce,s as B,t as le}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as ue,t as de}from"./Upload-B7-f9-Dk.js";import{t as fe}from"./use-form-item-Bl3X3aXB.js";import{t as pe}from"./Add-BlaQeLtQ.js";import{t as V}from"./Input-DeqNzuJd.js";import{n as me,t as he}from"./Switch-BQ4oql65.js";import{t as H}from"./Space-Ka5Z-MRX.js";import{t as U}from"./text-BblwgAv2.js";import{E as ge,O as _e,g as ve,lt as W,q as G,tt as ye}from"./index-6B3OmSLg.js";import{n as K,r as q,t as be}from"./application-Bg005825.js";import{t as xe}from"./MessagePaper-CFegNMJR.js";var Se=D({name:`ArrowDown`,render(){return c(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},c(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},c(`g`,{"fill-rule":`nonzero`},c(`path`,{d:`M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z`}))))}}),Ce=D({name:`ArrowUp`,render(){return c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},c(`g`,{fill:`none`},c(`path`,{d:`M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z`,fill:`currentColor`})))}}),we=k(`input-group`,` - display: inline-flex; - width: 100%; - flex-wrap: nowrap; - vertical-align: bottom; -`,[N(`>`,[k(`input`,[N(`&:not(:last-child)`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `),N(`&:not(:first-child)`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - margin-left: -1px!important; - `)]),k(`button`,[N(`&:not(:last-child)`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `,[E(`state-border, border`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `)]),N(`&:not(:first-child)`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `,[E(`state-border, border`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `)])]),N(`*`,[N(`&:not(:last-child)`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `,[N(`>`,[k(`input`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `),k(`base-selection`,[k(`base-selection-label`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `),k(`base-selection-tags`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `),E(`box-shadow, border, state-border`,` - border-top-right-radius: 0!important; - border-bottom-right-radius: 0!important; - `)])])]),N(`&:not(:first-child)`,` - margin-left: -1px!important; - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `,[N(`>`,[k(`input`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `),k(`base-selection`,[k(`base-selection-label`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `),k(`base-selection-tags`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `),E(`box-shadow, border, state-border`,` - border-top-left-radius: 0!important; - border-bottom-left-radius: 0!important; - `)])])])])])]),J=D({name:`InputGroup`,props:{},setup(e){let{mergedClsPrefixRef:t}=p(e);return O(`-input-group`,we,t),{mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return c(`div`,{class:`${e}-input-group`},this.$slots)}}),Y=`0!important`,Te=`-1px!important`;function X(e){return _(`${e}-type`,[N(`& +`,[k(`button`,{},[_(`${e}-type`,[E(`border`,{borderLeftWidth:Y}),E(`state-border`,{left:Te})])])])])}function Z(e){return _(`${e}-type`,[N(`& +`,[k(`button`,[_(`${e}-type`,[E(`border`,{borderTopWidth:Y}),E(`state-border`,{top:Te})])])])])}var Ee=k(`button-group`,` - flex-wrap: nowrap; - display: inline-flex; - position: relative; -`,[A(`vertical`,{flexDirection:`row`},[A(`rtl`,[k(`button`,[N(`&:first-child:not(:last-child)`,` - margin-right: ${Y}; - border-top-right-radius: ${Y}; - border-bottom-right-radius: ${Y}; - `),N(`&:last-child:not(:first-child)`,` - margin-left: ${Y}; - border-top-left-radius: ${Y}; - border-bottom-left-radius: ${Y}; - `),N(`&:not(:first-child):not(:last-child)`,` - margin-left: ${Y}; - margin-right: ${Y}; - border-radius: ${Y}; - `),X(`default`),_(`ghost`,[X(`primary`),X(`info`),X(`success`),X(`warning`),X(`error`)])])])]),_(`vertical`,{flexDirection:`column`},[k(`button`,[N(`&:first-child:not(:last-child)`,` - margin-bottom: ${Y}; - margin-left: ${Y}; - margin-right: ${Y}; - border-bottom-left-radius: ${Y}; - border-bottom-right-radius: ${Y}; - `),N(`&:last-child:not(:first-child)`,` - margin-top: ${Y}; - margin-left: ${Y}; - margin-right: ${Y}; - border-top-left-radius: ${Y}; - border-top-right-radius: ${Y}; - `),N(`&:not(:first-child):not(:last-child)`,` - margin: ${Y}; - border-radius: ${Y}; - `),Z(`default`),_(`ghost`,[Z(`primary`),Z(`info`),Z(`success`),Z(`warning`),Z(`error`)])])])]),De=D({name:`ButtonGroup`,props:{size:String,vertical:Boolean},setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=p(e);return O(`-button-group`,Ee,t),M(se,e),{rtlEnabled:S(`ButtonGroup`,n,t),mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return c(`div`,{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:`group`},this.$slots)}});function Oe(){return ve}var ke=x({name:`DynamicInput`,common:ee,peers:{Input:_e,Button:ge},self:Oe}),Ae=m(`n-dynamic-input`),je=D({name:`DynamicInputInputPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:String,default:``},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){let{mergedThemeRef:e,placeholderRef:t}=u(Ae);return{mergedTheme:e,placeholder:t}},render(){let{mergedTheme:e,placeholder:t,value:n,clsPrefix:r,onUpdateValue:i,disabled:a}=this;return c(`div`,{class:`${r}-dynamic-input-preset-input`},c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n,placeholder:t,onUpdateValue:i,disabled:a}))}}),Me=D({name:`DynamicInputPairPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:``,value:``})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){let{mergedThemeRef:t,keyPlaceholderRef:n,valuePlaceholderRef:r}=u(Ae);return{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:r,handleKeyInput(t){e.onUpdateValue({key:t,value:e.value.value})},handleValueInput(t){e.onUpdateValue({key:e.value.key,value:t})}}},render(){let{mergedTheme:e,keyPlaceholder:t,valuePlaceholder:n,value:r,clsPrefix:i,disabled:a}=this;return c(`div`,{class:`${i}-dynamic-input-preset-pair`},c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.key,class:`${i}-dynamic-input-pair-input`,placeholder:t,onUpdateValue:this.handleKeyInput,disabled:a}),c(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.value,class:`${i}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleValueInput,disabled:a}))}}),Ne=k(`dynamic-input`,{width:`100%`},[k(`dynamic-input-item`,` - margin-bottom: 10px; - display: flex; - flex-wrap: nowrap; - `,[k(`dynamic-input-preset-input`,{flex:1,alignItems:`center`}),k(`dynamic-input-preset-pair`,` - flex: 1; - display: flex; - align-items: center; - `,[k(`dynamic-input-pair-input`,[N(`&:first-child`,{"margin-right":`12px`})])]),E(`action`,` - align-self: flex-start; - display: flex; - justify-content: flex-end; - flex-shrink: 0; - flex-grow: 0; - margin: var(--action-margin); - `,[_(`icon`,{cursor:`pointer`})]),N(`&:last-child`,{marginBottom:0})]),k(`form-item`,` - padding-top: 0 !important; - margin-right: 0 !important; - `,[k(`form-item-blank`,{paddingTop:`0 !important`})])]),Q=new WeakMap,$=D({name:`DynamicInput`,props:Object.assign(Object.assign({},j.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:`input`},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:``},valuePlaceholder:{type:String,default:``},placeholder:{type:String,default:``},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),setup(e,{slots:t}){let{mergedComponentPropsRef:n,mergedClsPrefixRef:i,mergedRtlRef:a,inlineThemeDisabled:o}=p(),s=u(fe,null),c=C(e.defaultValue),l=L(P(e,`value`),c),d=j(`DynamicInput`,`-dynamic-input`,Ne,ke,e,i),f=y(()=>{let{value:t}=l;if(Array.isArray(t)){let{max:n}=e;return n!==void 0&&t.length>=n}return!1}),m=y(()=>{let{value:t}=l;return Array.isArray(t)?t.length<=e.min:!0}),h=y(()=>n?.value?.DynamicInput?.buttonSize);function _(t){let{onInput:n,"onUpdate:value":r,onUpdateValue:i}=e;n&&B(n,t),r&&B(r,t),i&&B(i,t),c.value=t}function v(e,t){if(typeof e!=`object`||!e)return t;let n=b(e)?g(e):e,r=Q.get(n);return r===void 0&&Q.set(n,r=ye()),r}function ee(e,t){let{value:n}=l,r=Array.from(n??[]),i=r[e];if(r[e]=t,i&&t&&typeof i==`object`&&typeof t==`object`){let e=b(i)?g(i):i,n=b(t)?g(t):t,r=Q.get(e);r!==void 0&&Q.set(n,r)}_(r)}function x(){w(-1)}function w(n){let{value:r}=l,{onCreate:i}=e,a=Array.from(r??[]);if(i)a.splice(n+1,0,i(n+1)),_(a);else if(t.default)a.splice(n+1,0,null),_(a);else switch(e.preset){case`input`:a.splice(n+1,0,``),_(a);break;case`pair`:a.splice(n+1,0,{key:``,value:``}),_(a);break}}function T(t){let{value:n}=l;if(!Array.isArray(n))return;let{min:r}=e;if(n.length<=r)return;let{onRemove:i}=e;i&&i(t);let a=Array.from(n);a.splice(t,1),_(a)}function E(e,t,n){if(t<0||n<0||t>=e.length||n>=e.length||t===n)return;let r=e[t];e[t]=e[n],e[n]=r}function D(e,t){let{value:n}=l;if(!Array.isArray(n))return;let r=Array.from(n);e===`up`&&E(r,t,t-1),e===`down`&&E(r,t,t+1),_(r)}M(Ae,{mergedThemeRef:d,keyPlaceholderRef:P(e,`keyPlaceholder`),valuePlaceholderRef:P(e,`valuePlaceholder`),placeholderRef:P(e,`placeholder`)});let O=S(`DynamicInput`,a,i),k=y(()=>{let{self:{actionMargin:e,actionMarginRtl:t}}=d.value;return{"--action-margin":e,"--action-margin-rtl":t}}),A=o?r(`dynamic-input`,void 0,k,e):void 0;return{locale:ae(`DynamicInput`).localeRef,rtlEnabled:O,buttonSize:h,mergedClsPrefix:i,NFormItem:s,uncontrolledValue:c,mergedValue:l,insertionDisabled:f,removeDisabled:m,handleCreateClick:x,ensureKey:v,handleValueChange:ee,remove:T,move:D,createItem:w,mergedTheme:d,cssVars:o?void 0:k,themeClass:A?.themeClass,onRender:A?.onRender}},render(){let{$slots:e,itemClass:t,buttonSize:n,mergedClsPrefix:r,mergedValue:i,locale:a,mergedTheme:o,keyField:s,itemStyle:l,preset:u,showSortButton:d,NFormItem:f,ensureKey:p,handleValueChange:m,remove:h,createItem:g,move:_,onRender:v,disabled:y}=this;return v?.(),c(`div`,{class:[`${r}-dynamic-input`,this.rtlEnabled&&`${r}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(i)||i.length===0?c(R,Object.assign({block:!0,ghost:!0,dashed:!0,size:n},this.createButtonProps,{disabled:this.insertionDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>ce(e[`create-button-default`],()=>[a.create]),icon:()=>ce(e[`create-button-icon`],()=>[c(G,{clsPrefix:r},{default:()=>c(pe,null)})])}):i.map((a,v)=>c(`div`,{key:s?a[s]:p(a,v),"data-key":s?a[s]:p(a,v),class:[`${r}-dynamic-input-item`,t],style:l},z(e.default,{value:i[v],index:v},()=>[u===`input`?c(je,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):u===`pair`?c(Me,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):null]),z(e.action,{value:i[v],index:v,create:g,remove:h,move:_},()=>[c(`div`,{class:`${r}-dynamic-input-item__action`},c(De,{size:n},{default:()=>[c(R,{disabled:this.removeDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,circle:!0,onClick:()=>{h(v)}},{icon:()=>c(G,{clsPrefix:r},{default:()=>c(me,null)})}),c(R,{disabled:this.insertionDisabled||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{g(v)}},{icon:()=>c(G,{clsPrefix:r},{default:()=>c(pe,null)})}),d?c(R,{disabled:v===0||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`up`,v)}},{icon:()=>c(G,{clsPrefix:r},{default:()=>c(Ce,null)})}):null,d?c(R,{disabled:v===i.length-1||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`down`,v)}},{icon:()=>c(G,{clsPrefix:r},{default:()=>c(Se,null)})}):null]}))]))))}}),Pe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Fe=D({name:`CloseOutlined`,render:function(e,t){return o(),F(`svg`,Pe,t[0]||=[I(`path`,{d:`M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z`,fill:`currentColor`},null,-1)])}}),Ie={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Le=D({name:`LockOutlined`,render:function(e,t){return o(),F(`svg`,Ie,t[0]||=[I(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2z`,fill:`currentColor`},null,-1)])}}),Re={key:0},ze={class:`intro-text font`},Be={key:0,class:`intro-audio-block`},Ve=[`src`],He={class:`message-content`},Ue={key:0},We={key:1,class:`intro-empty`},Ge={key:2,class:`intro-audio-block`},Ke=[`src`],qe={key:2,class:`place-block`},Je={class:`intro-edit-audio`},Ye=[`src`],Xe={class:`slot-block`},Ze=le(D({__name:`IntroBlock`,props:{introduction:{},mode:{}},emits:[`update:mode`],setup(n,{emit:r}){let i=n,a=r,s=e=>{a(`update:mode`,e)},c=y(()=>!!i.introduction?.text),u=y(()=>!!i.introduction?.audio),p=y(()=>{let e=i.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${te()}/api/files/${encodeURIComponent(e)}`}),m=()=>{i.introduction&&(i.introduction.audio=``,i.introduction.fileList=void 0)};return(r,a)=>(o(),F(w,null,[n.mode==`show`?(o(),F(`div`,Re,[l(xe,null,{default:T(()=>[a[4]||=I(`div`,{class:`font`},`Вступление`,-1),a[5]||=I(`hr`,{class:`intro-hr`},null,-1),I(`div`,ze,d(n.introduction.text),1),u.value?(o(),F(`div`,Be,[I(`audio`,{src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ve)])):e(``,!0)]),_:1})])):e(``,!0),n.mode==`show-editor`?(o(),F(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:a[0]||=e=>s(`edit`)},[a[6]||=I(`div`,{class:`message-header`},`Вступление`,-1),a[7]||=I(`hr`,{class:`hr`},null,-1),I(`div`,He,[c.value?(o(),F(`span`,Ue,d(n.introduction.text),1)):(o(),F(`span`,We,`Введение не задано — нажмите, чтобы добавить`)),u.value?(o(),F(`div`,Ge,[I(`audio`,{src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ke)])):e(``,!0)])])):e(``,!0),n.mode==`edit`?(o(),F(`div`,qe,[l(v(H),{vertical:``},{default:T(()=>[a[11]||=I(`p`,{class:`settings-header`},`Текст вступления`,-1),l(v(V),{value:i.introduction.text,"onUpdate:value":a[1]||=e=>i.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),a[12]||=I(`p`,{class:`settings-header`},`Аудио вступления`,-1),I(`div`,Je,[l(v(H),{vertical:``},{default:T(()=>[u.value?(o(),F(`audio`,{key:0,src:p.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ye)):(o(),f(v(U),{key:1,depth:`3`},{default:T(()=>[...a[8]||=[t(`Аудио не задано`,-1)]]),_:1})),l(v(R),{onClick:a[2]||=e=>m(),disabled:!u.value},{default:T(()=>[...a[9]||=[t(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),l(v(de),{"directory-dnd":``,max:1,"file-list":i.introduction.fileList,"onUpdate:fileList":a[3]||=e=>i.introduction.fileList=e},{default:T(()=>[l(v(ue),null,{default:T(()=>[l(v(U),{style:{"font-size":`16px`}},{default:T(()=>[...a[10]||=[t(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),I(`div`,Xe,[h(r.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0)],64))}}),[[`__scopeId`,`data-v-11f63e45`]]),Qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},$e=D({name:`Key24Regular`,render:function(e,t){return o(),F(`svg`,Qe,t[0]||=[I(`g`,{fill:`none`},[I(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),et={key:1,class:`place-block`},tt={class:`message-header`},nt={class:`message-content`},rt={key:0},it=[`src`,`alt`],at={class:`door-button-label`},ot={key:0,class:`hr`},st={class:`application-name`},ct=[`onClick`],lt=[`src`,`alt`],ut=[`src`],dt=[`href`],ft={class:`gray-block`},pt={key:0},mt={key:3},ht={class:`message-show-header font`},gt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},_t={class:`message-show-content font`},vt={key:0},yt=[`src`,`alt`],bt=[`src`,`alt`],xt={key:2,class:`show-applications-block`},St=[`onClick`],Ct=[`src`,`alt`],wt={key:0,class:`show-hr`},Tt=[`onClick`],Et={class:`button-dialog-text`},Dt={key:1,class:`show-hr`},Ot=[`href`],kt={class:`application-label`},At=[`src`],jt={key:4},Mt={class:`message-header font`},Nt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},Pt={key:5,class:`place-block`},Ft=[`src`,`alt`],It={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Lt={key:0,class:`application-edit-file`},Rt=[`src`,`alt`],zt=[`src`],Bt=[`href`],Vt={style:{display:`flex`,"flex-direction":`column`}},Ht={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Ut={class:`door-add-block`},Wt={class:`door-field`},Gt={style:{"align-items":`center`,display:`flex`,width:`100%`}},Kt={style:{"align-items":`center`,display:`flex`,width:`100%`}},qt={class:`slot-block`},Jt={key:0,class:`view-application-image-block`},Yt=[`src`,`alt`],Xt=[`src`],Zt=[`src`],Qt={key:3,class:`view-application-image-block`},$t=[`src`,`alt`],en=le(D({__name:`PlaceBlock`,props:{newPlaceCode:{},newPlaceName:{},newPlaceText:{},place:{},mode:{},mcp:{type:Boolean,default:!1},addAction:{}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`,`navigate`],setup(r,{emit:c}){let u=r,f=c,p=e=>{f(`update:newPlaceCode`,e)},m=e=>{f(`update:newPlaceName`,e)},g=e=>{f(`update:newPlaceText`,e)},_=e=>{f(`update:mode`,e)};function b(){return{name:void 0,image:void 0,file_type:void 0}}function ee(){return{code:void 0,name:void 0,keys:void 0}}function x(){return{name:void 0}}function S(e){return e}function E(e){e.image=void 0,e.file_type=void 0,e.fileList=void 0}let D=C(null),O=C(null),k=C(!1),A=y(()=>O.value?O.value.url:K(D.value||void 0)==`image`?q(D.value?.image):``);function j(e){D.value=e,O.value=null,k.value=!0}function M(e,t){O.value={title:e,url:t},D.value=null,k.value=!0}function te(){k.value=!1,D.value=null,O.value=null}function N(e){let t=e||``;if(t.length==0)return{before:``,after:``};let n=Math.min(t.length,Math.max(120,Math.floor(t.length*.45))),r=-1,i=1/0;for(let e=0;eN(u.place?.text).before),ae=y(()=>N(u.place?.text).after),L=y(()=>u.place?.image?null:(u.place?.applications||[]).find(e=>K(e)==`image`&&e.image)||null),se=y(()=>(u.place?.applications||[]).filter(e=>e===L.value?!1:K(e)==`image`&&e.image)),z=y(()=>(u.place?.applications||[]).filter(e=>e===L.value?!1:!(K(e)==`image`&&e.image)));return(c,y)=>(o(),F(w,null,[r.mode==`mini-add`?(o(),F(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:y[0]||=e=>_(`add`)},[...y[21]||=[I(`p`,{class:`place-image-plus`},`+`,-1)]])):e(``,!0),r.mode==`add`?(o(),F(`div`,et,[l(v(H),{vertical:``},{default:T(()=>[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`20%`},value:r.newPlaceCode,"onUpdate:value":p,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),l(v(V),{style:{width:`80%`},value:r.newPlaceName,"onUpdate:value":m,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),l(v(V),{value:r.newPlaceText,"onUpdate:value":g,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),h(c.$slots,`default`,{},void 0,!0)]),_:3})])):e(``,!0),r.mode==`show-editor`?(o(),F(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:y[4]||=e=>_(`edit`)},[I(`div`,tt,d(u.place?.code)+`: `+d(u.place?.name),1),y[22]||=I(`hr`,{class:`hr`},null,-1),I(`div`,nt,[u.place?.image?(o(),F(`div`,rt,[I(`div`,{class:`message-image-border`,onClick:y[1]||=W(e=>M(u.place?.name||``,u.place?.image||``),[`stop`])},[I(`img`,{src:u.place?.image,alt:u.place?.name||`Изображение точки`,class:`message-image`},null,8,it)])])):e(``,!0),I(`span`,null,d(u.place?.text),1)]),(o(!0),F(w,null,a(u.place?.doors,e=>(o(),F(`div`,{key:e.code,class:`door-block`},[l(v(R),{class:`door-button`,onClick:W(t=>f(`navigate`,e.code),[`stop`])},{default:T(()=>[I(`span`,at,d(e.name||e.code||`Перейти к точке`),1)]),_:2},1032,[`onClick`]),(o(!0),F(w,null,a(e.keys,e=>(o(),F(`span`,{key:e.name,class:`key-block`},[l(v(ie),{class:`lock-icon`},{default:T(()=>[l(v(Le))]),_:1}),t(` `+d(e.name),1)]))),128))]))),128)),u.place?.applications?.length?(o(),F(`hr`,ot)):e(``,!0),(o(!0),F(w,null,a(u.place?.applications,t=>(o(),F(`div`,{class:`message-footer application-block`,key:t.name},[I(`div`,st,`Приложение: `+d(t.name),1),v(K)(t)==`image`&&t.image?(o(),F(`div`,{key:0,class:`application-image-border`,onClick:W(e=>j(t),[`stop`])},[I(`img`,{src:v(q)(t.image),alt:t.name||`Изображение улики`,class:`application-image`},null,8,lt)],8,ct)):v(K)(t)==`audio`&&t.image?(o(),F(`audio`,{key:1,src:v(q)(t.image),controls:``,preload:`none`,class:`application-audio`,onClick:y[2]||=W(()=>{},[`stop`])},null,8,ut)):v(K)(t)==`pdf`&&t.image?(o(),F(`a`,{key:2,href:v(q)(t.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`,onClick:y[3]||=W(()=>{},[`stop`])},` PDF `,8,dt)):e(``,!0)]))),128)),I(`p`,ft,[u.place?.hidden?(o(),F(`span`,pt,` Скрытая точка `)):e(``,!0),(o(!0),F(w,null,a(u.place?.keys,e=>(o(),F(`span`,{key:e.name,class:`key-block`},[l(v(ie),{class:`lock-icon`},{default:T(()=>[l(v($e))]),_:1}),t(` `+d(e.name),1)]))),128))])])):e(``,!0),r.mode==`show`?(o(),F(`div`,mt,[l(xe,null,{default:T(()=>[I(`div`,ht,[r.mcp?(o(),F(`span`,gt,`MCP`)):e(``,!0),t(` `+d(r.place?.code)+`: `+d(r.place?.name)+` `,1),I(`span`,{class:`collapse-icon collapse-icon-up`,onClick:y[5]||=e=>_(`show-collapse`)})]),y[23]||=I(`hr`,{class:`show-hr`},null,-1),I(`div`,_t,[r.place?.image?.length?(o(),F(`div`,vt,[I(`div`,{class:`message-image-border`,onClick:y[6]||=e=>M(r.place?.name||``,r.place?.image||``)},[I(`img`,{src:r.place?.image,alt:r.place?.name||`Изображение точки`,class:`message-image`},null,8,yt)])])):L.value?(o(),F(`div`,{key:1,class:`message-image-border`,onClick:y[7]||=e=>j(L.value)},[I(`img`,{src:v(q)(L.value.image),alt:L.value.name||`Изображение улики`,class:`message-image`},null,8,bt)])):e(``,!0),I(`span`,null,d(P.value),1),se.value.length?(o(),F(`div`,xt,[(o(!0),F(w,null,a(se.value,e=>(o(),F(`div`,{class:`show-application`,key:e.name},[I(`div`,{class:`application-image-block`,onClick:t=>j(e)},[I(`img`,{src:v(q)(e.image),alt:e.name||`Изображение улики`,class:`application-image`},null,8,Ct)],8,St)]))),128))])):e(``,!0),I(`span`,null,d(ae.value),1)]),u.place?.doors?.length?(o(),F(`hr`,wt)):e(``,!0),(o(!0),F(w,null,a(u.place?.doors,e=>(o(),F(`div`,{key:e.code,class:`button-dialog font`,onClick:t=>r.addAction(e.code)},[I(`div`,Et,d(e.code)+` `+d(e.name),1)],8,Tt))),128)),z.value.length?(o(),F(`hr`,Dt)):e(``,!0),(o(!0),F(w,null,a(z.value,t=>(o(),F(`div`,{class:`message-show-footer font`,key:t.name},[v(K)(t)==`pdf`&&t.image?(o(),F(`a`,{key:0,href:v(q)(t.image),target:`_blank`,rel:`noopener`,class:`pdf-application-name`},` Приложение: `+d(t.name),9,Ot)):(o(),F(w,{key:1},[I(`div`,kt,`Приложение: `+d(t.name),1),v(K)(t)==`audio`&&t.image?(o(),F(`audio`,{key:0,src:v(q)(t.image),controls:``,preload:`none`,class:`application-audio`},null,8,At)):e(``,!0)],64))]))),128))]),_:1})])):e(``,!0),r.mode==`show-collapse`?(o(),F(`div`,jt,[l(xe,null,{default:T(()=>[I(`div`,Mt,[r.mcp?(o(),F(`span`,Nt,`MCP`)):e(``,!0),t(` `+d(r.place?.code)+`: `+d(r.place?.name)+` `,1),I(`span`,{class:`collapse-icon`,onClick:y[8]||=e=>_(`show`)})])]),_:1})])):e(``,!0),r.mode==`edit`?(o(),F(`div`,Pt,[l(v(H),{vertical:``},{default:T(()=>[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`20%`},value:u.place.code,"onUpdate:value":y[9]||=e=>u.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),l(v(V),{style:{width:`80%`},value:u.place.name,"onUpdate:value":y[10]||=e=>u.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),l(v(V),{value:u.place.text,"onUpdate:value":y[11]||=e=>u.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),y[37]||=I(`p`,{class:`settings-header`},`Картинка`,-1),I(`div`,null,[l(v(H),null,{default:T(()=>[l(v(H),{vertical:``},{default:T(()=>[I(`img`,{src:u.place.image,alt:u.place?.name||`Изображение точки`,class:`message-edit-image`},null,8,Ft),l(v(R),{onClick:y[12]||=e=>(u.place.image=``,u.place.fileList=void 0)},{default:T(()=>[...y[24]||=[t(`Убрать картинку`,-1)]]),_:1})]),_:1}),l(v(H),{vertical:``},{default:T(()=>[l(v(V),{value:u.place.image,"onUpdate:value":y[13]||=e=>u.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),l(v(de),{"directory-dnd":``,max:1,"file-list":u.place.fileList,"onUpdate:fileList":y[14]||=e=>u.place.fileList=e},{default:T(()=>[l(v(ue),null,{default:T(()=>[l(v(U),{style:{"font-size":`16px`}},{default:T(()=>[...y[25]||=[t(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),y[38]||=I(`p`,{class:`settings-header`},`Видимость точки`,-1),l(v(he),{value:u.place.hidden,"onUpdate:value":y[15]||=e=>u.place.hidden=e},{checked:T(()=>[...y[26]||=[t(` Скрытая точка `,-1)]]),unchecked:T(()=>[...y[27]||=[t(` Обычная точка `,-1)]]),_:1},8,[`value`]),y[39]||=t(` Улики `,-1),l(v($),{value:u.place.applications,"onUpdate:value":y[16]||=e=>u.place.applications=e,"on-create":b},{"create-button-default":T(()=>[...y[28]||=[t(` Добавить улику `,-1)]]),default:T(({value:n})=>[I(`div`,It,[l(v(V),{value:n.name,"onUpdate:value":e=>n.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`]),n.image?(o(),F(`div`,Lt,[l(v(H),{align:`center`,justify:`space-between`},{default:T(()=>[l(v(U),{depth:`3`},{default:T(()=>[t(d(v(be)(n.image))+` `,1),l(v(re),{size:`small`,bordered:!1},{default:T(()=>[t(d(v(K)(n)||`файл`),1)]),_:2},1024)]),_:2},1024),l(v(R),{size:`small`,quaternary:``,onClick:e=>E(S(n))},{default:T(()=>[...y[29]||=[t(` Убрать файл `,-1)]]),_:1},8,[`onClick`])]),_:2},1024),v(K)(n)==`image`?(o(),F(`img`,{key:0,src:v(q)(n.image),alt:n.name||`Изображение улики`,class:`application-edit-image`},null,8,Rt)):v(K)(n)==`audio`?(o(),F(`audio`,{key:1,src:v(q)(n.image),controls:``,preload:`none`,class:`application-edit-audio`},null,8,zt)):v(K)(n)==`pdf`?(o(),F(`a`,{key:2,href:v(q)(n.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`},` PDF `,8,Bt)):e(``,!0)])):e(``,!0),l(v(de),{max:1,"file-list":S(n).fileList,"onUpdate:fileList":e=>S(n).fileList=e,accept:`image/*,application/pdf,audio/*`},{default:T(()=>[l(v(R),{size:`small`},{default:T(()=>[...y[30]||=[t(`Загрузить файл улики`,-1)]]),_:1})]),_:1},8,[`file-list`,`onUpdate:fileList`])])]),_:1},8,[`value`]),y[40]||=t(` Действия `,-1),l(v($),{value:u.place.doors,"onUpdate:value":y[17]||=e=>u.place.doors=e,"on-create":ee},{"create-button-default":T(()=>[...y[31]||=[t(` Добавить действие `,-1)]]),action:T(({index:e,create:n,remove:r})=>[I(`div`,Vt,[l(v(R),{onClick:()=>n(e),class:`plus-minus-buttons`},{default:T(()=>[...y[32]||=[t(`+`,-1)]]),_:1},8,[`onClick`]),l(v(R),{onClick:()=>r(e),class:`plus-minus-buttons`},{default:T(()=>[...y[33]||=[t(`-`,-1)]]),_:1},8,[`onClick`])])]),default:T(({value:e})=>[I(`div`,Ht,[I(`div`,Ut,[l(v(J),null,{default:T(()=>[l(v(V),{style:{width:`30%`},value:e.code,"onUpdate:value":t=>e.code=t,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),l(v(V),{style:{width:`70%`},value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),y[35]||=I(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),I(`div`,Wt,[l(v($),{value:e.keys,"onUpdate:value":t=>e.keys=t,"on-create":x},{"create-button-default":T(()=>[...y[34]||=[t(` Добавить ключ `,-1)]]),default:T(({value:e})=>[I(`div`,Gt,[l(v(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),y[41]||=t(` Получаемые ключи `,-1),l(v($),{value:u.place.keys,"onUpdate:value":y[18]||=e=>u.place.keys=e,"on-create":x},{"create-button-default":T(()=>[...y[36]||=[t(` Добавить ключ `,-1)]]),default:T(({value:e})=>[I(`div`,Kt,[l(v(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),I(`div`,qt,[h(c.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0),l(v(oe),{show:k.value,"onUpdate:show":y[20]||=e=>k.value=e,"mask-closable":!0},{default:T(()=>[l(v(ne),{class:i({"photo-paper":A.value}),"theme-overrides":A.value?{titleTextColor:`black`,actionColor:`transparent`,paddingMedium:`14px`,borderRadius:`10px`}:void 0,style:s({maxWidth:`min(94vw, 1200px)`,width:A.value?`max-content`:`min(94vw, 1200px)`}),bordered:!1,role:`dialog`,"aria-modal":`true`,"header-style":A.value?{paddingBottom:`10px`}:void 0,"content-style":{padding:A.value?`0 14px`:`14px`}},n({header:T(()=>[I(`span`,{class:i({"photo-paper-title":A.value})},d(D.value?.name||O.value?.title),3)]),"header-extra":T(()=>[l(v(R),{quaternary:``,circle:``,"theme-overrides":A.value?{textColor:`black`,textColorHover:`#63e2b7`}:void 0,"aria-label":`Закрыть`,onClick:y[19]||=e=>te()},{default:T(()=>[l(v(ie),{size:`20`},{default:T(()=>[l(v(Fe))]),_:1})]),_:1},8,[`theme-overrides`])]),default:T(()=>[D.value&&v(K)(D.value)==`image`?(o(),F(`div`,Jt,[I(`img`,{src:v(q)(D.value.image),alt:D.value.name||`Фото улики`,class:`view-application-image`},null,8,Yt)])):D.value&&v(K)(D.value)==`pdf`?(o(),F(`iframe`,{key:1,src:v(q)(D.value.image),class:`view-application-pdf`},null,8,Xt)):D.value&&v(K)(D.value)==`audio`?(o(),F(`audio`,{key:2,src:v(q)(D.value.image),controls:``,autoplay:``,class:`view-application-audio`},null,8,Zt)):O.value?(o(),F(`div`,Qt,[I(`img`,{src:O.value.url,alt:O.value.title||`Фото точки`,class:`view-application-image`},null,8,$t)])):e(``,!0)]),_:2},[A.value?{name:`action`,fn:T(()=>[l(v(R),{class:`photo-paper-action`,tag:`a`,href:A.value,target:`_blank`,rel:`noopener noreferrer`,bordered:!1,"theme-overrides":{textColor:`#bfa07d`,textColorHover:`#63e2b7`}},{default:T(()=>[...y[42]||=[t(` Открыть в новой вкладке `,-1)]]),_:1},8,[`href`])]),key:`0`}:void 0]),1032,[`class`,`theme-overrides`,`style`,`header-style`,`content-style`])]),_:1},8,[`show`])],64))}}),[[`__scopeId`,`data-v-c907363d`]]);export{Ze as n,J as r,en as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Popover-C-ZjsRrv.js b/frontend/dist/assets/Popover-CjBLQZ90.js similarity index 65% rename from frontend/dist/assets/Popover-C-ZjsRrv.js rename to frontend/dist/assets/Popover-CjBLQZ90.js index 1ed0188..9172046 100644 --- a/frontend/dist/assets/Popover-C-ZjsRrv.js +++ b/frontend/dist/assets/Popover-CjBLQZ90.js @@ -1,4 +1,4 @@ -import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,Lt as l,M as u,Mt as d,N as f,O as p,P as m,Pt as h,R as g,S as _,T as v,U as y,V as b,Vt as ee,_t as x,an as S,at as C,b as w,bt as T,g as te,hn as E,ht as ne,it as D,j as O,k,kt as A,nn as re,nt as j,ot as M,p as ie,qt as N,rn as ae,rt as oe,tt as P,v as se,vn as F,w as ce,x as le,y as ue,yt as de,z as fe}from"./client-Bz0sY7Lm.js";import{a as pe,i as me,o as I,t as he}from"./Follower-C1zQmxY2.js";import{a as ge,d as L,f as _e,u as R}from"./Card-D1LVu21r.js";import{_ as ve,m as ye,p as be,u as xe,v as Se,x as Ce}from"./Suffix-JLavbuLO.js";import{t as we}from"./use-merged-state-z45UzW9G.js";import{t as Te}from"./use-compitable-BIRdD7BE.js";import{i as Ee,t as De}from"./keep-YWFBE5Rh.js";import{o as z,r as Oe,s as B}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{a as ke,i as Ae,n as je,o as V,r as H,t as Me}from"./get-peGRPzxS.js";import{$ as Ne,N as Pe,Y as Fe,et as Ie,it as Le,st as Re}from"./index-6B3OmSLg.js";var U=`@@mmoContext`,ze={mounted(e,{value:t}){e[U]={handler:void 0},typeof t==`function`&&(e[U].handler=t,L(`mousemoveoutside`,e,t))},updated(e,{value:t}){let n=e[U];typeof t==`function`?n.handler?n.handler!==t&&(R(`mousemoveoutside`,e,n.handler),n.handler=t,L(`mousemoveoutside`,e,t)):(e[U].handler=t,L(`mousemoveoutside`,e,t)):n.handler&&=(R(`mousemoveoutside`,e,n.handler),void 0)},unmounted(e){let{handler:t}=e[U];t&&R(`mousemoveoutside`,e,t),e[U].handler=void 0}},W;function Be(){return W===void 0&&(W=navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`)),W}var G=f(b,`WeakMap`),Ve=n(Object.keys,Object),He=Object.prototype.hasOwnProperty;function Ue(e){if(!p(e))return Ve(e);var t=[];for(var n in Object(e))He.call(e,n)&&n!=`constructor`&&t.push(n);return t}function K(e){return k(e)?ce(e):Ue(e)}function We(e,t){for(var n=-1,r=t.length,i=e.length;++ns))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&vt?new Y:void 0;for(a.set(e,t),a.set(t,e);++ds))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&vt?new Y:void 0;for(a.set(e,t),a.set(t,e);++d{let{show:t}=e;t&&!Be()&&!e.internalDeactivateImmediately&&(_.value=!0)});let v=T(()=>{let{trigger:t,onClickoutside:n}=e,r=[],{positionManuallyRef:{value:i}}=p;return i||(t===`click`&&!n&&r.push([ye,A,void 0,{capture:!0}]),t===`hover`&&r.push([ze,k])),n&&r.push([ye,A,void 0,{capture:!0}]),(e.displayDirective===`show`||e.animated&&_.value)&&r.push([Re,e.show]),r}),b=T(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:l,color:u,boxShadow:d,borderRadius:f,arrowHeight:p,arrowOffset:m,arrowOffsetVertical:h}}=c.value;return{"--n-box-shadow":d,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":u,"--n-divider-color":l,"--n-border-radius":f,"--n-arrow-height":p,"--n-arrow-offset":m,"--n-arrow-offset-vertical":h,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),x=T(()=>{let t=e.width===`trigger`?void 0:V(e.width),n=[];t&&n.push({width:t});let{maxWidth:r,minWidth:i}=e;return r&&n.push({maxWidth:V(r)}),i&&n.push({maxWidth:V(i)}),a||n.push(b.value),n}),C=a?o(`popover`,void 0,b,e):void 0;p.setBodyInstance({syncPosition:w}),ee(()=>{p.setBodyInstance(null)}),re(F(e,`show`),t=>{e.animated||(t?g.value=!0:g.value=!1)});function w(){var e;(e=f.value)==null||e.syncPosition()}function D(t){e.trigger===`hover`&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function O(t){e.trigger===`hover`&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function k(t){e.trigger===`hover`&&!j().contains(_e(t))&&p.handleMouseMoveOutside(t)}function A(t){(e.trigger===`click`&&!j().contains(_e(t))||e.onClickoutside)&&p.handleClickOutside(t)}function j(){return p.getTriggerElement()}N(ve,m),N(Ce,null),N(Se,null);function M(){if(C?.onRender(),!(e.displayDirective===`show`||e.show||e.animated&&_.value))return null;let r,a=p.internalRenderBodyRef.value,{value:o}=i;if(a)r=a([`${o}-popover-shared`,u?.value&&`${o}-popover--rtl`,C?.themeClass.value,e.overlap&&`${o}-popover-shared--overlap`,e.showArrow&&`${o}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${o}-popover-shared--center-arrow`],m,x.value,D,O);else{let{value:i}=p.extraClassRef,{internalTrapFocus:a}=e,s=!Oe(t.header)||!Oe(t.footer),f=()=>{let n=s?d(ne,null,z(t.header,t=>t?d(`div`,{class:[`${o}-popover__header`,e.headerClass],style:e.headerStyle},t):null),z(t.default,n=>n?d(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t):null),z(t.footer,t=>t?d(`div`,{class:[`${o}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?t.default?.call(t):d(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t);return[e.scrollable?d(ge,{themeOverrides:c.value.peerOverrides.Scrollbar,theme:c.value.peers.Scrollbar,contentClass:s?void 0:`${o}-popover__content ${e.contentClass??``}`,contentStyle:s?void 0:e.contentStyle},{default:()=>n}):n,e.showArrow?yn({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:o}):null]};r=d(`div`,l({class:[`${o}-popover`,`${o}-popover-shared`,u?.value&&`${o}-popover--rtl`,C?.themeClass.value,i.map(e=>`${o}-${e}`),{[`${o}-popover--scrollable`]:e.scrollable,[`${o}-popover--show-header-or-footer`]:s,[`${o}-popover--raw`]:e.raw,[`${o}-popover-shared--overlap`]:e.overlap,[`${o}-popover-shared--show-arrow`]:e.showArrow,[`${o}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:m,style:x.value,onKeydown:p.handleKeydown,onMouseenter:D,onMouseleave:O},n),a?d(Ee,{active:e.show,autoFocus:!0},{default:f}):f())}return S(r,v.value)}return{displayed:_,namespace:r,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:f,adjustedTo:I(e),followerEnabled:g,renderContentNode:M}},render(){return d(he,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===I.tdkey},{default:()=>this.animated?d(Le,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),xn=Object.keys(vn),Sn={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function Cn(e,t,n){Sn[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var wn={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:I.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Tn=A({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},ie.props),wn),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let t=Ne(),n=E(null),r=T(()=>e.show),i=E(e.defaultShow),a=we(r,i),o=Ie(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},c=()=>s()?!1:a.value,l=Te(e,[`arrow`,`showArrow`]),u=T(()=>e.overlap?!1:l.value),d=null,f=E(null),p=E(null),m=Ie(()=>e.x!==void 0&&e.y!==void 0);function h(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:a,onHide:o}=e;i.value=t,n&&B(n,t),r&&B(r,t),t&&a&&B(a,!0),t&&o&&B(o,!1)}function g(){d&&d.syncPosition()}function _(){let{value:e}=f;e&&(window.clearTimeout(e),f.value=null)}function v(){let{value:e}=p;e&&(window.clearTimeout(e),p.value=null)}function y(){let t=s();if(e.trigger===`focus`&&!t){if(c())return;h(!0)}}function b(){let t=s();if(e.trigger===`focus`&&!t){if(!c())return;h(!1)}}function ee(){let t=s();if(e.trigger===`hover`&&!t){if(v(),f.value!==null||c())return;let t=()=>{h(!0),f.value=null},{delay:n}=e;n===0?t():f.value=window.setTimeout(t,n)}}function x(){let t=s();if(e.trigger===`hover`&&!t){if(_(),p.value!==null||!c())return;let t=()=>{h(!1),p.value=null},{duration:n}=e;n===0?t():p.value=window.setTimeout(t,n)}}function S(){x()}function C(t){var n;c()&&(e.trigger===`click`&&(_(),v(),h(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function w(){e.trigger===`click`&&!s()&&(_(),v(),h(!c()))}function te(t){e.internalTrapFocus&&t.key===`Escape`&&(_(),v(),h(!1))}function ne(e){i.value=e}function D(){return n.value?.targetRef}function O(e){d=e}return N(`NPopover`,{getTriggerElement:D,handleKeydown:te,handleMouseEnter:ee,handleMouseLeave:x,handleClickOutside:C,handleMouseMoveOutside:S,setBodyInstance:O,positionManuallyRef:m,isMountedRef:t,zIndexRef:F(e,`zIndex`),extraClassRef:F(e,`internalExtraClass`),internalRenderBodyRef:F(e,`internalRenderBody`)}),ae(()=>{a.value&&s()&&h(!1)}),{binderInstRef:n,positionManually:m,mergedShowConsideringDisabledProp:o,uncontrolledShow:i,mergedShowArrow:u,getMergedShow:c,setShow:ne,handleClick:w,handleMouseEnter:ee,handleMouseLeave:x,handleFocus:y,handleBlur:b,syncPosition:g}},render(){let{positionManually:e,$slots:t}=this,n,r=!1;if(!e&&(n=xe(t,`trigger`),n)){n=de(n),n=n.type===x?d(`span`,[n]):n;let t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(n.type?.__popover__)r=!0,n.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{let{internalInheritedEventHandlers:r}=this,i=[t,...r];Cn(n,r?`nested`:e?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return d(pe,{ref:`binderInstRef`,syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let t=this.getMergedShow();return[this.internalTrapFocus&&t?S(d(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[be,{enabled:t,zIndex:this.zIndex}]]):null,e?null:d(me,null,{default:()=>n}),d(bn,De(this.$props,xn,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:t})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}});export{wn as n,Tn as t}; \ No newline at end of file + `,[j(`popover-arrow`,t)])])])}var vn=Object.assign(Object.assign({},ie.props),{to:I.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function yn({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return d(`div`,{key:`__popover-arrow__`,style:r,class:[`${i}-popover-arrow-wrapper`,n]},d(`div`,{class:[`${i}-popover-arrow`,e],style:t}))}var bn=A({name:`PopoverBody`,inheritAttrs:!1,props:vn,setup(e,{slots:t,attrs:n}){let{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a,mergedRtlRef:s}=y(e),c=ie(`Popover`,`-popover`,_n,Ne,e,i),u=te(`Popover`,s,i),f=E(null),p=h(`NPopover`),m=E(null),g=E(e.show),_=E(!1);ae(()=>{let{show:t}=e;t&&!Be()&&!e.internalDeactivateImmediately&&(_.value=!0)});let v=T(()=>{let{trigger:t,onClickoutside:n}=e,r=[],{positionManuallyRef:{value:i}}=p;return i||(t===`click`&&!n&&r.push([ye,A,void 0,{capture:!0}]),t===`hover`&&r.push([ze,k])),n&&r.push([ye,A,void 0,{capture:!0}]),(e.displayDirective===`show`||e.animated&&_.value)&&r.push([Ie,e.show]),r}),b=T(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:l,color:u,boxShadow:d,borderRadius:f,arrowHeight:p,arrowOffset:m,arrowOffsetVertical:h}}=c.value;return{"--n-box-shadow":d,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":u,"--n-divider-color":l,"--n-border-radius":f,"--n-arrow-height":p,"--n-arrow-offset":m,"--n-arrow-offset-vertical":h,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),x=T(()=>{let t=e.width===`trigger`?void 0:V(e.width),n=[];t&&n.push({width:t});let{maxWidth:r,minWidth:i}=e;return r&&n.push({maxWidth:V(r)}),i&&n.push({maxWidth:V(i)}),a||n.push(b.value),n}),C=a?o(`popover`,void 0,b,e):void 0;p.setBodyInstance({syncPosition:w}),ee(()=>{p.setBodyInstance(null)}),re(F(e,`show`),t=>{e.animated||(t?g.value=!0:g.value=!1)});function w(){var e;(e=f.value)==null||e.syncPosition()}function D(t){e.trigger===`hover`&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function O(t){e.trigger===`hover`&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function k(t){e.trigger===`hover`&&!j().contains(_e(t))&&p.handleMouseMoveOutside(t)}function A(t){(e.trigger===`click`&&!j().contains(_e(t))||e.onClickoutside)&&p.handleClickOutside(t)}function j(){return p.getTriggerElement()}N(ve,m),N(Ce,null),N(Se,null);function M(){if(C?.onRender(),!(e.displayDirective===`show`||e.show||e.animated&&_.value))return null;let r,a=p.internalRenderBodyRef.value,{value:o}=i;if(a)r=a([`${o}-popover-shared`,u?.value&&`${o}-popover--rtl`,C?.themeClass.value,e.overlap&&`${o}-popover-shared--overlap`,e.showArrow&&`${o}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${o}-popover-shared--center-arrow`],m,x.value,D,O);else{let{value:i}=p.extraClassRef,{internalTrapFocus:a}=e,s=!Oe(t.header)||!Oe(t.footer),f=()=>{let n=s?d(ne,null,B(t.header,t=>t?d(`div`,{class:[`${o}-popover__header`,e.headerClass],style:e.headerStyle},t):null),B(t.default,n=>n?d(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t):null),B(t.footer,t=>t?d(`div`,{class:[`${o}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?t.default?.call(t):d(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t);return[e.scrollable?d(ge,{themeOverrides:c.value.peerOverrides.Scrollbar,theme:c.value.peers.Scrollbar,contentClass:s?void 0:`${o}-popover__content ${e.contentClass??``}`,contentStyle:s?void 0:e.contentStyle},{default:()=>n}):n,e.showArrow?yn({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:o}):null]};r=d(`div`,l({class:[`${o}-popover`,`${o}-popover-shared`,u?.value&&`${o}-popover--rtl`,C?.themeClass.value,i.map(e=>`${o}-${e}`),{[`${o}-popover--scrollable`]:e.scrollable,[`${o}-popover--show-header-or-footer`]:s,[`${o}-popover--raw`]:e.raw,[`${o}-popover-shared--overlap`]:e.overlap,[`${o}-popover-shared--show-arrow`]:e.showArrow,[`${o}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:m,style:x.value,onKeydown:p.handleKeydown,onMouseenter:D,onMouseleave:O},n),a?d(Ee,{active:e.show,autoFocus:!0},{default:f}):f())}return S(r,v.value)}return{displayed:_,namespace:r,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:f,adjustedTo:I(e),followerEnabled:g,renderContentNode:M}},render(){return d(he,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===I.tdkey},{default:()=>this.animated?d(Fe,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),xn=Object.keys(vn),Sn={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function Cn(e,t,n){Sn[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var wn={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:I.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},Tn=A({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},ie.props),wn),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let t=Le(),n=E(null),r=T(()=>e.show),i=E(e.defaultShow),a=we(r,i),o=Re(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},c=()=>s()?!1:a.value,l=Te(e,[`arrow`,`showArrow`]),u=T(()=>e.overlap?!1:l.value),d=null,f=E(null),p=E(null),m=Re(()=>e.x!==void 0&&e.y!==void 0);function h(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:a,onHide:o}=e;i.value=t,n&&z(n,t),r&&z(r,t),t&&a&&z(a,!0),t&&o&&z(o,!1)}function g(){d&&d.syncPosition()}function _(){let{value:e}=f;e&&(window.clearTimeout(e),f.value=null)}function v(){let{value:e}=p;e&&(window.clearTimeout(e),p.value=null)}function y(){let t=s();if(e.trigger===`focus`&&!t){if(c())return;h(!0)}}function b(){let t=s();if(e.trigger===`focus`&&!t){if(!c())return;h(!1)}}function ee(){let t=s();if(e.trigger===`hover`&&!t){if(v(),f.value!==null||c())return;let t=()=>{h(!0),f.value=null},{delay:n}=e;n===0?t():f.value=window.setTimeout(t,n)}}function x(){let t=s();if(e.trigger===`hover`&&!t){if(_(),p.value!==null||!c())return;let t=()=>{h(!1),p.value=null},{duration:n}=e;n===0?t():p.value=window.setTimeout(t,n)}}function S(){x()}function C(t){var n;c()&&(e.trigger===`click`&&(_(),v(),h(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function w(){e.trigger===`click`&&!s()&&(_(),v(),h(!c()))}function te(t){e.internalTrapFocus&&t.key===`Escape`&&(_(),v(),h(!1))}function ne(e){i.value=e}function D(){return n.value?.targetRef}function O(e){d=e}return N(`NPopover`,{getTriggerElement:D,handleKeydown:te,handleMouseEnter:ee,handleMouseLeave:x,handleClickOutside:C,handleMouseMoveOutside:S,setBodyInstance:O,positionManuallyRef:m,isMountedRef:t,zIndexRef:F(e,`zIndex`),extraClassRef:F(e,`internalExtraClass`),internalRenderBodyRef:F(e,`internalRenderBody`)}),ae(()=>{a.value&&s()&&h(!1)}),{binderInstRef:n,positionManually:m,mergedShowConsideringDisabledProp:o,uncontrolledShow:i,mergedShowArrow:u,getMergedShow:c,setShow:ne,handleClick:w,handleMouseEnter:ee,handleMouseLeave:x,handleFocus:y,handleBlur:b,syncPosition:g}},render(){let{positionManually:e,$slots:t}=this,n,r=!1;if(!e&&(n=xe(t,`trigger`),n)){n=de(n),n=n.type===x?d(`span`,[n]):n;let t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(n.type?.__popover__)r=!0,n.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{let{internalInheritedEventHandlers:r}=this,i=[t,...r];Cn(n,r?`nested`:e?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return d(pe,{ref:`binderInstRef`,syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let t=this.getMergedShow();return[this.internalTrapFocus&&t?S(d(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[be,{enabled:t,zIndex:this.zIndex}]]):null,e?null:d(me,null,{default:()=>n}),d(bn,De(this.$props,xn,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:t})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}});export{wn as n,Tn as t}; \ No newline at end of file diff --git a/frontend/dist/assets/PrivacyPolicyView-d5uNdF7b.js b/frontend/dist/assets/PrivacyPolicyView-3H_W5BBn.js similarity index 56% rename from frontend/dist/assets/PrivacyPolicyView-d5uNdF7b.js rename to frontend/dist/assets/PrivacyPolicyView-3H_W5BBn.js index 9f9c557..116985a 100644 --- a/frontend/dist/assets/PrivacyPolicyView-d5uNdF7b.js +++ b/frontend/dist/assets/PrivacyPolicyView-3H_W5BBn.js @@ -1 +1 @@ -import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-BhocR0ua.js";import{t as o}from"./DocsPage-D65XguoR.js";var s=r({__name:`PrivacyPolicyView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`privacy`}),t(a)],64))}});export{s as default}; \ No newline at end of file +import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-vnmT21Il.js";import{t as o}from"./DocsPage-Bhdw6IT7.js";var s=r({__name:`PrivacyPolicyView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`privacy`}),t(a)],64))}});export{s as default}; \ No newline at end of file diff --git a/frontend/dist/assets/Rate-CmLMszwf.js b/frontend/dist/assets/Rate-D7hhdTpC.js similarity index 92% rename from frontend/dist/assets/Rate-CmLMszwf.js rename to frontend/dist/assets/Rate-D7hhdTpC.js index 9d6830e..f93804f 100644 --- a/frontend/dist/assets/Rate-CmLMszwf.js +++ b/frontend/dist/assets/Rate-D7hhdTpC.js @@ -1,4 +1,4 @@ -import{H as e,Jt as t,Mt as n,U as r,at as i,bt as a,d as o,hn as s,it as c,kt as l,nt as u,ot as d,p as f,st as p,tt as m,vn as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./use-merged-state-z45UzW9G.js";import{c as _,s as v}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as y}from"./use-form-item-Bl3X3aXB.js";import{q as b}from"./index-6B3OmSLg.js";function x(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:`#FFCC33`,sizeSmall:`16px`,sizeMedium:`20px`,sizeLarge:`24px`}}var S={name:`Rate`,common:o,self:x},C=()=>n(`svg`,{viewBox:`0 0 512 512`},n(`path`,{d:`M394 480a16 16 0 01-9.39-3L256 383.76 127.39 477a16 16 0 01-24.55-18.08L153 310.35 23 221.2a16 16 0 019-29.2h160.38l48.4-148.95a16 16 0 0130.44 0l48.4 149H480a16 16 0 019.05 29.2L359 310.35l50.13 148.53A16 16 0 01394 480z`})),w=u(`rate`,{display:`inline-flex`,flexWrap:`nowrap`},[m(`&:hover`,[c(`item`,` +import{H as e,Jt as t,Mt as n,U as r,at as i,bt as a,d as o,hn as s,it as c,kt as l,nt as u,ot as d,p as f,st as p,tt as m,vn as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./use-merged-state-z45UzW9G.js";import{c as _,l as v}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as y}from"./use-form-item-Bl3X3aXB.js";import{J as b}from"./index-NE0dsiiJ.js";function x(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:`#FFCC33`,sizeSmall:`16px`,sizeMedium:`20px`,sizeLarge:`24px`}}var S={name:`Rate`,common:o,self:x},C=()=>n(`svg`,{viewBox:`0 0 512 512`},n(`path`,{d:`M394 480a16 16 0 01-9.39-3L256 383.76 127.39 477a16 16 0 01-24.55-18.08L153 310.35 23 221.2a16 16 0 019-29.2h160.38l48.4-148.95a16 16 0 0130.44 0l48.4 149H480a16 16 0 019.05 29.2L359 310.35l50.13 148.53A16 16 0 01394 480z`})),w=u(`rate`,{display:`inline-flex`,flexWrap:`nowrap`},[m(`&:hover`,[c(`item`,` transition: transform .1s var(--n-bezier), color .3s var(--n-bezier); @@ -33,4 +33,4 @@ import{H as e,Jt as t,Mt as n,U as r,at as i,bt as a,d as o,hn as s,it as c,kt a color: rgba(255, 255, 255, 0); `,[i(`active`,` color: var(--n-item-color-active); - `)])]),T=l({name:`Rate`,props:Object.assign(Object.assign({},f.props),{allowHalf:Boolean,count:{type:Number,default:5},value:Number,defaultValue:{type:Number,default:null},readonly:Boolean,size:[String,Number],clearable:Boolean,color:String,onClear:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:i,mergedComponentPropsRef:o}=r(t),c=f(`Rate`,`-rate`,w,S,t,n),l=h(t,`value`),u=s(t.defaultValue),d=s(null),m=y(t,{mergedSize(e){if(t.size!==void 0)return t.size;if(e)return e.mergedSize.value;let n=o?.value?.Rate?.size;return n===void 0?`medium`:n}}),b=g(l,u);function x(e){let{"onUpdate:value":n,onUpdateValue:r}=t,{nTriggerFormChange:i,nTriggerFormInput:a}=m;n&&v(n,e),r&&v(r,e),u.value=e,i(),a()}function C(e,n){return t.allowHalf?n.offsetX>=Math.floor(n.currentTarget.offsetWidth/2)?e+1:e+.5:e+1}let T=!1;function E(e,t){T||(d.value=C(e,t))}function D(){d.value=null}function O(e,n){var r;let{clearable:i}=t,a=C(e,n);i&&a===b.value?(T=!0,(r=t.onClear)==null||r.call(t),d.value=null,x(null)):x(a)}function k(){T=!1}let{mergedSizeRef:A}=m,j=a(()=>{let e=A.value,{self:t}=c.value;return typeof e==`number`?`${e}px`:t[p(`size`,e)]}),M=a(()=>{let{common:{cubicBezierEaseInOut:e},self:n}=c.value,{itemColor:r,itemColorActive:i}=n,{color:a}=t;return{"--n-bezier":e,"--n-item-color":r,"--n-item-color-active":a||i,"--n-item-size":j.value}}),N=i?e(`rate`,a(()=>{let e=j.value,{color:n}=t,r=``;return e&&(r+=e[0]),n&&(r+=_(n)),r}),M,t):void 0;return{mergedClsPrefix:n,mergedValue:b,hoverIndex:d,handleMouseMove:E,handleClick:O,handleMouseLeave:D,handleMouseEnterSomeStar:k,cssVars:i?void 0:M,themeClass:N?.themeClass,onRender:N?.onRender}},render(){let{readonly:e,hoverIndex:r,mergedValue:i,mergedClsPrefix:a,onRender:o,$slots:{default:s}}=this;return o?.(),n(`div`,{class:[`${a}-rate`,{[`${a}-rate--readonly`]:e},this.themeClass],style:this.cssVars,onMouseleave:this.handleMouseLeave},t(this.count,(t,o)=>{let c=s?s({index:o}):n(b,{clsPrefix:a},{default:C}),l=r===null?o+1<=(i||0):o+1<=r;return n(`div`,{key:o,class:[`${a}-rate__item`,l&&`${a}-rate__item--active`],onClick:e?void 0:e=>{this.handleClick(o,e)},onMouseenter:this.handleMouseEnterSomeStar,onMousemove:e?void 0:e=>{this.handleMouseMove(o,e)}},c,this.allowHalf?n(`div`,{class:[`${a}-rate__half`,{[`${a}-rate__half--active`]:!l&&r!==null?o+.5<=r:o+.5<=(i||0)}]},c):null)}))}});export{T as t}; \ No newline at end of file + `)])]),T=l({name:`Rate`,props:Object.assign(Object.assign({},f.props),{allowHalf:Boolean,count:{type:Number,default:5},value:Number,defaultValue:{type:Number,default:null},readonly:Boolean,size:[String,Number],clearable:Boolean,color:String,onClear:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:i,mergedComponentPropsRef:o}=r(t),c=f(`Rate`,`-rate`,w,S,t,n),l=h(t,`value`),u=s(t.defaultValue),d=s(null),m=y(t,{mergedSize(e){if(t.size!==void 0)return t.size;if(e)return e.mergedSize.value;let n=o?.value?.Rate?.size;return n===void 0?`medium`:n}}),b=g(l,u);function x(e){let{"onUpdate:value":n,onUpdateValue:r}=t,{nTriggerFormChange:i,nTriggerFormInput:a}=m;n&&_(n,e),r&&_(r,e),u.value=e,i(),a()}function C(e,n){return t.allowHalf?n.offsetX>=Math.floor(n.currentTarget.offsetWidth/2)?e+1:e+.5:e+1}let T=!1;function E(e,t){T||(d.value=C(e,t))}function D(){d.value=null}function O(e,n){var r;let{clearable:i}=t,a=C(e,n);i&&a===b.value?(T=!0,(r=t.onClear)==null||r.call(t),d.value=null,x(null)):x(a)}function k(){T=!1}let{mergedSizeRef:A}=m,j=a(()=>{let e=A.value,{self:t}=c.value;return typeof e==`number`?`${e}px`:t[p(`size`,e)]}),M=a(()=>{let{common:{cubicBezierEaseInOut:e},self:n}=c.value,{itemColor:r,itemColorActive:i}=n,{color:a}=t;return{"--n-bezier":e,"--n-item-color":r,"--n-item-color-active":a||i,"--n-item-size":j.value}}),N=i?e(`rate`,a(()=>{let e=j.value,{color:n}=t,r=``;return e&&(r+=e[0]),n&&(r+=v(n)),r}),M,t):void 0;return{mergedClsPrefix:n,mergedValue:b,hoverIndex:d,handleMouseMove:E,handleClick:O,handleMouseLeave:D,handleMouseEnterSomeStar:k,cssVars:i?void 0:M,themeClass:N?.themeClass,onRender:N?.onRender}},render(){let{readonly:e,hoverIndex:r,mergedValue:i,mergedClsPrefix:a,onRender:o,$slots:{default:s}}=this;return o?.(),n(`div`,{class:[`${a}-rate`,{[`${a}-rate--readonly`]:e},this.themeClass],style:this.cssVars,onMouseleave:this.handleMouseLeave},t(this.count,(t,o)=>{let c=s?s({index:o}):n(b,{clsPrefix:a},{default:C}),l=r===null?o+1<=(i||0):o+1<=r;return n(`div`,{key:o,class:[`${a}-rate__item`,l&&`${a}-rate__item--active`],onClick:e?void 0:e=>{this.handleClick(o,e)},onMouseenter:this.handleMouseEnterSomeStar,onMousemove:e?void 0:e=>{this.handleMouseMove(o,e)}},c,this.allowHalf?n(`div`,{class:[`${a}-rate__half`,{[`${a}-rate__half--active`]:!l&&r!==null?o+.5<=r:o+.5<=(i||0)}]},c):null)}))}});export{T as t}; \ No newline at end of file diff --git a/frontend/dist/assets/ReviewsView-BrBpPPEG.js b/frontend/dist/assets/ReviewsView-1YanUVKc.js similarity index 85% rename from frontend/dist/assets/ReviewsView-BrBpPPEG.js rename to frontend/dist/assets/ReviewsView-1YanUVKc.js index 78d9b07..eb3dc88 100644 --- a/frontend/dist/assets/ReviewsView-BrBpPPEG.js +++ b/frontend/dist/assets/ReviewsView-1YanUVKc.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-D1LVu21r.js";import{n as h,r as g}from"./es-BhJOHfSF.js";import{t as _}from"./Button-lcMg8vK2.js";import{t as v}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as y}from"./Flex-BUYalFhW.js";import{t as b}from"./Rate-CmLMszwf.js";import{i as x}from"./index-6B3OmSLg.js";import{t as S}from"./HeaderMenu-BhocR0ua.js";var C={class:`center-block-custom`},w={class:`width1200`},T={class:`page-header`},E={class:`review-game`},D={class:`review-text`},O=v(d({__name:`ReviewsPage`,setup(d){let v=x(),O=h(),k=c([]);async function A(){try{let e=await v.GetReviewsForModeration({});k.value=e.reviews||[]}catch(e){O.error(e instanceof Error?e.message:`Не удалось загрузить отзывы`)}}async function j(e,t){try{await v.ModerateGameReview({ID:e.ID,status:t}),await A()}catch(e){O.error(e instanceof Error?e.message:`Не удалось изменить отзыв`)}}return A(),(c,d)=>(r(),f(l,null,[p(`div`,C,[p(`div`,w,[p(`div`,T,[d[1]||=p(`h1`,null,`Отзывы`,-1),i(s(_),{onClick:A},{default:u(()=>[...d[0]||=[t(`Обновить`,-1)]]),_:1})]),k.value.length==0?(r(),o(s(m),{key:0},{default:u(()=>[...d[2]||=[t(`Очередь отзывов пуста.`,-1)]]),_:1})):e(``,!0),(r(!0),f(l,null,n(k.value,n=>(r(),o(s(m),{key:n.ID,class:`review-card`},{default:u(()=>[i(s(y),{justify:`space-between`,align:`center`},{default:u(()=>[p(`div`,null,[p(`div`,E,a(n.gameName),1),p(`strong`,null,a(n.teamName),1)]),i(s(g),null,{default:u(()=>[t(a(n.status),1)]),_:2},1024)]),_:2},1024),i(s(b),{value:n.rating,readonly:``},null,8,[`value`]),p(`div`,null,`Сложность: `+a([``,`лёгкая`,`средняя`,`тяжёлая`][n.difficulty||0]),1),p(`p`,D,a(n.text),1),n.status==`pending`?(r(),o(s(y),{key:0,justify:`end`},{default:u(()=>[i(s(_),{type:`success`,onClick:e=>j(n,`approved`)},{default:u(()=>[...d[3]||=[t(`Одобрить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{type:`error`,ghost:``,onClick:e=>j(n,`rejected`)},{default:u(()=>[...d[4]||=[t(`Отклонить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):n.status==`approved`?(r(),o(s(y),{key:1,justify:`end`},{default:u(()=>[i(s(_),{type:`error`,ghost:``,onClick:e=>j(n,`hidden`)},{default:u(()=>[...d[5]||=[t(`Скрыть`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):e(``,!0)]),_:2},1024))),128))])]),i(S,{active:`reviews`})],64))}}),[[`__scopeId`,`data-v-0b64d5d0`]]),k=d({__name:`ReviewsView`,setup(e){return(e,t)=>(r(),o(O))}});export{k as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-BGJkYb2B.js";import{n as h,r as g}from"./es-Qklex053.js";import{t as _}from"./Button-MBUKfT_Z.js";import{t as v}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as y}from"./Flex-Dsa9FxiA.js";import{t as b}from"./Rate-D7hhdTpC.js";import{i as x}from"./index-NE0dsiiJ.js";import{t as S}from"./HeaderMenu-vnmT21Il.js";var C={class:`center-block-custom`},w={class:`width1200`},T={class:`page-header`},E={class:`review-game`},D={class:`review-text`},O=v(d({__name:`ReviewsPage`,setup(d){let v=x(),O=h(),k=c([]);async function A(){try{let e=await v.GetReviewsForModeration({});k.value=e.reviews||[]}catch(e){O.error(e instanceof Error?e.message:`Не удалось загрузить отзывы`)}}async function j(e,t){try{await v.ModerateGameReview({ID:e.ID,status:t}),await A()}catch(e){O.error(e instanceof Error?e.message:`Не удалось изменить отзыв`)}}return A(),(c,d)=>(r(),f(l,null,[p(`div`,C,[p(`div`,w,[p(`div`,T,[d[1]||=p(`h1`,null,`Отзывы`,-1),i(s(_),{onClick:A},{default:u(()=>[...d[0]||=[t(`Обновить`,-1)]]),_:1})]),k.value.length==0?(r(),o(s(m),{key:0},{default:u(()=>[...d[2]||=[t(`Очередь отзывов пуста.`,-1)]]),_:1})):e(``,!0),(r(!0),f(l,null,n(k.value,n=>(r(),o(s(m),{key:n.ID,class:`review-card`},{default:u(()=>[i(s(y),{justify:`space-between`,align:`center`},{default:u(()=>[p(`div`,null,[p(`div`,E,a(n.gameName),1),p(`strong`,null,a(n.teamName),1)]),i(s(g),null,{default:u(()=>[t(a(n.status),1)]),_:2},1024)]),_:2},1024),i(s(b),{value:n.rating,readonly:``},null,8,[`value`]),p(`div`,null,`Сложность: `+a([``,`лёгкая`,`средняя`,`тяжёлая`][n.difficulty||0]),1),p(`p`,D,a(n.text),1),n.status==`pending`?(r(),o(s(y),{key:0,justify:`end`},{default:u(()=>[i(s(_),{type:`success`,onClick:e=>j(n,`approved`)},{default:u(()=>[...d[3]||=[t(`Одобрить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{type:`error`,ghost:``,onClick:e=>j(n,`rejected`)},{default:u(()=>[...d[4]||=[t(`Отклонить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):n.status==`approved`?(r(),o(s(y),{key:1,justify:`end`},{default:u(()=>[i(s(_),{type:`error`,ghost:``,onClick:e=>j(n,`hidden`)},{default:u(()=>[...d[5]||=[t(`Скрыть`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)):e(``,!0)]),_:2},1024))),128))])]),i(S,{active:`reviews`})],64))}}),[[`__scopeId`,`data-v-0b64d5d0`]]),k=d({__name:`ReviewsView`,setup(e){return(e,t)=>(r(),o(O))}});export{k as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ScenarioView-GTY1q8L_.js b/frontend/dist/assets/ScenarioView-VnFgrJ5p.js similarity index 91% rename from frontend/dist/assets/ScenarioView-GTY1q8L_.js rename to frontend/dist/assets/ScenarioView-VnFgrJ5p.js index 85d4b08..0c5dc75 100644 --- a/frontend/dist/assets/ScenarioView-GTY1q8L_.js +++ b/frontend/dist/assets/ScenarioView-VnFgrJ5p.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,l as f,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{n as h,r as g}from"./es-BhJOHfSF.js";import{t as _}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as v}from"./Rate-CmLMszwf.js";import{i as y}from"./index-6B3OmSLg.js";import{t as b}from"./HeaderMenu-BhocR0ua.js";var x={class:`center-block-custom`},S={class:`width700`},C={class:`scenario-card`},w={class:`scenario-heading`},T={class:`scenario-title`},E={class:`scenario-image-frame`},D=[`src`,`alt`],O={class:`scenario-details`},k={class:`scenario-description`},A={class:`scenario-rating`},j={key:1},M={key:2},N={key:0,class:`scenario-difficulty`},P={class:`scenario-author`},F={key:1,class:`reviews-section`},I={class:`review-heading`},L={class:`review-game`},R={class:`review-text`},z=_(d({__name:`ScenarioPage`,setup(d){let _=h(),z=y(),B=f().params.id,V=c([]),H=c({ID:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0,averageRating:void 0,reviewsCount:void 0,difficulty:void 0});async function U(e){try{let t=await z.GetScenario({ID:e});H.value=t.scenario}catch(e){_.error(e instanceof Error?e.message:`Не удалось загрузить сценарий`)}}U(Number(B));async function W(e){try{let t=await z.GetScenarioReviews({scenarioID:e});V.value=t.reviews||[]}catch(e){_.error(e instanceof Error?e.message:`Не удалось загрузить отзывы`)}}return W(Number(B)),(c,d)=>(r(),p(l,null,[m(`div`,x,[m(`div`,S,[m(`section`,C,[m(`div`,w,[d[0]||=m(`p`,{class:`scenario-kicker`},`ДЕЛО ИЗ КАТАЛОГА`,-1),m(`h1`,T,a(H.value.name),1)]),m(`div`,E,[m(`img`,{class:`scenario-image`,src:H.value.image,alt:H.value.name},null,8,D)]),m(`div`,O,[m(`p`,k,a(H.value.description),1),m(`div`,A,[H.value.reviewsCount?(r(),o(s(v),{key:0,value:H.value.averageRating,readonly:``,"allow-half":``,size:`small`},null,8,[`value`])):e(``,!0),H.value.reviewsCount?(r(),p(`span`,j,a(H.value.averageRating?.toFixed(1))+` · `+a(H.value.reviewsCount)+` отзывов`,1)):(r(),p(`span`,M,`Пока нет оценок`))]),H.value.difficulty?(r(),p(`div`,N,`Сложность: `+a(H.value.difficulty),1)):e(``,!0),m(`div`,P,[i(s(g),{bordered:!1,type:`success`,class:`status-block`},{default:u(()=>[t(` Автор: `+a(H.value.author?.username),1)]),_:1})]),V.value.length?(r(),p(`section`,F,[d[1]||=m(`h2`,{class:`reviews-title`},`Отзывы команд`,-1),(r(!0),p(l,null,n(V.value,e=>(r(),p(`article`,{key:e.ID,class:`review-card`},[m(`div`,I,[m(`strong`,null,a(e.teamName),1),i(s(v),{value:e.rating,readonly:``,size:`small`},null,8,[`value`])]),m(`div`,null,`Сложность: `+a([``,`лёгкая`,`средняя`,`тяжёлая`][e.difficulty||0]),1),m(`div`,L,a(e.gameName),1),m(`p`,R,a(e.text),1)]))),128))])):e(``,!0)])])])]),i(b,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-fd1f9c93`]]),B=d({__name:`ScenarioView`,setup(e){return(e,t)=>(r(),o(z))}});export{B as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,l as f,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{n as h,r as g}from"./es-Qklex053.js";import{t as _}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as v}from"./Rate-D7hhdTpC.js";import{i as y}from"./index-NE0dsiiJ.js";import{t as b}from"./HeaderMenu-vnmT21Il.js";var x={class:`center-block-custom`},S={class:`width700`},C={class:`scenario-card`},w={class:`scenario-heading`},T={class:`scenario-title`},E={class:`scenario-image-frame`},D=[`src`,`alt`],O={class:`scenario-details`},k={class:`scenario-description`},A={class:`scenario-rating`},j={key:1},M={key:2},N={key:0,class:`scenario-difficulty`},P={class:`scenario-author`},F={key:1,class:`reviews-section`},I={class:`review-heading`},L={class:`review-game`},R={class:`review-text`},z=_(d({__name:`ScenarioPage`,setup(d){let _=h(),z=y(),B=f().params.id,V=c([]),H=c({ID:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0,averageRating:void 0,reviewsCount:void 0,difficulty:void 0});async function U(e){try{let t=await z.GetScenario({ID:e});H.value=t.scenario}catch(e){_.error(e instanceof Error?e.message:`Не удалось загрузить сценарий`)}}U(Number(B));async function W(e){try{let t=await z.GetScenarioReviews({scenarioID:e});V.value=t.reviews||[]}catch(e){_.error(e instanceof Error?e.message:`Не удалось загрузить отзывы`)}}return W(Number(B)),(c,d)=>(r(),p(l,null,[m(`div`,x,[m(`div`,S,[m(`section`,C,[m(`div`,w,[d[0]||=m(`p`,{class:`scenario-kicker`},`ДЕЛО ИЗ КАТАЛОГА`,-1),m(`h1`,T,a(H.value.name),1)]),m(`div`,E,[m(`img`,{class:`scenario-image`,src:H.value.image,alt:H.value.name},null,8,D)]),m(`div`,O,[m(`p`,k,a(H.value.description),1),m(`div`,A,[H.value.reviewsCount?(r(),o(s(v),{key:0,value:H.value.averageRating,readonly:``,"allow-half":``,size:`small`},null,8,[`value`])):e(``,!0),H.value.reviewsCount?(r(),p(`span`,j,a(H.value.averageRating?.toFixed(1))+` · `+a(H.value.reviewsCount)+` отзывов`,1)):(r(),p(`span`,M,`Пока нет оценок`))]),H.value.difficulty?(r(),p(`div`,N,`Сложность: `+a(H.value.difficulty),1)):e(``,!0),m(`div`,P,[i(s(g),{bordered:!1,type:`success`,class:`status-block`},{default:u(()=>[t(` Автор: `+a(H.value.author?.username),1)]),_:1})]),V.value.length?(r(),p(`section`,F,[d[1]||=m(`h2`,{class:`reviews-title`},`Отзывы команд`,-1),(r(!0),p(l,null,n(V.value,e=>(r(),p(`article`,{key:e.ID,class:`review-card`},[m(`div`,I,[m(`strong`,null,a(e.teamName),1),i(s(v),{value:e.rating,readonly:``,size:`small`},null,8,[`value`])]),m(`div`,null,`Сложность: `+a([``,`лёгкая`,`средняя`,`тяжёлая`][e.difficulty||0]),1),m(`div`,L,a(e.gameName),1),m(`p`,R,a(e.text),1)]))),128))])):e(``,!0)])])])]),i(b,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-fd1f9c93`]]),B=d({__name:`ScenarioView`,setup(e){return(e,t)=>(r(),o(z))}});export{B as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ScenariosEditorView-BlEU9oVG.js b/frontend/dist/assets/ScenariosEditorView-QOE_o8N2.js similarity index 96% rename from frontend/dist/assets/ScenariosEditorView-BlEU9oVG.js rename to frontend/dist/assets/ScenariosEditorView-QOE_o8N2.js index aaa5c4a..7a2cdcc 100644 --- a/frontend/dist/assets/ScenariosEditorView-BlEU9oVG.js +++ b/frontend/dist/assets/ScenariosEditorView-QOE_o8N2.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,Yt as ee,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,l as te,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{t as h}from"./Card-D1LVu21r.js";import{n as g,r as ne,t as re}from"./es-BhJOHfSF.js";import{t as ie}from"./Modal-Bsm1tUwA.js";import{t as _}from"./Button-lcMg8vK2.js";import{t as ae}from"./Select-DCgo5W2R.js";import{t as v}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as oe,t as y}from"./Upload-B7-f9-Dk.js";import{n as se,r as b,t as ce}from"./PlaceBlock-cxDh8Kvp.js";import{t as x}from"./Input-DeqNzuJd.js";import{t as le}from"./Alert-CUBw4GSK.js";import{t as S}from"./Space-Ka5Z-MRX.js";import{t as C}from"./Flex-BUYalFhW.js";import{t as w}from"./text-BblwgAv2.js";import{i as ue,o as de,t as T}from"./index-6B3OmSLg.js";import{t as fe}from"./HeaderMenu-BhocR0ua.js";import{t as pe}from"./binary_client-DXOBYp6r.js";import{r as me}from"./application-Bg005825.js";var E={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},he=f({name:`Settings`,render:function(e,t){return r(),p(`svg`,E,t[0]||=[m(`path`,{d:`M27 16.76V16v-.77l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51zM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20z`,fill:`currentColor`},null,-1),m(`path`,{d:`M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4z`,fill:`currentColor`},null,-1)])}}),D={key:1,class:`place-block`},O={class:`message-header`},k={class:`message-content`},A={key:0},j={class:`correct-answer`},M={key:1,class:`intro-empty`},N={key:3,class:`place-block`},P={class:`slot-block`},ge=v(f({__name:`QuestionBlock`,props:{newQuestionCode:{},newQuestionText:{},newQuestionAnswer:{},question:{},mode:{}},emits:[`update:newQuestionCode`,`update:newQuestionText`,`update:newQuestionAnswer`,`update:mode`],setup(n,{emit:o}){let c=n,l=o,f=e=>{l(`update:newQuestionCode`,e)},te=e=>{l(`update:newQuestionText`,e)},h=e=>{l(`update:newQuestionAnswer`,e)},g=e=>{l(`update:mode`,e)};return(o,l)=>(r(),p(u,null,[n.mode==`mini-add`?(r(),p(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:l[0]||=e=>g(`add`)},[...l[5]||=[m(`p`,{class:`place-image-plus`},`+`,-1)]])):e(``,!0),n.mode==`add`?(r(),p(`div`,D,[i(s(S),{vertical:``},{default:d(()=>[i(s(b),null,{default:d(()=>[i(s(x),{style:{width:`25%`},value:n.newQuestionCode,"onUpdate:value":f,type:`text`,placeholder:`В-1`},null,8,[`value`]),i(s(x),{style:{width:`75%`},value:n.newQuestionText,"onUpdate:value":te,type:`text`,placeholder:`Кто украл пастуха?`},null,8,[`value`])]),_:1}),i(s(x),{value:n.newQuestionAnswer,"onUpdate:value":h,type:`textarea`,autosize:{minRows:2},placeholder:`Правильный ответ (виден только автору и организаторам)`},null,8,[`value`]),ee(o.$slots,`default`,{},void 0,!0)]),_:3})])):e(``,!0),n.mode==`show-editor`?(r(),p(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:l[1]||=e=>g(`edit`)},[m(`div`,O,a(c.question?.code)+`: `+a(c.question?.text),1),l[8]||=m(`hr`,{class:`hr`},null,-1),m(`div`,k,[c.question?.answer?(r(),p(`span`,A,[l[6]||=t(` Ответ:`,-1),l[7]||=m(`br`,null,null,-1),m(`span`,j,a(c.question.answer),1)])):(r(),p(`span`,M,`Ответ не задан`))])])):e(``,!0),n.mode==`edit`?(r(),p(`div`,N,[i(s(S),{vertical:``},{default:d(()=>[i(s(b),null,{default:d(()=>[i(s(x),{style:{width:`25%`},value:c.question.code,"onUpdate:value":l[2]||=e=>c.question.code=e,type:`text`,placeholder:`В-1`},null,8,[`value`]),i(s(x),{style:{width:`75%`},value:c.question.text,"onUpdate:value":l[3]||=e=>c.question.text=e,type:`text`,placeholder:`Кто украл пастуха?`},null,8,[`value`])]),_:1}),l[10]||=m(`p`,{class:`settings-header`},`Правильный ответ`,-1),i(s(x),{value:c.question.answer,"onUpdate:value":l[4]||=e=>c.question.answer=e,type:`textarea`,autosize:{minRows:2},placeholder:`Правильный ответ (виден только автору и организаторам)`},null,8,[`value`]),i(s(w),{class:`hint`,depth:`3`},{default:d(()=>[...l[9]||=[t(` Смена кода вопроса не переносит ответы команд, отправленные под старым кодом. `,-1)]]),_:1}),m(`div`,P,[ee(o.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0)],64))}}),[[`__scopeId`,`data-v-b506c9f9`]]),_e={class:`width700`},ve={class:`places-container`},ye={class:`settings-block`},be=[`src`],xe=[`src`],Se=[`aria-label`],F=v(f({__name:`ScenariosEditorPage`,setup(ee){let f=de(),v=ue(),b=pe(),E=te().params.id,D=l(!1),O=l(``),k=l(``),A=l(!1),j=g(),M=l([]),N=l({ID:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0,averageRating:void 0,reviewsCount:void 0,difficulty:void 0}),P=l([]),F=l(!1),I=l({text:``,audio:``}),L=l(`show-editor`),R=l({text:``,video:``}),z=l([]),B=l(!1),Ce=c(()=>me(R.value.video)),we=l([]),V=l(null);function H(){R.value={text:``,video:``,...N.value.story?.conclusion},z.value=[]}function Te(){R.value.video=``,z.value=[]}async function Ee(e=!1){B.value=!0;try{let t=Qe(R.value.video);if(!e&&z.value.length){let e=z.value[0].file;if(!e)return;let n=await G(e,`scenarios_`+N.value.ID+`_conclusion_`+e.name);if(!n.filename)return;if(n.fileType!==`video`){j.error(`Закрывашка должна содержать видео MP4 или WebM`);return}t=n.filename}let n=e?{text:``,video:``}:{text:R.value.text,video:t};await v.UpdateScenarioConclusion({ID:N.value.ID,conclusion:n}),N.value.story.conclusion=n,H(),j.success(e?`Закрывашка удалена`:`Закрывашка сохранена`)}catch{j.error(`Не удалось сохранить закрывашку`)}finally{B.value=!1}}let De=c(()=>N.value.story?.places||[]),Oe=l(null),U=new Map;function ke(e){let t=e?De.value.find(t=>(t.oldCode??t.code)===e):void 0,n=t&&U.get(t),r=Oe.value;if(!n||!r){j.error(e?`Точка «${e}» не найдена`:`У действия не указан код точки`);return}n.focus({preventScroll:!0}),r.scrollTo({top:r.scrollTop+n.getBoundingClientRect().top-r.getBoundingClientRect().top-10,behavior:`smooth`})}let Ae=c(()=>N.value.story?.questions||[]);async function W(e){let t=await v.GetFullScenario({ID:e});N.value=t.scenario,V.value=N.value.music_playlist_id||null,H(),N.value.story?.places?.forEach(e=>{let t=e;t.oldCode=t.code,t.mode=`show-editor`}),N.value.story?.questions?.forEach(e=>{let t=e;t.oldCode=t.code,t.mode=`show-editor`}),I.value=N.value.story?.introduction||{text:``,audio:``},L.value=`show-editor`}W(Number(E));async function je(){try{let e=await v.GetPlaylists({});we.value=e.playlists||[]}catch(e){j.error(e instanceof Error?e.message:`Не удалось загрузить плейлисты`)}}je();async function Me(e){try{await v.SetScenarioPlaylist({ID:Number(E),playlistID:e||0}),j.success(`Плейлист сценария сохранён`)}catch(e){j.error(e instanceof Error?e.message:`Не удалось сохранить плейлист`)}}async function Ne(e){await v.DeleteScenario({ID:e}),T.push(`/scenarios`)}async function Pe(e){await v.PublicScenario({ID:e}),await W(Number(E)),O.value=``,D.value=!1}async function Fe(e,t){let n=new Date().toISOString(),r=await v.AddGame({name:(`Тестовая игра: `+e).trim(),description:`Тестовая игра`,location:``,format:`online`,startAt:n,scenarioID:t}),i=await v.AddTeam({name:`Тестовая команда`,captainEmail:``,gameID:r.ID,participantsCount:void 0});T.push(`/team-story/`+i.ID+`?password=`+i.password)}async function Ie(e){await v.DraftScenario({ID:e}),await W(Number(E)),O.value=``,D.value=!1}async function Le(){A.value=!0;try{let{blob:e,filename:t}=await b.downloadScenarioArchive(N.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3),j.success(`Архив сценария скачан`)}catch(e){j.error(e instanceof Error?e.message:`Не удалось скачать архив`)}finally{A.value=!1}}async function G(e,t){if(!e)return{filename:``,fileType:``};let n=await e.arrayBuffer(),r=new Uint8Array(n),i=await v.UploadFile({filename:t,data:ze(r)});return{filename:i.filename||``,fileType:i.file_type||``}}async function Re(){let e=``;if(M.value&&M.value.length>0){let t=M.value[0].file||null;if(t==null)return;let n=await G(t,`scenarios_`+N.value.ID+`_`+t.name);if(n.filename===``)return;e=n.filename}await v.UpdateScenario({ID:N.value.ID,name:N.value.name,description:N.value.description,image:e}),await W(Number(E)),D.value=!1}function ze(e){let t=Be(e);return btoa(t)}function Be(e){let t=``;for(let n=0;ne.code==n.code)??await v.AddScenarioPlace({ID:e.ID,place:{code:n.code,name:n.name,text:void 0,image:void 0,hidden:!0,applications:void 0,doors:void 0,keys:void 0}})}async function We(e){await W(Number(E)),e.mode=`show-editor`}async function Ge(e){if(e.fileList&&e.fileList.length>0){let t=e.fileList[0].file||null;if(t==null)return;let n=await G(t,`scenarios_`+N.value.ID+`_place_`+e.code+`_`+t.name);if(n.filename===``)return;e.image=n.filename}let t=e.applications||[];for(let n of t){if(!n.fileList||n.fileList.length==0)continue;let t=n.fileList[0].file||null;if(t==null)continue;let r=await G(t,`scenarios_`+N.value.ID+`_place_`+e.code+`_app_`+t.name);if(r.filename===``)return;n.image=r.filename,n.file_type=r.fileType}await Ue(N.value,e),await v.UpdateScenarioPlace({ID:N.value.ID,code:e.oldCode,place:e}),await W(Number(E)),e.mode=`show-editor`}async function Ke(e){await v.DeleteScenarioPlace({ID:N.value.ID,code:e.oldCode}),await W(Number(E))}let X=l(``),Z=l(``),Q=l(``),$=l(`mini-add`);async function qe(){await v.AddScenarioQuestion({ID:N.value.ID,question:{code:X.value,text:Z.value,answer:Q.value}}),await W(Number(E)),X.value=``,Z.value=``,Q.value=``,$.value=`add`}async function Je(){X.value=``,Z.value=``,Q.value=``,$.value=`mini-add`}async function Ye(e){await v.UpdateScenarioQuestion({ID:N.value.ID,code:e.oldCode,question:{code:e.code,text:e.text,answer:e.answer}}),await W(Number(E)),e.mode=`show-editor`}async function Xe(e){await W(Number(E)),e.mode=`show-editor`}async function Ze(e){await v.DeleteScenarioQuestion({ID:N.value.ID,code:e.oldCode}),await W(Number(E))}function Qe(e){return e&&e.split(`/`).pop()||``}async function $e(){let e=``;if(I.value.fileList&&I.value.fileList.length>0){let t=I.value.fileList[0].file||null;if(t==null||(e=(await G(t,`scenarios_`+N.value.ID+`_intro_`+t.name)).filename,e===``))return}else e=Qe(I.value.audio);await v.UpdateScenarioIntro({ID:N.value.ID,introduction:{text:I.value.text,audio:e}}),await W(Number(E))}async function et(e=!1){F.value=!0;try{let t=``;if(!e){let e=P.value[0]?.file;if(!e)return;let n=await G(e,`scenarios_`+N.value.ID+`_background_`+e.name);if(!n.filename)return;if(n.fileType!==`image`){j.error(`Фон дела должен быть изображением`);return}t=n.filename}await v.UpdateScenarioBackground({ID:N.value.ID,background:t}),await W(Number(E)),P.value=[]}catch{j.error(`Не удалось сохранить фон дела`)}finally{F.value=!1}}async function tt(){await W(Number(E))}function nt(){let e=[{text:`Настя, ты просто ослепительна сегодня!`,nameForm:`Настя`},{text:`У Насти невероятный вкус!`,nameForm:`Насти`},{text:`Настенька, твоя улыбка делает мир ярче.`,nameForm:`Настенька`},{text:`С Настей всегда интересно общаться.`,nameForm:`Настей`},{text:`Настя, ты — источник вдохновения для всех вокруг.`,nameForm:`Настя`},{text:`Мне нравится, как Настя смотрит на мир.`,nameForm:`Настя`},{text:`Настюха, ты супер!`,nameForm:`Настюха`},{text:`Талант Насти поражает!`,nameForm:`Насти`},{text:`Настя, твоя энергия заряжает батарейки!`,nameForm:`Настя`},{text:`С Настей хочется проводить каждую минуту.`,nameForm:`Настей`},{text:`Настенька, ты — самое красивое, что случилось в этом мире.`,nameForm:`Настенька`},{text:`У Насти золотое сердце.`,nameForm:`Насти`}];return e[Math.floor(Math.random()*e.length)].text}return(ee,c)=>(r(),p(u,null,[m(`div`,{ref_key:`scrollContainer`,ref:Oe,class:`center-block-custom`},[m(`div`,_e,[m(`div`,ve,[N.value.status==`public`?(r(),o(s(le),{key:0,title:`Сценарий опубликован`,type:`warning`,style:{"margin-bottom":`20px`}},{default:d(()=>[...c[40]||=[t(` Не рекомендуется редактировать сценарий когда он опубликован. `,-1)]]),_:1})):e(``,!0),s(f).user?.ID==2?(r(),o(s(le),{key:1,title:nt(),type:`info`,style:{"margin-bottom":`20px`}},null,8,[`title`])):e(``,!0),m(`div`,ye,[t(` Точек: `+a(N.value.story?.places?.length)+`, Вопросов: `+a(N.value.story?.questions?.length)+` `,1),i(s(_),{quaternary:``,onClick:c[0]||=e=>D.value=!0,class:`settings-button`},{default:d(()=>[i(s(re),{class:`settings-icon`},{default:d(()=>[i(s(he))]),_:1}),c[41]||=t(` Настройки `,-1)]),_:1})]),i(s(h),{title:`Музыка сценария`},{default:d(()=>[i(s(ae),{value:V.value,"onUpdate:value":[c[1]||=e=>V.value=e,Me],options:we.value.map(e=>({label:e.name,value:e.ID})),clearable:``,placeholder:`Плейлист по умолчанию`},null,8,[`value`,`options`])]),_:1}),i(s(h),{title:`Фон дела`},{default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[N.value.story?.background?(r(),p(`img`,{key:0,src:N.value.story.background,alt:`Фон дела`,class:`background-preview`},null,8,be)):e(``,!0),i(s(y),{"file-list":P.value,"onUpdate:fileList":c[2]||=e=>P.value=e,accept:`.jpg,.jpeg,.png,.gif,.webp`,max:1,"default-upload":!1,disabled:F.value},{default:d(()=>[i(s(_),{disabled:F.value},{default:d(()=>[...c[42]||=[t(`Выбрать фон`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),i(s(C),null,{default:d(()=>[i(s(_),{loading:F.value,disabled:!P.value.length||F.value,onClick:c[3]||=e=>et()},{default:d(()=>[...c[43]||=[t(`Сохранить фон`,-1)]]),_:1},8,[`loading`,`disabled`]),N.value.story?.background?(r(),o(s(_),{key:0,disabled:F.value,onClick:c[4]||=e=>et(!0)},{default:d(()=>[...c[44]||=[t(`Удалить фон`,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})]),_:1})]),_:1}),i(se,{introduction:I.value,mode:L.value,"onUpdate:mode":c[7]||=e=>L.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[5]||=e=>tt()},{default:d(()=>[...c[45]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[6]||=e=>$e()},{default:d(()=>[...c[46]||=[t(`Сохранить вступление`,-1)]]),_:1})]),_:1})]),_:1},8,[`introduction`,`mode`]),i(s(h),{title:`Закрывашка сценария`},{default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[i(s(w),{depth:`3`},{default:d(()=>[...c[47]||=[t(`Разгадка дела для автора. Игрокам не показывается.`,-1)]]),_:1}),i(s(x),{value:R.value.text,"onUpdate:value":c[8]||=e=>R.value.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Текст закрывашки`,"aria-label":`Текст закрывашки`,disabled:B.value},null,8,[`value`,`disabled`]),Ce.value?(r(),p(`video`,{key:0,src:Ce.value,controls:``,preload:`none`,class:`conclusion-video`,"aria-label":`Видео закрывашки`},null,8,xe)):e(``,!0),R.value.video?(r(),o(s(_),{key:1,disabled:B.value,onClick:c[9]||=e=>Te()},{default:d(()=>[...c[48]||=[t(`Убрать видео`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(s(y),{"file-list":z.value,"onUpdate:fileList":c[10]||=e=>z.value=e,accept:`.mp4,.webm`,max:1,"default-upload":!1,disabled:B.value},{default:d(()=>[i(s(_),{disabled:B.value},{default:d(()=>[...c[49]||=[t(`Выбрать видео MP4/WebM`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),i(s(C),{justify:`end`},{default:d(()=>[N.value.story?.conclusion?.text||N.value.story?.conclusion?.video?(r(),o(s(_),{key:0,disabled:B.value,onClick:c[11]||=e=>Ee(!0)},{default:d(()=>[...c[50]||=[t(`Удалить закрывашку`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(s(_),{disabled:B.value,onClick:c[12]||=e=>H()},{default:d(()=>[...c[51]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(s(_),{loading:B.value,disabled:B.value||!N.value.story,onClick:c[13]||=e=>Ee()},{default:d(()=>[...c[52]||=[t(`Сохранить закрывашку`,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})]),_:1}),c[63]||=m(`div`,{class:`questions-header`},`Вопросы дела`,-1),i(ge,{mode:$.value,"onUpdate:mode":c[16]||=e=>$.value=e,newQuestionCode:X.value,"onUpdate:newQuestionCode":c[17]||=e=>X.value=e,newQuestionText:Z.value,"onUpdate:newQuestionText":c[18]||=e=>Z.value=e,newQuestionAnswer:Q.value,"onUpdate:newQuestionAnswer":c[19]||=e=>Q.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[14]||=e=>Je()},{default:d(()=>[...c[53]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[15]||=e=>qe(),disabled:!X.value},{default:d(()=>[...c[54]||=[t(`Добавить вопрос`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newQuestionCode`,`newQuestionText`,`newQuestionAnswer`]),(r(!0),p(u,null,n(Ae.value,e=>(r(),o(ge,{question:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:e.oldCode??e.code??``},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:t=>Ze(e),type:`error`,ghost:``},{default:d(()=>[...c[55]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Xe(e)},{default:d(()=>[...c[56]||=[t(`Отмена`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Ye(e),disabled:e.code==``},{default:d(()=>[...c[57]||=[t(`Сохранить`,-1)]]),_:1},8,[`onClick`,`disabled`])]),_:2},1024)]),_:2},1032,[`question`,`mode`,`onUpdate:mode`]))),128)),i(ce,{mode:Y.value,"onUpdate:mode":c[22]||=e=>Y.value=e,newPlaceCode:K.value,"onUpdate:newPlaceCode":c[23]||=e=>K.value=e,newPlaceName:q.value,"onUpdate:newPlaceName":c[24]||=e=>q.value=e,newPlaceText:J.value,"onUpdate:newPlaceText":c[25]||=e=>J.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[20]||=e=>He()},{default:d(()=>[...c[58]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[21]||=e=>Ve(),disabled:!K.value},{default:d(()=>[...c[59]||=[t(`Добавить точку`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newPlaceCode`,`newPlaceName`,`newPlaceText`]),(r(!0),p(u,null,n(De.value,e=>(r(),p(`div`,{key:e.oldCode??e.code??``,ref_for:!0,ref:t=>t?s(U).set(e,t):s(U).delete(e),class:`place-card`,tabindex:`-1`,role:`group`,"aria-label":`${e.code}: ${e.name}`},[i(ce,{place:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,onNavigate:ke},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:t=>Ke(e),type:`error`,ghost:``},{default:d(()=>[...c[60]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>We(e)},{default:d(()=>[...c[61]||=[t(`Отмена`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Ge(e),disabled:e.code==``},{default:d(()=>[...c[62]||=[t(`Сохранить`,-1)]]),_:1},8,[`onClick`,`disabled`])]),_:2},1024)]),_:2},1032,[`place`,`mode`,`onUpdate:mode`])],8,Se))),128))])])],512),i(s(ie),{show:D.value,"onUpdate:show":c[39]||=e=>D.value=e},{default:d(()=>[i(s(h),{style:{width:`600px`},title:`Настройки сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(_),{onClick:c[26]||=e=>D.value=!1},{default:d(()=>[...c[64]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[...c[88]||=[]]),default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[c[77]||=m(`p`,null,`Название`,-1),i(s(x),{value:N.value.name,"onUpdate:value":c[27]||=e=>N.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),c[78]||=m(`p`,{class:`settings-header`},`Описание`,-1),i(s(x),{value:N.value.description,"onUpdate:value":c[28]||=e=>N.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),c[79]||=m(`p`,{class:`settings-header`},`Картинка`,-1),i(s(x),{value:N.value.image,"onUpdate:value":c[29]||=e=>N.value.image=e,type:`text`,placeholder:`default_scenario.png`,disabled:``},null,8,[`value`]),i(s(y),{"directory-dnd":``,max:1,"file-list":M.value,"onUpdate:fileList":c[30]||=e=>M.value=e},{default:d(()=>[i(s(oe),null,{default:d(()=>[i(s(w),{style:{"font-size":`16px`}},{default:d(()=>[...c[65]||=[t(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`]),i(s(_),{onClick:c[31]||=e=>Re(),ghost:``},{default:d(()=>[...c[66]||=[t(` Сохранить изменения `,-1)]]),_:1}),c[80]||=m(`hr`,{class:`settings-hr`},null,-1),c[81]||=m(`p`,{class:`settings-header`},`Архив сценария`,-1),c[82]||=m(`p`,{class:`settings-hint`},` Скачайте сценарий ZIP-архивом (scenario.json + изображения) и импортируйте его в другом аккаунте. `,-1),i(s(_),{loading:A.value,disabled:!N.value.ID,ghost:``,onClick:c[32]||=e=>Le()},{default:d(()=>[...c[67]||=[t(` Скачать архив (.zip) `,-1)]]),_:1},8,[`loading`,`disabled`]),c[83]||=m(`hr`,{class:`settings-hr`},null,-1),c[84]||=m(`p`,null,`Создать тестовую игру`,-1),i(s(_),{onClick:c[33]||=e=>Fe(N.value.name||``,N.value.ID),ghost:``},{default:d(()=>[...c[68]||=[t(` Создать игру `,-1)]]),_:1}),c[85]||=m(`hr`,{class:`settings-hr`},null,-1),c[86]||=m(`p`,null,`Публикация`,-1),m(`p`,null,[N.value.status==`public`?(r(),o(s(ne),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[...c[69]||=[t(` Опубликовано `,-1)]]),_:1})):e(``,!0),N.value.status==`draft`?(r(),o(s(ne),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:d(()=>[...c[70]||=[t(` В разработке `,-1)]]),_:1})):e(``,!0)]),m(`p`,null,[c[71]||=t(` Введите название сценария `,-1),i(s(w),{class:`name-text`,strong:``},{default:d(()=>[t(a(N.value.name),1)]),_:1})]),i(s(x),{value:O.value,"onUpdate:value":c[34]||=e=>O.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),N.value.status==`public`?e(``,!0):(r(),o(s(_),{key:0,onClick:c[35]||=e=>Pe(N.value.ID),ghost:``,disabled:O.value!=N.value.name},{default:d(()=>[...c[72]||=[t(` Опубликовать сценарий `,-1)]]),_:1},8,[`disabled`])),N.value.status==`draft`?e(``,!0):(r(),o(s(_),{key:1,onClick:c[36]||=e=>Ie(N.value.ID),ghost:``,disabled:O.value!=N.value.name},{default:d(()=>[...c[73]||=[t(` Снять сценарий с публикации `,-1)]]),_:1},8,[`disabled`])),c[87]||=m(`hr`,{class:`settings-hr`},null,-1),m(`p`,null,[c[74]||=t(` Введите название сценария `,-1),i(s(w),{class:`name-text`,strong:``},{default:d(()=>[t(a(N.value.name),1)]),_:1}),c[75]||=t(` чтобы удалить его `,-1)]),i(s(x),{value:k.value,"onUpdate:value":c[37]||=e=>k.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),i(s(_),{onClick:c[38]||=e=>Ne(N.value.ID),type:`error`,ghost:``,disabled:k.value!=N.value.name},{default:d(()=>[...c[76]||=[t(` Удалить сценарий `,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`show`]),i(fe,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-82e71240`]]),I=f({__name:`ScenariosEditorView`,setup(e){return(e,t)=>(r(),o(F))}});export{I as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,Yt as ee,bn as s,bt as c,hn as l,ht as u,in as d,kt as f,l as te,wt as p,xt as m}from"./client-Bz0sY7Lm.js";import{t as h}from"./Card-BGJkYb2B.js";import{n as g,r as ne,t as re}from"./es-Qklex053.js";import{t as ie}from"./Modal-xM6cEDIr.js";import{t as _}from"./Button-MBUKfT_Z.js";import{t as ae}from"./Select-CfXdJUVK.js";import{t as v}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as oe,t as y}from"./Upload-DxQHkPqo.js";import{n as se,r as b,t as ce}from"./PlaceBlock-BQyPRoGX.js";import{t as x}from"./Input-CEIE7mTC.js";import{t as le}from"./Alert-BoUmQeXf.js";import{t as S}from"./Space-CstX9TL6.js";import{t as C}from"./Flex-Dsa9FxiA.js";import{t as w}from"./text-LOpQkUng.js";import{i as ue,o as de,t as T}from"./index-NE0dsiiJ.js";import{t as fe}from"./HeaderMenu-vnmT21Il.js";import{t as pe}from"./binary_client-BOO__dKx.js";import{r as me}from"./application-Bg005825.js";var E={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},he=f({name:`Settings`,render:function(e,t){return r(),p(`svg`,E,t[0]||=[m(`path`,{d:`M27 16.76V16v-.77l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51zM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20z`,fill:`currentColor`},null,-1),m(`path`,{d:`M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4z`,fill:`currentColor`},null,-1)])}}),D={key:1,class:`place-block`},O={class:`message-header`},k={class:`message-content`},A={key:0},j={class:`correct-answer`},M={key:1,class:`intro-empty`},N={key:3,class:`place-block`},P={class:`slot-block`},ge=v(f({__name:`QuestionBlock`,props:{newQuestionCode:{},newQuestionText:{},newQuestionAnswer:{},question:{},mode:{}},emits:[`update:newQuestionCode`,`update:newQuestionText`,`update:newQuestionAnswer`,`update:mode`],setup(n,{emit:o}){let c=n,l=o,f=e=>{l(`update:newQuestionCode`,e)},te=e=>{l(`update:newQuestionText`,e)},h=e=>{l(`update:newQuestionAnswer`,e)},g=e=>{l(`update:mode`,e)};return(o,l)=>(r(),p(u,null,[n.mode==`mini-add`?(r(),p(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:l[0]||=e=>g(`add`)},[...l[5]||=[m(`p`,{class:`place-image-plus`},`+`,-1)]])):e(``,!0),n.mode==`add`?(r(),p(`div`,D,[i(s(S),{vertical:``},{default:d(()=>[i(s(b),null,{default:d(()=>[i(s(x),{style:{width:`25%`},value:n.newQuestionCode,"onUpdate:value":f,type:`text`,placeholder:`В-1`},null,8,[`value`]),i(s(x),{style:{width:`75%`},value:n.newQuestionText,"onUpdate:value":te,type:`text`,placeholder:`Кто украл пастуха?`},null,8,[`value`])]),_:1}),i(s(x),{value:n.newQuestionAnswer,"onUpdate:value":h,type:`textarea`,autosize:{minRows:2},placeholder:`Правильный ответ (виден только автору и организаторам)`},null,8,[`value`]),ee(o.$slots,`default`,{},void 0,!0)]),_:3})])):e(``,!0),n.mode==`show-editor`?(r(),p(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:l[1]||=e=>g(`edit`)},[m(`div`,O,a(c.question?.code)+`: `+a(c.question?.text),1),l[8]||=m(`hr`,{class:`hr`},null,-1),m(`div`,k,[c.question?.answer?(r(),p(`span`,A,[l[6]||=t(` Ответ:`,-1),l[7]||=m(`br`,null,null,-1),m(`span`,j,a(c.question.answer),1)])):(r(),p(`span`,M,`Ответ не задан`))])])):e(``,!0),n.mode==`edit`?(r(),p(`div`,N,[i(s(S),{vertical:``},{default:d(()=>[i(s(b),null,{default:d(()=>[i(s(x),{style:{width:`25%`},value:c.question.code,"onUpdate:value":l[2]||=e=>c.question.code=e,type:`text`,placeholder:`В-1`},null,8,[`value`]),i(s(x),{style:{width:`75%`},value:c.question.text,"onUpdate:value":l[3]||=e=>c.question.text=e,type:`text`,placeholder:`Кто украл пастуха?`},null,8,[`value`])]),_:1}),l[10]||=m(`p`,{class:`settings-header`},`Правильный ответ`,-1),i(s(x),{value:c.question.answer,"onUpdate:value":l[4]||=e=>c.question.answer=e,type:`textarea`,autosize:{minRows:2},placeholder:`Правильный ответ (виден только автору и организаторам)`},null,8,[`value`]),i(s(w),{class:`hint`,depth:`3`},{default:d(()=>[...l[9]||=[t(` Смена кода вопроса не переносит ответы команд, отправленные под старым кодом. `,-1)]]),_:1}),m(`div`,P,[ee(o.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0)],64))}}),[[`__scopeId`,`data-v-b506c9f9`]]),_e={class:`width700`},ve={class:`places-container`},ye={class:`settings-block`},be=[`src`],xe=[`src`],Se=[`aria-label`],F=v(f({__name:`ScenariosEditorPage`,setup(ee){let f=de(),v=ue(),b=pe(),E=te().params.id,D=l(!1),O=l(``),k=l(``),A=l(!1),j=g(),M=l([]),N=l({ID:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0,averageRating:void 0,reviewsCount:void 0,difficulty:void 0}),P=l([]),F=l(!1),I=l({text:``,audio:``}),L=l(`show-editor`),R=l({text:``,video:``}),z=l([]),B=l(!1),Ce=c(()=>me(R.value.video)),we=l([]),V=l(null);function H(){R.value={text:``,video:``,...N.value.story?.conclusion},z.value=[]}function Te(){R.value.video=``,z.value=[]}async function Ee(e=!1){B.value=!0;try{let t=Qe(R.value.video);if(!e&&z.value.length){let e=z.value[0].file;if(!e)return;let n=await G(e,`scenarios_`+N.value.ID+`_conclusion_`+e.name);if(!n.filename)return;if(n.fileType!==`video`){j.error(`Закрывашка должна содержать видео MP4 или WebM`);return}t=n.filename}let n=e?{text:``,video:``}:{text:R.value.text,video:t};await v.UpdateScenarioConclusion({ID:N.value.ID,conclusion:n}),N.value.story.conclusion=n,H(),j.success(e?`Закрывашка удалена`:`Закрывашка сохранена`)}catch{j.error(`Не удалось сохранить закрывашку`)}finally{B.value=!1}}let De=c(()=>N.value.story?.places||[]),Oe=l(null),U=new Map;function ke(e){let t=e?De.value.find(t=>(t.oldCode??t.code)===e):void 0,n=t&&U.get(t),r=Oe.value;if(!n||!r){j.error(e?`Точка «${e}» не найдена`:`У действия не указан код точки`);return}n.focus({preventScroll:!0}),r.scrollTo({top:r.scrollTop+n.getBoundingClientRect().top-r.getBoundingClientRect().top-10,behavior:`smooth`})}let Ae=c(()=>N.value.story?.questions||[]);async function W(e){let t=await v.GetFullScenario({ID:e});N.value=t.scenario,V.value=N.value.music_playlist_id||null,H(),N.value.story?.places?.forEach(e=>{let t=e;t.oldCode=t.code,t.mode=`show-editor`}),N.value.story?.questions?.forEach(e=>{let t=e;t.oldCode=t.code,t.mode=`show-editor`}),I.value=N.value.story?.introduction||{text:``,audio:``},L.value=`show-editor`}W(Number(E));async function je(){try{let e=await v.GetPlaylists({});we.value=e.playlists||[]}catch(e){j.error(e instanceof Error?e.message:`Не удалось загрузить плейлисты`)}}je();async function Me(e){try{await v.SetScenarioPlaylist({ID:Number(E),playlistID:e||0}),j.success(`Плейлист сценария сохранён`)}catch(e){j.error(e instanceof Error?e.message:`Не удалось сохранить плейлист`)}}async function Ne(e){await v.DeleteScenario({ID:e}),T.push(`/scenarios`)}async function Pe(e){await v.PublicScenario({ID:e}),await W(Number(E)),O.value=``,D.value=!1}async function Fe(e,t){let n=new Date().toISOString(),r=await v.AddGame({name:(`Тестовая игра: `+e).trim(),description:`Тестовая игра`,location:``,format:`online`,startAt:n,scenarioID:t}),i=await v.AddTeam({name:`Тестовая команда`,captainEmail:``,gameID:r.ID,participantsCount:void 0});T.push(`/team-story/`+i.ID+`?password=`+i.password)}async function Ie(e){await v.DraftScenario({ID:e}),await W(Number(E)),O.value=``,D.value=!1}async function Le(){A.value=!0;try{let{blob:e,filename:t}=await b.downloadScenarioArchive(N.value.ID),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3),j.success(`Архив сценария скачан`)}catch(e){j.error(e instanceof Error?e.message:`Не удалось скачать архив`)}finally{A.value=!1}}async function G(e,t){if(!e)return{filename:``,fileType:``};let n=await e.arrayBuffer(),r=new Uint8Array(n),i=await v.UploadFile({filename:t,data:ze(r)});return{filename:i.filename||``,fileType:i.file_type||``}}async function Re(){let e=``;if(M.value&&M.value.length>0){let t=M.value[0].file||null;if(t==null)return;let n=await G(t,`scenarios_`+N.value.ID+`_`+t.name);if(n.filename===``)return;e=n.filename}await v.UpdateScenario({ID:N.value.ID,name:N.value.name,description:N.value.description,image:e}),await W(Number(E)),D.value=!1}function ze(e){let t=Be(e);return btoa(t)}function Be(e){let t=``;for(let n=0;ne.code==n.code)??await v.AddScenarioPlace({ID:e.ID,place:{code:n.code,name:n.name,text:void 0,image:void 0,hidden:!0,applications:void 0,doors:void 0,keys:void 0}})}async function We(e){await W(Number(E)),e.mode=`show-editor`}async function Ge(e){if(e.fileList&&e.fileList.length>0){let t=e.fileList[0].file||null;if(t==null)return;let n=await G(t,`scenarios_`+N.value.ID+`_place_`+e.code+`_`+t.name);if(n.filename===``)return;e.image=n.filename}let t=e.applications||[];for(let n of t){if(!n.fileList||n.fileList.length==0)continue;let t=n.fileList[0].file||null;if(t==null)continue;let r=await G(t,`scenarios_`+N.value.ID+`_place_`+e.code+`_app_`+t.name);if(r.filename===``)return;n.image=r.filename,n.file_type=r.fileType}await Ue(N.value,e),await v.UpdateScenarioPlace({ID:N.value.ID,code:e.oldCode,place:e}),await W(Number(E)),e.mode=`show-editor`}async function Ke(e){await v.DeleteScenarioPlace({ID:N.value.ID,code:e.oldCode}),await W(Number(E))}let X=l(``),Z=l(``),Q=l(``),$=l(`mini-add`);async function qe(){await v.AddScenarioQuestion({ID:N.value.ID,question:{code:X.value,text:Z.value,answer:Q.value}}),await W(Number(E)),X.value=``,Z.value=``,Q.value=``,$.value=`add`}async function Je(){X.value=``,Z.value=``,Q.value=``,$.value=`mini-add`}async function Ye(e){await v.UpdateScenarioQuestion({ID:N.value.ID,code:e.oldCode,question:{code:e.code,text:e.text,answer:e.answer}}),await W(Number(E)),e.mode=`show-editor`}async function Xe(e){await W(Number(E)),e.mode=`show-editor`}async function Ze(e){await v.DeleteScenarioQuestion({ID:N.value.ID,code:e.oldCode}),await W(Number(E))}function Qe(e){return e&&e.split(`/`).pop()||``}async function $e(){let e=``;if(I.value.fileList&&I.value.fileList.length>0){let t=I.value.fileList[0].file||null;if(t==null||(e=(await G(t,`scenarios_`+N.value.ID+`_intro_`+t.name)).filename,e===``))return}else e=Qe(I.value.audio);await v.UpdateScenarioIntro({ID:N.value.ID,introduction:{text:I.value.text,audio:e}}),await W(Number(E))}async function et(e=!1){F.value=!0;try{let t=``;if(!e){let e=P.value[0]?.file;if(!e)return;let n=await G(e,`scenarios_`+N.value.ID+`_background_`+e.name);if(!n.filename)return;if(n.fileType!==`image`){j.error(`Фон дела должен быть изображением`);return}t=n.filename}await v.UpdateScenarioBackground({ID:N.value.ID,background:t}),await W(Number(E)),P.value=[]}catch{j.error(`Не удалось сохранить фон дела`)}finally{F.value=!1}}async function tt(){await W(Number(E))}function nt(){let e=[{text:`Настя, ты просто ослепительна сегодня!`,nameForm:`Настя`},{text:`У Насти невероятный вкус!`,nameForm:`Насти`},{text:`Настенька, твоя улыбка делает мир ярче.`,nameForm:`Настенька`},{text:`С Настей всегда интересно общаться.`,nameForm:`Настей`},{text:`Настя, ты — источник вдохновения для всех вокруг.`,nameForm:`Настя`},{text:`Мне нравится, как Настя смотрит на мир.`,nameForm:`Настя`},{text:`Настюха, ты супер!`,nameForm:`Настюха`},{text:`Талант Насти поражает!`,nameForm:`Насти`},{text:`Настя, твоя энергия заряжает батарейки!`,nameForm:`Настя`},{text:`С Настей хочется проводить каждую минуту.`,nameForm:`Настей`},{text:`Настенька, ты — самое красивое, что случилось в этом мире.`,nameForm:`Настенька`},{text:`У Насти золотое сердце.`,nameForm:`Насти`}];return e[Math.floor(Math.random()*e.length)].text}return(ee,c)=>(r(),p(u,null,[m(`div`,{ref_key:`scrollContainer`,ref:Oe,class:`center-block-custom`},[m(`div`,_e,[m(`div`,ve,[N.value.status==`public`?(r(),o(s(le),{key:0,title:`Сценарий опубликован`,type:`warning`,style:{"margin-bottom":`20px`}},{default:d(()=>[...c[40]||=[t(` Не рекомендуется редактировать сценарий когда он опубликован. `,-1)]]),_:1})):e(``,!0),s(f).user?.ID==2?(r(),o(s(le),{key:1,title:nt(),type:`info`,style:{"margin-bottom":`20px`}},null,8,[`title`])):e(``,!0),m(`div`,ye,[t(` Точек: `+a(N.value.story?.places?.length)+`, Вопросов: `+a(N.value.story?.questions?.length)+` `,1),i(s(_),{quaternary:``,onClick:c[0]||=e=>D.value=!0,class:`settings-button`},{default:d(()=>[i(s(re),{class:`settings-icon`},{default:d(()=>[i(s(he))]),_:1}),c[41]||=t(` Настройки `,-1)]),_:1})]),i(s(h),{title:`Музыка сценария`},{default:d(()=>[i(s(ae),{value:V.value,"onUpdate:value":[c[1]||=e=>V.value=e,Me],options:we.value.map(e=>({label:e.name,value:e.ID})),clearable:``,placeholder:`Плейлист по умолчанию`},null,8,[`value`,`options`])]),_:1}),i(s(h),{title:`Фон дела`},{default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[N.value.story?.background?(r(),p(`img`,{key:0,src:N.value.story.background,alt:`Фон дела`,class:`background-preview`},null,8,be)):e(``,!0),i(s(y),{"file-list":P.value,"onUpdate:fileList":c[2]||=e=>P.value=e,accept:`.jpg,.jpeg,.png,.gif,.webp`,max:1,"default-upload":!1,disabled:F.value},{default:d(()=>[i(s(_),{disabled:F.value},{default:d(()=>[...c[42]||=[t(`Выбрать фон`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),i(s(C),null,{default:d(()=>[i(s(_),{loading:F.value,disabled:!P.value.length||F.value,onClick:c[3]||=e=>et()},{default:d(()=>[...c[43]||=[t(`Сохранить фон`,-1)]]),_:1},8,[`loading`,`disabled`]),N.value.story?.background?(r(),o(s(_),{key:0,disabled:F.value,onClick:c[4]||=e=>et(!0)},{default:d(()=>[...c[44]||=[t(`Удалить фон`,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})]),_:1})]),_:1}),i(se,{introduction:I.value,mode:L.value,"onUpdate:mode":c[7]||=e=>L.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[5]||=e=>tt()},{default:d(()=>[...c[45]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[6]||=e=>$e()},{default:d(()=>[...c[46]||=[t(`Сохранить вступление`,-1)]]),_:1})]),_:1})]),_:1},8,[`introduction`,`mode`]),i(s(h),{title:`Закрывашка сценария`},{default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[i(s(w),{depth:`3`},{default:d(()=>[...c[47]||=[t(`Разгадка дела для автора. Игрокам не показывается.`,-1)]]),_:1}),i(s(x),{value:R.value.text,"onUpdate:value":c[8]||=e=>R.value.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Текст закрывашки`,"aria-label":`Текст закрывашки`,disabled:B.value},null,8,[`value`,`disabled`]),Ce.value?(r(),p(`video`,{key:0,src:Ce.value,controls:``,preload:`none`,class:`conclusion-video`,"aria-label":`Видео закрывашки`},null,8,xe)):e(``,!0),R.value.video?(r(),o(s(_),{key:1,disabled:B.value,onClick:c[9]||=e=>Te()},{default:d(()=>[...c[48]||=[t(`Убрать видео`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(s(y),{"file-list":z.value,"onUpdate:fileList":c[10]||=e=>z.value=e,accept:`.mp4,.webm`,max:1,"default-upload":!1,disabled:B.value},{default:d(()=>[i(s(_),{disabled:B.value},{default:d(()=>[...c[49]||=[t(`Выбрать видео MP4/WebM`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`disabled`]),i(s(C),{justify:`end`},{default:d(()=>[N.value.story?.conclusion?.text||N.value.story?.conclusion?.video?(r(),o(s(_),{key:0,disabled:B.value,onClick:c[11]||=e=>Ee(!0)},{default:d(()=>[...c[50]||=[t(`Удалить закрывашку`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(s(_),{disabled:B.value,onClick:c[12]||=e=>H()},{default:d(()=>[...c[51]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(s(_),{loading:B.value,disabled:B.value||!N.value.story,onClick:c[13]||=e=>Ee()},{default:d(()=>[...c[52]||=[t(`Сохранить закрывашку`,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})]),_:1}),c[63]||=m(`div`,{class:`questions-header`},`Вопросы дела`,-1),i(ge,{mode:$.value,"onUpdate:mode":c[16]||=e=>$.value=e,newQuestionCode:X.value,"onUpdate:newQuestionCode":c[17]||=e=>X.value=e,newQuestionText:Z.value,"onUpdate:newQuestionText":c[18]||=e=>Z.value=e,newQuestionAnswer:Q.value,"onUpdate:newQuestionAnswer":c[19]||=e=>Q.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[14]||=e=>Je()},{default:d(()=>[...c[53]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[15]||=e=>qe(),disabled:!X.value},{default:d(()=>[...c[54]||=[t(`Добавить вопрос`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newQuestionCode`,`newQuestionText`,`newQuestionAnswer`]),(r(!0),p(u,null,n(Ae.value,e=>(r(),o(ge,{question:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:e.oldCode??e.code??``},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:t=>Ze(e),type:`error`,ghost:``},{default:d(()=>[...c[55]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Xe(e)},{default:d(()=>[...c[56]||=[t(`Отмена`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Ye(e),disabled:e.code==``},{default:d(()=>[...c[57]||=[t(`Сохранить`,-1)]]),_:1},8,[`onClick`,`disabled`])]),_:2},1024)]),_:2},1032,[`question`,`mode`,`onUpdate:mode`]))),128)),i(ce,{mode:Y.value,"onUpdate:mode":c[22]||=e=>Y.value=e,newPlaceCode:K.value,"onUpdate:newPlaceCode":c[23]||=e=>K.value=e,newPlaceName:q.value,"onUpdate:newPlaceName":c[24]||=e=>q.value=e,newPlaceText:J.value,"onUpdate:newPlaceText":c[25]||=e=>J.value=e},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:c[20]||=e=>He()},{default:d(()=>[...c[58]||=[t(`Отмена`,-1)]]),_:1}),i(s(_),{onClick:c[21]||=e=>Ve(),disabled:!K.value},{default:d(()=>[...c[59]||=[t(`Добавить точку`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newPlaceCode`,`newPlaceName`,`newPlaceText`]),(r(!0),p(u,null,n(De.value,e=>(r(),p(`div`,{key:e.oldCode??e.code??``,ref_for:!0,ref:t=>t?s(U).set(e,t):s(U).delete(e),class:`place-card`,tabindex:`-1`,role:`group`,"aria-label":`${e.code}: ${e.name}`},[i(ce,{place:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,onNavigate:ke},{default:d(()=>[i(s(C),{justify:`end`},{default:d(()=>[i(s(_),{onClick:t=>Ke(e),type:`error`,ghost:``},{default:d(()=>[...c[60]||=[t(`Удалить`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>We(e)},{default:d(()=>[...c[61]||=[t(`Отмена`,-1)]]),_:1},8,[`onClick`]),i(s(_),{onClick:t=>Ge(e),disabled:e.code==``},{default:d(()=>[...c[62]||=[t(`Сохранить`,-1)]]),_:1},8,[`onClick`,`disabled`])]),_:2},1024)]),_:2},1032,[`place`,`mode`,`onUpdate:mode`])],8,Se))),128))])])],512),i(s(ie),{show:D.value,"onUpdate:show":c[39]||=e=>D.value=e},{default:d(()=>[i(s(h),{style:{width:`600px`},title:`Настройки сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[i(s(_),{onClick:c[26]||=e=>D.value=!1},{default:d(()=>[...c[64]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[...c[88]||=[]]),default:d(()=>[i(s(S),{vertical:``},{default:d(()=>[c[77]||=m(`p`,null,`Название`,-1),i(s(x),{value:N.value.name,"onUpdate:value":c[27]||=e=>N.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),c[78]||=m(`p`,{class:`settings-header`},`Описание`,-1),i(s(x),{value:N.value.description,"onUpdate:value":c[28]||=e=>N.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),c[79]||=m(`p`,{class:`settings-header`},`Картинка`,-1),i(s(x),{value:N.value.image,"onUpdate:value":c[29]||=e=>N.value.image=e,type:`text`,placeholder:`default_scenario.png`,disabled:``},null,8,[`value`]),i(s(y),{"directory-dnd":``,max:1,"file-list":M.value,"onUpdate:fileList":c[30]||=e=>M.value=e},{default:d(()=>[i(s(oe),null,{default:d(()=>[i(s(w),{style:{"font-size":`16px`}},{default:d(()=>[...c[65]||=[t(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`]),i(s(_),{onClick:c[31]||=e=>Re(),ghost:``},{default:d(()=>[...c[66]||=[t(` Сохранить изменения `,-1)]]),_:1}),c[80]||=m(`hr`,{class:`settings-hr`},null,-1),c[81]||=m(`p`,{class:`settings-header`},`Архив сценария`,-1),c[82]||=m(`p`,{class:`settings-hint`},` Скачайте сценарий ZIP-архивом (scenario.json + изображения) и импортируйте его в другом аккаунте. `,-1),i(s(_),{loading:A.value,disabled:!N.value.ID,ghost:``,onClick:c[32]||=e=>Le()},{default:d(()=>[...c[67]||=[t(` Скачать архив (.zip) `,-1)]]),_:1},8,[`loading`,`disabled`]),c[83]||=m(`hr`,{class:`settings-hr`},null,-1),c[84]||=m(`p`,null,`Создать тестовую игру`,-1),i(s(_),{onClick:c[33]||=e=>Fe(N.value.name||``,N.value.ID),ghost:``},{default:d(()=>[...c[68]||=[t(` Создать игру `,-1)]]),_:1}),c[85]||=m(`hr`,{class:`settings-hr`},null,-1),c[86]||=m(`p`,null,`Публикация`,-1),m(`p`,null,[N.value.status==`public`?(r(),o(s(ne),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[...c[69]||=[t(` Опубликовано `,-1)]]),_:1})):e(``,!0),N.value.status==`draft`?(r(),o(s(ne),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:d(()=>[...c[70]||=[t(` В разработке `,-1)]]),_:1})):e(``,!0)]),m(`p`,null,[c[71]||=t(` Введите название сценария `,-1),i(s(w),{class:`name-text`,strong:``},{default:d(()=>[t(a(N.value.name),1)]),_:1})]),i(s(x),{value:O.value,"onUpdate:value":c[34]||=e=>O.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),N.value.status==`public`?e(``,!0):(r(),o(s(_),{key:0,onClick:c[35]||=e=>Pe(N.value.ID),ghost:``,disabled:O.value!=N.value.name},{default:d(()=>[...c[72]||=[t(` Опубликовать сценарий `,-1)]]),_:1},8,[`disabled`])),N.value.status==`draft`?e(``,!0):(r(),o(s(_),{key:1,onClick:c[36]||=e=>Ie(N.value.ID),ghost:``,disabled:O.value!=N.value.name},{default:d(()=>[...c[73]||=[t(` Снять сценарий с публикации `,-1)]]),_:1},8,[`disabled`])),c[87]||=m(`hr`,{class:`settings-hr`},null,-1),m(`p`,null,[c[74]||=t(` Введите название сценария `,-1),i(s(w),{class:`name-text`,strong:``},{default:d(()=>[t(a(N.value.name),1)]),_:1}),c[75]||=t(` чтобы удалить его `,-1)]),i(s(x),{value:k.value,"onUpdate:value":c[37]||=e=>k.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),i(s(_),{onClick:c[38]||=e=>Ne(N.value.ID),type:`error`,ghost:``,disabled:k.value!=N.value.name},{default:d(()=>[...c[76]||=[t(` Удалить сценарий `,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`show`]),i(fe,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-82e71240`]]),I=f({__name:`ScenariosEditorView`,setup(e){return(e,t)=>(r(),o(F))}});export{I as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ScenariosView-BPOpC5IY.js b/frontend/dist/assets/ScenariosView-kVl-aUow.js similarity index 89% rename from frontend/dist/assets/ScenariosView-BPOpC5IY.js rename to frontend/dist/assets/ScenariosView-kVl-aUow.js index d323d59..02e10a5 100644 --- a/frontend/dist/assets/ScenariosView-BPOpC5IY.js +++ b/frontend/dist/assets/ScenariosView-kVl-aUow.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,St as s,bn as c,hn as l,ht as u,in as d,kt as f,u as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Card-D1LVu21r.js";import{n as _,r as v,t as y}from"./es-BhJOHfSF.js";import{t as b}from"./Modal-Bsm1tUwA.js";import{t as x}from"./Button-lcMg8vK2.js";import{t as S}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as C,t as w}from"./Upload-B7-f9-Dk.js";import{t as T}from"./Input-DeqNzuJd.js";import{t as E}from"./Flex-BUYalFhW.js";import{t as D}from"./text-BblwgAv2.js";import{i as O}from"./index-6B3OmSLg.js";import{t as k}from"./HeaderMenu-BhocR0ua.js";import{t as A}from"./binary_client-DXOBYp6r.js";var j={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},M=f({name:`Archive`,render:function(e,t){return r(),m(`svg`,j,t[0]||=[h(`path`,{d:`M14 19h4v2h-4z`,fill:`currentColor`},null,-1),h(`path`,{d:`M6 2v26a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2zm18 26H8V16h16zm0-14H8v-4h16zM8 8V4h16v4z`,fill:`currentColor`},null,-1)])}}),N={class:`center-block-custom`},P={class:`width1200 display-table catalog-grid`},F={class:`scenario-image-block scenario-image-plus import-icon`},I=[`onClick`],L={class:`scenario-content-block`},R={class:`scenario-title`},z={class:`scenario-label`},B=S(f({__name:`ScenariosPage`,setup(f){let S=O(),j=A(),B=l([]),V=p(),H=_(),U=l(!1),W=l(``),G=l(!1),K=l([]),q=l(!1);async function J(){try{B.value=[];let e=await S.GetMyScenarios({});B.value=e.scenarios}catch(e){H.error(e instanceof Error?e.message:`Не удалось загрузить сценарии`)}}async function Y(e){try{await X((await S.AddScenario({name:e})).ID)}catch(e){H.error(e instanceof Error?e.message:`Не удалось создать сценарий`)}}async function X(e){V.push(`/scenarios/`+e+`/editor`)}function Z(){K.value=[],G.value=!1}async function Q(){let e=K.value[0]?.file;if(e){q.value=!0;try{let t=await j.uploadScenarioArchive(e);H.success(`Сценарий импортирован из архива`),Z(),await X(t.ID)}catch(e){H.error(e instanceof Error?e.message:`Не удалось импортировать архив`)}finally{q.value=!1}}}return J(),(l,f)=>(r(),m(u,null,[h(`div`,N,[h(`div`,P,[h(`div`,{class:`scenario-block`,onClick:f[0]||=e=>U.value=!0},[...f[11]||=[h(`div`,{class:`scenario-image-block scenario-image-plus`},`+`,-1),h(`div`,{class:`scenario-content-block`},[h(`p`,{class:`scenario-title`},`Создать новый сценарий`)],-1)]]),h(`div`,{class:`scenario-block`,onClick:f[1]||=e=>G.value=!0},[h(`div`,F,[a(c(y),null,{default:d(()=>[a(c(M))]),_:1})]),f[12]||=h(`div`,{class:`scenario-content-block`},[h(`p`,{class:`scenario-title`},`Импортировать из архива`)],-1)]),(r(!0),m(u,null,n(B.value,n=>(r(),m(`div`,{class:`scenario-block`,onClick:e=>X(n.ID),key:n.ID},[h(`div`,{class:`scenario-image-block scenario-image`,style:i({backgroundImage:`url(${n.image})`})},null,4),h(`div`,L,[h(`p`,R,o(n.name),1),h(`p`,z,[n.status==`public`?(r(),s(c(v),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[...f[13]||=[t(`Опубликовано`,-1)]]),_:1})):e(``,!0),n.status==`draft`?(r(),s(c(v),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:d(()=>[...f[14]||=[t(`В разработке`,-1)]]),_:1})):e(``,!0)])])],8,I))),128))])]),a(c(b),{show:U.value,"onUpdate:show":f[5]||=e=>U.value=e},{default:d(()=>[a(c(g),{style:{width:`600px`},title:`Создание сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[a(c(x),{onClick:f[2]||=e=>U.value=!1},{default:d(()=>[...f[15]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[a(c(E),{justify:`end`},{default:d(()=>[a(c(x),{onClick:f[4]||=e=>Y(W.value),disabled:W.value.length==0},{default:d(()=>[...f[16]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:d(()=>[a(c(T),{value:W.value,"onUpdate:value":f[3]||=e=>W.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1},8,[`show`]),a(c(b),{show:G.value,"onUpdate:show":f[10]||=e=>G.value=e},{default:d(()=>[a(c(g),{style:{width:`600px`},title:`Импорт сценария из архива`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[a(c(x),{onClick:f[6]||=e=>Z()},{default:d(()=>[...f[17]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[a(c(E),{justify:`end`},{default:d(()=>[a(c(x),{onClick:f[8]||=e=>Z()},{default:d(()=>[...f[19]||=[t(`Отмена`,-1)]]),_:1}),a(c(x),{type:`primary`,loading:q.value,disabled:K.value.length==0,onClick:f[9]||=e=>Q()},{default:d(()=>[...f[20]||=[t(` Импортировать `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),default:d(()=>[f[21]||=h(`p`,{class:`import-hint`},` Выберите ZIP-архив сценария (файл scenario.json + папка images). Архив можно получить через «Скачать архив» в настройках сценария. `,-1),a(c(w),{max:1,"file-list":K.value,"onUpdate:fileList":f[7]||=e=>K.value=e,accept:`.zip,application/zip,application/x-zip-compressed,application/octet-stream`},{default:d(()=>[a(c(C),null,{default:d(()=>[a(c(D),{style:{"font-size":`16px`}},{default:d(()=>[...f[18]||=[t(` Щелкните или перетащите ZIP-архив в эту область `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1},8,[`show`]),a(k,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-05f24200`]]),V=f({__name:`ScenariosView`,setup(e){return(e,t)=>(r(),s(B))}});export{V as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,St as s,bn as c,hn as l,ht as u,in as d,kt as f,u as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Card-BGJkYb2B.js";import{n as _,r as v,t as y}from"./es-Qklex053.js";import{t as b}from"./Modal-xM6cEDIr.js";import{t as x}from"./Button-MBUKfT_Z.js";import{t as S}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as C,t as w}from"./Upload-DxQHkPqo.js";import{t as T}from"./Input-CEIE7mTC.js";import{t as E}from"./Flex-Dsa9FxiA.js";import{t as D}from"./text-LOpQkUng.js";import{i as O}from"./index-NE0dsiiJ.js";import{t as k}from"./HeaderMenu-vnmT21Il.js";import{t as A}from"./binary_client-BOO__dKx.js";var j={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},M=f({name:`Archive`,render:function(e,t){return r(),m(`svg`,j,t[0]||=[h(`path`,{d:`M14 19h4v2h-4z`,fill:`currentColor`},null,-1),h(`path`,{d:`M6 2v26a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2zm18 26H8V16h16zm0-14H8v-4h16zM8 8V4h16v4z`,fill:`currentColor`},null,-1)])}}),N={class:`center-block-custom`},P={class:`width1200 display-table catalog-grid`},F={class:`scenario-image-block scenario-image-plus import-icon`},I=[`onClick`],L={class:`scenario-content-block`},R={class:`scenario-title`},z={class:`scenario-label`},B=S(f({__name:`ScenariosPage`,setup(f){let S=O(),j=A(),B=l([]),V=p(),H=_(),U=l(!1),W=l(``),G=l(!1),K=l([]),q=l(!1);async function J(){try{B.value=[];let e=await S.GetMyScenarios({});B.value=e.scenarios}catch(e){H.error(e instanceof Error?e.message:`Не удалось загрузить сценарии`)}}async function Y(e){try{await X((await S.AddScenario({name:e})).ID)}catch(e){H.error(e instanceof Error?e.message:`Не удалось создать сценарий`)}}async function X(e){V.push(`/scenarios/`+e+`/editor`)}function Z(){K.value=[],G.value=!1}async function Q(){let e=K.value[0]?.file;if(e){q.value=!0;try{let t=await j.uploadScenarioArchive(e);H.success(`Сценарий импортирован из архива`),Z(),await X(t.ID)}catch(e){H.error(e instanceof Error?e.message:`Не удалось импортировать архив`)}finally{q.value=!1}}}return J(),(l,f)=>(r(),m(u,null,[h(`div`,N,[h(`div`,P,[h(`div`,{class:`scenario-block`,onClick:f[0]||=e=>U.value=!0},[...f[11]||=[h(`div`,{class:`scenario-image-block scenario-image-plus`},`+`,-1),h(`div`,{class:`scenario-content-block`},[h(`p`,{class:`scenario-title`},`Создать новый сценарий`)],-1)]]),h(`div`,{class:`scenario-block`,onClick:f[1]||=e=>G.value=!0},[h(`div`,F,[a(c(y),null,{default:d(()=>[a(c(M))]),_:1})]),f[12]||=h(`div`,{class:`scenario-content-block`},[h(`p`,{class:`scenario-title`},`Импортировать из архива`)],-1)]),(r(!0),m(u,null,n(B.value,n=>(r(),m(`div`,{class:`scenario-block`,onClick:e=>X(n.ID),key:n.ID},[h(`div`,{class:`scenario-image-block scenario-image`,style:i({backgroundImage:`url(${n.image})`})},null,4),h(`div`,L,[h(`p`,R,o(n.name),1),h(`p`,z,[n.status==`public`?(r(),s(c(v),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:d(()=>[...f[13]||=[t(`Опубликовано`,-1)]]),_:1})):e(``,!0),n.status==`draft`?(r(),s(c(v),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:d(()=>[...f[14]||=[t(`В разработке`,-1)]]),_:1})):e(``,!0)])])],8,I))),128))])]),a(c(b),{show:U.value,"onUpdate:show":f[5]||=e=>U.value=e},{default:d(()=>[a(c(g),{style:{width:`600px`},title:`Создание сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[a(c(x),{onClick:f[2]||=e=>U.value=!1},{default:d(()=>[...f[15]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[a(c(E),{justify:`end`},{default:d(()=>[a(c(x),{onClick:f[4]||=e=>Y(W.value),disabled:W.value.length==0},{default:d(()=>[...f[16]||=[t(` Создать `,-1)]]),_:1},8,[`disabled`])]),_:1})]),default:d(()=>[a(c(T),{value:W.value,"onUpdate:value":f[3]||=e=>W.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1},8,[`show`]),a(c(b),{show:G.value,"onUpdate:show":f[10]||=e=>G.value=e},{default:d(()=>[a(c(g),{style:{width:`600px`},title:`Импорт сценария из архива`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":d(()=>[a(c(x),{onClick:f[6]||=e=>Z()},{default:d(()=>[...f[17]||=[t(` x `,-1)]]),_:1})]),footer:d(()=>[a(c(E),{justify:`end`},{default:d(()=>[a(c(x),{onClick:f[8]||=e=>Z()},{default:d(()=>[...f[19]||=[t(`Отмена`,-1)]]),_:1}),a(c(x),{type:`primary`,loading:q.value,disabled:K.value.length==0,onClick:f[9]||=e=>Q()},{default:d(()=>[...f[20]||=[t(` Импортировать `,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),default:d(()=>[f[21]||=h(`p`,{class:`import-hint`},` Выберите ZIP-архив сценария (файл scenario.json + папка images). Архив можно получить через «Скачать архив» в настройках сценария. `,-1),a(c(w),{max:1,"file-list":K.value,"onUpdate:fileList":f[7]||=e=>K.value=e,accept:`.zip,application/zip,application/x-zip-compressed,application/octet-stream`},{default:d(()=>[a(c(C),null,{default:d(()=>[a(c(D),{style:{"font-size":`16px`}},{default:d(()=>[...f[18]||=[t(` Щелкните или перетащите ZIP-архив в эту область `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1},8,[`show`]),a(k,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-05f24200`]]),V=f({__name:`ScenariosView`,setup(e){return(e,t)=>(r(),s(B))}});export{V as default}; \ No newline at end of file diff --git a/frontend/dist/assets/ScreenView-Dj3ogPPV.js b/frontend/dist/assets/ScreenView-kil-uMc-.js similarity index 95% rename from frontend/dist/assets/ScreenView-Dj3ogPPV.js rename to frontend/dist/assets/ScreenView-kil-uMc-.js index 1bcd983..b3f7ead 100644 --- a/frontend/dist/assets/ScreenView-Dj3ogPPV.js +++ b/frontend/dist/assets/ScreenView-kil-uMc-.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,Rt as s,St as c,Ut as l,Wt as ee,an as u,bn as d,bt as f,hn as p,ht as m,in as h,kt as te,l as ne,nn as g,t as re,wt as _,xt as v}from"./client-Bz0sY7Lm.js";import{t as ie}from"./Card-D1LVu21r.js";import{n as ae}from"./es-BhJOHfSF.js";import{t as y}from"./Button-lcMg8vK2.js";import{t as oe}from"./Select-DCgo5W2R.js";import{t as b}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as se}from"./QrCode-MTPi5t58.js";import{i as ce,r as le,st as x}from"./index-6B3OmSLg.js";import{t as ue}from"./HeaderMenu-BhocR0ua.js";import{r as S}from"./application-Bg005825.js";import{t as de}from"./datetime-BJNH0M1T.js";import{t as fe}from"./useDeviceContext-dfnN0nNy.js";var pe={key:0,class:`screen-center`},me={key:1,class:`screen-page`},he={key:0,class:`screen-center`},ge={key:0,class:`screen-center`},_e={key:0,class:`screen-qr`},ve={key:0,class:`media-error`},ye={key:1,class:`screen-media`},be=[`src`,`muted`],xe=[`src`,`muted`],Se={key:3,class:`conclusion-screen`},Ce=[`src`,`muted`],we={key:4,class:`screen-message`},Te={key:5,class:`screen-message`},Ee={key:6,class:`screen-message`},De={key:7,class:`screen-message`},Oe={key:8,class:`timer-screen`},ke={class:`timer-label`},Ae={class:`timer-value`},je={key:10,class:`screen-cover`},Me=[`src`],Ne={key:1,class:`cover-controls`},C=`evening-detective-screen-session`,w=b(te({__name:`ScreenPage`,setup(te){let b=re(),w=ce(),T=ae(),E=ne(),D=p(``),O=p(``),k=p(),A=p([]),j=p([]),M=p(),N,P=!1,F=p([]),I=p(null),L=p(!1),R=p(``),z=p(!0),B=p(!1),V=p(!1),H=p(Date.now()),U=p(0),W=p(Date.now()),G=p(),K=p(!1),q=p(),J=p(),Y=p(),Pe=0,X=null,Z=f(()=>!!(E.query.screenID&&E.query.accessToken));fe(()=>D.value&&O.value&&!Z.value?{screenID:D.value,accessToken:O.value}:{});let Fe=f(()=>{if(!D.value||!O.value)return``;let e=new URL(`/screen`,window.location.origin);return e.searchParams.set(`screenId`,D.value),e.searchParams.set(`accessToken`,O.value),e.toString()}),Ie=f(()=>F.value.map(e=>({label:`${de(e.startAt).split(`,`)[0]||`дата не указана`} — ${e.name||`Игра ${e.ID}`}`,value:e.ID}))),Q=f(()=>k.value?.mode||`SCREEN_MODE_COVER`),Le=f(()=>k.value?.timerState===`SCREEN_TIMER_STATE_RUNNING`?Math.max(0,U.value-(H.value-W.value)/1e3):U.value),Re=f(()=>{let e=Math.floor(Le.value/60),t=Math.floor(Le.value%60);return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}),ze=f(()=>S(k.value?.introAudio)),Be=f(()=>S(k.value?.conclusionVideo)),Ve=f(()=>S((k.value?.music?.playlist?.tracks||[])[k.value?.music?.trackIndex||0]?.filename)),He=f(()=>[k.value?.music?.playlist?.ID,k.value?.music?.trackIndex,k.value?.music?.playback]),Ue=f(()=>{let e=k.value?.backgroundImage||k.value?.coverImage;return e?{backgroundImage:`linear-gradient(rgb(0 0 0 / 55%), rgb(0 0 0 / 55%)), url("${e}")`}:{}});function We(){sessionStorage.setItem(C,JSON.stringify({screenID:D.value,accessToken:O.value}))}function Ge(e){let t=Math.max(0,Number(e?.timerRemainingSeconds||0));if(e?.timerState===`SCREEN_TIMER_STATE_RUNNING`&&G.value===e.timerState){let e=Math.max(0,U.value-(Date.now()-W.value)/1e3);if(Math.abs(t-e)<=.5)return}U.value=t,W.value=Date.now(),G.value=e?.timerState}function Ke(){try{let e=JSON.parse(sessionStorage.getItem(C)||`{}`);D.value=e.screenId||``,O.value=e.accessToken||``}catch{sessionStorage.removeItem(C)}}async function qe(){let e=await b.CreateScreenSession({});if(!e.screenID||!e.accessToken)throw Error(`Не удалось создать сессию экрана`);D.value=e.screenID,O.value=e.accessToken,We()}async function $(e=!0){if(!(!D.value||!O.value))try{let e=await b.GetScreenState({screenID:D.value,accessToken:O.value});k.value=e.state,Ge(k.value),k.value?.gameID&&k.value.mode===`SCREEN_MODE_RESULTS`&&await Je()}catch(t){if(e&&t instanceof Error&&t.message===`unauthorized`){sessionStorage.removeItem(C),D.value=``,O.value=``,await qe(),await $(!1);return}T.error(t instanceof Error?t.message:`Не удалось получить состояние экрана`)}}async function Je(){if(!D.value||!O.value)return;let e=await b.GetScreenResults({screenID:D.value,accessToken:O.value});if(j.value=e.questions||[],A.value=e.teams||[],!P){P=!0,await s();let e=M.value;e&&(e.scrollTop=e.scrollHeight,N=window.setInterval(()=>{e.scrollTop=Math.max(0,e.scrollTop-32),e.scrollTop===0&&N!=null&&(window.clearInterval(N),N=void 0)},1e3))}}async function Ye(){try{let e=await w.GetGames({});F.value=e.games||[]}catch(e){T.error(e instanceof Error?e.message:`Не удалось загрузить игры`)}}le(()=>{K.value&&$()},1e3),g(k,async e=>{if(!e||!e.command||e.stateVersion===Pe)return;Pe=e.stateVersion||0,await s();let t=Q.value===`SCREEN_MODE_CONCLUSION`?Y.value:q.value;t&&(t.currentTime=(e.positionMs||0)/1e3,t.volume=Math.max(0,Math.min(1,(e.volume??100)/100)),e.command!==`SCREEN_COMMAND_SEEK`&&e.command!==`SCREEN_COMMAND_VOLUME`&&(e.command===`SCREEN_COMMAND_PLAY`||e.command===`SCREEN_COMMAND_RESUME`||e.command===`SCREEN_COMMAND_REPLAY`?(e.command===`SCREEN_COMMAND_REPLAY`&&(t.currentTime=0),t.play().catch(()=>{R.value=`Браузер заблокировал воспроизведение. Нажмите «Подготовить экран» на этом устройстве.`})):(e.command===`SCREEN_COMMAND_PAUSE`||e.command===`SCREEN_COMMAND_STOP`)&&t.pause()))});function Xe(e){return e.readyState>=HTMLMediaElement.HAVE_METADATA?Promise.resolve():new Promise(t=>{let n=()=>{e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`error`,n),t()};e.addEventListener(`loadedmetadata`,n,{once:!0}),e.addEventListener(`error`,n,{once:!0})})}g(He,async(e,t)=>{let n=k.value?.music;if(!n||!n.playlist?.tracks?.length)return;await s();let r=J.value;if(!r)return;let i=!t||e[0]!==t[0]||e[1]!==t[1],a=!t||e[2]!==t[2];!i&&!a||(await Xe(r),r.currentTime=i?0:(n.positionMs||0)/1e3,n.playback===`MUSIC_PLAYBACK_PLAYING`?r.play().catch(()=>{R.value=`Браузер заблокировал воспроизведение музыки. Нажмите «Подготовить экран».`}):r.pause())},{immediate:!0}),g(()=>[k.value?.music?.volume,k.value?.soundEnabled],([e,t])=>{let n=J.value;n&&(n.volume=Math.max(0,Math.min(1,(e??100)/100)),n.muted=!t)},{immediate:!0});async function Ze(){if(!(!D.value||!O.value))try{await b.AdvanceScreenMusic({screenID:D.value,accessToken:O.value})}catch{R.value=`Не удалось синхронизировать музыку. Повторная попытка выполняется автоматически.`}}async function Qe(){if(!(!I.value||!E.query.screenID||!E.query.accessToken)){B.value=!0;try{await w.BindScreen({screenID:String(E.query.screenID),accessToken:String(E.query.accessToken),gameID:I.value}),V.value=!0}catch(e){T.error(e instanceof Error?e.message:`Не удалось привязать экран`)}finally{B.value=!1}}}async function $e(){try{await document.documentElement.requestFullscreen?.()}catch{T.warning(`Полноэкранный режим недоступен в этом браузере`)}L.value=!0,await s();for(let e of[q.value,Y.value,J.value])if(e){e.muted=!0;try{await e.play(),e.pause(),e.currentTime=0,e.muted=!k.value?.soundEnabled}catch{R.value=`Браузер не разрешил подготовить воспроизведение на этом устройстве.`}}}return l(async()=>{if(Z.value){await Ye(),z.value=!1;return}Ke();try{(!D.value||!O.value)&&await qe(),await $(),K.value=!0,X=window.setInterval(()=>{H.value=Date.now()},250)}catch(e){T.error(e instanceof Error?e.message:`Не удалось подготовить экран`)}finally{z.value=!1}}),ee(()=>{X!=null&&window.clearInterval(X),N!=null&&window.clearInterval(N)}),(s,l)=>(r(),_(m,null,[Z.value?(r(),_(`div`,pe,[a(d(ie),{class:`binding-card`,title:`Привязка экрана`},{default:h(()=>[V.value?(r(),_(m,{key:0},[l[1]||=v(`p`,null,`Экран привязан к игре.`,-1),l[2]||=v(`p`,null,`Можно закрыть эту страницу.`,-1)],64)):(r(),_(m,{key:1},[l[4]||=v(`p`,null,`Выберите игру, к которой привязать экран.`,-1),a(d(oe),{value:I.value,"onUpdate:value":l[0]||=e=>I.value=e,options:Ie.value,placeholder:`Игра`},null,8,[`value`,`options`]),a(d(y),{type:`primary`,loading:B.value,disabled:I.value==null,onClick:Qe},{default:h(()=>[...l[3]||=[t(` Привязать `,-1)]]),_:1},8,[`loading`,`disabled`])],64))]),_:1})])):(r(),_(`div`,me,[z.value?(r(),_(`div`,he,`Подготовка экрана…`)):(r(),_(m,{key:1},[k.value?.gameID?(r(),_(`div`,{key:1,class:`screen-content`,style:i(Ue.value)},[R.value?(r(),_(`p`,ve,o(R.value),1)):e(``,!0),k.value.introAudio?u((r(),_(`div`,ye,[v(`audio`,{ref_key:`introAudioElement`,ref:q,src:ze.value,muted:!k.value.soundEnabled,controls:``},null,8,be)],512)),[[x,Q.value===`SCREEN_MODE_INTRO`]]):e(``,!0),k.value.music?.playlist?.tracks?.length?(r(),_(`audio`,{key:2,ref_key:`musicAudioElement`,ref:J,src:Ve.value,muted:!k.value.soundEnabled,onEnded:Ze},null,40,xe)):e(``,!0),k.value.conclusionVideo?u((r(),_(`div`,Se,[v(`video`,{ref_key:`conclusionVideoElement`,ref:Y,src:Be.value,muted:!k.value.soundEnabled,playsinline:``},null,8,Ce)],512)),[[x,Q.value===`SCREEN_MODE_CONCLUSION`]]):e(``,!0),Q.value===`SCREEN_MODE_CONCLUSION`&&!k.value.conclusionVideo?(r(),_(`div`,we,`Видео закрывашки не задано`)):e(``,!0),Q.value===`SCREEN_MODE_INTRO_DONE`?(r(),_(`div`,Te,`Успехов`)):e(``,!0),Q.value===`SCREEN_MODE_CONCLUSION_DONE`?(r(),_(`div`,Ee,`Спасибо за игру!`)):e(``,!0),Q.value===`SCREEN_MODE_TEXT`?(r(),_(`div`,De,o(k.value.text),1)):e(``,!0),Q.value===`SCREEN_MODE_TIMER`?(r(),_(`div`,Oe,[v(`h1`,ke,o(k.value.timerLabel||`Перерыв`),1),v(`div`,Ae,o(Re.value),1)])):e(``,!0),Q.value===`SCREEN_MODE_RESULTS`?(r(),_(`div`,{key:9,ref_key:`resultsContainer`,ref:M,class:`results-screen`},[l[11]||=v(`h1`,null,`Результаты`,-1),v(`table`,null,[v(`thead`,null,[v(`tr`,null,[l[7]||=v(`th`,null,`Место`,-1),l[8]||=v(`th`,null,`Команда`,-1),(r(!0),_(m,null,n(j.value,e=>(r(),_(`th`,{key:e.code},o(e.code),1))),128)),l[9]||=v(`th`,null,`Сумма`,-1),l[10]||=v(`th`,null,`Ходы`,-1)])]),v(`tbody`,null,[(r(!0),_(m,null,n(A.value,e=>(r(),_(`tr`,{key:e.team?.ID},[v(`td`,null,o(e.place),1),v(`td`,null,o(e.team?.name),1),(r(!0),_(m,null,n(j.value,t=>(r(),_(`td`,{key:t.code},o(e.answers?.find(e=>e.questionCode===t.code)?.score??0),1))),128)),v(`td`,null,o(e.totalScore),1),v(`td`,null,o(e.actionsCount),1)]))),128))])])],512)):e(``,!0),Q.value===`SCREEN_MODE_COVER`?(r(),_(`div`,je,[k.value.coverImage?(r(),_(`img`,{key:0,src:k.value.coverImage,class:`cover-image`,alt:`Обложка дела`},null,8,Me)):e(``,!0),L.value?e(``,!0):(r(),_(`div`,Ne,[a(d(y),{type:`primary`,onClick:$e},{default:h(()=>[...l[12]||=[t(`Подготовить экран`,-1)]]),_:1})]))])):e(``,!0)],4)):(r(),_(`div`,ge,[a(d(ie),{class:`qr-card`,title:`Подключение экрана`},{default:h(()=>[Fe.value?(r(),_(`div`,_e,[a(d(se),{value:Fe.value,size:260,padding:0},null,8,[`value`])])):e(``,!0),l[6]||=v(`p`,null,`Отсканируйте QR телефоном организатора и выберите игру.`,-1),L.value?e(``,!0):(r(),c(d(y),{key:1,type:`primary`,onClick:$e},{default:h(()=>[...l[5]||=[t(`Подготовить экран`,-1)]]),_:1}))]),_:1})]))],64))])),Z.value?(r(),c(ue,{key:2,active:`games`})):e(``,!0)],64))}}),[[`__scopeId`,`data-v-ef294ec2`]]),T=te({__name:`ScreenView`,setup(e){return(e,t)=>(r(),c(w))}});export{T as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ln as i,Ot as a,Rn as o,Rt as s,St as c,Ut as l,Wt as ee,an as u,bn as d,bt as f,hn as p,ht as m,in as h,kt as te,l as ne,nn as g,t as re,wt as _,xt as v}from"./client-Bz0sY7Lm.js";import{t as ie}from"./Card-BGJkYb2B.js";import{n as ae}from"./es-Qklex053.js";import{t as y}from"./Button-MBUKfT_Z.js";import{t as oe}from"./Select-CfXdJUVK.js";import{t as b}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as se}from"./QrCode-MTPi5t58.js";import{ct as x,i as ce,r as le}from"./index-NE0dsiiJ.js";import{t as ue}from"./HeaderMenu-vnmT21Il.js";import{r as S}from"./application-Bg005825.js";import{t as de}from"./datetime-BJNH0M1T.js";import{t as fe}from"./useDeviceContext-mGSTXKkG.js";var pe={key:0,class:`screen-center`},me={key:1,class:`screen-page`},he={key:0,class:`screen-center`},ge={key:0,class:`screen-center`},_e={key:0,class:`screen-qr`},ve={key:0,class:`media-error`},ye={key:1,class:`screen-media`},be=[`src`,`muted`],xe=[`src`,`muted`],Se={key:3,class:`conclusion-screen`},Ce=[`src`,`muted`],we={key:4,class:`screen-message`},Te={key:5,class:`screen-message`},Ee={key:6,class:`screen-message`},De={key:7,class:`screen-message`},Oe={key:8,class:`timer-screen`},ke={class:`timer-label`},Ae={class:`timer-value`},je={key:10,class:`screen-cover`},Me=[`src`],Ne={key:1,class:`cover-controls`},C=`evening-detective-screen-session`,w=b(te({__name:`ScreenPage`,setup(te){let b=re(),w=ce(),T=ae(),E=ne(),D=p(``),O=p(``),k=p(),A=p([]),j=p([]),M=p(),N,P=!1,F=p([]),I=p(null),L=p(!1),R=p(``),z=p(!0),B=p(!1),V=p(!1),H=p(Date.now()),U=p(0),W=p(Date.now()),G=p(),K=p(!1),q=p(),J=p(),Y=p(),Pe=0,X=null,Z=f(()=>!!(E.query.screenID&&E.query.accessToken));fe(()=>D.value&&O.value&&!Z.value?{screenID:D.value,accessToken:O.value}:{});let Fe=f(()=>{if(!D.value||!O.value)return``;let e=new URL(`/screen`,window.location.origin);return e.searchParams.set(`screenId`,D.value),e.searchParams.set(`accessToken`,O.value),e.toString()}),Ie=f(()=>F.value.map(e=>({label:`${de(e.startAt).split(`,`)[0]||`дата не указана`} — ${e.name||`Игра ${e.ID}`}`,value:e.ID}))),Q=f(()=>k.value?.mode||`SCREEN_MODE_COVER`),Le=f(()=>k.value?.timerState===`SCREEN_TIMER_STATE_RUNNING`?Math.max(0,U.value-(H.value-W.value)/1e3):U.value),Re=f(()=>{let e=Math.floor(Le.value/60),t=Math.floor(Le.value%60);return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}),ze=f(()=>S(k.value?.introAudio)),Be=f(()=>S(k.value?.conclusionVideo)),Ve=f(()=>S((k.value?.music?.playlist?.tracks||[])[k.value?.music?.trackIndex||0]?.filename)),He=f(()=>[k.value?.music?.playlist?.ID,k.value?.music?.trackIndex,k.value?.music?.playback]),Ue=f(()=>{let e=k.value?.backgroundImage||k.value?.coverImage;return e?{backgroundImage:`linear-gradient(rgb(0 0 0 / 55%), rgb(0 0 0 / 55%)), url("${e}")`}:{}});function We(){sessionStorage.setItem(C,JSON.stringify({screenID:D.value,accessToken:O.value}))}function Ge(e){let t=Math.max(0,Number(e?.timerRemainingSeconds||0));if(e?.timerState===`SCREEN_TIMER_STATE_RUNNING`&&G.value===e.timerState){let e=Math.max(0,U.value-(Date.now()-W.value)/1e3);if(Math.abs(t-e)<=.5)return}U.value=t,W.value=Date.now(),G.value=e?.timerState}function Ke(){try{let e=JSON.parse(sessionStorage.getItem(C)||`{}`);D.value=e.screenId||``,O.value=e.accessToken||``}catch{sessionStorage.removeItem(C)}}async function qe(){let e=await b.CreateScreenSession({});if(!e.screenID||!e.accessToken)throw Error(`Не удалось создать сессию экрана`);D.value=e.screenID,O.value=e.accessToken,We()}async function $(e=!0){if(!(!D.value||!O.value))try{let e=await b.GetScreenState({screenID:D.value,accessToken:O.value});k.value=e.state,Ge(k.value),k.value?.gameID&&k.value.mode===`SCREEN_MODE_RESULTS`&&await Je()}catch(t){if(e&&t instanceof Error&&t.message===`unauthorized`){sessionStorage.removeItem(C),D.value=``,O.value=``,await qe(),await $(!1);return}T.error(t instanceof Error?t.message:`Не удалось получить состояние экрана`)}}async function Je(){if(!D.value||!O.value)return;let e=await b.GetScreenResults({screenID:D.value,accessToken:O.value});if(j.value=e.questions||[],A.value=e.teams||[],!P){P=!0,await s();let e=M.value;e&&(e.scrollTop=e.scrollHeight,N=window.setInterval(()=>{e.scrollTop=Math.max(0,e.scrollTop-32),e.scrollTop===0&&N!=null&&(window.clearInterval(N),N=void 0)},1e3))}}async function Ye(){try{let e=await w.GetGames({});F.value=e.games||[]}catch(e){T.error(e instanceof Error?e.message:`Не удалось загрузить игры`)}}le(()=>{K.value&&$()},1e3),g(k,async e=>{if(!e||!e.command||e.stateVersion===Pe)return;Pe=e.stateVersion||0,await s();let t=Q.value===`SCREEN_MODE_CONCLUSION`?Y.value:q.value;t&&(t.currentTime=(e.positionMs||0)/1e3,t.volume=Math.max(0,Math.min(1,(e.volume??100)/100)),e.command!==`SCREEN_COMMAND_SEEK`&&e.command!==`SCREEN_COMMAND_VOLUME`&&(e.command===`SCREEN_COMMAND_PLAY`||e.command===`SCREEN_COMMAND_RESUME`||e.command===`SCREEN_COMMAND_REPLAY`?(e.command===`SCREEN_COMMAND_REPLAY`&&(t.currentTime=0),t.play().catch(()=>{R.value=`Браузер заблокировал воспроизведение. Нажмите «Подготовить экран» на этом устройстве.`})):(e.command===`SCREEN_COMMAND_PAUSE`||e.command===`SCREEN_COMMAND_STOP`)&&t.pause()))});function Xe(e){return e.readyState>=HTMLMediaElement.HAVE_METADATA?Promise.resolve():new Promise(t=>{let n=()=>{e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`error`,n),t()};e.addEventListener(`loadedmetadata`,n,{once:!0}),e.addEventListener(`error`,n,{once:!0})})}g(He,async(e,t)=>{let n=k.value?.music;if(!n||!n.playlist?.tracks?.length)return;await s();let r=J.value;if(!r)return;let i=!t||e[0]!==t[0]||e[1]!==t[1],a=!t||e[2]!==t[2];!i&&!a||(await Xe(r),r.currentTime=i?0:(n.positionMs||0)/1e3,n.playback===`MUSIC_PLAYBACK_PLAYING`?r.play().catch(()=>{R.value=`Браузер заблокировал воспроизведение музыки. Нажмите «Подготовить экран».`}):r.pause())},{immediate:!0}),g(()=>[k.value?.music?.volume,k.value?.soundEnabled],([e,t])=>{let n=J.value;n&&(n.volume=Math.max(0,Math.min(1,(e??100)/100)),n.muted=!t)},{immediate:!0});async function Ze(){if(!(!D.value||!O.value))try{await b.AdvanceScreenMusic({screenID:D.value,accessToken:O.value})}catch{R.value=`Не удалось синхронизировать музыку. Повторная попытка выполняется автоматически.`}}async function Qe(){if(!(!I.value||!E.query.screenID||!E.query.accessToken)){B.value=!0;try{await w.BindScreen({screenID:String(E.query.screenID),accessToken:String(E.query.accessToken),gameID:I.value}),V.value=!0}catch(e){T.error(e instanceof Error?e.message:`Не удалось привязать экран`)}finally{B.value=!1}}}async function $e(){try{await document.documentElement.requestFullscreen?.()}catch{T.warning(`Полноэкранный режим недоступен в этом браузере`)}L.value=!0,await s();for(let e of[q.value,Y.value,J.value])if(e){e.muted=!0;try{await e.play(),e.pause(),e.currentTime=0,e.muted=!k.value?.soundEnabled}catch{R.value=`Браузер не разрешил подготовить воспроизведение на этом устройстве.`}}}return l(async()=>{if(Z.value){await Ye(),z.value=!1;return}Ke();try{(!D.value||!O.value)&&await qe(),await $(),K.value=!0,X=window.setInterval(()=>{H.value=Date.now()},250)}catch(e){T.error(e instanceof Error?e.message:`Не удалось подготовить экран`)}finally{z.value=!1}}),ee(()=>{X!=null&&window.clearInterval(X),N!=null&&window.clearInterval(N)}),(s,l)=>(r(),_(m,null,[Z.value?(r(),_(`div`,pe,[a(d(ie),{class:`binding-card`,title:`Привязка экрана`},{default:h(()=>[V.value?(r(),_(m,{key:0},[l[1]||=v(`p`,null,`Экран привязан к игре.`,-1),l[2]||=v(`p`,null,`Можно закрыть эту страницу.`,-1)],64)):(r(),_(m,{key:1},[l[4]||=v(`p`,null,`Выберите игру, к которой привязать экран.`,-1),a(d(oe),{value:I.value,"onUpdate:value":l[0]||=e=>I.value=e,options:Ie.value,placeholder:`Игра`},null,8,[`value`,`options`]),a(d(y),{type:`primary`,loading:B.value,disabled:I.value==null,onClick:Qe},{default:h(()=>[...l[3]||=[t(` Привязать `,-1)]]),_:1},8,[`loading`,`disabled`])],64))]),_:1})])):(r(),_(`div`,me,[z.value?(r(),_(`div`,he,`Подготовка экрана…`)):(r(),_(m,{key:1},[k.value?.gameID?(r(),_(`div`,{key:1,class:`screen-content`,style:i(Ue.value)},[R.value?(r(),_(`p`,ve,o(R.value),1)):e(``,!0),k.value.introAudio?u((r(),_(`div`,ye,[v(`audio`,{ref_key:`introAudioElement`,ref:q,src:ze.value,muted:!k.value.soundEnabled,controls:``},null,8,be)],512)),[[x,Q.value===`SCREEN_MODE_INTRO`]]):e(``,!0),k.value.music?.playlist?.tracks?.length?(r(),_(`audio`,{key:2,ref_key:`musicAudioElement`,ref:J,src:Ve.value,muted:!k.value.soundEnabled,onEnded:Ze},null,40,xe)):e(``,!0),k.value.conclusionVideo?u((r(),_(`div`,Se,[v(`video`,{ref_key:`conclusionVideoElement`,ref:Y,src:Be.value,muted:!k.value.soundEnabled,playsinline:``},null,8,Ce)],512)),[[x,Q.value===`SCREEN_MODE_CONCLUSION`]]):e(``,!0),Q.value===`SCREEN_MODE_CONCLUSION`&&!k.value.conclusionVideo?(r(),_(`div`,we,`Видео закрывашки не задано`)):e(``,!0),Q.value===`SCREEN_MODE_INTRO_DONE`?(r(),_(`div`,Te,`Успехов`)):e(``,!0),Q.value===`SCREEN_MODE_CONCLUSION_DONE`?(r(),_(`div`,Ee,`Спасибо за игру!`)):e(``,!0),Q.value===`SCREEN_MODE_TEXT`?(r(),_(`div`,De,o(k.value.text),1)):e(``,!0),Q.value===`SCREEN_MODE_TIMER`?(r(),_(`div`,Oe,[v(`h1`,ke,o(k.value.timerLabel||`Перерыв`),1),v(`div`,Ae,o(Re.value),1)])):e(``,!0),Q.value===`SCREEN_MODE_RESULTS`?(r(),_(`div`,{key:9,ref_key:`resultsContainer`,ref:M,class:`results-screen`},[l[11]||=v(`h1`,null,`Результаты`,-1),v(`table`,null,[v(`thead`,null,[v(`tr`,null,[l[7]||=v(`th`,null,`Место`,-1),l[8]||=v(`th`,null,`Команда`,-1),(r(!0),_(m,null,n(j.value,e=>(r(),_(`th`,{key:e.code},o(e.code),1))),128)),l[9]||=v(`th`,null,`Сумма`,-1),l[10]||=v(`th`,null,`Ходы`,-1)])]),v(`tbody`,null,[(r(!0),_(m,null,n(A.value,e=>(r(),_(`tr`,{key:e.team?.ID},[v(`td`,null,o(e.place),1),v(`td`,null,o(e.team?.name),1),(r(!0),_(m,null,n(j.value,t=>(r(),_(`td`,{key:t.code},o(e.answers?.find(e=>e.questionCode===t.code)?.score??0),1))),128)),v(`td`,null,o(e.totalScore),1),v(`td`,null,o(e.actionsCount),1)]))),128))])])],512)):e(``,!0),Q.value===`SCREEN_MODE_COVER`?(r(),_(`div`,je,[k.value.coverImage?(r(),_(`img`,{key:0,src:k.value.coverImage,class:`cover-image`,alt:`Обложка дела`},null,8,Me)):e(``,!0),L.value?e(``,!0):(r(),_(`div`,Ne,[a(d(y),{type:`primary`,onClick:$e},{default:h(()=>[...l[12]||=[t(`Подготовить экран`,-1)]]),_:1})]))])):e(``,!0)],4)):(r(),_(`div`,ge,[a(d(ie),{class:`qr-card`,title:`Подключение экрана`},{default:h(()=>[Fe.value?(r(),_(`div`,_e,[a(d(se),{value:Fe.value,size:260,padding:0},null,8,[`value`])])):e(``,!0),l[6]||=v(`p`,null,`Отсканируйте QR телефоном организатора и выберите игру.`,-1),L.value?e(``,!0):(r(),c(d(y),{key:1,type:`primary`,onClick:$e},{default:h(()=>[...l[5]||=[t(`Подготовить экран`,-1)]]),_:1}))]),_:1})]))],64))])),Z.value?(r(),c(ue,{key:2,active:`games`})):e(``,!0)],64))}}),[[`__scopeId`,`data-v-ef294ec2`]]),T=te({__name:`ScreenView`,setup(e){return(e,t)=>(r(),c(w))}});export{T as default}; \ No newline at end of file diff --git a/frontend/dist/assets/Select-DCgo5W2R.js b/frontend/dist/assets/Select-CfXdJUVK.js similarity index 66% rename from frontend/dist/assets/Select-DCgo5W2R.js rename to frontend/dist/assets/Select-CfXdJUVK.js index 7c8cbb1..38bcfa5 100644 --- a/frontend/dist/assets/Select-DCgo5W2R.js +++ b/frontend/dist/assets/Select-CfXdJUVK.js @@ -1,4 +1,4 @@ -import{H as e,J as t,Mt as n,Rt as r,U as i,Ut as a,Yt as o,an as s,at as c,bt as l,g as u,hn as d,ht as f,it as p,kt as m,nn as h,nt as g,ot as _,p as v,rn as y,st as b,tt as x,vn as S}from"./client-Bz0sY7Lm.js";import{a as C,i as w,n as T,o as E,r as D,t as O}from"./Follower-C1zQmxY2.js";import{a as k,d as A,i as j,l as ee,n as te,r as M,s as N,t as ne}from"./utils-Bog0tJH6.js";import{f as re,o as P}from"./Card-D1LVu21r.js";import{o as ie,r as F}from"./es-BhJOHfSF.js";import{i as ae,m as I,n as L,t as R}from"./Suffix-JLavbuLO.js";import{t as z}from"./use-merged-state-z45UzW9G.js";import{t as oe}from"./use-compitable-BIRdD7BE.js";import{t as B}from"./Popover-C-ZjsRrv.js";import{r as se}from"./keep-YWFBE5Rh.js";import{s as V}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as ce}from"./use-form-item-Bl3X3aXB.js";import{$ as H,C as U,Z as W,it as G,j as K,st as le}from"./index-6B3OmSLg.js";var q=`v-hidden`,ue=T(`[v-hidden]`,{display:`none!important`}),J=m({name:`Overflow`,props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:n}){let r=d(null),i=d(null);function o(t){let{value:a}=r,{getCounter:o,getTail:s}=e,c;if(c=o===void 0?i.value:o(),!a||!c)return;c.hasAttribute(q)&&c.removeAttribute(q);let{children:l}=a;if(t.showAllItemsBeforeCalculate)for(let e of l)e.hasAttribute(q)&&e.removeAttribute(q);let u=a.offsetWidth,d=[],f=n.tail?s?.():null,p=f?f.offsetWidth:0,m=!1,h=a.children.length-+!!n.tail;for(let t=0;tu){let{updateCounter:n}=e;for(let r=t;r>=0;--r){let i=h-1-r;n===void 0?c.textContent=`${i}`:n(i);let a=c.offsetWidth;if(p-=d[r],p+a<=u||r===0){m=!0,t=r-1,f&&(t===-1?(f.style.maxWidth=`${u-a}px`,f.style.boxSizing=`border-box`):f.style.maxWidth=``);let{onUpdateCount:n}=e;n&&n(i);break}}}}let{onUpdateOverflow:g}=e;m?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute(q,``))}let s=t();return ue.mount({id:`vueuc/overflow`,head:!0,anchorMetaName:D,ssr:s}),a(()=>o({showAllItemsBeforeCalculate:!1})),{selfRef:r,counterRef:i,sync:o}},render(){let{$slots:e}=this;return r(()=>this.sync({showAllItemsBeforeCalculate:!1})),n(`div`,{class:`v-overflow`,ref:`selfRef`},[o(e,`default`),e.counter?e.counter():n(`span`,{style:{display:`inline-block`},ref:`counterRef`}),e.tail?e.tail():null])}});function Y(e){switch(typeof e){case`string`:return e||void 0;case`number`:return String(e);default:return}}var de=x([g(`base-selection`,` +import{H as e,J as t,Mt as n,Rt as r,U as i,Ut as a,Yt as o,an as s,at as c,bt as l,g as u,hn as d,ht as f,it as p,kt as m,nn as h,nt as g,ot as _,p as v,rn as y,st as b,tt as x,vn as S}from"./client-Bz0sY7Lm.js";import{a as C,i as w,n as T,o as E,r as D,t as O}from"./Follower-BaR8jvSz.js";import{a as k,d as A,i as j,l as ee,n as te,r as M,s as N,t as ne}from"./utils-Dcx6g1AV.js";import{f as re,o as P}from"./Card-BGJkYb2B.js";import{o as ie,r as F}from"./es-Qklex053.js";import{i as ae,m as I,n as L,t as R}from"./Suffix-BBRLYxYK.js";import{t as z}from"./use-merged-state-z45UzW9G.js";import{t as oe}from"./use-compitable-BIRdD7BE.js";import{t as B}from"./Popover-CjBLQZ90.js";import{r as se}from"./keep-UirG4WK3.js";import{c as V}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as ce}from"./use-form-item-Bl3X3aXB.js";import{C as H,M as U,Q as W,at as G,ct as K,et as le}from"./index-NE0dsiiJ.js";var q=`v-hidden`,ue=T(`[v-hidden]`,{display:`none!important`}),J=m({name:`Overflow`,props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:n}){let r=d(null),i=d(null);function o(t){let{value:a}=r,{getCounter:o,getTail:s}=e,c;if(c=o===void 0?i.value:o(),!a||!c)return;c.hasAttribute(q)&&c.removeAttribute(q);let{children:l}=a;if(t.showAllItemsBeforeCalculate)for(let e of l)e.hasAttribute(q)&&e.removeAttribute(q);let u=a.offsetWidth,d=[],f=n.tail?s?.():null,p=f?f.offsetWidth:0,m=!1,h=a.children.length-+!!n.tail;for(let t=0;tu){let{updateCounter:n}=e;for(let r=t;r>=0;--r){let i=h-1-r;n===void 0?c.textContent=`${i}`:n(i);let a=c.offsetWidth;if(p-=d[r],p+a<=u||r===0){m=!0,t=r-1,f&&(t===-1?(f.style.maxWidth=`${u-a}px`,f.style.boxSizing=`border-box`):f.style.maxWidth=``);let{onUpdateCount:n}=e;n&&n(i);break}}}}let{onUpdateOverflow:g}=e;m?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute(q,``))}let s=t();return ue.mount({id:`vueuc/overflow`,head:!0,anchorMetaName:D,ssr:s}),a(()=>o({showAllItemsBeforeCalculate:!1})),{selfRef:r,counterRef:i,sync:o}},render(){let{$slots:e}=this;return r(()=>this.sync({showAllItemsBeforeCalculate:!1})),n(`div`,{class:`v-overflow`,ref:`selfRef`},[o(e,`default`),e.counter?e.counter():n(`span`,{style:{display:`inline-block`},ref:`counterRef`}),e.tail?e.tail():null])}});function Y(e){switch(typeof e){case`string`:return e||void 0;case`number`:return String(e);default:return}}var de=x([g(`base-selection`,` --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left); --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left); position: relative; @@ -198,7 +198,7 @@ import{H as e,J as t,Mt as n,Rt as r,U as i,Ut as a,Yt as o,an as s,at as c,bt a line-height: 1.25; text-overflow: ellipsis; overflow: hidden; - `)])])]),fe=m({name:`InternalSelection`,props:Object.assign(Object.assign({},v.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:``},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:`medium`},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(t){let{mergedClsPrefixRef:n,mergedRtlRef:o}=i(t),s=u(`InternalSelection`,o,n),c=d(null),f=d(null),p=d(null),m=d(null),g=d(null),_=d(null),x=d(null),C=d(null),w=d(null),T=d(null),E=d(!1),D=d(!1),O=d(!1),k=v(`InternalSelection`,`-internal-selection`,de,K,t,S(t,`clsPrefix`)),A=l(()=>t.clearable&&!t.disabled&&(O.value||t.active)),j=l(()=>t.selectedOption?t.renderTag?t.renderTag({option:t.selectedOption,handleClose:()=>{}}):t.renderLabel?t.renderLabel(t.selectedOption,!0):W(t.selectedOption[t.labelField],t.selectedOption,!0):t.placeholder),te=l(()=>{let e=t.selectedOption;if(e)return e[t.labelField]}),M=l(()=>t.multiple?!!(Array.isArray(t.selectedOptions)&&t.selectedOptions.length):t.selectedOption!==null);function N(){var e;let{value:n}=c;if(n){let{value:r}=f;r&&(r.style.width=`${n.offsetWidth}px`,t.maxTagCount!==`responsive`&&((e=w.value)==null||e.sync({showAllItemsBeforeCalculate:!1})))}}function ne(){let{value:e}=T;e&&(e.style.display=`none`)}function re(){let{value:e}=T;e&&(e.style.display=`inline-block`)}h(S(t,`active`),e=>{e||ne()}),h(S(t,`pattern`),()=>{t.multiple&&r(N)});function P(e){let{onFocus:n}=t;n&&n(e)}function F(e){let{onBlur:n}=t;n&&n(e)}function ae(e){let{onDeleteOption:n}=t;n&&n(e)}function I(e){let{onClear:n}=t;n&&n(e)}function L(e){let{onPatternInput:n}=t;n&&n(e)}function R(e){(!e.relatedTarget||!p.value?.contains(e.relatedTarget))&&P(e)}function z(e){p.value?.contains(e.relatedTarget)||F(e)}function oe(e){I(e)}function B(){O.value=!0}function se(){O.value=!1}function V(e){!t.active||!t.filterable||e.target!==f.value&&e.preventDefault()}function ce(e){ae(e)}let H=d(!1);function U(e){if(e.key===`Backspace`&&!H.value&&!t.pattern.length){let{selectedOptions:e}=t;e?.length&&ce(e[e.length-1])}}let G=null;function le(e){let{value:n}=c;n&&(n.textContent=e.target.value,N()),t.ignoreComposition&&H.value?G=e:L(e)}function q(){H.value=!0}function ue(){H.value=!1,t.ignoreComposition&&L(G),G=null}function J(e){var n;D.value=!0,(n=t.onPatternFocus)==null||n.call(t,e)}function Y(e){var n;D.value=!1,(n=t.onPatternBlur)==null||n.call(t,e)}function fe(){var e,n;if(t.filterable)D.value=!1,(e=_.value)==null||e.blur(),(n=f.value)==null||n.blur();else if(t.multiple){let{value:e}=m;e?.blur()}else{let{value:e}=g;e?.blur()}}function pe(){var e,n,r;t.filterable?(D.value=!1,(e=_.value)==null||e.focus()):t.multiple?(n=m.value)==null||n.focus():(r=g.value)==null||r.focus()}function me(){let{value:e}=f;e&&(re(),e.focus())}function he(){let{value:e}=f;e&&e.blur()}function ge(e){let{value:t}=x;t&&t.setTextContent(`+${e}`)}function _e(){let{value:e}=C;return e}function X(){return f.value}let Z=null;function Q(){Z!==null&&window.clearTimeout(Z)}function $(){t.active||(Q(),Z=window.setTimeout(()=>{M.value&&(E.value=!0)},100))}function ve(){Q()}function ye(e){e||(Q(),E.value=!1)}h(M,e=>{e||(E.value=!1)}),a(()=>{y(()=>{let e=_.value;e&&(t.disabled?e.removeAttribute(`tabindex`):e.tabIndex=D.value?-1:0)})}),ee(p,t.onResize);let{inlineThemeDisabled:be}=t,xe=l(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{fontWeight:r,borderRadius:i,color:a,placeholderColor:o,textColor:s,paddingSingle:c,paddingMultiple:l,caretColor:u,colorDisabled:d,textColorDisabled:f,placeholderColorDisabled:p,colorActive:m,boxShadowFocus:h,boxShadowActive:g,boxShadowHover:_,border:v,borderFocus:y,borderHover:x,borderActive:S,arrowColor:C,arrowColorDisabled:w,loadingColor:T,colorActiveWarning:E,boxShadowFocusWarning:D,boxShadowActiveWarning:O,boxShadowHoverWarning:A,borderWarning:j,borderFocusWarning:ee,borderHoverWarning:te,borderActiveWarning:M,colorActiveError:N,boxShadowFocusError:ne,boxShadowActiveError:re,boxShadowHoverError:P,borderError:F,borderFocusError:ae,borderHoverError:I,borderActiveError:L,clearColor:R,clearColorHover:z,clearColorPressed:oe,clearSize:B,arrowSize:se,[b(`height`,e)]:V,[b(`fontSize`,e)]:ce}}=k.value,H=ie(c),U=ie(l);return{"--n-bezier":n,"--n-border":v,"--n-border-active":S,"--n-border-focus":y,"--n-border-hover":x,"--n-border-radius":i,"--n-box-shadow-active":g,"--n-box-shadow-focus":h,"--n-box-shadow-hover":_,"--n-caret-color":u,"--n-color":a,"--n-color-active":m,"--n-color-disabled":d,"--n-font-size":ce,"--n-height":V,"--n-padding-single-top":H.top,"--n-padding-multiple-top":U.top,"--n-padding-single-right":H.right,"--n-padding-multiple-right":U.right,"--n-padding-single-left":H.left,"--n-padding-multiple-left":U.left,"--n-padding-single-bottom":H.bottom,"--n-padding-multiple-bottom":U.bottom,"--n-placeholder-color":o,"--n-placeholder-color-disabled":p,"--n-text-color":s,"--n-text-color-disabled":f,"--n-arrow-color":C,"--n-arrow-color-disabled":w,"--n-loading-color":T,"--n-color-active-warning":E,"--n-box-shadow-focus-warning":D,"--n-box-shadow-active-warning":O,"--n-box-shadow-hover-warning":A,"--n-border-warning":j,"--n-border-focus-warning":ee,"--n-border-hover-warning":te,"--n-border-active-warning":M,"--n-color-active-error":N,"--n-box-shadow-focus-error":ne,"--n-box-shadow-active-error":re,"--n-box-shadow-hover-error":P,"--n-border-error":F,"--n-border-focus-error":ae,"--n-border-hover-error":I,"--n-border-active-error":L,"--n-clear-size":B,"--n-clear-color":R,"--n-clear-color-hover":z,"--n-clear-color-pressed":oe,"--n-arrow-size":se,"--n-font-weight":r}}),Se=be?e(`internal-selection`,l(()=>t.size[0]),xe,t):void 0;return{mergedTheme:k,mergedClearable:A,mergedClsPrefix:n,rtlEnabled:s,patternInputFocused:D,filterablePlaceholder:j,label:te,selected:M,showTagsPanel:E,isComposing:H,counterRef:x,counterWrapperRef:C,patternInputMirrorRef:c,patternInputRef:f,selfRef:p,multipleElRef:m,singleElRef:g,patternInputWrapperRef:_,overflowRef:w,inputTagElRef:T,handleMouseDown:V,handleFocusin:R,handleClear:oe,handleMouseEnter:B,handleMouseLeave:se,handleDeleteOption:ce,handlePatternKeyDown:U,handlePatternInputInput:le,handlePatternInputBlur:Y,handlePatternInputFocus:J,handleMouseEnterCounter:$,handleMouseLeaveCounter:ve,handleFocusout:z,handleCompositionEnd:ue,handleCompositionStart:q,onPopoverUpdateShow:ye,focus:pe,focusInput:me,blur:fe,blurInput:he,updateCounter:ge,getCounter:_e,getTail:X,renderLabel:t.renderLabel,cssVars:be?void 0:xe,themeClass:Se?.themeClass,onRender:Se?.onRender}},render(){let{status:e,multiple:t,size:r,disabled:i,filterable:a,maxTagCount:o,bordered:s,clsPrefix:c,ellipsisTagPopoverProps:l,onRender:u,renderTag:d,renderLabel:p}=this;u?.();let m=o===`responsive`,h=typeof o==`number`,g=m||h,_=n(P,null,{default:()=>n(R,{clsPrefix:c,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e;return(e=this.$slots).arrow?.call(e)}})}),v;if(t){let{labelField:e}=this,t=t=>n(`div`,{class:`${c}-base-selection-tag-wrapper`,key:t.value},d?d({option:t,handleClose:()=>{this.handleDeleteOption(t)}}):n(F,{size:r,closable:!t.disabled,disabled:i,onClose:()=>{this.handleDeleteOption(t)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>p?p(t,!0):W(t[e],t,!0)})),s=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(t),u=a?n(`div`,{class:`${c}-base-selection-input-tag`,ref:`inputTagElRef`,key:`__input-tag__`},n(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,tabindex:-1,disabled:i,value:this.pattern,autofocus:this.autofocus,class:`${c}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),n(`span`,{ref:`patternInputMirrorRef`,class:`${c}-base-selection-input-tag__mirror`},this.pattern)):null,y=m?()=>n(`div`,{class:`${c}-base-selection-tag-wrapper`,ref:`counterWrapperRef`},n(F,{size:r,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:i})):void 0,b;if(h){let e=this.selectedOptions.length-o;e>0&&(b=n(`div`,{class:`${c}-base-selection-tag-wrapper`,key:`__counter__`},n(F,{size:r,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,disabled:i},{default:()=>`+${e}`})))}let x=m?a?n(J,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:s,counter:y,tail:()=>u}):n(J,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:s,counter:y}):h&&b?s().concat(b):s(),S=g?()=>n(`div`,{class:`${c}-base-selection-popover`},m?s():this.selectedOptions.map(t)):void 0,C=g?Object.assign({show:this.showTagsPanel,trigger:`hover`,overlap:!0,placement:`top`,width:`trigger`,onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,w=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`},n(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):null,T=a?n(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-tags`},x,m?null:u,_):n(`div`,{ref:`multipleElRef`,class:`${c}-base-selection-tags`,tabindex:i?void 0:0},x,_);v=n(f,null,g?n(B,Object.assign({},C,{scrollable:!0,style:`max-height: calc(var(--v-target-height) * 6.6);`}),{trigger:()=>T,default:S}):T,w)}else if(a){let e=this.pattern||this.isComposing,t=this.active?!e:!this.selected,r=this.active?!1:this.selected;v=n(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-label`,title:this.patternInputFocused?void 0:Y(this.label)},n(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,class:`${c}-base-selection-input`,value:this.active?this.pattern:``,placeholder:``,readonly:i,disabled:i,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r?n(`div`,{class:`${c}-base-selection-label__render-label ${c}-base-selection-overlay`,key:`input`},n(`div`,{class:`${c}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):p?p(this.selectedOption,!0):W(this.label,this.selectedOption,!0))):null,t?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},n(`div`,{class:`${c}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,_)}else v=n(`div`,{ref:`singleElRef`,class:`${c}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label===void 0?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},n(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):n(`div`,{class:`${c}-base-selection-input`,title:Y(this.label),key:`input`},n(`div`,{class:`${c}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):p?p(this.selectedOption,!0):W(this.label,this.selectedOption,!0))),_);return n(`div`,{ref:`selfRef`,class:[`${c}-base-selection`,this.rtlEnabled&&`${c}-base-selection--rtl`,this.themeClass,e&&`${c}-base-selection--${e}-status`,{[`${c}-base-selection--active`]:this.active,[`${c}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${c}-base-selection--disabled`]:this.disabled,[`${c}-base-selection--multiple`]:this.multiple,[`${c}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},v,s?n(`div`,{class:`${c}-base-selection__border`}):null,s?n(`div`,{class:`${c}-base-selection__state-border`}):null)}}),pe=x([g(`select`,` + `)])])]),fe=m({name:`InternalSelection`,props:Object.assign(Object.assign({},v.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:``},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:`medium`},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(t){let{mergedClsPrefixRef:n,mergedRtlRef:o}=i(t),s=u(`InternalSelection`,o,n),c=d(null),f=d(null),p=d(null),m=d(null),g=d(null),_=d(null),x=d(null),C=d(null),w=d(null),T=d(null),E=d(!1),D=d(!1),O=d(!1),k=v(`InternalSelection`,`-internal-selection`,de,U,t,S(t,`clsPrefix`)),A=l(()=>t.clearable&&!t.disabled&&(O.value||t.active)),j=l(()=>t.selectedOption?t.renderTag?t.renderTag({option:t.selectedOption,handleClose:()=>{}}):t.renderLabel?t.renderLabel(t.selectedOption,!0):W(t.selectedOption[t.labelField],t.selectedOption,!0):t.placeholder),te=l(()=>{let e=t.selectedOption;if(e)return e[t.labelField]}),M=l(()=>t.multiple?!!(Array.isArray(t.selectedOptions)&&t.selectedOptions.length):t.selectedOption!==null);function N(){var e;let{value:n}=c;if(n){let{value:r}=f;r&&(r.style.width=`${n.offsetWidth}px`,t.maxTagCount!==`responsive`&&((e=w.value)==null||e.sync({showAllItemsBeforeCalculate:!1})))}}function ne(){let{value:e}=T;e&&(e.style.display=`none`)}function re(){let{value:e}=T;e&&(e.style.display=`inline-block`)}h(S(t,`active`),e=>{e||ne()}),h(S(t,`pattern`),()=>{t.multiple&&r(N)});function P(e){let{onFocus:n}=t;n&&n(e)}function F(e){let{onBlur:n}=t;n&&n(e)}function ae(e){let{onDeleteOption:n}=t;n&&n(e)}function I(e){let{onClear:n}=t;n&&n(e)}function L(e){let{onPatternInput:n}=t;n&&n(e)}function R(e){(!e.relatedTarget||!p.value?.contains(e.relatedTarget))&&P(e)}function z(e){p.value?.contains(e.relatedTarget)||F(e)}function oe(e){I(e)}function B(){O.value=!0}function se(){O.value=!1}function V(e){!t.active||!t.filterable||e.target!==f.value&&e.preventDefault()}function ce(e){ae(e)}let H=d(!1);function G(e){if(e.key===`Backspace`&&!H.value&&!t.pattern.length){let{selectedOptions:e}=t;e?.length&&ce(e[e.length-1])}}let K=null;function le(e){let{value:n}=c;n&&(n.textContent=e.target.value,N()),t.ignoreComposition&&H.value?K=e:L(e)}function q(){H.value=!0}function ue(){H.value=!1,t.ignoreComposition&&L(K),K=null}function J(e){var n;D.value=!0,(n=t.onPatternFocus)==null||n.call(t,e)}function Y(e){var n;D.value=!1,(n=t.onPatternBlur)==null||n.call(t,e)}function fe(){var e,n;if(t.filterable)D.value=!1,(e=_.value)==null||e.blur(),(n=f.value)==null||n.blur();else if(t.multiple){let{value:e}=m;e?.blur()}else{let{value:e}=g;e?.blur()}}function pe(){var e,n,r;t.filterable?(D.value=!1,(e=_.value)==null||e.focus()):t.multiple?(n=m.value)==null||n.focus():(r=g.value)==null||r.focus()}function me(){let{value:e}=f;e&&(re(),e.focus())}function he(){let{value:e}=f;e&&e.blur()}function ge(e){let{value:t}=x;t&&t.setTextContent(`+${e}`)}function _e(){let{value:e}=C;return e}function X(){return f.value}let Z=null;function Q(){Z!==null&&window.clearTimeout(Z)}function $(){t.active||(Q(),Z=window.setTimeout(()=>{M.value&&(E.value=!0)},100))}function ve(){Q()}function ye(e){e||(Q(),E.value=!1)}h(M,e=>{e||(E.value=!1)}),a(()=>{y(()=>{let e=_.value;e&&(t.disabled?e.removeAttribute(`tabindex`):e.tabIndex=D.value?-1:0)})}),ee(p,t.onResize);let{inlineThemeDisabled:be}=t,xe=l(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{fontWeight:r,borderRadius:i,color:a,placeholderColor:o,textColor:s,paddingSingle:c,paddingMultiple:l,caretColor:u,colorDisabled:d,textColorDisabled:f,placeholderColorDisabled:p,colorActive:m,boxShadowFocus:h,boxShadowActive:g,boxShadowHover:_,border:v,borderFocus:y,borderHover:x,borderActive:S,arrowColor:C,arrowColorDisabled:w,loadingColor:T,colorActiveWarning:E,boxShadowFocusWarning:D,boxShadowActiveWarning:O,boxShadowHoverWarning:A,borderWarning:j,borderFocusWarning:ee,borderHoverWarning:te,borderActiveWarning:M,colorActiveError:N,boxShadowFocusError:ne,boxShadowActiveError:re,boxShadowHoverError:P,borderError:F,borderFocusError:ae,borderHoverError:I,borderActiveError:L,clearColor:R,clearColorHover:z,clearColorPressed:oe,clearSize:B,arrowSize:se,[b(`height`,e)]:V,[b(`fontSize`,e)]:ce}}=k.value,H=ie(c),U=ie(l);return{"--n-bezier":n,"--n-border":v,"--n-border-active":S,"--n-border-focus":y,"--n-border-hover":x,"--n-border-radius":i,"--n-box-shadow-active":g,"--n-box-shadow-focus":h,"--n-box-shadow-hover":_,"--n-caret-color":u,"--n-color":a,"--n-color-active":m,"--n-color-disabled":d,"--n-font-size":ce,"--n-height":V,"--n-padding-single-top":H.top,"--n-padding-multiple-top":U.top,"--n-padding-single-right":H.right,"--n-padding-multiple-right":U.right,"--n-padding-single-left":H.left,"--n-padding-multiple-left":U.left,"--n-padding-single-bottom":H.bottom,"--n-padding-multiple-bottom":U.bottom,"--n-placeholder-color":o,"--n-placeholder-color-disabled":p,"--n-text-color":s,"--n-text-color-disabled":f,"--n-arrow-color":C,"--n-arrow-color-disabled":w,"--n-loading-color":T,"--n-color-active-warning":E,"--n-box-shadow-focus-warning":D,"--n-box-shadow-active-warning":O,"--n-box-shadow-hover-warning":A,"--n-border-warning":j,"--n-border-focus-warning":ee,"--n-border-hover-warning":te,"--n-border-active-warning":M,"--n-color-active-error":N,"--n-box-shadow-focus-error":ne,"--n-box-shadow-active-error":re,"--n-box-shadow-hover-error":P,"--n-border-error":F,"--n-border-focus-error":ae,"--n-border-hover-error":I,"--n-border-active-error":L,"--n-clear-size":B,"--n-clear-color":R,"--n-clear-color-hover":z,"--n-clear-color-pressed":oe,"--n-arrow-size":se,"--n-font-weight":r}}),Se=be?e(`internal-selection`,l(()=>t.size[0]),xe,t):void 0;return{mergedTheme:k,mergedClearable:A,mergedClsPrefix:n,rtlEnabled:s,patternInputFocused:D,filterablePlaceholder:j,label:te,selected:M,showTagsPanel:E,isComposing:H,counterRef:x,counterWrapperRef:C,patternInputMirrorRef:c,patternInputRef:f,selfRef:p,multipleElRef:m,singleElRef:g,patternInputWrapperRef:_,overflowRef:w,inputTagElRef:T,handleMouseDown:V,handleFocusin:R,handleClear:oe,handleMouseEnter:B,handleMouseLeave:se,handleDeleteOption:ce,handlePatternKeyDown:G,handlePatternInputInput:le,handlePatternInputBlur:Y,handlePatternInputFocus:J,handleMouseEnterCounter:$,handleMouseLeaveCounter:ve,handleFocusout:z,handleCompositionEnd:ue,handleCompositionStart:q,onPopoverUpdateShow:ye,focus:pe,focusInput:me,blur:fe,blurInput:he,updateCounter:ge,getCounter:_e,getTail:X,renderLabel:t.renderLabel,cssVars:be?void 0:xe,themeClass:Se?.themeClass,onRender:Se?.onRender}},render(){let{status:e,multiple:t,size:r,disabled:i,filterable:a,maxTagCount:o,bordered:s,clsPrefix:c,ellipsisTagPopoverProps:l,onRender:u,renderTag:d,renderLabel:p}=this;u?.();let m=o===`responsive`,h=typeof o==`number`,g=m||h,_=n(P,null,{default:()=>n(R,{clsPrefix:c,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e;return(e=this.$slots).arrow?.call(e)}})}),v;if(t){let{labelField:e}=this,t=t=>n(`div`,{class:`${c}-base-selection-tag-wrapper`,key:t.value},d?d({option:t,handleClose:()=>{this.handleDeleteOption(t)}}):n(F,{size:r,closable:!t.disabled,disabled:i,onClose:()=>{this.handleDeleteOption(t)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>p?p(t,!0):W(t[e],t,!0)})),s=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(t),u=a?n(`div`,{class:`${c}-base-selection-input-tag`,ref:`inputTagElRef`,key:`__input-tag__`},n(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,tabindex:-1,disabled:i,value:this.pattern,autofocus:this.autofocus,class:`${c}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),n(`span`,{ref:`patternInputMirrorRef`,class:`${c}-base-selection-input-tag__mirror`},this.pattern)):null,y=m?()=>n(`div`,{class:`${c}-base-selection-tag-wrapper`,ref:`counterWrapperRef`},n(F,{size:r,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:i})):void 0,b;if(h){let e=this.selectedOptions.length-o;e>0&&(b=n(`div`,{class:`${c}-base-selection-tag-wrapper`,key:`__counter__`},n(F,{size:r,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,disabled:i},{default:()=>`+${e}`})))}let x=m?a?n(J,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:s,counter:y,tail:()=>u}):n(J,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:s,counter:y}):h&&b?s().concat(b):s(),S=g?()=>n(`div`,{class:`${c}-base-selection-popover`},m?s():this.selectedOptions.map(t)):void 0,C=g?Object.assign({show:this.showTagsPanel,trigger:`hover`,overlap:!0,placement:`top`,width:`trigger`,onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,w=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`},n(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):null,T=a?n(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-tags`},x,m?null:u,_):n(`div`,{ref:`multipleElRef`,class:`${c}-base-selection-tags`,tabindex:i?void 0:0},x,_);v=n(f,null,g?n(B,Object.assign({},C,{scrollable:!0,style:`max-height: calc(var(--v-target-height) * 6.6);`}),{trigger:()=>T,default:S}):T,w)}else if(a){let e=this.pattern||this.isComposing,t=this.active?!e:!this.selected,r=this.active?!1:this.selected;v=n(`div`,{ref:`patternInputWrapperRef`,class:`${c}-base-selection-label`,title:this.patternInputFocused?void 0:Y(this.label)},n(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,class:`${c}-base-selection-input`,value:this.active?this.pattern:``,placeholder:``,readonly:i,disabled:i,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r?n(`div`,{class:`${c}-base-selection-label__render-label ${c}-base-selection-overlay`,key:`input`},n(`div`,{class:`${c}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):p?p(this.selectedOption,!0):W(this.label,this.selectedOption,!0))):null,t?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},n(`div`,{class:`${c}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,_)}else v=n(`div`,{ref:`singleElRef`,class:`${c}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label===void 0?n(`div`,{class:`${c}-base-selection-placeholder ${c}-base-selection-overlay`,key:`placeholder`},n(`div`,{class:`${c}-base-selection-placeholder__inner`},this.placeholder)):n(`div`,{class:`${c}-base-selection-input`,title:Y(this.label),key:`input`},n(`div`,{class:`${c}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):p?p(this.selectedOption,!0):W(this.label,this.selectedOption,!0))),_);return n(`div`,{ref:`selfRef`,class:[`${c}-base-selection`,this.rtlEnabled&&`${c}-base-selection--rtl`,this.themeClass,e&&`${c}-base-selection--${e}-status`,{[`${c}-base-selection--active`]:this.active,[`${c}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${c}-base-selection--disabled`]:this.disabled,[`${c}-base-selection--multiple`]:this.multiple,[`${c}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},v,s?n(`div`,{class:`${c}-base-selection__border`}):null,s?n(`div`,{class:`${c}-base-selection__state-border`}):null)}}),pe=x([g(`select`,` z-index: auto; outline: none; width: 100%; @@ -207,4 +207,4 @@ import{H as e,J as t,Mt as n,Rt as r,U as i,Ut as a,Yt as o,an as s,at as c,bt a `),g(`select-menu`,` margin: 4px 0; box-shadow: var(--n-menu-box-shadow); - `,[L({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]),me=m({name:`Select`,props:Object.assign(Object.assign({},v.props),{to:E.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearCreatedOptionsOnClear:{type:Boolean,default:!0},clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:`bottom-start`},widthMode:{type:String,default:`trigger`},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},childrenField:{type:String,default:`children`},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:`show`},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},scrollbarProps:Object,onChange:[Function,Array],items:Array}),slots:Object,setup(t){let{mergedClsPrefixRef:n,mergedBorderedRef:r,namespaceRef:a,inlineThemeDisabled:o,mergedComponentPropsRef:s}=i(t),c=v(`Select`,`-select`,pe,U,t,n),u=d(t.defaultValue),f=z(S(t,`value`),u),p=d(!1),m=d(``),g=oe(t,[`items`,`options`]),_=d([]),y=d([]),b=l(()=>y.value.concat(_.value).concat(g.value)),x=l(()=>{let{filter:e}=t;if(e)return e;let{labelField:n,valueField:r}=t;return(e,t)=>{if(!t)return!1;let i=t[n];if(typeof i==`string`)return j(e,i);let a=t[r];return typeof a==`string`?j(e,a):typeof a==`number`?j(e,String(a)):!1}}),C=l(()=>{if(t.remote)return g.value;{let{value:e}=b,{value:n}=m;return!n.length||!t.filterable?e:M(e,x.value,n,t.childrenField)}}),w=l(()=>{let{valueField:e,childrenField:n}=t,r=ne(e,n);return N(C.value,r)}),T=l(()=>te(b.value,t.valueField,t.childrenField)),D=d(!1),O=z(S(t,`show`),D),k=d(null),ee=d(null),P=d(null),{localeRef:ie}=ae(`Select`),F=l(()=>t.placeholder??ie.value.placeholder),I=[],L=d(new Map),R=l(()=>{let{fallbackOption:e}=t;if(e===void 0){let{labelField:e,valueField:n}=t;return t=>({[e]:String(t),[n]:t})}return e===!1?!1:t=>Object.assign(e(t),{value:t})});function B(e){let n=t.remote,{value:r}=L,{value:i}=T,{value:a}=R,o=[];return e.forEach(e=>{if(i.has(e))o.push(i.get(e));else if(n&&r.has(e))o.push(r.get(e));else if(a){let t=a(e);t&&o.push(t)}}),o}let W=l(()=>{if(t.multiple){let{value:e}=f;return Array.isArray(e)?B(e):[]}return null}),G=l(()=>{let{value:e}=f;return!t.multiple&&!Array.isArray(e)?e===null?null:B([e])[0]||null:null}),K=ce(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:s?.value?.Select?.size||`medium`}}),{mergedSizeRef:le,mergedDisabledRef:q,mergedStatusRef:ue}=K;function J(e,n){let{onChange:r,"onUpdate:value":i,onUpdateValue:a}=t,{nTriggerFormChange:o,nTriggerFormInput:s}=K;r&&V(r,e,n),a&&V(a,e,n),i&&V(i,e,n),u.value=e,o(),s()}function Y(e){let{onBlur:n}=t,{nTriggerFormBlur:r}=K;n&&V(n,e),r()}function de(){let{onClear:e}=t;e&&V(e)}function fe(e){let{onFocus:n,showOnFocus:r}=t,{nTriggerFormFocus:i}=K;n&&V(n,e),i(),r&&X()}function me(e){let{onSearch:n}=t;n&&V(n,e)}function he(e){let{onScroll:n}=t;n&&V(n,e)}function ge(){var e;let{remote:n,multiple:r}=t;if(n){let{value:n}=L;if(r){let{valueField:r}=t;(e=W.value)==null||e.forEach(e=>{n.set(e[r],e)})}else{let e=G.value;e&&n.set(e[t.valueField],e)}}}function _e(e){let{onUpdateShow:n,"onUpdate:show":r}=t;n&&V(n,e),r&&V(r,e),D.value=e}function X(){q.value||(_e(!0),D.value=!0,t.filterable&&Le())}function Z(){_e(!1)}function Q(){m.value=``,y.value=I}let $=d(!1);function ve(){t.filterable&&($.value=!0)}function ye(){t.filterable&&($.value=!1,O.value||Q())}function be(){q.value||(O.value?t.filterable?Le():Z():X())}function xe(e){(P.value?.selfRef)?.contains(e.relatedTarget)||(p.value=!1,Y(e),Z())}function Se(e){fe(e),p.value=!0}function Ce(){p.value=!0}function we(e){k.value?.$el.contains(e.relatedTarget)||(p.value=!1,Y(e),Z())}function Te(){var e;(e=k.value)==null||e.focus(),Z()}function Ee(e){O.value&&(k.value?.$el.contains(re(e))||Z())}function De(e){if(!Array.isArray(e))return[];if(R.value)return Array.from(e);{let{remote:n}=t,{value:r}=T;if(n){let{value:t}=L;return e.filter(e=>r.has(e)||t.has(e))}else return e.filter(e=>r.has(e))}}function Oe(e){ke(e.rawNode)}function ke(e){if(q.value)return;let{tag:n,remote:r,clearFilterAfterSelect:i,valueField:a}=t;if(n&&!r){let{value:e}=y,t=e[0]||null;if(t){let e=_.value;e.length?e.push(t):_.value=[t],y.value=I}}if(r&&L.value.set(e[a],e),t.multiple){let t=De(f.value),o=t.findIndex(t=>t===e[a]);if(~o){if(t.splice(o,1),n&&!r){let t=Ae(e[a]);~t&&(_.value.splice(t,1),i&&(m.value=``))}}else t.push(e[a]),i&&(m.value=``);J(t,B(t))}else{if(n&&!r){let t=Ae(e[a]);~t?_.value=[_.value[t]]:_.value=I}Ie(),Z(),J(e[a],e)}}function Ae(e){return _.value.findIndex(n=>n[t.valueField]===e)}function je(e){O.value||X();let{value:n}=e.target;m.value=n;let{tag:r,remote:i}=t;if(me(n),r&&!i){if(!n){y.value=I;return}let{onCreate:e}=t,r=e?e(n):{[t.labelField]:n,[t.valueField]:n},{valueField:i,labelField:a}=t;g.value.some(e=>e[i]===r[i]||e[a]===r[a])||_.value.some(e=>e[i]===r[i]||e[a]===r[a])?y.value=I:y.value=[r]}}function Me(e){e.stopPropagation();let{multiple:n,tag:r,remote:i,clearCreatedOptionsOnClear:a}=t;!n&&t.filterable&&Z(),r&&!i&&a&&(_.value=I),de(),n?J([],[]):J(null,null)}function Ne(e){!A(e,`action`)&&!A(e,`empty`)&&!A(e,`header`)&&e.preventDefault()}function Pe(e){he(e)}function Fe(e){var n,r,i;if(!t.keyboard){e.preventDefault();return}switch(e.key){case` `:if(t.filterable)break;e.preventDefault();case`Enter`:if(!k.value?.isComposing){if(O.value){let e=P.value?.getPendingTmNode();e?Oe(e):t.filterable||(Z(),Ie())}else if(X(),t.tag&&$.value){let e=y.value[0];if(e){let n=e[t.valueField],{value:r}=f;t.multiple&&Array.isArray(r)&&r.includes(n)||ke(e)}}}e.preventDefault();break;case`ArrowUp`:if(e.preventDefault(),t.loading)return;O.value&&((n=P.value)==null||n.prev());break;case`ArrowDown`:if(e.preventDefault(),t.loading)return;O.value?(r=P.value)==null||r.next():X();break;case`Escape`:O.value&&(se(e),Z()),(i=k.value)==null||i.focus();break}}function Ie(){var e;(e=k.value)==null||e.focus()}function Le(){var e;(e=k.value)==null||e.focusInput()}function Re(){var e;O.value&&((e=ee.value)==null||e.syncPosition())}ge(),h(S(t,`options`),ge);let ze={focus:()=>{var e;(e=k.value)==null||e.focus()},focusInput:()=>{var e;(e=k.value)==null||e.focusInput()},blur:()=>{var e;(e=k.value)==null||e.blur()},blurInput:()=>{var e;(e=k.value)==null||e.blurInput()}},Be=l(()=>{let{self:{menuBoxShadow:e}}=c.value;return{"--n-menu-box-shadow":e}}),Ve=o?e(`select`,void 0,Be,t):void 0;return Object.assign(Object.assign({},ze),{mergedStatus:ue,mergedClsPrefix:n,mergedBordered:r,namespace:a,treeMate:w,isMounted:H(),triggerRef:k,menuRef:P,pattern:m,uncontrolledShow:D,mergedShow:O,adjustedTo:E(t),uncontrolledValue:u,mergedValue:f,followerRef:ee,localizedPlaceholder:F,selectedOption:G,selectedOptions:W,mergedSize:le,mergedDisabled:q,focused:p,activeWithoutMenuOpen:$,inlineThemeDisabled:o,onTriggerInputFocus:ve,onTriggerInputBlur:ye,handleTriggerOrMenuResize:Re,handleMenuFocus:Ce,handleMenuBlur:we,handleMenuTabOut:Te,handleTriggerClick:be,handleToggle:Oe,handleDeleteOption:ke,handlePatternInput:je,handleClear:Me,handleTriggerBlur:xe,handleTriggerFocus:Se,handleKeydown:Fe,handleMenuAfterLeave:Q,handleMenuClickOutside:Ee,handleMenuScroll:Pe,handleMenuKeydown:Fe,handleMenuMousedown:Ne,mergedTheme:c,cssVars:o?void 0:Be,themeClass:Ve?.themeClass,onRender:Ve?.onRender})},render(){return n(`div`,{class:`${this.mergedClsPrefix}-select`},n(C,null,{default:()=>[n(w,null,{default:()=>n(fe,{ref:`triggerRef`,inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e;return[(e=this.$slots).arrow?.call(e)]}})}),n(O,{ref:`followerRef`,show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===E.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?`target`:void 0,minWidth:`target`,placement:this.placement},{default:()=>n(G,{name:`fade-in-scale-up-transition`,appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e;return this.mergedShow||this.displayDirective===`show`?((e=this.onRender)==null||e.call(this),s(n(k,Object.assign({},this.menuProps,{ref:`menuRef`,onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,this.menuProps?.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[this.menuProps?.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return[(e=this.$slots).empty?.call(e)]},header:()=>{var e;return[(e=this.$slots).header?.call(e)]},action:()=>{var e;return[(e=this.$slots).action?.call(e)]}}),this.displayDirective===`show`?[[le,this.mergedShow],[I,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[I,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}});export{me as t}; \ No newline at end of file + `,[L({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]),me=m({name:`Select`,props:Object.assign(Object.assign({},v.props),{to:E.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearCreatedOptionsOnClear:{type:Boolean,default:!0},clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:`bottom-start`},widthMode:{type:String,default:`trigger`},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},childrenField:{type:String,default:`children`},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:`show`},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},scrollbarProps:Object,onChange:[Function,Array],items:Array}),slots:Object,setup(t){let{mergedClsPrefixRef:n,mergedBorderedRef:r,namespaceRef:a,inlineThemeDisabled:o,mergedComponentPropsRef:s}=i(t),c=v(`Select`,`-select`,pe,H,t,n),u=d(t.defaultValue),f=z(S(t,`value`),u),p=d(!1),m=d(``),g=oe(t,[`items`,`options`]),_=d([]),y=d([]),b=l(()=>y.value.concat(_.value).concat(g.value)),x=l(()=>{let{filter:e}=t;if(e)return e;let{labelField:n,valueField:r}=t;return(e,t)=>{if(!t)return!1;let i=t[n];if(typeof i==`string`)return j(e,i);let a=t[r];return typeof a==`string`?j(e,a):typeof a==`number`?j(e,String(a)):!1}}),C=l(()=>{if(t.remote)return g.value;{let{value:e}=b,{value:n}=m;return!n.length||!t.filterable?e:M(e,x.value,n,t.childrenField)}}),w=l(()=>{let{valueField:e,childrenField:n}=t,r=ne(e,n);return N(C.value,r)}),T=l(()=>te(b.value,t.valueField,t.childrenField)),D=d(!1),O=z(S(t,`show`),D),k=d(null),ee=d(null),P=d(null),{localeRef:ie}=ae(`Select`),F=l(()=>t.placeholder??ie.value.placeholder),I=[],L=d(new Map),R=l(()=>{let{fallbackOption:e}=t;if(e===void 0){let{labelField:e,valueField:n}=t;return t=>({[e]:String(t),[n]:t})}return e===!1?!1:t=>Object.assign(e(t),{value:t})});function B(e){let n=t.remote,{value:r}=L,{value:i}=T,{value:a}=R,o=[];return e.forEach(e=>{if(i.has(e))o.push(i.get(e));else if(n&&r.has(e))o.push(r.get(e));else if(a){let t=a(e);t&&o.push(t)}}),o}let U=l(()=>{if(t.multiple){let{value:e}=f;return Array.isArray(e)?B(e):[]}return null}),W=l(()=>{let{value:e}=f;return!t.multiple&&!Array.isArray(e)?e===null?null:B([e])[0]||null:null}),G=ce(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:s?.value?.Select?.size||`medium`}}),{mergedSizeRef:K,mergedDisabledRef:q,mergedStatusRef:ue}=G;function J(e,n){let{onChange:r,"onUpdate:value":i,onUpdateValue:a}=t,{nTriggerFormChange:o,nTriggerFormInput:s}=G;r&&V(r,e,n),a&&V(a,e,n),i&&V(i,e,n),u.value=e,o(),s()}function Y(e){let{onBlur:n}=t,{nTriggerFormBlur:r}=G;n&&V(n,e),r()}function de(){let{onClear:e}=t;e&&V(e)}function fe(e){let{onFocus:n,showOnFocus:r}=t,{nTriggerFormFocus:i}=G;n&&V(n,e),i(),r&&X()}function me(e){let{onSearch:n}=t;n&&V(n,e)}function he(e){let{onScroll:n}=t;n&&V(n,e)}function ge(){var e;let{remote:n,multiple:r}=t;if(n){let{value:n}=L;if(r){let{valueField:r}=t;(e=U.value)==null||e.forEach(e=>{n.set(e[r],e)})}else{let e=W.value;e&&n.set(e[t.valueField],e)}}}function _e(e){let{onUpdateShow:n,"onUpdate:show":r}=t;n&&V(n,e),r&&V(r,e),D.value=e}function X(){q.value||(_e(!0),D.value=!0,t.filterable&&Le())}function Z(){_e(!1)}function Q(){m.value=``,y.value=I}let $=d(!1);function ve(){t.filterable&&($.value=!0)}function ye(){t.filterable&&($.value=!1,O.value||Q())}function be(){q.value||(O.value?t.filterable?Le():Z():X())}function xe(e){(P.value?.selfRef)?.contains(e.relatedTarget)||(p.value=!1,Y(e),Z())}function Se(e){fe(e),p.value=!0}function Ce(){p.value=!0}function we(e){k.value?.$el.contains(e.relatedTarget)||(p.value=!1,Y(e),Z())}function Te(){var e;(e=k.value)==null||e.focus(),Z()}function Ee(e){O.value&&(k.value?.$el.contains(re(e))||Z())}function De(e){if(!Array.isArray(e))return[];if(R.value)return Array.from(e);{let{remote:n}=t,{value:r}=T;if(n){let{value:t}=L;return e.filter(e=>r.has(e)||t.has(e))}else return e.filter(e=>r.has(e))}}function Oe(e){ke(e.rawNode)}function ke(e){if(q.value)return;let{tag:n,remote:r,clearFilterAfterSelect:i,valueField:a}=t;if(n&&!r){let{value:e}=y,t=e[0]||null;if(t){let e=_.value;e.length?e.push(t):_.value=[t],y.value=I}}if(r&&L.value.set(e[a],e),t.multiple){let t=De(f.value),o=t.findIndex(t=>t===e[a]);if(~o){if(t.splice(o,1),n&&!r){let t=Ae(e[a]);~t&&(_.value.splice(t,1),i&&(m.value=``))}}else t.push(e[a]),i&&(m.value=``);J(t,B(t))}else{if(n&&!r){let t=Ae(e[a]);~t?_.value=[_.value[t]]:_.value=I}Ie(),Z(),J(e[a],e)}}function Ae(e){return _.value.findIndex(n=>n[t.valueField]===e)}function je(e){O.value||X();let{value:n}=e.target;m.value=n;let{tag:r,remote:i}=t;if(me(n),r&&!i){if(!n){y.value=I;return}let{onCreate:e}=t,r=e?e(n):{[t.labelField]:n,[t.valueField]:n},{valueField:i,labelField:a}=t;g.value.some(e=>e[i]===r[i]||e[a]===r[a])||_.value.some(e=>e[i]===r[i]||e[a]===r[a])?y.value=I:y.value=[r]}}function Me(e){e.stopPropagation();let{multiple:n,tag:r,remote:i,clearCreatedOptionsOnClear:a}=t;!n&&t.filterable&&Z(),r&&!i&&a&&(_.value=I),de(),n?J([],[]):J(null,null)}function Ne(e){!A(e,`action`)&&!A(e,`empty`)&&!A(e,`header`)&&e.preventDefault()}function Pe(e){he(e)}function Fe(e){var n,r,i;if(!t.keyboard){e.preventDefault();return}switch(e.key){case` `:if(t.filterable)break;e.preventDefault();case`Enter`:if(!k.value?.isComposing){if(O.value){let e=P.value?.getPendingTmNode();e?Oe(e):t.filterable||(Z(),Ie())}else if(X(),t.tag&&$.value){let e=y.value[0];if(e){let n=e[t.valueField],{value:r}=f;t.multiple&&Array.isArray(r)&&r.includes(n)||ke(e)}}}e.preventDefault();break;case`ArrowUp`:if(e.preventDefault(),t.loading)return;O.value&&((n=P.value)==null||n.prev());break;case`ArrowDown`:if(e.preventDefault(),t.loading)return;O.value?(r=P.value)==null||r.next():X();break;case`Escape`:O.value&&(se(e),Z()),(i=k.value)==null||i.focus();break}}function Ie(){var e;(e=k.value)==null||e.focus()}function Le(){var e;(e=k.value)==null||e.focusInput()}function Re(){var e;O.value&&((e=ee.value)==null||e.syncPosition())}ge(),h(S(t,`options`),ge);let ze={focus:()=>{var e;(e=k.value)==null||e.focus()},focusInput:()=>{var e;(e=k.value)==null||e.focusInput()},blur:()=>{var e;(e=k.value)==null||e.blur()},blurInput:()=>{var e;(e=k.value)==null||e.blurInput()}},Be=l(()=>{let{self:{menuBoxShadow:e}}=c.value;return{"--n-menu-box-shadow":e}}),Ve=o?e(`select`,void 0,Be,t):void 0;return Object.assign(Object.assign({},ze),{mergedStatus:ue,mergedClsPrefix:n,mergedBordered:r,namespace:a,treeMate:w,isMounted:le(),triggerRef:k,menuRef:P,pattern:m,uncontrolledShow:D,mergedShow:O,adjustedTo:E(t),uncontrolledValue:u,mergedValue:f,followerRef:ee,localizedPlaceholder:F,selectedOption:W,selectedOptions:U,mergedSize:K,mergedDisabled:q,focused:p,activeWithoutMenuOpen:$,inlineThemeDisabled:o,onTriggerInputFocus:ve,onTriggerInputBlur:ye,handleTriggerOrMenuResize:Re,handleMenuFocus:Ce,handleMenuBlur:we,handleMenuTabOut:Te,handleTriggerClick:be,handleToggle:Oe,handleDeleteOption:ke,handlePatternInput:je,handleClear:Me,handleTriggerBlur:xe,handleTriggerFocus:Se,handleKeydown:Fe,handleMenuAfterLeave:Q,handleMenuClickOutside:Ee,handleMenuScroll:Pe,handleMenuKeydown:Fe,handleMenuMousedown:Ne,mergedTheme:c,cssVars:o?void 0:Be,themeClass:Ve?.themeClass,onRender:Ve?.onRender})},render(){return n(`div`,{class:`${this.mergedClsPrefix}-select`},n(C,null,{default:()=>[n(w,null,{default:()=>n(fe,{ref:`triggerRef`,inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e;return[(e=this.$slots).arrow?.call(e)]}})}),n(O,{ref:`followerRef`,show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===E.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?`target`:void 0,minWidth:`target`,placement:this.placement},{default:()=>n(G,{name:`fade-in-scale-up-transition`,appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e;return this.mergedShow||this.displayDirective===`show`?((e=this.onRender)==null||e.call(this),s(n(k,Object.assign({},this.menuProps,{ref:`menuRef`,onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,this.menuProps?.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[this.menuProps?.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return[(e=this.$slots).empty?.call(e)]},header:()=>{var e;return[(e=this.$slots).header?.call(e)]},action:()=>{var e;return[(e=this.$slots).action?.call(e)]}}),this.displayDirective===`show`?[[K,this.mergedShow],[I,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[I,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}});export{me as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Space-Ka5Z-MRX.js b/frontend/dist/assets/Space-CstX9TL6.js similarity index 92% rename from frontend/dist/assets/Space-Ka5Z-MRX.js rename to frontend/dist/assets/Space-CstX9TL6.js index d2b5cc2..285b5d6 100644 --- a/frontend/dist/assets/Space-Ka5Z-MRX.js +++ b/frontend/dist/assets/Space-CstX9TL6.js @@ -1 +1 @@ -import{Mt as e,U as t,bt as n,g as r,kt as i,mt as a,p as o,st as s}from"./client-Bz0sY7Lm.js";import{a as c,i as l}from"./es-BhJOHfSF.js";import{a as u}from"./Button-lcMg8vK2.js";import{t as d}from"./flatten-WgHPAFED.js";import{t as f}from"./get-slot-6kXJmSMP.js";import{h as p}from"./index-6B3OmSLg.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!u)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=i({name:`Space`,props:Object.assign(Object.assign({},o.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:i,mergedRtlRef:a,mergedComponentPropsRef:u}=t(e),d=n(()=>e.size||u?.value?.Space?.size||`medium`),f=o(`Space`,`-space`,void 0,h,e,i),p=r(`Space`,a,i);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:i,margin:n(()=>{let e=d.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[s(`gap`,e)]:t}}=f.value,{row:n,col:r}=c(t);return{horizontal:l(r),vertical:l(n)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:o,itemClass:s,itemStyle:c,margin:l,wrap:u,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=d(f(this),!1);if(!v.length)return null;let y=`${l.horizontal}px`,b=`${l.horizontal/2}px`,x=`${l.vertical}px`,S=`${l.vertical/2}px`,C=v.length-1,w=o.startsWith(`space-`);return e(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(o)?`flex-${o}`:o,flexWrap:!u||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:r,gap:h?`${l.vertical}px ${l.horizontal}px`:``}},!g&&(h||_)?v:v.map((n,r)=>n.type===a?n:e(`div`,{role:`none`,class:s,style:[c,{maxWidth:`100%`},h?``:t?{marginBottom:r===C?``:x}:m?{marginLeft:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginRight:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginLeft:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}]},n)))}});export{v as t}; \ No newline at end of file +import{Mt as e,U as t,bt as n,g as r,kt as i,mt as a,p as o,st as s}from"./client-Bz0sY7Lm.js";import{a as c,i as l}from"./es-Qklex053.js";import{a as u}from"./Button-MBUKfT_Z.js";import{t as d}from"./flatten-WgHPAFED.js";import{t as f}from"./get-slot-6kXJmSMP.js";import{h as p}from"./index-NE0dsiiJ.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!u)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=i({name:`Space`,props:Object.assign(Object.assign({},o.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:i,mergedRtlRef:a,mergedComponentPropsRef:u}=t(e),d=n(()=>e.size||u?.value?.Space?.size||`medium`),f=o(`Space`,`-space`,void 0,h,e,i),p=r(`Space`,a,i);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:i,margin:n(()=>{let e=d.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[s(`gap`,e)]:t}}=f.value,{row:n,col:r}=c(t);return{horizontal:l(r),vertical:l(n)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:o,itemClass:s,itemStyle:c,margin:l,wrap:u,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=d(f(this),!1);if(!v.length)return null;let y=`${l.horizontal}px`,b=`${l.horizontal/2}px`,x=`${l.vertical}px`,S=`${l.vertical/2}px`,C=v.length-1,w=o.startsWith(`space-`);return e(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(o)?`flex-${o}`:o,flexWrap:!u||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:r,gap:h?`${l.vertical}px ${l.horizontal}px`:``}},!g&&(h||_)?v:v.map((n,r)=>n.type===a?n:e(`div`,{role:`none`,class:s,style:[c,{maxWidth:`100%`},h?``:t?{marginBottom:r===C?``:x}:m?{marginLeft:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginRight:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginLeft:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}]},n)))}});export{v as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Spin-g9SI3Frb.js b/frontend/dist/assets/Spin-CYkXlOyb.js similarity index 92% rename from frontend/dist/assets/Spin-g9SI3Frb.js rename to frontend/dist/assets/Spin-CYkXlOyb.js index 60e635f..3f14048 100644 --- a/frontend/dist/assets/Spin-g9SI3Frb.js +++ b/frontend/dist/assets/Spin-CYkXlOyb.js @@ -1,4 +1,4 @@ -import{H as e,Mt as t,U as n,at as r,bt as i,hn as a,kt as o,nt as s,p as c,rn as l,st as u,tt as d}from"./client-Bz0sY7Lm.js";import{s as f}from"./es-BhJOHfSF.js";import{t as p}from"./use-compitable-BIRdD7BE.js";import{t as m}from"./fade-in.cssr-0rRavIDG.js";import{I as h,L as g,d as _,it as v}from"./index-6B3OmSLg.js";var y=d([d(`@keyframes spin-rotate`,` +import{H as e,Mt as t,U as n,at as r,bt as i,hn as a,kt as o,nt as s,p as c,rn as l,st as u,tt as d}from"./client-Bz0sY7Lm.js";import{s as f}from"./es-Qklex053.js";import{t as p}from"./use-compitable-BIRdD7BE.js";import{t as m}from"./fade-in.cssr-0rRavIDG.js";import{L as h,R as g,at as _,d as v}from"./index-NE0dsiiJ.js";var y=d([d(`@keyframes spin-rotate`,` from { transform: rotate(0); } @@ -40,4 +40,4 @@ import{H as e,Mt as t,U as n,at as r,bt as i,hn as a,kt as o,nt as s,p as c,rn a -webkit-user-select: none; pointer-events: none; opacity: var(--n-opacity-spinning); - `)])]),b={small:20,medium:18,large:16},x=o({name:`Spin`,props:Object.assign(Object.assign(Object.assign({},c.props),{contentClass:String,contentStyle:[Object,String],description:String,size:{type:[String,Number],default:`medium`},show:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),g),slots:Object,setup(t){let{mergedClsPrefixRef:r,inlineThemeDisabled:o}=n(t),s=c(`Spin`,`-spin`,y,_,t,r),d=i(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:r}=s.value,{opacitySpinning:i,color:a,textColor:o}=r;return{"--n-bezier":n,"--n-opacity-spinning":i,"--n-size":typeof e==`number`?f(e):r[u(`size`,e)],"--n-color":a,"--n-text-color":o}}),m=o?e(`spin`,i(()=>{let{size:e}=t;return typeof e==`number`?String(e):e[0]}),d,t):void 0,h=p(t,[`spinning`,`show`]),g=a(!1);return l(e=>{let n;if(h.value){let{delay:r}=t;if(r){n=window.setTimeout(()=>{g.value=!0},r),e(()=>{clearTimeout(n)});return}}g.value=h.value}),{mergedClsPrefix:r,active:g,mergedStrokeWidth:i(()=>{let{strokeWidth:e}=t;if(e!==void 0)return e;let{size:n}=t;return b[typeof n==`number`?`medium`:n]}),cssVars:o?void 0:d,themeClass:m?.themeClass,onRender:m?.onRender}},render(){var e;let{$slots:n,mergedClsPrefix:r,description:i}=this,a=n.icon&&this.rotate,o=(i||n.description)&&t(`div`,{class:`${r}-spin-description`},i||n.description?.call(n)),s=n.icon?t(`div`,{class:[`${r}-spin-body`,this.themeClass]},t(`div`,{class:[`${r}-spin`,a&&`${r}-spin--rotate`],style:n.default?``:this.cssVars},n.icon()),o):t(`div`,{class:[`${r}-spin-body`,this.themeClass]},t(h,{clsPrefix:r,style:n.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,radius:this.radius,scale:this.scale,class:`${r}-spin`}),o);return(e=this.onRender)==null||e.call(this),n.default?t(`div`,{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},t(`div`,{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),t(v,{name:`fade-in-transition`},{default:()=>this.active?s:null})):s}});export{x as t}; \ No newline at end of file + `)])]),b={small:20,medium:18,large:16},x=o({name:`Spin`,props:Object.assign(Object.assign(Object.assign({},c.props),{contentClass:String,contentStyle:[Object,String],description:String,size:{type:[String,Number],default:`medium`},show:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),g),slots:Object,setup(t){let{mergedClsPrefixRef:r,inlineThemeDisabled:o}=n(t),s=c(`Spin`,`-spin`,y,v,t,r),d=i(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:r}=s.value,{opacitySpinning:i,color:a,textColor:o}=r;return{"--n-bezier":n,"--n-opacity-spinning":i,"--n-size":typeof e==`number`?f(e):r[u(`size`,e)],"--n-color":a,"--n-text-color":o}}),m=o?e(`spin`,i(()=>{let{size:e}=t;return typeof e==`number`?String(e):e[0]}),d,t):void 0,h=p(t,[`spinning`,`show`]),g=a(!1);return l(e=>{let n;if(h.value){let{delay:r}=t;if(r){n=window.setTimeout(()=>{g.value=!0},r),e(()=>{clearTimeout(n)});return}}g.value=h.value}),{mergedClsPrefix:r,active:g,mergedStrokeWidth:i(()=>{let{strokeWidth:e}=t;if(e!==void 0)return e;let{size:n}=t;return b[typeof n==`number`?`medium`:n]}),cssVars:o?void 0:d,themeClass:m?.themeClass,onRender:m?.onRender}},render(){var e;let{$slots:n,mergedClsPrefix:r,description:i}=this,a=n.icon&&this.rotate,o=(i||n.description)&&t(`div`,{class:`${r}-spin-description`},i||n.description?.call(n)),s=n.icon?t(`div`,{class:[`${r}-spin-body`,this.themeClass]},t(`div`,{class:[`${r}-spin`,a&&`${r}-spin--rotate`],style:n.default?``:this.cssVars},n.icon()),o):t(`div`,{class:[`${r}-spin-body`,this.themeClass]},t(h,{clsPrefix:r,style:n.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,radius:this.radius,scale:this.scale,class:`${r}-spin`}),o);return(e=this.onRender)==null||e.call(this),n.default?t(`div`,{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},t(`div`,{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),t(_,{name:`fade-in-transition`},{default:()=>this.active?s:null})):s}});export{x as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Suffix-JLavbuLO.js b/frontend/dist/assets/Suffix-BBRLYxYK.js similarity index 54% rename from frontend/dist/assets/Suffix-JLavbuLO.js rename to frontend/dist/assets/Suffix-BBRLYxYK.js index d34d053..c06ae11 100644 --- a/frontend/dist/assets/Suffix-JLavbuLO.js +++ b/frontend/dist/assets/Suffix-BBRLYxYK.js @@ -1,9 +1,9 @@ -import{At as e,Dt as t,Mt as n,Pt as r,W as i,Y as a,bt as o,gt as s,h as c,hn as l,ht as u,it as d,kt as f,m as p,mn as m,mt as ee,nn as h,nt as g,q as _,tt as v,vn as y}from"./client-Bz0sY7Lm.js";import{d as b,u as x}from"./Card-D1LVu21r.js";import{i as S}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as C}from"./flatten-WgHPAFED.js";import{B as w,G as T,I as E,K as D,q as O}from"./index-6B3OmSLg.js";function k(e){let t=l(!!e.value);if(t.value)return m(t);let n=h(e,e=>{e&&(t.value=!0,n())});return m(t)}function A(){return e()!==null}var te=typeof window<`u`,ne=a(`n-drawer-body`);a(`n-drawer`);var re=a(`n-modal-body`),ie=a(`n-modal-provider`),ae=a(`n-modal`),j=a(`n-popover-body`);function M(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function N(e,n=!0,r=[]){return e.forEach(e=>{if(e!==null){if(typeof e!=`object`){(typeof e==`string`||typeof e==`number`)&&r.push(t(String(e)));return}if(Array.isArray(e)){N(e,n,r);return}if(e.type===u){if(e.children===null)return;Array.isArray(e.children)&&N(e.children,n,r)}else e.type!==ee&&r.push(e)}}),r}function P(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);let i=N(r());if(i.length===1)return i[0];throw Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}var F=`@@coContext`,I={mounted(e,{value:t,modifiers:n}){e[F]={handler:void 0},typeof t==`function`&&(e[F].handler=t,b(`clickoutside`,e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){let r=e[F];typeof t==`function`?r.handler?r.handler!==t&&(x(`clickoutside`,e,r.handler,{capture:n.capture}),r.handler=t,b(`clickoutside`,e,t,{capture:n.capture})):(e[F].handler=t,b(`clickoutside`,e,t,{capture:n.capture})):r.handler&&=(x(`clickoutside`,e,r.handler,{capture:n.capture}),void 0)},unmounted(e,{modifiers:t}){let{handler:n}=e[F];n&&x(`clickoutside`,e,n,{capture:t.capture}),e[F].handler=void 0}};function L(e,t){console.error(`[vdirs/${e}]: ${t}`)}var R=new class{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(e,t){let{elementZIndex:n}=this;if(t!==void 0){e.style.zIndex=`${t}`,n.delete(e);return}let{nextZIndex:r}=this;n.has(e)&&n.get(e)+1===this.nextZIndex||(e.style.zIndex=`${r}`,n.set(e,r),this.nextZIndex=r+1,this.squashState())}unregister(e,t){let{elementZIndex:n}=this;n.has(e)?n.delete(e):t===void 0&&L(`z-index-manager/unregister-element`,`Element not found when unregistering.`),this.squashState()}squashState(){let{elementCount:e}=this;e||(this.nextZIndex=2e3),this.nextZIndex-e>2500&&this.rearrange()}rearrange(){let e=Array.from(this.elementZIndex.entries());e.sort((e,t)=>e[1]-t[1]),this.nextZIndex=2e3,e.forEach(e=>{let t=e[0],n=this.nextZIndex++;`${n}`!==t.style.zIndex&&(t.style.zIndex=`${n}`)})}},z=`@@ziContext`,B={mounted(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n;e[z]={enabled:!!i,initialized:!1},i&&(R.ensureZIndex(e,r),e[z].initialized=!0)},updated(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[z].enabled;i&&!a&&(R.ensureZIndex(e,r),e[z].initialized=!0),e[z].enabled=!!i},unmounted(e,t){if(!e[z].initialized)return;let{value:n={}}=t,{zIndex:r}=n;R.unregister(e,r)}},V=f({name:`LazyTeleport`,props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:k(y(e,`show`)),mergedTo:o(()=>{let{to:t}=e;return t??`body`})}},render(){return this.showTeleport?this.disabled?M(`lazy-teleport`,this.$slots):n(s,{disabled:this.disabled,to:this.mergedTo},M(`lazy-teleport`,this.$slots)):null}});function H(e,t=`default`,n=void 0){let r=e[t];if(!r)return _(`getFirstSlotVNode`,`slot[${t}] is empty`),null;let i=C(r(n));return i.length===1?i[0]:(_(`getFirstSlotVNode`,`slot[${t}] should have exactly one child`),null)}function U(e,t,n){if(!t)return null;let r=C(t(n));return r.length===1?r[0]:(_(`getFirstSlotVNode`,`slot[${e}] should have exactly one child`),null)}var W={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function G(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function K(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function q(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?oe(s,e=>e.test(o)):J(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function J(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function oe(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var se={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ce=(e,t,n)=>{let r,i=se[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},le={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ue=(e,t,n,r)=>le[e],de={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:K({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:K({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:K({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:K({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:K({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},fe={ordinalNumber:Y({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:q({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:q({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:q({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:q({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},X={code:`en-US`,formatDistance:ce,formatLong:{date:G({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:G({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:G({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:ue,localize:de,match:fe,options:{weekStartsOn:0,firstWeekContainsDate:1}},pe={name:`en-US`,locale:X};function me(e){let{mergedLocaleRef:t,mergedDateLocaleRef:n}=r(i,null)||{},a=o(()=>t?.value?.[e]??W[e]);return{dateLocaleRef:o(()=>n?.value??pe),localeRef:a}}var he=f({name:`ChevronDown`,render(){return n(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},n(`path`,{d:`M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z`,fill:`currentColor`}))}}),ge=T(`clear`,()=>n(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},n(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},n(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},n(`path`,{d:`M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z`}))))),_e=g(`base-clear`,` +import{At as e,Dt as t,Mt as n,Pt as r,W as i,Y as a,bt as o,gt as s,h as c,hn as l,ht as u,it as d,kt as f,m as p,mn as m,mt as h,nn as g,nt as _,q as v,tt as y,vn as b}from"./client-Bz0sY7Lm.js";import{d as x,u as S}from"./Card-BGJkYb2B.js";import{i as C}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as w}from"./flatten-WgHPAFED.js";import{J as T,K as E,L as D,V as O,q as k}from"./index-NE0dsiiJ.js";function A(e){let t=l(!!e.value);if(t.value)return m(t);let n=g(e,e=>{e&&(t.value=!0,n())});return m(t)}function ee(){return e()!==null}var te=typeof window<`u`,ne=a(`n-drawer-body`);a(`n-drawer`);var re=a(`n-modal-body`),ie=a(`n-modal-provider`),ae=a(`n-modal`),oe=a(`n-popover-body`);function j(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function M(e,n=!0,r=[]){return e.forEach(e=>{if(e!==null){if(typeof e!=`object`){(typeof e==`string`||typeof e==`number`)&&r.push(t(String(e)));return}if(Array.isArray(e)){M(e,n,r);return}if(e.type===u){if(e.children===null)return;Array.isArray(e.children)&&M(e.children,n,r)}else e.type!==h&&r.push(e)}}),r}function N(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);let i=M(r());if(i.length===1)return i[0];throw Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}var P=`@@coContext`,F={mounted(e,{value:t,modifiers:n}){e[P]={handler:void 0},typeof t==`function`&&(e[P].handler=t,x(`clickoutside`,e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){let r=e[P];typeof t==`function`?r.handler?r.handler!==t&&(S(`clickoutside`,e,r.handler,{capture:n.capture}),r.handler=t,x(`clickoutside`,e,t,{capture:n.capture})):(e[P].handler=t,x(`clickoutside`,e,t,{capture:n.capture})):r.handler&&=(S(`clickoutside`,e,r.handler,{capture:n.capture}),void 0)},unmounted(e,{modifiers:t}){let{handler:n}=e[P];n&&S(`clickoutside`,e,n,{capture:t.capture}),e[P].handler=void 0}};function I(e,t){console.error(`[vdirs/${e}]: ${t}`)}var L=new class{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(e,t){let{elementZIndex:n}=this;if(t!==void 0){e.style.zIndex=`${t}`,n.delete(e);return}let{nextZIndex:r}=this;n.has(e)&&n.get(e)+1===this.nextZIndex||(e.style.zIndex=`${r}`,n.set(e,r),this.nextZIndex=r+1,this.squashState())}unregister(e,t){let{elementZIndex:n}=this;n.has(e)?n.delete(e):t===void 0&&I(`z-index-manager/unregister-element`,`Element not found when unregistering.`),this.squashState()}squashState(){let{elementCount:e}=this;e||(this.nextZIndex=2e3),this.nextZIndex-e>2500&&this.rearrange()}rearrange(){let e=Array.from(this.elementZIndex.entries());e.sort((e,t)=>e[1]-t[1]),this.nextZIndex=2e3,e.forEach(e=>{let t=e[0],n=this.nextZIndex++;`${n}`!==t.style.zIndex&&(t.style.zIndex=`${n}`)})}},R=`@@ziContext`,z={mounted(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n;e[R]={enabled:!!i,initialized:!1},i&&(L.ensureZIndex(e,r),e[R].initialized=!0)},updated(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[R].enabled;i&&!a&&(L.ensureZIndex(e,r),e[R].initialized=!0),e[R].enabled=!!i},unmounted(e,t){if(!e[R].initialized)return;let{value:n={}}=t,{zIndex:r}=n;L.unregister(e,r)}},B=f({name:`LazyTeleport`,props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:A(b(e,`show`)),mergedTo:o(()=>{let{to:t}=e;return t??`body`})}},render(){return this.showTeleport?this.disabled?j(`lazy-teleport`,this.$slots):n(s,{disabled:this.disabled,to:this.mergedTo},j(`lazy-teleport`,this.$slots)):null}});function V(e,t=`default`,n=void 0){let r=e[t];if(!r)return v(`getFirstSlotVNode`,`slot[${t}] is empty`),null;let i=w(r(n));return i.length===1?i[0]:(v(`getFirstSlotVNode`,`slot[${t}] should have exactly one child`),null)}function H(e,t,n){if(!t)return null;let r=w(t(n));return r.length===1?r[0]:(v(`getFirstSlotVNode`,`slot[${e}] should have exactly one child`),null)}var U={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function W(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function G(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function K(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?se(s,e=>e.test(o)):q(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function q(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function se(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ce={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},le=(e,t,n)=>{let r,i=ce[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},ue={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},de=(e,t,n,r)=>ue[e],fe={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:G({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:G({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:G({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:G({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:G({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},pe={ordinalNumber:J({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},Y={code:`en-US`,formatDistance:le,formatLong:{date:W({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:W({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:W({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:de,localize:fe,match:pe,options:{weekStartsOn:0,firstWeekContainsDate:1}},me={name:`en-US`,locale:Y};function he(e){let{mergedLocaleRef:t,mergedDateLocaleRef:n}=r(i,null)||{},a=o(()=>t?.value?.[e]??U[e]);return{dateLocaleRef:o(()=>n?.value??me),localeRef:a}}var ge=f({name:`ChevronDown`,render(){return n(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},n(`path`,{d:`M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z`,fill:`currentColor`}))}}),X=E(`clear`,()=>n(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},n(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},n(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},n(`path`,{d:`M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z`}))))),_e=_(`base-clear`,` flex-shrink: 0; height: 1em; width: 1em; position: relative; -`,[v(`>`,[d(`clear`,` +`,[y(`>`,[d(`clear`,` font-size: var(--n-clear-size); height: 1em; width: 1em; @@ -11,9 +11,9 @@ import{At as e,Dt as t,Mt as n,Pt as r,W as i,Y as a,bt as o,gt as s,h as c,hn a color: var(--n-clear-color); transition: color .3s var(--n-bezier); display: flex; - `,[v(`&:hover`,` + `,[y(`&:hover`,` color: var(--n-clear-color-hover)!important; - `),v(`&:active`,` + `),y(`&:active`,` color: var(--n-clear-color-pressed)!important; `)]),d(`placeholder`,` display: flex; @@ -22,4 +22,4 @@ import{At as e,Dt as t,Mt as n,Pt as r,W as i,Y as a,bt as o,gt as s,h as c,hn a left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); - `,[w({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),Z=f({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return p(`-base-clear`,_e,y(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return n(`div`,{class:`${e}-base-clear`},n(D,null,{default:()=>{var t;return this.show?n(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},S(this.$slots.icon,()=>[n(O,{clsPrefix:e},{default:()=>n(ge,null)})])):n(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),{cubicBezierEaseIn:Q,cubicBezierEaseOut:$}=c;function ve({transformOrigin:e=`inherit`,duration:t=`.2s`,enterScale:n=`.9`,originalTransform:r=``,originalTransition:i=``}={}){return[v(`&.fade-in-scale-up-transition-leave-active`,{transformOrigin:e,transition:`opacity ${t} ${Q}, transform ${t} ${Q} ${i&&`,${i}`}`}),v(`&.fade-in-scale-up-transition-enter-active`,{transformOrigin:e,transition:`opacity ${t} ${$}, transform ${t} ${$} ${i&&`,${i}`}`}),v(`&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to`,{opacity:0,transform:`${r} scale(${n})`}),v(`&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to`,{opacity:1,transform:`${r} scale(1)`})]}var ye=f({name:`InternalSelectionSuffix`,props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:r}=e;return n(E,{clsPrefix:r,class:`${r}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?n(Z,{clsPrefix:r,show:e.showClear,onClear:e.onClear},{placeholder:()=>n(O,{clsPrefix:r,class:`${r}-base-suffix__arrow`},{default:()=>S(t.default,()=>[n(he,null)])})}):null})}}});export{te as C,A as S,j as _,X as a,ie as b,K as c,U as d,V as f,M as g,P as h,me as i,G as l,I as m,ve as n,Y as o,B as p,Z as r,q as s,ye as t,H as u,re as v,ne as x,ae as y}; \ No newline at end of file + `,[O({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),Z=f({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return p(`-base-clear`,_e,b(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return n(`div`,{class:`${e}-base-clear`},n(k,null,{default:()=>{var t;return this.show?n(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},C(this.$slots.icon,()=>[n(T,{clsPrefix:e},{default:()=>n(X,null)})])):n(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),{cubicBezierEaseIn:Q,cubicBezierEaseOut:$}=c;function ve({transformOrigin:e=`inherit`,duration:t=`.2s`,enterScale:n=`.9`,originalTransform:r=``,originalTransition:i=``}={}){return[y(`&.fade-in-scale-up-transition-leave-active`,{transformOrigin:e,transition:`opacity ${t} ${Q}, transform ${t} ${Q} ${i&&`,${i}`}`}),y(`&.fade-in-scale-up-transition-enter-active`,{transformOrigin:e,transition:`opacity ${t} ${$}, transform ${t} ${$} ${i&&`,${i}`}`}),y(`&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to`,{opacity:0,transform:`${r} scale(${n})`}),y(`&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to`,{opacity:1,transform:`${r} scale(1)`})]}var ye=f({name:`InternalSelectionSuffix`,props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:r}=e;return n(D,{clsPrefix:r,class:`${r}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?n(Z,{clsPrefix:r,show:e.showClear,onClear:e.onClear},{placeholder:()=>n(T,{clsPrefix:r,class:`${r}-base-suffix__arrow`},{default:()=>C(t.default,()=>[n(ge,null)])})}):null})}}});export{te as C,ee as S,oe as _,Y as a,ie as b,G as c,H as d,B as f,j as g,N as h,he as i,W as l,F as m,ve as n,J as o,z as p,Z as r,K as s,ye as t,V as u,re as v,A as w,ne as x,ae as y}; \ No newline at end of file diff --git a/frontend/dist/assets/Switch-BQ4oql65.js b/frontend/dist/assets/Switch-DEzgODFH.js similarity index 86% rename from frontend/dist/assets/Switch-BQ4oql65.js rename to frontend/dist/assets/Switch-DEzgODFH.js index 2855b97..7699ca0 100644 --- a/frontend/dist/assets/Switch-BQ4oql65.js +++ b/frontend/dist/assets/Switch-DEzgODFH.js @@ -1,4 +1,4 @@ -import{H as e,Mt as t,U as n,X as r,at as i,bt as a,d as o,hn as s,it as c,kt as l,nt as u,ot as d,p as f,st as p,tt as m,vn as h}from"./client-Bz0sY7Lm.js";import{i as g,s as _}from"./es-BhJOHfSF.js";import{t as v}from"./use-merged-state-z45UzW9G.js";import{o as y,r as b,s as x}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as S}from"./use-form-item-Bl3X3aXB.js";import{B as C,I as w,K as T,u as E}from"./index-6B3OmSLg.js";var D=l({name:`Remove`,render(){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},t(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:` +import{H as e,Mt as t,U as n,X as r,at as i,bt as a,d as o,hn as s,it as c,kt as l,nt as u,ot as d,p as f,st as p,tt as m,vn as h}from"./client-Bz0sY7Lm.js";import{i as g,s as _}from"./es-Qklex053.js";import{t as v}from"./use-merged-state-z45UzW9G.js";import{c as y,o as b,r as x}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as S}from"./use-form-item-Bl3X3aXB.js";import{L as C,V as w,q as T,u as E}from"./index-NE0dsiiJ.js";var D=l({name:`Remove`,render(){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},t(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:` fill: none; stroke: currentColor; stroke-linecap: round; @@ -35,7 +35,7 @@ import{H as e,Mt as t,U as n,X as r,at as i,bt as a,d as o,hn as s,it as c,kt as font-size: calc(var(--n-button-width) - 4px); color: var(--n-loading-color); transition: color .3s var(--n-bezier); - `,[C({left:`50%`,top:`50%`,originalTransform:`translateX(-50%) translateY(-50%)`})]),c(`checked, unchecked`,` + `,[w({left:`50%`,top:`50%`,originalTransform:`translateX(-50%) translateY(-50%)`})]),c(`checked, unchecked`,` transition: color .3s var(--n-bezier); color: var(--n-text-color); box-sizing: border-box; @@ -80,7 +80,7 @@ import{H as e,Mt as t,U as n,X as r,at as i,bt as a,d as o,hn as s,it as c,kt as justify-content: center; align-items: center; line-height: 1; - `,[C()]),c(`button`,` + `,[w()]),c(`button`,` align-items: center; top: var(--n-offset); left: var(--n-offset); @@ -105,4 +105,4 @@ import{H as e,Mt as t,U as n,X as r,at as i,bt as a,d as o,hn as s,it as c,kt as `)]),i(`disabled`,[c(`rail`,` cursor: not-allowed; opacity: .5; - `)])]),j=Object.assign(Object.assign({},f.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),M,N=l({name:`Switch`,props:j,slots:Object,setup(t){M===void 0&&(M=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:o}=n(t),c=f(`Switch`,`-switch`,A,k,t,r),l=S(t,{mergedSize(e){return t.size===void 0?e?e.mergedSize.value:o?.value?.Switch?.size||`medium`:t.size}}),{mergedSizeRef:u,mergedDisabledRef:d}=l,m=s(t.defaultValue),y=v(h(t,`value`),m),b=a(()=>y.value===t.checkedValue),C=s(!1),w=s(!1),T=a(()=>{let{railStyle:e}=t;if(e)return e({focused:w.value,checked:b.value})});function E(e){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=t,{nTriggerFormInput:a,nTriggerFormChange:o}=l;n&&x(n,e),i&&x(i,e),r&&x(r,e),m.value=e,a(),o()}function D(){let{nTriggerFormFocus:e}=l;e()}function O(){let{nTriggerFormBlur:e}=l;e()}function j(){t.loading||d.value||(y.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue))}function N(){w.value=!0,D()}function P(){w.value=!1,O(),C.value=!1}function F(e){t.loading||d.value||e.key===` `&&(y.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue),C.value=!1)}function I(e){t.loading||d.value||e.key===` `&&(e.preventDefault(),C.value=!0)}let L=a(()=>{let{value:e}=u,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:a,boxShadowFocus:o,loadingColor:s,textColor:l,iconColor:d,[p(`buttonHeight`,e)]:f,[p(`buttonWidth`,e)]:m,[p(`buttonWidthPressed`,e)]:h,[p(`railHeight`,e)]:v,[p(`railWidth`,e)]:y,[p(`railBorderRadius`,e)]:b,[p(`buttonBorderRadius`,e)]:x},common:{cubicBezierEaseInOut:S}}=c.value,C,w,T;return M?(C=`calc((${v} - ${f}) / 2)`,w=`max(${v}, ${f})`,T=`max(${y}, calc(${y} + ${f} - ${v}))`):(C=_((g(v)-g(f))/2),w=_(Math.max(g(v),g(f))),T=g(v)>g(f)?y:_(g(y)+g(f)-g(v))),{"--n-bezier":S,"--n-button-border-radius":x,"--n-button-box-shadow":i,"--n-button-color":a,"--n-button-width":m,"--n-button-width-pressed":h,"--n-button-height":f,"--n-height":w,"--n-offset":C,"--n-opacity-disabled":t,"--n-rail-border-radius":b,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":v,"--n-rail-width":y,"--n-width":T,"--n-box-shadow-focus":o,"--n-loading-color":s,"--n-text-color":l,"--n-icon-color":d}}),R=i?e(`switch`,a(()=>u.value[0]),L,t):void 0;return{handleClick:j,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:T,pressed:C,mergedClsPrefix:r,mergedValue:y,checked:b,mergedDisabled:d,cssVars:i?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:n,checked:r,mergedRailStyle:i,onRender:a,$slots:o}=this;a?.();let{checked:s,unchecked:c,icon:l,"checked-icon":u,"unchecked-icon":d}=o,f=!(b(l)&&b(u)&&b(d));return t(`div`,{role:`switch`,"aria-checked":r,class:[`${e}-switch`,this.themeClass,f&&`${e}-switch--icon`,r&&`${e}-switch--active`,n&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},t(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:i},y(s,n=>y(c,r=>n||r?t(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),n),t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),r)):null)),t(`div`,{class:`${e}-switch__button`},y(l,n=>y(u,r=>y(d,i=>t(T,null,{default:()=>this.loading?t(w,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(r||n)?t(`div`,{class:`${e}-switch__button-icon`,key:r?`checked-icon`:`icon`},r||n):!this.checked&&(i||n)?t(`div`,{class:`${e}-switch__button-icon`,key:i?`unchecked-icon`:`icon`},i||n):null})))),y(s,n=>n&&t(`div`,{key:`checked`,class:`${e}-switch__checked`},n)),y(c,n=>n&&t(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},n)))))}});export{D as n,N as t}; \ No newline at end of file + `)])]),j=Object.assign(Object.assign({},f.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),M,N=l({name:`Switch`,props:j,slots:Object,setup(t){M===void 0&&(M=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:o}=n(t),c=f(`Switch`,`-switch`,A,k,t,r),l=S(t,{mergedSize(e){return t.size===void 0?e?e.mergedSize.value:o?.value?.Switch?.size||`medium`:t.size}}),{mergedSizeRef:u,mergedDisabledRef:d}=l,m=s(t.defaultValue),b=v(h(t,`value`),m),x=a(()=>b.value===t.checkedValue),C=s(!1),w=s(!1),T=a(()=>{let{railStyle:e}=t;if(e)return e({focused:w.value,checked:x.value})});function E(e){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=t,{nTriggerFormInput:a,nTriggerFormChange:o}=l;n&&y(n,e),i&&y(i,e),r&&y(r,e),m.value=e,a(),o()}function D(){let{nTriggerFormFocus:e}=l;e()}function O(){let{nTriggerFormBlur:e}=l;e()}function j(){t.loading||d.value||(b.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue))}function N(){w.value=!0,D()}function P(){w.value=!1,O(),C.value=!1}function F(e){t.loading||d.value||e.key===` `&&(b.value===t.checkedValue?E(t.uncheckedValue):E(t.checkedValue),C.value=!1)}function I(e){t.loading||d.value||e.key===` `&&(e.preventDefault(),C.value=!0)}let L=a(()=>{let{value:e}=u,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:a,boxShadowFocus:o,loadingColor:s,textColor:l,iconColor:d,[p(`buttonHeight`,e)]:f,[p(`buttonWidth`,e)]:m,[p(`buttonWidthPressed`,e)]:h,[p(`railHeight`,e)]:v,[p(`railWidth`,e)]:y,[p(`railBorderRadius`,e)]:b,[p(`buttonBorderRadius`,e)]:x},common:{cubicBezierEaseInOut:S}}=c.value,C,w,T;return M?(C=`calc((${v} - ${f}) / 2)`,w=`max(${v}, ${f})`,T=`max(${y}, calc(${y} + ${f} - ${v}))`):(C=_((g(v)-g(f))/2),w=_(Math.max(g(v),g(f))),T=g(v)>g(f)?y:_(g(y)+g(f)-g(v))),{"--n-bezier":S,"--n-button-border-radius":x,"--n-button-box-shadow":i,"--n-button-color":a,"--n-button-width":m,"--n-button-width-pressed":h,"--n-button-height":f,"--n-height":w,"--n-offset":C,"--n-opacity-disabled":t,"--n-rail-border-radius":b,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":v,"--n-rail-width":y,"--n-width":T,"--n-box-shadow-focus":o,"--n-loading-color":s,"--n-text-color":l,"--n-icon-color":d}}),R=i?e(`switch`,a(()=>u.value[0]),L,t):void 0;return{handleClick:j,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:T,pressed:C,mergedClsPrefix:r,mergedValue:b,checked:x,mergedDisabled:d,cssVars:i?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:n,checked:r,mergedRailStyle:i,onRender:a,$slots:o}=this;a?.();let{checked:s,unchecked:c,icon:l,"checked-icon":u,"unchecked-icon":d}=o,f=!(x(l)&&x(u)&&x(d));return t(`div`,{role:`switch`,"aria-checked":r,class:[`${e}-switch`,this.themeClass,f&&`${e}-switch--icon`,r&&`${e}-switch--active`,n&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},t(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:i},b(s,n=>b(c,r=>n||r?t(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),n),t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),r)):null)),t(`div`,{class:`${e}-switch__button`},b(l,n=>b(u,r=>b(d,i=>t(T,null,{default:()=>this.loading?t(C,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(r||n)?t(`div`,{class:`${e}-switch__button-icon`,key:r?`checked-icon`:`icon`},r||n):!this.checked&&(i||n)?t(`div`,{class:`${e}-switch__button-icon`,key:i?`unchecked-icon`:`icon`},i||n):null})))),b(s,n=>n&&t(`div`,{key:`checked`,class:`${e}-switch__checked`},n)),b(c,n=>n&&t(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},n)))))}});export{D as n,N as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Tabs-BuPkDDy2.js b/frontend/dist/assets/Tabs-BaVejAu8.js similarity index 56% rename from frontend/dist/assets/Tabs-BuPkDDy2.js rename to frontend/dist/assets/Tabs-BaVejAu8.js index b13ea90..a86f3dc 100644 --- a/frontend/dist/assets/Tabs-BuPkDDy2.js +++ b/frontend/dist/assets/Tabs-BaVejAu8.js @@ -1,4 +1,4 @@ -import{H as e,I as t,J as n,K as r,Lt as i,Mt as a,Pt as o,Rt as s,U as c,Ut as l,V as u,Y as d,an as f,at as p,bt as m,hn as h,ht as g,it as _,kt as v,nn as y,nt as b,ot as x,p as S,qt as C,rn as ee,st as w,tt as T,vn as E,yt as D}from"./client-Bz0sY7Lm.js";import{l as te,n as O,r as k}from"./Follower-C1zQmxY2.js";import{c as A}from"./Card-D1LVu21r.js";import{i as ne,o as j}from"./es-BhJOHfSF.js";import{t as re}from"./use-merged-state-z45UzW9G.js";import{t as M}from"./use-compitable-BIRdD7BE.js";import{o as N,s as P}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as F}from"./flatten-WgHPAFED.js";import{t as I}from"./Add-BlaQeLtQ.js";import{Q as ie,X as ae,Z as L,at as R,l as oe,q as se,st as z,z as B}from"./index-6B3OmSLg.js";var V=O(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[O(`&::-webkit-scrollbar`,{width:0,height:0})]),ce=v({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=h(null);function t(e){!(e.currentTarget.offsetWidth=n||t<0||f&&r>=o}function v(){var e=J();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(J())}function S(){var e=J(),t=_(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var ge=`Expected a function`;function _e(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(ge);return t(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Y(e,n,{leading:i,maxWait:n,trailing:a})}var ve=d(`n-tabs`),ye={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},X=v({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:ye,slots:Object,setup(e){let t=o(ve,null);return t||r(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return a(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),Z=v({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},ie(ye,[`displayDirective`])),setup(e){let{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:a,addTabStyleRef:s,tabClassRef:c,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:d,triggerRef:f,handleAdd:p,activateTab:h,handleClose:g}=o(ve);return{trigger:f,mergedClosable:m(()=>{if(e.internalAddable)return!1;let{closable:t}=e;return t===void 0?i.value:t}),style:a,addStyle:s,tabClass:c,addTabClass:l,clsPrefix:t,value:n,type:r,handleClose(t){t.stopPropagation(),!e.disabled&&g(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){p();return}let{name:t}=e,r=++u.id;if(t!==n.value){let{value:i}=d;i?Promise.resolve(i(e.name,n.value)).then(e=>{e&&u.id===r&&h(t)}):h(t)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:o,tab:s,value:c,mergedClosable:l,trigger:u,$slots:{default:d}}=this,f=o??s;return a(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?a(`div`,{class:`${t}-tabs-tab-pad`}):null,a(`div`,Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},i({class:[`${t}-tabs-tab`,c===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,l&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:u===`click`?this.activateTab:void 0,onMouseenter:u===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),a(`span`,{class:`${t}-tabs-tab__label`},e?a(g,null,a(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),a(se,{clsPrefix:t},{default:()=>a(I,null)})):d?d():typeof f==`object`?f:L(f??n)),l&&this.type===`card`?a(B,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),be=b(`tabs`,` +import{H as e,I as t,J as n,K as r,Lt as i,Mt as a,Pt as o,Rt as s,U as c,Ut as l,V as u,Y as d,an as f,at as p,bt as m,hn as h,ht as g,it as _,kt as v,nn as y,nt as b,ot as x,p as S,qt as C,rn as ee,st as w,tt as T,vn as E,yt as D}from"./client-Bz0sY7Lm.js";import{l as te,n as O,r as k}from"./Follower-BaR8jvSz.js";import{c as A}from"./Card-BGJkYb2B.js";import{i as ne,o as j}from"./es-Qklex053.js";import{t as re}from"./use-merged-state-z45UzW9G.js";import{t as ie}from"./use-compitable-BIRdD7BE.js";import{c as M,o as N}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as P}from"./flatten-WgHPAFED.js";import{t as F}from"./Add-BlaQeLtQ.js";import{$ as ae,B as oe,J as I,Q as L,Z as R,ct as z,l as se,ot as B}from"./index-NE0dsiiJ.js";var V=O(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[O(`&::-webkit-scrollbar`,{width:0,height:0})]),ce=v({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=h(null);function t(e){!(e.currentTarget.offsetWidth=n||t<0||f&&r>=o}function v(){var e=J();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(J())}function S(){var e=J(),t=_(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var ge=`Expected a function`;function _e(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(ge);return t(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Y(e,n,{leading:i,maxWait:n,trailing:a})}var ve=d(`n-tabs`),ye={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},X=v({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:ye,slots:Object,setup(e){let t=o(ve,null);return t||r(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return a(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),Z=v({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},ae(ye,[`displayDirective`])),setup(e){let{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:a,addTabStyleRef:s,tabClassRef:c,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:d,triggerRef:f,handleAdd:p,activateTab:h,handleClose:g}=o(ve);return{trigger:f,mergedClosable:m(()=>{if(e.internalAddable)return!1;let{closable:t}=e;return t===void 0?i.value:t}),style:a,addStyle:s,tabClass:c,addTabClass:l,clsPrefix:t,value:n,type:r,handleClose(t){t.stopPropagation(),!e.disabled&&g(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){p();return}let{name:t}=e,r=++u.id;if(t!==n.value){let{value:i}=d;i?Promise.resolve(i(e.name,n.value)).then(e=>{e&&u.id===r&&h(t)}):h(t)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:o,tab:s,value:c,mergedClosable:l,trigger:u,$slots:{default:d}}=this,f=o??s;return a(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?a(`div`,{class:`${t}-tabs-tab-pad`}):null,a(`div`,Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},i({class:[`${t}-tabs-tab`,c===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,l&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:u===`click`?this.activateTab:void 0,onMouseenter:u===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),a(`span`,{class:`${t}-tabs-tab__label`},e?a(g,null,a(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),a(I,{clsPrefix:t},{default:()=>a(F,null)})):d?d():typeof f==`object`?f:L(f??n)),l&&this.type===`card`?a(oe,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),be=b(`tabs`,` box-sizing: border-box; width: 100%; display: flex; @@ -349,4 +349,4 @@ import{H as e,I as t,J as n,K as r,Lt as i,Mt as a,Pt as o,Rt as s,U as c,Ut as border-top: 1px solid var(--n-tab-border-color); `),b(`tabs-pad`,` border-top: 1px solid var(--n-tab-border-color); - `)])])])]),xe=_e,Se=v({name:`Tabs`,props:Object.assign(Object.assign({},S.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(t,{slots:n}){let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:a}=c(t),o=S(`Tabs`,`-tabs`,be,oe,t,r),u=h(null),d=h(null),f=h(null),p=h(null),g=h(null),_=h(null),v=h(!0),b=h(!0),x=M(t,[`labelSize`,`size`]),T=m(()=>x.value?x.value:a?.value?.Tabs?.size||`medium`),D=M(t,[`activeName`,`value`]),O=h(D.value??t.defaultValue??(n.default?F(n.default())[0]?.props?.name:null)),k=re(D,O),A={id:0},N=m(()=>{if(!(!t.justifyContent||t.type===`card`))return{display:`flex`,justifyContent:t.justifyContent}});y(k,()=>{A.id=0,R(),se()});function I(){let{value:e}=k;return e===null?null:u.value?.querySelector(`[data-name="${e}"]`)}function ie(e){if(t.type===`card`)return;let{value:n}=d;if(!n)return;let i=n.style.opacity===`0`;if(e){let a=`${r.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=t;if(e.dataset.disabled===`true`?n.classList.add(a):n.classList.remove(a),[`top`,`bottom`].includes(s)){if(L([`top`,`maxHeight`,`height`]),typeof o==`number`&&e.offsetWidth>=o){let t=Math.floor((e.offsetWidth-o)/2)+e.offsetLeft;n.style.left=`${t}px`,n.style.maxWidth=`${o}px`}else n.style.left=`${e.offsetLeft}px`,n.style.maxWidth=`${e.offsetWidth}px`;n.style.width=`8192px`,i&&(n.style.transition=`none`),n.offsetWidth,i&&(n.style.transition=``,n.style.opacity=`1`)}else{if(L([`left`,`maxWidth`,`width`]),typeof o==`number`&&e.offsetHeight>=o){let t=Math.floor((e.offsetHeight-o)/2)+e.offsetTop;n.style.top=`${t}px`,n.style.maxHeight=`${o}px`}else n.style.top=`${e.offsetTop}px`,n.style.maxHeight=`${e.offsetHeight}px`;n.style.height=`8192px`,i&&(n.style.transition=`none`),n.offsetHeight,i&&(n.style.transition=``,n.style.opacity=`1`)}}}function ae(){if(t.type===`card`)return;let{value:e}=d;e&&(e.style.opacity=`0`)}function L(e){let{value:t}=d;if(t)for(let n of e)t.style[n]=``}function R(){if(t.type===`card`)return;let e=I();e?ie(e):ae()}function se(){let e=g.value?.$el;if(!e)return;let t=I();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let z=h(null),B=0,V=null;function ce(e){let t=z.value;if(t){B=e.getBoundingClientRect().height;let n=`${B}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};V?(r(),V(),V=null):V=r}}function le(e){let t=z.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(B,n)}px`};V?(V(),V=null,r()):V=r}}function ue(){let e=z.value;if(e){e.style.maxHeight=``,e.style.height=``;let{paneWrapperStyle:n}=t;if(typeof n==`string`)e.style.cssText=n;else if(n){let{maxHeight:t,height:r}=n;t!==void 0&&(e.style.maxHeight=t),r!==void 0&&(e.style.height=r)}}}let H={value:[]},U=h(`next`);function W(e){let t=k.value,n=`next`;for(let r of H.value){if(r===t)break;if(r===e){n=`prev`;break}}U.value=n,de(e)}function de(e){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=t;n&&P(n,e),r&&P(r,e),i&&P(i,e),O.value=e}function fe(e){let{onClose:n}=t;n&&P(n,e)}let G=!0;function K(){let{value:e}=d;if(!e)return;G||=!1;let t=`transition-disabled`;e.classList.add(t),R(),e.classList.remove(t)}let q=h(null);function J({transitionDisabled:e}){let t=u.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=I();n&&q.value&&(q.value.style.width=`${n.offsetWidth}px`,q.value.style.height=`${n.offsetHeight}px`,q.value.style.transform=`translateX(${n.offsetLeft-ne(getComputedStyle(t).paddingLeft)}px)`,e&&q.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}y([k],()=>{t.type===`segment`&&s(()=>{J({transitionDisabled:!1})})}),l(()=>{t.type===`segment`&&J({transitionDisabled:!0})});let pe=0;function me(e){if(e.contentRect.width===0&&e.contentRect.height===0||pe===e.contentRect.width)return;pe=e.contentRect.width;let{type:n}=t;if((n===`line`||n===`bar`)&&(G||t.justifyContent?.startsWith(`space`))&&K(),n!==`segment`){let{placement:e}=t;X((e===`top`||e===`bottom`?g.value?.$el:_.value)||null)}}let he=xe(me,64);y([()=>t.justifyContent,()=>t.size],()=>{s(()=>{let{type:e}=t;(e===`line`||e===`bar`)&&K()})});let Y=h(!1);function ge(e){let{target:n,contentRect:{width:r,height:i}}=e,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=t;if(!Y.value)s===`top`||s===`bottom`?ae.$el.offsetWidth&&(Y.value=!1):o-i>e.$el.offsetHeight&&(Y.value=!1)}X(g.value?.$el||null)}let _e=xe(ge,64);function ye(){let{onAdd:e}=t;e&&e(),s(()=>{let e=I(),{value:t}=g;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function X(e){if(!e)return;let{placement:n}=t;if(n===`top`||n===`bottom`){let{scrollLeft:t,scrollWidth:n,offsetWidth:r}=e;v.value=t<=0,b.value=t+r>=n}else{let{scrollTop:t,scrollHeight:n,offsetHeight:r}=e;v.value=t<=0,b.value=t+r>=n}}let Z=xe(e=>{X(e.target)},64);C(ve,{triggerRef:E(t,`trigger`),tabStyleRef:E(t,`tabStyle`),tabClassRef:E(t,`tabClass`),addTabStyleRef:E(t,`addTabStyle`),addTabClassRef:E(t,`addTabClass`),paneClassRef:E(t,`paneClass`),paneStyleRef:E(t,`paneStyle`),mergedClsPrefixRef:r,typeRef:E(t,`type`),closableRef:E(t,`closable`),valueRef:k,tabChangeIdRef:A,onBeforeLeaveRef:E(t,`onBeforeLeave`),activateTab:W,handleClose:fe,handleAdd:ye}),te(()=>{R(),se()}),ee(()=>{let{value:e}=f;if(!e)return;let{value:t}=r,n=`${t}-tabs-nav-scroll-wrapper--shadow-start`,i=`${t}-tabs-nav-scroll-wrapper--shadow-end`;v.value?e.classList.remove(n):e.classList.add(n),b.value?e.classList.remove(i):e.classList.add(i)});let Se={syncBarPosition:()=>{R()}},Ce=()=>{J({transitionDisabled:!0})},Q=m(()=>{let{value:e}=T,{type:n}=t,r=`${e}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:a,closeIconColorHover:s,closeIconColorPressed:c,tabColor:l,tabBorderColor:u,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:_,closeSize:v,closeIconSize:y,closeColorHover:b,closeColorPressed:x,closeBorderRadius:S,[w(`panePadding`,e)]:C,[w(`tabPadding`,r)]:ee,[w(`tabPaddingVertical`,r)]:E,[w(`tabGap`,r)]:D,[w(`tabGap`,`${r}Vertical`)]:te,[w(`tabTextColor`,n)]:O,[w(`tabTextColorActive`,n)]:k,[w(`tabTextColorHover`,n)]:A,[w(`tabTextColorDisabled`,n)]:ne,[w(`tabFontSize`,e)]:re},common:{cubicBezierEaseInOut:M}}=o.value;return{"--n-bezier":M,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":re,"--n-tab-text-color":O,"--n-tab-text-color-active":k,"--n-tab-text-color-disabled":ne,"--n-tab-text-color-hover":A,"--n-pane-text-color":d,"--n-tab-border-color":u,"--n-tab-border-radius":p,"--n-close-size":v,"--n-close-icon-size":y,"--n-close-color-hover":b,"--n-close-color-pressed":x,"--n-close-border-radius":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":s,"--n-close-icon-color-pressed":c,"--n-tab-color":l,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":ee,"--n-tab-padding-vertical":E,"--n-tab-gap":D,"--n-tab-gap-vertical":te,"--n-pane-padding-left":j(C,`left`),"--n-pane-padding-right":j(C,`right`),"--n-pane-padding-top":j(C,`top`),"--n-pane-padding-bottom":j(C,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":_}}),$=i?e(`tabs`,m(()=>`${T.value[0]}${t.type[0]}`),Q,t):void 0;return Object.assign({mergedClsPrefix:r,mergedValue:k,renderedNames:new Set,segmentCapsuleElRef:q,tabsPaneWrapperRef:z,tabsElRef:u,barElRef:d,addTabInstRef:p,xScrollInstRef:g,scrollWrapperElRef:f,addTabFixed:Y,tabWrapperStyle:N,handleNavResize:he,mergedSize:T,handleScroll:Z,handleTabsResize:_e,cssVars:i?void 0:Q,themeClass:$?.themeClass,animationDirection:U,renderNameListRef:H,yScrollElRef:_,handleSegmentResize:Ce,onAnimationBeforeLeave:ce,onAnimationEnter:le,onAnimationAfterEnter:ue,onRender:$?.onRender},Se)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:s,onRender:c,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:d,prefix:f,suffix:p}}=this;c?.();let m=d?F(d()).filter(e=>e.type.__TAB_PANE__===!0):[],h=d?F(d()).filter(e=>e.type.__TAB__===!0):[],g=!h.length,_=t===`card`,v=t===`segment`,y=!_&&!v&&this.justifyContent;s.value=[];let b=()=>{let t=a(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},y?null:a(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?m.map((e,t)=>(s.value.push(e.props.name),we(a(Z,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!y||y===`center`||y===`start`||y===`end`)}),e.children?{default:e.children.tab}:void 0)))):h.map((e,t)=>(s.value.push(e.props.name),we(t!==0&&!y?$(e):e))),!r&&i&&_?Q(i,(g?m.length:h.length)!==0):null,y?null:a(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return a(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},_&&i?a(A,{onResize:this.handleTabsResize},{default:()=>t}):t,_?a(`div`,{class:`${e}-tabs-pad`}):null,_?null:a(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},x=v?`top`:n;return a(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,y&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},a(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},N(f,t=>t&&a(`div`,{class:`${e}-tabs-nav__prefix`},t)),v?a(A,{onResize:this.handleSegmentResize},{default:()=>a(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},a(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},a(`div`,{class:`${e}-tabs-wrapper`},a(`div`,{class:`${e}-tabs-tab`}))),g?m.map((e,t)=>(s.value.push(e.props.name),a(Z,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):h.map((e,t)=>(s.value.push(e.props.name),t===0?e:$(e))))}):a(A,{onResize:this.handleNavResize},{default:()=>a(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(x)?a(ce,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:b}):a(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},b()))}),r&&i&&_?Q(i,!0):null,N(p,t=>t&&a(`div`,{class:`${e}-tabs-nav__suffix`},t))),g&&(this.animated&&(x===`top`||x===`bottom`)?a(`div`,{ref:`tabsPaneWrapperRef`,style:u,class:[`${e}-tabs-pane-wrapper`,l]},Ce(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Ce(m,this.mergedValue,this.renderedNames)))}});function Ce(e,t,n,r,i,o,s){let c=[];return e.forEach(e=>{let{name:r,displayDirective:i,"display-directive":a}=e.props,o=e=>i===e||a===e,s=t===r;if(e.key!==void 0&&(e.key=r),s||o(`show`)||o(`show:lazy`)&&n.has(r)){n.has(r)||n.add(r);let t=!o(`if`);c.push(t?f(e,[[z,s]]):e)}}),s?a(R,{name:`${s}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>c}):c}function Q(e,t){return a(Z,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function $(e){let t=D(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function we(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}export{X as n,Se as t}; \ No newline at end of file + `)])])])]),xe=_e,Se=v({name:`Tabs`,props:Object.assign(Object.assign({},S.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(t,{slots:n}){let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:a}=c(t),o=S(`Tabs`,`-tabs`,be,se,t,r),u=h(null),d=h(null),f=h(null),p=h(null),g=h(null),_=h(null),v=h(!0),b=h(!0),x=ie(t,[`labelSize`,`size`]),T=m(()=>x.value?x.value:a?.value?.Tabs?.size||`medium`),D=ie(t,[`activeName`,`value`]),O=h(D.value??t.defaultValue??(n.default?P(n.default())[0]?.props?.name:null)),k=re(D,O),A={id:0},N=m(()=>{if(!(!t.justifyContent||t.type===`card`))return{display:`flex`,justifyContent:t.justifyContent}});y(k,()=>{A.id=0,L(),R()});function F(){let{value:e}=k;return e===null?null:u.value?.querySelector(`[data-name="${e}"]`)}function ae(e){if(t.type===`card`)return;let{value:n}=d;if(!n)return;let i=n.style.opacity===`0`;if(e){let a=`${r.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=t;if(e.dataset.disabled===`true`?n.classList.add(a):n.classList.remove(a),[`top`,`bottom`].includes(s)){if(I([`top`,`maxHeight`,`height`]),typeof o==`number`&&e.offsetWidth>=o){let t=Math.floor((e.offsetWidth-o)/2)+e.offsetLeft;n.style.left=`${t}px`,n.style.maxWidth=`${o}px`}else n.style.left=`${e.offsetLeft}px`,n.style.maxWidth=`${e.offsetWidth}px`;n.style.width=`8192px`,i&&(n.style.transition=`none`),n.offsetWidth,i&&(n.style.transition=``,n.style.opacity=`1`)}else{if(I([`left`,`maxWidth`,`width`]),typeof o==`number`&&e.offsetHeight>=o){let t=Math.floor((e.offsetHeight-o)/2)+e.offsetTop;n.style.top=`${t}px`,n.style.maxHeight=`${o}px`}else n.style.top=`${e.offsetTop}px`,n.style.maxHeight=`${e.offsetHeight}px`;n.style.height=`8192px`,i&&(n.style.transition=`none`),n.offsetHeight,i&&(n.style.transition=``,n.style.opacity=`1`)}}}function oe(){if(t.type===`card`)return;let{value:e}=d;e&&(e.style.opacity=`0`)}function I(e){let{value:t}=d;if(t)for(let n of e)t.style[n]=``}function L(){if(t.type===`card`)return;let e=F();e?ae(e):oe()}function R(){let e=g.value?.$el;if(!e)return;let t=F();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let z=h(null),B=0,V=null;function ce(e){let t=z.value;if(t){B=e.getBoundingClientRect().height;let n=`${B}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};V?(r(),V(),V=null):V=r}}function le(e){let t=z.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(B,n)}px`};V?(V(),V=null,r()):V=r}}function ue(){let e=z.value;if(e){e.style.maxHeight=``,e.style.height=``;let{paneWrapperStyle:n}=t;if(typeof n==`string`)e.style.cssText=n;else if(n){let{maxHeight:t,height:r}=n;t!==void 0&&(e.style.maxHeight=t),r!==void 0&&(e.style.height=r)}}}let H={value:[]},U=h(`next`);function W(e){let t=k.value,n=`next`;for(let r of H.value){if(r===t)break;if(r===e){n=`prev`;break}}U.value=n,de(e)}function de(e){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=t;n&&M(n,e),r&&M(r,e),i&&M(i,e),O.value=e}function fe(e){let{onClose:n}=t;n&&M(n,e)}let G=!0;function K(){let{value:e}=d;if(!e)return;G||=!1;let t=`transition-disabled`;e.classList.add(t),L(),e.classList.remove(t)}let q=h(null);function J({transitionDisabled:e}){let t=u.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=F();n&&q.value&&(q.value.style.width=`${n.offsetWidth}px`,q.value.style.height=`${n.offsetHeight}px`,q.value.style.transform=`translateX(${n.offsetLeft-ne(getComputedStyle(t).paddingLeft)}px)`,e&&q.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}y([k],()=>{t.type===`segment`&&s(()=>{J({transitionDisabled:!1})})}),l(()=>{t.type===`segment`&&J({transitionDisabled:!0})});let pe=0;function me(e){if(e.contentRect.width===0&&e.contentRect.height===0||pe===e.contentRect.width)return;pe=e.contentRect.width;let{type:n}=t;if((n===`line`||n===`bar`)&&(G||t.justifyContent?.startsWith(`space`))&&K(),n!==`segment`){let{placement:e}=t;X((e===`top`||e===`bottom`?g.value?.$el:_.value)||null)}}let he=xe(me,64);y([()=>t.justifyContent,()=>t.size],()=>{s(()=>{let{type:e}=t;(e===`line`||e===`bar`)&&K()})});let Y=h(!1);function ge(e){let{target:n,contentRect:{width:r,height:i}}=e,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=t;if(!Y.value)s===`top`||s===`bottom`?ae.$el.offsetWidth&&(Y.value=!1):o-i>e.$el.offsetHeight&&(Y.value=!1)}X(g.value?.$el||null)}let _e=xe(ge,64);function ye(){let{onAdd:e}=t;e&&e(),s(()=>{let e=F(),{value:t}=g;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function X(e){if(!e)return;let{placement:n}=t;if(n===`top`||n===`bottom`){let{scrollLeft:t,scrollWidth:n,offsetWidth:r}=e;v.value=t<=0,b.value=t+r>=n}else{let{scrollTop:t,scrollHeight:n,offsetHeight:r}=e;v.value=t<=0,b.value=t+r>=n}}let Z=xe(e=>{X(e.target)},64);C(ve,{triggerRef:E(t,`trigger`),tabStyleRef:E(t,`tabStyle`),tabClassRef:E(t,`tabClass`),addTabStyleRef:E(t,`addTabStyle`),addTabClassRef:E(t,`addTabClass`),paneClassRef:E(t,`paneClass`),paneStyleRef:E(t,`paneStyle`),mergedClsPrefixRef:r,typeRef:E(t,`type`),closableRef:E(t,`closable`),valueRef:k,tabChangeIdRef:A,onBeforeLeaveRef:E(t,`onBeforeLeave`),activateTab:W,handleClose:fe,handleAdd:ye}),te(()=>{L(),R()}),ee(()=>{let{value:e}=f;if(!e)return;let{value:t}=r,n=`${t}-tabs-nav-scroll-wrapper--shadow-start`,i=`${t}-tabs-nav-scroll-wrapper--shadow-end`;v.value?e.classList.remove(n):e.classList.add(n),b.value?e.classList.remove(i):e.classList.add(i)});let Se={syncBarPosition:()=>{L()}},Ce=()=>{J({transitionDisabled:!0})},Q=m(()=>{let{value:e}=T,{type:n}=t,r=`${e}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:a,closeIconColorHover:s,closeIconColorPressed:c,tabColor:l,tabBorderColor:u,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:_,closeSize:v,closeIconSize:y,closeColorHover:b,closeColorPressed:x,closeBorderRadius:S,[w(`panePadding`,e)]:C,[w(`tabPadding`,r)]:ee,[w(`tabPaddingVertical`,r)]:E,[w(`tabGap`,r)]:D,[w(`tabGap`,`${r}Vertical`)]:te,[w(`tabTextColor`,n)]:O,[w(`tabTextColorActive`,n)]:k,[w(`tabTextColorHover`,n)]:A,[w(`tabTextColorDisabled`,n)]:ne,[w(`tabFontSize`,e)]:re},common:{cubicBezierEaseInOut:ie}}=o.value;return{"--n-bezier":ie,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":re,"--n-tab-text-color":O,"--n-tab-text-color-active":k,"--n-tab-text-color-disabled":ne,"--n-tab-text-color-hover":A,"--n-pane-text-color":d,"--n-tab-border-color":u,"--n-tab-border-radius":p,"--n-close-size":v,"--n-close-icon-size":y,"--n-close-color-hover":b,"--n-close-color-pressed":x,"--n-close-border-radius":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":s,"--n-close-icon-color-pressed":c,"--n-tab-color":l,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":ee,"--n-tab-padding-vertical":E,"--n-tab-gap":D,"--n-tab-gap-vertical":te,"--n-pane-padding-left":j(C,`left`),"--n-pane-padding-right":j(C,`right`),"--n-pane-padding-top":j(C,`top`),"--n-pane-padding-bottom":j(C,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":_}}),$=i?e(`tabs`,m(()=>`${T.value[0]}${t.type[0]}`),Q,t):void 0;return Object.assign({mergedClsPrefix:r,mergedValue:k,renderedNames:new Set,segmentCapsuleElRef:q,tabsPaneWrapperRef:z,tabsElRef:u,barElRef:d,addTabInstRef:p,xScrollInstRef:g,scrollWrapperElRef:f,addTabFixed:Y,tabWrapperStyle:N,handleNavResize:he,mergedSize:T,handleScroll:Z,handleTabsResize:_e,cssVars:i?void 0:Q,themeClass:$?.themeClass,animationDirection:U,renderNameListRef:H,yScrollElRef:_,handleSegmentResize:Ce,onAnimationBeforeLeave:ce,onAnimationEnter:le,onAnimationAfterEnter:ue,onRender:$?.onRender},Se)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:s,onRender:c,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:d,prefix:f,suffix:p}}=this;c?.();let m=d?P(d()).filter(e=>e.type.__TAB_PANE__===!0):[],h=d?P(d()).filter(e=>e.type.__TAB__===!0):[],g=!h.length,_=t===`card`,v=t===`segment`,y=!_&&!v&&this.justifyContent;s.value=[];let b=()=>{let t=a(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},y?null:a(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?m.map((e,t)=>(s.value.push(e.props.name),we(a(Z,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!y||y===`center`||y===`start`||y===`end`)}),e.children?{default:e.children.tab}:void 0)))):h.map((e,t)=>(s.value.push(e.props.name),we(t!==0&&!y?$(e):e))),!r&&i&&_?Q(i,(g?m.length:h.length)!==0):null,y?null:a(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return a(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},_&&i?a(A,{onResize:this.handleTabsResize},{default:()=>t}):t,_?a(`div`,{class:`${e}-tabs-pad`}):null,_?null:a(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},x=v?`top`:n;return a(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,y&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},a(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},N(f,t=>t&&a(`div`,{class:`${e}-tabs-nav__prefix`},t)),v?a(A,{onResize:this.handleSegmentResize},{default:()=>a(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},a(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},a(`div`,{class:`${e}-tabs-wrapper`},a(`div`,{class:`${e}-tabs-tab`}))),g?m.map((e,t)=>(s.value.push(e.props.name),a(Z,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):h.map((e,t)=>(s.value.push(e.props.name),t===0?e:$(e))))}):a(A,{onResize:this.handleNavResize},{default:()=>a(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(x)?a(ce,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:b}):a(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},b()))}),r&&i&&_?Q(i,!0):null,N(p,t=>t&&a(`div`,{class:`${e}-tabs-nav__suffix`},t))),g&&(this.animated&&(x===`top`||x===`bottom`)?a(`div`,{ref:`tabsPaneWrapperRef`,style:u,class:[`${e}-tabs-pane-wrapper`,l]},Ce(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Ce(m,this.mergedValue,this.renderedNames)))}});function Ce(e,t,n,r,i,o,s){let c=[];return e.forEach(e=>{let{name:r,displayDirective:i,"display-directive":a}=e.props,o=e=>i===e||a===e,s=t===r;if(e.key!==void 0&&(e.key=r),s||o(`show`)||o(`show:lazy`)&&n.has(r)){n.has(r)||n.add(r);let t=!o(`if`);c.push(t?f(e,[[z,s]]):e)}}),s?a(B,{name:`${s}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>c}):c}function Q(e,t){return a(Z,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function $(e){let t=D(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function we(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}export{X as n,Se as t}; \ No newline at end of file diff --git a/frontend/dist/assets/TasksView-DPRj8gyZ.js b/frontend/dist/assets/TasksView-DoWYZ1G8.js similarity index 97% rename from frontend/dist/assets/TasksView-DPRj8gyZ.js rename to frontend/dist/assets/TasksView-DoWYZ1G8.js index 0a2c5e3..d61d7fe 100644 --- a/frontend/dist/assets/TasksView-DPRj8gyZ.js +++ b/frontend/dist/assets/TasksView-DoWYZ1G8.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,Ut as s,bn as c,bt as l,hn as u,ht as d,in as f,kt as p,pn as ee,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{o as te}from"./utils-Bog0tJH6.js";import{t as g}from"./Card-D1LVu21r.js";import{n as ne,r as _}from"./es-BhJOHfSF.js";import{c as v,l as y,o as b,s as x}from"./Suffix-JLavbuLO.js";import{t as S}from"./Modal-Bsm1tUwA.js";import{n as C,t as re}from"./DatePicker-BpsGcifz.js";import{t as w}from"./FormItem-CLDJT3hM.js";import{t as T}from"./Button-lcMg8vK2.js";import{t as E}from"./Select-DCgo5W2R.js";import{t as D}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as O}from"./Input-DeqNzuJd.js";import{t as k}from"./Alert-CUBw4GSK.js";import{t as A}from"./Flex-BUYalFhW.js";import{t as j}from"./Spin-g9SI3Frb.js";import{i as ie,lt as M,w as ae}from"./index-6B3OmSLg.js";import{t as oe}from"./HeaderMenu-BhocR0ua.js";var se={name:`ru-RU`,global:{undo:`Отменить`,redo:`Вернуть`,confirm:`Подтвердить`,clear:`Очистить`},Popconfirm:{positiveText:`Подтвердить`,negativeText:`Отмена`},Cascader:{placeholder:`Выбрать`,loading:`Загрузка`,loadingRequiredMessage:e=>`Загрузите все дочерние узлы ${e} прежде чем они станут необязательными`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Очистить`,now:`Сейчас`,confirm:`Подтвердить`,selectTime:`Выбрать время`,selectDate:`Выбрать дату`,datePlaceholder:`Выбрать дату`,datetimePlaceholder:`Выбрать дату и время`,monthPlaceholder:`Выберите месяц`,yearPlaceholder:`Выберите год`,quarterPlaceholder:`Выберите квартал`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Дата начала`,endDatePlaceholder:`Дата окончания`,startDatetimePlaceholder:`Дата и время начала`,endDatetimePlaceholder:`Дата и время окончания`,startMonthPlaceholder:`Начало месяца`,endMonthPlaceholder:`Конец месяца`,monthBeforeYear:!0,firstDayOfWeek:0,today:`Сегодня`},DataTable:{checkTableAll:`Выбрать все в таблице`,uncheckTableAll:`Отменить все в таблице`,confirm:`Подтвердить`,clear:`Очистить`},LegacyTransfer:{sourceTitle:`Источник`,targetTitle:`Назначение`},Transfer:{selectAll:`Выбрать все`,unselectAll:`Снять все`,clearAll:`Очистить`,total:e=>`Всего ${e} элементов`,selected:e=>`${e} выбрано элементов`},Empty:{description:`Нет данных`},Select:{placeholder:`Выбрать`},TimePicker:{placeholder:`Выбрать время`,positiveText:`OK`,negativeText:`Отменить`,now:`Сейчас`,clear:`Очистить`},Pagination:{goto:`Перейти`,selectionSuffix:`страница`},DynamicTags:{add:`Добавить`},Log:{loading:`Загрузка`},Input:{placeholder:`Ввести`},InputNumber:{placeholder:`Ввести`},DynamicInput:{create:`Создать`},ThemeEditor:{title:`Редактор темы`,clearAllVars:`Очистить все`,clearSearch:`Очистить поиск`,filterCompName:`Фильтровать по имени компонента`,filterVarName:`Фильтровать имена переменных`,import:`Импорт`,export:`Экспорт`,restore:`Сбросить`},Image:{tipPrevious:`Предыдущее изображение (←)`,tipNext:`Следующее изображение (→)`,tipCounterclockwise:`Против часовой стрелки`,tipClockwise:`По часовой стрелке`,tipZoomOut:`Отдалить`,tipZoomIn:`Приблизить`,tipDownload:`Скачать`,tipClose:`Закрыть (Esc)`,tipOriginalSize:`Вернуть исходный размер`},Heatmap:{less:`меньше`,more:`больше`,monthFormat:`MMM`,weekdayFormat:`eeeeee`}};function N(e,t){if(e.one!==void 0&&t===1)return e.one;let n=t%10,r=t%100;return n===1&&r!==11?e.singularNominative.replace(`{{count}}`,String(t)):n>=2&&n<=4&&(r<10||r>20)?e.singularGenitive.replace(`{{count}}`,String(t)):e.pluralGenitive.replace(`{{count}}`,String(t))}function P(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?N(e.future,t):`через `+N(e.regular,t):e.past?N(e.past,t):N(e.regular,t)+` назад`:N(e.regular,t)}var F={lessThanXSeconds:P({regular:{one:`меньше секунды`,singularNominative:`меньше {{count}} секунды`,singularGenitive:`меньше {{count}} секунд`,pluralGenitive:`меньше {{count}} секунд`},future:{one:`меньше, чем через секунду`,singularNominative:`меньше, чем через {{count}} секунду`,singularGenitive:`меньше, чем через {{count}} секунды`,pluralGenitive:`меньше, чем через {{count}} секунд`}}),xSeconds:P({regular:{singularNominative:`{{count}} секунда`,singularGenitive:`{{count}} секунды`,pluralGenitive:`{{count}} секунд`},past:{singularNominative:`{{count}} секунду назад`,singularGenitive:`{{count}} секунды назад`,pluralGenitive:`{{count}} секунд назад`},future:{singularNominative:`через {{count}} секунду`,singularGenitive:`через {{count}} секунды`,pluralGenitive:`через {{count}} секунд`}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?`через полминуты`:`полминуты назад`:`полминуты`,lessThanXMinutes:P({regular:{one:`меньше минуты`,singularNominative:`меньше {{count}} минуты`,singularGenitive:`меньше {{count}} минут`,pluralGenitive:`меньше {{count}} минут`},future:{one:`меньше, чем через минуту`,singularNominative:`меньше, чем через {{count}} минуту`,singularGenitive:`меньше, чем через {{count}} минуты`,pluralGenitive:`меньше, чем через {{count}} минут`}}),xMinutes:P({regular:{singularNominative:`{{count}} минута`,singularGenitive:`{{count}} минуты`,pluralGenitive:`{{count}} минут`},past:{singularNominative:`{{count}} минуту назад`,singularGenitive:`{{count}} минуты назад`,pluralGenitive:`{{count}} минут назад`},future:{singularNominative:`через {{count}} минуту`,singularGenitive:`через {{count}} минуты`,pluralGenitive:`через {{count}} минут`}}),aboutXHours:P({regular:{singularNominative:`около {{count}} часа`,singularGenitive:`около {{count}} часов`,pluralGenitive:`около {{count}} часов`},future:{singularNominative:`приблизительно через {{count}} час`,singularGenitive:`приблизительно через {{count}} часа`,pluralGenitive:`приблизительно через {{count}} часов`}}),xHours:P({regular:{singularNominative:`{{count}} час`,singularGenitive:`{{count}} часа`,pluralGenitive:`{{count}} часов`}}),xDays:P({regular:{singularNominative:`{{count}} день`,singularGenitive:`{{count}} дня`,pluralGenitive:`{{count}} дней`}}),aboutXWeeks:P({regular:{singularNominative:`около {{count}} недели`,singularGenitive:`около {{count}} недель`,pluralGenitive:`около {{count}} недель`},future:{singularNominative:`приблизительно через {{count}} неделю`,singularGenitive:`приблизительно через {{count}} недели`,pluralGenitive:`приблизительно через {{count}} недель`}}),xWeeks:P({regular:{singularNominative:`{{count}} неделя`,singularGenitive:`{{count}} недели`,pluralGenitive:`{{count}} недель`}}),aboutXMonths:P({regular:{singularNominative:`около {{count}} месяца`,singularGenitive:`около {{count}} месяцев`,pluralGenitive:`около {{count}} месяцев`},future:{singularNominative:`приблизительно через {{count}} месяц`,singularGenitive:`приблизительно через {{count}} месяца`,pluralGenitive:`приблизительно через {{count}} месяцев`}}),xMonths:P({regular:{singularNominative:`{{count}} месяц`,singularGenitive:`{{count}} месяца`,pluralGenitive:`{{count}} месяцев`}}),aboutXYears:P({regular:{singularNominative:`около {{count}} года`,singularGenitive:`около {{count}} лет`,pluralGenitive:`около {{count}} лет`},future:{singularNominative:`приблизительно через {{count}} год`,singularGenitive:`приблизительно через {{count}} года`,pluralGenitive:`приблизительно через {{count}} лет`}}),xYears:P({regular:{singularNominative:`{{count}} год`,singularGenitive:`{{count}} года`,pluralGenitive:`{{count}} лет`}}),overXYears:P({regular:{singularNominative:`больше {{count}} года`,singularGenitive:`больше {{count}} лет`,pluralGenitive:`больше {{count}} лет`},future:{singularNominative:`больше, чем через {{count}} год`,singularGenitive:`больше, чем через {{count}} года`,pluralGenitive:`больше, чем через {{count}} лет`}}),almostXYears:P({regular:{singularNominative:`почти {{count}} год`,singularGenitive:`почти {{count}} года`,pluralGenitive:`почти {{count}} лет`},future:{singularNominative:`почти через {{count}} год`,singularGenitive:`почти через {{count}} года`,pluralGenitive:`почти через {{count}} лет`}})},I=(e,t,n)=>F[e](t,n),L={date:y({formats:{full:`EEEE, d MMMM y 'г.'`,long:`d MMMM y 'г.'`,medium:`d MMM y 'г.'`,short:`dd.MM.y`},defaultWidth:`full`}),time:y({formats:{full:`H:mm:ss zzzz`,long:`H:mm:ss z`,medium:`H:mm:ss`,short:`H:mm`},defaultWidth:`full`}),dateTime:y({formats:{any:`{{date}}, {{time}}`},defaultWidth:`any`})},R=[`воскресенье`,`понедельник`,`вторник`,`среду`,`четверг`,`пятницу`,`субботу`];function z(e){let t=R[e];switch(e){case 0:return`'в прошлое `+t+` в' p`;case 1:case 2:case 4:return`'в прошлый `+t+` в' p`;case 3:case 5:case 6:return`'в прошлую `+t+` в' p`}}function B(e){let t=R[e];return e===2?`'во `+t+` в' p`:`'в `+t+` в' p`}function V(e){let t=R[e];switch(e){case 0:return`'в следующее `+t+` в' p`;case 1:case 2:case 4:return`'в следующий `+t+` в' p`;case 3:case 5:case 6:return`'в следующую `+t+` в' p`}}var H={lastWeek:(e,t,n)=>{let r=e.getDay();return C(e,t,n)?B(r):z(r)},yesterday:`'вчера в' p`,today:`'сегодня в' p`,tomorrow:`'завтра в' p`,nextWeek:(e,t,n)=>{let r=e.getDay();return C(e,t,n)?B(r):V(r)},other:`P`},ce={name:`ru-RU`,locale:{code:`ru`,formatDistance:I,formatLong:L,formatRelative:(e,t,n,r)=>{let i=H[e];return typeof i==`function`?i(t,n,r):i},localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=t?.unit,i;return i=r===`date`?`-е`:r===`week`||r===`minute`||r===`second`?`-я`:`-й`,n+i},era:v({values:{narrow:[`до н.э.`,`н.э.`],abbreviated:[`до н. э.`,`н. э.`],wide:[`до нашей эры`,`нашей эры`]},defaultWidth:`wide`}),quarter:v({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`1-й кв.`,`2-й кв.`,`3-й кв.`,`4-й кв.`],wide:[`1-й квартал`,`2-й квартал`,`3-й квартал`,`4-й квартал`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:v({values:{narrow:[`Я`,`Ф`,`М`,`А`,`М`,`И`,`И`,`А`,`С`,`О`,`Н`,`Д`],abbreviated:[`янв.`,`фев.`,`март`,`апр.`,`май`,`июнь`,`июль`,`авг.`,`сент.`,`окт.`,`нояб.`,`дек.`],wide:[`январь`,`февраль`,`март`,`апрель`,`май`,`июнь`,`июль`,`август`,`сентябрь`,`октябрь`,`ноябрь`,`декабрь`]},defaultWidth:`wide`,formattingValues:{narrow:[`Я`,`Ф`,`М`,`А`,`М`,`И`,`И`,`А`,`С`,`О`,`Н`,`Д`],abbreviated:[`янв.`,`фев.`,`мар.`,`апр.`,`мая`,`июн.`,`июл.`,`авг.`,`сент.`,`окт.`,`нояб.`,`дек.`],wide:[`января`,`февраля`,`марта`,`апреля`,`мая`,`июня`,`июля`,`августа`,`сентября`,`октября`,`ноября`,`декабря`]},defaultFormattingWidth:`wide`}),day:v({values:{narrow:[`В`,`П`,`В`,`С`,`Ч`,`П`,`С`],short:[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],abbreviated:[`вск`,`пнд`,`втр`,`срд`,`чтв`,`птн`,`суб`],wide:[`воскресенье`,`понедельник`,`вторник`,`среда`,`четверг`,`пятница`,`суббота`]},defaultWidth:`wide`}),dayPeriod:v({values:{narrow:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утро`,afternoon:`день`,evening:`веч.`,night:`ночь`},abbreviated:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утро`,afternoon:`день`,evening:`веч.`,night:`ночь`},wide:{am:`ДП`,pm:`ПП`,midnight:`полночь`,noon:`полдень`,morning:`утро`,afternoon:`день`,evening:`вечер`,night:`ночь`}},defaultWidth:`any`,formattingValues:{narrow:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утра`,afternoon:`дня`,evening:`веч.`,night:`ночи`},abbreviated:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утра`,afternoon:`дня`,evening:`веч.`,night:`ночи`},wide:{am:`ДП`,pm:`ПП`,midnight:`полночь`,noon:`полдень`,morning:`утра`,afternoon:`дня`,evening:`вечера`,night:`ночи`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:b({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:x({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:`any`}),quarter:x({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:x({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:`any`}),day:x({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:`any`}),dayPeriod:x({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:`wide`,parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}}};function le(e,t=new Date){let n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`;return e.status!==`done`&&!!e.dueDate&&e.dueDateC.value.map(e=>({label:e.name||`#${e.ID}`,value:e.ID}))),W=l(()=>[{label:`Все ответственные`,value:`all`},{label:`Без ответственного`,value:0},...U.value,...x.value.filter(e=>e.assigneeID&&!C.value.some(t=>t.ID===e.assigneeID)).filter((e,t,n)=>n.findIndex(t=>t.assigneeID===e.assigneeID)===t).map(e=>({label:e.assigneeName||`#${e.assigneeID}`,value:e.assigneeID}))]),_e=l(()=>{if(!H.assigneeID||U.value.some(e=>e.value===H.assigneeID))return U.value;let e=x.value.find(e=>e.ID===R.value);return[...U.value,{label:`${e?.assigneeName||`#${H.assigneeID}`} (роль отозвана)`,value:H.assigneeID,disabled:!0}]}),ve=l(()=>b.map(e=>({...e,tasks:x.value.filter(t=>t.status===e.value&&(I.value===`all`||(t.assigneeID||0)===I.value))}))),G=l(()=>x.value.find(e=>e.ID===R.value)),K=l(()=>H.title.trim()?[...H.title.trim()].length>255?`Не более 255 символов`:void 0:`Введите название задачи`),q=l(()=>[...H.description].length>1e4?`Не более 10 000 символов`:void 0),J=l(()=>R.value!==void 0&&G.value!==void 0&&G.value.version!==z.value),Y=l(()=>R.value!==void 0&&!G.value);function ye(e){return b.find(t=>t.value===e)?.label||e}function X(e){return e?e.split(`-`).reverse().join(`.`):`Без срока`}async function Z(){if(!(N.value||P.value)){N.value=!0,F.value=``;try{let e=await v.GetPermissions({});if(D.value=e.permissions?.includes(`tasks_page`)||!1,!D.value)return;let[t,n]=await Promise.all([v.GetTasks({}),v.GetTaskAssignees({})]);x.value=t.tasks||[],C.value=n.assignees||[]}catch(e){F.value=e instanceof Error&&e.message===`unauthorized`?`Войдите под учётной записью разработчика или администратора`:e instanceof Error?e.message:`Не удалось загрузить задачи`,y.error(F.value)}finally{N.value=!1}}}function Q(e){P.value||(R.value=e?.ID,z.value=e?.version,Object.assign(H,{title:e?.title||``,description:e?.description||``,status:e?.status||`new`,assigneeID:e?.assigneeID??null,dueDate:e?.dueDate||null}),L.value=!0)}async function $(){if(P.value||N.value||J.value||Y.value)return;let e=H.title.trim();if(!e||[...e].length>255||[...H.description].length>1e4){y.error(`Введите название до 255 символов и описание до 10 000 символов`);return}P.value=!0;try{let t={title:e,description:H.description,status:H.status,assigneeID:H.assigneeID??void 0,dueDate:H.dueDate||``},n=R.value===void 0?await v.CreateTask(t):await v.UpdateTask({...t,ID:R.value,version:z.value});if(n.task){let e=n.task;x.value=R.value===void 0?[e,...x.value]:x.value.map(t=>t.ID===e.ID?e:t)}L.value=!1,y.success(`Задача сохранена`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось сохранить задачу`)}finally{P.value=!1}await Z()}function be(e,t){if(P.value||N.value||!e.dataTransfer){e.preventDefault();return}V.value=t.ID,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t.ID))}async function xe(e){let t=x.value.find(e=>e.ID===V.value);if(V.value=void 0,!(!t||t.status===e||P.value||N.value)){P.value=!0;try{let n=await v.SetTaskStatus({ID:t.ID,status:e,version:t.version});if(n.task){let e=n.task;x.value=x.value.map(n=>n.ID===t.ID?e:n)}y.success(`Статус изменён`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось изменить статус`)}finally{P.value=!1}await Z()}}async function Se(){if(!(!B.value||P.value||N.value)){P.value=!0;try{await v.DeleteTask({ID:B.value.ID,version:B.value.version}),x.value=x.value.filter(e=>e.ID!==B.value?.ID),B.value=null,L.value=!1,y.success(`Задача удалена`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось удалить задачу`),B.value=null}finally{P.value=!1}await Z()}}function Ce(){z.value=G.value?.version}return s(()=>{N.value=!1,Z()}),(s,l)=>(r(),o(c(ae),{locale:c(se),"date-locale":c(ce)},{default:f(()=>[h(`div`,ue,[h(`div`,de,[i(c(A),{class:`toolbar`,justify:`space-between`,align:`center`},{default:f(()=>[l[16]||=h(`h1`,null,`Задачи`,-1),i(c(A),null,{default:f(()=>[i(c(T),{loading:N.value,disabled:P.value,onClick:Z},{default:f(()=>[...l[14]||=[t(`Обновить`,-1)]]),_:1},8,[`loading`,`disabled`]),D.value?(r(),o(c(T),{key:0,type:`primary`,disabled:P.value||N.value,onClick:l[0]||=e=>Q()},{default:f(()=>[...l[15]||=[t(` Создать задачу `,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})]),_:1}),F.value?(r(),o(c(k),{key:0,type:`error`,class:`notice`},{default:f(()=>[t(a(F.value),1)]),_:1})):e(``,!0),N.value&&!D.value?(r(),o(c(j),{key:1,class:`initial-loading`})):!D.value&&!F.value?(r(),o(c(k),{key:2,type:`warning`},{default:f(()=>[...l[17]||=[t(` Страница доступна разработчикам и администратору. `,-1)]]),_:1})):e(``,!0),D.value?(r(),m(d,{key:3},[i(c(E),{value:I.value,"onUpdate:value":l[1]||=e=>I.value=e,options:W.value,"aria-label":`Фильтр по ответственному`,class:`assignee-filter`},null,8,[`value`,`options`]),i(c(j),{show:N.value||P.value},{default:f(()=>[h(`div`,fe,[(r(!0),m(d,null,n(ve.value,s=>(r(),m(`section`,{key:s.value,class:`column`,"aria-label":s.label,onDragover:l[3]||=M(()=>{},[`prevent`]),onDrop:M(e=>xe(s.value),[`prevent`])},[i(c(A),{justify:`space-between`,align:`center`,class:`column-heading`},{default:f(()=>[h(`h2`,null,a(s.label),1),i(c(_),{size:`small`},{default:f(()=>[t(a(s.tasks.length),1)]),_:2},1024)]),_:2},1024),s.tasks.length?e(``,!0):(r(),o(c(te),{key:0,description:`Нет задач`,class:`empty-column`})),(r(!0),m(d,null,n(s.tasks,n=>(r(),o(c(g),{key:n.ID,class:`task-card`,size:`small`,draggable:!P.value&&!N.value,onDragstart:e=>be(e,n),onDragend:l[2]||=e=>V.value=void 0},{default:f(()=>[h(`div`,me,`#`+a(n.ID),1),h(`h3`,he,a(n.title),1),h(`p`,null,a(n.assigneeName||`Без ответственного`),1),i(c(A),{align:`center`,class:`task-due`},{default:f(()=>[h(`span`,null,a(X(n.dueDate)),1),c(le)(n)?(r(),o(c(_),{key:0,type:`error`,size:`small`},{default:f(()=>[...l[18]||=[t(`Просрочена`,-1)]]),_:1})):e(``,!0)]),_:2},1024),i(c(T),{size:`small`,disabled:P.value||N.value,onClick:e=>Q(n)},{default:f(()=>[...l[19]||=[t(` Открыть задачу `,-1)]]),_:1},8,[`disabled`,`onClick`])]),_:2},1032,[`draggable`,`onDragstart`]))),128))],40,pe))),128))])]),_:1},8,[`show`])],64)):e(``,!0)])]),i(oe,{active:`tasks`}),i(c(S),{show:L.value,"onUpdate:show":l[11]||=e=>L.value=e,"mask-closable":!P.value,"close-on-esc":!P.value},{default:f(()=>[i(c(g),{class:`task-modal`,title:R.value?`Задача #${R.value}`:`Новая задача`,role:`dialog`,"aria-modal":`true`},{default:f(()=>[Y.value?(r(),o(c(k),{key:0,type:`warning`,class:`notice`},{default:f(()=>[...l[20]||=[t(` Задача удалена другим пользователем. Черновик сохранён в этой форме. `,-1)]]),_:1})):e(``,!0),J.value&&G.value?(r(),o(c(k),{key:1,type:`warning`,class:`notice`},{default:f(()=>[l[22]||=t(` Задача изменена другим пользователем. Ваш черновик сохранён. Актуальные данные: `,-1),h(`p`,null,a(G.value.title)+` — `+a(ye(G.value.status)),1),h(`p`,null,a(G.value.assigneeName||`Без ответственного`)+` · `+a(X(G.value.dueDate)),1),h(`p`,ge,a(G.value.description||`Без описания`),1),i(c(T),{disabled:N.value||P.value,onClick:Ce},{default:f(()=>[...l[21]||=[t(` Продолжить с моим черновиком `,-1)]]),_:1},8,[`disabled`])]),_:1})):e(``,!0),i(c(w),{label:`Название *`,"label-for":`task-title`,feedback:K.value,"validation-status":K.value?`error`:void 0},{default:f(()=>[i(c(O),{"input-props":{id:`task-title`},value:H.title,"onUpdate:value":l[4]||=e=>H.title=e,disabled:P.value,placeholder:`Название задачи`},null,8,[`value`,`disabled`])]),_:1},8,[`feedback`,`validation-status`]),i(c(w),{label:`Описание`,"label-for":`task-description`,feedback:q.value,"validation-status":q.value?`error`:void 0},{default:f(()=>[i(c(O),{"input-props":{id:`task-description`},value:H.description,"onUpdate:value":l[5]||=e=>H.description=e,type:`textarea`,disabled:P.value,placeholder:`Что нужно сделать`,autosize:{minRows:3,maxRows:10}},null,8,[`value`,`disabled`])]),_:1},8,[`feedback`,`validation-status`]),i(c(w),{label:`Статус`,"label-for":`task-status`},{default:f(()=>[i(c(E),{"input-props":{id:`task-status`,"aria-label":`Статус`},filterable:``,value:H.status,"onUpdate:value":l[6]||=e=>H.status=e,options:b,disabled:P.value},null,8,[`value`,`disabled`])]),_:1}),i(c(w),{label:`Ответственный`,"label-for":`task-assignee`},{default:f(()=>[i(c(E),{"input-props":{id:`task-assignee`,"aria-label":`Ответственный`},value:H.assigneeID,"onUpdate:value":l[7]||=e=>H.assigneeID=e,options:_e.value,disabled:P.value,placeholder:`Без ответственного`,clearable:``,filterable:``},null,8,[`value`,`options`,`disabled`])]),_:1}),i(c(w),{label:`Срок выполнения`,"label-for":`task-due-date`},{default:f(()=>[i(c(re),{id:`task-due-date`,"formatted-value":H.dueDate,"onUpdate:formattedValue":l[8]||=e=>H.dueDate=e,type:`date`,placeholder:`Дата завершения`,"value-format":`yyyy-MM-dd`,format:`dd.MM.yyyy`,disabled:P.value,clearable:``,class:`date-picker`},null,8,[`formatted-value`,`disabled`])]),_:1}),i(c(A),{justify:`space-between`},{default:f(()=>[R.value&&G.value?(r(),o(c(T),{key:0,type:`error`,disabled:P.value||N.value,onClick:l[9]||=e=>B.value=G.value},{default:f(()=>[...l[23]||=[t(`Удалить`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(c(A),null,{default:f(()=>[i(c(T),{disabled:P.value,onClick:l[10]||=e=>L.value=!1},{default:f(()=>[...l[24]||=[t(`Закрыть`,-1)]]),_:1},8,[`disabled`]),i(c(T),{type:`primary`,loading:P.value,disabled:N.value||J.value||Y.value||!!K.value||!!q.value,onClick:$},{default:f(()=>[...l[25]||=[t(`Сохранить`,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})]),_:1},8,[`title`])]),_:1},8,[`show`,`mask-closable`,`close-on-esc`]),i(c(S),{show:!!B.value,"mask-closable":!P.value,"close-on-esc":!P.value,"onUpdate:show":l[13]||=e=>!P.value&&(B.value=null)},{default:f(()=>[i(c(g),{class:`task-modal`,title:`Удалить задачу?`,role:`dialog`,"aria-modal":`true`},{default:f(()=>[h(`p`,null,`Удалить «`+a(B.value?.title)+`»? Это действие необратимо.`,1),i(c(A),{justify:`end`,class:`delete-actions`},{default:f(()=>[i(c(T),{disabled:P.value,onClick:l[12]||=e=>B.value=null},{default:f(()=>[...l[26]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(c(T),{type:`error`,loading:P.value,onClick:Se},{default:f(()=>[...l[27]||=[t(`Удалить`,-1)]]),_:1},8,[`loading`])]),_:1})]),_:1})]),_:1},8,[`show`,`mask-closable`,`close-on-esc`])]),_:1},8,[`locale`,`date-locale`]))}}),[[`__scopeId`,`data-v-ff75f974`]]),W=p({__name:`TasksView`,setup(e){return(e,t)=>(r(),o(U))}});export{W as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,Ut as s,bn as c,bt as l,hn as u,ht as d,in as f,kt as p,pn as ee,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{o as te}from"./utils-Dcx6g1AV.js";import{t as g}from"./Card-BGJkYb2B.js";import{n as ne,r as _}from"./es-Qklex053.js";import{c as v,l as y,o as b,s as x}from"./Suffix-BBRLYxYK.js";import{t as S}from"./Modal-xM6cEDIr.js";import{n as C,t as re}from"./DatePicker-DGNqeOvv.js";import{t as w}from"./FormItem-k4AtNXqm.js";import{t as T}from"./Button-MBUKfT_Z.js";import{t as E}from"./Select-CfXdJUVK.js";import{t as D}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as O}from"./Input-CEIE7mTC.js";import{t as k}from"./Alert-BoUmQeXf.js";import{t as A}from"./Flex-Dsa9FxiA.js";import{t as j}from"./Spin-CYkXlOyb.js";import{i as ie,ut as M,w as ae}from"./index-NE0dsiiJ.js";import{t as oe}from"./HeaderMenu-vnmT21Il.js";var se={name:`ru-RU`,global:{undo:`Отменить`,redo:`Вернуть`,confirm:`Подтвердить`,clear:`Очистить`},Popconfirm:{positiveText:`Подтвердить`,negativeText:`Отмена`},Cascader:{placeholder:`Выбрать`,loading:`Загрузка`,loadingRequiredMessage:e=>`Загрузите все дочерние узлы ${e} прежде чем они станут необязательными`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Очистить`,now:`Сейчас`,confirm:`Подтвердить`,selectTime:`Выбрать время`,selectDate:`Выбрать дату`,datePlaceholder:`Выбрать дату`,datetimePlaceholder:`Выбрать дату и время`,monthPlaceholder:`Выберите месяц`,yearPlaceholder:`Выберите год`,quarterPlaceholder:`Выберите квартал`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Дата начала`,endDatePlaceholder:`Дата окончания`,startDatetimePlaceholder:`Дата и время начала`,endDatetimePlaceholder:`Дата и время окончания`,startMonthPlaceholder:`Начало месяца`,endMonthPlaceholder:`Конец месяца`,monthBeforeYear:!0,firstDayOfWeek:0,today:`Сегодня`},DataTable:{checkTableAll:`Выбрать все в таблице`,uncheckTableAll:`Отменить все в таблице`,confirm:`Подтвердить`,clear:`Очистить`},LegacyTransfer:{sourceTitle:`Источник`,targetTitle:`Назначение`},Transfer:{selectAll:`Выбрать все`,unselectAll:`Снять все`,clearAll:`Очистить`,total:e=>`Всего ${e} элементов`,selected:e=>`${e} выбрано элементов`},Empty:{description:`Нет данных`},Select:{placeholder:`Выбрать`},TimePicker:{placeholder:`Выбрать время`,positiveText:`OK`,negativeText:`Отменить`,now:`Сейчас`,clear:`Очистить`},Pagination:{goto:`Перейти`,selectionSuffix:`страница`},DynamicTags:{add:`Добавить`},Log:{loading:`Загрузка`},Input:{placeholder:`Ввести`},InputNumber:{placeholder:`Ввести`},DynamicInput:{create:`Создать`},ThemeEditor:{title:`Редактор темы`,clearAllVars:`Очистить все`,clearSearch:`Очистить поиск`,filterCompName:`Фильтровать по имени компонента`,filterVarName:`Фильтровать имена переменных`,import:`Импорт`,export:`Экспорт`,restore:`Сбросить`},Image:{tipPrevious:`Предыдущее изображение (←)`,tipNext:`Следующее изображение (→)`,tipCounterclockwise:`Против часовой стрелки`,tipClockwise:`По часовой стрелке`,tipZoomOut:`Отдалить`,tipZoomIn:`Приблизить`,tipDownload:`Скачать`,tipClose:`Закрыть (Esc)`,tipOriginalSize:`Вернуть исходный размер`},Heatmap:{less:`меньше`,more:`больше`,monthFormat:`MMM`,weekdayFormat:`eeeeee`}};function N(e,t){if(e.one!==void 0&&t===1)return e.one;let n=t%10,r=t%100;return n===1&&r!==11?e.singularNominative.replace(`{{count}}`,String(t)):n>=2&&n<=4&&(r<10||r>20)?e.singularGenitive.replace(`{{count}}`,String(t)):e.pluralGenitive.replace(`{{count}}`,String(t))}function P(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?N(e.future,t):`через `+N(e.regular,t):e.past?N(e.past,t):N(e.regular,t)+` назад`:N(e.regular,t)}var F={lessThanXSeconds:P({regular:{one:`меньше секунды`,singularNominative:`меньше {{count}} секунды`,singularGenitive:`меньше {{count}} секунд`,pluralGenitive:`меньше {{count}} секунд`},future:{one:`меньше, чем через секунду`,singularNominative:`меньше, чем через {{count}} секунду`,singularGenitive:`меньше, чем через {{count}} секунды`,pluralGenitive:`меньше, чем через {{count}} секунд`}}),xSeconds:P({regular:{singularNominative:`{{count}} секунда`,singularGenitive:`{{count}} секунды`,pluralGenitive:`{{count}} секунд`},past:{singularNominative:`{{count}} секунду назад`,singularGenitive:`{{count}} секунды назад`,pluralGenitive:`{{count}} секунд назад`},future:{singularNominative:`через {{count}} секунду`,singularGenitive:`через {{count}} секунды`,pluralGenitive:`через {{count}} секунд`}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?`через полминуты`:`полминуты назад`:`полминуты`,lessThanXMinutes:P({regular:{one:`меньше минуты`,singularNominative:`меньше {{count}} минуты`,singularGenitive:`меньше {{count}} минут`,pluralGenitive:`меньше {{count}} минут`},future:{one:`меньше, чем через минуту`,singularNominative:`меньше, чем через {{count}} минуту`,singularGenitive:`меньше, чем через {{count}} минуты`,pluralGenitive:`меньше, чем через {{count}} минут`}}),xMinutes:P({regular:{singularNominative:`{{count}} минута`,singularGenitive:`{{count}} минуты`,pluralGenitive:`{{count}} минут`},past:{singularNominative:`{{count}} минуту назад`,singularGenitive:`{{count}} минуты назад`,pluralGenitive:`{{count}} минут назад`},future:{singularNominative:`через {{count}} минуту`,singularGenitive:`через {{count}} минуты`,pluralGenitive:`через {{count}} минут`}}),aboutXHours:P({regular:{singularNominative:`около {{count}} часа`,singularGenitive:`около {{count}} часов`,pluralGenitive:`около {{count}} часов`},future:{singularNominative:`приблизительно через {{count}} час`,singularGenitive:`приблизительно через {{count}} часа`,pluralGenitive:`приблизительно через {{count}} часов`}}),xHours:P({regular:{singularNominative:`{{count}} час`,singularGenitive:`{{count}} часа`,pluralGenitive:`{{count}} часов`}}),xDays:P({regular:{singularNominative:`{{count}} день`,singularGenitive:`{{count}} дня`,pluralGenitive:`{{count}} дней`}}),aboutXWeeks:P({regular:{singularNominative:`около {{count}} недели`,singularGenitive:`около {{count}} недель`,pluralGenitive:`около {{count}} недель`},future:{singularNominative:`приблизительно через {{count}} неделю`,singularGenitive:`приблизительно через {{count}} недели`,pluralGenitive:`приблизительно через {{count}} недель`}}),xWeeks:P({regular:{singularNominative:`{{count}} неделя`,singularGenitive:`{{count}} недели`,pluralGenitive:`{{count}} недель`}}),aboutXMonths:P({regular:{singularNominative:`около {{count}} месяца`,singularGenitive:`около {{count}} месяцев`,pluralGenitive:`около {{count}} месяцев`},future:{singularNominative:`приблизительно через {{count}} месяц`,singularGenitive:`приблизительно через {{count}} месяца`,pluralGenitive:`приблизительно через {{count}} месяцев`}}),xMonths:P({regular:{singularNominative:`{{count}} месяц`,singularGenitive:`{{count}} месяца`,pluralGenitive:`{{count}} месяцев`}}),aboutXYears:P({regular:{singularNominative:`около {{count}} года`,singularGenitive:`около {{count}} лет`,pluralGenitive:`около {{count}} лет`},future:{singularNominative:`приблизительно через {{count}} год`,singularGenitive:`приблизительно через {{count}} года`,pluralGenitive:`приблизительно через {{count}} лет`}}),xYears:P({regular:{singularNominative:`{{count}} год`,singularGenitive:`{{count}} года`,pluralGenitive:`{{count}} лет`}}),overXYears:P({regular:{singularNominative:`больше {{count}} года`,singularGenitive:`больше {{count}} лет`,pluralGenitive:`больше {{count}} лет`},future:{singularNominative:`больше, чем через {{count}} год`,singularGenitive:`больше, чем через {{count}} года`,pluralGenitive:`больше, чем через {{count}} лет`}}),almostXYears:P({regular:{singularNominative:`почти {{count}} год`,singularGenitive:`почти {{count}} года`,pluralGenitive:`почти {{count}} лет`},future:{singularNominative:`почти через {{count}} год`,singularGenitive:`почти через {{count}} года`,pluralGenitive:`почти через {{count}} лет`}})},I=(e,t,n)=>F[e](t,n),L={date:y({formats:{full:`EEEE, d MMMM y 'г.'`,long:`d MMMM y 'г.'`,medium:`d MMM y 'г.'`,short:`dd.MM.y`},defaultWidth:`full`}),time:y({formats:{full:`H:mm:ss zzzz`,long:`H:mm:ss z`,medium:`H:mm:ss`,short:`H:mm`},defaultWidth:`full`}),dateTime:y({formats:{any:`{{date}}, {{time}}`},defaultWidth:`any`})},R=[`воскресенье`,`понедельник`,`вторник`,`среду`,`четверг`,`пятницу`,`субботу`];function z(e){let t=R[e];switch(e){case 0:return`'в прошлое `+t+` в' p`;case 1:case 2:case 4:return`'в прошлый `+t+` в' p`;case 3:case 5:case 6:return`'в прошлую `+t+` в' p`}}function B(e){let t=R[e];return e===2?`'во `+t+` в' p`:`'в `+t+` в' p`}function V(e){let t=R[e];switch(e){case 0:return`'в следующее `+t+` в' p`;case 1:case 2:case 4:return`'в следующий `+t+` в' p`;case 3:case 5:case 6:return`'в следующую `+t+` в' p`}}var H={lastWeek:(e,t,n)=>{let r=e.getDay();return C(e,t,n)?B(r):z(r)},yesterday:`'вчера в' p`,today:`'сегодня в' p`,tomorrow:`'завтра в' p`,nextWeek:(e,t,n)=>{let r=e.getDay();return C(e,t,n)?B(r):V(r)},other:`P`},ce={name:`ru-RU`,locale:{code:`ru`,formatDistance:I,formatLong:L,formatRelative:(e,t,n,r)=>{let i=H[e];return typeof i==`function`?i(t,n,r):i},localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=t?.unit,i;return i=r===`date`?`-е`:r===`week`||r===`minute`||r===`second`?`-я`:`-й`,n+i},era:v({values:{narrow:[`до н.э.`,`н.э.`],abbreviated:[`до н. э.`,`н. э.`],wide:[`до нашей эры`,`нашей эры`]},defaultWidth:`wide`}),quarter:v({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`1-й кв.`,`2-й кв.`,`3-й кв.`,`4-й кв.`],wide:[`1-й квартал`,`2-й квартал`,`3-й квартал`,`4-й квартал`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:v({values:{narrow:[`Я`,`Ф`,`М`,`А`,`М`,`И`,`И`,`А`,`С`,`О`,`Н`,`Д`],abbreviated:[`янв.`,`фев.`,`март`,`апр.`,`май`,`июнь`,`июль`,`авг.`,`сент.`,`окт.`,`нояб.`,`дек.`],wide:[`январь`,`февраль`,`март`,`апрель`,`май`,`июнь`,`июль`,`август`,`сентябрь`,`октябрь`,`ноябрь`,`декабрь`]},defaultWidth:`wide`,formattingValues:{narrow:[`Я`,`Ф`,`М`,`А`,`М`,`И`,`И`,`А`,`С`,`О`,`Н`,`Д`],abbreviated:[`янв.`,`фев.`,`мар.`,`апр.`,`мая`,`июн.`,`июл.`,`авг.`,`сент.`,`окт.`,`нояб.`,`дек.`],wide:[`января`,`февраля`,`марта`,`апреля`,`мая`,`июня`,`июля`,`августа`,`сентября`,`октября`,`ноября`,`декабря`]},defaultFormattingWidth:`wide`}),day:v({values:{narrow:[`В`,`П`,`В`,`С`,`Ч`,`П`,`С`],short:[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],abbreviated:[`вск`,`пнд`,`втр`,`срд`,`чтв`,`птн`,`суб`],wide:[`воскресенье`,`понедельник`,`вторник`,`среда`,`четверг`,`пятница`,`суббота`]},defaultWidth:`wide`}),dayPeriod:v({values:{narrow:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утро`,afternoon:`день`,evening:`веч.`,night:`ночь`},abbreviated:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утро`,afternoon:`день`,evening:`веч.`,night:`ночь`},wide:{am:`ДП`,pm:`ПП`,midnight:`полночь`,noon:`полдень`,morning:`утро`,afternoon:`день`,evening:`вечер`,night:`ночь`}},defaultWidth:`any`,formattingValues:{narrow:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утра`,afternoon:`дня`,evening:`веч.`,night:`ночи`},abbreviated:{am:`ДП`,pm:`ПП`,midnight:`полн.`,noon:`полд.`,morning:`утра`,afternoon:`дня`,evening:`веч.`,night:`ночи`},wide:{am:`ДП`,pm:`ПП`,midnight:`полночь`,noon:`полдень`,morning:`утра`,afternoon:`дня`,evening:`вечера`,night:`ночи`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:b({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:x({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:`any`}),quarter:x({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:x({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:`any`}),day:x({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:`any`}),dayPeriod:x({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:`wide`,parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}}};function le(e,t=new Date){let n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`;return e.status!==`done`&&!!e.dueDate&&e.dueDateC.value.map(e=>({label:e.name||`#${e.ID}`,value:e.ID}))),W=l(()=>[{label:`Все ответственные`,value:`all`},{label:`Без ответственного`,value:0},...U.value,...x.value.filter(e=>e.assigneeID&&!C.value.some(t=>t.ID===e.assigneeID)).filter((e,t,n)=>n.findIndex(t=>t.assigneeID===e.assigneeID)===t).map(e=>({label:e.assigneeName||`#${e.assigneeID}`,value:e.assigneeID}))]),_e=l(()=>{if(!H.assigneeID||U.value.some(e=>e.value===H.assigneeID))return U.value;let e=x.value.find(e=>e.ID===R.value);return[...U.value,{label:`${e?.assigneeName||`#${H.assigneeID}`} (роль отозвана)`,value:H.assigneeID,disabled:!0}]}),ve=l(()=>b.map(e=>({...e,tasks:x.value.filter(t=>t.status===e.value&&(I.value===`all`||(t.assigneeID||0)===I.value))}))),G=l(()=>x.value.find(e=>e.ID===R.value)),K=l(()=>H.title.trim()?[...H.title.trim()].length>255?`Не более 255 символов`:void 0:`Введите название задачи`),q=l(()=>[...H.description].length>1e4?`Не более 10 000 символов`:void 0),J=l(()=>R.value!==void 0&&G.value!==void 0&&G.value.version!==z.value),Y=l(()=>R.value!==void 0&&!G.value);function ye(e){return b.find(t=>t.value===e)?.label||e}function X(e){return e?e.split(`-`).reverse().join(`.`):`Без срока`}async function Z(){if(!(N.value||P.value)){N.value=!0,F.value=``;try{let e=await v.GetPermissions({});if(D.value=e.permissions?.includes(`tasks_page`)||!1,!D.value)return;let[t,n]=await Promise.all([v.GetTasks({}),v.GetTaskAssignees({})]);x.value=t.tasks||[],C.value=n.assignees||[]}catch(e){F.value=e instanceof Error&&e.message===`unauthorized`?`Войдите под учётной записью разработчика или администратора`:e instanceof Error?e.message:`Не удалось загрузить задачи`,y.error(F.value)}finally{N.value=!1}}}function Q(e){P.value||(R.value=e?.ID,z.value=e?.version,Object.assign(H,{title:e?.title||``,description:e?.description||``,status:e?.status||`new`,assigneeID:e?.assigneeID??null,dueDate:e?.dueDate||null}),L.value=!0)}async function $(){if(P.value||N.value||J.value||Y.value)return;let e=H.title.trim();if(!e||[...e].length>255||[...H.description].length>1e4){y.error(`Введите название до 255 символов и описание до 10 000 символов`);return}P.value=!0;try{let t={title:e,description:H.description,status:H.status,assigneeID:H.assigneeID??void 0,dueDate:H.dueDate||``},n=R.value===void 0?await v.CreateTask(t):await v.UpdateTask({...t,ID:R.value,version:z.value});if(n.task){let e=n.task;x.value=R.value===void 0?[e,...x.value]:x.value.map(t=>t.ID===e.ID?e:t)}L.value=!1,y.success(`Задача сохранена`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось сохранить задачу`)}finally{P.value=!1}await Z()}function be(e,t){if(P.value||N.value||!e.dataTransfer){e.preventDefault();return}V.value=t.ID,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t.ID))}async function xe(e){let t=x.value.find(e=>e.ID===V.value);if(V.value=void 0,!(!t||t.status===e||P.value||N.value)){P.value=!0;try{let n=await v.SetTaskStatus({ID:t.ID,status:e,version:t.version});if(n.task){let e=n.task;x.value=x.value.map(n=>n.ID===t.ID?e:n)}y.success(`Статус изменён`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось изменить статус`)}finally{P.value=!1}await Z()}}async function Se(){if(!(!B.value||P.value||N.value)){P.value=!0;try{await v.DeleteTask({ID:B.value.ID,version:B.value.version}),x.value=x.value.filter(e=>e.ID!==B.value?.ID),B.value=null,L.value=!1,y.success(`Задача удалена`)}catch(e){y.error(e instanceof Error?e.message:`Не удалось удалить задачу`),B.value=null}finally{P.value=!1}await Z()}}function Ce(){z.value=G.value?.version}return s(()=>{N.value=!1,Z()}),(s,l)=>(r(),o(c(ae),{locale:c(se),"date-locale":c(ce)},{default:f(()=>[h(`div`,ue,[h(`div`,de,[i(c(A),{class:`toolbar`,justify:`space-between`,align:`center`},{default:f(()=>[l[16]||=h(`h1`,null,`Задачи`,-1),i(c(A),null,{default:f(()=>[i(c(T),{loading:N.value,disabled:P.value,onClick:Z},{default:f(()=>[...l[14]||=[t(`Обновить`,-1)]]),_:1},8,[`loading`,`disabled`]),D.value?(r(),o(c(T),{key:0,type:`primary`,disabled:P.value||N.value,onClick:l[0]||=e=>Q()},{default:f(()=>[...l[15]||=[t(` Создать задачу `,-1)]]),_:1},8,[`disabled`])):e(``,!0)]),_:1})]),_:1}),F.value?(r(),o(c(k),{key:0,type:`error`,class:`notice`},{default:f(()=>[t(a(F.value),1)]),_:1})):e(``,!0),N.value&&!D.value?(r(),o(c(j),{key:1,class:`initial-loading`})):!D.value&&!F.value?(r(),o(c(k),{key:2,type:`warning`},{default:f(()=>[...l[17]||=[t(` Страница доступна разработчикам и администратору. `,-1)]]),_:1})):e(``,!0),D.value?(r(),m(d,{key:3},[i(c(E),{value:I.value,"onUpdate:value":l[1]||=e=>I.value=e,options:W.value,"aria-label":`Фильтр по ответственному`,class:`assignee-filter`},null,8,[`value`,`options`]),i(c(j),{show:N.value||P.value},{default:f(()=>[h(`div`,fe,[(r(!0),m(d,null,n(ve.value,s=>(r(),m(`section`,{key:s.value,class:`column`,"aria-label":s.label,onDragover:l[3]||=M(()=>{},[`prevent`]),onDrop:M(e=>xe(s.value),[`prevent`])},[i(c(A),{justify:`space-between`,align:`center`,class:`column-heading`},{default:f(()=>[h(`h2`,null,a(s.label),1),i(c(_),{size:`small`},{default:f(()=>[t(a(s.tasks.length),1)]),_:2},1024)]),_:2},1024),s.tasks.length?e(``,!0):(r(),o(c(te),{key:0,description:`Нет задач`,class:`empty-column`})),(r(!0),m(d,null,n(s.tasks,n=>(r(),o(c(g),{key:n.ID,class:`task-card`,size:`small`,draggable:!P.value&&!N.value,onDragstart:e=>be(e,n),onDragend:l[2]||=e=>V.value=void 0},{default:f(()=>[h(`div`,me,`#`+a(n.ID),1),h(`h3`,he,a(n.title),1),h(`p`,null,a(n.assigneeName||`Без ответственного`),1),i(c(A),{align:`center`,class:`task-due`},{default:f(()=>[h(`span`,null,a(X(n.dueDate)),1),c(le)(n)?(r(),o(c(_),{key:0,type:`error`,size:`small`},{default:f(()=>[...l[18]||=[t(`Просрочена`,-1)]]),_:1})):e(``,!0)]),_:2},1024),i(c(T),{size:`small`,disabled:P.value||N.value,onClick:e=>Q(n)},{default:f(()=>[...l[19]||=[t(` Открыть задачу `,-1)]]),_:1},8,[`disabled`,`onClick`])]),_:2},1032,[`draggable`,`onDragstart`]))),128))],40,pe))),128))])]),_:1},8,[`show`])],64)):e(``,!0)])]),i(oe,{active:`tasks`}),i(c(S),{show:L.value,"onUpdate:show":l[11]||=e=>L.value=e,"mask-closable":!P.value,"close-on-esc":!P.value},{default:f(()=>[i(c(g),{class:`task-modal`,title:R.value?`Задача #${R.value}`:`Новая задача`,role:`dialog`,"aria-modal":`true`},{default:f(()=>[Y.value?(r(),o(c(k),{key:0,type:`warning`,class:`notice`},{default:f(()=>[...l[20]||=[t(` Задача удалена другим пользователем. Черновик сохранён в этой форме. `,-1)]]),_:1})):e(``,!0),J.value&&G.value?(r(),o(c(k),{key:1,type:`warning`,class:`notice`},{default:f(()=>[l[22]||=t(` Задача изменена другим пользователем. Ваш черновик сохранён. Актуальные данные: `,-1),h(`p`,null,a(G.value.title)+` — `+a(ye(G.value.status)),1),h(`p`,null,a(G.value.assigneeName||`Без ответственного`)+` · `+a(X(G.value.dueDate)),1),h(`p`,ge,a(G.value.description||`Без описания`),1),i(c(T),{disabled:N.value||P.value,onClick:Ce},{default:f(()=>[...l[21]||=[t(` Продолжить с моим черновиком `,-1)]]),_:1},8,[`disabled`])]),_:1})):e(``,!0),i(c(w),{label:`Название *`,"label-for":`task-title`,feedback:K.value,"validation-status":K.value?`error`:void 0},{default:f(()=>[i(c(O),{"input-props":{id:`task-title`},value:H.title,"onUpdate:value":l[4]||=e=>H.title=e,disabled:P.value,placeholder:`Название задачи`},null,8,[`value`,`disabled`])]),_:1},8,[`feedback`,`validation-status`]),i(c(w),{label:`Описание`,"label-for":`task-description`,feedback:q.value,"validation-status":q.value?`error`:void 0},{default:f(()=>[i(c(O),{"input-props":{id:`task-description`},value:H.description,"onUpdate:value":l[5]||=e=>H.description=e,type:`textarea`,disabled:P.value,placeholder:`Что нужно сделать`,autosize:{minRows:3,maxRows:10}},null,8,[`value`,`disabled`])]),_:1},8,[`feedback`,`validation-status`]),i(c(w),{label:`Статус`,"label-for":`task-status`},{default:f(()=>[i(c(E),{"input-props":{id:`task-status`,"aria-label":`Статус`},filterable:``,value:H.status,"onUpdate:value":l[6]||=e=>H.status=e,options:b,disabled:P.value},null,8,[`value`,`disabled`])]),_:1}),i(c(w),{label:`Ответственный`,"label-for":`task-assignee`},{default:f(()=>[i(c(E),{"input-props":{id:`task-assignee`,"aria-label":`Ответственный`},value:H.assigneeID,"onUpdate:value":l[7]||=e=>H.assigneeID=e,options:_e.value,disabled:P.value,placeholder:`Без ответственного`,clearable:``,filterable:``},null,8,[`value`,`options`,`disabled`])]),_:1}),i(c(w),{label:`Срок выполнения`,"label-for":`task-due-date`},{default:f(()=>[i(c(re),{id:`task-due-date`,"formatted-value":H.dueDate,"onUpdate:formattedValue":l[8]||=e=>H.dueDate=e,type:`date`,placeholder:`Дата завершения`,"value-format":`yyyy-MM-dd`,format:`dd.MM.yyyy`,disabled:P.value,clearable:``,class:`date-picker`},null,8,[`formatted-value`,`disabled`])]),_:1}),i(c(A),{justify:`space-between`},{default:f(()=>[R.value&&G.value?(r(),o(c(T),{key:0,type:`error`,disabled:P.value||N.value,onClick:l[9]||=e=>B.value=G.value},{default:f(()=>[...l[23]||=[t(`Удалить`,-1)]]),_:1},8,[`disabled`])):e(``,!0),i(c(A),null,{default:f(()=>[i(c(T),{disabled:P.value,onClick:l[10]||=e=>L.value=!1},{default:f(()=>[...l[24]||=[t(`Закрыть`,-1)]]),_:1},8,[`disabled`]),i(c(T),{type:`primary`,loading:P.value,disabled:N.value||J.value||Y.value||!!K.value||!!q.value,onClick:$},{default:f(()=>[...l[25]||=[t(`Сохранить`,-1)]]),_:1},8,[`loading`,`disabled`])]),_:1})]),_:1})]),_:1},8,[`title`])]),_:1},8,[`show`,`mask-closable`,`close-on-esc`]),i(c(S),{show:!!B.value,"mask-closable":!P.value,"close-on-esc":!P.value,"onUpdate:show":l[13]||=e=>!P.value&&(B.value=null)},{default:f(()=>[i(c(g),{class:`task-modal`,title:`Удалить задачу?`,role:`dialog`,"aria-modal":`true`},{default:f(()=>[h(`p`,null,`Удалить «`+a(B.value?.title)+`»? Это действие необратимо.`,1),i(c(A),{justify:`end`,class:`delete-actions`},{default:f(()=>[i(c(T),{disabled:P.value,onClick:l[12]||=e=>B.value=null},{default:f(()=>[...l[26]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(c(T),{type:`error`,loading:P.value,onClick:Se},{default:f(()=>[...l[27]||=[t(`Удалить`,-1)]]),_:1},8,[`loading`])]),_:1})]),_:1})]),_:1},8,[`show`,`mask-closable`,`close-on-esc`])]),_:1},8,[`locale`,`date-locale`]))}}),[[`__scopeId`,`data-v-ff75f974`]]),W=p({__name:`TasksView`,setup(e){return(e,t)=>(r(),o(U))}});export{W as default}; \ No newline at end of file diff --git a/frontend/dist/assets/TeamStoryView-xaQBc946.js b/frontend/dist/assets/TeamStoryView-DxafuPZ8.js similarity index 95% rename from frontend/dist/assets/TeamStoryView-xaQBc946.js rename to frontend/dist/assets/TeamStoryView-DxafuPZ8.js index 6d90533..1155904 100644 --- a/frontend/dist/assets/TeamStoryView-xaQBc946.js +++ b/frontend/dist/assets/TeamStoryView-DxafuPZ8.js @@ -1 +1 @@ -import{Ct as e,Dt as t,In as n,Jt as r,Kt as i,Ln as a,Ot as o,Rn as s,Rt as c,St as l,Xt as u,Yt as d,an as f,bn as p,bt as m,hn as h,ht as g,in as _,kt as v,l as y,wt as b,xt as x}from"./client-Bz0sY7Lm.js";import{n as ee,t as S}from"./es-BhJOHfSF.js";import{t as te}from"./Button-lcMg8vK2.js";import{t as C}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{n as ne,t as re}from"./PlaceBlock-cxDh8Kvp.js";import{t as w}from"./Input-DeqNzuJd.js";import{t as ie}from"./Alert-CUBw4GSK.js";import{t as T}from"./Flex-BUYalFhW.js";import{t as E}from"./Rate-CmLMszwf.js";import{t as ae}from"./QrCode-MTPi5t58.js";import{i as oe,o as se,ot as D,r as ce,w as O}from"./index-6B3OmSLg.js";import{t as k}from"./HeaderText-CJTPL4m_.js";import{t as le}from"./useDeviceContext-dfnN0nNy.js";import{t as A}from"./MessagePaper-CFegNMJR.js";var j={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},M=v({name:`ContactMailRound`,render:function(e,t){return i(),b(`svg`,j,t[0]||=[x(`path`,{d:`M21 8V7l-3 2l-3-2v1l2.72 1.82a.5.5 0 0 0 .55 0L21 8zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm7.5-6h-7c-.28 0-.5-.22-.5-.5v-5c0-.28.22-.5.5-.5h7c.28 0 .5.22.5.5v5c0 .28-.22.5-.5.5z`,fill:`currentColor`},null,-1)])}}),N={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},P=v({name:`Footsteps`,render:function(e,t){return i(),b(`svg`,N,t[0]||=[x(`path`,{d:`M133.83 361.27c-22.61 0-41-8.17-54.79-24.39s-22.84-40.29-28.11-75.31c-7.76-51.61-.06-95.11 21.68-122.48c12.8-16.12 29.6-25.44 48.58-26.94c16.25-1.3 40.54 5.29 64 44c14.69 24.24 25.86 56.44 30.65 88.34c5.79 38.51 1.48 66.86-13.18 86.65c-11.64 15.72-29.54 25.46-53.21 29a106.46 106.46 0 0 1-15.62 1.13z`,fill:`currentColor`},null,-1),x(`path`,{d:`M173 496c-13.21 0-26.6-4.23-38.66-12.36a79.79 79.79 0 0 1-33.52-50.6c-2.85-14.66-1.14-26.31 5.22-35.64c10.33-15.15 28.87-18.56 48.49-22.18c2.07-.38 4.17-.76 6.3-1.17c4.52-.86 9.14-2 13.62-3.11c16.78-4.14 34.14-8.43 48.47 1.75c9.59 6.8 15 18.36 16.62 35.32c1.84 19.57-2.36 39.1-11.83 55c-10.19 17.11-25.47 28.42-43 31.86A61 61 0 0 1 173 496z`,fill:`currentColor`},null,-1),x(`path`,{d:`M378.17 265.27a106.69 106.69 0 0 1-15.6-1.2c-23.66-3.5-41.56-13.25-53.2-29c-14.66-19.79-19-48.13-13.18-86.65c4.79-31.93 15.93-64.1 30.55-88.25c23.34-38.57 47.66-45.26 64-44.08c18.92 1.38 35.69 10.57 48.51 26.6c21.89 27.37 29.65 71 21.86 122.84c-5.27 35-14.2 58.95-28.11 75.31s-32.22 24.43-54.83 24.43z`,fill:`currentColor`},null,-1),x(`path`,{d:`M339 400a61 61 0 0 1-11.68-1.13c-17.56-3.44-32.84-14.75-43-31.86c-9.47-15.9-13.67-35.43-11.83-55c1.6-17 7-28.52 16.62-35.33c14.33-10.17 31.69-5.89 48.47-1.74c4.48 1.1 9.1 2.24 13.62 3.11l6.29 1.17c19.63 3.61 38.17 7 48.5 22.17c6.36 9.33 8.07 21 5.22 35.64a79.78 79.78 0 0 1-33.52 50.61C365.56 395.78 352.17 400 339 400z`,fill:`currentColor`},null,-1)])}}),F={},I={class:`belt-block`};function L(e,t){return i(),b(`div`,null,[t[0]||=x(`div`,{class:`shadow shadow-top`},null,-1),t[1]||=x(`div`,{class:`shadow shadow-bottom`},null,-1),x(`div`,I,[d(e.$slots,`default`,{},void 0,!0)])])}var R=C(F,[[`render`,L],[`__scopeId`,`data-v-bec154c5`]]),z={},B={class:`plate-block`},V={class:`metal-plate-block`};function H(e,t){return i(),b(`div`,B,[x(`div`,V,[d(e.$slots,`default`,{},void 0,!0)]),t[0]||=x(`div`,{class:`pin pin-top-left`},null,-1),t[1]||=x(`div`,{class:`pin pin-top-right`},null,-1),t[2]||=x(`div`,{class:`pin pin-bottom-right`},null,-1),t[3]||=x(`div`,{class:`pin pin-bottom-left`},null,-1)])}var U=C(z,[[`render`,H],[`__scopeId`,`data-v-4833fe7e`]]),W={class:`form-custom`},G={class:`center-block-700`},K={class:`controller`},q={class:`counters-block`},J={class:`counter-block`},Y={class:`places-text`},X={class:`counter-block`},Z={class:`places-text`},Q={class:`game-input`},$=[`placeholder`,`disabled`],ue=[`disabled`],de=C(v({__name:`GameInputForm`,props:{addAction:{type:Function},allPlacesCount:{},newPlacesCount:{},gameStatus:{}},setup(n){let a=n,c=h(``),u=h(!1);async function d(){if(!(u.value||a.gameStatus!=`run`||c.value.length==0)){u.value=!0;try{await a.addAction(c.value)&&(c.value=``)}finally{u.value=!1}}}function m(e){e%=100;let t=Math.floor(e/10)%10,n=e%10,r=`–`,i=`–`;return t>0&&(r=String(t)),(n>0||t>0)&&(i=String(n)),[r,i]}return(h,v)=>(i(),b(`div`,W,[o(R,{class:`input-form`},{default:_(()=>[o(U,{class:`controller-metal controller-metal-left`}),o(U,{class:`controller-metal controller-metal-right`}),x(`div`,G,[x(`div`,K,[x(`div`,q,[x(`div`,J,[x(`div`,Y,[o(p(S),{class:`icon-for-counter`},{default:_(()=>[o(p(P))]),_:1})]),(i(!0),b(g,null,r(m(n.allPlacesCount),(e,t)=>(i(),b(`div`,{key:t,class:`places-text places-text-number`},s(e),1))),128))]),x(`div`,X,[x(`div`,Z,[o(p(S),{class:`icon-for-counter`},{default:_(()=>[o(p(M))]),_:1})]),(i(!0),b(g,null,r(m(n.newPlacesCount),(e,t)=>(i(),b(`div`,{key:t,class:`places-text places-text-number`},s(e),1))),128))])]),x(`div`,Q,[f(x(`input`,{id:`run`,class:`game-input-run`,"onUpdate:modelValue":v[0]||=e=>c.value=e,type:`text`,placeholder:a.gameStatus==`run`?`Место назначения`:`Ходы запрещены`,disabled:a.gameStatus!=`run`||u.value},null,8,$),[[D,c.value]])]),v[4]||=x(`div`,{class:`game-button-run-shadow`},null,-1),x(`button`,{class:`game-button-run`,type:`submit`,disabled:a.gameStatus!=`run`||c.value.length==0||u.value,onClick:d},[a.gameStatus==`run`?(i(),l(k,{key:0},{default:_(()=>[...v[1]||=[t(`Поехали`,-1)]]),_:1})):e(``,!0),a.gameStatus==`pause`||a.gameStatus==`draft`?(i(),l(k,{key:1},{default:_(()=>[...v[2]||=[t(`Ждём`,-1)]]),_:1})):e(``,!0),a.gameStatus==`finish`?(i(),l(k,{key:2},{default:_(()=>[...v[3]||=[t(`Всё`,-1)]]),_:1})):e(``,!0)],8,ue)])])]),_:1})]))}}),[[`__scopeId`,`data-v-31fd878a`]]),fe={key:0,class:`width700`},pe=[`disabled`],me={key:1,class:`width700`},he={class:`question-text`},ge={class:`qr-block`},_e={key:4,class:`edit-panel`},ve=C(v({__name:`TeamStoryPage`,setup(d){let f=se(),v=oe(),S=ee(),C=y(),D=C.params.id,k=C.query.password;le(()=>({teamID:Number(D),password:typeof k==`string`?k:void 0}));let j=h(0),M=h([]),N=h(``),P=h(),F=h({introduction:void 0,places:[],questions:[]}),I=h({ID:void 0,name:void 0,description:void 0,startAt:void 0,status:void 0,format:void 0,location:void 0,scenario:void 0,teams:void 0,export:void 0}),L=h(``),R=`game-review-${D}`,z=h(localStorage.getItem(R)===`1`),B=h(0),V=h(0),H=h(``),U=h(!1),W=window.location.href,G=()=>{let e=P.value;return e?e.scrollHeight-e.scrollTop-e.clientHeight<1:!1};async function K(){let e=F.value,t;try{t=await v.GetTeamStory({ID:Number(D),password:k})}catch(e){N.value=`Не удалось загрузить дело. Попробуйте обновить страницу.`,console.error(`Failed to load team story:`,e);return}N.value=``,I.value=t.game;let n=G();n&&(j.value=0);let r=F.value.places.length;F.value={background:t.story.background,introduction:t.story.introduction,places:t.story.places?.map((t,n)=>(console.log(e?.places[n]?.mode),{place:t,mode:e?.places[n]?.mode||`show`}))||[],questions:t.story.questions||[]},M.value=t.actions||[];let i=F.value.places.length;if(i>r&&r!=0&&(j.value+=i-r),await c(),n&&r!=0){let e=P.value;if(!e)return!1;e.scrollTop=e.scrollHeight}}K(),Y();async function q(e){try{return await v.AddTeamAction({ID:Number(D),password:k,code:e}),await K(),L.value=``,await c(),j.value=0,!0}catch(e){return S.error(e instanceof Error?e.message:`Не удалось сделать ход`),!1}}let J=h({});async function Y(){let e;try{e=await v.GetTeamAnswers({ID:Number(D),password:k})}catch(e){N.value=`Не удалось загрузить ответы команды. Попробуйте обновить страницу.`,console.error(`Failed to load team answers:`,e);return}N.value=``;let t={};for(let n of e.answers||[])t[n.questionCode||``]=n.answer||``;J.value=t}async function X(){await v.SubmitTeamAnswers({ID:Number(D),password:k,answers:(F.value.questions||[]).map(e=>({questionCode:e.code,answer:J.value[e.code||``]||``}))}),S.success(`Ответы сохранены`),await Y()}let Z=m(()=>I.value?.format!==`offline`&&(I.value?.status==`run`||I.value?.status==`pause`)),Q=m(()=>I.value?.format!==`offline`&&(F.value.questions?.length||0)>0),$={Input:{border:`1px dashed black`,borderDisabled:`1px dashed black`,borderFocus:`1px solid black`,borderHover:`1px dashed black`,boxShadowFocus:`0 0 0 1px black`,caretColor:`black`,color:`transparent`,colorDisabled:`transparent`,colorFocus:`transparent`,fontSizeMedium:`18px`,placeholderColor:`black`,placeholderColorDisabled:`black`,textColor:`black`,textColorDisabled:`black`},Rate:{itemColor:`black`,itemColorHover:`#b8860b`,itemColorActive:`#b8860b`}};async function ue(){if(!B.value||!V.value||H.value.trim()===``){S.error(`Поставьте оценки и напишите отзыв`);return}U.value=!0,await v.CreateGameReview({gameID:Number(I.value?.ID),teamID:Number(D),password:k,rating:B.value,difficulty:V.value,text:H.value.trim()}),U.value=!1,z.value=!0,localStorage.setItem(R,`1`),S.success(`Спасибо за отзыв`)}async function ve(){await v.DeleteLastTeamAction({ID:Number(D)}),await K(),L.value=``}return ce(()=>{K()},2e3),(c,d)=>{let m=u(`n-space`);return i(),b(g,null,[F.value.background?(i(),b(`div`,{key:0,class:`case-background`,style:a({backgroundImage:`url(${JSON.stringify(F.value.background)})`}),"aria-hidden":`true`},null,4)):e(``,!0),x(`div`,{class:n([`center-block-custom bottom-margin smooth-scroll`,{"game-finished":I.value?.status===`finish`}]),ref_key:`scrollContainer`,ref:P},[I.value?.status===`finish`?(i(),b(`div`,fe,[o(A,{role:`status`},{default:_(()=>[...d[4]||=[x(`div`,{class:`font`},`Игра завершена. Спасибо за участие!`,-1)]]),_:1}),z.value?e(``,!0):(i(),l(A,{key:0,class:`review-block`},{default:_(()=>[d[7]||=x(`div`,{class:`font`},`Оцените игру`,-1),d[8]||=x(`hr`,{class:`questions-hr`},null,-1),o(p(O),{"theme-overrides":$},{default:_(()=>[d[5]||=x(`div`,{class:`review-rating font`},`Оценка`,-1),o(p(E),{value:B.value,"onUpdate:value":d[0]||=e=>B.value=e,count:5,class:`review-rate`},null,8,[`value`]),d[6]||=x(`div`,{class:`review-rating font`},`Сложность`,-1),o(p(E),{value:V.value,"onUpdate:value":d[1]||=e=>V.value=e,count:3,class:`review-rate`},null,8,[`value`]),o(p(w),{value:H.value,"onUpdate:value":d[2]||=e=>H.value=e,class:`review-input`,type:`textarea`,autosize:{minRows:4,maxRows:8},placeholder:`Расскажите, как прошла игра`},null,8,[`value`]),o(p(T),{justify:`end`,class:`questions-actions`},{default:_(()=>[x(`button`,{type:`button`,class:`paper-button`,disabled:U.value,onClick:ue},` Отправить отзыв `,8,pe)]),_:1})]),_:1})]),_:1}))])):(i(),b(`div`,me,[N.value?(i(),l(p(ie),{key:0,type:`error`,role:`alert`},{default:_(()=>[t(s(N.value),1)]),_:1})):e(``,!0),o(de,{addAction:q,allPlacesCount:F.value.places.length,newPlacesCount:j.value,gameStatus:I.value?.status||``},null,8,[`allPlacesCount`,`newPlacesCount`,`gameStatus`]),I.value?.format!==`offline`&&I.value?.status&&I.value.status!=`draft`&&F.value.introduction&&(F.value.introduction.text||F.value.introduction.audio)?(i(),l(ne,{key:1,introduction:F.value.introduction,mode:`show`},null,8,[`introduction`])):e(``,!0),Q.value&&I.value?.status&&I.value.status!=`draft`?(i(),l(A,{key:2,class:`questions-block`},{default:_(()=>[d[9]||=x(`div`,{class:`font`},`Вопросы дела`,-1),d[10]||=x(`hr`,{class:`questions-hr`},null,-1),d[11]||=x(`p`,{class:`questions-hint font`},` Ответьте на вопросы дела. Ответы можно менять, пока игра идёт. `,-1),o(p(O),{"theme-overrides":$},{default:_(()=>[(i(!0),b(g,null,r(F.value.questions,e=>(i(),b(`div`,{key:e.code,class:`question-item font`},[x(`div`,he,s(e.code)+`: `+s(e.text),1),o(p(w),{value:J.value[e.code||``],"onUpdate:value":t=>J.value[e.code||``]=t,type:`textarea`,autosize:{minRows:2,maxRows:6},disabled:!Z.value,placeholder:`Ваш ответ...`},null,8,[`value`,`onUpdate:value`,`disabled`])]))),128)),Z.value?(i(),l(p(T),{key:0,justify:`end`,class:`questions-actions`},{default:_(()=>[x(`button`,{type:`button`,class:`paper-button`,onClick:d[3]||=e=>X()},` Сохранить ответы `)]),_:1})):e(``,!0)]),_:1})]),_:1})):e(``,!0),(i(!0),b(g,null,r(F.value.places,(e,t)=>(i(),l(re,{place:e.place,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:`${I.value?.format}:${e.place.code}`,mcp:p(f).hasRole(`author`)&&M.value[t]?.mcp,addAction:q},null,8,[`place`,`mode`,`onUpdate:mode`,`mcp`]))),128)),F.value.places.length==0&&I.value?.status==`draft`?(i(),l(A,{key:3,class:`qr-main-block`},{default:_(()=>[o(m,{vertical:``},{default:_(()=>[d[12]||=x(`h2`,{class:`qr-main-block-text`},`Это код этого дела`,-1),d[13]||=x(`p`,{class:`qr-main-block-text`},`Поделись с командой`,-1),x(`div`,ge,[o(p(ae),{value:p(W),size:300,padding:0},null,8,[`value`])]),d[14]||=x(`p`,{class:`qr-main-block-text`},`Игра скоро начнется`,-1)]),_:1})]),_:1})):e(``,!0),p(f).hasRole(`author`)&&F.value.places.length>0?(i(),b(`div`,_e,[o(p(T),{justify:`end`},{default:_(()=>[o(p(te),{onClick:ve},{default:_(()=>[...d[15]||=[t(`Удалить последний ход`,-1)]]),_:1})]),_:1})])):e(``,!0)]))],2)],64)}}}),[[`__scopeId`,`data-v-a4fdc676`]]),ye=v({__name:`TeamStoryView`,setup(e){let t=y();return(e,n)=>(i(),l(ve,{key:p(t).fullPath}))}});export{ye as default}; \ No newline at end of file +import{Ct as e,Dt as t,In as n,Jt as r,Kt as i,Ln as a,Ot as o,Rn as s,Rt as c,St as l,Xt as u,Yt as d,an as f,bn as p,bt as m,hn as h,ht as g,in as _,kt as v,l as y,wt as b,xt as x}from"./client-Bz0sY7Lm.js";import{n as ee,t as S}from"./es-Qklex053.js";import{t as te}from"./Button-MBUKfT_Z.js";import{t as C}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{n as ne,t as re}from"./PlaceBlock-BQyPRoGX.js";import{t as w}from"./Input-CEIE7mTC.js";import{t as ie}from"./Alert-BoUmQeXf.js";import{t as T}from"./Flex-Dsa9FxiA.js";import{t as E}from"./Rate-D7hhdTpC.js";import{t as ae}from"./QrCode-MTPi5t58.js";import{i as oe,o as se,r as ce,st as D,w as O}from"./index-NE0dsiiJ.js";import{t as k}from"./HeaderText-DnXJEr19.js";import{t as le}from"./useDeviceContext-mGSTXKkG.js";import{t as A}from"./MessagePaper-C6R1Irzd.js";var j={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},M=v({name:`ContactMailRound`,render:function(e,t){return i(),b(`svg`,j,t[0]||=[x(`path`,{d:`M21 8V7l-3 2l-3-2v1l2.72 1.82a.5.5 0 0 0 .55 0L21 8zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3s-3-1.34-3-3s1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm7.5-6h-7c-.28 0-.5-.22-.5-.5v-5c0-.28.22-.5.5-.5h7c.28 0 .5.22.5.5v5c0 .28-.22.5-.5.5z`,fill:`currentColor`},null,-1)])}}),N={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},P=v({name:`Footsteps`,render:function(e,t){return i(),b(`svg`,N,t[0]||=[x(`path`,{d:`M133.83 361.27c-22.61 0-41-8.17-54.79-24.39s-22.84-40.29-28.11-75.31c-7.76-51.61-.06-95.11 21.68-122.48c12.8-16.12 29.6-25.44 48.58-26.94c16.25-1.3 40.54 5.29 64 44c14.69 24.24 25.86 56.44 30.65 88.34c5.79 38.51 1.48 66.86-13.18 86.65c-11.64 15.72-29.54 25.46-53.21 29a106.46 106.46 0 0 1-15.62 1.13z`,fill:`currentColor`},null,-1),x(`path`,{d:`M173 496c-13.21 0-26.6-4.23-38.66-12.36a79.79 79.79 0 0 1-33.52-50.6c-2.85-14.66-1.14-26.31 5.22-35.64c10.33-15.15 28.87-18.56 48.49-22.18c2.07-.38 4.17-.76 6.3-1.17c4.52-.86 9.14-2 13.62-3.11c16.78-4.14 34.14-8.43 48.47 1.75c9.59 6.8 15 18.36 16.62 35.32c1.84 19.57-2.36 39.1-11.83 55c-10.19 17.11-25.47 28.42-43 31.86A61 61 0 0 1 173 496z`,fill:`currentColor`},null,-1),x(`path`,{d:`M378.17 265.27a106.69 106.69 0 0 1-15.6-1.2c-23.66-3.5-41.56-13.25-53.2-29c-14.66-19.79-19-48.13-13.18-86.65c4.79-31.93 15.93-64.1 30.55-88.25c23.34-38.57 47.66-45.26 64-44.08c18.92 1.38 35.69 10.57 48.51 26.6c21.89 27.37 29.65 71 21.86 122.84c-5.27 35-14.2 58.95-28.11 75.31s-32.22 24.43-54.83 24.43z`,fill:`currentColor`},null,-1),x(`path`,{d:`M339 400a61 61 0 0 1-11.68-1.13c-17.56-3.44-32.84-14.75-43-31.86c-9.47-15.9-13.67-35.43-11.83-55c1.6-17 7-28.52 16.62-35.33c14.33-10.17 31.69-5.89 48.47-1.74c4.48 1.1 9.1 2.24 13.62 3.11l6.29 1.17c19.63 3.61 38.17 7 48.5 22.17c6.36 9.33 8.07 21 5.22 35.64a79.78 79.78 0 0 1-33.52 50.61C365.56 395.78 352.17 400 339 400z`,fill:`currentColor`},null,-1)])}}),F={},I={class:`belt-block`};function L(e,t){return i(),b(`div`,null,[t[0]||=x(`div`,{class:`shadow shadow-top`},null,-1),t[1]||=x(`div`,{class:`shadow shadow-bottom`},null,-1),x(`div`,I,[d(e.$slots,`default`,{},void 0,!0)])])}var R=C(F,[[`render`,L],[`__scopeId`,`data-v-bec154c5`]]),z={},B={class:`plate-block`},V={class:`metal-plate-block`};function H(e,t){return i(),b(`div`,B,[x(`div`,V,[d(e.$slots,`default`,{},void 0,!0)]),t[0]||=x(`div`,{class:`pin pin-top-left`},null,-1),t[1]||=x(`div`,{class:`pin pin-top-right`},null,-1),t[2]||=x(`div`,{class:`pin pin-bottom-right`},null,-1),t[3]||=x(`div`,{class:`pin pin-bottom-left`},null,-1)])}var U=C(z,[[`render`,H],[`__scopeId`,`data-v-4833fe7e`]]),W={class:`form-custom`},G={class:`center-block-700`},K={class:`controller`},q={class:`counters-block`},J={class:`counter-block`},Y={class:`places-text`},X={class:`counter-block`},Z={class:`places-text`},Q={class:`game-input`},$=[`placeholder`,`disabled`],ue=[`disabled`],de=C(v({__name:`GameInputForm`,props:{addAction:{type:Function},allPlacesCount:{},newPlacesCount:{},gameStatus:{}},setup(n){let a=n,c=h(``),u=h(!1);async function d(){if(!(u.value||a.gameStatus!=`run`||c.value.length==0)){u.value=!0;try{await a.addAction(c.value)&&(c.value=``)}finally{u.value=!1}}}function m(e){e%=100;let t=Math.floor(e/10)%10,n=e%10,r=`–`,i=`–`;return t>0&&(r=String(t)),(n>0||t>0)&&(i=String(n)),[r,i]}return(h,v)=>(i(),b(`div`,W,[o(R,{class:`input-form`},{default:_(()=>[o(U,{class:`controller-metal controller-metal-left`}),o(U,{class:`controller-metal controller-metal-right`}),x(`div`,G,[x(`div`,K,[x(`div`,q,[x(`div`,J,[x(`div`,Y,[o(p(S),{class:`icon-for-counter`},{default:_(()=>[o(p(P))]),_:1})]),(i(!0),b(g,null,r(m(n.allPlacesCount),(e,t)=>(i(),b(`div`,{key:t,class:`places-text places-text-number`},s(e),1))),128))]),x(`div`,X,[x(`div`,Z,[o(p(S),{class:`icon-for-counter`},{default:_(()=>[o(p(M))]),_:1})]),(i(!0),b(g,null,r(m(n.newPlacesCount),(e,t)=>(i(),b(`div`,{key:t,class:`places-text places-text-number`},s(e),1))),128))])]),x(`div`,Q,[f(x(`input`,{id:`run`,class:`game-input-run`,"onUpdate:modelValue":v[0]||=e=>c.value=e,type:`text`,placeholder:a.gameStatus==`run`?`Место назначения`:`Ходы запрещены`,disabled:a.gameStatus!=`run`||u.value},null,8,$),[[D,c.value]])]),v[4]||=x(`div`,{class:`game-button-run-shadow`},null,-1),x(`button`,{class:`game-button-run`,type:`submit`,disabled:a.gameStatus!=`run`||c.value.length==0||u.value,onClick:d},[a.gameStatus==`run`?(i(),l(k,{key:0},{default:_(()=>[...v[1]||=[t(`Поехали`,-1)]]),_:1})):e(``,!0),a.gameStatus==`pause`||a.gameStatus==`draft`?(i(),l(k,{key:1},{default:_(()=>[...v[2]||=[t(`Ждём`,-1)]]),_:1})):e(``,!0),a.gameStatus==`finish`?(i(),l(k,{key:2},{default:_(()=>[...v[3]||=[t(`Всё`,-1)]]),_:1})):e(``,!0)],8,ue)])])]),_:1})]))}}),[[`__scopeId`,`data-v-31fd878a`]]),fe={key:0,class:`width700`},pe=[`disabled`],me={key:1,class:`width700`},he={class:`question-text`},ge={class:`qr-block`},_e={key:4,class:`edit-panel`},ve=C(v({__name:`TeamStoryPage`,setup(d){let f=se(),v=oe(),S=ee(),C=y(),D=C.params.id,k=C.query.password;le(()=>({teamID:Number(D),password:typeof k==`string`?k:void 0}));let j=h(0),M=h([]),N=h(``),P=h(),F=h({introduction:void 0,places:[],questions:[]}),I=h({ID:void 0,name:void 0,description:void 0,startAt:void 0,status:void 0,format:void 0,location:void 0,scenario:void 0,teams:void 0,export:void 0}),L=h(``),R=`game-review-${D}`,z=h(localStorage.getItem(R)===`1`),B=h(0),V=h(0),H=h(``),U=h(!1),W=window.location.href,G=()=>{let e=P.value;return e?e.scrollHeight-e.scrollTop-e.clientHeight<1:!1};async function K(){let e=F.value,t;try{t=await v.GetTeamStory({ID:Number(D),password:k})}catch(e){N.value=`Не удалось загрузить дело. Попробуйте обновить страницу.`,console.error(`Failed to load team story:`,e);return}N.value=``,I.value=t.game;let n=G();n&&(j.value=0);let r=F.value.places.length;F.value={background:t.story.background,introduction:t.story.introduction,places:t.story.places?.map((t,n)=>(console.log(e?.places[n]?.mode),{place:t,mode:e?.places[n]?.mode||`show`}))||[],questions:t.story.questions||[]},M.value=t.actions||[];let i=F.value.places.length;if(i>r&&r!=0&&(j.value+=i-r),await c(),n&&r!=0){let e=P.value;if(!e)return!1;e.scrollTop=e.scrollHeight}}K(),Y();async function q(e){try{return await v.AddTeamAction({ID:Number(D),password:k,code:e}),await K(),L.value=``,await c(),j.value=0,!0}catch(e){return S.error(e instanceof Error?e.message:`Не удалось сделать ход`),!1}}let J=h({});async function Y(){let e;try{e=await v.GetTeamAnswers({ID:Number(D),password:k})}catch(e){N.value=`Не удалось загрузить ответы команды. Попробуйте обновить страницу.`,console.error(`Failed to load team answers:`,e);return}N.value=``;let t={};for(let n of e.answers||[])t[n.questionCode||``]=n.answer||``;J.value=t}async function X(){await v.SubmitTeamAnswers({ID:Number(D),password:k,answers:(F.value.questions||[]).map(e=>({questionCode:e.code,answer:J.value[e.code||``]||``}))}),S.success(`Ответы сохранены`),await Y()}let Z=m(()=>I.value?.format!==`offline`&&(I.value?.status==`run`||I.value?.status==`pause`)),Q=m(()=>I.value?.format!==`offline`&&(F.value.questions?.length||0)>0),$={Input:{border:`1px dashed black`,borderDisabled:`1px dashed black`,borderFocus:`1px solid black`,borderHover:`1px dashed black`,boxShadowFocus:`0 0 0 1px black`,caretColor:`black`,color:`transparent`,colorDisabled:`transparent`,colorFocus:`transparent`,fontSizeMedium:`18px`,placeholderColor:`black`,placeholderColorDisabled:`black`,textColor:`black`,textColorDisabled:`black`},Rate:{itemColor:`black`,itemColorHover:`#b8860b`,itemColorActive:`#b8860b`}};async function ue(){if(!B.value||!V.value||H.value.trim()===``){S.error(`Поставьте оценки и напишите отзыв`);return}U.value=!0,await v.CreateGameReview({gameID:Number(I.value?.ID),teamID:Number(D),password:k,rating:B.value,difficulty:V.value,text:H.value.trim()}),U.value=!1,z.value=!0,localStorage.setItem(R,`1`),S.success(`Спасибо за отзыв`)}async function ve(){await v.DeleteLastTeamAction({ID:Number(D)}),await K(),L.value=``}return ce(()=>{K()},2e3),(c,d)=>{let m=u(`n-space`);return i(),b(g,null,[F.value.background?(i(),b(`div`,{key:0,class:`case-background`,style:a({backgroundImage:`url(${JSON.stringify(F.value.background)})`}),"aria-hidden":`true`},null,4)):e(``,!0),x(`div`,{class:n([`center-block-custom bottom-margin smooth-scroll`,{"game-finished":I.value?.status===`finish`}]),ref_key:`scrollContainer`,ref:P},[I.value?.status===`finish`?(i(),b(`div`,fe,[o(A,{role:`status`},{default:_(()=>[...d[4]||=[x(`div`,{class:`font`},`Игра завершена. Спасибо за участие!`,-1)]]),_:1}),z.value?e(``,!0):(i(),l(A,{key:0,class:`review-block`},{default:_(()=>[d[7]||=x(`div`,{class:`font`},`Оцените игру`,-1),d[8]||=x(`hr`,{class:`questions-hr`},null,-1),o(p(O),{"theme-overrides":$},{default:_(()=>[d[5]||=x(`div`,{class:`review-rating font`},`Оценка`,-1),o(p(E),{value:B.value,"onUpdate:value":d[0]||=e=>B.value=e,count:5,class:`review-rate`},null,8,[`value`]),d[6]||=x(`div`,{class:`review-rating font`},`Сложность`,-1),o(p(E),{value:V.value,"onUpdate:value":d[1]||=e=>V.value=e,count:3,class:`review-rate`},null,8,[`value`]),o(p(w),{value:H.value,"onUpdate:value":d[2]||=e=>H.value=e,class:`review-input`,type:`textarea`,autosize:{minRows:4,maxRows:8},placeholder:`Расскажите, как прошла игра`},null,8,[`value`]),o(p(T),{justify:`end`,class:`questions-actions`},{default:_(()=>[x(`button`,{type:`button`,class:`paper-button`,disabled:U.value,onClick:ue},` Отправить отзыв `,8,pe)]),_:1})]),_:1})]),_:1}))])):(i(),b(`div`,me,[N.value?(i(),l(p(ie),{key:0,type:`error`,role:`alert`},{default:_(()=>[t(s(N.value),1)]),_:1})):e(``,!0),o(de,{addAction:q,allPlacesCount:F.value.places.length,newPlacesCount:j.value,gameStatus:I.value?.status||``},null,8,[`allPlacesCount`,`newPlacesCount`,`gameStatus`]),I.value?.format!==`offline`&&I.value?.status&&I.value.status!=`draft`&&F.value.introduction&&(F.value.introduction.text||F.value.introduction.audio)?(i(),l(ne,{key:1,introduction:F.value.introduction,mode:`show`},null,8,[`introduction`])):e(``,!0),Q.value&&I.value?.status&&I.value.status!=`draft`?(i(),l(A,{key:2,class:`questions-block`},{default:_(()=>[d[9]||=x(`div`,{class:`font`},`Вопросы дела`,-1),d[10]||=x(`hr`,{class:`questions-hr`},null,-1),d[11]||=x(`p`,{class:`questions-hint font`},` Ответьте на вопросы дела. Ответы можно менять, пока игра идёт. `,-1),o(p(O),{"theme-overrides":$},{default:_(()=>[(i(!0),b(g,null,r(F.value.questions,e=>(i(),b(`div`,{key:e.code,class:`question-item font`},[x(`div`,he,s(e.code)+`: `+s(e.text),1),o(p(w),{value:J.value[e.code||``],"onUpdate:value":t=>J.value[e.code||``]=t,type:`textarea`,autosize:{minRows:2,maxRows:6},disabled:!Z.value,placeholder:`Ваш ответ...`},null,8,[`value`,`onUpdate:value`,`disabled`])]))),128)),Z.value?(i(),l(p(T),{key:0,justify:`end`,class:`questions-actions`},{default:_(()=>[x(`button`,{type:`button`,class:`paper-button`,onClick:d[3]||=e=>X()},` Сохранить ответы `)]),_:1})):e(``,!0)]),_:1})]),_:1})):e(``,!0),(i(!0),b(g,null,r(F.value.places,(e,t)=>(i(),l(re,{place:e.place,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:`${I.value?.format}:${e.place.code}`,mcp:p(f).hasRole(`author`)&&M.value[t]?.mcp,addAction:q},null,8,[`place`,`mode`,`onUpdate:mode`,`mcp`]))),128)),F.value.places.length==0&&I.value?.status==`draft`?(i(),l(A,{key:3,class:`qr-main-block`},{default:_(()=>[o(m,{vertical:``},{default:_(()=>[d[12]||=x(`h2`,{class:`qr-main-block-text`},`Это код этого дела`,-1),d[13]||=x(`p`,{class:`qr-main-block-text`},`Поделись с командой`,-1),x(`div`,ge,[o(p(ae),{value:p(W),size:300,padding:0},null,8,[`value`])]),d[14]||=x(`p`,{class:`qr-main-block-text`},`Игра скоро начнется`,-1)]),_:1})]),_:1})):e(``,!0),p(f).hasRole(`author`)&&F.value.places.length>0?(i(),b(`div`,_e,[o(p(T),{justify:`end`},{default:_(()=>[o(p(te),{onClick:ve},{default:_(()=>[...d[15]||=[t(`Удалить последний ход`,-1)]]),_:1})]),_:1})])):e(``,!0)]))],2)],64)}}}),[[`__scopeId`,`data-v-a4fdc676`]]),ye=v({__name:`TeamStoryView`,setup(e){let t=y();return(e,n)=>(i(),l(ve,{key:p(t).fullPath}))}});export{ye as default}; \ No newline at end of file diff --git a/frontend/dist/assets/TicketView-DDSxhcrW.js b/frontend/dist/assets/TicketView-BrswqpT2.js similarity index 89% rename from frontend/dist/assets/TicketView-DDSxhcrW.js rename to frontend/dist/assets/TicketView-BrswqpT2.js index f6b6cc5..3c8d6e0 100644 --- a/frontend/dist/assets/TicketView-DDSxhcrW.js +++ b/frontend/dist/assets/TicketView-BrswqpT2.js @@ -1 +1 @@ -import{Dt as e,Kt as t,Ot as n,Rn as r,St as i,Ut as a,bn as o,bt as s,hn as c,ht as l,in as u,kt as d,l as f,t as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Button-lcMg8vK2.js";import{t as _}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as v}from"./QrCode-MTPi5t58.js";import{t as y}from"./datetime-BJNH0M1T.js";import{t as b}from"./MessagePaper-CFegNMJR.js";var x={class:`ticket-page center-block-custom`},S={class:`width700`},C={class:`ticket-card`},w={key:0,class:`error`,role:`alert`},T={class:`qr-block`},E={class:`used`,role:`status`},D={key:1,class:`used`,role:`status`},O=_(d({__name:`TicketPage`,setup(d){let _=f(),O=p(),k=s(()=>String(_.params.token||``)),A=c(),j=c(!1),M=c(``),N=s(()=>window.location.href);async function P(){j.value=!0,M.value=``;try{let e=await O.GetTicket({token:k.value});if(!e.ticket){M.value=`Билет не найден`;return}A.value=e.ticket}catch{M.value=`Не удалось загрузить билет. Попробуйте ещё раз.`}finally{j.value=!1}}return a(P),(a,s)=>(t(),m(`div`,x,[h(`div`,S,[n(b,null,{default:u(()=>[h(`div`,C,[s[7]||=h(`p`,{class:`ticket-kicker`},`ВЕЧЕРНИЙ ДЕТЕКТИВ · ПРОПУСК`,-1),s[8]||=h(`h1`,null,`Билет на игру`,-1),M.value?(t(),m(`p`,w,r(M.value),1)):A.value?(t(),m(l,{key:1},[h(`h2`,null,r(A.value.gameName),1),s[5]||=h(`hr`,null,null,-1),h(`dl`,null,[h(`div`,null,[s[0]||=h(`dt`,null,`Начало`,-1),h(`dd`,null,r(o(y)(A.value.startAt)),1)]),h(`div`,null,[s[1]||=h(`dt`,null,`Место`,-1),h(`dd`,null,r(A.value.location||`Онлайн`),1)])]),h(`div`,T,[n(o(v),{value:N.value,size:300,padding:0},null,8,[`value`])]),s[6]||=h(`p`,null,`Покажите этот QR-код организатору.`,-1),A.value.status===`used`?(t(),m(l,{key:0},[s[2]||=h(`hr`,null,null,-1),h(`p`,E,` Билет уже использован`+r(A.value.usedAt?` ${o(y)(A.value.usedAt)}`:``)+r(A.value.usedBy?` организатором ${A.value.usedBy}`:``)+`. `,1)],64)):A.value.gameStatus===`finish`?(t(),m(`p`,D,` Игра уже завершена. `)):(t(),m(l,{key:2},[s[3]||=h(`hr`,null,null,-1),s[4]||=h(`p`,{class:`active`,role:`status`},`Билет действителен.`,-1)],64))],64)):(t(),i(o(g),{key:2,loading:j.value,onClick:P},{default:u(()=>[e(r(j.value?`Загрузка`:`Повторить`),1)]),_:1},8,[`loading`]))])]),_:1})])]))}}),[[`__scopeId`,`data-v-5f755593`]]),k=d({__name:`TicketView`,setup(e){return(e,n)=>(t(),i(O))}});export{k as default}; \ No newline at end of file +import{Dt as e,Kt as t,Ot as n,Rn as r,St as i,Ut as a,bn as o,bt as s,hn as c,ht as l,in as u,kt as d,l as f,t as p,wt as m,xt as h}from"./client-Bz0sY7Lm.js";import{t as g}from"./Button-MBUKfT_Z.js";import{t as _}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as v}from"./QrCode-MTPi5t58.js";import{t as y}from"./datetime-BJNH0M1T.js";import{t as b}from"./MessagePaper-C6R1Irzd.js";var x={class:`ticket-page center-block-custom`},S={class:`width700`},C={class:`ticket-card`},w={key:0,class:`error`,role:`alert`},T={class:`qr-block`},E={class:`used`,role:`status`},D={key:1,class:`used`,role:`status`},O=_(d({__name:`TicketPage`,setup(d){let _=f(),O=p(),k=s(()=>String(_.params.token||``)),A=c(),j=c(!1),M=c(``),N=s(()=>window.location.href);async function P(){j.value=!0,M.value=``;try{let e=await O.GetTicket({token:k.value});if(!e.ticket){M.value=`Билет не найден`;return}A.value=e.ticket}catch{M.value=`Не удалось загрузить билет. Попробуйте ещё раз.`}finally{j.value=!1}}return a(P),(a,s)=>(t(),m(`div`,x,[h(`div`,S,[n(b,null,{default:u(()=>[h(`div`,C,[s[7]||=h(`p`,{class:`ticket-kicker`},`ВЕЧЕРНИЙ ДЕТЕКТИВ · ПРОПУСК`,-1),s[8]||=h(`h1`,null,`Билет на игру`,-1),M.value?(t(),m(`p`,w,r(M.value),1)):A.value?(t(),m(l,{key:1},[h(`h2`,null,r(A.value.gameName),1),s[5]||=h(`hr`,null,null,-1),h(`dl`,null,[h(`div`,null,[s[0]||=h(`dt`,null,`Начало`,-1),h(`dd`,null,r(o(y)(A.value.startAt)),1)]),h(`div`,null,[s[1]||=h(`dt`,null,`Место`,-1),h(`dd`,null,r(A.value.location||`Онлайн`),1)])]),h(`div`,T,[n(o(v),{value:N.value,size:300,padding:0},null,8,[`value`])]),s[6]||=h(`p`,null,`Покажите этот QR-код организатору.`,-1),A.value.status===`used`?(t(),m(l,{key:0},[s[2]||=h(`hr`,null,null,-1),h(`p`,E,` Билет уже использован`+r(A.value.usedAt?` ${o(y)(A.value.usedAt)}`:``)+r(A.value.usedBy?` организатором ${A.value.usedBy}`:``)+`. `,1)],64)):A.value.gameStatus===`finish`?(t(),m(`p`,D,` Игра уже завершена. `)):(t(),m(l,{key:2},[s[3]||=h(`hr`,null,null,-1),s[4]||=h(`p`,{class:`active`,role:`status`},`Билет действителен.`,-1)],64))],64)):(t(),i(o(g),{key:2,loading:j.value,onClick:P},{default:u(()=>[e(r(j.value?`Загрузка`:`Повторить`),1)]),_:1},8,[`loading`]))])]),_:1})])]))}}),[[`__scopeId`,`data-v-5f755593`]]),k=d({__name:`TicketView`,setup(e){return(e,n)=>(t(),i(O))}});export{k as default}; \ No newline at end of file diff --git a/frontend/dist/assets/Upload-B7-f9-Dk.js b/frontend/dist/assets/Upload-B7-f9-Dk.js deleted file mode 100644 index 9f1d745..0000000 --- a/frontend/dist/assets/Upload-B7-f9-Dk.js +++ /dev/null @@ -1,440 +0,0 @@ -import{G as e,H as t,K as n,Ln as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,Y as u,an as d,at as f,bt as p,d as m,dt as h,f as g,g as _,gt as v,hn as y,ht as b,it as x,kt as S,nn as C,nt as w,ot as T,p as E,q as D,qt as O,rn as k,st as A,tt as j,vn as M,yn as ee}from"./client-Bz0sY7Lm.js";import{u as te}from"./Follower-C1zQmxY2.js";import{d as N,u as P}from"./Card-D1LVu21r.js";import{f as ne,i as re,n as ie,p as ae}from"./Suffix-JLavbuLO.js";import{t as F}from"./use-merged-state-z45UzW9G.js";import{a as I,t as L}from"./Button-lcMg8vK2.js";import{n as R,t as oe}from"./Popover-C-ZjsRrv.js";import{i as z,s as B}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{o as V}from"./get-peGRPzxS.js";import{n as H}from"./use-form-item-Bl3X3aXB.js";import{t as U}from"./Add-BlaQeLtQ.js";import{n as se}from"./Input-DeqNzuJd.js";import{t as W}from"./fade-in.cssr-0rRavIDG.js";import{$ as ce,B as le,G,H as ue,J as de,K as fe,R as K,S as q,U as J,V as pe,W as Y,et as me,f as he,it as ge,k as _e,q as X,s as ve,st as ye,tt as be}from"./index-6B3OmSLg.js";function xe(e,t){if(!e)return;let n=document.createElement(`a`);n.href=e,t!==void 0&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Se(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++ii(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z`}))))),yt=G(`cancel`,()=>i(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z`}))))),bt=G(`download`,()=>i(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z`}))))),xt=S({name:`ResizeSmall`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},i(`g`,{fill:`none`},i(`path`,{d:`M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z`,fill:`currentColor`})))}}),St=G(`retry`,()=>i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M320,146s24.36-12-64-12A160,160,0,1,0,416,294`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;`}),i(`polyline`,{points:`256 58 336 138 256 218`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),Ct=G(`rotateClockwise`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z`,fill:`currentColor`}),i(`path`,{d:`M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z`,fill:`currentColor`}))),wt=G(`rotateClockwise`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z`,fill:`currentColor`}),i(`path`,{d:`M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z`,fill:`currentColor`}))),Tt=G(`trash`,()=>i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`rect`,{x:`32`,y:`64`,width:`448`,height:`80`,rx:`16`,ry:`16`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`line`,{x1:`312`,y1:`240`,x2:`200`,y2:`352`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`line`,{x1:`312`,y1:`352`,x2:`200`,y2:`240`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),Et=G(`zoomIn`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z`,fill:`currentColor`}),i(`path`,{d:`M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z`,fill:`currentColor`}))),Dt=G(`zoomOut`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z`,fill:`currentColor`}),i(`path`,{d:`M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z`,fill:`currentColor`}))),Ot=I&&`loading`in document.createElement(`img`);function kt(e={}){let{root:t=null}=e;return{hash:`${e.rootMargin||`0px 0px 0px 0px`}-${Array.isArray(e.threshold)?e.threshold.join(`,`):e.threshold??`0`}`,options:Object.assign(Object.assign({},e),{root:(typeof t==`string`?document.querySelector(t):t)||document.documentElement})}}var At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=(e,t,n)=>{if(!e)return()=>{};let r=kt(t),{root:i}=r.options,a,o=At.get(i);o?a=o:(a=new Map,At.set(i,a));let s,c;a.has(r.hash)?(c=a.get(r.hash),c[1].has(e)||(s=c[0],c[1].add(e),s.observe(e))):(s=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=jt.get(e.target),n=Mt.get(e.target);t&&t(),n&&(n.value=!0)}})},r.options),s.observe(e),c=[s,new Set([e])],a.set(r.hash,c));let l=!1,u=()=>{l||(jt.delete(e),Mt.delete(e),l=!0,c[1].has(e)&&(c[0].unobserve(e),c[1].delete(e)),c[1].size<=0&&a.delete(r.hash),a.size||At.delete(i))};return jt.set(e,u),Mt.set(e,n),u},Pt=S({name:`Tooltip`,props:Object.assign(Object.assign({},R),E.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=s(e),n=E(`Tooltip`,`-tooltip`,void 0,q,e,t),r=y(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(e){r.value.setShow(e)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:p(()=>n.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return i(oe,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}});function Ft(){return{toolbarIconColor:`rgba(255, 255, 255, .9)`,toolbarColor:`rgba(0, 0, 0, .35)`,toolbarBoxShadow:`none`,toolbarBorderRadius:`24px`}}var It=g({name:`Image`,common:m,peers:{Tooltip:q},self:Ft});function Lt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z`,fill:`currentColor`}))}function Rt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z`,fill:`currentColor`}))}function zt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z`,fill:`currentColor`}))}var Bt=Object.assign(Object.assign({},E.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),Vt=u(`n-image`),Ht=j([j(`body >`,[w(`image-container`,`position: fixed;`)]),w(`image-preview-container`,` - position: fixed; - left: 0; - right: 0; - top: 0; - bottom: 0; - display: flex; - `),w(`image-preview-overlay`,` - z-index: -1; - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - background: rgba(0, 0, 0, .3); - `,[W()]),w(`image-preview-toolbar`,` - z-index: 1; - position: absolute; - left: 50%; - transform: translateX(-50%); - border-radius: var(--n-toolbar-border-radius); - height: 48px; - bottom: 40px; - padding: 0 12px; - background: var(--n-toolbar-color); - box-shadow: var(--n-toolbar-box-shadow); - color: var(--n-toolbar-icon-color); - transition: color .3s var(--n-bezier); - display: flex; - align-items: center; - `,[w(`base-icon`,` - padding: 0 8px; - font-size: 28px; - cursor: pointer; - `),W()]),w(`image-preview-wrapper`,` - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - display: flex; - pointer-events: none; - `,[ie()]),w(`image-preview`,` - user-select: none; - -webkit-user-select: none; - pointer-events: all; - margin: auto; - max-height: calc(100vh - 32px); - max-width: calc(100vw - 32px); - transition: transform .3s var(--n-bezier); - `),w(`image`,` - display: inline-flex; - max-height: 100%; - max-width: 100%; - `,[T(`preview-disabled`,` - cursor: pointer; - `),j(`img`,` - border-radius: inherit; - `)])]),Ut=32,Wt=S({name:`ImagePreview`,props:Object.assign(Object.assign({},Bt),{src:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onNext:Function,onPrev:Function,onClose:[Function,Array]}),setup(e){let{src:n}=ee(e),{mergedClsPrefixRef:o}=s(e),c=E(`Image`,`-image`,Ht,It,e,o),u=null,d=y(null),f=y(null),m=y(!1),{localeRef:h}=re(`Image`),g=y(e.defaultShow),_=F(M(e,`show`),g);function v(){let{value:e}=f;if(!u||!e)return;let{style:t}=e,n=u.getBoundingClientRect();t.transformOrigin=`${n.left+n.width/2}px ${n.top+n.height/2}px`}function b(t){var n,r;switch(t.key){case` `:t.preventDefault();break;case`ArrowLeft`:(n=e.onPrev)==null||n.call(e);break;case`ArrowRight`:(r=e.onNext)==null||r.call(e);break;case`ArrowUp`:t.preventDefault(),q();break;case`ArrowDown`:t.preventDefault(),J();break;case`Escape`:me();break}}function x(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&B(n,t),r&&B(r,t),g.value=t,m.value=!0}C(_,e=>{e?N(`keydown`,document,b):P(`keydown`,document,b)}),l(()=>{P(`keydown`,document,b)});let S=0,w=0,T=0,D=0,O=0,k=0,A=0,j=0,ne=!1;function ie(e){let{clientX:t,clientY:n}=e;T=t-S,D=n-w,te(Y)}function ae(e){let{mouseUpClientX:t,mouseUpClientY:n,mouseDownClientX:r,mouseDownClientY:i}=e,a=r-t,o=i-n;return{moveVerticalDirection:`vertical${o>0?`Top`:`Bottom`}`,moveHorizontalDirection:`horizontal${a>0?`Left`:`Right`}`,deltaHorizontal:a,deltaVertical:o}}function I(e){let{value:t}=d;if(!t)return{offsetX:0,offsetY:0};let n=t.getBoundingClientRect(),{moveVerticalDirection:r,moveHorizontalDirection:i,deltaHorizontal:a,deltaVertical:o}=e||{},s=0,c=0;return s=n.width<=window.innerWidth?0:n.left>0?(n.width-window.innerWidth)/2:n.right0?(n.height-window.innerHeight)/2:n.bottom.5){let e=H;--V,H=Math.max(.5,z**V);let t=e-H;Y(!1);let n=I();H+=t,Y(!1),H-=t,T=n.offsetX,D=n.offsetY,Y()}}function pe(){let e=n.value;e&&xe(e,void 0)}function Y(e=!0){let{value:t}=d;if(!t)return;let{style:n}=t,i=r(R?.previewedImgPropsRef.value?.style),a=``;if(typeof i==`string`)a=`${i};`;else for(let e in i)a+=`${_t(e)}: ${i[e]};`;let o=`transform-origin: center; transform: translateX(${T}px) translateY(${D}px) rotate(${U}deg) scale(${H});`;ne?n.cssText=`${a}cursor: grabbing; transition: none;${o}`:n.cssText=`${a}cursor: grab;${o}${e?``:`transition: none;`}`,e||t.offsetHeight}function me(){if(_.value){let{onClose:t}=e;t&&B(t),x(!1),g.value=!1}}function he(){H=K(),V=Math.ceil(Math.log(H)/Math.log(z)),T=0,D=0,Y()}let ge={setThumbnailEl:e=>{u=e}};function _e(t,n){if(e.showToolbarTooltip){let{value:e}=c;return i(Pt,{to:!1,theme:e.peers.Tooltip,themeOverrides:e.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>h.value[n],trigger:()=>t})}else return t}let X=p(()=>{let{common:{cubicBezierEaseInOut:e},self:{toolbarIconColor:t,toolbarBorderRadius:n,toolbarBoxShadow:r,toolbarColor:i}}=c.value;return{"--n-bezier":e,"--n-toolbar-icon-color":t,"--n-toolbar-color":i,"--n-toolbar-border-radius":n,"--n-toolbar-box-shadow":r}}),{inlineThemeDisabled:ve}=s(),ye=ve?t(`image-preview`,void 0,X,e):void 0;function be(e){e.preventDefault()}return Object.assign({clsPrefix:o,previewRef:d,previewWrapperRef:f,previewSrc:n,mergedShow:_,appear:ce(),displayed:m,previewedImgProps:R?.previewedImgPropsRef,handleWheel:be,handlePreviewMousedown:oe,handlePreviewDblclick:se,syncTransformOrigin:v,handleAfterLeave:()=>{W(),U=0,m.value=!1},handleDragStart:e=>{var t,n;(n=(t=R?.previewedImgPropsRef.value)?.onDragstart)==null||n.call(t,e),e.preventDefault()},zoomIn:q,zoomOut:J,handleDownloadClick:pe,rotateCounterclockwise:ue,rotateClockwise:de,handleSwitchPrev:le,handleSwitchNext:G,withTooltip:_e,resizeToOrignalImageSize:he,cssVars:ve?void 0:X,themeClass:ye?.themeClass,onRender:ye?.onRender,doUpdateShow:x,close:me},ge)},render(){var e;let{clsPrefix:t,renderToolbar:n,withTooltip:r}=this,a=r(i(X,{clsPrefix:t,onClick:this.handleSwitchPrev},{default:Lt}),`tipPrevious`),o=r(i(X,{clsPrefix:t,onClick:this.handleSwitchNext},{default:Rt}),`tipNext`),s=r(i(X,{clsPrefix:t,onClick:this.rotateCounterclockwise},{default:()=>i(wt,null)}),`tipCounterclockwise`),c=r(i(X,{clsPrefix:t,onClick:this.rotateClockwise},{default:()=>i(Ct,null)}),`tipClockwise`),l=r(i(X,{clsPrefix:t,onClick:this.resizeToOrignalImageSize},{default:()=>i(xt,null)}),`tipOriginalSize`),u=r(i(X,{clsPrefix:t,onClick:this.zoomOut},{default:()=>i(Dt,null)}),`tipZoomOut`),f=r(i(X,{clsPrefix:t,onClick:this.handleDownloadClick},{default:()=>i(bt,null)}),`tipDownload`),p=r(i(X,{clsPrefix:t,onClick:()=>this.close()},{default:zt}),`tipClose`),m=r(i(X,{clsPrefix:t,onClick:this.zoomIn},{default:()=>i(Et,null)}),`tipZoomIn`);return i(b,null,(e=this.$slots).default?.call(e),i(ne,{show:this.mergedShow},{default:()=>{var e;return this.mergedShow||this.displayed?((e=this.onRender)==null||e.call(this),d(i(`div`,{ref:`containerRef`,class:[`${t}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},i(ge,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?i(`div`,{class:`${t}-image-preview-overlay`,onClick:()=>this.close()}):null}),this.showToolbar?i(ge,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?i(`div`,{class:`${t}-image-preview-toolbar`},n?n({nodes:{prev:a,next:o,rotateCounterclockwise:s,rotateClockwise:c,resizeToOriginalSize:l,zoomOut:u,zoomIn:m,download:f,close:p}}):i(b,null,this.onPrev?i(b,null,a,o):null,s,c,l,u,m,f,p)):null}):null,i(ge,{name:`fade-in-scale-up-transition`,onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{let{previewedImgProps:e={}}=this;return d(i(`div`,{class:`${t}-image-preview-wrapper`,ref:`previewWrapperRef`},i(`img`,Object.assign({},e,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${t}-image-preview`,e.class],key:this.previewSrc,src:this.previewSrc,ref:`previewRef`,onDragstart:this.handleDragStart}))),[[ye,this.mergedShow]])}})),[[ae,{enabled:this.mergedShow}]])):null}}))}}),Gt=u(`n-image-group`),Kt=S({name:`ImageGroup`,props:Object.assign(Object.assign({},Bt),{srcList:Array,current:Number,defaultCurrent:{type:Number,default:0},show:{type:Boolean,default:void 0},defaultShow:Boolean,onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],onUpdateCurrent:[Function,Array],"onUpdate:current":[Function,Array]}),setup(e){let{mergedClsPrefixRef:t}=s(e),r=`c${be()}`,i=y(null),a=y(e.defaultShow),o=F(M(e,`show`),a),c=y(new Map),l=p(()=>{if(e.srcList){let t=new Map;return e.srcList.forEach((e,n)=>{t.set(`p${n}`,e)}),t}return c.value}),u=p(()=>Array.from(l.value.keys())),d=()=>u.value.length;function f(t,r){e.srcList&&n(`image-group`,"`n-image` can't be placed inside `n-image-group` when image group's `src-list` prop is set.");let i=`r${t}`;return c.value.has(`r${i}`)||c.value.set(i,r),function(){c.value.has(i)||c.value.delete(i)}}let m=y(e.defaultCurrent),h=F(M(e,`current`),m),g=t=>{if(t!==h.value){let{onUpdateCurrent:n,"onUpdate:current":r}=e;n&&B(n,t),r&&B(r,t),m.value=t}},_=p(()=>u.value[h.value]),v=e=>{let t=u.value.indexOf(e);t!==h.value&&g(t)},b=p(()=>l.value.get(_.value));function x(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&B(n,t),r&&B(r,t),a.value=t}function S(){x(!1)}let C=p(()=>{let e=(e,t)=>{for(let n=e;n<=t;n++){let e=u.value[n];if(l.value.get(e))return n}},t=e(h.value+1,d()-1);return t===void 0?e(0,h.value-1):t}),w=p(()=>{let e=(e,t)=>{for(let n=e;n>=t;n--){let e=u.value[n];if(l.value.get(e))return n}},t=e(h.value-1,0);return t===void 0?e(d()-1,h.value+1):t});function T(t){var n,r;t===1?(w.value!==void 0&&g(C.value),(n=e.onPreviewNext)==null||n.call(e)):(C.value!==void 0&&g(w.value),(r=e.onPreviewPrev)==null||r.call(e))}return O(Gt,{mergedClsPrefixRef:t,registerImageUrl:f,setThumbnailEl:e=>{var t;(t=i.value)==null||t.setThumbnailEl(e)},toggleShow:e=>{x(!0),v(e)},groupId:r,renderToolbarRef:M(e,`renderToolbar`)}),{mergedClsPrefix:t,previewInstRef:i,mergedShow:o,src:b,onClose:S,next:()=>{T(1)},prev:()=>{T(-1)}}},render(){return i(Wt,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,onPrev:this.prev,onNext:this.next,src:this.src,show:this.mergedShow,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,onClose:this.onClose},this.$slots)}}),qt=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:`fill`},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},Bt),Jt=0,Yt=S({name:`Image`,props:qt,slots:Object,inheritAttrs:!1,setup(e){let t=y(null),n=y(!1),r=y(null),i=a(Gt,null),{mergedClsPrefixRef:o}=i||s(e),u=p(()=>e.previewSrc||e.src),d=y(!1),f=Jt++,m=()=>{if(e.previewDisabled||n.value)return;if(i){i.setThumbnailEl(t.value),i.toggleShow(`r${f}`);return}let{value:a}=r;a&&(a.setThumbnailEl(t.value),d.value=!0)},h={click:()=>{m()},showPreview:m},g=y(!e.lazy);c(()=>{var e;(e=t.value)==null||e.setAttribute(`data-group-id`,i?.groupId||``)}),c(()=>{if(e.lazy&&e.intersectionObserverOptions){let n,r=k(()=>{n?.(),n=void 0,n=Nt(t.value,e.intersectionObserverOptions,g)});l(()=>{r(),n?.()})}}),k(()=>{var t;e.src||(t=e.imgProps)==null||t.src,n.value=!1}),k(e=>{let t=(i?.registerImageUrl)?.call(i,f,u.value||``);e(()=>{t?.()})});function _(t){var n,r;h.showPreview(),(r=(n=e.imgProps)?.onClick)==null||r.call(n,t)}function v(){d.value=!1}let b=y(!1);return O(Vt,{previewedImgPropsRef:M(e,`previewedImgProps`)}),Object.assign({mergedClsPrefix:o,groupId:i?.groupId,previewInstRef:r,imageRef:t,mergedPreviewSrc:u,showError:n,shouldStartLoading:g,loaded:b,mergedOnClick:e=>{_(e)},onPreviewClose:v,mergedOnError:t=>{if(!g.value)return;n.value=!0;let{onError:r,imgProps:{onError:i}={}}=e;r?.(t),i?.(t)},mergedOnLoad:t=>{let{onLoad:n,imgProps:{onLoad:r}={}}=e;n?.(t),r?.(t),b.value=!0},previewShow:d},h)},render(){var e;let{mergedClsPrefix:t,imgProps:n={},loaded:r,$attrs:a,lazy:o}=this,s=z(this.$slots.error,()=>[]),c=(e=this.$slots).placeholder?.call(e),l=this.src||n.src,u=this.showError&&s.length?s:i(`img`,Object.assign(Object.assign({},n),{ref:`imageRef`,width:this.width||n.width,height:this.height||n.height,src:this.showError?this.fallbackSrc:o&&this.intersectionObserverOptions?this.shouldStartLoading?l:void 0:l,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:Ot&&o&&!this.intersectionObserverOptions?`lazy`:`eager`,style:[n.style||``,c&&!r?{height:`0`,width:`0`,visibility:`hidden`}:``,{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return i(`div`,Object.assign({},a,{role:`none`,class:[a.class,`${t}-image`,(this.previewDisabled||this.showError)&&`${t}-image--preview-disabled`]}),this.groupId?u:i(Wt,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,src:this.mergedPreviewSrc,show:!this.previewDisabled&&this.previewShow,onClose:this.onPreviewClose},{default:()=>u}),!r&&c)}}),Xt={success:i(ue,null),error:i(Y,null),warning:i(pe,null),info:i(J,null)},Zt=S({name:`ProgressCircle`,props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){let n=p(()=>{let t=`gradient`,{fillColor:n}=e;return typeof n==`object`?`${t}-${h(JSON.stringify(n))}`:t});function r(t,r,i,a){let{gapDegree:o,viewBoxWidth:s,strokeWidth:c}=e,l=50+c/2,u=`M ${l},${l} m 0,50 - a 50,50 0 1 1 0,-100 - a 50,50 0 1 1 0,100`,d=Math.PI*2*50;return{pathString:u,pathStyle:{stroke:a===`rail`?i:typeof e.fillColor==`object`?`url(#${n.value})`:i,strokeDasharray:`${Math.min(t,100)/100*(d-o)}px ${s*8}px`,strokeDashoffset:`-${o/2}px`,transformOrigin:r?`center`:void 0,transform:r?`rotate(${r}deg)`:void 0}}}let a=()=>{let t=typeof e.fillColor==`object`,r=t?e.fillColor.stops[0]:``,a=t?e.fillColor.stops[1]:``;return t&&i(`defs`,null,i(`linearGradient`,{id:n.value,x1:`0%`,y1:`100%`,x2:`100%`,y2:`0%`},i(`stop`,{offset:`0%`,"stop-color":r}),i(`stop`,{offset:`100%`,"stop-color":a})))};return()=>{let{fillColor:n,railColor:o,strokeWidth:s,offsetDegree:c,status:l,percentage:u,showIndicator:d,indicatorTextColor:f,unit:p,gapOffsetDegree:m,clsPrefix:h}=e,{pathString:g,pathStyle:_}=r(100,0,o,`rail`),{pathString:v,pathStyle:y}=r(u,c,n,`fill`),b=100+s;return i(`div`,{class:`${h}-progress-content`,role:`none`},i(`div`,{class:`${h}-progress-graph`,"aria-hidden":!0},i(`div`,{class:`${h}-progress-graph-circle`,style:{transform:m?`rotate(${m}deg)`:void 0}},i(`svg`,{viewBox:`0 0 ${b} ${b}`},a(),i(`g`,null,i(`path`,{class:`${h}-progress-graph-circle-rail`,d:g,"stroke-width":s,"stroke-linecap":`round`,fill:`none`,style:_})),i(`g`,null,i(`path`,{class:[`${h}-progress-graph-circle-fill`,u===0&&`${h}-progress-graph-circle-fill--empty`],d:v,"stroke-width":s,"stroke-linecap":`round`,fill:`none`,style:y}))))),d?i(`div`,null,t.default?i(`div`,{class:`${h}-progress-custom-content`,role:`none`},t.default()):l==="default"?i(`div`,{class:`${h}-progress-text`,style:{color:f},role:`none`},i(`span`,{class:`${h}-progress-text__percentage`},u),i(`span`,{class:`${h}-progress-text__unit`},p)):i(`div`,{class:`${h}-progress-icon`,"aria-hidden":!0},i(X,{clsPrefix:h},{default:()=>Xt[l]}))):null)}}}),Qt={success:i(ue,null),error:i(Y,null),warning:i(pe,null),info:i(J,null)},$t=S({name:`ProgressLine`,props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:`%`},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){let n=p(()=>V(e.height)),r=p(()=>typeof e.fillColor==`object`?`linear-gradient(to right, ${e.fillColor?.stops[0]} , ${e.fillColor?.stops[1]})`:e.fillColor),a=p(()=>e.railBorderRadius===void 0?e.height===void 0?``:V(e.height,{c:.5}):V(e.railBorderRadius)),o=p(()=>e.fillBorderRadius===void 0?e.railBorderRadius===void 0?e.height===void 0?``:V(e.height,{c:.5}):V(e.railBorderRadius):V(e.fillBorderRadius));return()=>{let{indicatorPlacement:s,railColor:c,railStyle:l,percentage:u,unit:d,indicatorTextColor:f,status:p,showIndicator:m,processing:h,clsPrefix:g}=e;return i(`div`,{class:`${g}-progress-content`,role:`none`},i(`div`,{class:`${g}-progress-graph`,"aria-hidden":!0},i(`div`,{class:[`${g}-progress-graph-line`,{[`${g}-progress-graph-line--indicator-${s}`]:!0}]},i(`div`,{class:`${g}-progress-graph-line-rail`,style:[{backgroundColor:c,height:n.value,borderRadius:a.value},l]},i(`div`,{class:[`${g}-progress-graph-line-fill`,h&&`${g}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:n.value,lineHeight:n.value,borderRadius:o.value}},s===`inside`?i(`div`,{class:`${g}-progress-graph-line-indicator`,style:{color:f}},t.default?t.default():`${u}${d}`):null)))),m&&s===`outside`?i(`div`,null,t.default?i(`div`,{class:`${g}-progress-custom-content`,style:{color:f},role:`none`},t.default()):p==="default"?i(`div`,{role:`none`,class:`${g}-progress-icon ${g}-progress-icon--as-text`,style:{color:f}},u,d):i(`div`,{class:`${g}-progress-icon`,"aria-hidden":!0},i(X,{clsPrefix:g},{default:()=>Qt[p]}))):null)}}});function en(e,t,n=100){return`m ${n/2} ${n/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var tn=S({name:`ProgressMultipleCircle`,props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){let n=p(()=>e.percentage.map((t,n)=>`${Math.PI*t/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*n)-e.circleGap*n)*2}, ${e.viewBoxWidth*8}`)),r=(t,n)=>{let r=e.fillColor[n],a=typeof r==`object`?r.stops[0]:``,o=typeof r==`object`?r.stops[1]:``;return typeof e.fillColor[n]==`object`&&i(`linearGradient`,{id:`gradient-${n}`,x1:`100%`,y1:`0%`,x2:`0%`,y2:`100%`},i(`stop`,{offset:`0%`,"stop-color":a}),i(`stop`,{offset:`100%`,"stop-color":o}))};return()=>{let{viewBoxWidth:a,strokeWidth:o,circleGap:s,showIndicator:c,fillColor:l,railColor:u,railStyle:d,percentage:f,clsPrefix:p}=e;return i(`div`,{class:`${p}-progress-content`,role:`none`},i(`div`,{class:`${p}-progress-graph`,"aria-hidden":!0},i(`div`,{class:`${p}-progress-graph-circle`},i(`svg`,{viewBox:`0 0 ${a} ${a}`},i(`defs`,null,f.map((e,t)=>r(e,t))),f.map((e,t)=>i(`g`,{key:t},i(`path`,{class:`${p}-progress-graph-circle-rail`,d:en(a/2-o/2*(1+2*t)-s*t,o,a),"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:[{strokeDashoffset:0,stroke:u[t]},d[t]]}),i(`path`,{class:[`${p}-progress-graph-circle-fill`,e===0&&`${p}-progress-graph-circle-fill--empty`],d:en(a/2-o/2*(1+2*t)-s*t,o,a),"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:{strokeDasharray:n.value[t],strokeDashoffset:0,stroke:typeof l[t]==`object`?`url(#gradient-${t})`:l[t]}})))))),c&&t.default?i(`div`,null,i(`div`,{class:`${p}-progress-text`},t.default())):null)}}}),nn=j([w(`progress`,{display:`inline-block`},[w(`progress-icon`,` - color: var(--n-icon-color); - transition: color .3s var(--n-bezier); - `),f(`line`,` - width: 100%; - display: block; - `,[w(`progress-content`,` - display: flex; - align-items: center; - `,[w(`progress-graph`,{flex:1})]),w(`progress-custom-content`,{marginLeft:`14px`}),w(`progress-icon`,` - width: 30px; - padding-left: 14px; - height: var(--n-icon-size-line); - line-height: var(--n-icon-size-line); - font-size: var(--n-icon-size-line); - `,[f(`as-text`,` - color: var(--n-text-color-line-outer); - text-align: center; - width: 40px; - font-size: var(--n-font-size); - padding-left: 4px; - transition: color .3s var(--n-bezier); - `)])]),f(`circle, dashboard`,{width:`120px`},[w(`progress-custom-content`,` - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: flex; - align-items: center; - justify-content: center; - `),w(`progress-text`,` - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: flex; - align-items: center; - color: inherit; - font-size: var(--n-font-size-circle); - color: var(--n-text-color-circle); - font-weight: var(--n-font-weight-circle); - transition: color .3s var(--n-bezier); - white-space: nowrap; - `),w(`progress-icon`,` - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: flex; - align-items: center; - color: var(--n-icon-color); - font-size: var(--n-icon-size-circle); - `)]),f(`multiple-circle`,` - width: 200px; - color: inherit; - `,[w(`progress-text`,` - font-weight: var(--n-font-weight-circle); - color: var(--n-text-color-circle); - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: flex; - align-items: center; - justify-content: center; - transition: color .3s var(--n-bezier); - `)]),w(`progress-content`,{position:`relative`}),w(`progress-graph`,{position:`relative`},[w(`progress-graph-circle`,[j(`svg`,{verticalAlign:`bottom`}),w(`progress-graph-circle-fill`,` - stroke: var(--n-fill-color); - transition: - opacity .3s var(--n-bezier), - stroke .3s var(--n-bezier), - stroke-dasharray .3s var(--n-bezier); - `,[f(`empty`,{opacity:0})]),w(`progress-graph-circle-rail`,` - transition: stroke .3s var(--n-bezier); - overflow: hidden; - stroke: var(--n-rail-color); - `)]),w(`progress-graph-line`,[f(`indicator-inside`,[w(`progress-graph-line-rail`,` - height: 16px; - line-height: 16px; - border-radius: 10px; - `,[w(`progress-graph-line-fill`,` - height: inherit; - border-radius: 10px; - `),w(`progress-graph-line-indicator`,` - background: #0000; - white-space: nowrap; - text-align: right; - margin-left: 14px; - margin-right: 14px; - height: inherit; - font-size: 12px; - color: var(--n-text-color-line-inner); - transition: color .3s var(--n-bezier); - `)])]),f(`indicator-inside-label`,` - height: 16px; - display: flex; - align-items: center; - `,[w(`progress-graph-line-rail`,` - flex: 1; - transition: background-color .3s var(--n-bezier); - `),w(`progress-graph-line-indicator`,` - background: var(--n-fill-color); - font-size: 12px; - transform: translateZ(0); - display: flex; - vertical-align: middle; - height: 16px; - line-height: 16px; - padding: 0 10px; - border-radius: 10px; - position: absolute; - white-space: nowrap; - color: var(--n-text-color-line-inner); - transition: - right .2s var(--n-bezier), - color .3s var(--n-bezier), - background-color .3s var(--n-bezier); - `)]),w(`progress-graph-line-rail`,` - position: relative; - overflow: hidden; - height: var(--n-rail-height); - border-radius: 5px; - background-color: var(--n-rail-color); - transition: background-color .3s var(--n-bezier); - `,[w(`progress-graph-line-fill`,` - background: var(--n-fill-color); - position: relative; - border-radius: 5px; - height: inherit; - width: 100%; - max-width: 0%; - transition: - background-color .3s var(--n-bezier), - max-width .2s var(--n-bezier); - `,[f(`processing`,[j(`&::after`,` - content: ""; - background-image: var(--n-line-bg-processing); - animation: progress-processing-animation 2s var(--n-bezier) infinite; - `)])])])])])]),j(`@keyframes progress-processing-animation`,` - 0% { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 100%; - opacity: 1; - } - 66% { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - opacity: 0; - } - 100% { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - opacity: 0; - } - `)]),rn=S({name:`Progress`,props:Object.assign(Object.assign({},E.props),{processing:Boolean,type:{type:String,default:`line`},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:`default`},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:`%`},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:`outside`},indicatorPlacement:{type:String,default:`outside`},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),setup(e){let n=p(()=>e.indicatorPlacement||e.indicatorPosition),r=p(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type===`dashboard`)return 75}),{mergedClsPrefixRef:i,inlineThemeDisabled:a}=s(e),o=E(`Progress`,`-progress`,nn,he,e,i),c=p(()=>{let{status:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontSize:r,fontSizeCircle:i,railColor:a,railHeight:s,iconSizeCircle:c,iconSizeLine:l,textColorCircle:u,textColorLineInner:d,textColorLineOuter:f,lineBgProcessing:p,fontWeightCircle:m,[A(`iconColor`,t)]:h,[A(`fillColor`,t)]:g}}=o.value;return{"--n-bezier":n,"--n-fill-color":g,"--n-font-size":r,"--n-font-size-circle":i,"--n-font-weight-circle":m,"--n-icon-color":h,"--n-icon-size-circle":c,"--n-icon-size-line":l,"--n-line-bg-processing":p,"--n-rail-color":a,"--n-rail-height":s,"--n-text-color-circle":u,"--n-text-color-line-inner":d,"--n-text-color-line-outer":f}}),l=a?t(`progress`,p(()=>e.status[0]),c,e):void 0;return{mergedClsPrefix:i,mergedIndicatorPlacement:n,gapDeg:r,cssVars:a?void 0:c,themeClass:l?.themeClass,onRender:l?.onRender}},render(){let{type:e,cssVars:t,indicatorTextColor:n,showIndicator:r,status:a,railColor:o,railStyle:s,color:c,percentage:l,viewBoxWidth:u,strokeWidth:d,mergedIndicatorPlacement:f,unit:p,borderRadius:m,fillBorderRadius:h,height:g,processing:_,circleGap:v,mergedClsPrefix:y,gapDeg:b,gapOffsetDegree:x,themeClass:S,$slots:C,onRender:w}=this;return w?.(),i(`div`,{class:[S,`${y}-progress`,`${y}-progress--${e}`,`${y}-progress--${a}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":l,role:e===`circle`||e===`line`||e===`dashboard`?`progressbar`:`none`},e===`circle`||e===`dashboard`?i(Zt,{clsPrefix:y,status:a,showIndicator:r,indicatorTextColor:n,railColor:o,fillColor:c,railStyle:s,offsetDegree:this.offsetDegree,percentage:l,viewBoxWidth:u,strokeWidth:d,gapDegree:b===void 0?e===`dashboard`?75:0:b,gapOffsetDegree:x,unit:p},C):e===`line`?i($t,{clsPrefix:y,status:a,showIndicator:r,indicatorTextColor:n,railColor:o,fillColor:c,railStyle:s,percentage:l,processing:_,indicatorPlacement:f,unit:p,fillBorderRadius:h,railBorderRadius:m,height:g},C):e===`multiple-circle`?i(tn,{clsPrefix:y,strokeWidth:d,railColor:o,fillColor:c,railStyle:s,viewBoxWidth:u,percentage:l,showIndicator:r,circleGap:v},C):null)}}),Q=u(`n-upload`),an=j([w(`upload`,`width: 100%;`,[f(`dragger-inside`,[w(`upload-trigger`,` - display: block; - `)]),f(`drag-over`,[w(`upload-dragger`,` - border: var(--n-dragger-border-hover); - `)])]),w(`upload-dragger`,` - cursor: pointer; - box-sizing: border-box; - width: 100%; - text-align: center; - border-radius: var(--n-border-radius); - padding: 24px; - opacity: 1; - transition: - opacity .3s var(--n-bezier), - border-color .3s var(--n-bezier), - background-color .3s var(--n-bezier); - background-color: var(--n-dragger-color); - border: var(--n-dragger-border); - `,[j(`&:hover`,` - border: var(--n-dragger-border-hover); - `),f(`disabled`,` - cursor: not-allowed; - `)]),w(`upload-trigger`,` - display: inline-block; - box-sizing: border-box; - opacity: 1; - transition: opacity .3s var(--n-bezier); - `,[j(`+`,[w(`upload-file-list`,`margin-top: 8px;`)]),f(`disabled`,` - opacity: var(--n-item-disabled-opacity); - cursor: not-allowed; - `),f(`image-card`,` - width: 96px; - height: 96px; - `,[w(`base-icon`,` - font-size: 24px; - `),w(`upload-dragger`,` - padding: 0; - height: 100%; - width: 100%; - display: flex; - align-items: center; - justify-content: center; - `)])]),w(`upload-file-list`,` - line-height: var(--n-line-height); - opacity: 1; - transition: opacity .3s var(--n-bezier); - `,[j(`a, img`,`outline: none;`),f(`disabled`,` - opacity: var(--n-item-disabled-opacity); - cursor: not-allowed; - `,[w(`upload-file`,`cursor: not-allowed;`)]),f(`grid`,` - display: grid; - grid-template-columns: repeat(auto-fill, 96px); - grid-gap: 8px; - margin-top: 0; - `),w(`upload-file`,` - display: block; - box-sizing: border-box; - cursor: default; - padding: 0px 12px 0 6px; - transition: background-color .3s var(--n-bezier); - border-radius: var(--n-border-radius); - `,[_e(),w(`progress`,[_e({foldPadding:!0})]),j(`&:hover`,` - background-color: var(--n-item-color-hover); - `,[w(`upload-file-info`,[x(`action`,` - opacity: 1; - `)])]),f(`image-type`,` - border-radius: var(--n-border-radius); - text-decoration: underline; - text-decoration-color: #0000; - `,[w(`upload-file-info`,` - padding-top: 0px; - padding-bottom: 0px; - width: 100%; - height: 100%; - display: flex; - justify-content: space-between; - align-items: center; - padding: 6px 0; - `,[w(`progress`,` - padding: 2px 0; - margin-bottom: 0; - `),x(`name`,` - padding: 0 8px; - `),x(`thumbnail`,` - width: 32px; - height: 32px; - font-size: 28px; - display: flex; - justify-content: center; - align-items: center; - `,[j(`img`,` - width: 100%; - `)])])]),f(`text-type`,[w(`progress`,` - box-sizing: border-box; - padding-bottom: 6px; - margin-bottom: 6px; - `)]),f(`image-card-type`,` - position: relative; - width: 96px; - height: 96px; - border: var(--n-item-border-image-card); - border-radius: var(--n-border-radius); - padding: 0; - display: flex; - align-items: center; - justify-content: center; - transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier); - border-radius: var(--n-border-radius); - overflow: hidden; - `,[w(`progress`,` - position: absolute; - left: 8px; - bottom: 8px; - right: 8px; - width: unset; - `),w(`upload-file-info`,` - padding: 0; - width: 100%; - height: 100%; - `,[x(`thumbnail`,` - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: 36px; - `,[j(`img`,` - width: 100%; - `)])]),j(`&::before`,` - position: absolute; - z-index: 1; - left: 0; - right: 0; - top: 0; - bottom: 0; - border-radius: inherit; - opacity: 0; - transition: opacity .2s var(--n-bezier); - content: ""; - `),j(`&:hover`,[j(`&::before`,`opacity: 1;`),w(`upload-file-info`,[x(`thumbnail`,`opacity: .12;`)])])]),f(`error-status`,[j(`&:hover`,` - background-color: var(--n-item-color-hover-error); - `),w(`upload-file-info`,[x(`name`,`color: var(--n-item-text-color-error);`),x(`thumbnail`,`color: var(--n-item-text-color-error);`)]),f(`image-card-type`,` - border: var(--n-item-border-image-card-error); - `)]),f(`with-url`,` - cursor: pointer; - `,[w(`upload-file-info`,[x(`name`,` - color: var(--n-item-text-color-success); - text-decoration-color: var(--n-item-text-color-success); - `,[j(`a`,` - text-decoration: underline; - `)])])]),w(`upload-file-info`,` - position: relative; - padding-top: 6px; - padding-bottom: 6px; - display: flex; - flex-wrap: nowrap; - `,[x(`thumbnail`,` - font-size: 18px; - opacity: 1; - transition: opacity .2s var(--n-bezier); - color: var(--n-item-icon-color); - `,[w(`base-icon`,` - margin-right: 2px; - vertical-align: middle; - transition: color .3s var(--n-bezier); - `)]),x(`action`,` - padding-top: inherit; - padding-bottom: inherit; - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 80px; - display: flex; - align-items: center; - transition: opacity .2s var(--n-bezier); - justify-content: flex-end; - opacity: 0; - `,[w(`button`,[j(`&:not(:last-child)`,{marginRight:`4px`}),w(`base-icon`,[j(`svg`,[le()])])]),f(`image-type`,` - position: relative; - max-width: 80px; - width: auto; - `),f(`image-card-type`,` - z-index: 2; - position: absolute; - width: 100%; - height: 100%; - left: 0; - right: 0; - bottom: 0; - top: 0; - display: flex; - justify-content: center; - align-items: center; - `)]),x(`name`,` - color: var(--n-item-text-color); - flex: 1; - display: flex; - justify-content: center; - text-overflow: ellipsis; - overflow: hidden; - flex-direction: column; - text-decoration-color: #0000; - font-size: var(--n-font-size); - transition: - color .3s var(--n-bezier), - text-decoration-color .3s var(--n-bezier); - `,[j(`a`,` - color: inherit; - text-decoration: underline; - `)])])])]),w(`upload-file-input`,` - display: none; - width: 0; - height: 0; - opacity: 0; - `)]),on=S({name:`UploadDragger`,__UPLOAD_DRAGGER__:!0,setup(e,{slots:t}){let r=a(Q,null);return r||n(`upload-dragger`,"`n-upload-dragger` must be placed inside `n-upload`."),()=>{let{mergedClsPrefixRef:{value:e},mergedDisabledRef:{value:n},maxReachedRef:{value:a}}=r;return i(`div`,{class:[`${e}-upload-dragger`,(n||a)&&`${e}-upload-dragger--disabled`]},t)}}});function sn(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},i(`g`,{fill:`none`},i(`path`,{d:`M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z`,fill:`currentColor`})))}function cn(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},i(`g`,{fill:`none`},i(`path`,{d:`M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z`,fill:`currentColor`})))}var ln=S({name:`UploadProgress`,props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:a(Q).mergedThemeRef}},render(){return i(K,null,{default:()=>this.show?i(rn,{type:`line`,showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),un=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function dn(e){return e.includes(`image/`)}function fn(e=``){let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]}var pn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,mn=e=>{if(e.type)return dn(e.type);let t=fn(e.name||``);if(pn.test(t))return!0;let n=e.thumbnailUrl||e.url||``,r=fn(n);return!!(/^data:image\//.test(n)||pn.test(r))};function hn(e){return un(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!dn(e.type)){t(``);return}t(window.URL.createObjectURL(e))})})}var gn=I&&window.FileReader&&window.File;function _n(e){return e.isDirectory}function vn(e){return e.isFile}function yn(t,n){return un(this,void 0,void 0,function*(){let r=[];function i(t){return un(this,void 0,void 0,function*(){for(let a of t)if(a){if(n&&_n(a)){let t=a.createReader(),n=[],r;try{do r=yield new Promise((e,n)=>{t.readEntries(e,n)}),n=n.concat(r);while(r.length>0)}catch(t){e(`upload`,`error happens when handling directory upload`,t)}yield i(n)}else if(vn(a))try{let e=yield new Promise((e,t)=>{a.file(e,t)});r.push({file:e,entry:a,source:`dnd`})}catch(t){e(`upload`,`error happens when handling file upload`,t)}}})}return yield i(t),r})}function $(e){let{id:t,name:n,percentage:r,status:i,url:a,file:o,thumbnailUrl:s,type:c,fullPath:l,batchId:u}=e;return{id:t,name:n,percentage:r??null,status:i,url:a??null,file:o??null,thumbnailUrl:s??null,type:c??null,fullPath:l??null,batchId:u??null}}function bn(e,t,n){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase(),n.split(`,`).map(e=>e.trim()).filter(Boolean).some(n=>{if(n.startsWith(`.`)){if(e.endsWith(n))return!0}else if(n.includes(`/`)){let[e,r]=t.split(`/`),[i,a]=n.split(`/`);if((i===`*`||e&&i&&i===e)&&(a===`*`||r&&a&&a===r))return!0}else return!0;return!1})}var xn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Sn={paddingMedium:`0 3px`,heightMedium:`24px`,iconSizeMedium:`18px`},Cn=S({name:`UploadFile`,props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(e){let t=a(Q),n=y(null),r=y(``),i=p(()=>{let{file:t}=e;return t.status===`finished`?`success`:t.status===`error`?`error`:`info`}),o=p(()=>{let{file:t}=e;if(t.status===`error`)return`error`}),s=p(()=>{let{file:t}=e;return t.status===`uploading`}),c=p(()=>{if(!t.showCancelButtonRef.value)return!1;let{file:n}=e;return[`uploading`,`pending`,`error`].includes(n.status)}),l=p(()=>{if(!t.showRemoveButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),u=p(()=>{if(!t.showDownloadButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),d=p(()=>{if(!t.showRetryButtonRef.value)return!1;let{file:n}=e;return[`error`].includes(n.status)}),f=me(()=>r.value||e.file.thumbnailUrl||e.file.url),m=p(()=>{if(!t.showPreviewButtonRef.value)return!1;let{file:{status:n},listType:r}=e;return[`finished`].includes(n)&&f.value&&r===`image-card`});function h(){return xn(this,void 0,void 0,function*(){let n=t.onRetryRef.value;n&&(yield n({file:e.file}))===!1||t.submit({fileId:e.file.id})})}function g(t){t.preventDefault();let{file:n}=e;[`finished`,`pending`,`error`].includes(n.status)?v(n):[`uploading`].includes(n.status)?x(n):D(`upload`,`The button clicked type is unknown.`)}function _(t){t.preventDefault(),b(e.file)}function v(n){let{xhrMap:r,doChange:i,onRemoveRef:{value:a},mergedFileListRef:{value:o}}=t;Promise.resolve(a?a({file:Object.assign({},n),fileList:o,index:e.index}):!0).then(e=>{if(e===!1)return;let t=Object.assign({},n,{status:`removed`});r.delete(n.id),i(t,void 0,{remove:!0})})}function b(e){let{onDownloadRef:{value:n},customDownloadRef:{value:r}}=t;Promise.resolve(n?n(Object.assign({},e)):!0).then(t=>{t!==!1&&(r?r(Object.assign({},e)):xe(e.url,e.name))})}function x(e){let{xhrMap:n}=t;n.get(e.id)?.abort(),v(Object.assign({},e))}function S(r){let{onPreviewRef:{value:i}}=t;if(i)i(e.file,{event:r});else if(e.listType===`image-card`){let{value:e}=n;if(!e)return;e.showPreview()}}let C=()=>xn(this,void 0,void 0,function*(){let{listType:n}=e;n!==`image`&&n!==`image-card`||t.shouldUseThumbnailUrlRef.value(e.file)&&(r.value=yield t.getFileThumbnailUrlResolver(e.file))});return k(()=>{C()}),{mergedTheme:t.mergedThemeRef,progressStatus:i,buttonType:o,showProgress:s,disabled:t.mergedDisabledRef,showCancelButton:c,showRemoveButton:l,showDownloadButton:u,showRetryButton:d,showPreviewButton:m,mergedThumbnailUrl:f,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:n,handleRemoveOrCancelClick:g,handleDownloadClick:_,handleRetryClick:h,handlePreviewClick:S}},render(){let{clsPrefix:e,mergedTheme:t,listType:n,file:r,renderIcon:a}=this,o,s=n===`image`;o=s||n===`image-card`?!this.shouldUseThumbnailUrl(r)||!this.mergedThumbnailUrl?i(`span`,{class:`${e}-upload-file-info__thumbnail`},a?a(r):mn(r)?i(X,{clsPrefix:e},{default:sn}):i(X,{clsPrefix:e},{default:cn})):i(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},n===`image-card`?i(Yt,{src:this.mergedThumbnailUrl||void 0,previewSrc:r.url||void 0,alt:r.name,ref:`imageRef`}):i(`img`,{src:this.mergedThumbnailUrl||void 0,alt:r.name})):i(`span`,{class:`${e}-upload-file-info__thumbnail`},a?a(r):i(X,{clsPrefix:e},{default:()=>i(vt,null)}));let c=i(ln,{show:this.showProgress,percentage:r.percentage||0,status:this.progressStatus}),l=n===`text`||n===`image`;return i(`div`,{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,r.url&&r.status!==`error`&&n!==`image-card`&&`${e}-upload-file--with-url`,`${e}-upload-file--${n}-type`]},i(`div`,{class:`${e}-upload-file-info`},o,i(`div`,{class:`${e}-upload-file-info__name`},l&&(r.url&&r.status!==`error`?i(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,onClick:this.handlePreviewClick},r.name):i(`span`,{onClick:this.handlePreviewClick},r.name)),s&&c),i(`div`,{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${n}-type`]},this.showPreviewButton?i(L,{key:`preview`,quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(X,{clsPrefix:e},{default:()=>i(se,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&i(L,{key:`cancelOrTrash`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Sn,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>i(fe,null,{default:()=>this.showRemoveButton?i(X,{clsPrefix:e,key:`trash`},{default:()=>i(Tt,null)}):i(X,{clsPrefix:e,key:`cancel`},{default:()=>i(yt,null)})})}),this.showRetryButton&&!this.disabled&&i(L,{key:`retry`,quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(X,{clsPrefix:e},{default:()=>i(St,null)})}),this.showDownloadButton?i(L,{key:`download`,quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(X,{clsPrefix:e},{default:()=>i(bt,null)})}):null)),!s&&c)}}),wn=S({name:`UploadTrigger`,props:{abstract:Boolean},slots:Object,setup(e,{slots:t}){let r=a(Q,null);r||n(`upload-trigger`,"`n-upload-trigger` must be placed inside `n-upload`.");let{mergedClsPrefixRef:o,mergedDisabledRef:s,maxReachedRef:c,listTypeRef:l,dragOverRef:u,openOpenFileDialog:d,draggerInsideRef:f,handleFileAddition:m,mergedDirectoryDndRef:h,triggerClassRef:g,triggerStyleRef:_}=r,v=p(()=>l.value===`image-card`);function y(){s.value||c.value||d()}function b(e){e.preventDefault(),u.value=!0}function x(e){e.preventDefault(),u.value=!0}function S(e){e.preventDefault(),u.value=!1}function C(e){if(e.preventDefault(),!f.value||s.value||c.value){u.value=!1;return}let t=e.dataTransfer?.items;t?.length?yn(Array.from(t).map(e=>e.webkitGetAsEntry()),h.value).then(e=>{m(e)}).finally(()=>{u.value=!1}):u.value=!1}return()=>{let{value:n}=o;return e.abstract?t.default?.call(t,{handleClick:y,handleDrop:C,handleDragOver:b,handleDragEnter:x,handleDragLeave:S}):i(`div`,{class:[`${n}-upload-trigger`,(s.value||c.value)&&`${n}-upload-trigger--disabled`,v.value&&`${n}-upload-trigger--image-card`,g.value],style:_.value,onClick:y,onDrop:C,onDragover:b,onDragenter:x,onDragleave:S},v.value?i(on,null,{default:()=>z(t.default,()=>[i(X,{clsPrefix:n},{default:()=>i(U,null)})])}):t)}}}),Tn=S({name:`UploadFileList`,setup(e,{slots:t}){let r=a(Q,null);r||n(`upload-file-list`,"`n-upload-file-list` must be placed inside `n-upload`.");let{abstractRef:o,mergedClsPrefixRef:s,listTypeRef:c,mergedFileListRef:l,fileListClassRef:u,fileListStyleRef:d,cssVarsRef:f,themeClassRef:m,maxReachedRef:h,showTriggerRef:g,imageGroupPropsRef:_}=r,v=p(()=>c.value===`image-card`),y=()=>l.value.map((e,t)=>i(Cn,{clsPrefix:s.value,key:e.id,file:e,index:t,listType:c.value})),b=()=>v.value?i(Kt,Object.assign({},_.value),{default:y}):i(K,{group:!0},{default:y});return()=>{let{value:e}=s,{value:n}=o;return i(`div`,{class:[`${e}-upload-file-list`,v.value&&`${e}-upload-file-list--grid`,n?m?.value:void 0,u.value],style:[n&&f?f.value:``,d.value]},b(),g.value&&!h.value&&v.value&&i(wn,null,t))}}}),En=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Dn(e,t,n){let{doChange:r,xhrMap:i}=e,a=0;function o(n){let o=Object.assign({},t,{status:`error`,percentage:a});i.delete(t.id),o=$(e.onError?.call(e,{file:o,event:n})||o),r(o,n)}function s(s){if(e.isErrorState){if(e.isErrorState(n)){o(s);return}}else if(n.status<200||n.status>=300){o(s);return}let c=Object.assign({},t,{status:`finished`,percentage:a});i.delete(t.id),c=$(e.onFinish?.call(e,{file:c,event:s})||c),r(c,s)}return{handleXHRLoad:s,handleXHRError:o,handleXHRAbort(e){let n=Object.assign({},t,{status:`removed`,file:null,percentage:a});i.delete(t.id),r(n,e)},handleXHRProgress(e){let n=Object.assign({},t,{status:`uploading`});if(e.lengthComputable){let t=Math.ceil(e.loaded/e.total*100);n.percentage=t,a=t}r(n,e)}}}function On(e){let{inst:t,file:n,data:r,headers:i,withCredentials:a,action:o,customRequest:s}=e,{doChange:c}=e.inst,l=0;s({file:n,data:r,headers:i,withCredentials:a,action:o,onProgress(e){let t=Object.assign({},n,{status:`uploading`}),r=e.percent;t.percentage=r,l=r,c(t)},onFinish(){let e=Object.assign({},n,{status:`finished`,percentage:l});e=$(t.onFinish?.call(t,{file:e})||e),c(e)},onError(){let e=Object.assign({},n,{status:`error`,percentage:l});e=$(t.onError?.call(t,{file:e})||e),c(e)}})}function kn(e,t,n){let r=Dn(e,t,n);n.onabort=r.handleXHRAbort,n.onerror=r.handleXHRError,n.onload=r.handleXHRLoad,n.upload&&(n.upload.onprogress=r.handleXHRProgress)}function An(e,t){return typeof e==`function`?e({file:t}):e||{}}function jn(e,t,n){let r=An(t,n);r&&Object.keys(r).forEach(t=>{e.setRequestHeader(t,r[t])})}function Mn(e,t,n){let r=An(t,n);r&&Object.keys(r).forEach(t=>{e.append(t,r[t])})}function Nn(e,t,n,{method:r,action:i,withCredentials:a,responseType:o,headers:s,data:c}){let l=new XMLHttpRequest;l.responseType=o,e.xhrMap.set(n.id,l),l.withCredentials=a;let u=new FormData;if(Mn(u,c,n),n.file!==null&&u.append(t,n.file),kn(e,n,l),i!==void 0){l.open(r.toUpperCase(),i),jn(l,s,n),l.send(u);let t=Object.assign({},n,{status:`uploading`});e.doChange(t)}}var Pn=S({name:`Upload`,props:Object.assign(Object.assign({},E.props),{name:{type:String,default:`file`},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:`POST`},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:``},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onRetry:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,customDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:`text`},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>gn?mn(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),setup(e){e.abstract&&e.listType===`image-card`&&n(`upload`,`when the list-type is image-card, abstract is not supported.`);let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=s(e),c=E(`Upload`,`-upload`,an,ve,e,r),l=_(`Upload`,a,r),u=H(e),d=y(e.defaultFileList),f=M(e,`fileList`),m=y(null),h={value:!1},g=y(!1),v=new Map,b=F(f,d),x=p(()=>b.value.map($)),S=p(()=>{let{max:t}=e;return t===void 0?!1:x.value.length>=t});function C(){var e;(e=m.value)==null||e.click()}function w(e){let t=e.target;A(t.files?Array.from(t.files).map(e=>({file:e,entry:null,source:`input`})):null,e),t.value=``}function T(t){let{"onUpdate:fileList":n,onUpdateFileList:r}=e;n&&B(n,t),r&&B(r,t),d.value=t}let D=p(()=>e.multiple||e.directory),k=(t,n,r={append:!1,remove:!1})=>{let{append:i,remove:a}=r,o=Array.from(x.value),s=o.findIndex(e=>e.id===t.id);if(i||a||~s){i?o.push(t):a?o.splice(s,1):o.splice(s,1,t);let{onChange:r}=e;r&&r({file:t,fileList:o,event:n}),T(o)}};function A(t,n){if(!t||t.length===0)return;let{onBeforeUpload:r}=e;t=D.value?t:[t[0]];let{max:i,accept:a}=e;t=t.filter(({file:e,source:t})=>t===`dnd`&&a?.trim()?bn(e.name,e.type,a):!0),i&&(t=t.slice(0,i-x.value.length));let s=be();Promise.all(t.map(e=>En(this,[e],void 0,function*({file:e,entry:t}){let n={id:be(),batchId:s,name:e.name,status:`pending`,percentage:0,file:e,url:null,type:e.type,thumbnailUrl:null,fullPath:t?.fullPath??`/${e.webkitRelativePath||e.name}`};return!r||(yield r({file:n,fileList:x.value}))!==!1?n:null}))).then(e=>En(this,void 0,void 0,function*(){let t=Promise.resolve();e.forEach(e=>{t=t.then(o).then(()=>{e&&k(e,n,{append:!0})})}),yield t})).then(()=>{e.defaultUpload&&j()})}function j({fileId:t,retry:n=!1}={}){let{method:r,action:i,withCredentials:a,headers:o,data:s,name:c}=e,l=t===void 0?x.value:x.value.filter(e=>e.id===t),u=n||t!==void 0;l.forEach(t=>{let{status:n}=t;(n===`pending`||n===`error`&&u)&&(e.customRequest?On({inst:{doChange:k,xhrMap:v,onFinish:e.onFinish,onError:e.onError},file:t,action:i,withCredentials:a,headers:o,data:s,customRequest:e.customRequest}):Nn({doChange:k,xhrMap:v,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},c,t,{method:r,action:i,withCredentials:a,responseType:e.responseType,headers:o,data:s}))})}function ee(t){if(t.thumbnailUrl)return t.thumbnailUrl;let{createThumbnailUrl:n}=e;return n?n(t.file,t)??(t.url||``):t.url?t.url:t.file?hn(t.file):``}let te=p(()=>{let{common:{cubicBezierEaseInOut:e},self:{draggerColor:t,draggerBorder:n,draggerBorderHover:r,itemColorHover:i,itemColorHoverError:a,itemTextColorError:o,itemTextColorSuccess:s,itemTextColor:l,itemIconColor:u,itemDisabledOpacity:d,lineHeight:f,borderRadius:p,fontSize:m,itemBorderImageCardError:h,itemBorderImageCard:g}}=c.value;return{"--n-bezier":e,"--n-border-radius":p,"--n-dragger-border":n,"--n-dragger-border-hover":r,"--n-dragger-color":t,"--n-font-size":m,"--n-item-color-hover":i,"--n-item-color-hover-error":a,"--n-item-disabled-opacity":d,"--n-item-icon-color":u,"--n-item-text-color":l,"--n-item-text-color-error":o,"--n-item-text-color-success":s,"--n-line-height":f,"--n-item-border-image-card-error":h,"--n-item-border-image-card":g}}),N=i?t(`upload`,void 0,te,e):void 0;O(Q,{mergedClsPrefixRef:r,mergedThemeRef:c,showCancelButtonRef:M(e,`showCancelButton`),showDownloadButtonRef:M(e,`showDownloadButton`),showRemoveButtonRef:M(e,`showRemoveButton`),showRetryButtonRef:M(e,`showRetryButton`),onRemoveRef:M(e,`onRemove`),onDownloadRef:M(e,`onDownload`),customDownloadRef:M(e,`customDownload`),mergedFileListRef:x,triggerClassRef:M(e,`triggerClass`),triggerStyleRef:M(e,`triggerStyle`),shouldUseThumbnailUrlRef:M(e,`shouldUseThumbnailUrl`),renderIconRef:M(e,`renderIcon`),xhrMap:v,submit:j,doChange:k,showPreviewButtonRef:M(e,`showPreviewButton`),onPreviewRef:M(e,`onPreview`),getFileThumbnailUrlResolver:ee,listTypeRef:M(e,`listType`),dragOverRef:g,openOpenFileDialog:C,draggerInsideRef:h,handleFileAddition:A,mergedDisabledRef:u.mergedDisabledRef,maxReachedRef:S,fileListClassRef:M(e,`fileListClass`),fileListStyleRef:M(e,`fileListStyle`),abstractRef:M(e,`abstract`),acceptRef:M(e,`accept`),cssVarsRef:i?void 0:te,themeClassRef:N?.themeClass,onRender:N?.onRender,showTriggerRef:M(e,`showTrigger`),imageGroupPropsRef:M(e,`imageGroupProps`),mergedDirectoryDndRef:p(()=>e.directoryDnd??e.directory),onRetryRef:M(e,`onRetry`)});let P={clear:()=>{d.value=[]},submit:j,openOpenFileDialog:C};return Object.assign({mergedClsPrefix:r,draggerInsideRef:h,rtlEnabled:l,inputElRef:m,mergedTheme:c,dragOver:g,mergedMultiple:D,cssVars:i?void 0:te,themeClass:N?.themeClass,onRender:N?.onRender,handleFileInputChange:w},P)},render(){let{draggerInsideRef:e,mergedClsPrefix:t,$slots:n,directory:r,onRender:a}=this;n.default&&!this.abstract&&n.default()[0]?.type?.__UPLOAD_DRAGGER__&&(e.value=!0);let o=i(`input`,Object.assign({},this.inputProps,{ref:`inputElRef`,type:`file`,class:`${t}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:r||void 0,directory:r||void 0}));return this.abstract?i(b,null,n.default?.call(n),i(v,{to:`body`},o)):(a?.(),i(`div`,{class:[`${t}-upload`,this.rtlEnabled&&`${t}-upload--rtl`,e.value&&`${t}-upload--dragger-inside`,this.dragOver&&`${t}-upload--drag-over`,this.themeClass],style:this.cssVars},o,this.showTrigger&&this.listType!==`image-card`&&i(wn,null,n),this.showFileList&&i(Tn,null,n)))}});export{on as n,Pn as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Upload-DxQHkPqo.js b/frontend/dist/assets/Upload-DxQHkPqo.js new file mode 100644 index 0000000..de56ba5 --- /dev/null +++ b/frontend/dist/assets/Upload-DxQHkPqo.js @@ -0,0 +1,440 @@ +import{G as e,H as t,K as n,Ln as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,Y as u,an as d,at as f,bt as p,d as m,dt as h,f as g,g as _,gt as v,hn as y,ht as b,it as x,kt as S,nn as C,nt as w,ot as T,p as E,q as D,qt as O,rn as k,st as A,tt as j,vn as M,yn as ee}from"./client-Bz0sY7Lm.js";import{u as te}from"./Follower-BaR8jvSz.js";import{d as N,u as P}from"./Card-BGJkYb2B.js";import{f as ne,i as re,n as ie,p as ae}from"./Suffix-BBRLYxYK.js";import{t as F}from"./use-merged-state-z45UzW9G.js";import{a as I,t as L}from"./Button-MBUKfT_Z.js";import{n as R,t as oe}from"./Popover-CjBLQZ90.js";import{c as z,i as B}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{o as V}from"./get-BXAmpWeC.js";import{n as H}from"./use-form-item-Bl3X3aXB.js";import{t as U}from"./Add-BlaQeLtQ.js";import{n as se}from"./Input-CEIE7mTC.js";import{t as W}from"./fade-in.cssr-0rRavIDG.js";import{A as ce,G as le,H as ue,J as G,K,S as q,U as J,V as de,W as fe,Y,at as X,ct as pe,et as me,f as he,nt as ge,q as _e,s as ve,tt as ye,z as be}from"./index-NE0dsiiJ.js";function xe(e,t){if(!e)return;let n=document.createElement(`a`);n.href=e,t!==void 0&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Se(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++ii(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z`}))))),yt=K(`cancel`,()=>i(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z`}))))),bt=K(`download`,()=>i(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`path`,{d:`M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z`}))))),xt=S({name:`ResizeSmall`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},i(`g`,{fill:`none`},i(`path`,{d:`M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z`,fill:`currentColor`})))}}),St=K(`retry`,()=>i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M320,146s24.36-12-64-12A160,160,0,1,0,416,294`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;`}),i(`polyline`,{points:`256 58 336 138 256 218`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),Ct=K(`rotateClockwise`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z`,fill:`currentColor`}),i(`path`,{d:`M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z`,fill:`currentColor`}))),wt=K(`rotateClockwise`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z`,fill:`currentColor`}),i(`path`,{d:`M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z`,fill:`currentColor`}))),Tt=K(`trash`,()=>i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`rect`,{x:`32`,y:`64`,width:`448`,height:`80`,rx:`16`,ry:`16`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`line`,{x1:`312`,y1:`240`,x2:`200`,y2:`352`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),i(`line`,{x1:`312`,y1:`352`,x2:`200`,y2:`240`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),Et=K(`zoomIn`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z`,fill:`currentColor`}),i(`path`,{d:`M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z`,fill:`currentColor`}))),Dt=K(`zoomOut`,()=>i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z`,fill:`currentColor`}),i(`path`,{d:`M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z`,fill:`currentColor`}))),Ot=I&&`loading`in document.createElement(`img`);function kt(e={}){let{root:t=null}=e;return{hash:`${e.rootMargin||`0px 0px 0px 0px`}-${Array.isArray(e.threshold)?e.threshold.join(`,`):e.threshold??`0`}`,options:Object.assign(Object.assign({},e),{root:(typeof t==`string`?document.querySelector(t):t)||document.documentElement})}}var At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=(e,t,n)=>{if(!e)return()=>{};let r=kt(t),{root:i}=r.options,a,o=At.get(i);o?a=o:(a=new Map,At.set(i,a));let s,c;a.has(r.hash)?(c=a.get(r.hash),c[1].has(e)||(s=c[0],c[1].add(e),s.observe(e))):(s=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=jt.get(e.target),n=Mt.get(e.target);t&&t(),n&&(n.value=!0)}})},r.options),s.observe(e),c=[s,new Set([e])],a.set(r.hash,c));let l=!1,u=()=>{l||(jt.delete(e),Mt.delete(e),l=!0,c[1].has(e)&&(c[0].unobserve(e),c[1].delete(e)),c[1].size<=0&&a.delete(r.hash),a.size||At.delete(i))};return jt.set(e,u),Mt.set(e,n),u},Pt=S({name:`Tooltip`,props:Object.assign(Object.assign({},R),E.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=s(e),n=E(`Tooltip`,`-tooltip`,void 0,q,e,t),r=y(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(e){r.value.setShow(e)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:p(()=>n.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return i(oe,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}});function Ft(){return{toolbarIconColor:`rgba(255, 255, 255, .9)`,toolbarColor:`rgba(0, 0, 0, .35)`,toolbarBoxShadow:`none`,toolbarBorderRadius:`24px`}}var It=g({name:`Image`,common:m,peers:{Tooltip:q},self:Ft});function Lt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z`,fill:`currentColor`}))}function Rt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z`,fill:`currentColor`}))}function zt(){return i(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z`,fill:`currentColor`}))}var Bt=Object.assign(Object.assign({},E.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),Vt=u(`n-image`),Ht=j([j(`body >`,[w(`image-container`,`position: fixed;`)]),w(`image-preview-container`,` + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + display: flex; + `),w(`image-preview-overlay`,` + z-index: -1; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background: rgba(0, 0, 0, .3); + `,[W()]),w(`image-preview-toolbar`,` + z-index: 1; + position: absolute; + left: 50%; + transform: translateX(-50%); + border-radius: var(--n-toolbar-border-radius); + height: 48px; + bottom: 40px; + padding: 0 12px; + background: var(--n-toolbar-color); + box-shadow: var(--n-toolbar-box-shadow); + color: var(--n-toolbar-icon-color); + transition: color .3s var(--n-bezier); + display: flex; + align-items: center; + `,[w(`base-icon`,` + padding: 0 8px; + font-size: 28px; + cursor: pointer; + `),W()]),w(`image-preview-wrapper`,` + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + display: flex; + pointer-events: none; + `,[ie()]),w(`image-preview`,` + user-select: none; + -webkit-user-select: none; + pointer-events: all; + margin: auto; + max-height: calc(100vh - 32px); + max-width: calc(100vw - 32px); + transition: transform .3s var(--n-bezier); + `),w(`image`,` + display: inline-flex; + max-height: 100%; + max-width: 100%; + `,[T(`preview-disabled`,` + cursor: pointer; + `),j(`img`,` + border-radius: inherit; + `)])]),Ut=32,Wt=S({name:`ImagePreview`,props:Object.assign(Object.assign({},Bt),{src:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onNext:Function,onPrev:Function,onClose:[Function,Array]}),setup(e){let{src:n}=ee(e),{mergedClsPrefixRef:o}=s(e),c=E(`Image`,`-image`,Ht,It,e,o),u=null,d=y(null),f=y(null),m=y(!1),{localeRef:h}=re(`Image`),g=y(e.defaultShow),_=F(M(e,`show`),g);function v(){let{value:e}=f;if(!u||!e)return;let{style:t}=e,n=u.getBoundingClientRect();t.transformOrigin=`${n.left+n.width/2}px ${n.top+n.height/2}px`}function b(t){var n,r;switch(t.key){case` `:t.preventDefault();break;case`ArrowLeft`:(n=e.onPrev)==null||n.call(e);break;case`ArrowRight`:(r=e.onNext)==null||r.call(e);break;case`ArrowUp`:t.preventDefault(),J();break;case`ArrowDown`:t.preventDefault(),de();break;case`Escape`:X();break}}function x(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&z(n,t),r&&z(r,t),g.value=t,m.value=!0}C(_,e=>{e?N(`keydown`,document,b):P(`keydown`,document,b)}),l(()=>{P(`keydown`,document,b)});let S=0,w=0,T=0,D=0,O=0,k=0,A=0,j=0,ne=!1;function ie(e){let{clientX:t,clientY:n}=e;T=t-S,D=n-w,te(Y)}function ae(e){let{mouseUpClientX:t,mouseUpClientY:n,mouseDownClientX:r,mouseDownClientY:i}=e,a=r-t,o=i-n;return{moveVerticalDirection:`vertical${o>0?`Top`:`Bottom`}`,moveHorizontalDirection:`horizontal${a>0?`Left`:`Right`}`,deltaHorizontal:a,deltaVertical:o}}function I(e){let{value:t}=d;if(!t)return{offsetX:0,offsetY:0};let n=t.getBoundingClientRect(),{moveVerticalDirection:r,moveHorizontalDirection:i,deltaHorizontal:a,deltaVertical:o}=e||{},s=0,c=0;return s=n.width<=window.innerWidth?0:n.left>0?(n.width-window.innerWidth)/2:n.right0?(n.height-window.innerHeight)/2:n.bottom.5){let e=H;--V,H=Math.max(.5,B**V);let t=e-H;Y(!1);let n=I();H+=t,Y(!1),H-=t,T=n.offsetX,D=n.offsetY,Y()}}function fe(){let e=n.value;e&&xe(e,void 0)}function Y(e=!0){let{value:t}=d;if(!t)return;let{style:n}=t,i=r(R?.previewedImgPropsRef.value?.style),a=``;if(typeof i==`string`)a=`${i};`;else for(let e in i)a+=`${_t(e)}: ${i[e]};`;let o=`transform-origin: center; transform: translateX(${T}px) translateY(${D}px) rotate(${U}deg) scale(${H});`;ne?n.cssText=`${a}cursor: grabbing; transition: none;${o}`:n.cssText=`${a}cursor: grab;${o}${e?``:`transition: none;`}`,e||t.offsetHeight}function X(){if(_.value){let{onClose:t}=e;t&&z(t),x(!1),g.value=!1}}function pe(){H=q(),V=Math.ceil(Math.log(H)/Math.log(B)),T=0,D=0,Y()}let he={setThumbnailEl:e=>{u=e}};function ge(t,n){if(e.showToolbarTooltip){let{value:e}=c;return i(Pt,{to:!1,theme:e.peers.Tooltip,themeOverrides:e.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>h.value[n],trigger:()=>t})}else return t}let _e=p(()=>{let{common:{cubicBezierEaseInOut:e},self:{toolbarIconColor:t,toolbarBorderRadius:n,toolbarBoxShadow:r,toolbarColor:i}}=c.value;return{"--n-bezier":e,"--n-toolbar-icon-color":t,"--n-toolbar-color":i,"--n-toolbar-border-radius":n,"--n-toolbar-box-shadow":r}}),{inlineThemeDisabled:ve}=s(),ye=ve?t(`image-preview`,void 0,_e,e):void 0;function be(e){e.preventDefault()}return Object.assign({clsPrefix:o,previewRef:d,previewWrapperRef:f,previewSrc:n,mergedShow:_,appear:me(),displayed:m,previewedImgProps:R?.previewedImgPropsRef,handleWheel:be,handlePreviewMousedown:oe,handlePreviewDblclick:se,syncTransformOrigin:v,handleAfterLeave:()=>{W(),U=0,m.value=!1},handleDragStart:e=>{var t,n;(n=(t=R?.previewedImgPropsRef.value)?.onDragstart)==null||n.call(t,e),e.preventDefault()},zoomIn:J,zoomOut:de,handleDownloadClick:fe,rotateCounterclockwise:ue,rotateClockwise:G,handleSwitchPrev:ce,handleSwitchNext:le,withTooltip:ge,resizeToOrignalImageSize:pe,cssVars:ve?void 0:_e,themeClass:ye?.themeClass,onRender:ye?.onRender,doUpdateShow:x,close:X},he)},render(){var e;let{clsPrefix:t,renderToolbar:n,withTooltip:r}=this,a=r(i(G,{clsPrefix:t,onClick:this.handleSwitchPrev},{default:Lt}),`tipPrevious`),o=r(i(G,{clsPrefix:t,onClick:this.handleSwitchNext},{default:Rt}),`tipNext`),s=r(i(G,{clsPrefix:t,onClick:this.rotateCounterclockwise},{default:()=>i(wt,null)}),`tipCounterclockwise`),c=r(i(G,{clsPrefix:t,onClick:this.rotateClockwise},{default:()=>i(Ct,null)}),`tipClockwise`),l=r(i(G,{clsPrefix:t,onClick:this.resizeToOrignalImageSize},{default:()=>i(xt,null)}),`tipOriginalSize`),u=r(i(G,{clsPrefix:t,onClick:this.zoomOut},{default:()=>i(Dt,null)}),`tipZoomOut`),f=r(i(G,{clsPrefix:t,onClick:this.handleDownloadClick},{default:()=>i(bt,null)}),`tipDownload`),p=r(i(G,{clsPrefix:t,onClick:()=>this.close()},{default:zt}),`tipClose`),m=r(i(G,{clsPrefix:t,onClick:this.zoomIn},{default:()=>i(Et,null)}),`tipZoomIn`);return i(b,null,(e=this.$slots).default?.call(e),i(ne,{show:this.mergedShow},{default:()=>{var e;return this.mergedShow||this.displayed?((e=this.onRender)==null||e.call(this),d(i(`div`,{ref:`containerRef`,class:[`${t}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},i(X,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?i(`div`,{class:`${t}-image-preview-overlay`,onClick:()=>this.close()}):null}),this.showToolbar?i(X,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?i(`div`,{class:`${t}-image-preview-toolbar`},n?n({nodes:{prev:a,next:o,rotateCounterclockwise:s,rotateClockwise:c,resizeToOriginalSize:l,zoomOut:u,zoomIn:m,download:f,close:p}}):i(b,null,this.onPrev?i(b,null,a,o):null,s,c,l,u,m,f,p)):null}):null,i(X,{name:`fade-in-scale-up-transition`,onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{let{previewedImgProps:e={}}=this;return d(i(`div`,{class:`${t}-image-preview-wrapper`,ref:`previewWrapperRef`},i(`img`,Object.assign({},e,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${t}-image-preview`,e.class],key:this.previewSrc,src:this.previewSrc,ref:`previewRef`,onDragstart:this.handleDragStart}))),[[pe,this.mergedShow]])}})),[[ae,{enabled:this.mergedShow}]])):null}}))}}),Gt=u(`n-image-group`),Kt=S({name:`ImageGroup`,props:Object.assign(Object.assign({},Bt),{srcList:Array,current:Number,defaultCurrent:{type:Number,default:0},show:{type:Boolean,default:void 0},defaultShow:Boolean,onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],onUpdateCurrent:[Function,Array],"onUpdate:current":[Function,Array]}),setup(e){let{mergedClsPrefixRef:t}=s(e),r=`c${ge()}`,i=y(null),a=y(e.defaultShow),o=F(M(e,`show`),a),c=y(new Map),l=p(()=>{if(e.srcList){let t=new Map;return e.srcList.forEach((e,n)=>{t.set(`p${n}`,e)}),t}return c.value}),u=p(()=>Array.from(l.value.keys())),d=()=>u.value.length;function f(t,r){e.srcList&&n(`image-group`,"`n-image` can't be placed inside `n-image-group` when image group's `src-list` prop is set.");let i=`r${t}`;return c.value.has(`r${i}`)||c.value.set(i,r),function(){c.value.has(i)||c.value.delete(i)}}let m=y(e.defaultCurrent),h=F(M(e,`current`),m),g=t=>{if(t!==h.value){let{onUpdateCurrent:n,"onUpdate:current":r}=e;n&&z(n,t),r&&z(r,t),m.value=t}},_=p(()=>u.value[h.value]),v=e=>{let t=u.value.indexOf(e);t!==h.value&&g(t)},b=p(()=>l.value.get(_.value));function x(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&z(n,t),r&&z(r,t),a.value=t}function S(){x(!1)}let C=p(()=>{let e=(e,t)=>{for(let n=e;n<=t;n++){let e=u.value[n];if(l.value.get(e))return n}},t=e(h.value+1,d()-1);return t===void 0?e(0,h.value-1):t}),w=p(()=>{let e=(e,t)=>{for(let n=e;n>=t;n--){let e=u.value[n];if(l.value.get(e))return n}},t=e(h.value-1,0);return t===void 0?e(d()-1,h.value+1):t});function T(t){var n,r;t===1?(w.value!==void 0&&g(C.value),(n=e.onPreviewNext)==null||n.call(e)):(C.value!==void 0&&g(w.value),(r=e.onPreviewPrev)==null||r.call(e))}return O(Gt,{mergedClsPrefixRef:t,registerImageUrl:f,setThumbnailEl:e=>{var t;(t=i.value)==null||t.setThumbnailEl(e)},toggleShow:e=>{x(!0),v(e)},groupId:r,renderToolbarRef:M(e,`renderToolbar`)}),{mergedClsPrefix:t,previewInstRef:i,mergedShow:o,src:b,onClose:S,next:()=>{T(1)},prev:()=>{T(-1)}}},render(){return i(Wt,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,onPrev:this.prev,onNext:this.next,src:this.src,show:this.mergedShow,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,onClose:this.onClose},this.$slots)}}),qt=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:`fill`},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},Bt),Jt=0,Yt=S({name:`Image`,props:qt,slots:Object,inheritAttrs:!1,setup(e){let t=y(null),n=y(!1),r=y(null),i=a(Gt,null),{mergedClsPrefixRef:o}=i||s(e),u=p(()=>e.previewSrc||e.src),d=y(!1),f=Jt++,m=()=>{if(e.previewDisabled||n.value)return;if(i){i.setThumbnailEl(t.value),i.toggleShow(`r${f}`);return}let{value:a}=r;a&&(a.setThumbnailEl(t.value),d.value=!0)},h={click:()=>{m()},showPreview:m},g=y(!e.lazy);c(()=>{var e;(e=t.value)==null||e.setAttribute(`data-group-id`,i?.groupId||``)}),c(()=>{if(e.lazy&&e.intersectionObserverOptions){let n,r=k(()=>{n?.(),n=void 0,n=Nt(t.value,e.intersectionObserverOptions,g)});l(()=>{r(),n?.()})}}),k(()=>{var t;e.src||(t=e.imgProps)==null||t.src,n.value=!1}),k(e=>{let t=(i?.registerImageUrl)?.call(i,f,u.value||``);e(()=>{t?.()})});function _(t){var n,r;h.showPreview(),(r=(n=e.imgProps)?.onClick)==null||r.call(n,t)}function v(){d.value=!1}let b=y(!1);return O(Vt,{previewedImgPropsRef:M(e,`previewedImgProps`)}),Object.assign({mergedClsPrefix:o,groupId:i?.groupId,previewInstRef:r,imageRef:t,mergedPreviewSrc:u,showError:n,shouldStartLoading:g,loaded:b,mergedOnClick:e=>{_(e)},onPreviewClose:v,mergedOnError:t=>{if(!g.value)return;n.value=!0;let{onError:r,imgProps:{onError:i}={}}=e;r?.(t),i?.(t)},mergedOnLoad:t=>{let{onLoad:n,imgProps:{onLoad:r}={}}=e;n?.(t),r?.(t),b.value=!0},previewShow:d},h)},render(){var e;let{mergedClsPrefix:t,imgProps:n={},loaded:r,$attrs:a,lazy:o}=this,s=B(this.$slots.error,()=>[]),c=(e=this.$slots).placeholder?.call(e),l=this.src||n.src,u=this.showError&&s.length?s:i(`img`,Object.assign(Object.assign({},n),{ref:`imageRef`,width:this.width||n.width,height:this.height||n.height,src:this.showError?this.fallbackSrc:o&&this.intersectionObserverOptions?this.shouldStartLoading?l:void 0:l,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:Ot&&o&&!this.intersectionObserverOptions?`lazy`:`eager`,style:[n.style||``,c&&!r?{height:`0`,width:`0`,visibility:`hidden`}:``,{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return i(`div`,Object.assign({},a,{role:`none`,class:[a.class,`${t}-image`,(this.previewDisabled||this.showError)&&`${t}-image--preview-disabled`]}),this.groupId?u:i(Wt,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,src:this.mergedPreviewSrc,show:!this.previewDisabled&&this.previewShow,onClose:this.onPreviewClose},{default:()=>u}),!r&&c)}}),Xt={success:i(J,null),error:i(le,null),warning:i(ue,null),info:i(fe,null)},Zt=S({name:`ProgressCircle`,props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){let n=p(()=>{let t=`gradient`,{fillColor:n}=e;return typeof n==`object`?`${t}-${h(JSON.stringify(n))}`:t});function r(t,r,i,a){let{gapDegree:o,viewBoxWidth:s,strokeWidth:c}=e,l=50+c/2,u=`M ${l},${l} m 0,50 + a 50,50 0 1 1 0,-100 + a 50,50 0 1 1 0,100`,d=Math.PI*2*50;return{pathString:u,pathStyle:{stroke:a===`rail`?i:typeof e.fillColor==`object`?`url(#${n.value})`:i,strokeDasharray:`${Math.min(t,100)/100*(d-o)}px ${s*8}px`,strokeDashoffset:`-${o/2}px`,transformOrigin:r?`center`:void 0,transform:r?`rotate(${r}deg)`:void 0}}}let a=()=>{let t=typeof e.fillColor==`object`,r=t?e.fillColor.stops[0]:``,a=t?e.fillColor.stops[1]:``;return t&&i(`defs`,null,i(`linearGradient`,{id:n.value,x1:`0%`,y1:`100%`,x2:`100%`,y2:`0%`},i(`stop`,{offset:`0%`,"stop-color":r}),i(`stop`,{offset:`100%`,"stop-color":a})))};return()=>{let{fillColor:n,railColor:o,strokeWidth:s,offsetDegree:c,status:l,percentage:u,showIndicator:d,indicatorTextColor:f,unit:p,gapOffsetDegree:m,clsPrefix:h}=e,{pathString:g,pathStyle:_}=r(100,0,o,`rail`),{pathString:v,pathStyle:y}=r(u,c,n,`fill`),b=100+s;return i(`div`,{class:`${h}-progress-content`,role:`none`},i(`div`,{class:`${h}-progress-graph`,"aria-hidden":!0},i(`div`,{class:`${h}-progress-graph-circle`,style:{transform:m?`rotate(${m}deg)`:void 0}},i(`svg`,{viewBox:`0 0 ${b} ${b}`},a(),i(`g`,null,i(`path`,{class:`${h}-progress-graph-circle-rail`,d:g,"stroke-width":s,"stroke-linecap":`round`,fill:`none`,style:_})),i(`g`,null,i(`path`,{class:[`${h}-progress-graph-circle-fill`,u===0&&`${h}-progress-graph-circle-fill--empty`],d:v,"stroke-width":s,"stroke-linecap":`round`,fill:`none`,style:y}))))),d?i(`div`,null,t.default?i(`div`,{class:`${h}-progress-custom-content`,role:`none`},t.default()):l==="default"?i(`div`,{class:`${h}-progress-text`,style:{color:f},role:`none`},i(`span`,{class:`${h}-progress-text__percentage`},u),i(`span`,{class:`${h}-progress-text__unit`},p)):i(`div`,{class:`${h}-progress-icon`,"aria-hidden":!0},i(G,{clsPrefix:h},{default:()=>Xt[l]}))):null)}}}),Qt={success:i(J,null),error:i(le,null),warning:i(ue,null),info:i(fe,null)},$t=S({name:`ProgressLine`,props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:`%`},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){let n=p(()=>V(e.height)),r=p(()=>typeof e.fillColor==`object`?`linear-gradient(to right, ${e.fillColor?.stops[0]} , ${e.fillColor?.stops[1]})`:e.fillColor),a=p(()=>e.railBorderRadius===void 0?e.height===void 0?``:V(e.height,{c:.5}):V(e.railBorderRadius)),o=p(()=>e.fillBorderRadius===void 0?e.railBorderRadius===void 0?e.height===void 0?``:V(e.height,{c:.5}):V(e.railBorderRadius):V(e.fillBorderRadius));return()=>{let{indicatorPlacement:s,railColor:c,railStyle:l,percentage:u,unit:d,indicatorTextColor:f,status:p,showIndicator:m,processing:h,clsPrefix:g}=e;return i(`div`,{class:`${g}-progress-content`,role:`none`},i(`div`,{class:`${g}-progress-graph`,"aria-hidden":!0},i(`div`,{class:[`${g}-progress-graph-line`,{[`${g}-progress-graph-line--indicator-${s}`]:!0}]},i(`div`,{class:`${g}-progress-graph-line-rail`,style:[{backgroundColor:c,height:n.value,borderRadius:a.value},l]},i(`div`,{class:[`${g}-progress-graph-line-fill`,h&&`${g}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:n.value,lineHeight:n.value,borderRadius:o.value}},s===`inside`?i(`div`,{class:`${g}-progress-graph-line-indicator`,style:{color:f}},t.default?t.default():`${u}${d}`):null)))),m&&s===`outside`?i(`div`,null,t.default?i(`div`,{class:`${g}-progress-custom-content`,style:{color:f},role:`none`},t.default()):p==="default"?i(`div`,{role:`none`,class:`${g}-progress-icon ${g}-progress-icon--as-text`,style:{color:f}},u,d):i(`div`,{class:`${g}-progress-icon`,"aria-hidden":!0},i(G,{clsPrefix:g},{default:()=>Qt[p]}))):null)}}});function en(e,t,n=100){return`m ${n/2} ${n/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var tn=S({name:`ProgressMultipleCircle`,props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){let n=p(()=>e.percentage.map((t,n)=>`${Math.PI*t/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*n)-e.circleGap*n)*2}, ${e.viewBoxWidth*8}`)),r=(t,n)=>{let r=e.fillColor[n],a=typeof r==`object`?r.stops[0]:``,o=typeof r==`object`?r.stops[1]:``;return typeof e.fillColor[n]==`object`&&i(`linearGradient`,{id:`gradient-${n}`,x1:`100%`,y1:`0%`,x2:`0%`,y2:`100%`},i(`stop`,{offset:`0%`,"stop-color":a}),i(`stop`,{offset:`100%`,"stop-color":o}))};return()=>{let{viewBoxWidth:a,strokeWidth:o,circleGap:s,showIndicator:c,fillColor:l,railColor:u,railStyle:d,percentage:f,clsPrefix:p}=e;return i(`div`,{class:`${p}-progress-content`,role:`none`},i(`div`,{class:`${p}-progress-graph`,"aria-hidden":!0},i(`div`,{class:`${p}-progress-graph-circle`},i(`svg`,{viewBox:`0 0 ${a} ${a}`},i(`defs`,null,f.map((e,t)=>r(e,t))),f.map((e,t)=>i(`g`,{key:t},i(`path`,{class:`${p}-progress-graph-circle-rail`,d:en(a/2-o/2*(1+2*t)-s*t,o,a),"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:[{strokeDashoffset:0,stroke:u[t]},d[t]]}),i(`path`,{class:[`${p}-progress-graph-circle-fill`,e===0&&`${p}-progress-graph-circle-fill--empty`],d:en(a/2-o/2*(1+2*t)-s*t,o,a),"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:{strokeDasharray:n.value[t],strokeDashoffset:0,stroke:typeof l[t]==`object`?`url(#gradient-${t})`:l[t]}})))))),c&&t.default?i(`div`,null,i(`div`,{class:`${p}-progress-text`},t.default())):null)}}}),nn=j([w(`progress`,{display:`inline-block`},[w(`progress-icon`,` + color: var(--n-icon-color); + transition: color .3s var(--n-bezier); + `),f(`line`,` + width: 100%; + display: block; + `,[w(`progress-content`,` + display: flex; + align-items: center; + `,[w(`progress-graph`,{flex:1})]),w(`progress-custom-content`,{marginLeft:`14px`}),w(`progress-icon`,` + width: 30px; + padding-left: 14px; + height: var(--n-icon-size-line); + line-height: var(--n-icon-size-line); + font-size: var(--n-icon-size-line); + `,[f(`as-text`,` + color: var(--n-text-color-line-outer); + text-align: center; + width: 40px; + font-size: var(--n-font-size); + padding-left: 4px; + transition: color .3s var(--n-bezier); + `)])]),f(`circle, dashboard`,{width:`120px`},[w(`progress-custom-content`,` + position: absolute; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + display: flex; + align-items: center; + justify-content: center; + `),w(`progress-text`,` + position: absolute; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + display: flex; + align-items: center; + color: inherit; + font-size: var(--n-font-size-circle); + color: var(--n-text-color-circle); + font-weight: var(--n-font-weight-circle); + transition: color .3s var(--n-bezier); + white-space: nowrap; + `),w(`progress-icon`,` + position: absolute; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + display: flex; + align-items: center; + color: var(--n-icon-color); + font-size: var(--n-icon-size-circle); + `)]),f(`multiple-circle`,` + width: 200px; + color: inherit; + `,[w(`progress-text`,` + font-weight: var(--n-font-weight-circle); + color: var(--n-text-color-circle); + position: absolute; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + display: flex; + align-items: center; + justify-content: center; + transition: color .3s var(--n-bezier); + `)]),w(`progress-content`,{position:`relative`}),w(`progress-graph`,{position:`relative`},[w(`progress-graph-circle`,[j(`svg`,{verticalAlign:`bottom`}),w(`progress-graph-circle-fill`,` + stroke: var(--n-fill-color); + transition: + opacity .3s var(--n-bezier), + stroke .3s var(--n-bezier), + stroke-dasharray .3s var(--n-bezier); + `,[f(`empty`,{opacity:0})]),w(`progress-graph-circle-rail`,` + transition: stroke .3s var(--n-bezier); + overflow: hidden; + stroke: var(--n-rail-color); + `)]),w(`progress-graph-line`,[f(`indicator-inside`,[w(`progress-graph-line-rail`,` + height: 16px; + line-height: 16px; + border-radius: 10px; + `,[w(`progress-graph-line-fill`,` + height: inherit; + border-radius: 10px; + `),w(`progress-graph-line-indicator`,` + background: #0000; + white-space: nowrap; + text-align: right; + margin-left: 14px; + margin-right: 14px; + height: inherit; + font-size: 12px; + color: var(--n-text-color-line-inner); + transition: color .3s var(--n-bezier); + `)])]),f(`indicator-inside-label`,` + height: 16px; + display: flex; + align-items: center; + `,[w(`progress-graph-line-rail`,` + flex: 1; + transition: background-color .3s var(--n-bezier); + `),w(`progress-graph-line-indicator`,` + background: var(--n-fill-color); + font-size: 12px; + transform: translateZ(0); + display: flex; + vertical-align: middle; + height: 16px; + line-height: 16px; + padding: 0 10px; + border-radius: 10px; + position: absolute; + white-space: nowrap; + color: var(--n-text-color-line-inner); + transition: + right .2s var(--n-bezier), + color .3s var(--n-bezier), + background-color .3s var(--n-bezier); + `)]),w(`progress-graph-line-rail`,` + position: relative; + overflow: hidden; + height: var(--n-rail-height); + border-radius: 5px; + background-color: var(--n-rail-color); + transition: background-color .3s var(--n-bezier); + `,[w(`progress-graph-line-fill`,` + background: var(--n-fill-color); + position: relative; + border-radius: 5px; + height: inherit; + width: 100%; + max-width: 0%; + transition: + background-color .3s var(--n-bezier), + max-width .2s var(--n-bezier); + `,[f(`processing`,[j(`&::after`,` + content: ""; + background-image: var(--n-line-bg-processing); + animation: progress-processing-animation 2s var(--n-bezier) infinite; + `)])])])])])]),j(`@keyframes progress-processing-animation`,` + 0% { + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 100%; + opacity: 1; + } + 66% { + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + opacity: 0; + } + 100% { + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + opacity: 0; + } + `)]),rn=S({name:`Progress`,props:Object.assign(Object.assign({},E.props),{processing:Boolean,type:{type:String,default:`line`},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:`default`},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:`%`},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:`outside`},indicatorPlacement:{type:String,default:`outside`},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),setup(e){let n=p(()=>e.indicatorPlacement||e.indicatorPosition),r=p(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type===`dashboard`)return 75}),{mergedClsPrefixRef:i,inlineThemeDisabled:a}=s(e),o=E(`Progress`,`-progress`,nn,he,e,i),c=p(()=>{let{status:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontSize:r,fontSizeCircle:i,railColor:a,railHeight:s,iconSizeCircle:c,iconSizeLine:l,textColorCircle:u,textColorLineInner:d,textColorLineOuter:f,lineBgProcessing:p,fontWeightCircle:m,[A(`iconColor`,t)]:h,[A(`fillColor`,t)]:g}}=o.value;return{"--n-bezier":n,"--n-fill-color":g,"--n-font-size":r,"--n-font-size-circle":i,"--n-font-weight-circle":m,"--n-icon-color":h,"--n-icon-size-circle":c,"--n-icon-size-line":l,"--n-line-bg-processing":p,"--n-rail-color":a,"--n-rail-height":s,"--n-text-color-circle":u,"--n-text-color-line-inner":d,"--n-text-color-line-outer":f}}),l=a?t(`progress`,p(()=>e.status[0]),c,e):void 0;return{mergedClsPrefix:i,mergedIndicatorPlacement:n,gapDeg:r,cssVars:a?void 0:c,themeClass:l?.themeClass,onRender:l?.onRender}},render(){let{type:e,cssVars:t,indicatorTextColor:n,showIndicator:r,status:a,railColor:o,railStyle:s,color:c,percentage:l,viewBoxWidth:u,strokeWidth:d,mergedIndicatorPlacement:f,unit:p,borderRadius:m,fillBorderRadius:h,height:g,processing:_,circleGap:v,mergedClsPrefix:y,gapDeg:b,gapOffsetDegree:x,themeClass:S,$slots:C,onRender:w}=this;return w?.(),i(`div`,{class:[S,`${y}-progress`,`${y}-progress--${e}`,`${y}-progress--${a}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":l,role:e===`circle`||e===`line`||e===`dashboard`?`progressbar`:`none`},e===`circle`||e===`dashboard`?i(Zt,{clsPrefix:y,status:a,showIndicator:r,indicatorTextColor:n,railColor:o,fillColor:c,railStyle:s,offsetDegree:this.offsetDegree,percentage:l,viewBoxWidth:u,strokeWidth:d,gapDegree:b===void 0?e===`dashboard`?75:0:b,gapOffsetDegree:x,unit:p},C):e===`line`?i($t,{clsPrefix:y,status:a,showIndicator:r,indicatorTextColor:n,railColor:o,fillColor:c,railStyle:s,percentage:l,processing:_,indicatorPlacement:f,unit:p,fillBorderRadius:h,railBorderRadius:m,height:g},C):e===`multiple-circle`?i(tn,{clsPrefix:y,strokeWidth:d,railColor:o,fillColor:c,railStyle:s,viewBoxWidth:u,percentage:l,showIndicator:r,circleGap:v},C):null)}}),Q=u(`n-upload`),an=j([w(`upload`,`width: 100%;`,[f(`dragger-inside`,[w(`upload-trigger`,` + display: block; + `)]),f(`drag-over`,[w(`upload-dragger`,` + border: var(--n-dragger-border-hover); + `)])]),w(`upload-dragger`,` + cursor: pointer; + box-sizing: border-box; + width: 100%; + text-align: center; + border-radius: var(--n-border-radius); + padding: 24px; + opacity: 1; + transition: + opacity .3s var(--n-bezier), + border-color .3s var(--n-bezier), + background-color .3s var(--n-bezier); + background-color: var(--n-dragger-color); + border: var(--n-dragger-border); + `,[j(`&:hover`,` + border: var(--n-dragger-border-hover); + `),f(`disabled`,` + cursor: not-allowed; + `)]),w(`upload-trigger`,` + display: inline-block; + box-sizing: border-box; + opacity: 1; + transition: opacity .3s var(--n-bezier); + `,[j(`+`,[w(`upload-file-list`,`margin-top: 8px;`)]),f(`disabled`,` + opacity: var(--n-item-disabled-opacity); + cursor: not-allowed; + `),f(`image-card`,` + width: 96px; + height: 96px; + `,[w(`base-icon`,` + font-size: 24px; + `),w(`upload-dragger`,` + padding: 0; + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + `)])]),w(`upload-file-list`,` + line-height: var(--n-line-height); + opacity: 1; + transition: opacity .3s var(--n-bezier); + `,[j(`a, img`,`outline: none;`),f(`disabled`,` + opacity: var(--n-item-disabled-opacity); + cursor: not-allowed; + `,[w(`upload-file`,`cursor: not-allowed;`)]),f(`grid`,` + display: grid; + grid-template-columns: repeat(auto-fill, 96px); + grid-gap: 8px; + margin-top: 0; + `),w(`upload-file`,` + display: block; + box-sizing: border-box; + cursor: default; + padding: 0px 12px 0 6px; + transition: background-color .3s var(--n-bezier); + border-radius: var(--n-border-radius); + `,[ce(),w(`progress`,[ce({foldPadding:!0})]),j(`&:hover`,` + background-color: var(--n-item-color-hover); + `,[w(`upload-file-info`,[x(`action`,` + opacity: 1; + `)])]),f(`image-type`,` + border-radius: var(--n-border-radius); + text-decoration: underline; + text-decoration-color: #0000; + `,[w(`upload-file-info`,` + padding-top: 0px; + padding-bottom: 0px; + width: 100%; + height: 100%; + display: flex; + justify-content: space-between; + align-items: center; + padding: 6px 0; + `,[w(`progress`,` + padding: 2px 0; + margin-bottom: 0; + `),x(`name`,` + padding: 0 8px; + `),x(`thumbnail`,` + width: 32px; + height: 32px; + font-size: 28px; + display: flex; + justify-content: center; + align-items: center; + `,[j(`img`,` + width: 100%; + `)])])]),f(`text-type`,[w(`progress`,` + box-sizing: border-box; + padding-bottom: 6px; + margin-bottom: 6px; + `)]),f(`image-card-type`,` + position: relative; + width: 96px; + height: 96px; + border: var(--n-item-border-image-card); + border-radius: var(--n-border-radius); + padding: 0; + display: flex; + align-items: center; + justify-content: center; + transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier); + border-radius: var(--n-border-radius); + overflow: hidden; + `,[w(`progress`,` + position: absolute; + left: 8px; + bottom: 8px; + right: 8px; + width: unset; + `),w(`upload-file-info`,` + padding: 0; + width: 100%; + height: 100%; + `,[x(`thumbnail`,` + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 36px; + `,[j(`img`,` + width: 100%; + `)])]),j(`&::before`,` + position: absolute; + z-index: 1; + left: 0; + right: 0; + top: 0; + bottom: 0; + border-radius: inherit; + opacity: 0; + transition: opacity .2s var(--n-bezier); + content: ""; + `),j(`&:hover`,[j(`&::before`,`opacity: 1;`),w(`upload-file-info`,[x(`thumbnail`,`opacity: .12;`)])])]),f(`error-status`,[j(`&:hover`,` + background-color: var(--n-item-color-hover-error); + `),w(`upload-file-info`,[x(`name`,`color: var(--n-item-text-color-error);`),x(`thumbnail`,`color: var(--n-item-text-color-error);`)]),f(`image-card-type`,` + border: var(--n-item-border-image-card-error); + `)]),f(`with-url`,` + cursor: pointer; + `,[w(`upload-file-info`,[x(`name`,` + color: var(--n-item-text-color-success); + text-decoration-color: var(--n-item-text-color-success); + `,[j(`a`,` + text-decoration: underline; + `)])])]),w(`upload-file-info`,` + position: relative; + padding-top: 6px; + padding-bottom: 6px; + display: flex; + flex-wrap: nowrap; + `,[x(`thumbnail`,` + font-size: 18px; + opacity: 1; + transition: opacity .2s var(--n-bezier); + color: var(--n-item-icon-color); + `,[w(`base-icon`,` + margin-right: 2px; + vertical-align: middle; + transition: color .3s var(--n-bezier); + `)]),x(`action`,` + padding-top: inherit; + padding-bottom: inherit; + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 80px; + display: flex; + align-items: center; + transition: opacity .2s var(--n-bezier); + justify-content: flex-end; + opacity: 0; + `,[w(`button`,[j(`&:not(:last-child)`,{marginRight:`4px`}),w(`base-icon`,[j(`svg`,[de()])])]),f(`image-type`,` + position: relative; + max-width: 80px; + width: auto; + `),f(`image-card-type`,` + z-index: 2; + position: absolute; + width: 100%; + height: 100%; + left: 0; + right: 0; + bottom: 0; + top: 0; + display: flex; + justify-content: center; + align-items: center; + `)]),x(`name`,` + color: var(--n-item-text-color); + flex: 1; + display: flex; + justify-content: center; + text-overflow: ellipsis; + overflow: hidden; + flex-direction: column; + text-decoration-color: #0000; + font-size: var(--n-font-size); + transition: + color .3s var(--n-bezier), + text-decoration-color .3s var(--n-bezier); + `,[j(`a`,` + color: inherit; + text-decoration: underline; + `)])])])]),w(`upload-file-input`,` + display: none; + width: 0; + height: 0; + opacity: 0; + `)]),on=S({name:`UploadDragger`,__UPLOAD_DRAGGER__:!0,setup(e,{slots:t}){let r=a(Q,null);return r||n(`upload-dragger`,"`n-upload-dragger` must be placed inside `n-upload`."),()=>{let{mergedClsPrefixRef:{value:e},mergedDisabledRef:{value:n},maxReachedRef:{value:a}}=r;return i(`div`,{class:[`${e}-upload-dragger`,(n||a)&&`${e}-upload-dragger--disabled`]},t)}}});function sn(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},i(`g`,{fill:`none`},i(`path`,{d:`M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z`,fill:`currentColor`})))}function cn(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},i(`g`,{fill:`none`},i(`path`,{d:`M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z`,fill:`currentColor`})))}var ln=S({name:`UploadProgress`,props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:a(Q).mergedThemeRef}},render(){return i(be,null,{default:()=>this.show?i(rn,{type:`line`,showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),un=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function dn(e){return e.includes(`image/`)}function fn(e=``){let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]}var pn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,mn=e=>{if(e.type)return dn(e.type);let t=fn(e.name||``);if(pn.test(t))return!0;let n=e.thumbnailUrl||e.url||``,r=fn(n);return!!(/^data:image\//.test(n)||pn.test(r))};function hn(e){return un(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!dn(e.type)){t(``);return}t(window.URL.createObjectURL(e))})})}var gn=I&&window.FileReader&&window.File;function _n(e){return e.isDirectory}function vn(e){return e.isFile}function yn(t,n){return un(this,void 0,void 0,function*(){let r=[];function i(t){return un(this,void 0,void 0,function*(){for(let a of t)if(a){if(n&&_n(a)){let t=a.createReader(),n=[],r;try{do r=yield new Promise((e,n)=>{t.readEntries(e,n)}),n=n.concat(r);while(r.length>0)}catch(t){e(`upload`,`error happens when handling directory upload`,t)}yield i(n)}else if(vn(a))try{let e=yield new Promise((e,t)=>{a.file(e,t)});r.push({file:e,entry:a,source:`dnd`})}catch(t){e(`upload`,`error happens when handling file upload`,t)}}})}return yield i(t),r})}function $(e){let{id:t,name:n,percentage:r,status:i,url:a,file:o,thumbnailUrl:s,type:c,fullPath:l,batchId:u}=e;return{id:t,name:n,percentage:r??null,status:i,url:a??null,file:o??null,thumbnailUrl:s??null,type:c??null,fullPath:l??null,batchId:u??null}}function bn(e,t,n){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase(),n.split(`,`).map(e=>e.trim()).filter(Boolean).some(n=>{if(n.startsWith(`.`)){if(e.endsWith(n))return!0}else if(n.includes(`/`)){let[e,r]=t.split(`/`),[i,a]=n.split(`/`);if((i===`*`||e&&i&&i===e)&&(a===`*`||r&&a&&a===r))return!0}else return!0;return!1})}var xn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Sn={paddingMedium:`0 3px`,heightMedium:`24px`,iconSizeMedium:`18px`},Cn=S({name:`UploadFile`,props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(e){let t=a(Q),n=y(null),r=y(``),i=p(()=>{let{file:t}=e;return t.status===`finished`?`success`:t.status===`error`?`error`:`info`}),o=p(()=>{let{file:t}=e;if(t.status===`error`)return`error`}),s=p(()=>{let{file:t}=e;return t.status===`uploading`}),c=p(()=>{if(!t.showCancelButtonRef.value)return!1;let{file:n}=e;return[`uploading`,`pending`,`error`].includes(n.status)}),l=p(()=>{if(!t.showRemoveButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),u=p(()=>{if(!t.showDownloadButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),d=p(()=>{if(!t.showRetryButtonRef.value)return!1;let{file:n}=e;return[`error`].includes(n.status)}),f=ye(()=>r.value||e.file.thumbnailUrl||e.file.url),m=p(()=>{if(!t.showPreviewButtonRef.value)return!1;let{file:{status:n},listType:r}=e;return[`finished`].includes(n)&&f.value&&r===`image-card`});function h(){return xn(this,void 0,void 0,function*(){let n=t.onRetryRef.value;n&&(yield n({file:e.file}))===!1||t.submit({fileId:e.file.id})})}function g(t){t.preventDefault();let{file:n}=e;[`finished`,`pending`,`error`].includes(n.status)?v(n):[`uploading`].includes(n.status)?x(n):D(`upload`,`The button clicked type is unknown.`)}function _(t){t.preventDefault(),b(e.file)}function v(n){let{xhrMap:r,doChange:i,onRemoveRef:{value:a},mergedFileListRef:{value:o}}=t;Promise.resolve(a?a({file:Object.assign({},n),fileList:o,index:e.index}):!0).then(e=>{if(e===!1)return;let t=Object.assign({},n,{status:`removed`});r.delete(n.id),i(t,void 0,{remove:!0})})}function b(e){let{onDownloadRef:{value:n},customDownloadRef:{value:r}}=t;Promise.resolve(n?n(Object.assign({},e)):!0).then(t=>{t!==!1&&(r?r(Object.assign({},e)):xe(e.url,e.name))})}function x(e){let{xhrMap:n}=t;n.get(e.id)?.abort(),v(Object.assign({},e))}function S(r){let{onPreviewRef:{value:i}}=t;if(i)i(e.file,{event:r});else if(e.listType===`image-card`){let{value:e}=n;if(!e)return;e.showPreview()}}let C=()=>xn(this,void 0,void 0,function*(){let{listType:n}=e;n!==`image`&&n!==`image-card`||t.shouldUseThumbnailUrlRef.value(e.file)&&(r.value=yield t.getFileThumbnailUrlResolver(e.file))});return k(()=>{C()}),{mergedTheme:t.mergedThemeRef,progressStatus:i,buttonType:o,showProgress:s,disabled:t.mergedDisabledRef,showCancelButton:c,showRemoveButton:l,showDownloadButton:u,showRetryButton:d,showPreviewButton:m,mergedThumbnailUrl:f,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:n,handleRemoveOrCancelClick:g,handleDownloadClick:_,handleRetryClick:h,handlePreviewClick:S}},render(){let{clsPrefix:e,mergedTheme:t,listType:n,file:r,renderIcon:a}=this,o,s=n===`image`;o=s||n===`image-card`?!this.shouldUseThumbnailUrl(r)||!this.mergedThumbnailUrl?i(`span`,{class:`${e}-upload-file-info__thumbnail`},a?a(r):mn(r)?i(G,{clsPrefix:e},{default:sn}):i(G,{clsPrefix:e},{default:cn})):i(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},n===`image-card`?i(Yt,{src:this.mergedThumbnailUrl||void 0,previewSrc:r.url||void 0,alt:r.name,ref:`imageRef`}):i(`img`,{src:this.mergedThumbnailUrl||void 0,alt:r.name})):i(`span`,{class:`${e}-upload-file-info__thumbnail`},a?a(r):i(G,{clsPrefix:e},{default:()=>i(vt,null)}));let c=i(ln,{show:this.showProgress,percentage:r.percentage||0,status:this.progressStatus}),l=n===`text`||n===`image`;return i(`div`,{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,r.url&&r.status!==`error`&&n!==`image-card`&&`${e}-upload-file--with-url`,`${e}-upload-file--${n}-type`]},i(`div`,{class:`${e}-upload-file-info`},o,i(`div`,{class:`${e}-upload-file-info__name`},l&&(r.url&&r.status!==`error`?i(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,onClick:this.handlePreviewClick},r.name):i(`span`,{onClick:this.handlePreviewClick},r.name)),s&&c),i(`div`,{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${n}-type`]},this.showPreviewButton?i(L,{key:`preview`,quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(G,{clsPrefix:e},{default:()=>i(se,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&i(L,{key:`cancelOrTrash`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:Sn,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>i(_e,null,{default:()=>this.showRemoveButton?i(G,{clsPrefix:e,key:`trash`},{default:()=>i(Tt,null)}):i(G,{clsPrefix:e,key:`cancel`},{default:()=>i(yt,null)})})}),this.showRetryButton&&!this.disabled&&i(L,{key:`retry`,quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(G,{clsPrefix:e},{default:()=>i(St,null)})}),this.showDownloadButton?i(L,{key:`download`,quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:Sn},{icon:()=>i(G,{clsPrefix:e},{default:()=>i(bt,null)})}):null)),!s&&c)}}),wn=S({name:`UploadTrigger`,props:{abstract:Boolean},slots:Object,setup(e,{slots:t}){let r=a(Q,null);r||n(`upload-trigger`,"`n-upload-trigger` must be placed inside `n-upload`.");let{mergedClsPrefixRef:o,mergedDisabledRef:s,maxReachedRef:c,listTypeRef:l,dragOverRef:u,openOpenFileDialog:d,draggerInsideRef:f,handleFileAddition:m,mergedDirectoryDndRef:h,triggerClassRef:g,triggerStyleRef:_}=r,v=p(()=>l.value===`image-card`);function y(){s.value||c.value||d()}function b(e){e.preventDefault(),u.value=!0}function x(e){e.preventDefault(),u.value=!0}function S(e){e.preventDefault(),u.value=!1}function C(e){if(e.preventDefault(),!f.value||s.value||c.value){u.value=!1;return}let t=e.dataTransfer?.items;t?.length?yn(Array.from(t).map(e=>e.webkitGetAsEntry()),h.value).then(e=>{m(e)}).finally(()=>{u.value=!1}):u.value=!1}return()=>{let{value:n}=o;return e.abstract?t.default?.call(t,{handleClick:y,handleDrop:C,handleDragOver:b,handleDragEnter:x,handleDragLeave:S}):i(`div`,{class:[`${n}-upload-trigger`,(s.value||c.value)&&`${n}-upload-trigger--disabled`,v.value&&`${n}-upload-trigger--image-card`,g.value],style:_.value,onClick:y,onDrop:C,onDragover:b,onDragenter:x,onDragleave:S},v.value?i(on,null,{default:()=>B(t.default,()=>[i(G,{clsPrefix:n},{default:()=>i(U,null)})])}):t)}}}),Tn=S({name:`UploadFileList`,setup(e,{slots:t}){let r=a(Q,null);r||n(`upload-file-list`,"`n-upload-file-list` must be placed inside `n-upload`.");let{abstractRef:o,mergedClsPrefixRef:s,listTypeRef:c,mergedFileListRef:l,fileListClassRef:u,fileListStyleRef:d,cssVarsRef:f,themeClassRef:m,maxReachedRef:h,showTriggerRef:g,imageGroupPropsRef:_}=r,v=p(()=>c.value===`image-card`),y=()=>l.value.map((e,t)=>i(Cn,{clsPrefix:s.value,key:e.id,file:e,index:t,listType:c.value})),b=()=>v.value?i(Kt,Object.assign({},_.value),{default:y}):i(be,{group:!0},{default:y});return()=>{let{value:e}=s,{value:n}=o;return i(`div`,{class:[`${e}-upload-file-list`,v.value&&`${e}-upload-file-list--grid`,n?m?.value:void 0,u.value],style:[n&&f?f.value:``,d.value]},b(),g.value&&!h.value&&v.value&&i(wn,null,t))}}}),En=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Dn(e,t,n){let{doChange:r,xhrMap:i}=e,a=0;function o(n){let o=Object.assign({},t,{status:`error`,percentage:a});i.delete(t.id),o=$(e.onError?.call(e,{file:o,event:n})||o),r(o,n)}function s(s){if(e.isErrorState){if(e.isErrorState(n)){o(s);return}}else if(n.status<200||n.status>=300){o(s);return}let c=Object.assign({},t,{status:`finished`,percentage:a});i.delete(t.id),c=$(e.onFinish?.call(e,{file:c,event:s})||c),r(c,s)}return{handleXHRLoad:s,handleXHRError:o,handleXHRAbort(e){let n=Object.assign({},t,{status:`removed`,file:null,percentage:a});i.delete(t.id),r(n,e)},handleXHRProgress(e){let n=Object.assign({},t,{status:`uploading`});if(e.lengthComputable){let t=Math.ceil(e.loaded/e.total*100);n.percentage=t,a=t}r(n,e)}}}function On(e){let{inst:t,file:n,data:r,headers:i,withCredentials:a,action:o,customRequest:s}=e,{doChange:c}=e.inst,l=0;s({file:n,data:r,headers:i,withCredentials:a,action:o,onProgress(e){let t=Object.assign({},n,{status:`uploading`}),r=e.percent;t.percentage=r,l=r,c(t)},onFinish(){let e=Object.assign({},n,{status:`finished`,percentage:l});e=$(t.onFinish?.call(t,{file:e})||e),c(e)},onError(){let e=Object.assign({},n,{status:`error`,percentage:l});e=$(t.onError?.call(t,{file:e})||e),c(e)}})}function kn(e,t,n){let r=Dn(e,t,n);n.onabort=r.handleXHRAbort,n.onerror=r.handleXHRError,n.onload=r.handleXHRLoad,n.upload&&(n.upload.onprogress=r.handleXHRProgress)}function An(e,t){return typeof e==`function`?e({file:t}):e||{}}function jn(e,t,n){let r=An(t,n);r&&Object.keys(r).forEach(t=>{e.setRequestHeader(t,r[t])})}function Mn(e,t,n){let r=An(t,n);r&&Object.keys(r).forEach(t=>{e.append(t,r[t])})}function Nn(e,t,n,{method:r,action:i,withCredentials:a,responseType:o,headers:s,data:c}){let l=new XMLHttpRequest;l.responseType=o,e.xhrMap.set(n.id,l),l.withCredentials=a;let u=new FormData;if(Mn(u,c,n),n.file!==null&&u.append(t,n.file),kn(e,n,l),i!==void 0){l.open(r.toUpperCase(),i),jn(l,s,n),l.send(u);let t=Object.assign({},n,{status:`uploading`});e.doChange(t)}}var Pn=S({name:`Upload`,props:Object.assign(Object.assign({},E.props),{name:{type:String,default:`file`},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:`POST`},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:``},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onRetry:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,customDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:`text`},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>gn?mn(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),setup(e){e.abstract&&e.listType===`image-card`&&n(`upload`,`when the list-type is image-card, abstract is not supported.`);let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=s(e),c=E(`Upload`,`-upload`,an,ve,e,r),l=_(`Upload`,a,r),u=H(e),d=y(e.defaultFileList),f=M(e,`fileList`),m=y(null),h={value:!1},g=y(!1),v=new Map,b=F(f,d),x=p(()=>b.value.map($)),S=p(()=>{let{max:t}=e;return t===void 0?!1:x.value.length>=t});function C(){var e;(e=m.value)==null||e.click()}function w(e){let t=e.target;A(t.files?Array.from(t.files).map(e=>({file:e,entry:null,source:`input`})):null,e),t.value=``}function T(t){let{"onUpdate:fileList":n,onUpdateFileList:r}=e;n&&z(n,t),r&&z(r,t),d.value=t}let D=p(()=>e.multiple||e.directory),k=(t,n,r={append:!1,remove:!1})=>{let{append:i,remove:a}=r,o=Array.from(x.value),s=o.findIndex(e=>e.id===t.id);if(i||a||~s){i?o.push(t):a?o.splice(s,1):o.splice(s,1,t);let{onChange:r}=e;r&&r({file:t,fileList:o,event:n}),T(o)}};function A(t,n){if(!t||t.length===0)return;let{onBeforeUpload:r}=e;t=D.value?t:[t[0]];let{max:i,accept:a}=e;t=t.filter(({file:e,source:t})=>t===`dnd`&&a?.trim()?bn(e.name,e.type,a):!0),i&&(t=t.slice(0,i-x.value.length));let s=ge();Promise.all(t.map(e=>En(this,[e],void 0,function*({file:e,entry:t}){let n={id:ge(),batchId:s,name:e.name,status:`pending`,percentage:0,file:e,url:null,type:e.type,thumbnailUrl:null,fullPath:t?.fullPath??`/${e.webkitRelativePath||e.name}`};return!r||(yield r({file:n,fileList:x.value}))!==!1?n:null}))).then(e=>En(this,void 0,void 0,function*(){let t=Promise.resolve();e.forEach(e=>{t=t.then(o).then(()=>{e&&k(e,n,{append:!0})})}),yield t})).then(()=>{e.defaultUpload&&j()})}function j({fileId:t,retry:n=!1}={}){let{method:r,action:i,withCredentials:a,headers:o,data:s,name:c}=e,l=t===void 0?x.value:x.value.filter(e=>e.id===t),u=n||t!==void 0;l.forEach(t=>{let{status:n}=t;(n===`pending`||n===`error`&&u)&&(e.customRequest?On({inst:{doChange:k,xhrMap:v,onFinish:e.onFinish,onError:e.onError},file:t,action:i,withCredentials:a,headers:o,data:s,customRequest:e.customRequest}):Nn({doChange:k,xhrMap:v,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},c,t,{method:r,action:i,withCredentials:a,responseType:e.responseType,headers:o,data:s}))})}function ee(t){if(t.thumbnailUrl)return t.thumbnailUrl;let{createThumbnailUrl:n}=e;return n?n(t.file,t)??(t.url||``):t.url?t.url:t.file?hn(t.file):``}let te=p(()=>{let{common:{cubicBezierEaseInOut:e},self:{draggerColor:t,draggerBorder:n,draggerBorderHover:r,itemColorHover:i,itemColorHoverError:a,itemTextColorError:o,itemTextColorSuccess:s,itemTextColor:l,itemIconColor:u,itemDisabledOpacity:d,lineHeight:f,borderRadius:p,fontSize:m,itemBorderImageCardError:h,itemBorderImageCard:g}}=c.value;return{"--n-bezier":e,"--n-border-radius":p,"--n-dragger-border":n,"--n-dragger-border-hover":r,"--n-dragger-color":t,"--n-font-size":m,"--n-item-color-hover":i,"--n-item-color-hover-error":a,"--n-item-disabled-opacity":d,"--n-item-icon-color":u,"--n-item-text-color":l,"--n-item-text-color-error":o,"--n-item-text-color-success":s,"--n-line-height":f,"--n-item-border-image-card-error":h,"--n-item-border-image-card":g}}),N=i?t(`upload`,void 0,te,e):void 0;O(Q,{mergedClsPrefixRef:r,mergedThemeRef:c,showCancelButtonRef:M(e,`showCancelButton`),showDownloadButtonRef:M(e,`showDownloadButton`),showRemoveButtonRef:M(e,`showRemoveButton`),showRetryButtonRef:M(e,`showRetryButton`),onRemoveRef:M(e,`onRemove`),onDownloadRef:M(e,`onDownload`),customDownloadRef:M(e,`customDownload`),mergedFileListRef:x,triggerClassRef:M(e,`triggerClass`),triggerStyleRef:M(e,`triggerStyle`),shouldUseThumbnailUrlRef:M(e,`shouldUseThumbnailUrl`),renderIconRef:M(e,`renderIcon`),xhrMap:v,submit:j,doChange:k,showPreviewButtonRef:M(e,`showPreviewButton`),onPreviewRef:M(e,`onPreview`),getFileThumbnailUrlResolver:ee,listTypeRef:M(e,`listType`),dragOverRef:g,openOpenFileDialog:C,draggerInsideRef:h,handleFileAddition:A,mergedDisabledRef:u.mergedDisabledRef,maxReachedRef:S,fileListClassRef:M(e,`fileListClass`),fileListStyleRef:M(e,`fileListStyle`),abstractRef:M(e,`abstract`),acceptRef:M(e,`accept`),cssVarsRef:i?void 0:te,themeClassRef:N?.themeClass,onRender:N?.onRender,showTriggerRef:M(e,`showTrigger`),imageGroupPropsRef:M(e,`imageGroupProps`),mergedDirectoryDndRef:p(()=>e.directoryDnd??e.directory),onRetryRef:M(e,`onRetry`)});let P={clear:()=>{d.value=[]},submit:j,openOpenFileDialog:C};return Object.assign({mergedClsPrefix:r,draggerInsideRef:h,rtlEnabled:l,inputElRef:m,mergedTheme:c,dragOver:g,mergedMultiple:D,cssVars:i?void 0:te,themeClass:N?.themeClass,onRender:N?.onRender,handleFileInputChange:w},P)},render(){let{draggerInsideRef:e,mergedClsPrefix:t,$slots:n,directory:r,onRender:a}=this;n.default&&!this.abstract&&n.default()[0]?.type?.__UPLOAD_DRAGGER__&&(e.value=!0);let o=i(`input`,Object.assign({},this.inputProps,{ref:`inputElRef`,type:`file`,class:`${t}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:r||void 0,directory:r||void 0}));return this.abstract?i(b,null,n.default?.call(n),i(v,{to:`body`},o)):(a?.(),i(`div`,{class:[`${t}-upload`,this.rtlEnabled&&`${t}-upload--rtl`,e.value&&`${t}-upload--dragger-inside`,this.dragOver&&`${t}-upload--drag-over`,this.themeClass],style:this.cssVars},o,this.showTrigger&&this.listType!==`image-card`&&i(wn,null,n),this.showFileList&&i(Tn,null,n)))}});export{on as n,Pn as t}; \ No newline at end of file diff --git a/frontend/dist/assets/UserAgreementView-Br1XknrC.js b/frontend/dist/assets/UserAgreementView-a6MCHwYf.js similarity index 55% rename from frontend/dist/assets/UserAgreementView-Br1XknrC.js rename to frontend/dist/assets/UserAgreementView-a6MCHwYf.js index fe16e2d..a9edddd 100644 --- a/frontend/dist/assets/UserAgreementView-Br1XknrC.js +++ b/frontend/dist/assets/UserAgreementView-a6MCHwYf.js @@ -1 +1 @@ -import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-BhocR0ua.js";import{t as o}from"./DocsPage-D65XguoR.js";var s=r({__name:`UserAgreementView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`terms`}),t(a)],64))}});export{s as default}; \ No newline at end of file +import{Kt as e,Ot as t,ht as n,kt as r,wt as i}from"./client-Bz0sY7Lm.js";import{t as a}from"./HeaderMenu-vnmT21Il.js";import{t as o}from"./DocsPage-Bhdw6IT7.js";var s=r({__name:`UserAgreementView`,setup(r){return(r,s)=>(e(),i(n,null,[t(o,{kind:`terms`}),t(a)],64))}});export{s as default}; \ No newline at end of file diff --git a/frontend/dist/assets/UsersView-K9_l6ZnM.js b/frontend/dist/assets/UsersView-BDzjXO6r.js similarity index 88% rename from frontend/dist/assets/UsersView-K9_l6ZnM.js rename to frontend/dist/assets/UsersView-BDzjXO6r.js index bfdc06f..30ac328 100644 --- a/frontend/dist/assets/UsersView-K9_l6ZnM.js +++ b/frontend/dist/assets/UsersView-BDzjXO6r.js @@ -1 +1 @@ -import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-D1LVu21r.js";import{n as h,r as g}from"./es-BhJOHfSF.js";import{t as _}from"./Modal-Bsm1tUwA.js";import{t as v}from"./FormItem-CLDJT3hM.js";import{t as y}from"./Button-lcMg8vK2.js";import{t as b}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{t as x}from"./Input-DeqNzuJd.js";import{t as S}from"./Space-Ka5Z-MRX.js";import{t as C}from"./Flex-BUYalFhW.js";import{i as w,lt as T,o as E}from"./index-6B3OmSLg.js";import{t as D}from"./HeaderMenu-BhocR0ua.js";var O={class:`center-block-custom`},k={class:`width700`},A={class:`user-field`},j={class:`user-field`},M={class:`user-field`},N=b(d({__name:`UsersPage`,setup(d){let b=w(),N=h(),P=c([]),F=E(),I=c(null),L=c(``),R=c(``),z=c(!1);function B(){I.value=null,L.value=``,R.value=``}async function V(){if(!(!I.value||z.value)){if([...L.value].length<8||[...L.value].length>16){N.error(`Пароль должен содержать минимум 8 символов и не более 16 символов`);return}if(L.value!==R.value){N.error(`Пароли не совпадают`);return}z.value=!0;try{await b.ChangeUserPassword({ID:I.value.ID,newPassword:L.value}),B(),N.success(`Пароль изменён`)}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить пароль`)}finally{z.value=!1}}}async function H(){try{let e=await b.GetUsers({});P.value=e.users}catch(e){N.error(e instanceof Error?e.message:`Не удалось загрузить пользователей`)}}H();async function U(e,t){try{await b.AddUserRole({ID:e,role:t}),await H()}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить роль`)}}async function W(e,t){try{await b.DeleteUserRole({ID:e,role:t}),await H()}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить роль`)}}return(c,d)=>(r(),f(l,null,[p(`div`,O,[p(`div`,k,[(r(!0),f(l,null,n(P.value,c=>(r(),f(`div`,{key:c.ID,class:`user-block`},[p(`div`,A,`Позывной: `+a(c.username),1),p(`div`,j,`Почта: `+a(c.email),1),p(`div`,M,[i(s(S),null,{default:u(()=>[d[3]||=t(` Роли: `,-1),(r(!0),f(l,null,n(c.roles,e=>(r(),o(s(g),{bordered:!1,key:e},{default:u(()=>[t(a(e),1)]),_:2},1024))),128))]),_:2},1024)]),i(s(C),{justify:`end`,class:`roles-buttons-block`},{default:u(()=>[s(F).hasRole(`admin`)&&s(F).user&&c.ID!==s(F).user.ID?(r(),o(s(y),{key:0,onClick:e=>I.value=c},{default:u(()=>[...d[4]||=[t(`Изменить пароль`,-1)]]),_:1},8,[`onClick`])):e(``,!0),c.roles?.includes(`developer`)?(r(),o(s(y),{key:2,onClick:e=>W(c.ID,`developer`)},{default:u(()=>[...d[6]||=[t(`Забрать роль разработчика`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:1,onClick:e=>U(c.ID,`developer`)},{default:u(()=>[...d[5]||=[t(`Выдать роль разработчика`,-1)]]),_:1},8,[`onClick`])),c.roles?.includes(`author`)?(r(),o(s(y),{key:4,onClick:e=>W(c.ID,`author`)},{default:u(()=>[...d[8]||=[t(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:3,onClick:e=>U(c.ID,`author`)},{default:u(()=>[...d[7]||=[t(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),c.roles?.includes(`organizer`)?(r(),o(s(y),{key:6,onClick:e=>W(c.ID,`organizer`)},{default:u(()=>[...d[10]||=[t(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:5,onClick:e=>U(c.ID,`organizer`)},{default:u(()=>[...d[9]||=[t(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),i(s(_),{show:I.value!==null,style:{width:`min(94vw, 480px)`},closable:!z.value,"mask-closable":!z.value,"close-on-esc":!z.value,"onUpdate:show":d[2]||=e=>{e||B()}},{default:u(()=>[i(s(m),{title:`Изменить пароль`,bordered:!1,role:`dialog`,"aria-modal":`true`,closable:!z.value,onClose:B},{default:u(()=>[p(`p`,null,a(I.value?.username)+` — `+a(I.value?.email),1),p(`form`,{onSubmit:T(V,[`prevent`])},[i(s(v),{label:`Новый пароль`,"label-for":`new-user-password`},{default:u(()=>[i(s(x),{value:L.value,"onUpdate:value":d[0]||=e=>L.value=e,"input-props":{id:`new-user-password`,autocomplete:`new-password`},type:`password`,"show-password-on":`click`,disabled:z.value,placeholder:`От 8 символов, не более 16 символов`},null,8,[`value`,`disabled`])]),_:1}),i(s(v),{label:`Повторите пароль`,"label-for":`confirm-user-password`},{default:u(()=>[i(s(x),{value:R.value,"onUpdate:value":d[1]||=e=>R.value=e,"input-props":{id:`confirm-user-password`,autocomplete:`new-password`},type:`password`,"show-password-on":`click`,disabled:z.value,placeholder:`Повторите новый пароль`},null,8,[`value`,`disabled`])]),_:1}),i(s(C),{justify:`end`},{default:u(()=>[i(s(y),{disabled:z.value,onClick:B},{default:u(()=>[...d[11]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(s(y),{"attr-type":`submit`,type:`primary`,loading:z.value},{default:u(()=>[...d[12]||=[t(`Сохранить`,-1)]]),_:1},8,[`loading`])]),_:1})],32)]),_:1},8,[`closable`])]),_:1},8,[`show`,`closable`,`mask-closable`,`close-on-esc`]),i(D,{active:`users`})],64))}}),[[`__scopeId`,`data-v-da30be55`]]),P=d({__name:`UsersView`,setup(e){return(e,t)=>(r(),o(N))}});export{P as default}; \ No newline at end of file +import{Ct as e,Dt as t,Jt as n,Kt as r,Ot as i,Rn as a,St as o,bn as s,hn as c,ht as l,in as u,kt as d,wt as f,xt as p}from"./client-Bz0sY7Lm.js";import{t as m}from"./Card-BGJkYb2B.js";import{n as h,r as g}from"./es-Qklex053.js";import{t as _}from"./Modal-xM6cEDIr.js";import{t as v}from"./FormItem-k4AtNXqm.js";import{t as y}from"./Button-MBUKfT_Z.js";import{t as b}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{t as x}from"./Input-CEIE7mTC.js";import{t as S}from"./Space-CstX9TL6.js";import{t as C}from"./Flex-Dsa9FxiA.js";import{i as w,o as T,ut as E}from"./index-NE0dsiiJ.js";import{t as D}from"./HeaderMenu-vnmT21Il.js";var O={class:`center-block-custom`},k={class:`width700`},A={class:`user-field`},j={class:`user-field`},M={class:`user-field`},N=b(d({__name:`UsersPage`,setup(d){let b=w(),N=h(),P=c([]),F=T(),I=c(null),L=c(``),R=c(``),z=c(!1);function B(){I.value=null,L.value=``,R.value=``}async function V(){if(!(!I.value||z.value)){if([...L.value].length<8||[...L.value].length>16){N.error(`Пароль должен содержать минимум 8 символов и не более 16 символов`);return}if(L.value!==R.value){N.error(`Пароли не совпадают`);return}z.value=!0;try{await b.ChangeUserPassword({ID:I.value.ID,newPassword:L.value}),B(),N.success(`Пароль изменён`)}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить пароль`)}finally{z.value=!1}}}async function H(){try{let e=await b.GetUsers({});P.value=e.users}catch(e){N.error(e instanceof Error?e.message:`Не удалось загрузить пользователей`)}}H();async function U(e,t){try{await b.AddUserRole({ID:e,role:t}),await H()}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить роль`)}}async function W(e,t){try{await b.DeleteUserRole({ID:e,role:t}),await H()}catch(e){N.error(e instanceof Error?e.message:`Не удалось изменить роль`)}}return(c,d)=>(r(),f(l,null,[p(`div`,O,[p(`div`,k,[(r(!0),f(l,null,n(P.value,c=>(r(),f(`div`,{key:c.ID,class:`user-block`},[p(`div`,A,`Позывной: `+a(c.username),1),p(`div`,j,`Почта: `+a(c.email),1),p(`div`,M,[i(s(S),null,{default:u(()=>[d[3]||=t(` Роли: `,-1),(r(!0),f(l,null,n(c.roles,e=>(r(),o(s(g),{bordered:!1,key:e},{default:u(()=>[t(a(e),1)]),_:2},1024))),128))]),_:2},1024)]),i(s(C),{justify:`end`,class:`roles-buttons-block`},{default:u(()=>[s(F).hasRole(`admin`)&&s(F).user&&c.ID!==s(F).user.ID?(r(),o(s(y),{key:0,onClick:e=>I.value=c},{default:u(()=>[...d[4]||=[t(`Изменить пароль`,-1)]]),_:1},8,[`onClick`])):e(``,!0),c.roles?.includes(`developer`)?(r(),o(s(y),{key:2,onClick:e=>W(c.ID,`developer`)},{default:u(()=>[...d[6]||=[t(`Забрать роль разработчика`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:1,onClick:e=>U(c.ID,`developer`)},{default:u(()=>[...d[5]||=[t(`Выдать роль разработчика`,-1)]]),_:1},8,[`onClick`])),c.roles?.includes(`author`)?(r(),o(s(y),{key:4,onClick:e=>W(c.ID,`author`)},{default:u(()=>[...d[8]||=[t(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:3,onClick:e=>U(c.ID,`author`)},{default:u(()=>[...d[7]||=[t(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),c.roles?.includes(`organizer`)?(r(),o(s(y),{key:6,onClick:e=>W(c.ID,`organizer`)},{default:u(()=>[...d[10]||=[t(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(r(),o(s(y),{key:5,onClick:e=>U(c.ID,`organizer`)},{default:u(()=>[...d[9]||=[t(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),i(s(_),{show:I.value!==null,style:{width:`min(94vw, 480px)`},closable:!z.value,"mask-closable":!z.value,"close-on-esc":!z.value,"onUpdate:show":d[2]||=e=>{e||B()}},{default:u(()=>[i(s(m),{title:`Изменить пароль`,bordered:!1,role:`dialog`,"aria-modal":`true`,closable:!z.value,onClose:B},{default:u(()=>[p(`p`,null,a(I.value?.username)+` — `+a(I.value?.email),1),p(`form`,{onSubmit:E(V,[`prevent`])},[i(s(v),{label:`Новый пароль`,"label-for":`new-user-password`},{default:u(()=>[i(s(x),{value:L.value,"onUpdate:value":d[0]||=e=>L.value=e,"input-props":{id:`new-user-password`,autocomplete:`new-password`},type:`password`,"show-password-on":`click`,disabled:z.value,placeholder:`От 8 символов, не более 16 символов`},null,8,[`value`,`disabled`])]),_:1}),i(s(v),{label:`Повторите пароль`,"label-for":`confirm-user-password`},{default:u(()=>[i(s(x),{value:R.value,"onUpdate:value":d[1]||=e=>R.value=e,"input-props":{id:`confirm-user-password`,autocomplete:`new-password`},type:`password`,"show-password-on":`click`,disabled:z.value,placeholder:`Повторите новый пароль`},null,8,[`value`,`disabled`])]),_:1}),i(s(C),{justify:`end`},{default:u(()=>[i(s(y),{disabled:z.value,onClick:B},{default:u(()=>[...d[11]||=[t(`Отмена`,-1)]]),_:1},8,[`disabled`]),i(s(y),{"attr-type":`submit`,type:`primary`,loading:z.value},{default:u(()=>[...d[12]||=[t(`Сохранить`,-1)]]),_:1},8,[`loading`])]),_:1})],32)]),_:1},8,[`closable`])]),_:1},8,[`show`,`closable`,`mask-closable`,`close-on-esc`]),i(D,{active:`users`})],64))}}),[[`__scopeId`,`data-v-da30be55`]]),P=d({__name:`UsersView`,setup(e){return(e,t)=>(r(),o(N))}});export{P as default}; \ No newline at end of file diff --git a/frontend/dist/assets/_plugin-vue_export-helper-CtHwEvHL.js b/frontend/dist/assets/_plugin-vue_export-helper-CaiaXQaI.js similarity index 61% rename from frontend/dist/assets/_plugin-vue_export-helper-CtHwEvHL.js rename to frontend/dist/assets/_plugin-vue_export-helper-CaiaXQaI.js index 36f7631..f424cd5 100644 --- a/frontend/dist/assets/_plugin-vue_export-helper-CtHwEvHL.js +++ b/frontend/dist/assets/_plugin-vue_export-helper-CaiaXQaI.js @@ -1 +1 @@ -import{Ft as e,ht as t,mt as n}from"./client-Bz0sY7Lm.js";function r(e){return e.replace(/#|\(|\)|,|\s|\./g,`_`)}function i(e,...t){if(Array.isArray(e))e.forEach(e=>i(e,...t));else return e(...t)}function a(r){return r.some(r=>e(r)?!(r.type===n||r.type===t&&!a(r.children)):!0)?r:null}function o(e,t){return e&&a(e())||t()}function s(e,t,n){return e&&a(e(t))||n(t)}function c(e,t){return t(e&&a(e())||null)}function l(e){return!(e&&a(e()))}var u=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{s as a,r as c,o as i,a as n,c as o,l as r,i as s,u as t}; \ No newline at end of file +import{Ft as e,ht as t,mt as n}from"./client-Bz0sY7Lm.js";function r(e){return e.replace(/#|\(|\)|,|\s|\./g,`_`)}function i(e,...t){if(Array.isArray(e))e.forEach(e=>i(e,...t));else return e(...t)}function a(r){return r.some(r=>e(r)?!(r.type===n||r.type===t&&!a(r.children)):!0)?r:null}function o(e,t){return e&&a(e())||t()}function s(e,t,n){return e&&a(e(t))||n(t)}function c(e,t){return t(e&&a(e())||null)}function l(e,t,n){return n(e&&a(e(t))||null)}function u(e){return!(e&&a(e()))}var d=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{s as a,i as c,o as i,r as l,a as n,c as o,u as r,l as s,d as t}; \ No newline at end of file diff --git a/frontend/dist/assets/binary_client-DXOBYp6r.js b/frontend/dist/assets/binary_client-BOO__dKx.js similarity index 97% rename from frontend/dist/assets/binary_client-DXOBYp6r.js rename to frontend/dist/assets/binary_client-BOO__dKx.js index 6a6beff..f4cc20b 100644 --- a/frontend/dist/assets/binary_client-DXOBYp6r.js +++ b/frontend/dist/assets/binary_client-BOO__dKx.js @@ -1 +1 @@ -import{r as e}from"./client-Bz0sY7Lm.js";import{a as t,o as n}from"./index-6B3OmSLg.js";function r(){let e=n();return i(e.refreshTokenAction,e.getToken)}function i(n,r){async function i(i,a){return t(async()=>{let t=new Headers(a.headers),n=r();n&&t.set(`Authorization`,`Bearer ${n}`);let o=await fetch(`${e()}/${i}`,{...a,headers:t});if(o.status===401)throw Error(`unauthorized`);return o},n,r)}async function s(e,t){let n=await i(e,{method:`GET`});if(!n.ok)throw Error(await o(n));return{blob:await n.blob(),filename:a(n.headers.get(`Content-Disposition`))||t}}function c(e){return s(`api/scenarios/${e}/archive`,`scenario-${e}.zip`)}function l(e){return s(`api/games/${e}/teams/qr.pdf`,`game-${e}.pdf`)}function u(e){return s(`api/games/${e}/export/download`,`game-${e}.zip`)}function d(e){return s(`api/games/${e}/results-package/download`,`game-results-${e}.zip`)}async function f(e,t){let n=await i(`api/games/${e}/results-package/apply`,{method:`POST`,headers:{"Content-Type":`application/zip`},body:t});if(!n.ok)throw Error(await o(n));let r=await n.json();if(!r||typeof r!=`object`||!(`gameID`in r)||r.gameID!==e||!(`packageID`in r)||typeof r.packageID!=`string`||!(`appliedAt`in r)||typeof r.appliedAt!=`string`)throw Error(`Некорректный ответ применения результатов`);return{gameID:r.gameID,packageID:r.packageID,appliedAt:r.appliedAt}}async function p(e){let t=await i(`api/games/import`,{method:`POST`,headers:{"Content-Type":`application/zip`},body:e});if(!t.ok)throw Error(await o(t));let n=await t.json();if(!n||typeof n!=`object`||!(`gameID`in n)||typeof n.gameID!=`number`||!Number.isSafeInteger(n.gameID)||n.gameID<=0||!(`packageID`in n)||typeof n.packageID!=`string`||!(`repeated`in n)||typeof n.repeated!=`boolean`)throw Error(`Некорректный ответ импорта игры`);return{gameID:n.gameID,packageID:n.packageID,repeated:n.repeated}}async function m(e){let t=await i(`api/scenarios/archive`,{method:`POST`,headers:{"Content-Type":e.type||`application/zip`},body:e});if(!t.ok)throw Error(await o(t));let n=await t.json().catch(()=>null);return{ID:typeof n?.ID==`number`?n.ID:null}}return{downloadScenarioArchive:c,downloadTeamQR:l,uploadScenarioArchive:m,downloadGamePackage:u,uploadGamePackage:p,downloadGameResultsPackage:d,applyGameResultsPackage:f}}function a(e){if(!e)return``;let t=e.match(/filename\*=UTF-8''([^;]+)/i);if(t)try{return decodeURIComponent(t[1].trim()).replace(/[\\/:*?"<>|]/g,`_`)}catch{}let n=e.match(/filename="?([^";]+)"?/i);return(n?n[1]:``).replace(/[\\/:*?"<>|]/g,`_`)}async function o(e){let t=await e.json().catch(()=>null);if(t&&typeof t==`object`){if(`message`in t&&typeof t.message==`string`&&t.message!==``)return t.message;if(`error`in t&&typeof t.error==`string`&&t.error!==``)return t.error}return`Ошибка сервера (${e.status})`}export{r as t}; \ No newline at end of file +import{r as e}from"./client-Bz0sY7Lm.js";import{a as t,o as n}from"./index-NE0dsiiJ.js";function r(){let e=n();return i(e.refreshTokenAction,e.getToken)}function i(n,r){async function i(i,a){return t(async()=>{let t=new Headers(a.headers),n=r();n&&t.set(`Authorization`,`Bearer ${n}`);let o=await fetch(`${e()}/${i}`,{...a,headers:t});if(o.status===401)throw Error(`unauthorized`);return o},n,r)}async function s(e,t){let n=await i(e,{method:`GET`});if(!n.ok)throw Error(await o(n));return{blob:await n.blob(),filename:a(n.headers.get(`Content-Disposition`))||t}}function c(e){return s(`api/scenarios/${e}/archive`,`scenario-${e}.zip`)}function l(e){return s(`api/games/${e}/teams/qr.pdf`,`game-${e}.pdf`)}function u(e){return s(`api/games/${e}/export/download`,`game-${e}.zip`)}function d(e){return s(`api/games/${e}/results-package/download`,`game-results-${e}.zip`)}async function f(e,t){let n=await i(`api/games/${e}/results-package/apply`,{method:`POST`,headers:{"Content-Type":`application/zip`},body:t});if(!n.ok)throw Error(await o(n));let r=await n.json();if(!r||typeof r!=`object`||!(`gameID`in r)||r.gameID!==e||!(`packageID`in r)||typeof r.packageID!=`string`||!(`appliedAt`in r)||typeof r.appliedAt!=`string`)throw Error(`Некорректный ответ применения результатов`);return{gameID:r.gameID,packageID:r.packageID,appliedAt:r.appliedAt}}async function p(e){let t=await i(`api/games/import`,{method:`POST`,headers:{"Content-Type":`application/zip`},body:e});if(!t.ok)throw Error(await o(t));let n=await t.json();if(!n||typeof n!=`object`||!(`gameID`in n)||typeof n.gameID!=`number`||!Number.isSafeInteger(n.gameID)||n.gameID<=0||!(`packageID`in n)||typeof n.packageID!=`string`||!(`repeated`in n)||typeof n.repeated!=`boolean`)throw Error(`Некорректный ответ импорта игры`);return{gameID:n.gameID,packageID:n.packageID,repeated:n.repeated}}async function m(e){let t=await i(`api/scenarios/archive`,{method:`POST`,headers:{"Content-Type":e.type||`application/zip`},body:e});if(!t.ok)throw Error(await o(t));let n=await t.json().catch(()=>null);return{ID:typeof n?.ID==`number`?n.ID:null}}return{downloadScenarioArchive:c,downloadTeamQR:l,uploadScenarioArchive:m,downloadGamePackage:u,uploadGamePackage:p,downloadGameResultsPackage:d,applyGameResultsPackage:f}}function a(e){if(!e)return``;let t=e.match(/filename\*=UTF-8''([^;]+)/i);if(t)try{return decodeURIComponent(t[1].trim()).replace(/[\\/:*?"<>|]/g,`_`)}catch{}let n=e.match(/filename="?([^";]+)"?/i);return(n?n[1]:``).replace(/[\\/:*?"<>|]/g,`_`)}async function o(e){let t=await e.json().catch(()=>null);if(t&&typeof t==`object`){if(`message`in t&&typeof t.message==`string`&&t.message!==``)return t.message;if(`error`in t&&typeof t.error==`string`&&t.error!==``)return t.error}return`Ошибка сервера (${e.status})`}export{r as t}; \ No newline at end of file diff --git a/frontend/dist/assets/es-BhJOHfSF.js b/frontend/dist/assets/es-Qklex053.js similarity index 95% rename from frontend/dist/assets/es-BhJOHfSF.js rename to frontend/dist/assets/es-Qklex053.js index ace835f..51d2eb2 100644 --- a/frontend/dist/assets/es-BhJOHfSF.js +++ b/frontend/dist/assets/es-Qklex053.js @@ -1,4 +1,4 @@ -import{Bt as e,H as t,K as n,Mt as r,Pt as i,U as a,X as o,Y as s,Yt as c,at as l,bt as u,d,dt as f,g as p,hn as m,it as h,kt as g,nt as _,ot as v,p as y,qt as b,st as x,tt as S,vn as C}from"./client-Bz0sY7Lm.js";import{c as w,o as T,s as E}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{M as D,_ as O,z as k}from"./index-6B3OmSLg.js";function A(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function j(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function M(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function ee(e,t){let[n,r]=e.split(` `);return t?t===`row`?n:r:{row:n,col:r||n}}function N(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:s,warningColor:c,errorColor:l,baseColor:u,borderColor:d,opacityDisabled:f,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:w,heightMedium:T,closeColorHover:E,closeColorPressed:O,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},D),{closeBorderRadius:_,heightTiny:S,heightSmall:C,heightMedium:w,heightLarge:T,borderRadius:_,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:p,colorBordered:`rgb(250, 250, 252)`,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,closeColorHover:E,closeColorPressed:O,borderPrimary:`1px solid ${o(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:o(i,{alpha:.12}),colorBorderedPrimary:o(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:o(i,{alpha:.12}),closeColorPressedPrimary:o(i,{alpha:.18}),borderInfo:`1px solid ${o(a,{alpha:.3})}`,textColorInfo:a,colorInfo:o(a,{alpha:.12}),colorBorderedInfo:o(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:o(a,{alpha:.12}),closeColorPressedInfo:o(a,{alpha:.18}),borderSuccess:`1px solid ${o(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:o(s,{alpha:.12}),colorBorderedSuccess:o(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:o(s,{alpha:.12}),closeColorPressedSuccess:o(s,{alpha:.18}),borderWarning:`1px solid ${o(c,{alpha:.35})}`,textColorWarning:c,colorWarning:o(c,{alpha:.15}),colorBorderedWarning:o(c,{alpha:.12}),closeIconColorWarning:c,closeIconColorHoverWarning:c,closeIconColorPressedWarning:c,closeColorHoverWarning:o(c,{alpha:.12}),closeColorPressedWarning:o(c,{alpha:.18}),borderError:`1px solid ${o(l,{alpha:.23})}`,textColorError:l,colorError:o(l,{alpha:.1}),colorBorderedError:o(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:o(l,{alpha:.12}),closeColorPressedError:o(l,{alpha:.18})})}var P={name:`Tag`,common:d,self:N},F={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},I=_(`tag`,` +import{Bt as e,H as t,K as n,Mt as r,Pt as i,U as a,X as o,Y as s,Yt as c,at as l,bt as u,d,dt as f,g as p,hn as m,it as h,kt as g,nt as _,ot as v,p as y,qt as b,st as x,tt as S,vn as C}from"./client-Bz0sY7Lm.js";import{c as w,l as T,o as E}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{B as D,N as O,_ as k}from"./index-NE0dsiiJ.js";function A(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function j(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function M(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function ee(e,t){let[n,r]=e.split(` `);return t?t===`row`?n:r:{row:n,col:r||n}}function N(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:s,warningColor:c,errorColor:l,baseColor:u,borderColor:d,opacityDisabled:f,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:w,heightMedium:T,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},O),{closeBorderRadius:_,heightTiny:S,heightSmall:C,heightMedium:w,heightLarge:T,borderRadius:_,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:p,colorBordered:`rgb(250, 250, 252)`,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${o(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:o(i,{alpha:.12}),colorBorderedPrimary:o(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:o(i,{alpha:.12}),closeColorPressedPrimary:o(i,{alpha:.18}),borderInfo:`1px solid ${o(a,{alpha:.3})}`,textColorInfo:a,colorInfo:o(a,{alpha:.12}),colorBorderedInfo:o(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:o(a,{alpha:.12}),closeColorPressedInfo:o(a,{alpha:.18}),borderSuccess:`1px solid ${o(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:o(s,{alpha:.12}),colorBorderedSuccess:o(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:o(s,{alpha:.12}),closeColorPressedSuccess:o(s,{alpha:.18}),borderWarning:`1px solid ${o(c,{alpha:.35})}`,textColorWarning:c,colorWarning:o(c,{alpha:.15}),colorBorderedWarning:o(c,{alpha:.12}),closeIconColorWarning:c,closeIconColorHoverWarning:c,closeIconColorPressedWarning:c,closeColorHoverWarning:o(c,{alpha:.12}),closeColorPressedWarning:o(c,{alpha:.18}),borderError:`1px solid ${o(l,{alpha:.23})}`,textColorError:l,colorError:o(l,{alpha:.1}),colorBorderedError:o(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:o(l,{alpha:.12}),closeColorPressedError:o(l,{alpha:.18})})}var P={name:`Tag`,common:d,self:N},F={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},I=_(`tag`,` --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left); white-space: nowrap; position: relative; @@ -68,7 +68,7 @@ import{Bt as e,H as t,K as n,Mt as r,Pt as i,U as a,X as o,Y as s,Yt as c,at as `,[v(`disabled`,[S(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[v(`checked`,`color: var(--n-text-color-hover-checkable);`)]),S(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[v(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),l(`checked`,` color: var(--n-text-color-checked); background-color: var(--n-color-checked); - `,[v(`disabled`,[S(`&:hover`,`background-color: var(--n-color-checked-hover);`),S(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),L=Object.assign(Object.assign(Object.assign({},y.props),F),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),R=s(`n-tag`),z=g({name:`Tag`,props:L,slots:Object,setup(e){let n=m(null),{mergedBorderedRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedRtlRef:s,mergedComponentPropsRef:c}=a(e),l=u(()=>e.size||c?.value?.Tag?.size||`medium`),d=y(`Tag`,`-tag`,I,P,e,i);b(R,{roundRef:C(e,`round`)});function f(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function h(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&E(n,t)}}let g={setTextContent(e){let{value:t}=n;t&&(t.textContent=e)}},_=p(`Tag`,s,i),v=u(()=>{let{type:t,color:{color:n,textColor:i}={}}=e,a=l.value,{common:{cubicBezierEaseInOut:o},self:{padding:s,closeMargin:c,borderRadius:u,opacityDisabled:f,textColorCheckable:p,textColorHoverCheckable:m,textColorPressedCheckable:h,textColorChecked:g,colorCheckable:_,colorHoverCheckable:v,colorPressedCheckable:y,colorChecked:b,colorCheckedHover:S,colorCheckedPressed:C,closeBorderRadius:w,fontWeightStrong:T,[x(`colorBordered`,t)]:E,[x(`closeSize`,a)]:D,[x(`closeIconSize`,a)]:O,[x(`fontSize`,a)]:k,[x(`height`,a)]:A,[x(`color`,t)]:j,[x(`textColor`,t)]:ee,[x(`border`,t)]:N,[x(`closeIconColor`,t)]:P,[x(`closeIconColorHover`,t)]:F,[x(`closeIconColorPressed`,t)]:I,[x(`closeColorHover`,t)]:L,[x(`closeColorPressed`,t)]:R}}=d.value,z=M(c);return{"--n-font-weight-strong":T,"--n-avatar-size-override":`calc(${A} - 8px)`,"--n-bezier":o,"--n-border-radius":u,"--n-border":N,"--n-close-icon-size":O,"--n-close-color-pressed":R,"--n-close-color-hover":L,"--n-close-border-radius":w,"--n-close-icon-color":P,"--n-close-icon-color-hover":F,"--n-close-icon-color-pressed":I,"--n-close-icon-color-disabled":P,"--n-close-margin-top":z.top,"--n-close-margin-right":z.right,"--n-close-margin-bottom":z.bottom,"--n-close-margin-left":z.left,"--n-close-size":D,"--n-color":n||(r.value?E:j),"--n-color-checkable":_,"--n-color-checked":b,"--n-color-checked-hover":S,"--n-color-checked-pressed":C,"--n-color-hover-checkable":v,"--n-color-pressed-checkable":y,"--n-font-size":k,"--n-height":A,"--n-opacity-disabled":f,"--n-padding":s,"--n-text-color":i||ee,"--n-text-color-checkable":p,"--n-text-color-checked":g,"--n-text-color-hover-checkable":m,"--n-text-color-pressed-checkable":h}}),S=o?t(`tag`,u(()=>{let t=``,{type:n,color:{color:i,textColor:a}={}}=e;return t+=n[0],t+=l.value[0],i&&(t+=`a${w(i)}`),a&&(t+=`b${w(a)}`),r.value&&(t+=`c`),t}),v,e):void 0;return Object.assign(Object.assign({},g),{rtlEnabled:_,mergedClsPrefix:i,contentRef:n,mergedBordered:r,handleClick:f,handleCloseClick:h,cssVars:o?void 0:v,themeClass:S?.themeClass,onRender:S?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:n,closable:i,color:{borderColor:a}={},round:o,onRender:s,$slots:c}=this;s?.();let l=T(c.avatar,e=>e&&r(`div`,{class:`${t}-tag__avatar`},e)),u=T(c.icon,e=>e&&r(`div`,{class:`${t}-tag__icon`},e));return r(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:o,[`${t}-tag--avatar`]:l,[`${t}-tag--icon`]:u,[`${t}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||l,r(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?r(k,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?r(`div`,{class:`${t}-tag__border`,style:{borderColor:a}}):null)}});function te(){let e=i(O,null);return e===null&&n(`use-message`,"No outer founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}function ne(e){let t=0;for(let n=0;n{let r=ne(t);if(!r){e.forEach(e=>{n.push((e&&e+` `)+t)});return}else if(r===1){e.forEach(e=>{n.push(t.replace(`&`,e))});return}let i=[t];for(;r--;){let t=[];i.forEach(n=>{e.forEach(e=>{t.push(n.replace(`&`,e))})}),i=t}i.forEach(e=>n.push(e))}),n}function ae(e,t){let n=[];return t.split(B).forEach(t=>{e.forEach(e=>{n.push((e&&e+` `)+t)})}),n}function oe(e){let t=[``];return e.forEach(e=>{e&&=e.trim(),e&&(t=e.includes(`&`)?ie(t,e):ae(t,e))}),t.join(`, `).replace(re,` `)}var se=/[A-Z]/g;function V(e){return e.replace(se,e=>`-`+e.toLowerCase())}function ce(e,t=` `){return typeof e==`object`&&e?` { + `,[v(`disabled`,[S(`&:hover`,`background-color: var(--n-color-checked-hover);`),S(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),L=Object.assign(Object.assign(Object.assign({},y.props),F),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),R=s(`n-tag`),z=g({name:`Tag`,props:L,slots:Object,setup(e){let n=m(null),{mergedBorderedRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedRtlRef:s,mergedComponentPropsRef:c}=a(e),l=u(()=>e.size||c?.value?.Tag?.size||`medium`),d=y(`Tag`,`-tag`,I,P,e,i);b(R,{roundRef:C(e,`round`)});function f(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function h(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&w(n,t)}}let g={setTextContent(e){let{value:t}=n;t&&(t.textContent=e)}},_=p(`Tag`,s,i),v=u(()=>{let{type:t,color:{color:n,textColor:i}={}}=e,a=l.value,{common:{cubicBezierEaseInOut:o},self:{padding:s,closeMargin:c,borderRadius:u,opacityDisabled:f,textColorCheckable:p,textColorHoverCheckable:m,textColorPressedCheckable:h,textColorChecked:g,colorCheckable:_,colorHoverCheckable:v,colorPressedCheckable:y,colorChecked:b,colorCheckedHover:S,colorCheckedPressed:C,closeBorderRadius:w,fontWeightStrong:T,[x(`colorBordered`,t)]:E,[x(`closeSize`,a)]:D,[x(`closeIconSize`,a)]:O,[x(`fontSize`,a)]:k,[x(`height`,a)]:A,[x(`color`,t)]:j,[x(`textColor`,t)]:ee,[x(`border`,t)]:N,[x(`closeIconColor`,t)]:P,[x(`closeIconColorHover`,t)]:F,[x(`closeIconColorPressed`,t)]:I,[x(`closeColorHover`,t)]:L,[x(`closeColorPressed`,t)]:R}}=d.value,z=M(c);return{"--n-font-weight-strong":T,"--n-avatar-size-override":`calc(${A} - 8px)`,"--n-bezier":o,"--n-border-radius":u,"--n-border":N,"--n-close-icon-size":O,"--n-close-color-pressed":R,"--n-close-color-hover":L,"--n-close-border-radius":w,"--n-close-icon-color":P,"--n-close-icon-color-hover":F,"--n-close-icon-color-pressed":I,"--n-close-icon-color-disabled":P,"--n-close-margin-top":z.top,"--n-close-margin-right":z.right,"--n-close-margin-bottom":z.bottom,"--n-close-margin-left":z.left,"--n-close-size":D,"--n-color":n||(r.value?E:j),"--n-color-checkable":_,"--n-color-checked":b,"--n-color-checked-hover":S,"--n-color-checked-pressed":C,"--n-color-hover-checkable":v,"--n-color-pressed-checkable":y,"--n-font-size":k,"--n-height":A,"--n-opacity-disabled":f,"--n-padding":s,"--n-text-color":i||ee,"--n-text-color-checkable":p,"--n-text-color-checked":g,"--n-text-color-hover-checkable":m,"--n-text-color-pressed-checkable":h}}),S=o?t(`tag`,u(()=>{let t=``,{type:n,color:{color:i,textColor:a}={}}=e;return t+=n[0],t+=l.value[0],i&&(t+=`a${T(i)}`),a&&(t+=`b${T(a)}`),r.value&&(t+=`c`),t}),v,e):void 0;return Object.assign(Object.assign({},g),{rtlEnabled:_,mergedClsPrefix:i,contentRef:n,mergedBordered:r,handleClick:f,handleCloseClick:h,cssVars:o?void 0:v,themeClass:S?.themeClass,onRender:S?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:n,closable:i,color:{borderColor:a}={},round:o,onRender:s,$slots:c}=this;s?.();let l=E(c.avatar,e=>e&&r(`div`,{class:`${t}-tag__avatar`},e)),u=E(c.icon,e=>e&&r(`div`,{class:`${t}-tag__icon`},e));return r(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:o,[`${t}-tag--avatar`]:l,[`${t}-tag--icon`]:u,[`${t}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||l,r(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?r(D,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?r(`div`,{class:`${t}-tag__border`,style:{borderColor:a}}):null)}});function te(){let e=i(k,null);return e===null&&n(`use-message`,"No outer founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}function ne(e){let t=0;for(let n=0;n{let r=ne(t);if(!r){e.forEach(e=>{n.push((e&&e+` `)+t)});return}else if(r===1){e.forEach(e=>{n.push(t.replace(`&`,e))});return}let i=[t];for(;r--;){let t=[];i.forEach(n=>{e.forEach(e=>{t.push(n.replace(`&`,e))})}),i=t}i.forEach(e=>n.push(e))}),n}function ae(e,t){let n=[];return t.split(B).forEach(t=>{e.forEach(e=>{n.push((e&&e+` `)+t)})}),n}function oe(e){let t=[``];return e.forEach(e=>{e&&=e.trim(),e&&(t=e.includes(`&`)?ie(t,e):ae(t,e))}),t.join(`, `).replace(re,` `)}var se=/[A-Z]/g;function V(e){return e.replace(se,e=>`-`+e.toLowerCase())}function ce(e,t=` `){return typeof e==`object`&&e?` { `+Object.entries(e).map(e=>t+` ${V(e[0])}: ${e[1]};`).join(` `)+` `+t+`}`:`: ${e};`}function le(e,t,n){return typeof e==`function`?e({context:t.context,props:n}):e}function H(e,t,n,r){if(!t)return``;let i=le(t,n,r);if(!i)return``;if(typeof i==`string`)return`${e} {\n${i}\n}`;let a=Object.keys(i);if(a.length===0)return n.config.keepEmptyBlock?e+` { diff --git a/frontend/dist/assets/get-peGRPzxS.js b/frontend/dist/assets/get-BXAmpWeC.js similarity index 92% rename from frontend/dist/assets/get-peGRPzxS.js rename to frontend/dist/assets/get-BXAmpWeC.js index 470632e..0f5ab09 100644 --- a/frontend/dist/assets/get-peGRPzxS.js +++ b/frontend/dist/assets/get-BXAmpWeC.js @@ -1 +1 @@ -import{L as e,x as t}from"./client-Bz0sY7Lm.js";import{J as n,X as r}from"./index-6B3OmSLg.js";var i=/^(\d|\.)+$/,a=/(\d|\.)+/;function o(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e==`number`){let r=(e+n)*t;return r===0?`0`:`${r}px`}else if(typeof e==`string`)if(i.test(e)){let i=(Number(e)+n)*t;return r?i===0?`0`:`${i}px`:`${i}`}else{let r=a.exec(e);return r?e.replace(a,String((Number(r[0])+n)*t)):e}return e}var s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;function l(t,n){if(e(t))return!1;var i=typeof t;return i==`number`||i==`symbol`||i==`boolean`||t==null||r(t)?!0:c.test(t)||!s.test(t)||n!=null&&t in Object(n)}var u=`Expected a function`;function d(e,n){if(typeof e!=`function`||n!=null&&typeof n!=`function`)throw TypeError(u);var r=function(){var t=arguments,i=n?n.apply(this,t):t[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,t);return r.cache=a.set(i,o)||a,o};return r.cache=new(d.Cache||t),r}d.Cache=t;var f=500;function p(e){var t=d(e,function(e){return n.size===f&&n.clear(),e}),n=t.cache;return t}var m=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=p(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(m,function(e,n,r,i){t.push(r?i.replace(h,`$1`):n||e)}),t});function _(t,r){return e(t)?t:l(t,r)?[t]:g(n(t))}var v=1/0;function y(e){if(typeof e==`string`||r(e))return e;var t=e+``;return t==`0`&&1/e==-v?`-0`:t}function b(e,t){t=_(t,e);for(var n=0,r=t.length;e!=null&&ni.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ParticipationView-TaV4rzMo.js","assets/client-Bz0sY7Lm.js","assets/Card-BGJkYb2B.js","assets/es-Qklex053.js","assets/_plugin-vue_export-helper-CaiaXQaI.js","assets/fade-in.cssr-0rRavIDG.js","assets/light-BweHUoJf.js","assets/Button-MBUKfT_Z.js","assets/use-form-item-Bl3X3aXB.js","assets/Space-CstX9TL6.js","assets/flatten-WgHPAFED.js","assets/get-slot-6kXJmSMP.js","assets/HeaderMenu-vnmT21Il.js","assets/HeaderMenu-DC2pqpCt.css","assets/datetime-BJNH0M1T.js","assets/TicketView-BrswqpT2.js","assets/QrCode-MTPi5t58.js","assets/MessagePaper-C6R1Irzd.js","assets/MessagePaper-LComeSyV.css","assets/TicketView-CnMhzuVy.css","assets/HomeView-De2Wt4BH.js","assets/HomeView-DGARWv81.css","assets/LoginView-Bp9RClQt.js","assets/Follower-BaR8jvSz.js","assets/Suffix-BBRLYxYK.js","assets/utils-Dcx6g1AV.js","assets/use-merged-state-z45UzW9G.js","assets/Tabs-BaVejAu8.js","assets/use-compitable-BIRdD7BE.js","assets/Add-BlaQeLtQ.js","assets/Input-CEIE7mTC.js","assets/LoginView-DKQmdgOL.css","assets/OfficeView-CAsOcT4l.js","assets/Modal-xM6cEDIr.js","assets/keep-UirG4WK3.js","assets/Alert-BoUmQeXf.js","assets/OfficeView-DabVS74N.css","assets/UserAgreementView-a6MCHwYf.js","assets/DocsPage-Bhdw6IT7.js","assets/Spin-CYkXlOyb.js","assets/HeaderText-DnXJEr19.js","assets/HeaderText-DghUu1Eo.css","assets/DocsPage-DGRLd6MK.css","assets/PrivacyPolicyView-3H_W5BBn.js","assets/ConsentView-DvisXAHz.js","assets/GamesView-CyqroMvG.js","assets/DatePicker-DGNqeOvv.js","assets/Select-CfXdJUVK.js","assets/Popover-CjBLQZ90.js","assets/get-BXAmpWeC.js","assets/Upload-DxQHkPqo.js","assets/Flex-Dsa9FxiA.js","assets/binary_client-BOO__dKx.js","assets/GamesView-DRcdkoqc.css","assets/ScreenView-kil-uMc-.js","assets/application-Bg005825.js","assets/useDeviceContext-mGSTXKkG.js","assets/ScreenView-D7gpOUbo.css","assets/GameResultsView-VzcTF_I1.js","assets/GameResultsView-CFRKPJXC.css","assets/GameView-7R4L26Pq.js","assets/Switch-DEzgODFH.js","assets/Rate-D7hhdTpC.js","assets/text-LOpQkUng.js","assets/GameView-DygrgAkI.css","assets/TeamStoryView-DxafuPZ8.js","assets/PlaceBlock-BQyPRoGX.js","assets/PlaceBlock-DJ2ZROXg.css","assets/TeamStoryView-4FHl63_l.css","assets/ScenariosView-kVl-aUow.js","assets/ScenariosView-CPnxFjF8.css","assets/CatalogView-Dbbfdp8S.js","assets/CatalogView-ZB3NVwd8.css","assets/ScenariosEditorView-QOE_o8N2.js","assets/ScenariosEditorView-BwbT183t.css","assets/ScenarioView-VnFgrJ5p.js","assets/ScenarioView-stexBLSZ.css","assets/TasksView-DoWYZ1G8.js","assets/FormItem-k4AtNXqm.js","assets/TasksView-BN0skjQJ.css","assets/UsersView-BDzjXO6r.js","assets/UsersView-BRqNFbMB.css","assets/ReviewsView-1YanUVKc.js","assets/ReviewsView-cXuEHQyX.css"])))=>i.map(i=>d[i]); import{$ as e,$t as t,An as n,At as r,B as i,Cn as a,Dn as o,Dt as s,En as c,Fn as l,Gt as u,H as d,Kt as f,L as p,Mn as m,Mt as h,Nn as g,Nt as _,On as v,Ot as y,Pn as b,Pt as x,Q as S,Qt as C,R as w,Rt as T,Sn as E,St as D,Tn as O,Tt as k,U as ee,Ut as te,W as ne,Wt as re,X as A,Y as ie,Z as j,_ as ae,_n as oe,at as M,bn as se,bt as N,c as ce,d as P,dn as le,dt as ue,f as F,fn as de,ft as fe,g as pe,gn as me,gt as he,h as ge,hn as I,ht as _e,i as ve,in as ye,it as be,jn as xe,jt as Se,kn as Ce,kt as L,ln as we,m as Te,mn as Ee,n as De,nn as Oe,nt as ke,o as Ae,on as je,ot as Me,p as Ne,pn as Pe,pt as Fe,q as Ie,qt as Le,s as Re,sn as ze,st as R,t as Be,tn as Ve,tt as z,un as He,vn as Ue,vt as We,wn as Ge,xn as Ke,yn as qe,z as Je,zn as Ye}from"./client-Bz0sY7Lm.js";import{i as Xe,n as Ze,r as B,t as Qe}from"./light-BweHUoJf.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var $e=void 0,et=typeof window<`u`&&window.trustedTypes;if(et)try{$e=et.createPolicy(`vue`,{createHTML:e=>e})}catch{}var tt=$e?e=>$e.createHTML(e):e=>e,nt=`http://www.w3.org/2000/svg`,rt=`http://www.w3.org/1998/Math/MathML`,V=typeof document<`u`?document:null,it=V&&V.createElement(`template`),at={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?V.createElementNS(nt,e):t===`mathml`?V.createElementNS(rt,e):n?V.createElement(e,{is:n}):V.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>V.createTextNode(e),createComment:e=>V.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>V.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{it.innerHTML=tt(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=it.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},H=`transition`,ot=`animation`,st=Symbol(`_vtc`),ct={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},lt=a({},Fe,ct),ut=(e=>(e.displayName=`Transition`,e.props=lt,e))((e,{slots:t})=>h(fe,pt(e),t)),dt=(e,t=[])=>{o(e)?e.forEach(e=>e(...t)):e&&e(...t)},ft=e=>e?o(e)?e.some(e=>e.length>1):e.length>1:!1;function pt(e){let t={};for(let n in e)n in ct||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=s,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=mt(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,W(e,t?d:c),W(e,t?u:s),n&&n()},D=(e,t)=>{e._isLeaving=!1,W(e,f),W(e,m),W(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,a=()=>E(t,e,n);dt(i,[t,a]),gt(()=>{W(t,e?l:o),U(t,e?d:c),ft(i)||vt(t,r,g,a)})};return a(t,{onBeforeEnter(e){dt(v,[e]),U(e,o),U(e,s)},onBeforeAppear(e){dt(C,[e]),U(e,l),U(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);U(e,f),e._enterCancelled?(U(e,p),St(e)):(St(e),U(e,p)),gt(()=>{e._isLeaving&&(W(e,f),U(e,m),ft(x)||vt(e,r,_,n))}),dt(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),dt(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),dt(T,[e])},onLeaveCancelled(e){D(e),dt(S,[e])}})}function mt(e){if(e==null)return null;if(n(e))return[ht(e.enter),ht(e.leave)];{let t=ht(e);return[t,t]}}function ht(e){return Ye(e)}function U(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[st]||(e[st]=new Set)).add(t)}function W(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[st];n&&(n.delete(t),n.size||(e[st]=void 0))}function gt(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var _t=0;function vt(e,t,n,r){let i=e._endId=++_t,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=yt(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${H}Delay`),a=r(`${H}Duration`),o=bt(i,a),s=r(`${ot}Delay`),c=r(`${ot}Duration`),l=bt(s,c),u=null,d=0,f=0;t===H?o>0&&(u=H,d=o,f=a.length):t===ot?l>0&&(u=ot,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?H:ot:null,f=u?u===H?a.length:c.length:0);let p=u===H&&/\b(?:transform|all)(?:,|$)/.test(r(`${H}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function bt(e,t){for(;e.lengthxt(t)+xt(e[n])))}function xt(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function St(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ct(e,t,n){let r=e[st];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var wt=Symbol(`_vod`),Tt=Symbol(`_vsh`),Et={name:`show`,beforeMount(e,{value:t},{transition:n}){e[wt]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Dt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Dt(e,!0),r.enter(e)):r.leave(e,()=>{Dt(e,!1)}):Dt(e,t))},beforeUnmount(e,{value:t}){Dt(e,t)}};function Dt(e,t){e.style.display=t?e[wt]:`none`,e[Tt]=!t}var Ot=Symbol(``),kt=/(?:^|;)\s*display\s*:/;function At(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Mt(r,t,``)}else for(let e in t)n[e]??Mt(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Mt(r,i,``):It(e,i,!g(t)&&t?t[i]:void 0,o)||Mt(r,i,o)}}else if(i){if(t!==n){let e=r[Ot];e&&(n+=`;`+e),r.cssText=n,a=kt.test(n)}}else t&&e.removeAttribute(`style`);wt in e&&(e[wt]=a?r.display:``,e[Tt]&&(r.display=`none`))}var jt=/\s*!important$/;function Mt(e,t,n){if(o(n))n.forEach(n=>Mt(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Ft(e,t);jt.test(n)?e.setProperty(Ge(r),n.replace(jt,``),`important`):e[r]=n}}var Nt=[`Webkit`,`Moz`,`ms`],Pt={};function Ft(e,t){let n=Pt[t];if(n)return n;let r=Ke(t);if(r!==`filter`&&r in e)return Pt[t]=r;r=E(r);for(let n=0;nqt||=(Jt.then(()=>qt=0),Date.now());function Xt(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(o(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qt=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ct(e,r,o):t===`style`?At(e,n,r):xe(t)?Ce(t)||Ut(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):$t(e,t,r,o))?(zt(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Rt(e,t,r,o,a,t!==`value`)):e._isVueCE&&(en(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?zt(e,Ke(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Rt(e,t,r,o))};function $t(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Zt(t)&&v(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Zt(t)&&g(n)?!1:t in e}function en(e,t){let n=e._def.props;if(!n)return!1;let r=Ke(t);return Array.isArray(n)?n.some(e=>Ke(e)===r):Object.keys(n).some(e=>Ke(e)===r)}var tn=new WeakMap,nn=new WeakMap,rn=Symbol(`_moveCb`),an=Symbol(`_enterCb`),on=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:a({},lt,{tag:String,moveClass:String}),setup(e,{slots:n}){let i=r(),a=Ve(),o,s;return u(()=>{if(!o.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!dn(o[0].el,i.vnode.el,t)){o=[];return}o.forEach(sn),o.forEach(cn);let n=o.filter(ln);St(i.vnode.el),n.forEach(e=>{let n=e.el,r=n.style;U(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[rn]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[rn]=null,W(n,t))};n.addEventListener(`transitionend`,i)}),o=[]}),()=>{let r=oe(e),c=pt(r),l=r.tag||_e;if(o=[],s)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=yt(r);return a.removeChild(r),o}var fn=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return o(t)?e=>c(t,e):t};function pn(e){e.target.composing=!0}function mn(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var hn=Symbol(`_assign`);function gn(e,t,n){return t&&(e=e.trim()),n&&(e=l(e)),e}var _n={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[hn]=fn(i);let a=r||i.props&&i.props.type===`number`;Bt(e,t?`change`:`input`,t=>{t.target.composing||e[hn](gn(e.value,n,a))}),(n||a)&&Bt(e,`change`,()=>{e.value=gn(e.value,n,a)}),t||(Bt(e,`compositionstart`,pn),Bt(e,`compositionend`,mn),Bt(e,`change`,mn))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[hn]=fn(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?l(e.value):e.value,c=t??``;if(s===c)return;let u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},vn=[`ctrl`,`shift`,`alt`,`meta`],yn={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>vn.some(n=>e[`${n}Key`]&&!t.includes(n))},bn=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=Ge(n.key);if(t.some(e=>e===r||xn[e]===r))return e(n)}))},Cn=a({patchProp:Qt},at),wn;function Tn(){return wn||=k(Cn)}var En=((...e)=>{let t=Tn().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=On(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Dn(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Dn(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function On(e){return g(e)?document.querySelector(e):e}var kn=typeof window<`u`,An,jn=e=>An=e,Mn=Symbol();function Nn(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var Pn;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(Pn||={});var Fn=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function In(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Ln(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){Hn(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Rn(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function zn(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var Bn=typeof navigator==`object`?navigator:{userAgent:``},Vn=/Macintosh/.test(Bn.userAgent)&&/AppleWebKit/.test(Bn.userAgent)&&!/Safari/.test(Bn.userAgent),Hn=kn?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!Vn?Un:`msSaveOrOpenBlob`in Bn?Wn:Gn:()=>{};function Un(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?zn(r):Rn(r.href)?Ln(e,t,n):(r.target=`_blank`,zn(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){zn(r)},0))}function Wn(e,t=`download`,n){if(typeof e==`string`)if(Rn(e))Ln(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){zn(t)})}else navigator.msSaveOrOpenBlob(In(e,n),t)}function Gn(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Ln(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Fn.HTMLElement))||`safari`in Fn,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||Vn)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:Kn}=Object;function qn(){let e=je(!0),t=e.run(()=>I({})),n=[],r=[],i=le({install(e){jn(i),i._a=e,e.provide(Mn,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var Jn=()=>{};function Yn(e,t,n,r=Jn){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&ze()&&de(i),i}function Xn(e,...t){e.forEach(e=>{e(...t)})}var Zn=e=>e(),Qn=Symbol(),$n=Symbol();function er(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Nn(i)&&Nn(r)&&e.hasOwnProperty(n)&&!He(r)&&!we(r)?e[n]=er(i,r):e[n]=r}return e}var tr=Symbol();function nr(e){return!Nn(e)||!Object.prototype.hasOwnProperty.call(e,tr)}var{assign:rr}=Object;function ir(e){return!!(He(e)&&e.effect)}function ar(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),rr(qe(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=le(N(()=>{jn(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=or(e,l,t,n,r,!0),c}function or(e,t,n={},r,i,a){let o,s=rr({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={}),I({});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:Pn.patchFunction,storeId:e,events:void 0}):(er(r.state.value[e],t),n={type:Pn.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();T().then(()=>{m===i&&(l=!0)}),u=!0,Xn(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{rr(e,t)})}:Jn;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(Qn in t)return t[$n]=n,t;let i=function(){jn(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}Xn(f,{args:n,name:i[$n],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw Xn(o,e),e}return l instanceof Promise?l.then(e=>(Xn(a,e),e)).catch(e=>(Xn(o,e),Promise.reject(e))):(Xn(a,l),l)};return i[Qn]=!0,i[$n]=n,i},y=Pe({_p:r,$id:e,$onAction:Yn.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=Yn(d,t,n.detached,()=>a()),a=o.run(()=>Oe(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:Pn.direct,events:void 0},r)},rr({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||Zn)(()=>r._e.run(()=>(o=je()).run(()=>t({action:v}))));for(let t in b){let n=b[t];He(n)&&!ir(n)||we(n)?a||(p&&nr(n)&&(He(n)?n.value=p[t]:er(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return rr(y,b),rr(oe(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{rr(t,e)})}}),r._p.forEach(e=>{rr(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function sr(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=_();return n||=o?x(Mn,null):null,n&&jn(n),n=An,n._s.has(e)||(i?or(e,t,r,n):ar(e,r,n)),n._s.get(e)}return a.$id=e,a}function cr(e){let t=oe(e),n={};for(let r in t){let i=t[r];i.effect?n[r]=N({get:()=>e[r],set(t){e[r]=t}}):(He(i)||we(i))&&(n[r]=Ue(e,r))}return n}function lr(e=8){return Math.random().toString(16).slice(2,2+e)}function ur(e){let t=N(e),n=I(t.value);return Oe(t,e=>{n.value=e}),typeof e==`function`?n:{__v_isRef:!0,get value(){return n.value},set value(t){e.set(t)}}}function dr(){let e=I(!1);return te(()=>{e.value=!0}),Ee(e)}function fr(e,t=[],n){let r={};return Object.getOwnPropertyNames(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),Object.assign(r,n)}function pr(e,...t){return typeof e==`function`?e(...t):typeof e==`string`?s(e):typeof e==`number`?s(String(e)):null}var mr=`[object Symbol]`;function hr(e){return typeof e==`symbol`||w(e)&&Je(e)==mr}function gr(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++ni?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:Sr(e,t,n)}var wr=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function Tr(e){return wr.test(e)}function Er(e){return e.split(``)}var Dr=`\\ud800-\\udfff`,Or=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,kr=`\\ufe0e\\ufe0f`,Ar=`[`+Dr+`]`,jr=`[`+Or+`]`,Mr=`\\ud83c[\\udffb-\\udfff]`,Nr=`(?:`+jr+`|`+Mr+`)`,Pr=`[^`+Dr+`]`,Fr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Ir=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Lr=`\\u200d`,Rr=Nr+`?`,zr=`[`+kr+`]?`,Br=`(?:`+Lr+`(?:`+[Pr,Fr,Ir].join(`|`)+`)`+zr+Rr+`)*`,Vr=zr+Rr+Br,Hr=`(?:`+[Pr+jr+`?`,jr,Fr,Ir,Ar].join(`|`)+`)`,Ur=RegExp(Mr+`(?=`+Mr+`)|`+Hr+Vr,`g`);function Wr(e){return e.match(Ur)||[]}function Gr(e){return Tr(e)?Wr(e):Er(e)}function Kr(e){return function(t){t=xr(t);var n=Tr(t)?Gr(t):void 0,r=n?n[0]:t.charAt(0),i=n?Cr(n,1).join(``):t.slice(1);return r[e]()+i}}var qr=Kr(`toUpperCase`),Jr=ke(`base-icon`,` height: 1em; width: 1em; @@ -103,7 +103,7 @@ import{$ as e,$t as t,An as n,At as r,B as i,Cn as a,Dn as o,Dt as s,En as c,Fn padding-top ${t} ${Y}, padding-bottom ${t} ${Y} ${n?`,${n}`:``} - `)]}var zi={linkFontSize:`13px`,linkPadding:`0 0 0 16px`,railWidth:`4px`};function Bi(e){let{borderRadius:t,railColor:n,primaryColor:r,primaryColorHover:i,primaryColorPressed:a,textColor2:o}=e;return Object.assign(Object.assign({},zi),{borderRadius:t,railColor:n,railColorActive:r,linkColor:A(r,{alpha:.15}),linkTextColor:o,linkTextColorHover:i,linkTextColorPressed:a,linkTextColorActive:r})}var Vi={name:`Anchor`,common:q,self:Bi},Hi={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function Ui(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,warningColor:c,warningColorHover:l,errorColor:u,errorColorHover:d,borderRadius:f,lineHeight:p,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:x,clearColor:S,clearColorHover:C,clearColorPressed:w,placeholderColor:T,placeholderColorDisabled:E,iconColor:D,iconColorDisabled:O,iconColorHover:k,iconColorPressed:ee,fontWeight:te}=e;return Object.assign(Object.assign({},Hi),{fontWeight:te,countTextColorDisabled:r,countTextColor:n,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:x,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,lineHeight:p,lineHeightTextarea:p,borderRadius:f,iconSize:`16px`,groupLabelColor:o,textColor:t,textColorDisabled:r,textDecorationColor:t,groupLabelTextColor:t,caretColor:i,placeholderColor:T,placeholderColorDisabled:E,color:o,colorDisabled:s,colorFocus:A(i,{alpha:.1}),groupLabelBorder:`1px solid #0000`,border:`1px solid #0000`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid #0000`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 8px 0 ${A(i,{alpha:.3})}`,loadingColor:i,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${l}`,colorFocusWarning:A(c,{alpha:.1}),borderFocusWarning:`1px solid ${l}`,boxShadowFocusWarning:`0 0 8px 0 ${A(c,{alpha:.3})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${d}`,colorFocusError:A(u,{alpha:.1}),borderFocusError:`1px solid ${d}`,boxShadowFocusError:`0 0 8px 0 ${A(u,{alpha:.3})}`,caretColorError:u,clearColor:S,clearColorHover:C,clearColorPressed:w,iconColor:D,iconColorDisabled:O,iconColorHover:k,iconColorPressed:ee,suffixTextColor:t})}var X=F({name:`Input`,common:q,peers:{Scrollbar:J},self:Ui});function Wi(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:p,lineHeight:m,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,actionColor:C,clearColor:w,clearColorHover:T,clearColorPressed:E,placeholderColor:D,placeholderColorDisabled:O,iconColor:k,iconColorDisabled:ee,iconColorHover:te,iconColorPressed:ne,fontWeight:re}=e;return Object.assign(Object.assign({},Hi),{fontWeight:re,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,lineHeight:m,lineHeightTextarea:m,borderRadius:p,iconSize:`16px`,groupLabelColor:C,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:D,placeholderColorDisabled:O,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${A(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${A(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${A(d,{alpha:.2})}`,caretColorError:d,clearColor:w,clearColorHover:T,clearColorPressed:E,iconColor:k,iconColorDisabled:ee,iconColorHover:te,iconColorPressed:ne,suffixTextColor:t})}var Gi=F({name:`Input`,common:P,peers:{Scrollbar:B},self:Wi});function Ki(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var qi=F({name:`AutoComplete`,common:P,peers:{InternalSelectMenu:Si,Input:Gi},self:Ki}),Ji={name:`AutoComplete`,common:q,peers:{InternalSelectMenu:Ci,Input:X},self:Ki};function Yi(e){let{borderRadius:t,avatarColor:n,cardColor:r,fontSize:i,heightTiny:a,heightSmall:o,heightMedium:s,heightLarge:c,heightHuge:l,modalColor:u,popoverColor:d}=e;return{borderRadius:t,fontSize:i,border:`2px solid ${r}`,heightTiny:a,heightSmall:o,heightMedium:s,heightLarge:c,heightHuge:l,color:j(r,n),colorModal:j(u,n),colorPopover:j(d,n)}}var Xi={name:`Avatar`,common:P,self:Yi},Zi={name:`Avatar`,common:q,self:Yi};function Qi(){return{gap:`-12px`}}F({name:`AvatarGroup`,common:P,peers:{Avatar:Xi},self:Qi});var $i={name:`AvatarGroup`,common:q,peers:{Avatar:Zi},self:Qi},ea={width:`44px`,height:`44px`,borderRadius:`22px`,iconSize:`26px`},ta={name:`BackTop`,common:q,self(e){let{popoverColor:t,textColor2:n,primaryColorHover:r,primaryColorPressed:i}=e;return Object.assign(Object.assign({},ea),{color:t,textColor:n,iconColor:n,iconColorHover:r,iconColorPressed:i,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`,boxShadowHover:`0 2px 12px 0px rgba(0, 0, 0, .18)`,boxShadowPressed:`0 2px 12px 0px rgba(0, 0, 0, .18)`})}},na={name:`Badge`,common:q,self(e){let{errorColorSuppl:t,infoColorSuppl:n,successColorSuppl:r,warningColorSuppl:i,fontFamily:a}=e;return{color:t,colorInfo:n,colorSuccess:r,colorError:t,colorWarning:i,fontSize:`12px`,fontFamily:a}}},ra={fontWeightActive:`400`};function ia(e){let{fontSize:t,textColor3:n,textColor2:r,borderRadius:i,buttonColor2Hover:a,buttonColor2Pressed:o}=e;return Object.assign(Object.assign({},ra),{fontSize:t,itemLineHeight:`1.25`,itemTextColor:n,itemTextColorHover:r,itemTextColorPressed:r,itemTextColorActive:r,itemBorderRadius:i,itemColorHover:a,itemColorPressed:o,separatorColor:n})}var aa={name:`Breadcrumb`,common:q,self:ia},oa={paddingTiny:`0 6px`,paddingSmall:`0 10px`,paddingMedium:`0 14px`,paddingLarge:`0 18px`,paddingRoundTiny:`0 10px`,paddingRoundSmall:`0 14px`,paddingRoundMedium:`0 18px`,paddingRoundLarge:`0 22px`,iconMarginTiny:`6px`,iconMarginSmall:`6px`,iconMarginMedium:`6px`,iconMarginLarge:`6px`,iconSizeTiny:`14px`,iconSizeSmall:`18px`,iconSizeMedium:`18px`,iconSizeLarge:`20px`,rippleDuration:`.6s`};function sa(e){let{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadius:a,fontSizeTiny:o,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:u,textColor2:d,textColor3:f,primaryColorHover:p,primaryColorPressed:m,borderColor:h,primaryColor:g,baseColor:_,infoColor:v,infoColorHover:y,infoColorPressed:b,successColor:x,successColorHover:S,successColorPressed:C,warningColor:w,warningColorHover:T,warningColorPressed:E,errorColor:D,errorColorHover:O,errorColorPressed:k,fontWeight:ee,buttonColor2:te,buttonColor2Hover:ne,buttonColor2Pressed:re,fontWeightStrong:A}=e;return Object.assign(Object.assign({},oa),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadiusTiny:a,borderRadiusSmall:a,borderRadiusMedium:a,borderRadiusLarge:a,fontSizeTiny:o,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:u,colorOpacitySecondary:`0.16`,colorOpacitySecondaryHover:`0.22`,colorOpacitySecondaryPressed:`0.28`,colorSecondary:te,colorSecondaryHover:ne,colorSecondaryPressed:re,colorTertiary:te,colorTertiaryHover:ne,colorTertiaryPressed:re,colorQuaternary:`#0000`,colorQuaternaryHover:ne,colorQuaternaryPressed:re,color:`#0000`,colorHover:`#0000`,colorPressed:`#0000`,colorFocus:`#0000`,colorDisabled:`#0000`,textColor:d,textColorTertiary:f,textColorHover:p,textColorPressed:m,textColorFocus:p,textColorDisabled:d,textColorText:d,textColorTextHover:p,textColorTextPressed:m,textColorTextFocus:p,textColorTextDisabled:d,textColorGhost:d,textColorGhostHover:p,textColorGhostPressed:m,textColorGhostFocus:p,textColorGhostDisabled:d,border:`1px solid ${h}`,borderHover:`1px solid ${p}`,borderPressed:`1px solid ${m}`,borderFocus:`1px solid ${p}`,borderDisabled:`1px solid ${h}`,rippleColor:g,colorPrimary:g,colorHoverPrimary:p,colorPressedPrimary:m,colorFocusPrimary:p,colorDisabledPrimary:g,textColorPrimary:_,textColorHoverPrimary:_,textColorPressedPrimary:_,textColorFocusPrimary:_,textColorDisabledPrimary:_,textColorTextPrimary:g,textColorTextHoverPrimary:p,textColorTextPressedPrimary:m,textColorTextFocusPrimary:p,textColorTextDisabledPrimary:d,textColorGhostPrimary:g,textColorGhostHoverPrimary:p,textColorGhostPressedPrimary:m,textColorGhostFocusPrimary:p,textColorGhostDisabledPrimary:g,borderPrimary:`1px solid ${g}`,borderHoverPrimary:`1px solid ${p}`,borderPressedPrimary:`1px solid ${m}`,borderFocusPrimary:`1px solid ${p}`,borderDisabledPrimary:`1px solid ${g}`,rippleColorPrimary:g,colorInfo:v,colorHoverInfo:y,colorPressedInfo:b,colorFocusInfo:y,colorDisabledInfo:v,textColorInfo:_,textColorHoverInfo:_,textColorPressedInfo:_,textColorFocusInfo:_,textColorDisabledInfo:_,textColorTextInfo:v,textColorTextHoverInfo:y,textColorTextPressedInfo:b,textColorTextFocusInfo:y,textColorTextDisabledInfo:d,textColorGhostInfo:v,textColorGhostHoverInfo:y,textColorGhostPressedInfo:b,textColorGhostFocusInfo:y,textColorGhostDisabledInfo:v,borderInfo:`1px solid ${v}`,borderHoverInfo:`1px solid ${y}`,borderPressedInfo:`1px solid ${b}`,borderFocusInfo:`1px solid ${y}`,borderDisabledInfo:`1px solid ${v}`,rippleColorInfo:v,colorSuccess:x,colorHoverSuccess:S,colorPressedSuccess:C,colorFocusSuccess:S,colorDisabledSuccess:x,textColorSuccess:_,textColorHoverSuccess:_,textColorPressedSuccess:_,textColorFocusSuccess:_,textColorDisabledSuccess:_,textColorTextSuccess:x,textColorTextHoverSuccess:S,textColorTextPressedSuccess:C,textColorTextFocusSuccess:S,textColorTextDisabledSuccess:d,textColorGhostSuccess:x,textColorGhostHoverSuccess:S,textColorGhostPressedSuccess:C,textColorGhostFocusSuccess:S,textColorGhostDisabledSuccess:x,borderSuccess:`1px solid ${x}`,borderHoverSuccess:`1px solid ${S}`,borderPressedSuccess:`1px solid ${C}`,borderFocusSuccess:`1px solid ${S}`,borderDisabledSuccess:`1px solid ${x}`,rippleColorSuccess:x,colorWarning:w,colorHoverWarning:T,colorPressedWarning:E,colorFocusWarning:T,colorDisabledWarning:w,textColorWarning:_,textColorHoverWarning:_,textColorPressedWarning:_,textColorFocusWarning:_,textColorDisabledWarning:_,textColorTextWarning:w,textColorTextHoverWarning:T,textColorTextPressedWarning:E,textColorTextFocusWarning:T,textColorTextDisabledWarning:d,textColorGhostWarning:w,textColorGhostHoverWarning:T,textColorGhostPressedWarning:E,textColorGhostFocusWarning:T,textColorGhostDisabledWarning:w,borderWarning:`1px solid ${w}`,borderHoverWarning:`1px solid ${T}`,borderPressedWarning:`1px solid ${E}`,borderFocusWarning:`1px solid ${T}`,borderDisabledWarning:`1px solid ${w}`,rippleColorWarning:w,colorError:D,colorHoverError:O,colorPressedError:k,colorFocusError:O,colorDisabledError:D,textColorError:_,textColorHoverError:_,textColorPressedError:_,textColorFocusError:_,textColorDisabledError:_,textColorTextError:D,textColorTextHoverError:O,textColorTextPressedError:k,textColorTextFocusError:O,textColorTextDisabledError:d,textColorGhostError:D,textColorGhostHoverError:O,textColorGhostPressedError:k,textColorGhostFocusError:O,textColorGhostDisabledError:D,borderError:`1px solid ${D}`,borderHoverError:`1px solid ${O}`,borderPressedError:`1px solid ${k}`,borderFocusError:`1px solid ${O}`,borderDisabledError:`1px solid ${D}`,rippleColorError:D,waveOpacity:`0.6`,fontWeight:ee,fontWeightStrong:A})}var Z={name:`Button`,common:P,self:sa},Q={name:`Button`,common:q,self(e){let t=sa(e);return t.waveOpacity=`0.8`,t.colorOpacitySecondary=`0.16`,t.colorOpacitySecondaryHover=`0.2`,t.colorOpacitySecondaryPressed=`0.12`,t}},ca={titleFontSize:`22px`};function la(e){let{borderRadius:t,fontSize:n,lineHeight:r,textColor2:i,textColor1:a,textColorDisabled:o,dividerColor:s,fontWeightStrong:c,primaryColor:l,baseColor:u,hoverColor:d,cardColor:f,modalColor:p,popoverColor:m}=e;return Object.assign(Object.assign({},ca),{borderRadius:t,borderColor:j(f,s),borderColorModal:j(p,s),borderColorPopover:j(m,s),textColor:i,titleFontWeight:c,titleTextColor:a,dayTextColor:o,fontSize:n,lineHeight:r,dateColorCurrent:l,dateTextColorCurrent:u,cellColorHover:j(f,d),cellColorHoverModal:j(p,d),cellColorHoverPopover:j(m,d),cellColor:f,cellColorModal:p,cellColorPopover:m,barColor:l})}F({name:`Calendar`,common:P,peers:{Button:Z},self:la});var ua={name:`Calendar`,common:q,peers:{Button:Q},self:la},da={name:`Card`,common:q,self(e){let t=Ze(e),{cardColor:n,modalColor:r,popoverColor:i}=e;return t.colorEmbedded=n,t.colorEmbeddedModal=r,t.colorEmbeddedPopover=i,t}};function fa(){return{dotSize:`8px`,dotColor:`rgba(255, 255, 255, .3)`,dotColorActive:`rgba(255, 255, 255, 1)`,dotColorFocus:`rgba(255, 255, 255, .5)`,dotLineWidth:`16px`,dotLineWidthActive:`24px`,arrowColor:`#eee`}}var pa={name:`Carousel`,common:q,self:fa},ma={sizeSmall:`14px`,sizeMedium:`16px`,sizeLarge:`18px`,labelPadding:`0 8px`,labelFontWeight:`400`};function ha(e){let{baseColor:t,inputColorDisabled:n,cardColor:r,modalColor:i,popoverColor:a,textColorDisabled:o,borderColor:s,primaryColor:c,textColor2:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,borderRadiusSmall:p,lineHeight:m}=e;return Object.assign(Object.assign({},ma),{labelLineHeight:m,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,borderRadius:p,color:t,colorChecked:c,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:r,colorTableHeaderModal:i,colorTableHeaderPopover:a,checkMarkColor:t,checkMarkColorDisabled:o,checkMarkColorDisabledChecked:o,border:`1px solid ${s}`,borderDisabled:`1px solid ${s}`,borderDisabledChecked:`1px solid ${s}`,borderChecked:`1px solid ${c}`,borderFocus:`1px solid ${c}`,boxShadowFocus:`0 0 0 2px ${A(c,{alpha:.3})}`,textColor:l,textColorDisabled:o})}var ga={name:`Checkbox`,common:P,self:ha},_a={name:`Checkbox`,common:q,self(e){let{cardColor:t}=e,n=ha(e);return n.color=`#0000`,n.checkMarkColor=t,n}};function va(e){let{borderRadius:t,boxShadow2:n,popoverColor:r,textColor2:i,textColor3:a,primaryColor:o,textColorDisabled:s,dividerColor:c,hoverColor:l,fontSizeMedium:u,heightMedium:d}=e;return{menuBorderRadius:t,menuColor:r,menuBoxShadow:n,menuDividerColor:c,menuHeight:`calc(var(--n-option-height) * 6.6)`,optionArrowColor:a,optionHeight:d,optionFontSize:u,optionColorHover:l,optionTextColor:i,optionTextColorActive:o,optionTextColorDisabled:s,optionCheckMarkColor:o,loadingColor:o,columnWidth:`180px`}}F({name:`Cascader`,common:P,peers:{InternalSelectMenu:Si,InternalSelection:Ni,Scrollbar:B,Checkbox:ga,Empty:vi},self:va});var ya={name:`Cascader`,common:q,peers:{InternalSelectMenu:Ci,InternalSelection:ji,Scrollbar:J,Checkbox:_a,Empty:vi},self:va},ba={name:`Code`,common:q,self(e){let{textColor2:t,fontSize:n,fontWeightStrong:r,textColor3:i}=e;return{textColor:t,fontSize:n,fontWeightStrong:r,"mono-3":`#5c6370`,"hue-1":`#56b6c2`,"hue-2":`#61aeee`,"hue-3":`#c678dd`,"hue-4":`#98c379`,"hue-5":`#e06c75`,"hue-5-2":`#be5046`,"hue-6":`#d19a66`,"hue-6-2":`#e6c07b`,lineNumberTextColor:i}}};function xa(e){let{fontWeight:t,textColor1:n,textColor2:r,textColorDisabled:i,dividerColor:a,fontSize:o}=e;return{titleFontSize:o,titleFontWeight:t,dividerColor:a,titleTextColor:n,titleTextColorDisabled:i,fontSize:o,textColor:r,arrowColor:r,arrowColorDisabled:i,itemMargin:`16px 0 0 0`,titlePadding:`16px 0 0 0`}}var Sa={name:`Collapse`,common:q,self:xa};function Ca(e){let{cubicBezierEaseInOut:t}=e;return{bezier:t}}var wa={name:`CollapseTransition`,common:q,self:Ca};function Ta(e){let{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:o,heightSmall:s,heightMedium:c,heightLarge:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,dividerColor:p}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${o}`,heightSmall:s,heightMedium:c,heightLarge:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,dividerColor:p}}F({name:`ColorPicker`,common:P,peers:{Input:Gi,Button:Z},self:Ta});var Ea={name:`ColorPicker`,common:q,peers:{Input:X,Button:Q},self:Ta},Da=L({name:`ConfigProvider`,alias:[`App`],props:{abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:`div`},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(Ie(`config-provider`,"`as` is deprecated, please use `tag` instead."),!0),default:void 0}},setup(e){let t=x(ne,null),n=N(()=>{let{theme:n}=e;if(n===null)return;let r=t?.mergedThemeRef.value;return n===void 0?r:r===void 0?n:Object.assign({},r,n)}),r=N(()=>{let{themeOverrides:n}=e;if(n!==null){if(n===void 0)return t?.mergedThemeOverridesRef.value;{let e=t?.mergedThemeOverridesRef.value;return e===void 0?n:ae({},e,n)}}}),i=ur(()=>{let{namespace:n}=e;return n===void 0?t?.mergedNamespaceRef.value:n}),a=ur(()=>{let{bordered:n}=e;return n===void 0?t?.mergedBorderedRef.value:n}),o=N(()=>{let{icons:n}=e;return n===void 0?t?.mergedIconsRef.value:n}),s=N(()=>{let{componentOptions:n}=e;return n===void 0?t?.mergedComponentPropsRef.value:n}),c=N(()=>{let{clsPrefix:n}=e;return n===void 0?t?t.mergedClsPrefixRef.value:`n`:n}),l=N(()=>{var n;let{rtl:r}=e;if(r===void 0)return t?.mergedRtlRef.value;let i={};for(let e of r)i[e.name]=le(e),(n=e.peers)==null||n.forEach(e=>{e.name in i||(i[e.name]=le(e))});return i}),u=N(()=>e.breakpoints||t?.mergedBreakpointsRef.value),d=e.inlineThemeDisabled||t?.inlineThemeDisabled,f=e.preflightStyleDisabled||t?.preflightStyleDisabled,p=e.styleMountTarget||t?.styleMountTarget;return Le(ne,{mergedThemeHashRef:N(()=>{let{value:e}=n,{value:t}=r,i=t&&Object.keys(t).length!==0,a=e?.name;return a?i?`${a}-${ue(JSON.stringify(r.value))}`:a:i?ue(JSON.stringify(r.value)):``}),mergedBreakpointsRef:u,mergedRtlRef:l,mergedIconsRef:o,mergedComponentPropsRef:s,mergedBorderedRef:a,mergedNamespaceRef:i,mergedClsPrefixRef:c,mergedLocaleRef:N(()=>{let{locale:n}=e;if(n!==null)return n===void 0?t?.mergedLocaleRef.value:n}),mergedDateLocaleRef:N(()=>{let{dateLocale:n}=e;if(n!==null)return n===void 0?t?.mergedDateLocaleRef.value:n}),mergedHljsRef:N(()=>{let{hljs:n}=e;return n===void 0?t?.mergedHljsRef.value:n}),mergedKatexRef:N(()=>{let{katex:n}=e;return n===void 0?t?.mergedKatexRef.value:n}),mergedThemeRef:n,mergedThemeOverridesRef:r,inlineThemeDisabled:d||!1,preflightStyleDisabled:f||!1,styleMountTarget:p}),{mergedClsPrefix:c,mergedBordered:a,mergedNamespace:i,mergedTheme:n,mergedThemeOverrides:r}},render(){var e,t;return this.abstract?(t=this.$slots).default?.call(t):h(this.as||this.tag,{class:`${this.mergedClsPrefix||`n`}-config-provider`},(e=this.$slots).default?.call(e))}}),Oa={name:`Popselect`,common:q,peers:{Popover:Di,InternalSelectMenu:Ci}};function ka(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var Aa=F({name:`Popselect`,common:P,peers:{Popover:Ei,InternalSelectMenu:Si},self:ka});function ja(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var Ma=F({name:`Select`,common:P,peers:{InternalSelection:Ni,InternalSelectMenu:Si},self:ja}),Na={name:`Select`,common:q,peers:{InternalSelection:ji,InternalSelectMenu:Ci},self:ja},Pa={itemPaddingSmall:`0 4px`,itemMarginSmall:`0 0 0 8px`,itemMarginSmallRtl:`0 8px 0 0`,itemPaddingMedium:`0 4px`,itemMarginMedium:`0 0 0 8px`,itemMarginMediumRtl:`0 8px 0 0`,itemPaddingLarge:`0 4px`,itemMarginLarge:`0 0 0 8px`,itemMarginLargeRtl:`0 8px 0 0`,buttonIconSizeSmall:`14px`,buttonIconSizeMedium:`16px`,buttonIconSizeLarge:`18px`,inputWidthSmall:`60px`,selectWidthSmall:`unset`,inputMarginSmall:`0 0 0 8px`,inputMarginSmallRtl:`0 8px 0 0`,selectMarginSmall:`0 0 0 8px`,prefixMarginSmall:`0 8px 0 0`,suffixMarginSmall:`0 0 0 8px`,inputWidthMedium:`60px`,selectWidthMedium:`unset`,inputMarginMedium:`0 0 0 8px`,inputMarginMediumRtl:`0 8px 0 0`,selectMarginMedium:`0 0 0 8px`,prefixMarginMedium:`0 8px 0 0`,suffixMarginMedium:`0 0 0 8px`,inputWidthLarge:`60px`,selectWidthLarge:`unset`,inputMarginLarge:`0 0 0 8px`,inputMarginLargeRtl:`0 8px 0 0`,selectMarginLarge:`0 0 0 8px`,prefixMarginLarge:`0 8px 0 0`,suffixMarginLarge:`0 0 0 8px`};function Fa(e){let{textColor2:t,primaryColor:n,primaryColorHover:r,primaryColorPressed:i,inputColorDisabled:a,textColorDisabled:o,borderColor:s,borderRadius:c,fontSizeTiny:l,fontSizeSmall:u,fontSizeMedium:d,heightTiny:f,heightSmall:p,heightMedium:m}=e;return Object.assign(Object.assign({},Pa),{buttonColor:`#0000`,buttonColorHover:`#0000`,buttonColorPressed:`#0000`,buttonBorder:`1px solid ${s}`,buttonBorderHover:`1px solid ${s}`,buttonBorderPressed:`1px solid ${s}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:i,itemTextColorActive:n,itemTextColorDisabled:o,itemColor:`#0000`,itemColorHover:`#0000`,itemColorPressed:`#0000`,itemColorActive:`#0000`,itemColorActiveHover:`#0000`,itemColorDisabled:a,itemBorder:`1px solid #0000`,itemBorderHover:`1px solid #0000`,itemBorderPressed:`1px solid #0000`,itemBorderActive:`1px solid ${n}`,itemBorderDisabled:`1px solid ${s}`,itemBorderRadius:c,itemSizeSmall:f,itemSizeMedium:p,itemSizeLarge:m,itemFontSizeSmall:l,itemFontSizeMedium:u,itemFontSizeLarge:d,jumperFontSizeSmall:l,jumperFontSizeMedium:u,jumperFontSizeLarge:d,jumperTextColor:t,jumperTextColorDisabled:o})}var Ia=F({name:`Pagination`,common:P,peers:{Select:Ma,Input:Gi,Popselect:Aa},self:Fa}),La={name:`Pagination`,common:q,peers:{Select:Na,Input:X,Popselect:Oa},self(e){let{primaryColor:t,opacity3:n}=e,r=A(t,{alpha:Number(n)}),i=Fa(e);return i.itemBorderActive=`1px solid ${r}`,i.itemBorderDisabled=`1px solid #0000`,i}},Ra={padding:`4px 0`,optionIconSizeSmall:`14px`,optionIconSizeMedium:`16px`,optionIconSizeLarge:`16px`,optionIconSizeHuge:`18px`,optionSuffixWidthSmall:`14px`,optionSuffixWidthMedium:`14px`,optionSuffixWidthLarge:`16px`,optionSuffixWidthHuge:`16px`,optionIconSuffixWidthSmall:`32px`,optionIconSuffixWidthMedium:`32px`,optionIconSuffixWidthLarge:`36px`,optionIconSuffixWidthHuge:`36px`,optionPrefixWidthSmall:`14px`,optionPrefixWidthMedium:`14px`,optionPrefixWidthLarge:`16px`,optionPrefixWidthHuge:`16px`,optionIconPrefixWidthSmall:`36px`,optionIconPrefixWidthMedium:`36px`,optionIconPrefixWidthLarge:`40px`,optionIconPrefixWidthHuge:`40px`};function za(e){let{primaryColor:t,textColor2:n,dividerColor:r,hoverColor:i,popoverColor:a,invertedColor:o,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,heightSmall:f,heightMedium:p,heightLarge:m,heightHuge:h,textColor3:g,opacityDisabled:_}=e;return Object.assign(Object.assign({},Ra),{optionHeightSmall:f,optionHeightMedium:p,optionHeightLarge:m,optionHeightHuge:h,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,optionTextColor:n,optionTextColorHover:n,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:r,suffixColor:n,prefixColor:n,optionColorHover:i,optionColorActive:A(t,{alpha:.1}),groupHeaderTextColor:g,optionTextColorInverted:`#BBB`,optionTextColorHoverInverted:`#FFF`,optionTextColorActiveInverted:`#FFF`,optionTextColorChildActiveInverted:`#FFF`,colorInverted:o,dividerColorInverted:`#BBB`,suffixColorInverted:`#BBB`,prefixColorInverted:`#BBB`,optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:`#AAA`,optionOpacityDisabled:_})}var Ba=F({name:`Dropdown`,common:P,peers:{Popover:Ei},self:za}),Va={name:`Dropdown`,common:q,peers:{Popover:Di},self(e){let{primaryColorSuppl:t,primaryColor:n,popoverColor:r}=e,i=za(e);return i.colorInverted=r,i.optionColorActive=A(n,{alpha:.15}),i.optionColorActiveInverted=t,i.optionColorHoverInverted=t,i}},Ha={padding:`8px 14px`},Ua={name:`Tooltip`,common:q,peers:{Popover:Di},self(e){let{borderRadius:t,boxShadow2:n,popoverColor:r,textColor2:i}=e;return Object.assign(Object.assign({},Ha),{borderRadius:t,boxShadow:n,color:r,textColor:i})}};function Wa(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Ha),{borderRadius:t,boxShadow:n,color:j(r,`rgba(0, 0, 0, .85)`),textColor:r})}var Ga=F({name:`Tooltip`,common:P,peers:{Popover:Ei},self:Wa}),Ka={name:`Ellipsis`,common:q,peers:{Tooltip:Ua}},qa=F({name:`Ellipsis`,common:P,peers:{Tooltip:Ga}}),Ja={radioSizeSmall:`14px`,radioSizeMedium:`16px`,radioSizeLarge:`18px`,labelPadding:`0 8px`,labelFontWeight:`400`},Ya={name:`Radio`,common:q,self(e){let{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:i,inputColorDisabled:a,textColor2:o,opacityDisabled:s,borderRadius:c,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,heightSmall:f,heightMedium:p,heightLarge:m,lineHeight:h}=e;return Object.assign(Object.assign({},Ja),{labelLineHeight:h,buttonHeightSmall:f,buttonHeightMedium:p,buttonHeightLarge:m,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:`#0000`,colorDisabled:a,colorActive:`#0000`,textColor:o,textColorDisabled:i,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:n,buttonColor:`#0000`,buttonColorActive:n,buttonTextColor:o,buttonTextColorActive:r,buttonTextColorHover:n,opacityDisabled:s,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${n}`,buttonBoxShadow:`inset 0 0 0 1px #0000`,buttonBorderRadius:c})}};function Xa(e){let{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:i,inputColorDisabled:a,textColor2:o,opacityDisabled:s,borderRadius:c,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,heightSmall:f,heightMedium:p,heightLarge:m,lineHeight:h}=e;return Object.assign(Object.assign({},Ja),{labelLineHeight:h,buttonHeightSmall:f,buttonHeightMedium:p,buttonHeightLarge:m,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:a,colorActive:`#0000`,textColor:o,textColorDisabled:i,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:o,buttonTextColorActive:n,buttonTextColorHover:n,opacityDisabled:s,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px #0000`,buttonBoxShadow:`inset 0 0 0 1px #0000`,buttonBorderRadius:c})}var Za={name:`Radio`,common:P,self:Xa},Qa={thPaddingSmall:`8px`,thPaddingMedium:`12px`,thPaddingLarge:`12px`,tdPaddingSmall:`8px`,tdPaddingMedium:`12px`,tdPaddingLarge:`12px`,sorterSize:`15px`,resizableContainerSize:`8px`,resizableSize:`2px`,filterSize:`15px`,paginationMargin:`12px 0 0 0`,emptyPadding:`48px 0`,actionPadding:`8px 12px`,actionButtonMargin:`0 8px 0 0`};function $a(e){let{cardColor:t,modalColor:n,popoverColor:r,textColor2:i,textColor1:a,tableHeaderColor:o,tableColorHover:s,iconColor:c,primaryColor:l,fontWeightStrong:u,borderRadius:d,lineHeight:f,fontSizeSmall:p,fontSizeMedium:m,fontSizeLarge:h,dividerColor:g,heightSmall:_,opacityDisabled:v,tableColorStriped:y}=e;return Object.assign(Object.assign({},Qa),{actionDividerColor:g,lineHeight:f,borderRadius:d,fontSizeSmall:p,fontSizeMedium:m,fontSizeLarge:h,borderColor:j(t,g),tdColorHover:j(t,s),tdColorSorting:j(t,s),tdColorStriped:j(t,y),thColor:j(t,o),thColorHover:j(j(t,o),s),thColorSorting:j(j(t,o),s),tdColor:t,tdTextColor:i,thTextColor:a,thFontWeight:u,thButtonColorHover:s,thIconColor:c,thIconColorActive:l,borderColorModal:j(n,g),tdColorHoverModal:j(n,s),tdColorSortingModal:j(n,s),tdColorStripedModal:j(n,y),thColorModal:j(n,o),thColorHoverModal:j(j(n,o),s),thColorSortingModal:j(j(n,o),s),tdColorModal:n,borderColorPopover:j(r,g),tdColorHoverPopover:j(r,s),tdColorSortingPopover:j(r,s),tdColorStripedPopover:j(r,y),thColorPopover:j(r,o),thColorHoverPopover:j(j(r,o),s),thColorSortingPopover:j(j(r,o),s),tdColorPopover:r,boxShadowBefore:`inset -12px 0 8px -12px rgba(0, 0, 0, .18)`,boxShadowAfter:`inset 12px 0 8px -12px rgba(0, 0, 0, .18)`,loadingColor:l,loadingSize:_,opacityLoading:v})}F({name:`DataTable`,common:P,peers:{Button:Z,Checkbox:ga,Radio:Za,Pagination:Ia,Scrollbar:B,Empty:vi,Popover:Ei,Ellipsis:qa,Dropdown:Ba},self:$a});var eo={name:`DataTable`,common:q,peers:{Button:Q,Checkbox:_a,Radio:Ya,Pagination:La,Scrollbar:J,Empty:yi,Popover:Di,Ellipsis:Ka,Dropdown:Va},self(e){let t=$a(e);return t.boxShadowAfter=`inset 12px 0 8px -12px rgba(0, 0, 0, .36)`,t.boxShadowBefore=`inset -12px 0 8px -12px rgba(0, 0, 0, .36)`,t}};function to(e){let{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:o}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:o}}var no={name:`Icon`,common:q,self:to},ro={itemFontSize:`12px`,itemHeight:`36px`,itemWidth:`52px`,panelActionPadding:`8px 0`};function io(e){let{popoverColor:t,textColor2:n,primaryColor:r,hoverColor:i,dividerColor:a,opacityDisabled:o,boxShadow2:s,borderRadius:c,iconColor:l,iconColorDisabled:u}=e;return Object.assign(Object.assign({},ro),{panelColor:t,panelBoxShadow:s,panelDividerColor:a,itemTextColor:n,itemTextColorActive:r,itemColorHover:i,itemOpacityDisabled:o,itemBorderRadius:c,borderRadius:c,iconColor:l,iconColorDisabled:u})}var ao=F({name:`TimePicker`,common:P,peers:{Scrollbar:B,Button:Z,Input:Gi},self:io}),oo={name:`TimePicker`,common:q,peers:{Scrollbar:J,Button:Q,Input:X},self:io},so={itemSize:`24px`,itemCellWidth:`38px`,itemCellHeight:`32px`,scrollItemWidth:`80px`,scrollItemHeight:`40px`,panelExtraFooterPadding:`8px 12px`,panelActionPadding:`8px 12px`,calendarTitlePadding:`0`,calendarTitleHeight:`28px`,arrowSize:`14px`,panelHeaderPadding:`8px 12px`,calendarDaysHeight:`32px`,calendarTitleGridTempateColumns:`28px 28px 1fr 28px 28px`,calendarLeftPaddingDate:`6px 12px 4px 12px`,calendarLeftPaddingDatetime:`4px 12px`,calendarLeftPaddingDaterange:`6px 12px 4px 12px`,calendarLeftPaddingDatetimerange:`4px 12px`,calendarLeftPaddingMonth:`0`,calendarLeftPaddingYear:`0`,calendarLeftPaddingQuarter:`0`,calendarLeftPaddingMonthrange:`0`,calendarLeftPaddingQuarterrange:`0`,calendarLeftPaddingYearrange:`0`,calendarLeftPaddingWeek:`6px 12px 4px 12px`,calendarRightPaddingDate:`6px 12px 4px 12px`,calendarRightPaddingDatetime:`4px 12px`,calendarRightPaddingDaterange:`6px 12px 4px 12px`,calendarRightPaddingDatetimerange:`4px 12px`,calendarRightPaddingMonth:`0`,calendarRightPaddingYear:`0`,calendarRightPaddingQuarter:`0`,calendarRightPaddingMonthrange:`0`,calendarRightPaddingQuarterrange:`0`,calendarRightPaddingYearrange:`0`,calendarRightPaddingWeek:`0`};function co(e){let{hoverColor:t,fontSize:n,textColor2:r,textColorDisabled:i,popoverColor:a,primaryColor:o,borderRadiusSmall:s,iconColor:c,iconColorDisabled:l,textColor1:u,dividerColor:d,boxShadow2:f,borderRadius:p,fontWeightStrong:m}=e;return Object.assign(Object.assign({},so),{itemFontSize:n,calendarDaysFontSize:n,calendarTitleFontSize:n,itemTextColor:r,itemTextColorDisabled:i,itemTextColorActive:a,itemTextColorCurrent:o,itemColorIncluded:A(o,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:o,itemBorderRadius:s,panelColor:a,panelTextColor:r,arrowColor:c,calendarTitleTextColor:u,calendarTitleColorHover:t,calendarDaysTextColor:r,panelHeaderDividerColor:d,calendarDaysDividerColor:d,calendarDividerColor:d,panelActionDividerColor:d,panelBoxShadow:f,panelBorderRadius:p,calendarTitleFontWeight:m,scrollItemBorderRadius:p,iconColor:c,iconColorDisabled:l})}var lo=F({name:`DatePicker`,common:P,peers:{Input:Gi,Button:Z,TimePicker:ao,Scrollbar:B},self:co}),uo={name:`DatePicker`,common:q,peers:{Input:X,Button:Q,TimePicker:oo,Scrollbar:J},self(e){let{popoverColor:t,hoverColor:n,primaryColor:r}=e,i=co(e);return i.itemColorDisabled=j(t,n),i.itemColorIncluded=A(r,{alpha:.15}),i.itemColorHover=j(t,n),i}},fo={thPaddingBorderedSmall:`8px 12px`,thPaddingBorderedMedium:`12px 16px`,thPaddingBorderedLarge:`16px 24px`,thPaddingSmall:`0`,thPaddingMedium:`0`,thPaddingLarge:`0`,tdPaddingBorderedSmall:`8px 12px`,tdPaddingBorderedMedium:`12px 16px`,tdPaddingBorderedLarge:`16px 24px`,tdPaddingSmall:`0 0 8px 0`,tdPaddingMedium:`0 0 12px 0`,tdPaddingLarge:`0 0 16px 0`};function po(e){let{tableHeaderColor:t,textColor2:n,textColor1:r,cardColor:i,modalColor:a,popoverColor:o,dividerColor:s,borderRadius:c,fontWeightStrong:l,lineHeight:u,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:p}=e;return Object.assign(Object.assign({},fo),{lineHeight:u,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:p,titleTextColor:r,thColor:j(i,t),thColorModal:j(a,t),thColorPopover:j(o,t),thTextColor:r,thFontWeight:l,tdTextColor:n,tdColor:i,tdColorModal:a,tdColorPopover:o,borderColor:j(i,s),borderColorModal:j(a,s),borderColorPopover:j(o,s),borderRadius:c})}var mo={name:`Descriptions`,common:q,self:po},ho={titleFontSize:`18px`,padding:`16px 28px 20px 28px`,iconSize:`28px`,actionSpace:`12px`,contentMargin:`8px 0 16px 0`,iconMargin:`0 4px 0 0`,iconMarginIconTop:`4px 0 8px 0`,closeSize:`22px`,closeIconSize:`18px`,closeMargin:`20px 26px 0 0`,closeMarginIconTop:`10px 16px 0 0`};function go(e){let{textColor1:t,textColor2:n,modalColor:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,infoColor:l,successColor:u,warningColor:d,errorColor:f,primaryColor:p,dividerColor:m,borderRadius:h,fontWeightStrong:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},ho),{fontSize:v,lineHeight:_,border:`1px solid ${m}`,titleTextColor:t,textColor:n,color:r,closeColorHover:s,closeColorPressed:c,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeBorderRadius:h,iconColor:p,iconColorInfo:l,iconColorSuccess:u,iconColorWarning:d,iconColorError:f,borderRadius:h,titleFontWeight:g})}var _o=F({name:`Dialog`,common:P,peers:{Button:Z},self:go}),vo={name:`Dialog`,common:q,peers:{Button:Q},self:go};function yo(e){let{modalColor:t,textColor2:n,boxShadow3:r}=e;return{color:t,textColor:n,boxShadow:r}}var bo=F({name:`Modal`,common:P,peers:{Scrollbar:B,Dialog:_o,Card:Qe},self:yo}),xo={name:`Modal`,common:q,peers:{Scrollbar:J,Dialog:vo,Card:da},self:yo},So={name:`LoadingBar`,common:q,self(e){let{primaryColor:t}=e;return{colorError:`red`,colorLoading:t,height:`2px`}}},Co=ie(`n-message-api`),wo=ie(`n-message-provider`),To={margin:`0 0 8px 0`,padding:`10px 20px`,maxWidth:`720px`,minWidth:`420px`,iconMargin:`0 10px 0 0`,closeMargin:`0 0 0 10px`,closeSize:`20px`,closeIconSize:`16px`,iconSize:`20px`,fontSize:`14px`};function Eo(e){let{textColor2:t,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,infoColor:a,successColor:o,errorColor:s,warningColor:c,popoverColor:l,boxShadow2:u,primaryColor:d,lineHeight:f,borderRadius:p,closeColorHover:m,closeColorPressed:h}=e;return Object.assign(Object.assign({},To),{closeBorderRadius:p,textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:l,colorInfo:l,colorSuccess:l,colorError:l,colorWarning:l,colorLoading:l,boxShadow:u,boxShadowInfo:u,boxShadowSuccess:u,boxShadowError:u,boxShadowWarning:u,boxShadowLoading:u,iconColor:t,iconColorInfo:a,iconColorSuccess:o,iconColorWarning:c,iconColorError:s,iconColorLoading:d,closeColorHover:m,closeColorPressed:h,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,closeColorHoverInfo:m,closeColorPressedInfo:h,closeIconColorInfo:n,closeIconColorHoverInfo:r,closeIconColorPressedInfo:i,closeColorHoverSuccess:m,closeColorPressedSuccess:h,closeIconColorSuccess:n,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:i,closeColorHoverError:m,closeColorPressedError:h,closeIconColorError:n,closeIconColorHoverError:r,closeIconColorPressedError:i,closeColorHoverWarning:m,closeColorPressedWarning:h,closeIconColorWarning:n,closeIconColorHoverWarning:r,closeIconColorPressedWarning:i,closeColorHoverLoading:m,closeColorPressedLoading:h,closeIconColorLoading:n,closeIconColorHoverLoading:r,closeIconColorPressedLoading:i,loadingColor:d,lineHeight:f,borderRadius:p,border:`0`})}var Do={name:`Message`,common:P,self:Eo},Oo={name:`Message`,common:q,self:Eo},ko={icon:Function,type:{type:String,default:`info`},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,spinProps:Object,onClose:Function,onMouseenter:Function,onMouseleave:Function},Ao=z([ke(`message-wrapper`,` + `)]}var zi={linkFontSize:`13px`,linkPadding:`0 0 0 16px`,railWidth:`4px`};function Bi(e){let{borderRadius:t,railColor:n,primaryColor:r,primaryColorHover:i,primaryColorPressed:a,textColor2:o}=e;return Object.assign(Object.assign({},zi),{borderRadius:t,railColor:n,railColorActive:r,linkColor:A(r,{alpha:.15}),linkTextColor:o,linkTextColorHover:i,linkTextColorPressed:a,linkTextColorActive:r})}var Vi={name:`Anchor`,common:q,self:Bi},Hi={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function Ui(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,warningColor:c,warningColorHover:l,errorColor:u,errorColorHover:d,borderRadius:f,lineHeight:p,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:x,clearColor:S,clearColorHover:C,clearColorPressed:w,placeholderColor:T,placeholderColorDisabled:E,iconColor:D,iconColorDisabled:O,iconColorHover:k,iconColorPressed:ee,fontWeight:te}=e;return Object.assign(Object.assign({},Hi),{fontWeight:te,countTextColorDisabled:r,countTextColor:n,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:x,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,lineHeight:p,lineHeightTextarea:p,borderRadius:f,iconSize:`16px`,groupLabelColor:o,textColor:t,textColorDisabled:r,textDecorationColor:t,groupLabelTextColor:t,caretColor:i,placeholderColor:T,placeholderColorDisabled:E,color:o,colorDisabled:s,colorFocus:A(i,{alpha:.1}),groupLabelBorder:`1px solid #0000`,border:`1px solid #0000`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid #0000`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 8px 0 ${A(i,{alpha:.3})}`,loadingColor:i,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${l}`,colorFocusWarning:A(c,{alpha:.1}),borderFocusWarning:`1px solid ${l}`,boxShadowFocusWarning:`0 0 8px 0 ${A(c,{alpha:.3})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${d}`,colorFocusError:A(u,{alpha:.1}),borderFocusError:`1px solid ${d}`,boxShadowFocusError:`0 0 8px 0 ${A(u,{alpha:.3})}`,caretColorError:u,clearColor:S,clearColorHover:C,clearColorPressed:w,iconColor:D,iconColorDisabled:O,iconColorHover:k,iconColorPressed:ee,suffixTextColor:t})}var X=F({name:`Input`,common:q,peers:{Scrollbar:J},self:Ui});function Wi(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:p,lineHeight:m,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,actionColor:C,clearColor:w,clearColorHover:T,clearColorPressed:E,placeholderColor:D,placeholderColorDisabled:O,iconColor:k,iconColorDisabled:ee,iconColorHover:te,iconColorPressed:ne,fontWeight:re}=e;return Object.assign(Object.assign({},Hi),{fontWeight:re,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,lineHeight:m,lineHeightTextarea:m,borderRadius:p,iconSize:`16px`,groupLabelColor:C,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:D,placeholderColorDisabled:O,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${A(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${A(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${A(d,{alpha:.2})}`,caretColorError:d,clearColor:w,clearColorHover:T,clearColorPressed:E,iconColor:k,iconColorDisabled:ee,iconColorHover:te,iconColorPressed:ne,suffixTextColor:t})}var Gi=F({name:`Input`,common:P,peers:{Scrollbar:B},self:Wi});function Ki(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var qi=F({name:`AutoComplete`,common:P,peers:{InternalSelectMenu:Si,Input:Gi},self:Ki}),Ji={name:`AutoComplete`,common:q,peers:{InternalSelectMenu:Ci,Input:X},self:Ki};function Yi(e){let{borderRadius:t,avatarColor:n,cardColor:r,fontSize:i,heightTiny:a,heightSmall:o,heightMedium:s,heightLarge:c,heightHuge:l,modalColor:u,popoverColor:d}=e;return{borderRadius:t,fontSize:i,border:`2px solid ${r}`,heightTiny:a,heightSmall:o,heightMedium:s,heightLarge:c,heightHuge:l,color:j(r,n),colorModal:j(u,n),colorPopover:j(d,n)}}var Xi={name:`Avatar`,common:P,self:Yi},Zi={name:`Avatar`,common:q,self:Yi};function Qi(){return{gap:`-12px`}}F({name:`AvatarGroup`,common:P,peers:{Avatar:Xi},self:Qi});var $i={name:`AvatarGroup`,common:q,peers:{Avatar:Zi},self:Qi},ea={width:`44px`,height:`44px`,borderRadius:`22px`,iconSize:`26px`},ta={name:`BackTop`,common:q,self(e){let{popoverColor:t,textColor2:n,primaryColorHover:r,primaryColorPressed:i}=e;return Object.assign(Object.assign({},ea),{color:t,textColor:n,iconColor:n,iconColorHover:r,iconColorPressed:i,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`,boxShadowHover:`0 2px 12px 0px rgba(0, 0, 0, .18)`,boxShadowPressed:`0 2px 12px 0px rgba(0, 0, 0, .18)`})}},na={name:`Badge`,common:q,self(e){let{errorColorSuppl:t,infoColorSuppl:n,successColorSuppl:r,warningColorSuppl:i,fontFamily:a}=e;return{color:t,colorInfo:n,colorSuccess:r,colorError:t,colorWarning:i,fontSize:`12px`,fontFamily:a}}},ra={fontWeightActive:`400`};function ia(e){let{fontSize:t,textColor3:n,textColor2:r,borderRadius:i,buttonColor2Hover:a,buttonColor2Pressed:o}=e;return Object.assign(Object.assign({},ra),{fontSize:t,itemLineHeight:`1.25`,itemTextColor:n,itemTextColorHover:r,itemTextColorPressed:r,itemTextColorActive:r,itemBorderRadius:i,itemColorHover:a,itemColorPressed:o,separatorColor:n})}var aa={name:`Breadcrumb`,common:q,self:ia},oa={paddingTiny:`0 6px`,paddingSmall:`0 10px`,paddingMedium:`0 14px`,paddingLarge:`0 18px`,paddingRoundTiny:`0 10px`,paddingRoundSmall:`0 14px`,paddingRoundMedium:`0 18px`,paddingRoundLarge:`0 22px`,iconMarginTiny:`6px`,iconMarginSmall:`6px`,iconMarginMedium:`6px`,iconMarginLarge:`6px`,iconSizeTiny:`14px`,iconSizeSmall:`18px`,iconSizeMedium:`18px`,iconSizeLarge:`20px`,rippleDuration:`.6s`};function sa(e){let{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadius:a,fontSizeTiny:o,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:u,textColor2:d,textColor3:f,primaryColorHover:p,primaryColorPressed:m,borderColor:h,primaryColor:g,baseColor:_,infoColor:v,infoColorHover:y,infoColorPressed:b,successColor:x,successColorHover:S,successColorPressed:C,warningColor:w,warningColorHover:T,warningColorPressed:E,errorColor:D,errorColorHover:O,errorColorPressed:k,fontWeight:ee,buttonColor2:te,buttonColor2Hover:ne,buttonColor2Pressed:re,fontWeightStrong:A}=e;return Object.assign(Object.assign({},oa),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadiusTiny:a,borderRadiusSmall:a,borderRadiusMedium:a,borderRadiusLarge:a,fontSizeTiny:o,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:u,colorOpacitySecondary:`0.16`,colorOpacitySecondaryHover:`0.22`,colorOpacitySecondaryPressed:`0.28`,colorSecondary:te,colorSecondaryHover:ne,colorSecondaryPressed:re,colorTertiary:te,colorTertiaryHover:ne,colorTertiaryPressed:re,colorQuaternary:`#0000`,colorQuaternaryHover:ne,colorQuaternaryPressed:re,color:`#0000`,colorHover:`#0000`,colorPressed:`#0000`,colorFocus:`#0000`,colorDisabled:`#0000`,textColor:d,textColorTertiary:f,textColorHover:p,textColorPressed:m,textColorFocus:p,textColorDisabled:d,textColorText:d,textColorTextHover:p,textColorTextPressed:m,textColorTextFocus:p,textColorTextDisabled:d,textColorGhost:d,textColorGhostHover:p,textColorGhostPressed:m,textColorGhostFocus:p,textColorGhostDisabled:d,border:`1px solid ${h}`,borderHover:`1px solid ${p}`,borderPressed:`1px solid ${m}`,borderFocus:`1px solid ${p}`,borderDisabled:`1px solid ${h}`,rippleColor:g,colorPrimary:g,colorHoverPrimary:p,colorPressedPrimary:m,colorFocusPrimary:p,colorDisabledPrimary:g,textColorPrimary:_,textColorHoverPrimary:_,textColorPressedPrimary:_,textColorFocusPrimary:_,textColorDisabledPrimary:_,textColorTextPrimary:g,textColorTextHoverPrimary:p,textColorTextPressedPrimary:m,textColorTextFocusPrimary:p,textColorTextDisabledPrimary:d,textColorGhostPrimary:g,textColorGhostHoverPrimary:p,textColorGhostPressedPrimary:m,textColorGhostFocusPrimary:p,textColorGhostDisabledPrimary:g,borderPrimary:`1px solid ${g}`,borderHoverPrimary:`1px solid ${p}`,borderPressedPrimary:`1px solid ${m}`,borderFocusPrimary:`1px solid ${p}`,borderDisabledPrimary:`1px solid ${g}`,rippleColorPrimary:g,colorInfo:v,colorHoverInfo:y,colorPressedInfo:b,colorFocusInfo:y,colorDisabledInfo:v,textColorInfo:_,textColorHoverInfo:_,textColorPressedInfo:_,textColorFocusInfo:_,textColorDisabledInfo:_,textColorTextInfo:v,textColorTextHoverInfo:y,textColorTextPressedInfo:b,textColorTextFocusInfo:y,textColorTextDisabledInfo:d,textColorGhostInfo:v,textColorGhostHoverInfo:y,textColorGhostPressedInfo:b,textColorGhostFocusInfo:y,textColorGhostDisabledInfo:v,borderInfo:`1px solid ${v}`,borderHoverInfo:`1px solid ${y}`,borderPressedInfo:`1px solid ${b}`,borderFocusInfo:`1px solid ${y}`,borderDisabledInfo:`1px solid ${v}`,rippleColorInfo:v,colorSuccess:x,colorHoverSuccess:S,colorPressedSuccess:C,colorFocusSuccess:S,colorDisabledSuccess:x,textColorSuccess:_,textColorHoverSuccess:_,textColorPressedSuccess:_,textColorFocusSuccess:_,textColorDisabledSuccess:_,textColorTextSuccess:x,textColorTextHoverSuccess:S,textColorTextPressedSuccess:C,textColorTextFocusSuccess:S,textColorTextDisabledSuccess:d,textColorGhostSuccess:x,textColorGhostHoverSuccess:S,textColorGhostPressedSuccess:C,textColorGhostFocusSuccess:S,textColorGhostDisabledSuccess:x,borderSuccess:`1px solid ${x}`,borderHoverSuccess:`1px solid ${S}`,borderPressedSuccess:`1px solid ${C}`,borderFocusSuccess:`1px solid ${S}`,borderDisabledSuccess:`1px solid ${x}`,rippleColorSuccess:x,colorWarning:w,colorHoverWarning:T,colorPressedWarning:E,colorFocusWarning:T,colorDisabledWarning:w,textColorWarning:_,textColorHoverWarning:_,textColorPressedWarning:_,textColorFocusWarning:_,textColorDisabledWarning:_,textColorTextWarning:w,textColorTextHoverWarning:T,textColorTextPressedWarning:E,textColorTextFocusWarning:T,textColorTextDisabledWarning:d,textColorGhostWarning:w,textColorGhostHoverWarning:T,textColorGhostPressedWarning:E,textColorGhostFocusWarning:T,textColorGhostDisabledWarning:w,borderWarning:`1px solid ${w}`,borderHoverWarning:`1px solid ${T}`,borderPressedWarning:`1px solid ${E}`,borderFocusWarning:`1px solid ${T}`,borderDisabledWarning:`1px solid ${w}`,rippleColorWarning:w,colorError:D,colorHoverError:O,colorPressedError:k,colorFocusError:O,colorDisabledError:D,textColorError:_,textColorHoverError:_,textColorPressedError:_,textColorFocusError:_,textColorDisabledError:_,textColorTextError:D,textColorTextHoverError:O,textColorTextPressedError:k,textColorTextFocusError:O,textColorTextDisabledError:d,textColorGhostError:D,textColorGhostHoverError:O,textColorGhostPressedError:k,textColorGhostFocusError:O,textColorGhostDisabledError:D,borderError:`1px solid ${D}`,borderHoverError:`1px solid ${O}`,borderPressedError:`1px solid ${k}`,borderFocusError:`1px solid ${O}`,borderDisabledError:`1px solid ${D}`,rippleColorError:D,waveOpacity:`0.6`,fontWeight:ee,fontWeightStrong:A})}var Z={name:`Button`,common:P,self:sa},Q={name:`Button`,common:q,self(e){let t=sa(e);return t.waveOpacity=`0.8`,t.colorOpacitySecondary=`0.16`,t.colorOpacitySecondaryHover=`0.2`,t.colorOpacitySecondaryPressed=`0.12`,t}},ca={titleFontSize:`22px`};function la(e){let{borderRadius:t,fontSize:n,lineHeight:r,textColor2:i,textColor1:a,textColorDisabled:o,dividerColor:s,fontWeightStrong:c,primaryColor:l,baseColor:u,hoverColor:d,cardColor:f,modalColor:p,popoverColor:m}=e;return Object.assign(Object.assign({},ca),{borderRadius:t,borderColor:j(f,s),borderColorModal:j(p,s),borderColorPopover:j(m,s),textColor:i,titleFontWeight:c,titleTextColor:a,dayTextColor:o,fontSize:n,lineHeight:r,dateColorCurrent:l,dateTextColorCurrent:u,cellColorHover:j(f,d),cellColorHoverModal:j(p,d),cellColorHoverPopover:j(m,d),cellColor:f,cellColorModal:p,cellColorPopover:m,barColor:l})}F({name:`Calendar`,common:P,peers:{Button:Z},self:la});var ua={name:`Calendar`,common:q,peers:{Button:Q},self:la},da={name:`Card`,common:q,self(e){let t=Ze(e),{cardColor:n,modalColor:r,popoverColor:i}=e;return t.colorEmbedded=n,t.colorEmbeddedModal=r,t.colorEmbeddedPopover=i,t}};function fa(){return{dotSize:`8px`,dotColor:`rgba(255, 255, 255, .3)`,dotColorActive:`rgba(255, 255, 255, 1)`,dotColorFocus:`rgba(255, 255, 255, .5)`,dotLineWidth:`16px`,dotLineWidthActive:`24px`,arrowColor:`#eee`}}var pa={name:`Carousel`,common:q,self:fa},ma={sizeSmall:`14px`,sizeMedium:`16px`,sizeLarge:`18px`,labelPadding:`0 8px`,labelFontWeight:`400`};function ha(e){let{baseColor:t,inputColorDisabled:n,cardColor:r,modalColor:i,popoverColor:a,textColorDisabled:o,borderColor:s,primaryColor:c,textColor2:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,borderRadiusSmall:p,lineHeight:m}=e;return Object.assign(Object.assign({},ma),{labelLineHeight:m,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,borderRadius:p,color:t,colorChecked:c,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:r,colorTableHeaderModal:i,colorTableHeaderPopover:a,checkMarkColor:t,checkMarkColorDisabled:o,checkMarkColorDisabledChecked:o,border:`1px solid ${s}`,borderDisabled:`1px solid ${s}`,borderDisabledChecked:`1px solid ${s}`,borderChecked:`1px solid ${c}`,borderFocus:`1px solid ${c}`,boxShadowFocus:`0 0 0 2px ${A(c,{alpha:.3})}`,textColor:l,textColorDisabled:o})}var ga={name:`Checkbox`,common:P,self:ha},_a={name:`Checkbox`,common:q,self(e){let{cardColor:t}=e,n=ha(e);return n.color=`#0000`,n.checkMarkColor=t,n}};function va(e){let{borderRadius:t,boxShadow2:n,popoverColor:r,textColor2:i,textColor3:a,primaryColor:o,textColorDisabled:s,dividerColor:c,hoverColor:l,fontSizeMedium:u,heightMedium:d}=e;return{menuBorderRadius:t,menuColor:r,menuBoxShadow:n,menuDividerColor:c,menuHeight:`calc(var(--n-option-height) * 6.6)`,optionArrowColor:a,optionHeight:d,optionFontSize:u,optionColorHover:l,optionTextColor:i,optionTextColorActive:o,optionTextColorDisabled:s,optionCheckMarkColor:o,loadingColor:o,columnWidth:`180px`}}F({name:`Cascader`,common:P,peers:{InternalSelectMenu:Si,InternalSelection:Ni,Scrollbar:B,Checkbox:ga,Empty:vi},self:va});var ya={name:`Cascader`,common:q,peers:{InternalSelectMenu:Ci,InternalSelection:ji,Scrollbar:J,Checkbox:_a,Empty:vi},self:va},ba={name:`Code`,common:q,self(e){let{textColor2:t,fontSize:n,fontWeightStrong:r,textColor3:i}=e;return{textColor:t,fontSize:n,fontWeightStrong:r,"mono-3":`#5c6370`,"hue-1":`#56b6c2`,"hue-2":`#61aeee`,"hue-3":`#c678dd`,"hue-4":`#98c379`,"hue-5":`#e06c75`,"hue-5-2":`#be5046`,"hue-6":`#d19a66`,"hue-6-2":`#e6c07b`,lineNumberTextColor:i}}};function xa(e){let{fontWeight:t,textColor1:n,textColor2:r,textColorDisabled:i,dividerColor:a,fontSize:o}=e;return{titleFontSize:o,titleFontWeight:t,dividerColor:a,titleTextColor:n,titleTextColorDisabled:i,fontSize:o,textColor:r,arrowColor:r,arrowColorDisabled:i,itemMargin:`16px 0 0 0`,titlePadding:`16px 0 0 0`}}var Sa={name:`Collapse`,common:P,self:xa},Ca={name:`Collapse`,common:q,self:xa};function wa(e){let{cubicBezierEaseInOut:t}=e;return{bezier:t}}var Ta={name:`CollapseTransition`,common:q,self:wa};function Ea(e){let{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:o,heightSmall:s,heightMedium:c,heightLarge:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,dividerColor:p}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${o}`,heightSmall:s,heightMedium:c,heightLarge:l,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,dividerColor:p}}F({name:`ColorPicker`,common:P,peers:{Input:Gi,Button:Z},self:Ea});var Da={name:`ColorPicker`,common:q,peers:{Input:X,Button:Q},self:Ea},Oa=L({name:`ConfigProvider`,alias:[`App`],props:{abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:`div`},hljs:Object,katex:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,preflightStyleDisabled:Boolean,styleMountTarget:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(Ie(`config-provider`,"`as` is deprecated, please use `tag` instead."),!0),default:void 0}},setup(e){let t=x(ne,null),n=N(()=>{let{theme:n}=e;if(n===null)return;let r=t?.mergedThemeRef.value;return n===void 0?r:r===void 0?n:Object.assign({},r,n)}),r=N(()=>{let{themeOverrides:n}=e;if(n!==null){if(n===void 0)return t?.mergedThemeOverridesRef.value;{let e=t?.mergedThemeOverridesRef.value;return e===void 0?n:ae({},e,n)}}}),i=ur(()=>{let{namespace:n}=e;return n===void 0?t?.mergedNamespaceRef.value:n}),a=ur(()=>{let{bordered:n}=e;return n===void 0?t?.mergedBorderedRef.value:n}),o=N(()=>{let{icons:n}=e;return n===void 0?t?.mergedIconsRef.value:n}),s=N(()=>{let{componentOptions:n}=e;return n===void 0?t?.mergedComponentPropsRef.value:n}),c=N(()=>{let{clsPrefix:n}=e;return n===void 0?t?t.mergedClsPrefixRef.value:`n`:n}),l=N(()=>{var n;let{rtl:r}=e;if(r===void 0)return t?.mergedRtlRef.value;let i={};for(let e of r)i[e.name]=le(e),(n=e.peers)==null||n.forEach(e=>{e.name in i||(i[e.name]=le(e))});return i}),u=N(()=>e.breakpoints||t?.mergedBreakpointsRef.value),d=e.inlineThemeDisabled||t?.inlineThemeDisabled,f=e.preflightStyleDisabled||t?.preflightStyleDisabled,p=e.styleMountTarget||t?.styleMountTarget;return Le(ne,{mergedThemeHashRef:N(()=>{let{value:e}=n,{value:t}=r,i=t&&Object.keys(t).length!==0,a=e?.name;return a?i?`${a}-${ue(JSON.stringify(r.value))}`:a:i?ue(JSON.stringify(r.value)):``}),mergedBreakpointsRef:u,mergedRtlRef:l,mergedIconsRef:o,mergedComponentPropsRef:s,mergedBorderedRef:a,mergedNamespaceRef:i,mergedClsPrefixRef:c,mergedLocaleRef:N(()=>{let{locale:n}=e;if(n!==null)return n===void 0?t?.mergedLocaleRef.value:n}),mergedDateLocaleRef:N(()=>{let{dateLocale:n}=e;if(n!==null)return n===void 0?t?.mergedDateLocaleRef.value:n}),mergedHljsRef:N(()=>{let{hljs:n}=e;return n===void 0?t?.mergedHljsRef.value:n}),mergedKatexRef:N(()=>{let{katex:n}=e;return n===void 0?t?.mergedKatexRef.value:n}),mergedThemeRef:n,mergedThemeOverridesRef:r,inlineThemeDisabled:d||!1,preflightStyleDisabled:f||!1,styleMountTarget:p}),{mergedClsPrefix:c,mergedBordered:a,mergedNamespace:i,mergedTheme:n,mergedThemeOverrides:r}},render(){var e,t;return this.abstract?(t=this.$slots).default?.call(t):h(this.as||this.tag,{class:`${this.mergedClsPrefix||`n`}-config-provider`},(e=this.$slots).default?.call(e))}}),ka={name:`Popselect`,common:q,peers:{Popover:Di,InternalSelectMenu:Ci}};function Aa(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var ja=F({name:`Popselect`,common:P,peers:{Popover:Ei,InternalSelectMenu:Si},self:Aa});function Ma(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var Na=F({name:`Select`,common:P,peers:{InternalSelection:Ni,InternalSelectMenu:Si},self:Ma}),Pa={name:`Select`,common:q,peers:{InternalSelection:ji,InternalSelectMenu:Ci},self:Ma},Fa={itemPaddingSmall:`0 4px`,itemMarginSmall:`0 0 0 8px`,itemMarginSmallRtl:`0 8px 0 0`,itemPaddingMedium:`0 4px`,itemMarginMedium:`0 0 0 8px`,itemMarginMediumRtl:`0 8px 0 0`,itemPaddingLarge:`0 4px`,itemMarginLarge:`0 0 0 8px`,itemMarginLargeRtl:`0 8px 0 0`,buttonIconSizeSmall:`14px`,buttonIconSizeMedium:`16px`,buttonIconSizeLarge:`18px`,inputWidthSmall:`60px`,selectWidthSmall:`unset`,inputMarginSmall:`0 0 0 8px`,inputMarginSmallRtl:`0 8px 0 0`,selectMarginSmall:`0 0 0 8px`,prefixMarginSmall:`0 8px 0 0`,suffixMarginSmall:`0 0 0 8px`,inputWidthMedium:`60px`,selectWidthMedium:`unset`,inputMarginMedium:`0 0 0 8px`,inputMarginMediumRtl:`0 8px 0 0`,selectMarginMedium:`0 0 0 8px`,prefixMarginMedium:`0 8px 0 0`,suffixMarginMedium:`0 0 0 8px`,inputWidthLarge:`60px`,selectWidthLarge:`unset`,inputMarginLarge:`0 0 0 8px`,inputMarginLargeRtl:`0 8px 0 0`,selectMarginLarge:`0 0 0 8px`,prefixMarginLarge:`0 8px 0 0`,suffixMarginLarge:`0 0 0 8px`};function Ia(e){let{textColor2:t,primaryColor:n,primaryColorHover:r,primaryColorPressed:i,inputColorDisabled:a,textColorDisabled:o,borderColor:s,borderRadius:c,fontSizeTiny:l,fontSizeSmall:u,fontSizeMedium:d,heightTiny:f,heightSmall:p,heightMedium:m}=e;return Object.assign(Object.assign({},Fa),{buttonColor:`#0000`,buttonColorHover:`#0000`,buttonColorPressed:`#0000`,buttonBorder:`1px solid ${s}`,buttonBorderHover:`1px solid ${s}`,buttonBorderPressed:`1px solid ${s}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:i,itemTextColorActive:n,itemTextColorDisabled:o,itemColor:`#0000`,itemColorHover:`#0000`,itemColorPressed:`#0000`,itemColorActive:`#0000`,itemColorActiveHover:`#0000`,itemColorDisabled:a,itemBorder:`1px solid #0000`,itemBorderHover:`1px solid #0000`,itemBorderPressed:`1px solid #0000`,itemBorderActive:`1px solid ${n}`,itemBorderDisabled:`1px solid ${s}`,itemBorderRadius:c,itemSizeSmall:f,itemSizeMedium:p,itemSizeLarge:m,itemFontSizeSmall:l,itemFontSizeMedium:u,itemFontSizeLarge:d,jumperFontSizeSmall:l,jumperFontSizeMedium:u,jumperFontSizeLarge:d,jumperTextColor:t,jumperTextColorDisabled:o})}var La=F({name:`Pagination`,common:P,peers:{Select:Na,Input:Gi,Popselect:ja},self:Ia}),Ra={name:`Pagination`,common:q,peers:{Select:Pa,Input:X,Popselect:ka},self(e){let{primaryColor:t,opacity3:n}=e,r=A(t,{alpha:Number(n)}),i=Ia(e);return i.itemBorderActive=`1px solid ${r}`,i.itemBorderDisabled=`1px solid #0000`,i}},za={padding:`4px 0`,optionIconSizeSmall:`14px`,optionIconSizeMedium:`16px`,optionIconSizeLarge:`16px`,optionIconSizeHuge:`18px`,optionSuffixWidthSmall:`14px`,optionSuffixWidthMedium:`14px`,optionSuffixWidthLarge:`16px`,optionSuffixWidthHuge:`16px`,optionIconSuffixWidthSmall:`32px`,optionIconSuffixWidthMedium:`32px`,optionIconSuffixWidthLarge:`36px`,optionIconSuffixWidthHuge:`36px`,optionPrefixWidthSmall:`14px`,optionPrefixWidthMedium:`14px`,optionPrefixWidthLarge:`16px`,optionPrefixWidthHuge:`16px`,optionIconPrefixWidthSmall:`36px`,optionIconPrefixWidthMedium:`36px`,optionIconPrefixWidthLarge:`40px`,optionIconPrefixWidthHuge:`40px`};function Ba(e){let{primaryColor:t,textColor2:n,dividerColor:r,hoverColor:i,popoverColor:a,invertedColor:o,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,heightSmall:f,heightMedium:p,heightLarge:m,heightHuge:h,textColor3:g,opacityDisabled:_}=e;return Object.assign(Object.assign({},za),{optionHeightSmall:f,optionHeightMedium:p,optionHeightLarge:m,optionHeightHuge:h,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,optionTextColor:n,optionTextColorHover:n,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:r,suffixColor:n,prefixColor:n,optionColorHover:i,optionColorActive:A(t,{alpha:.1}),groupHeaderTextColor:g,optionTextColorInverted:`#BBB`,optionTextColorHoverInverted:`#FFF`,optionTextColorActiveInverted:`#FFF`,optionTextColorChildActiveInverted:`#FFF`,colorInverted:o,dividerColorInverted:`#BBB`,suffixColorInverted:`#BBB`,prefixColorInverted:`#BBB`,optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:`#AAA`,optionOpacityDisabled:_})}var Va=F({name:`Dropdown`,common:P,peers:{Popover:Ei},self:Ba}),Ha={name:`Dropdown`,common:q,peers:{Popover:Di},self(e){let{primaryColorSuppl:t,primaryColor:n,popoverColor:r}=e,i=Ba(e);return i.colorInverted=r,i.optionColorActive=A(n,{alpha:.15}),i.optionColorActiveInverted=t,i.optionColorHoverInverted=t,i}},Ua={padding:`8px 14px`},Wa={name:`Tooltip`,common:q,peers:{Popover:Di},self(e){let{borderRadius:t,boxShadow2:n,popoverColor:r,textColor2:i}=e;return Object.assign(Object.assign({},Ua),{borderRadius:t,boxShadow:n,color:r,textColor:i})}};function Ga(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Ua),{borderRadius:t,boxShadow:n,color:j(r,`rgba(0, 0, 0, .85)`),textColor:r})}var Ka=F({name:`Tooltip`,common:P,peers:{Popover:Ei},self:Ga}),qa={name:`Ellipsis`,common:q,peers:{Tooltip:Wa}},Ja=F({name:`Ellipsis`,common:P,peers:{Tooltip:Ka}}),Ya={radioSizeSmall:`14px`,radioSizeMedium:`16px`,radioSizeLarge:`18px`,labelPadding:`0 8px`,labelFontWeight:`400`},Xa={name:`Radio`,common:q,self(e){let{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:i,inputColorDisabled:a,textColor2:o,opacityDisabled:s,borderRadius:c,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,heightSmall:f,heightMedium:p,heightLarge:m,lineHeight:h}=e;return Object.assign(Object.assign({},Ya),{labelLineHeight:h,buttonHeightSmall:f,buttonHeightMedium:p,buttonHeightLarge:m,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:`#0000`,colorDisabled:a,colorActive:`#0000`,textColor:o,textColorDisabled:i,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:n,buttonColor:`#0000`,buttonColorActive:n,buttonTextColor:o,buttonTextColorActive:r,buttonTextColorHover:n,opacityDisabled:s,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${n}`,buttonBoxShadow:`inset 0 0 0 1px #0000`,buttonBorderRadius:c})}};function Za(e){let{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:i,inputColorDisabled:a,textColor2:o,opacityDisabled:s,borderRadius:c,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,heightSmall:f,heightMedium:p,heightLarge:m,lineHeight:h}=e;return Object.assign(Object.assign({},Ya),{labelLineHeight:h,buttonHeightSmall:f,buttonHeightMedium:p,buttonHeightLarge:m,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:d,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:a,colorActive:`#0000`,textColor:o,textColorDisabled:i,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:o,buttonTextColorActive:n,buttonTextColorHover:n,opacityDisabled:s,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${A(n,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px #0000`,buttonBoxShadow:`inset 0 0 0 1px #0000`,buttonBorderRadius:c})}var Qa={name:`Radio`,common:P,self:Za},$a={thPaddingSmall:`8px`,thPaddingMedium:`12px`,thPaddingLarge:`12px`,tdPaddingSmall:`8px`,tdPaddingMedium:`12px`,tdPaddingLarge:`12px`,sorterSize:`15px`,resizableContainerSize:`8px`,resizableSize:`2px`,filterSize:`15px`,paginationMargin:`12px 0 0 0`,emptyPadding:`48px 0`,actionPadding:`8px 12px`,actionButtonMargin:`0 8px 0 0`};function eo(e){let{cardColor:t,modalColor:n,popoverColor:r,textColor2:i,textColor1:a,tableHeaderColor:o,tableColorHover:s,iconColor:c,primaryColor:l,fontWeightStrong:u,borderRadius:d,lineHeight:f,fontSizeSmall:p,fontSizeMedium:m,fontSizeLarge:h,dividerColor:g,heightSmall:_,opacityDisabled:v,tableColorStriped:y}=e;return Object.assign(Object.assign({},$a),{actionDividerColor:g,lineHeight:f,borderRadius:d,fontSizeSmall:p,fontSizeMedium:m,fontSizeLarge:h,borderColor:j(t,g),tdColorHover:j(t,s),tdColorSorting:j(t,s),tdColorStriped:j(t,y),thColor:j(t,o),thColorHover:j(j(t,o),s),thColorSorting:j(j(t,o),s),tdColor:t,tdTextColor:i,thTextColor:a,thFontWeight:u,thButtonColorHover:s,thIconColor:c,thIconColorActive:l,borderColorModal:j(n,g),tdColorHoverModal:j(n,s),tdColorSortingModal:j(n,s),tdColorStripedModal:j(n,y),thColorModal:j(n,o),thColorHoverModal:j(j(n,o),s),thColorSortingModal:j(j(n,o),s),tdColorModal:n,borderColorPopover:j(r,g),tdColorHoverPopover:j(r,s),tdColorSortingPopover:j(r,s),tdColorStripedPopover:j(r,y),thColorPopover:j(r,o),thColorHoverPopover:j(j(r,o),s),thColorSortingPopover:j(j(r,o),s),tdColorPopover:r,boxShadowBefore:`inset -12px 0 8px -12px rgba(0, 0, 0, .18)`,boxShadowAfter:`inset 12px 0 8px -12px rgba(0, 0, 0, .18)`,loadingColor:l,loadingSize:_,opacityLoading:v})}F({name:`DataTable`,common:P,peers:{Button:Z,Checkbox:ga,Radio:Qa,Pagination:La,Scrollbar:B,Empty:vi,Popover:Ei,Ellipsis:Ja,Dropdown:Va},self:eo});var to={name:`DataTable`,common:q,peers:{Button:Q,Checkbox:_a,Radio:Xa,Pagination:Ra,Scrollbar:J,Empty:yi,Popover:Di,Ellipsis:qa,Dropdown:Ha},self(e){let t=eo(e);return t.boxShadowAfter=`inset 12px 0 8px -12px rgba(0, 0, 0, .36)`,t.boxShadowBefore=`inset -12px 0 8px -12px rgba(0, 0, 0, .36)`,t}};function no(e){let{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:o}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:o}}var ro={name:`Icon`,common:q,self:no},io={itemFontSize:`12px`,itemHeight:`36px`,itemWidth:`52px`,panelActionPadding:`8px 0`};function ao(e){let{popoverColor:t,textColor2:n,primaryColor:r,hoverColor:i,dividerColor:a,opacityDisabled:o,boxShadow2:s,borderRadius:c,iconColor:l,iconColorDisabled:u}=e;return Object.assign(Object.assign({},io),{panelColor:t,panelBoxShadow:s,panelDividerColor:a,itemTextColor:n,itemTextColorActive:r,itemColorHover:i,itemOpacityDisabled:o,itemBorderRadius:c,borderRadius:c,iconColor:l,iconColorDisabled:u})}var oo=F({name:`TimePicker`,common:P,peers:{Scrollbar:B,Button:Z,Input:Gi},self:ao}),so={name:`TimePicker`,common:q,peers:{Scrollbar:J,Button:Q,Input:X},self:ao},co={itemSize:`24px`,itemCellWidth:`38px`,itemCellHeight:`32px`,scrollItemWidth:`80px`,scrollItemHeight:`40px`,panelExtraFooterPadding:`8px 12px`,panelActionPadding:`8px 12px`,calendarTitlePadding:`0`,calendarTitleHeight:`28px`,arrowSize:`14px`,panelHeaderPadding:`8px 12px`,calendarDaysHeight:`32px`,calendarTitleGridTempateColumns:`28px 28px 1fr 28px 28px`,calendarLeftPaddingDate:`6px 12px 4px 12px`,calendarLeftPaddingDatetime:`4px 12px`,calendarLeftPaddingDaterange:`6px 12px 4px 12px`,calendarLeftPaddingDatetimerange:`4px 12px`,calendarLeftPaddingMonth:`0`,calendarLeftPaddingYear:`0`,calendarLeftPaddingQuarter:`0`,calendarLeftPaddingMonthrange:`0`,calendarLeftPaddingQuarterrange:`0`,calendarLeftPaddingYearrange:`0`,calendarLeftPaddingWeek:`6px 12px 4px 12px`,calendarRightPaddingDate:`6px 12px 4px 12px`,calendarRightPaddingDatetime:`4px 12px`,calendarRightPaddingDaterange:`6px 12px 4px 12px`,calendarRightPaddingDatetimerange:`4px 12px`,calendarRightPaddingMonth:`0`,calendarRightPaddingYear:`0`,calendarRightPaddingQuarter:`0`,calendarRightPaddingMonthrange:`0`,calendarRightPaddingQuarterrange:`0`,calendarRightPaddingYearrange:`0`,calendarRightPaddingWeek:`0`};function lo(e){let{hoverColor:t,fontSize:n,textColor2:r,textColorDisabled:i,popoverColor:a,primaryColor:o,borderRadiusSmall:s,iconColor:c,iconColorDisabled:l,textColor1:u,dividerColor:d,boxShadow2:f,borderRadius:p,fontWeightStrong:m}=e;return Object.assign(Object.assign({},co),{itemFontSize:n,calendarDaysFontSize:n,calendarTitleFontSize:n,itemTextColor:r,itemTextColorDisabled:i,itemTextColorActive:a,itemTextColorCurrent:o,itemColorIncluded:A(o,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:o,itemBorderRadius:s,panelColor:a,panelTextColor:r,arrowColor:c,calendarTitleTextColor:u,calendarTitleColorHover:t,calendarDaysTextColor:r,panelHeaderDividerColor:d,calendarDaysDividerColor:d,calendarDividerColor:d,panelActionDividerColor:d,panelBoxShadow:f,panelBorderRadius:p,calendarTitleFontWeight:m,scrollItemBorderRadius:p,iconColor:c,iconColorDisabled:l})}var uo=F({name:`DatePicker`,common:P,peers:{Input:Gi,Button:Z,TimePicker:oo,Scrollbar:B},self:lo}),fo={name:`DatePicker`,common:q,peers:{Input:X,Button:Q,TimePicker:so,Scrollbar:J},self(e){let{popoverColor:t,hoverColor:n,primaryColor:r}=e,i=lo(e);return i.itemColorDisabled=j(t,n),i.itemColorIncluded=A(r,{alpha:.15}),i.itemColorHover=j(t,n),i}},po={thPaddingBorderedSmall:`8px 12px`,thPaddingBorderedMedium:`12px 16px`,thPaddingBorderedLarge:`16px 24px`,thPaddingSmall:`0`,thPaddingMedium:`0`,thPaddingLarge:`0`,tdPaddingBorderedSmall:`8px 12px`,tdPaddingBorderedMedium:`12px 16px`,tdPaddingBorderedLarge:`16px 24px`,tdPaddingSmall:`0 0 8px 0`,tdPaddingMedium:`0 0 12px 0`,tdPaddingLarge:`0 0 16px 0`};function mo(e){let{tableHeaderColor:t,textColor2:n,textColor1:r,cardColor:i,modalColor:a,popoverColor:o,dividerColor:s,borderRadius:c,fontWeightStrong:l,lineHeight:u,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:p}=e;return Object.assign(Object.assign({},po),{lineHeight:u,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:p,titleTextColor:r,thColor:j(i,t),thColorModal:j(a,t),thColorPopover:j(o,t),thTextColor:r,thFontWeight:l,tdTextColor:n,tdColor:i,tdColorModal:a,tdColorPopover:o,borderColor:j(i,s),borderColorModal:j(a,s),borderColorPopover:j(o,s),borderRadius:c})}var ho={name:`Descriptions`,common:q,self:mo},go={titleFontSize:`18px`,padding:`16px 28px 20px 28px`,iconSize:`28px`,actionSpace:`12px`,contentMargin:`8px 0 16px 0`,iconMargin:`0 4px 0 0`,iconMarginIconTop:`4px 0 8px 0`,closeSize:`22px`,closeIconSize:`18px`,closeMargin:`20px 26px 0 0`,closeMarginIconTop:`10px 16px 0 0`};function _o(e){let{textColor1:t,textColor2:n,modalColor:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,infoColor:l,successColor:u,warningColor:d,errorColor:f,primaryColor:p,dividerColor:m,borderRadius:h,fontWeightStrong:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},go),{fontSize:v,lineHeight:_,border:`1px solid ${m}`,titleTextColor:t,textColor:n,color:r,closeColorHover:s,closeColorPressed:c,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeBorderRadius:h,iconColor:p,iconColorInfo:l,iconColorSuccess:u,iconColorWarning:d,iconColorError:f,borderRadius:h,titleFontWeight:g})}var vo=F({name:`Dialog`,common:P,peers:{Button:Z},self:_o}),yo={name:`Dialog`,common:q,peers:{Button:Q},self:_o};function bo(e){let{modalColor:t,textColor2:n,boxShadow3:r}=e;return{color:t,textColor:n,boxShadow:r}}var xo=F({name:`Modal`,common:P,peers:{Scrollbar:B,Dialog:vo,Card:Qe},self:bo}),So={name:`Modal`,common:q,peers:{Scrollbar:J,Dialog:yo,Card:da},self:bo},Co={name:`LoadingBar`,common:q,self(e){let{primaryColor:t}=e;return{colorError:`red`,colorLoading:t,height:`2px`}}},wo=ie(`n-message-api`),To=ie(`n-message-provider`),Eo={margin:`0 0 8px 0`,padding:`10px 20px`,maxWidth:`720px`,minWidth:`420px`,iconMargin:`0 10px 0 0`,closeMargin:`0 0 0 10px`,closeSize:`20px`,closeIconSize:`16px`,iconSize:`20px`,fontSize:`14px`};function Do(e){let{textColor2:t,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,infoColor:a,successColor:o,errorColor:s,warningColor:c,popoverColor:l,boxShadow2:u,primaryColor:d,lineHeight:f,borderRadius:p,closeColorHover:m,closeColorPressed:h}=e;return Object.assign(Object.assign({},Eo),{closeBorderRadius:p,textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:l,colorInfo:l,colorSuccess:l,colorError:l,colorWarning:l,colorLoading:l,boxShadow:u,boxShadowInfo:u,boxShadowSuccess:u,boxShadowError:u,boxShadowWarning:u,boxShadowLoading:u,iconColor:t,iconColorInfo:a,iconColorSuccess:o,iconColorWarning:c,iconColorError:s,iconColorLoading:d,closeColorHover:m,closeColorPressed:h,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:i,closeColorHoverInfo:m,closeColorPressedInfo:h,closeIconColorInfo:n,closeIconColorHoverInfo:r,closeIconColorPressedInfo:i,closeColorHoverSuccess:m,closeColorPressedSuccess:h,closeIconColorSuccess:n,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:i,closeColorHoverError:m,closeColorPressedError:h,closeIconColorError:n,closeIconColorHoverError:r,closeIconColorPressedError:i,closeColorHoverWarning:m,closeColorPressedWarning:h,closeIconColorWarning:n,closeIconColorHoverWarning:r,closeIconColorPressedWarning:i,closeColorHoverLoading:m,closeColorPressedLoading:h,closeIconColorLoading:n,closeIconColorHoverLoading:r,closeIconColorPressedLoading:i,loadingColor:d,lineHeight:f,borderRadius:p,border:`0`})}var Oo={name:`Message`,common:P,self:Do},ko={name:`Message`,common:q,self:Do},Ao={icon:Function,type:{type:String,default:`info`},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,spinProps:Object,onClose:Function,onMouseenter:Function,onMouseleave:Function},jo=z([ke(`message-wrapper`,` margin: var(--n-margin); z-index: 0; transform-origin: top center; @@ -197,4 +197,4 @@ import{$ as e,$t as t,An as n,At as r,B as i,Cn as a,Dn as o,Dt as s,En as c,Fn right: 12px; justify-content: flex-end; align-items: flex-end; - `)])]),jo={info:()=>h(ei,null),success:()=>h(ti,null),warning:()=>h(ni,null),error:()=>h($r,null),default:()=>null},Mo=L({name:`Message`,props:Object.assign(Object.assign({},ko),{render:Function}),setup(e){let{inlineThemeDisabled:t,mergedRtlRef:n}=ee(e),{props:r,mergedClsPrefixRef:i}=x(wo),a=pe(`Message`,n,i),o=Ne(`Message`,`-message`,Ao,Do,r,i),s=N(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{padding:r,margin:i,maxWidth:a,iconMargin:s,closeMargin:c,closeSize:l,iconSize:u,fontSize:d,lineHeight:f,borderRadius:p,border:m,iconColorInfo:h,iconColorSuccess:g,iconColorWarning:_,iconColorError:v,iconColorLoading:y,closeIconSize:b,closeBorderRadius:x,[R(`textColor`,t)]:S,[R(`boxShadow`,t)]:C,[R(`color`,t)]:w,[R(`closeColorHover`,t)]:T,[R(`closeColorPressed`,t)]:E,[R(`closeIconColor`,t)]:D,[R(`closeIconColorPressed`,t)]:O,[R(`closeIconColorHover`,t)]:k}}=o.value;return{"--n-bezier":n,"--n-margin":i,"--n-padding":r,"--n-max-width":a,"--n-font-size":d,"--n-icon-margin":s,"--n-icon-size":u,"--n-close-icon-size":b,"--n-close-border-radius":x,"--n-close-size":l,"--n-close-margin":c,"--n-text-color":S,"--n-color":w,"--n-box-shadow":C,"--n-icon-color-info":h,"--n-icon-color-success":g,"--n-icon-color-warning":_,"--n-icon-color-error":v,"--n-icon-color-loading":y,"--n-close-color-hover":T,"--n-close-color-pressed":E,"--n-close-icon-color":D,"--n-close-icon-color-pressed":O,"--n-close-icon-color-hover":k,"--n-line-height":f,"--n-border-radius":p,"--n-border":m}}),c=t?d(`message`,N(()=>e.type[0]),s,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:a,messageProviderProps:r,handleClose(){var t;(t=e.onClose)==null||t.call(e)},cssVars:t?void 0:s,themeClass:c?.themeClass,onRender:c?.onRender,placement:r.placement}},render(){let{render:e,type:t,closable:n,content:r,mergedClsPrefix:i,cssVars:a,themeClass:o,onRender:s,icon:c,handleClose:l,showIcon:u}=this;s?.();let d;return h(`div`,{class:[`${i}-message-wrapper`,o],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith(`top`)?`flex-start`:`flex-end`},a]},e?e(this.$props):h(`div`,{class:[`${i}-message ${i}-message--${t}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(d=No(c,t,i,this.spinProps))&&u?h(`div`,{class:`${i}-message__icon ${i}-message__icon--${t}-type`},h(Xr,null,{default:()=>d})):null,h(`div`,{class:`${i}-message__content`},pr(r)),n?h(oi,{clsPrefix:i,class:`${i}-message__close`,onClick:l,absolute:!0}):null))}});function No(e,t,n,r){if(typeof e==`function`)return e();{let e=t===`loading`?h(di,Object.assign({clsPrefix:n,strokeWidth:24,scale:.85},r)):jo[t]();return e?h(Yr,{clsPrefix:n,key:t},{default:()=>e}):null}}var Po=L({name:`MessageEnvironment`,props:Object.assign(Object.assign({},ko),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let t=null,n=I(!0);te(()=>{r()});function r(){let{duration:n}=e;n&&(t=window.setTimeout(o,n))}function i(e){e.currentTarget===e.target&&t!==null&&(window.clearTimeout(t),t=null)}function a(e){e.currentTarget===e.target&&r()}function o(){let{onHide:r}=e;n.value=!1,t&&=(window.clearTimeout(t),null),r&&r()}function s(){let{onClose:t}=e;t&&t(),o()}function c(){let{onAfterLeave:t,onInternalAfterLeave:n,onAfterHide:r,internalKey:i}=e;t&&t(),n&&n(i),r&&r()}function l(){o()}return{show:n,hide:o,handleClose:s,handleAfterLeave:c,handleMouseleave:a,handleMouseenter:i,deactivate:l}},render(){return h(si,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(Mo,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,spinProps:this.spinProps,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Fo=L({name:`MessageProvider`,props:Object.assign(Object.assign({},Ne.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:`top`},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),setup(e){let{mergedClsPrefixRef:t}=ee(e),n=I([]),r=I({}),i={create(e,t){return a(e,Object.assign({type:`default`},t))},info(e,t){return a(e,Object.assign(Object.assign({},t),{type:`info`}))},success(e,t){return a(e,Object.assign(Object.assign({},t),{type:`success`}))},warning(e,t){return a(e,Object.assign(Object.assign({},t),{type:`warning`}))},error(e,t){return a(e,Object.assign(Object.assign({},t),{type:`error`}))},loading(e,t){return a(e,Object.assign(Object.assign({},t),{type:`loading`}))},destroyAll:s};Le(wo,{props:e,mergedClsPrefixRef:t}),Le(Co,i);function a(t,i){let a=lr(),o=Pe(Object.assign(Object.assign({},i),{content:t,key:a,destroy:()=>{var e;(e=r.value[a])==null||e.hide()}})),{max:s}=e;return s&&n.value.length>=s&&n.value.shift(),n.value.push(o),o}function o(e){n.value.splice(n.value.findIndex(t=>t.key===e),1),delete r.value[e]}function s(){Object.values(r.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,messageRefs:r,messageList:n,handleAfterLeave:o},i)},render(){var e;return h(_e,null,(e=this.$slots).default?.call(e),this.messageList.length?h(he,{to:this.to??`body`},h(`div`,{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:`message-container`,style:this.containerStyle},this.messageList.map(e=>h(Po,Object.assign({ref:t=>{t&&(this.messageRefs[e.key]=t)},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave},fr(e,[`destroy`],void 0),{duration:e.duration===void 0?this.duration:e.duration,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover,closable:e.closable===void 0?this.closable:e.closable}))))):null)}}),Io={closeMargin:`16px 12px`,closeSize:`20px`,closeIconSize:`16px`,width:`365px`,padding:`16px`,titleFontSize:`16px`,metaFontSize:`12px`,descriptionFontSize:`12px`};function Lo(e){let{textColor2:t,successColor:n,infoColor:r,warningColor:i,errorColor:a,popoverColor:o,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeColorHover:u,closeColorPressed:d,textColor1:f,textColor3:p,borderRadius:m,fontWeightStrong:h,boxShadow2:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},Io),{borderRadius:m,lineHeight:_,fontSize:v,headerFontWeight:h,iconColor:t,iconColorSuccess:n,iconColorInfo:r,iconColorWarning:i,iconColorError:a,color:o,textColor:t,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeBorderRadius:m,closeColorHover:u,closeColorPressed:d,headerTextColor:f,descriptionTextColor:p,actionTextColor:t,boxShadow:g})}F({name:`Notification`,common:P,peers:{Scrollbar:B},self:Lo});var Ro={name:`Notification`,common:q,peers:{Scrollbar:J},self:Lo};function zo(e){let{textColor1:t,dividerColor:n,fontWeightStrong:r}=e;return{textColor:t,color:n,fontWeight:r}}var Bo={name:`Divider`,common:q,self:zo};function Vo(e){let{modalColor:t,textColor1:n,textColor2:r,boxShadow3:i,lineHeight:a,fontWeightStrong:o,dividerColor:s,closeColorHover:c,closeColorPressed:l,closeIconColor:u,closeIconColorHover:d,closeIconColorPressed:f,borderRadius:p,primaryColorHover:m}=e;return{bodyPadding:`16px 24px`,borderRadius:p,headerPadding:`16px 24px`,footerPadding:`16px 24px`,color:t,textColor:r,titleTextColor:n,titleFontSize:`18px`,titleFontWeight:o,boxShadow:i,lineHeight:a,headerBorderBottom:`1px solid ${s}`,footerBorderTop:`1px solid ${s}`,closeIconColor:u,closeIconColorHover:d,closeIconColorPressed:f,closeSize:`22px`,closeIconSize:`18px`,closeColorHover:c,closeColorPressed:l,closeBorderRadius:p,resizableTriggerColorHover:m}}F({name:`Drawer`,common:P,peers:{Scrollbar:B},self:Vo});var Ho={name:`Drawer`,common:q,peers:{Scrollbar:J},self:Vo},Uo={actionMargin:`0 0 0 20px`,actionMarginRtl:`0 20px 0 0`},Wo={name:`DynamicInput`,common:q,peers:{Input:X,Button:Q},self(){return Uo}},Go={gapSmall:`4px 8px`,gapMedium:`8px 12px`,gapLarge:`12px 16px`},Ko={name:`Space`,self(){return Go}},qo={name:`DynamicTags`,common:q,peers:{Input:X,Button:Q,Tag:ki,Space:Ko},self(){return{inputWidth:`64px`}}},Jo={name:`Element`,common:q},Yo={gapSmall:`4px 8px`,gapMedium:`8px 12px`,gapLarge:`12px 16px`},Xo={name:`Flex`,self(){return Yo}},Zo={name:`ButtonGroup`,common:q},Qo={feedbackPadding:`4px 0 0 2px`,feedbackHeightSmall:`24px`,feedbackHeightMedium:`24px`,feedbackHeightLarge:`26px`,feedbackFontSizeSmall:`13px`,feedbackFontSizeMedium:`14px`,feedbackFontSizeLarge:`14px`,labelFontSizeLeftSmall:`14px`,labelFontSizeLeftMedium:`14px`,labelFontSizeLeftLarge:`15px`,labelFontSizeTopSmall:`13px`,labelFontSizeTopMedium:`14px`,labelFontSizeTopLarge:`14px`,labelHeightSmall:`24px`,labelHeightMedium:`26px`,labelHeightLarge:`28px`,labelPaddingVertical:`0 0 6px 2px`,labelPaddingHorizontal:`0 12px 0 0`,labelTextAlignVertical:`left`,labelTextAlignHorizontal:`right`,labelFontWeight:`400`};function $o(e){let{heightSmall:t,heightMedium:n,heightLarge:r,textColor1:i,errorColor:a,warningColor:o,lineHeight:s,textColor3:c}=e;return Object.assign(Object.assign({},Qo),{blankHeightSmall:t,blankHeightMedium:n,blankHeightLarge:r,lineHeight:s,labelTextColor:i,asteriskColor:a,feedbackTextColorError:a,feedbackTextColorWarning:o,feedbackTextColor:c})}var es={name:`Form`,common:P,self:$o},ts={name:`Form`,common:q,self:$o},ns={name:`GradientText`,common:q,self(e){let{primaryColor:t,successColor:n,warningColor:r,errorColor:i,infoColor:a,primaryColorSuppl:o,successColorSuppl:s,warningColorSuppl:c,errorColorSuppl:l,infoColorSuppl:u,fontWeightStrong:d}=e;return{fontWeight:d,rotate:`252deg`,colorStartPrimary:t,colorEndPrimary:o,colorStartInfo:a,colorEndInfo:u,colorStartWarning:r,colorEndWarning:c,colorStartError:i,colorEndError:l,colorStartSuccess:n,colorEndSuccess:s}}},rs={name:`InputNumber`,common:q,peers:{Button:Q,Input:X},self(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}};function is(){return{inputWidthSmall:`24px`,inputWidthMedium:`30px`,inputWidthLarge:`36px`,gapSmall:`8px`,gapMedium:`8px`,gapLarge:`8px`}}F({name:`InputOtp`,common:P,peers:{Input:Gi},self:is});var as={name:`InputOtp`,common:q,peers:{Input:X},self:is},os={name:`Layout`,common:q,peers:{Scrollbar:J},self(e){let{textColor2:t,bodyColor:n,popoverColor:r,cardColor:i,dividerColor:a,scrollbarColor:o,scrollbarColorHover:s}=e;return{textColor:t,textColorInverted:t,color:n,colorEmbedded:n,headerColor:i,headerColorInverted:i,footerColor:i,footerColorInverted:i,headerBorderColor:a,headerBorderColorInverted:a,footerBorderColor:a,footerBorderColorInverted:a,siderBorderColor:a,siderBorderColorInverted:a,siderColor:i,siderColorInverted:i,siderToggleButtonBorder:`1px solid transparent`,siderToggleButtonColor:r,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:j(n,o),siderToggleBarColorHover:j(n,s),__invertScrollbar:`false`}}},ss={name:`Row`,common:q};function cs(e){let{textColor2:t,cardColor:n,modalColor:r,popoverColor:i,dividerColor:a,borderRadius:o,fontSize:s,hoverColor:c}=e;return{textColor:t,color:n,colorHover:c,colorModal:r,colorHoverModal:j(r,c),colorPopover:i,colorHoverPopover:j(i,c),borderColor:a,borderColorModal:j(r,a),borderColorPopover:j(i,a),borderRadius:o,fontSize:s}}var ls={name:`List`,common:q,self:cs},us={name:`Log`,common:q,peers:{Scrollbar:J,Code:ba},self(e){let{textColor2:t,inputColor:n,fontSize:r,primaryColor:i}=e;return{loaderFontSize:r,loaderTextColor:t,loaderColor:n,loaderBorder:`1px solid #0000`,loadingColor:i}}},ds={name:`Mention`,common:q,peers:{InternalSelectMenu:Ci,Input:X},self(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}};function fs(e,t,n,r){return{itemColorHoverInverted:`#0000`,itemColorActiveInverted:t,itemColorActiveHoverInverted:t,itemColorActiveCollapsedInverted:t,itemTextColorInverted:e,itemTextColorHoverInverted:n,itemTextColorChildActiveInverted:n,itemTextColorChildActiveHoverInverted:n,itemTextColorActiveInverted:n,itemTextColorActiveHoverInverted:n,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:n,itemTextColorChildActiveHorizontalInverted:n,itemTextColorChildActiveHoverHorizontalInverted:n,itemTextColorActiveHorizontalInverted:n,itemTextColorActiveHoverHorizontalInverted:n,itemIconColorInverted:e,itemIconColorHoverInverted:n,itemIconColorActiveInverted:n,itemIconColorActiveHoverInverted:n,itemIconColorChildActiveInverted:n,itemIconColorChildActiveHoverInverted:n,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:n,itemIconColorActiveHorizontalInverted:n,itemIconColorActiveHoverHorizontalInverted:n,itemIconColorChildActiveHorizontalInverted:n,itemIconColorChildActiveHoverHorizontalInverted:n,arrowColorInverted:e,arrowColorHoverInverted:n,arrowColorActiveInverted:n,arrowColorActiveHoverInverted:n,arrowColorChildActiveInverted:n,arrowColorChildActiveHoverInverted:n,groupTextColorInverted:r}}function ps(e){let{borderRadius:t,textColor3:n,primaryColor:r,textColor2:i,textColor1:a,fontSize:o,dividerColor:s,hoverColor:c,primaryColorHover:l}=e;return Object.assign({borderRadius:t,color:`#0000`,groupTextColor:n,itemColorHover:c,itemColorActive:A(r,{alpha:.1}),itemColorActiveHover:A(r,{alpha:.1}),itemColorActiveCollapsed:A(r,{alpha:.1}),itemTextColor:i,itemTextColorHover:i,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorChildActiveHover:r,itemTextColorHorizontal:i,itemTextColorHoverHorizontal:l,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemTextColorChildActiveHoverHorizontal:r,itemIconColor:a,itemIconColorHover:a,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorChildActiveHover:r,itemIconColorCollapsed:a,itemIconColorHorizontal:a,itemIconColorHoverHorizontal:l,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemIconColorChildActiveHoverHorizontal:r,itemHeight:`42px`,arrowColor:i,arrowColorHover:i,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,arrowColorChildActiveHover:r,colorInverted:`#0000`,borderColorHorizontal:`#0000`,fontSize:o,dividerColor:s},fs(`#BBB`,r,`#FFF`,`#AAA`))}F({name:`Menu`,common:P,peers:{Tooltip:Ga,Dropdown:Ba},self:ps});var ms={name:`Menu`,common:q,peers:{Tooltip:Ua,Dropdown:Va},self(e){let{primaryColor:t,primaryColorSuppl:n}=e,r=ps(e);return r.itemColorActive=A(t,{alpha:.15}),r.itemColorActiveHover=A(t,{alpha:.15}),r.itemColorActiveCollapsed=A(t,{alpha:.15}),r.itemColorActiveInverted=n,r.itemColorActiveHoverInverted=n,r.itemColorActiveCollapsedInverted=n,r}},hs={titleFontSize:`18px`,backSize:`22px`};function gs(e){let{textColor1:t,textColor2:n,textColor3:r,fontSize:i,fontWeightStrong:a,primaryColorHover:o,primaryColorPressed:s}=e;return Object.assign(Object.assign({},hs),{titleFontWeight:a,fontSize:i,titleTextColor:t,backColor:n,backColorHover:o,backColorPressed:s,subtitleTextColor:r})}F({name:`PageHeader`,common:P,self:gs});var _s={name:`PageHeader`,common:q,self:gs},vs={iconSize:`22px`};function ys(e){let{fontSize:t,warningColor:n}=e;return Object.assign(Object.assign({},vs),{fontSize:t,iconColor:n})}F({name:`Popconfirm`,common:P,peers:{Button:Z,Popover:Ei},self:ys});var bs={name:`Popconfirm`,common:q,peers:{Button:Q,Popover:Di},self:ys};function xs(e){let{infoColor:t,successColor:n,warningColor:r,errorColor:i,textColor2:a,progressRailColor:o,fontSize:s,fontWeight:c}=e;return{fontSize:s,fontSizeCircle:`28px`,fontWeightCircle:c,railColor:o,railHeight:`8px`,iconSizeCircle:`36px`,iconSizeLine:`18px`,iconColor:t,iconColorInfo:t,iconColorSuccess:n,iconColorWarning:r,iconColorError:i,textColorCircle:a,textColorLineInner:`rgb(255, 255, 255)`,textColorLineOuter:a,fillColor:t,fillColorInfo:t,fillColorSuccess:n,fillColorWarning:r,fillColorError:i,lineBgProcessing:`linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)`}}var Ss={name:`Progress`,common:P,self:xs},Cs={name:`Progress`,common:q,self(e){let t=xs(e);return t.textColorLineInner=`rgb(0, 0, 0)`,t.lineBgProcessing=`linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)`,t}},ws={name:`Rate`,common:q,self(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:`#CCAA33`,itemSize:`20px`,sizeSmall:`16px`,sizeMedium:`20px`,sizeLarge:`24px`}}},Ts={titleFontSizeSmall:`26px`,titleFontSizeMedium:`32px`,titleFontSizeLarge:`40px`,titleFontSizeHuge:`48px`,fontSizeSmall:`14px`,fontSizeMedium:`14px`,fontSizeLarge:`15px`,fontSizeHuge:`16px`,iconSizeSmall:`64px`,iconSizeMedium:`80px`,iconSizeLarge:`100px`,iconSizeHuge:`125px`,iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};function Es(e){let{textColor2:t,textColor1:n,errorColor:r,successColor:i,infoColor:a,warningColor:o,lineHeight:s,fontWeightStrong:c}=e;return Object.assign(Object.assign({},Ts),{lineHeight:s,titleFontWeight:c,titleTextColor:n,textColor:t,iconColorError:r,iconColorSuccess:i,iconColorInfo:a,iconColorWarning:o})}var Ds={name:`Result`,common:q,self:Es},Os={railHeight:`4px`,railWidthVertical:`4px`,handleSize:`18px`,dotHeight:`8px`,dotWidth:`8px`,dotBorderRadius:`4px`},ks={name:`Slider`,common:q,self(e){let{railColor:t,modalColor:n,primaryColorSuppl:r,popoverColor:i,textColor2:a,cardColor:o,borderRadius:s,fontSize:c,opacityDisabled:l}=e;return Object.assign(Object.assign({},Os),{fontSize:c,markFontSize:c,railColor:t,railColorHover:t,fillColor:r,fillColorHover:r,opacityDisabled:l,handleColor:`#FFF`,dotColor:o,dotColorModal:n,dotColorPopover:i,handleBoxShadow:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowHover:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowActive:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowFocus:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,indicatorColor:i,indicatorBoxShadow:`0 2px 8px 0 rgba(0, 0, 0, 0.12)`,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${t}`,dotBorderActive:`2px solid ${r}`,dotBoxShadow:``})}};function As(e){let{opacityDisabled:t,heightTiny:n,heightSmall:r,heightMedium:i,heightLarge:a,heightHuge:o,primaryColor:s,fontSize:c}=e;return{fontSize:c,textColor:s,sizeTiny:n,sizeSmall:r,sizeMedium:i,sizeLarge:a,sizeHuge:o,color:s,opacitySpinning:t}}var js={name:`Spin`,common:P,self:As},Ms={name:`Spin`,common:q,self:As};function Ns(e){let{textColor2:t,textColor3:n,fontSize:r,fontWeight:i}=e;return{labelFontSize:r,labelFontWeight:i,valueFontWeight:i,valueFontSize:`24px`,labelTextColor:n,valuePrefixTextColor:t,valueSuffixTextColor:t,valueTextColor:t}}var Ps={name:`Statistic`,common:q,self:Ns},Fs={stepHeaderFontSizeSmall:`14px`,stepHeaderFontSizeMedium:`16px`,indicatorIndexFontSizeSmall:`14px`,indicatorIndexFontSizeMedium:`16px`,indicatorSizeSmall:`22px`,indicatorSizeMedium:`28px`,indicatorIconSizeSmall:`14px`,indicatorIconSizeMedium:`18px`};function Is(e){let{fontWeightStrong:t,baseColor:n,textColorDisabled:r,primaryColor:i,errorColor:a,textColor1:o,textColor2:s}=e;return Object.assign(Object.assign({},Fs),{stepHeaderFontWeight:t,indicatorTextColorProcess:n,indicatorTextColorWait:r,indicatorTextColorFinish:i,indicatorTextColorError:a,indicatorBorderColorProcess:i,indicatorBorderColorWait:r,indicatorBorderColorFinish:i,indicatorBorderColorError:a,indicatorColorProcess:i,indicatorColorWait:`#0000`,indicatorColorFinish:`#0000`,indicatorColorError:`#0000`,splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:i,splitorColorError:r,headerTextColorProcess:o,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:a,descriptionTextColorProcess:s,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:a})}var Ls={name:`Steps`,common:q,self:Is},Rs={buttonHeightSmall:`14px`,buttonHeightMedium:`18px`,buttonHeightLarge:`22px`,buttonWidthSmall:`14px`,buttonWidthMedium:`18px`,buttonWidthLarge:`22px`,buttonWidthPressedSmall:`20px`,buttonWidthPressedMedium:`24px`,buttonWidthPressedLarge:`28px`,railHeightSmall:`18px`,railHeightMedium:`22px`,railHeightLarge:`26px`,railWidthSmall:`32px`,railWidthMedium:`40px`,railWidthLarge:`48px`},zs={name:`Switch`,common:q,self(e){let{primaryColorSuppl:t,opacityDisabled:n,borderRadius:r,primaryColor:i,textColor2:a,baseColor:o}=e;return Object.assign(Object.assign({},Rs),{iconColor:o,textColor:a,loadingColor:t,opacityDisabled:n,railColor:`rgba(255, 255, 255, .20)`,railColorActive:t,buttonBoxShadow:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${A(i,{alpha:.3})}`})}},Bs={thPaddingSmall:`6px`,thPaddingMedium:`12px`,thPaddingLarge:`12px`,tdPaddingSmall:`6px`,tdPaddingMedium:`12px`,tdPaddingLarge:`12px`};function Vs(e){let{dividerColor:t,cardColor:n,modalColor:r,popoverColor:i,tableHeaderColor:a,tableColorStriped:o,textColor1:s,textColor2:c,borderRadius:l,fontWeightStrong:u,lineHeight:d,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m}=e;return Object.assign(Object.assign({},Bs),{fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m,lineHeight:d,borderRadius:l,borderColor:j(n,t),borderColorModal:j(r,t),borderColorPopover:j(i,t),tdColor:n,tdColorModal:r,tdColorPopover:i,tdColorStriped:j(n,o),tdColorStripedModal:j(r,o),tdColorStripedPopover:j(i,o),thColor:j(n,a),thColorModal:j(r,a),thColorPopover:j(i,a),thTextColor:s,tdTextColor:c,thFontWeight:u})}var Hs={name:`Table`,common:q,self:Vs},Us={tabFontSizeSmall:`14px`,tabFontSizeMedium:`14px`,tabFontSizeLarge:`16px`,tabGapSmallLine:`36px`,tabGapMediumLine:`36px`,tabGapLargeLine:`36px`,tabGapSmallLineVertical:`8px`,tabGapMediumLineVertical:`8px`,tabGapLargeLineVertical:`8px`,tabPaddingSmallLine:`6px 0`,tabPaddingMediumLine:`10px 0`,tabPaddingLargeLine:`14px 0`,tabPaddingVerticalSmallLine:`6px 12px`,tabPaddingVerticalMediumLine:`8px 16px`,tabPaddingVerticalLargeLine:`10px 20px`,tabGapSmallBar:`36px`,tabGapMediumBar:`36px`,tabGapLargeBar:`36px`,tabGapSmallBarVertical:`8px`,tabGapMediumBarVertical:`8px`,tabGapLargeBarVertical:`8px`,tabPaddingSmallBar:`4px 0`,tabPaddingMediumBar:`6px 0`,tabPaddingLargeBar:`10px 0`,tabPaddingVerticalSmallBar:`6px 12px`,tabPaddingVerticalMediumBar:`8px 16px`,tabPaddingVerticalLargeBar:`10px 20px`,tabGapSmallCard:`4px`,tabGapMediumCard:`4px`,tabGapLargeCard:`4px`,tabGapSmallCardVertical:`4px`,tabGapMediumCardVertical:`4px`,tabGapLargeCardVertical:`4px`,tabPaddingSmallCard:`8px 16px`,tabPaddingMediumCard:`10px 20px`,tabPaddingLargeCard:`12px 24px`,tabPaddingSmallSegment:`4px 0`,tabPaddingMediumSegment:`6px 0`,tabPaddingLargeSegment:`8px 0`,tabPaddingVerticalLargeSegment:`0 8px`,tabPaddingVerticalSmallCard:`8px 12px`,tabPaddingVerticalMediumCard:`10px 16px`,tabPaddingVerticalLargeCard:`12px 20px`,tabPaddingVerticalSmallSegment:`0 4px`,tabPaddingVerticalMediumSegment:`0 6px`,tabGapSmallSegment:`0`,tabGapMediumSegment:`0`,tabGapLargeSegment:`0`,tabGapSmallSegmentVertical:`0`,tabGapMediumSegmentVertical:`0`,tabGapLargeSegmentVertical:`0`,panePaddingSmall:`8px 0 0 0`,panePaddingMedium:`12px 0 0 0`,panePaddingLarge:`16px 0 0 0`,closeSize:`18px`,closeIconSize:`14px`};function Ws(e){let{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,tabColor:l,baseColor:u,dividerColor:d,fontWeight:f,textColor1:p,borderRadius:m,fontSize:h,fontWeightStrong:g}=e;return Object.assign(Object.assign({},Us),{colorSegment:l,tabFontSizeCard:h,tabTextColorLine:p,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:p,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:p,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:p,tabTextColorHoverCard:p,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,closeBorderRadius:m,tabColor:l,tabColorSegment:u,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:m,paneTextColor:t,fontWeightStrong:g})}var Gs={name:`Tabs`,common:P,self:Ws},Ks={name:`Tabs`,common:q,self(e){let t=Ws(e),{inputColor:n}=e;return t.colorSegment=n,t.tabColorSegment=n,t}};function qs(e){let{textColor1:t,textColor2:n,fontWeightStrong:r,fontSize:i}=e;return{fontSize:i,titleTextColor:t,textColor:n,titleFontWeight:r}}var Js={name:`Thing`,common:q,self:qs},Ys={titleMarginMedium:`0 0 6px 0`,titleMarginLarge:`-2px 0 6px 0`,titleFontSizeMedium:`14px`,titleFontSizeLarge:`16px`,iconSizeMedium:`14px`,iconSizeLarge:`14px`},Xs={name:`Timeline`,common:q,self(e){let{textColor3:t,infoColorSuppl:n,errorColorSuppl:r,successColorSuppl:i,warningColorSuppl:a,textColor1:o,textColor2:s,railColor:c,fontWeightStrong:l,fontSize:u}=e;return Object.assign(Object.assign({},Ys),{contentFontSize:u,titleFontWeight:l,circleBorder:`2px solid ${t}`,circleBorderInfo:`2px solid ${n}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${i}`,circleBorderWarning:`2px solid ${a}`,iconColor:t,iconColorInfo:n,iconColorError:r,iconColorSuccess:i,iconColorWarning:a,titleTextColor:o,contentTextColor:s,metaTextColor:t,lineColor:c})}},Zs={extraFontSizeSmall:`12px`,extraFontSizeMedium:`12px`,extraFontSizeLarge:`14px`,titleFontSizeSmall:`14px`,titleFontSizeMedium:`16px`,titleFontSizeLarge:`16px`,closeSize:`20px`,closeIconSize:`16px`,headerHeightSmall:`44px`,headerHeightMedium:`44px`,headerHeightLarge:`50px`},Qs={name:`Transfer`,common:q,peers:{Checkbox:_a,Scrollbar:J,Input:X,Empty:yi,Button:Q},self(e){let{fontWeight:t,fontSizeLarge:n,fontSizeMedium:r,fontSizeSmall:i,heightLarge:a,heightMedium:o,borderRadius:s,inputColor:c,tableHeaderColor:l,textColor1:u,textColorDisabled:d,textColor2:f,textColor3:p,hoverColor:m,closeColorHover:h,closeColorPressed:g,closeIconColor:_,closeIconColorHover:v,closeIconColorPressed:y,dividerColor:b}=e;return Object.assign(Object.assign({},Zs),{itemHeightSmall:o,itemHeightMedium:o,itemHeightLarge:a,fontSizeSmall:i,fontSizeMedium:r,fontSizeLarge:n,borderRadius:s,dividerColor:b,borderColor:`#0000`,listColor:c,headerColor:l,titleTextColor:u,titleTextColorDisabled:d,extraTextColor:p,extraTextColorDisabled:d,itemTextColor:f,itemTextColorDisabled:d,itemColorPending:m,titleFontWeight:t,closeColorHover:h,closeColorPressed:g,closeIconColor:_,closeIconColorHover:v,closeIconColorPressed:y})}};function $s(e){let{borderRadiusSmall:t,dividerColor:n,hoverColor:r,pressedColor:i,primaryColor:a,textColor3:o,textColor2:s,textColorDisabled:c,fontSize:l}=e;return{fontSize:l,lineHeight:`1.5`,nodeHeight:`30px`,nodeWrapperPadding:`3px 0`,nodeBorderRadius:t,nodeColorHover:r,nodeColorPressed:i,nodeColorActive:A(a,{alpha:.1}),arrowColor:o,nodeTextColor:s,nodeTextColorDisabled:c,loadingColor:a,dropMarkColor:a,lineColor:n}}F({name:`Tree`,common:P,peers:{Checkbox:ga,Scrollbar:B,Empty:vi},self:$s});var ec={name:`Tree`,common:q,peers:{Checkbox:_a,Scrollbar:J,Empty:yi},self(e){let{primaryColor:t}=e,n=$s(e);return n.nodeColorActive=A(t,{alpha:.15}),n}},tc={name:`TreeSelect`,common:q,peers:{Tree:ec,Empty:yi,InternalSelection:ji}},nc={headerFontSize1:`30px`,headerFontSize2:`22px`,headerFontSize3:`18px`,headerFontSize4:`16px`,headerFontSize5:`16px`,headerFontSize6:`16px`,headerMargin1:`28px 0 20px 0`,headerMargin2:`28px 0 20px 0`,headerMargin3:`28px 0 20px 0`,headerMargin4:`28px 0 18px 0`,headerMargin5:`28px 0 18px 0`,headerMargin6:`28px 0 18px 0`,headerPrefixWidth1:`16px`,headerPrefixWidth2:`16px`,headerPrefixWidth3:`12px`,headerPrefixWidth4:`12px`,headerPrefixWidth5:`12px`,headerPrefixWidth6:`12px`,headerBarWidth1:`4px`,headerBarWidth2:`4px`,headerBarWidth3:`3px`,headerBarWidth4:`3px`,headerBarWidth5:`3px`,headerBarWidth6:`3px`,pMargin:`16px 0 16px 0`,liMargin:`.25em 0 0 0`,olPadding:`0 0 0 2em`,ulPadding:`0 0 0 2em`};function rc(e){let{primaryColor:t,textColor2:n,borderColor:r,lineHeight:i,fontSize:a,borderRadiusSmall:o,dividerColor:s,fontWeightStrong:c,textColor1:l,textColor3:u,infoColor:d,warningColor:f,errorColor:p,successColor:m,codeColor:h}=e;return Object.assign(Object.assign({},nc),{aTextColor:t,blockquoteTextColor:n,blockquotePrefixColor:r,blockquoteLineHeight:i,blockquoteFontSize:a,codeBorderRadius:o,liTextColor:n,liLineHeight:i,liFontSize:a,hrColor:s,headerFontWeight:c,headerTextColor:l,pTextColor:n,pTextColor1Depth:l,pTextColor2Depth:n,pTextColor3Depth:u,pLineHeight:i,pFontSize:a,headerBarColor:t,headerBarColorPrimary:t,headerBarColorInfo:d,headerBarColorError:p,headerBarColorWarning:f,headerBarColorSuccess:m,textColor:n,textColor1Depth:l,textColor2Depth:n,textColor3Depth:u,textColorPrimary:t,textColorInfo:d,textColorSuccess:m,textColorWarning:f,textColorError:p,codeTextColor:n,codeColor:h,codeBorder:`1px solid #0000`})}var ic={name:`Typography`,common:P,self:rc},ac={name:`Typography`,common:q,self:rc};function oc(e){let{iconColor:t,primaryColor:n,errorColor:r,textColor2:i,successColor:a,opacityDisabled:o,actionColor:s,borderColor:c,hoverColor:l,lineHeight:u,borderRadius:d,fontSize:f}=e;return{fontSize:f,lineHeight:u,borderRadius:d,draggerColor:s,draggerBorder:`1px dashed ${c}`,draggerBorderHover:`1px dashed ${n}`,itemColorHover:l,itemColorHoverError:A(r,{alpha:.06}),itemTextColor:i,itemTextColorError:r,itemTextColorSuccess:a,itemIconColor:t,itemDisabledOpacity:o,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${c}`}}var sc=F({name:`Upload`,common:P,peers:{Button:Z,Progress:Ss},self:oc}),cc={name:`Upload`,common:q,peers:{Button:Q,Progress:Cs},self(e){let{errorColor:t}=e,n=oc(e);return n.itemColorHoverError=A(t,{alpha:.09}),n}},lc={name:`Watermark`,common:q,self(e){let{fontFamily:t}=e;return{fontFamily:t}}},uc={name:`FloatButton`,common:q,self(e){let{popoverColor:t,textColor2:n,buttonColor2Hover:r,buttonColor2Pressed:i,primaryColor:a,primaryColorHover:o,primaryColorPressed:s,baseColor:c,borderRadius:l}=e;return{color:t,textColor:n,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`,boxShadowHover:`0 2px 12px 0px rgba(0, 0, 0, .18)`,boxShadowPressed:`0 2px 12px 0px rgba(0, 0, 0, .18)`,colorHover:r,colorPressed:i,colorPrimary:a,colorPrimaryHover:o,colorPrimaryPressed:s,textColorPrimary:c,borderRadiusSquare:l}}};function dc(e){let{borderRadius:t,fontSizeMini:n,fontSizeTiny:r,fontSizeSmall:i,fontWeight:a,textColor2:o,cardColor:s,buttonColor2Hover:c}=e;return{activeColors:[`#9be9a8`,`#40c463`,`#30a14e`,`#216e39`],borderRadius:t,borderColor:s,textColor:o,mininumColor:c,fontWeight:a,loadingColorStart:`rgba(0, 0, 0, 0.06)`,loadingColorEnd:`rgba(0, 0, 0, 0.12)`,rectSizeSmall:`10px`,rectSizeMedium:`11px`,rectSizeLarge:`12px`,borderRadiusSmall:`2px`,borderRadiusMedium:`2px`,borderRadiusLarge:`2px`,xGapSmall:`2px`,xGapMedium:`3px`,xGapLarge:`3px`,yGapSmall:`2px`,yGapMedium:`3px`,yGapLarge:`3px`,fontSizeSmall:r,fontSizeMedium:n,fontSizeLarge:i}}F({name:`Heatmap`,common:P,self:dc});var fc={name:`Heatmap`,common:q,self(e){let t=dc(e);return Object.assign(Object.assign({},t),{activeColors:[`#0d4429`,`#006d32`,`#26a641`,`#39d353`],mininumColor:`rgba(255, 255, 255, 0.1)`,loadingColorStart:`rgba(255, 255, 255, 0.12)`,loadingColorEnd:`rgba(255, 255, 255, 0.18)`})}};function pc(e){let{primaryColor:t,baseColor:n}=e;return{color:t,iconColor:n}}var mc={name:`IconWrapper`,common:q,self:pc},hc={name:`Image`,common:q,peers:{Tooltip:Ua},self:e=>{let{textColor2:t}=e;return{toolbarIconColor:t,toolbarColor:`rgba(0, 0, 0, .35)`,toolbarBoxShadow:`none`,toolbarBorderRadius:`24px`}}},gc={extraFontSize:`12px`,width:`440px`},_c={name:`Transfer`,common:q,peers:{Checkbox:_a,Scrollbar:J,Input:X,Empty:yi,Button:Q},self(e){let{iconColorDisabled:t,iconColor:n,fontWeight:r,fontSizeLarge:i,fontSizeMedium:a,fontSizeSmall:o,heightLarge:s,heightMedium:c,heightSmall:l,borderRadius:u,inputColor:d,tableHeaderColor:f,textColor1:p,textColorDisabled:m,textColor2:h,hoverColor:g}=e;return Object.assign(Object.assign({},gc),{itemHeightSmall:l,itemHeightMedium:c,itemHeightLarge:s,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:i,borderRadius:u,borderColor:`#0000`,listColor:d,headerColor:f,titleTextColor:p,titleTextColorDisabled:m,extraTextColor:h,filterDividerColor:`#0000`,itemTextColor:h,itemTextColorDisabled:m,itemColorPending:g,titleFontWeight:r,iconColor:n,iconColorDisabled:t})}};function vc(){return{}}var yc={name:`dark`,common:q,Alert:Fi,Anchor:Vi,AutoComplete:Ji,Avatar:Zi,AvatarGroup:$i,BackTop:ta,Badge:na,Breadcrumb:aa,Button:Q,ButtonGroup:Zo,Calendar:ua,Card:da,Carousel:pa,Cascader:ya,Checkbox:_a,Code:ba,Collapse:Sa,CollapseTransition:wa,ColorPicker:Ea,DataTable:eo,DatePicker:uo,Descriptions:mo,Dialog:vo,Divider:Bo,Drawer:Ho,Dropdown:Va,DynamicInput:Wo,DynamicTags:qo,Element:Jo,Empty:yi,Ellipsis:Ka,Equation:{name:`Equation`,common:q,self:()=>({})},Flex:Xo,Form:ts,GradientText:ns,Heatmap:fc,Icon:no,IconWrapper:mc,Image:hc,Input:X,InputNumber:rs,InputOtp:as,LegacyTransfer:_c,Layout:os,List:ls,LoadingBar:So,Log:us,Menu:ms,Mention:ds,Message:Oo,Modal:xo,Notification:Ro,PageHeader:_s,Pagination:La,Popconfirm:bs,Popover:Di,Popselect:Oa,Progress:Cs,QrCode:{name:`QrCode`,common:q,self:e=>({borderRadius:e.borderRadius})},Radio:Ya,Rate:ws,Result:Ds,Row:ss,Scrollbar:J,Select:Na,Skeleton:{name:`Skeleton`,common:q,self(e){let{heightSmall:t,heightMedium:n,heightLarge:r,borderRadius:i}=e;return{color:`rgba(255, 255, 255, 0.12)`,colorEnd:`rgba(255, 255, 255, 0.18)`,borderRadius:i,heightSmall:t,heightMedium:n,heightLarge:r}}},Slider:ks,Space:Ko,Spin:Ms,Statistic:Ps,Steps:Ls,Switch:zs,Table:Hs,Tabs:Ks,Tag:ki,Thing:Js,TimePicker:oo,Timeline:Xs,Tooltip:Ua,Transfer:Qs,Tree:ec,TreeSelect:tc,Typography:ac,Upload:cc,Watermark:lc,Split:{name:`Split`,common:q},FloatButton:uc,FloatButtonGroup:{name:`FloatButtonGroup`,common:q,self(e){let{popoverColor:t,dividerColor:n,borderRadius:r}=e;return{color:t,buttonBorderColor:n,borderRadiusSquare:r,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`}}},Marquee:{name:`Marquee`,common:q,self:vc}},bc=sr(`auth`,()=>{let e=I(null),t=I(null),n=I(null),r=I(!1),i=I(null),a=null,o=0,s=!1,c=N(()=>!!e.value),l=N(()=>n.value?.username||``),u=N(()=>n.value?.roles||[]);function d(){e.value=localStorage.getItem(`accessToken`),t.value=localStorage.getItem(`refreshToken`)}function f(n,r){e.value=n,t.value=r||null,r?localStorage.setItem(`refreshToken`,r):localStorage.removeItem(`refreshToken`),localStorage.setItem(`accessToken`,n)}function p(){d(),s||=(window.addEventListener(`storage`,e=>{if(e.storageArea!==localStorage||e.key!==`accessToken`&&e.key!==null)return;let t=()=>{o++,d(),n.value=null,i.value=null,h()};a&&localStorage.getItem(`accessToken`)&&localStorage.getItem(`refreshToken`)?a.then(t,t):t()}),!0),h()}function m(){return e.value}async function h(){if(!e.value)return;let t=o;try{let r=await Sc().GetMe({});r.user&&t===o&&e.value&&(n.value=r.user,i.value=null)}catch(e){t===o&&(i.value=e instanceof Error?e.message:`Не удалось восстановить сессию`)}}async function g(e,t){r.value=!0,i.value=null;let a=++o;try{let r=await Be().Login({email:e,password:t});return r.accessToken&&a===o?(n.value=null,f(r.accessToken,r.refreshToken),await h(),!0):!1}catch(e){return i.value=e instanceof Error?e.message:`Login failed`,!1}finally{r.value=!1}}function _(n=e.value){if(a)return a;let r=o,i=t.value,s=async()=>{if(r!==o)return!1;if(d(),!e.value||!t.value)return await x(),!1;if(e.value!==n||t.value!==i)return!0;try{let e=await Be().Refresh({refreshToken:i||void 0});if(r!==o||localStorage.getItem(`refreshToken`)!==i)return!1;if(!e.accessToken||!e.refreshToken)throw Error(`Сервер не вернул токены сессии`);return f(e.accessToken,e.refreshToken),!0}catch(e){if(r!==o||localStorage.getItem(`refreshToken`)!==i)return!1;if(e instanceof Error&&e.message===`unauthorized`)return await x(),!1;throw e}};return a=(navigator.locks?navigator.locks.request(`evening-detective-auth-refresh`,s):s()).finally(()=>{a=null}),a}async function v(e,t,n,a){r.value=!0,i.value=null;try{return await Be(m).Signup({username:e,email:t,acceptTerms:n,acceptPrivacy:a}),!0}catch(e){return i.value=e instanceof Error?e.message:`Signup failed`,!1}finally{r.value=!1}}async function y(e){r.value=!0,i.value=null;try{return await Sc(()=>({"X-Password":e})).DeleteAccount({}),await x(),!0}catch(e){return i.value=e instanceof Error?e.message:`Account deletion failed`,!1}finally{r.value=!1}}async function b(e){r.value=!0,i.value=null;try{return await Be(m).RefreshPassword({email:e}),!0}catch(e){return i.value=e instanceof Error?e.message:`Password reset failed`,!1}finally{r.value=!1}}async function x(){o++,e.value=null,t.value=null,n.value=null,i.value=null,localStorage.removeItem(`refreshToken`),localStorage.removeItem(`accessToken`)}function S(e){return u.value.includes(e)}function C(e){return e.some(e=>u.value.includes(e))}return{accessToken:e,refreshToken:t,user:n,isLoading:r,error:i,isAuthenticated:c,username:l,userRoles:u,initFromStorage:p,getToken:m,login:g,signup:v,deleteAccount:y,refreshPassword:b,logout:x,fetchUser:h,refreshTokenAction:_,hasRole:S,hasAnyRole:C}});async function xc(e,t,n){let r=n();try{return await e()}catch(n){if(!(n instanceof Error)||n.message!==`unauthorized`||!await t(r))throw n;return e()}}function Sc(e){let t=bc();return Cc(t.refreshTokenAction,t.getToken,e)}function Cc(e,t,n){let r=De(t,n);return ve(n=>xc(()=>r(n),e,t))}function wc(e,t=5e3){let n=I(!0),r=null,i=()=>{n.value=!0,e(),r=window.setInterval(e,t)},a=()=>{n.value=!1,r&&=(clearInterval(r),null)};return te(i),re(a),{isActive:n,start:i,stop:a}}var Tc=sr(`devicePresence`,()=>{let e=me({}),t;function n(){let n=Symbol();return t=n,e.value={},{set(r){t===n&&(e.value=r)},clear(){t===n&&(t=void 0,e.value={})}}}return{context:e,claim:n}}),Ec=`evening-detective-device-ID`,Dc=/^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;function Oc(){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function kc(){let e=Oc();try{let t=localStorage.getItem(Ec);if(t&&Dc.test(t))return t;localStorage.setItem(Ec,e)}catch{}return e}function Ac(){let e=Sc(),t=Be(),n=Tc(),r=kc(),i=Oc(),a=!0,o=!1,s=!1,c=!1;async function l(){if(!(!a||s)){if(o){c=!0;return}o=!0,c=!1;try{(await(n.context.organizerGameID?e:t).DeviceHeartbeat({deviceID:r,connectionID:i,organizerGameID:n.context.organizerGameID,teamID:n.context.teamID,password:n.context.password,screenID:n.context.screenID,accessToken:n.context.accessToken})).enabled===!1&&(a=!1,d.stop())}catch{console.warn(`Не удалось обновить присутствие устройства; повтор по интервалу`),c=!1}finally{o=!1,c&&l()}}}function u(){document.visibilityState===`visible`&&l()}let d=wc(()=>void l(),2e4);Oe(()=>n.context,()=>void l()),te(()=>{document.addEventListener(`visibilitychange`,u),window.addEventListener(`online`,l)}),re(()=>{s=!0,document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`online`,l)})}var jc=L({__name:`App`,setup(e){return Ac(),(e,t)=>(f(),D(se(Da),{theme:se(yc)},{default:ye(()=>[y(se(Fo),null,{default:ye(()=>[y(se(Ae))]),_:1})]),_:1},8,[`theme`]))}}),Mc=`modulepreload`,Nc=function(e){return`/`+e},Pc={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Nc(t,n),t=s(t),t in Pc)return;Pc[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Mc,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Fc=Re({history:ce(`/`),routes:[{path:`/participation`,name:`participation`,component:()=>$(()=>import(`./ParticipationView-23fnBpOl.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))},{path:`/tickets/:token`,name:`ticket`,component:()=>$(()=>import(`./TicketView-DDSxhcrW.js`),__vite__mapDeps([15,1,7,4,8,16,14,17,18,19]))},{path:`/`,name:`home`,component:()=>$(()=>import(`./HomeView-DuQ_iIPq.js`),__vite__mapDeps([20,1,4,12,3,13,21]))},{path:`/login`,name:`login`,component:()=>$(()=>import(`./LoginView-BMrgeJuj.js`),__vite__mapDeps([22,1,23,2,3,4,5,6,24,10,25,26,7,8,27,28,29,30,9,11,12,13,31]))},{path:`/office`,name:`office`,component:()=>$(()=>import(`./OfficeView-B4No5Dce.js`),__vite__mapDeps([32,1,2,3,4,5,6,33,24,10,7,8,34,30,26,35,12,13,36]))},{path:`/user-agreement`,name:`user-agreement`,component:()=>$(()=>import(`./UserAgreementView-Br1XknrC.js`),__vite__mapDeps([37,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/privacy-policy`,name:`privacy-policy`,component:()=>$(()=>import(`./PrivacyPolicyView-d5uNdF7b.js`),__vite__mapDeps([43,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/consent`,name:`consent`,component:()=>$(()=>import(`./ConsentView-BGjtjcsI.js`),__vite__mapDeps([44,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/games`,name:`games`,component:()=>$(()=>import(`./GamesView-YyTca4Lb.js`),__vite__mapDeps([45,1,2,3,4,5,6,33,24,10,7,8,34,46,23,25,26,30,47,28,48,49,50,29,35,9,11,51,12,13,52,14,53]))},{path:`/screen`,name:`screen`,component:()=>$(()=>import(`./ScreenView-Dj3ogPPV.js`),__vite__mapDeps([54,1,2,3,4,5,6,7,8,47,23,24,10,25,26,28,48,34,49,16,12,13,55,14,56,57]))},{path:`/games/:id/results`,name:`game-results`,component:()=>$(()=>import(`./GameResultsView-PDteDzO7.js`),__vite__mapDeps([58,1,3,4,7,8,51,10,11,12,13,59]))},{path:`/games/:id`,name:`game`,component:()=>$(()=>import(`./GameView-r2HR0IkN.js`),__vite__mapDeps([60,1,2,3,4,5,6,24,10,33,7,8,34,26,27,23,28,29,47,25,48,49,50,30,61,35,9,11,51,62,16,63,12,13,52,55,14,56,64]))},{path:`/team-story/:id`,name:`team-story`,component:()=>$(()=>import(`./TeamStoryView-xaQBc946.js`),__vite__mapDeps([65,1,3,4,7,8,66,2,5,6,24,10,33,34,26,50,23,48,28,49,29,30,61,9,11,63,55,17,18,67,35,51,62,16,40,41,56,68]))},{path:`/scenarios`,name:`scenarios`,component:()=>$(()=>import(`./ScenariosView-BPOpC5IY.js`),__vite__mapDeps([69,1,2,3,4,5,6,33,24,10,7,8,34,50,23,26,48,28,49,29,30,51,11,63,12,13,52,70]))},{path:`/catalog`,name:`catalog`,component:()=>$(()=>import(`./CatalogView-B392_-A1.js`),__vite__mapDeps([71,1,3,4,62,26,8,12,13,72]))},{path:`/scenarios/:id/editor`,name:`scenario-editor`,component:()=>$(()=>import(`./ScenariosEditorView-BlEU9oVG.js`),__vite__mapDeps([73,1,2,3,4,5,6,33,24,10,7,8,34,47,23,25,26,28,48,49,50,29,30,66,61,9,11,63,55,17,18,67,35,51,12,13,52,74]))},{path:`/scenarios/:id`,name:`scenario`,component:()=>$(()=>import(`./ScenarioView-GTY1q8L_.js`),__vite__mapDeps([75,1,3,4,62,26,8,12,13,76]))},{path:`/tasks`,name:`tasks`,component:()=>$(()=>import(`./TasksView-DPRj8gyZ.js`),__vite__mapDeps([77,1,25,23,2,3,4,5,6,24,10,33,7,8,34,46,26,30,78,49,47,28,48,35,51,11,39,12,13,79]))},{path:`/users`,name:`users`,component:()=>$(()=>import(`./UsersView-K9_l6ZnM.js`),__vite__mapDeps([80,1,2,3,4,5,6,33,24,10,7,8,34,78,49,30,26,9,11,51,12,13,81]))},{path:`/reviews`,name:`reviews`,component:()=>$(()=>import(`./ReviewsView-BrBpPPEG.js`),__vite__mapDeps([82,1,2,3,4,5,6,7,8,51,10,11,62,26,12,13,83]))}]}),Ic=En(jc);Ic.use(qn()),bc().initFromStorage(),Ic.use(Fc),Ic.mount(`#app`);export{dr as $,Pi as A,ii as B,Ma as C,qi as D,Z as E,vi as F,Zr as G,ti as H,di as I,xr as J,Xr as K,ui as L,Oi as M,Ei as N,Gi as O,Si as P,fr as Q,si as R,Ga as S,ga as T,ei as U,ni as V,$r as W,hr as X,gr as Y,pr as Z,Co as _,xc as a,on as at,lo as b,ic as c,Sn as ct,js as d,ur as et,Ss as f,Uo as g,Go as h,Sc as i,ut as it,Ni as j,Ri as k,Gs as l,bn as lt,Yo as m,Tc as n,sr as nt,bc as o,_n as ot,es as p,Yr as q,wc as r,cr as rt,sc as s,Et as st,Fc as t,lr as tt,Rs as u,bo as v,Da as w,ao as x,_o as y,oi as z}; \ No newline at end of file + `)])]),Mo={info:()=>h(ei,null),success:()=>h(ti,null),warning:()=>h(ni,null),error:()=>h($r,null),default:()=>null},No=L({name:`Message`,props:Object.assign(Object.assign({},Ao),{render:Function}),setup(e){let{inlineThemeDisabled:t,mergedRtlRef:n}=ee(e),{props:r,mergedClsPrefixRef:i}=x(To),a=pe(`Message`,n,i),o=Ne(`Message`,`-message`,jo,Oo,r,i),s=N(()=>{let{type:t}=e,{common:{cubicBezierEaseInOut:n},self:{padding:r,margin:i,maxWidth:a,iconMargin:s,closeMargin:c,closeSize:l,iconSize:u,fontSize:d,lineHeight:f,borderRadius:p,border:m,iconColorInfo:h,iconColorSuccess:g,iconColorWarning:_,iconColorError:v,iconColorLoading:y,closeIconSize:b,closeBorderRadius:x,[R(`textColor`,t)]:S,[R(`boxShadow`,t)]:C,[R(`color`,t)]:w,[R(`closeColorHover`,t)]:T,[R(`closeColorPressed`,t)]:E,[R(`closeIconColor`,t)]:D,[R(`closeIconColorPressed`,t)]:O,[R(`closeIconColorHover`,t)]:k}}=o.value;return{"--n-bezier":n,"--n-margin":i,"--n-padding":r,"--n-max-width":a,"--n-font-size":d,"--n-icon-margin":s,"--n-icon-size":u,"--n-close-icon-size":b,"--n-close-border-radius":x,"--n-close-size":l,"--n-close-margin":c,"--n-text-color":S,"--n-color":w,"--n-box-shadow":C,"--n-icon-color-info":h,"--n-icon-color-success":g,"--n-icon-color-warning":_,"--n-icon-color-error":v,"--n-icon-color-loading":y,"--n-close-color-hover":T,"--n-close-color-pressed":E,"--n-close-icon-color":D,"--n-close-icon-color-pressed":O,"--n-close-icon-color-hover":k,"--n-line-height":f,"--n-border-radius":p,"--n-border":m}}),c=t?d(`message`,N(()=>e.type[0]),s,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:a,messageProviderProps:r,handleClose(){var t;(t=e.onClose)==null||t.call(e)},cssVars:t?void 0:s,themeClass:c?.themeClass,onRender:c?.onRender,placement:r.placement}},render(){let{render:e,type:t,closable:n,content:r,mergedClsPrefix:i,cssVars:a,themeClass:o,onRender:s,icon:c,handleClose:l,showIcon:u}=this;s?.();let d;return h(`div`,{class:[`${i}-message-wrapper`,o],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith(`top`)?`flex-start`:`flex-end`},a]},e?e(this.$props):h(`div`,{class:[`${i}-message ${i}-message--${t}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(d=Po(c,t,i,this.spinProps))&&u?h(`div`,{class:`${i}-message__icon ${i}-message__icon--${t}-type`},h(Xr,null,{default:()=>d})):null,h(`div`,{class:`${i}-message__content`},pr(r)),n?h(oi,{clsPrefix:i,class:`${i}-message__close`,onClick:l,absolute:!0}):null))}});function Po(e,t,n,r){if(typeof e==`function`)return e();{let e=t===`loading`?h(di,Object.assign({clsPrefix:n,strokeWidth:24,scale:.85},r)):Mo[t]();return e?h(Yr,{clsPrefix:n,key:t},{default:()=>e}):null}}var Fo=L({name:`MessageEnvironment`,props:Object.assign(Object.assign({},Ao),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let t=null,n=I(!0);te(()=>{r()});function r(){let{duration:n}=e;n&&(t=window.setTimeout(o,n))}function i(e){e.currentTarget===e.target&&t!==null&&(window.clearTimeout(t),t=null)}function a(e){e.currentTarget===e.target&&r()}function o(){let{onHide:r}=e;n.value=!1,t&&=(window.clearTimeout(t),null),r&&r()}function s(){let{onClose:t}=e;t&&t(),o()}function c(){let{onAfterLeave:t,onInternalAfterLeave:n,onAfterHide:r,internalKey:i}=e;t&&t(),n&&n(i),r&&r()}function l(){o()}return{show:n,hide:o,handleClose:s,handleAfterLeave:c,handleMouseleave:a,handleMouseenter:i,deactivate:l}},render(){return h(si,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(No,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,spinProps:this.spinProps,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Io=L({name:`MessageProvider`,props:Object.assign(Object.assign({},Ne.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:`top`},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),setup(e){let{mergedClsPrefixRef:t}=ee(e),n=I([]),r=I({}),i={create(e,t){return a(e,Object.assign({type:`default`},t))},info(e,t){return a(e,Object.assign(Object.assign({},t),{type:`info`}))},success(e,t){return a(e,Object.assign(Object.assign({},t),{type:`success`}))},warning(e,t){return a(e,Object.assign(Object.assign({},t),{type:`warning`}))},error(e,t){return a(e,Object.assign(Object.assign({},t),{type:`error`}))},loading(e,t){return a(e,Object.assign(Object.assign({},t),{type:`loading`}))},destroyAll:s};Le(To,{props:e,mergedClsPrefixRef:t}),Le(wo,i);function a(t,i){let a=lr(),o=Pe(Object.assign(Object.assign({},i),{content:t,key:a,destroy:()=>{var e;(e=r.value[a])==null||e.hide()}})),{max:s}=e;return s&&n.value.length>=s&&n.value.shift(),n.value.push(o),o}function o(e){n.value.splice(n.value.findIndex(t=>t.key===e),1),delete r.value[e]}function s(){Object.values(r.value).forEach(e=>{e.hide()})}return Object.assign({mergedClsPrefix:t,messageRefs:r,messageList:n,handleAfterLeave:o},i)},render(){var e;return h(_e,null,(e=this.$slots).default?.call(e),this.messageList.length?h(he,{to:this.to??`body`},h(`div`,{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:`message-container`,style:this.containerStyle},this.messageList.map(e=>h(Fo,Object.assign({ref:t=>{t&&(this.messageRefs[e.key]=t)},internalKey:e.key,onInternalAfterLeave:this.handleAfterLeave},fr(e,[`destroy`],void 0),{duration:e.duration===void 0?this.duration:e.duration,keepAliveOnHover:e.keepAliveOnHover===void 0?this.keepAliveOnHover:e.keepAliveOnHover,closable:e.closable===void 0?this.closable:e.closable}))))):null)}}),Lo={closeMargin:`16px 12px`,closeSize:`20px`,closeIconSize:`16px`,width:`365px`,padding:`16px`,titleFontSize:`16px`,metaFontSize:`12px`,descriptionFontSize:`12px`};function Ro(e){let{textColor2:t,successColor:n,infoColor:r,warningColor:i,errorColor:a,popoverColor:o,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeColorHover:u,closeColorPressed:d,textColor1:f,textColor3:p,borderRadius:m,fontWeightStrong:h,boxShadow2:g,lineHeight:_,fontSize:v}=e;return Object.assign(Object.assign({},Lo),{borderRadius:m,lineHeight:_,fontSize:v,headerFontWeight:h,iconColor:t,iconColorSuccess:n,iconColorInfo:r,iconColorWarning:i,iconColorError:a,color:o,textColor:t,closeIconColor:s,closeIconColorHover:c,closeIconColorPressed:l,closeBorderRadius:m,closeColorHover:u,closeColorPressed:d,headerTextColor:f,descriptionTextColor:p,actionTextColor:t,boxShadow:g})}F({name:`Notification`,common:P,peers:{Scrollbar:B},self:Ro});var zo={name:`Notification`,common:q,peers:{Scrollbar:J},self:Ro};function Bo(e){let{textColor1:t,dividerColor:n,fontWeightStrong:r}=e;return{textColor:t,color:n,fontWeight:r}}var Vo={name:`Divider`,common:q,self:Bo};function Ho(e){let{modalColor:t,textColor1:n,textColor2:r,boxShadow3:i,lineHeight:a,fontWeightStrong:o,dividerColor:s,closeColorHover:c,closeColorPressed:l,closeIconColor:u,closeIconColorHover:d,closeIconColorPressed:f,borderRadius:p,primaryColorHover:m}=e;return{bodyPadding:`16px 24px`,borderRadius:p,headerPadding:`16px 24px`,footerPadding:`16px 24px`,color:t,textColor:r,titleTextColor:n,titleFontSize:`18px`,titleFontWeight:o,boxShadow:i,lineHeight:a,headerBorderBottom:`1px solid ${s}`,footerBorderTop:`1px solid ${s}`,closeIconColor:u,closeIconColorHover:d,closeIconColorPressed:f,closeSize:`22px`,closeIconSize:`18px`,closeColorHover:c,closeColorPressed:l,closeBorderRadius:p,resizableTriggerColorHover:m}}F({name:`Drawer`,common:P,peers:{Scrollbar:B},self:Ho});var Uo={name:`Drawer`,common:q,peers:{Scrollbar:J},self:Ho},Wo={actionMargin:`0 0 0 20px`,actionMarginRtl:`0 20px 0 0`},Go={name:`DynamicInput`,common:q,peers:{Input:X,Button:Q},self(){return Wo}},Ko={gapSmall:`4px 8px`,gapMedium:`8px 12px`,gapLarge:`12px 16px`},qo={name:`Space`,self(){return Ko}},Jo={name:`DynamicTags`,common:q,peers:{Input:X,Button:Q,Tag:ki,Space:qo},self(){return{inputWidth:`64px`}}},Yo={name:`Element`,common:q},Xo={gapSmall:`4px 8px`,gapMedium:`8px 12px`,gapLarge:`12px 16px`},Zo={name:`Flex`,self(){return Xo}},Qo={name:`ButtonGroup`,common:q},$o={feedbackPadding:`4px 0 0 2px`,feedbackHeightSmall:`24px`,feedbackHeightMedium:`24px`,feedbackHeightLarge:`26px`,feedbackFontSizeSmall:`13px`,feedbackFontSizeMedium:`14px`,feedbackFontSizeLarge:`14px`,labelFontSizeLeftSmall:`14px`,labelFontSizeLeftMedium:`14px`,labelFontSizeLeftLarge:`15px`,labelFontSizeTopSmall:`13px`,labelFontSizeTopMedium:`14px`,labelFontSizeTopLarge:`14px`,labelHeightSmall:`24px`,labelHeightMedium:`26px`,labelHeightLarge:`28px`,labelPaddingVertical:`0 0 6px 2px`,labelPaddingHorizontal:`0 12px 0 0`,labelTextAlignVertical:`left`,labelTextAlignHorizontal:`right`,labelFontWeight:`400`};function es(e){let{heightSmall:t,heightMedium:n,heightLarge:r,textColor1:i,errorColor:a,warningColor:o,lineHeight:s,textColor3:c}=e;return Object.assign(Object.assign({},$o),{blankHeightSmall:t,blankHeightMedium:n,blankHeightLarge:r,lineHeight:s,labelTextColor:i,asteriskColor:a,feedbackTextColorError:a,feedbackTextColorWarning:o,feedbackTextColor:c})}var ts={name:`Form`,common:P,self:es},ns={name:`Form`,common:q,self:es},rs={name:`GradientText`,common:q,self(e){let{primaryColor:t,successColor:n,warningColor:r,errorColor:i,infoColor:a,primaryColorSuppl:o,successColorSuppl:s,warningColorSuppl:c,errorColorSuppl:l,infoColorSuppl:u,fontWeightStrong:d}=e;return{fontWeight:d,rotate:`252deg`,colorStartPrimary:t,colorEndPrimary:o,colorStartInfo:a,colorEndInfo:u,colorStartWarning:r,colorEndWarning:c,colorStartError:i,colorEndError:l,colorStartSuccess:n,colorEndSuccess:s}}},is={name:`InputNumber`,common:q,peers:{Button:Q,Input:X},self(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}};function as(){return{inputWidthSmall:`24px`,inputWidthMedium:`30px`,inputWidthLarge:`36px`,gapSmall:`8px`,gapMedium:`8px`,gapLarge:`8px`}}F({name:`InputOtp`,common:P,peers:{Input:Gi},self:as});var os={name:`InputOtp`,common:q,peers:{Input:X},self:as},ss={name:`Layout`,common:q,peers:{Scrollbar:J},self(e){let{textColor2:t,bodyColor:n,popoverColor:r,cardColor:i,dividerColor:a,scrollbarColor:o,scrollbarColorHover:s}=e;return{textColor:t,textColorInverted:t,color:n,colorEmbedded:n,headerColor:i,headerColorInverted:i,footerColor:i,footerColorInverted:i,headerBorderColor:a,headerBorderColorInverted:a,footerBorderColor:a,footerBorderColorInverted:a,siderBorderColor:a,siderBorderColorInverted:a,siderColor:i,siderColorInverted:i,siderToggleButtonBorder:`1px solid transparent`,siderToggleButtonColor:r,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:j(n,o),siderToggleBarColorHover:j(n,s),__invertScrollbar:`false`}}},cs={name:`Row`,common:q};function ls(e){let{textColor2:t,cardColor:n,modalColor:r,popoverColor:i,dividerColor:a,borderRadius:o,fontSize:s,hoverColor:c}=e;return{textColor:t,color:n,colorHover:c,colorModal:r,colorHoverModal:j(r,c),colorPopover:i,colorHoverPopover:j(i,c),borderColor:a,borderColorModal:j(r,a),borderColorPopover:j(i,a),borderRadius:o,fontSize:s}}var us={name:`List`,common:q,self:ls},ds={name:`Log`,common:q,peers:{Scrollbar:J,Code:ba},self(e){let{textColor2:t,inputColor:n,fontSize:r,primaryColor:i}=e;return{loaderFontSize:r,loaderTextColor:t,loaderColor:n,loaderBorder:`1px solid #0000`,loadingColor:i}}},fs={name:`Mention`,common:q,peers:{InternalSelectMenu:Ci,Input:X},self(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}};function ps(e,t,n,r){return{itemColorHoverInverted:`#0000`,itemColorActiveInverted:t,itemColorActiveHoverInverted:t,itemColorActiveCollapsedInverted:t,itemTextColorInverted:e,itemTextColorHoverInverted:n,itemTextColorChildActiveInverted:n,itemTextColorChildActiveHoverInverted:n,itemTextColorActiveInverted:n,itemTextColorActiveHoverInverted:n,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:n,itemTextColorChildActiveHorizontalInverted:n,itemTextColorChildActiveHoverHorizontalInverted:n,itemTextColorActiveHorizontalInverted:n,itemTextColorActiveHoverHorizontalInverted:n,itemIconColorInverted:e,itemIconColorHoverInverted:n,itemIconColorActiveInverted:n,itemIconColorActiveHoverInverted:n,itemIconColorChildActiveInverted:n,itemIconColorChildActiveHoverInverted:n,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:n,itemIconColorActiveHorizontalInverted:n,itemIconColorActiveHoverHorizontalInverted:n,itemIconColorChildActiveHorizontalInverted:n,itemIconColorChildActiveHoverHorizontalInverted:n,arrowColorInverted:e,arrowColorHoverInverted:n,arrowColorActiveInverted:n,arrowColorActiveHoverInverted:n,arrowColorChildActiveInverted:n,arrowColorChildActiveHoverInverted:n,groupTextColorInverted:r}}function ms(e){let{borderRadius:t,textColor3:n,primaryColor:r,textColor2:i,textColor1:a,fontSize:o,dividerColor:s,hoverColor:c,primaryColorHover:l}=e;return Object.assign({borderRadius:t,color:`#0000`,groupTextColor:n,itemColorHover:c,itemColorActive:A(r,{alpha:.1}),itemColorActiveHover:A(r,{alpha:.1}),itemColorActiveCollapsed:A(r,{alpha:.1}),itemTextColor:i,itemTextColorHover:i,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorChildActiveHover:r,itemTextColorHorizontal:i,itemTextColorHoverHorizontal:l,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemTextColorChildActiveHoverHorizontal:r,itemIconColor:a,itemIconColorHover:a,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorChildActiveHover:r,itemIconColorCollapsed:a,itemIconColorHorizontal:a,itemIconColorHoverHorizontal:l,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemIconColorChildActiveHoverHorizontal:r,itemHeight:`42px`,arrowColor:i,arrowColorHover:i,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,arrowColorChildActiveHover:r,colorInverted:`#0000`,borderColorHorizontal:`#0000`,fontSize:o,dividerColor:s},ps(`#BBB`,r,`#FFF`,`#AAA`))}F({name:`Menu`,common:P,peers:{Tooltip:Ka,Dropdown:Va},self:ms});var hs={name:`Menu`,common:q,peers:{Tooltip:Wa,Dropdown:Ha},self(e){let{primaryColor:t,primaryColorSuppl:n}=e,r=ms(e);return r.itemColorActive=A(t,{alpha:.15}),r.itemColorActiveHover=A(t,{alpha:.15}),r.itemColorActiveCollapsed=A(t,{alpha:.15}),r.itemColorActiveInverted=n,r.itemColorActiveHoverInverted=n,r.itemColorActiveCollapsedInverted=n,r}},gs={titleFontSize:`18px`,backSize:`22px`};function _s(e){let{textColor1:t,textColor2:n,textColor3:r,fontSize:i,fontWeightStrong:a,primaryColorHover:o,primaryColorPressed:s}=e;return Object.assign(Object.assign({},gs),{titleFontWeight:a,fontSize:i,titleTextColor:t,backColor:n,backColorHover:o,backColorPressed:s,subtitleTextColor:r})}F({name:`PageHeader`,common:P,self:_s});var vs={name:`PageHeader`,common:q,self:_s},ys={iconSize:`22px`};function bs(e){let{fontSize:t,warningColor:n}=e;return Object.assign(Object.assign({},ys),{fontSize:t,iconColor:n})}F({name:`Popconfirm`,common:P,peers:{Button:Z,Popover:Ei},self:bs});var xs={name:`Popconfirm`,common:q,peers:{Button:Q,Popover:Di},self:bs};function Ss(e){let{infoColor:t,successColor:n,warningColor:r,errorColor:i,textColor2:a,progressRailColor:o,fontSize:s,fontWeight:c}=e;return{fontSize:s,fontSizeCircle:`28px`,fontWeightCircle:c,railColor:o,railHeight:`8px`,iconSizeCircle:`36px`,iconSizeLine:`18px`,iconColor:t,iconColorInfo:t,iconColorSuccess:n,iconColorWarning:r,iconColorError:i,textColorCircle:a,textColorLineInner:`rgb(255, 255, 255)`,textColorLineOuter:a,fillColor:t,fillColorInfo:t,fillColorSuccess:n,fillColorWarning:r,fillColorError:i,lineBgProcessing:`linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)`}}var Cs={name:`Progress`,common:P,self:Ss},ws={name:`Progress`,common:q,self(e){let t=Ss(e);return t.textColorLineInner=`rgb(0, 0, 0)`,t.lineBgProcessing=`linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)`,t}},Ts={name:`Rate`,common:q,self(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:`#CCAA33`,itemSize:`20px`,sizeSmall:`16px`,sizeMedium:`20px`,sizeLarge:`24px`}}},Es={titleFontSizeSmall:`26px`,titleFontSizeMedium:`32px`,titleFontSizeLarge:`40px`,titleFontSizeHuge:`48px`,fontSizeSmall:`14px`,fontSizeMedium:`14px`,fontSizeLarge:`15px`,fontSizeHuge:`16px`,iconSizeSmall:`64px`,iconSizeMedium:`80px`,iconSizeLarge:`100px`,iconSizeHuge:`125px`,iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};function Ds(e){let{textColor2:t,textColor1:n,errorColor:r,successColor:i,infoColor:a,warningColor:o,lineHeight:s,fontWeightStrong:c}=e;return Object.assign(Object.assign({},Es),{lineHeight:s,titleFontWeight:c,titleTextColor:n,textColor:t,iconColorError:r,iconColorSuccess:i,iconColorInfo:a,iconColorWarning:o})}var Os={name:`Result`,common:q,self:Ds},ks={railHeight:`4px`,railWidthVertical:`4px`,handleSize:`18px`,dotHeight:`8px`,dotWidth:`8px`,dotBorderRadius:`4px`},As={name:`Slider`,common:q,self(e){let{railColor:t,modalColor:n,primaryColorSuppl:r,popoverColor:i,textColor2:a,cardColor:o,borderRadius:s,fontSize:c,opacityDisabled:l}=e;return Object.assign(Object.assign({},ks),{fontSize:c,markFontSize:c,railColor:t,railColorHover:t,fillColor:r,fillColorHover:r,opacityDisabled:l,handleColor:`#FFF`,dotColor:o,dotColorModal:n,dotColorPopover:i,handleBoxShadow:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowHover:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowActive:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,handleBoxShadowFocus:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,indicatorColor:i,indicatorBoxShadow:`0 2px 8px 0 rgba(0, 0, 0, 0.12)`,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${t}`,dotBorderActive:`2px solid ${r}`,dotBoxShadow:``})}};function js(e){let{opacityDisabled:t,heightTiny:n,heightSmall:r,heightMedium:i,heightLarge:a,heightHuge:o,primaryColor:s,fontSize:c}=e;return{fontSize:c,textColor:s,sizeTiny:n,sizeSmall:r,sizeMedium:i,sizeLarge:a,sizeHuge:o,color:s,opacitySpinning:t}}var Ms={name:`Spin`,common:P,self:js},Ns={name:`Spin`,common:q,self:js};function Ps(e){let{textColor2:t,textColor3:n,fontSize:r,fontWeight:i}=e;return{labelFontSize:r,labelFontWeight:i,valueFontWeight:i,valueFontSize:`24px`,labelTextColor:n,valuePrefixTextColor:t,valueSuffixTextColor:t,valueTextColor:t}}var Fs={name:`Statistic`,common:q,self:Ps},Is={stepHeaderFontSizeSmall:`14px`,stepHeaderFontSizeMedium:`16px`,indicatorIndexFontSizeSmall:`14px`,indicatorIndexFontSizeMedium:`16px`,indicatorSizeSmall:`22px`,indicatorSizeMedium:`28px`,indicatorIconSizeSmall:`14px`,indicatorIconSizeMedium:`18px`};function Ls(e){let{fontWeightStrong:t,baseColor:n,textColorDisabled:r,primaryColor:i,errorColor:a,textColor1:o,textColor2:s}=e;return Object.assign(Object.assign({},Is),{stepHeaderFontWeight:t,indicatorTextColorProcess:n,indicatorTextColorWait:r,indicatorTextColorFinish:i,indicatorTextColorError:a,indicatorBorderColorProcess:i,indicatorBorderColorWait:r,indicatorBorderColorFinish:i,indicatorBorderColorError:a,indicatorColorProcess:i,indicatorColorWait:`#0000`,indicatorColorFinish:`#0000`,indicatorColorError:`#0000`,splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:i,splitorColorError:r,headerTextColorProcess:o,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:a,descriptionTextColorProcess:s,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:a})}var Rs={name:`Steps`,common:q,self:Ls},zs={buttonHeightSmall:`14px`,buttonHeightMedium:`18px`,buttonHeightLarge:`22px`,buttonWidthSmall:`14px`,buttonWidthMedium:`18px`,buttonWidthLarge:`22px`,buttonWidthPressedSmall:`20px`,buttonWidthPressedMedium:`24px`,buttonWidthPressedLarge:`28px`,railHeightSmall:`18px`,railHeightMedium:`22px`,railHeightLarge:`26px`,railWidthSmall:`32px`,railWidthMedium:`40px`,railWidthLarge:`48px`},Bs={name:`Switch`,common:q,self(e){let{primaryColorSuppl:t,opacityDisabled:n,borderRadius:r,primaryColor:i,textColor2:a,baseColor:o}=e;return Object.assign(Object.assign({},zs),{iconColor:o,textColor:a,loadingColor:t,opacityDisabled:n,railColor:`rgba(255, 255, 255, .20)`,railColorActive:t,buttonBoxShadow:`0px 2px 4px 0 rgba(0, 0, 0, 0.4)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${A(i,{alpha:.3})}`})}},Vs={thPaddingSmall:`6px`,thPaddingMedium:`12px`,thPaddingLarge:`12px`,tdPaddingSmall:`6px`,tdPaddingMedium:`12px`,tdPaddingLarge:`12px`};function Hs(e){let{dividerColor:t,cardColor:n,modalColor:r,popoverColor:i,tableHeaderColor:a,tableColorStriped:o,textColor1:s,textColor2:c,borderRadius:l,fontWeightStrong:u,lineHeight:d,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m}=e;return Object.assign(Object.assign({},Vs),{fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m,lineHeight:d,borderRadius:l,borderColor:j(n,t),borderColorModal:j(r,t),borderColorPopover:j(i,t),tdColor:n,tdColorModal:r,tdColorPopover:i,tdColorStriped:j(n,o),tdColorStripedModal:j(r,o),tdColorStripedPopover:j(i,o),thColor:j(n,a),thColorModal:j(r,a),thColorPopover:j(i,a),thTextColor:s,tdTextColor:c,thFontWeight:u})}var Us={name:`Table`,common:q,self:Hs},Ws={tabFontSizeSmall:`14px`,tabFontSizeMedium:`14px`,tabFontSizeLarge:`16px`,tabGapSmallLine:`36px`,tabGapMediumLine:`36px`,tabGapLargeLine:`36px`,tabGapSmallLineVertical:`8px`,tabGapMediumLineVertical:`8px`,tabGapLargeLineVertical:`8px`,tabPaddingSmallLine:`6px 0`,tabPaddingMediumLine:`10px 0`,tabPaddingLargeLine:`14px 0`,tabPaddingVerticalSmallLine:`6px 12px`,tabPaddingVerticalMediumLine:`8px 16px`,tabPaddingVerticalLargeLine:`10px 20px`,tabGapSmallBar:`36px`,tabGapMediumBar:`36px`,tabGapLargeBar:`36px`,tabGapSmallBarVertical:`8px`,tabGapMediumBarVertical:`8px`,tabGapLargeBarVertical:`8px`,tabPaddingSmallBar:`4px 0`,tabPaddingMediumBar:`6px 0`,tabPaddingLargeBar:`10px 0`,tabPaddingVerticalSmallBar:`6px 12px`,tabPaddingVerticalMediumBar:`8px 16px`,tabPaddingVerticalLargeBar:`10px 20px`,tabGapSmallCard:`4px`,tabGapMediumCard:`4px`,tabGapLargeCard:`4px`,tabGapSmallCardVertical:`4px`,tabGapMediumCardVertical:`4px`,tabGapLargeCardVertical:`4px`,tabPaddingSmallCard:`8px 16px`,tabPaddingMediumCard:`10px 20px`,tabPaddingLargeCard:`12px 24px`,tabPaddingSmallSegment:`4px 0`,tabPaddingMediumSegment:`6px 0`,tabPaddingLargeSegment:`8px 0`,tabPaddingVerticalLargeSegment:`0 8px`,tabPaddingVerticalSmallCard:`8px 12px`,tabPaddingVerticalMediumCard:`10px 16px`,tabPaddingVerticalLargeCard:`12px 20px`,tabPaddingVerticalSmallSegment:`0 4px`,tabPaddingVerticalMediumSegment:`0 6px`,tabGapSmallSegment:`0`,tabGapMediumSegment:`0`,tabGapLargeSegment:`0`,tabGapSmallSegmentVertical:`0`,tabGapMediumSegmentVertical:`0`,tabGapLargeSegmentVertical:`0`,panePaddingSmall:`8px 0 0 0`,panePaddingMedium:`12px 0 0 0`,panePaddingLarge:`16px 0 0 0`,closeSize:`18px`,closeIconSize:`14px`};function Gs(e){let{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,tabColor:l,baseColor:u,dividerColor:d,fontWeight:f,textColor1:p,borderRadius:m,fontSize:h,fontWeightStrong:g}=e;return Object.assign(Object.assign({},Ws),{colorSegment:l,tabFontSizeCard:h,tabTextColorLine:p,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:p,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:p,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:p,tabTextColorHoverCard:p,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,closeBorderRadius:m,tabColor:l,tabColorSegment:u,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:m,paneTextColor:t,fontWeightStrong:g})}var Ks={name:`Tabs`,common:P,self:Gs},qs={name:`Tabs`,common:q,self(e){let t=Gs(e),{inputColor:n}=e;return t.colorSegment=n,t.tabColorSegment=n,t}};function Js(e){let{textColor1:t,textColor2:n,fontWeightStrong:r,fontSize:i}=e;return{fontSize:i,titleTextColor:t,textColor:n,titleFontWeight:r}}var Ys={name:`Thing`,common:q,self:Js},Xs={titleMarginMedium:`0 0 6px 0`,titleMarginLarge:`-2px 0 6px 0`,titleFontSizeMedium:`14px`,titleFontSizeLarge:`16px`,iconSizeMedium:`14px`,iconSizeLarge:`14px`},Zs={name:`Timeline`,common:q,self(e){let{textColor3:t,infoColorSuppl:n,errorColorSuppl:r,successColorSuppl:i,warningColorSuppl:a,textColor1:o,textColor2:s,railColor:c,fontWeightStrong:l,fontSize:u}=e;return Object.assign(Object.assign({},Xs),{contentFontSize:u,titleFontWeight:l,circleBorder:`2px solid ${t}`,circleBorderInfo:`2px solid ${n}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${i}`,circleBorderWarning:`2px solid ${a}`,iconColor:t,iconColorInfo:n,iconColorError:r,iconColorSuccess:i,iconColorWarning:a,titleTextColor:o,contentTextColor:s,metaTextColor:t,lineColor:c})}},Qs={extraFontSizeSmall:`12px`,extraFontSizeMedium:`12px`,extraFontSizeLarge:`14px`,titleFontSizeSmall:`14px`,titleFontSizeMedium:`16px`,titleFontSizeLarge:`16px`,closeSize:`20px`,closeIconSize:`16px`,headerHeightSmall:`44px`,headerHeightMedium:`44px`,headerHeightLarge:`50px`},$s={name:`Transfer`,common:q,peers:{Checkbox:_a,Scrollbar:J,Input:X,Empty:yi,Button:Q},self(e){let{fontWeight:t,fontSizeLarge:n,fontSizeMedium:r,fontSizeSmall:i,heightLarge:a,heightMedium:o,borderRadius:s,inputColor:c,tableHeaderColor:l,textColor1:u,textColorDisabled:d,textColor2:f,textColor3:p,hoverColor:m,closeColorHover:h,closeColorPressed:g,closeIconColor:_,closeIconColorHover:v,closeIconColorPressed:y,dividerColor:b}=e;return Object.assign(Object.assign({},Qs),{itemHeightSmall:o,itemHeightMedium:o,itemHeightLarge:a,fontSizeSmall:i,fontSizeMedium:r,fontSizeLarge:n,borderRadius:s,dividerColor:b,borderColor:`#0000`,listColor:c,headerColor:l,titleTextColor:u,titleTextColorDisabled:d,extraTextColor:p,extraTextColorDisabled:d,itemTextColor:f,itemTextColorDisabled:d,itemColorPending:m,titleFontWeight:t,closeColorHover:h,closeColorPressed:g,closeIconColor:_,closeIconColorHover:v,closeIconColorPressed:y})}};function ec(e){let{borderRadiusSmall:t,dividerColor:n,hoverColor:r,pressedColor:i,primaryColor:a,textColor3:o,textColor2:s,textColorDisabled:c,fontSize:l}=e;return{fontSize:l,lineHeight:`1.5`,nodeHeight:`30px`,nodeWrapperPadding:`3px 0`,nodeBorderRadius:t,nodeColorHover:r,nodeColorPressed:i,nodeColorActive:A(a,{alpha:.1}),arrowColor:o,nodeTextColor:s,nodeTextColorDisabled:c,loadingColor:a,dropMarkColor:a,lineColor:n}}F({name:`Tree`,common:P,peers:{Checkbox:ga,Scrollbar:B,Empty:vi},self:ec});var tc={name:`Tree`,common:q,peers:{Checkbox:_a,Scrollbar:J,Empty:yi},self(e){let{primaryColor:t}=e,n=ec(e);return n.nodeColorActive=A(t,{alpha:.15}),n}},nc={name:`TreeSelect`,common:q,peers:{Tree:tc,Empty:yi,InternalSelection:ji}},rc={headerFontSize1:`30px`,headerFontSize2:`22px`,headerFontSize3:`18px`,headerFontSize4:`16px`,headerFontSize5:`16px`,headerFontSize6:`16px`,headerMargin1:`28px 0 20px 0`,headerMargin2:`28px 0 20px 0`,headerMargin3:`28px 0 20px 0`,headerMargin4:`28px 0 18px 0`,headerMargin5:`28px 0 18px 0`,headerMargin6:`28px 0 18px 0`,headerPrefixWidth1:`16px`,headerPrefixWidth2:`16px`,headerPrefixWidth3:`12px`,headerPrefixWidth4:`12px`,headerPrefixWidth5:`12px`,headerPrefixWidth6:`12px`,headerBarWidth1:`4px`,headerBarWidth2:`4px`,headerBarWidth3:`3px`,headerBarWidth4:`3px`,headerBarWidth5:`3px`,headerBarWidth6:`3px`,pMargin:`16px 0 16px 0`,liMargin:`.25em 0 0 0`,olPadding:`0 0 0 2em`,ulPadding:`0 0 0 2em`};function ic(e){let{primaryColor:t,textColor2:n,borderColor:r,lineHeight:i,fontSize:a,borderRadiusSmall:o,dividerColor:s,fontWeightStrong:c,textColor1:l,textColor3:u,infoColor:d,warningColor:f,errorColor:p,successColor:m,codeColor:h}=e;return Object.assign(Object.assign({},rc),{aTextColor:t,blockquoteTextColor:n,blockquotePrefixColor:r,blockquoteLineHeight:i,blockquoteFontSize:a,codeBorderRadius:o,liTextColor:n,liLineHeight:i,liFontSize:a,hrColor:s,headerFontWeight:c,headerTextColor:l,pTextColor:n,pTextColor1Depth:l,pTextColor2Depth:n,pTextColor3Depth:u,pLineHeight:i,pFontSize:a,headerBarColor:t,headerBarColorPrimary:t,headerBarColorInfo:d,headerBarColorError:p,headerBarColorWarning:f,headerBarColorSuccess:m,textColor:n,textColor1Depth:l,textColor2Depth:n,textColor3Depth:u,textColorPrimary:t,textColorInfo:d,textColorSuccess:m,textColorWarning:f,textColorError:p,codeTextColor:n,codeColor:h,codeBorder:`1px solid #0000`})}var ac={name:`Typography`,common:P,self:ic},oc={name:`Typography`,common:q,self:ic};function sc(e){let{iconColor:t,primaryColor:n,errorColor:r,textColor2:i,successColor:a,opacityDisabled:o,actionColor:s,borderColor:c,hoverColor:l,lineHeight:u,borderRadius:d,fontSize:f}=e;return{fontSize:f,lineHeight:u,borderRadius:d,draggerColor:s,draggerBorder:`1px dashed ${c}`,draggerBorderHover:`1px dashed ${n}`,itemColorHover:l,itemColorHoverError:A(r,{alpha:.06}),itemTextColor:i,itemTextColorError:r,itemTextColorSuccess:a,itemIconColor:t,itemDisabledOpacity:o,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${c}`}}var cc=F({name:`Upload`,common:P,peers:{Button:Z,Progress:Cs},self:sc}),lc={name:`Upload`,common:q,peers:{Button:Q,Progress:ws},self(e){let{errorColor:t}=e,n=sc(e);return n.itemColorHoverError=A(t,{alpha:.09}),n}},uc={name:`Watermark`,common:q,self(e){let{fontFamily:t}=e;return{fontFamily:t}}},dc={name:`FloatButton`,common:q,self(e){let{popoverColor:t,textColor2:n,buttonColor2Hover:r,buttonColor2Pressed:i,primaryColor:a,primaryColorHover:o,primaryColorPressed:s,baseColor:c,borderRadius:l}=e;return{color:t,textColor:n,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`,boxShadowHover:`0 2px 12px 0px rgba(0, 0, 0, .18)`,boxShadowPressed:`0 2px 12px 0px rgba(0, 0, 0, .18)`,colorHover:r,colorPressed:i,colorPrimary:a,colorPrimaryHover:o,colorPrimaryPressed:s,textColorPrimary:c,borderRadiusSquare:l}}};function fc(e){let{borderRadius:t,fontSizeMini:n,fontSizeTiny:r,fontSizeSmall:i,fontWeight:a,textColor2:o,cardColor:s,buttonColor2Hover:c}=e;return{activeColors:[`#9be9a8`,`#40c463`,`#30a14e`,`#216e39`],borderRadius:t,borderColor:s,textColor:o,mininumColor:c,fontWeight:a,loadingColorStart:`rgba(0, 0, 0, 0.06)`,loadingColorEnd:`rgba(0, 0, 0, 0.12)`,rectSizeSmall:`10px`,rectSizeMedium:`11px`,rectSizeLarge:`12px`,borderRadiusSmall:`2px`,borderRadiusMedium:`2px`,borderRadiusLarge:`2px`,xGapSmall:`2px`,xGapMedium:`3px`,xGapLarge:`3px`,yGapSmall:`2px`,yGapMedium:`3px`,yGapLarge:`3px`,fontSizeSmall:r,fontSizeMedium:n,fontSizeLarge:i}}F({name:`Heatmap`,common:P,self:fc});var pc={name:`Heatmap`,common:q,self(e){let t=fc(e);return Object.assign(Object.assign({},t),{activeColors:[`#0d4429`,`#006d32`,`#26a641`,`#39d353`],mininumColor:`rgba(255, 255, 255, 0.1)`,loadingColorStart:`rgba(255, 255, 255, 0.12)`,loadingColorEnd:`rgba(255, 255, 255, 0.18)`})}};function mc(e){let{primaryColor:t,baseColor:n}=e;return{color:t,iconColor:n}}var hc={name:`IconWrapper`,common:q,self:mc},gc={name:`Image`,common:q,peers:{Tooltip:Wa},self:e=>{let{textColor2:t}=e;return{toolbarIconColor:t,toolbarColor:`rgba(0, 0, 0, .35)`,toolbarBoxShadow:`none`,toolbarBorderRadius:`24px`}}},_c={extraFontSize:`12px`,width:`440px`},vc={name:`Transfer`,common:q,peers:{Checkbox:_a,Scrollbar:J,Input:X,Empty:yi,Button:Q},self(e){let{iconColorDisabled:t,iconColor:n,fontWeight:r,fontSizeLarge:i,fontSizeMedium:a,fontSizeSmall:o,heightLarge:s,heightMedium:c,heightSmall:l,borderRadius:u,inputColor:d,tableHeaderColor:f,textColor1:p,textColorDisabled:m,textColor2:h,hoverColor:g}=e;return Object.assign(Object.assign({},_c),{itemHeightSmall:l,itemHeightMedium:c,itemHeightLarge:s,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:i,borderRadius:u,borderColor:`#0000`,listColor:d,headerColor:f,titleTextColor:p,titleTextColorDisabled:m,extraTextColor:h,filterDividerColor:`#0000`,itemTextColor:h,itemTextColorDisabled:m,itemColorPending:g,titleFontWeight:r,iconColor:n,iconColorDisabled:t})}};function yc(){return{}}var bc={name:`dark`,common:q,Alert:Fi,Anchor:Vi,AutoComplete:Ji,Avatar:Zi,AvatarGroup:$i,BackTop:ta,Badge:na,Breadcrumb:aa,Button:Q,ButtonGroup:Qo,Calendar:ua,Card:da,Carousel:pa,Cascader:ya,Checkbox:_a,Code:ba,Collapse:Ca,CollapseTransition:Ta,ColorPicker:Da,DataTable:to,DatePicker:fo,Descriptions:ho,Dialog:yo,Divider:Vo,Drawer:Uo,Dropdown:Ha,DynamicInput:Go,DynamicTags:Jo,Element:Yo,Empty:yi,Ellipsis:qa,Equation:{name:`Equation`,common:q,self:()=>({})},Flex:Zo,Form:ns,GradientText:rs,Heatmap:pc,Icon:ro,IconWrapper:hc,Image:gc,Input:X,InputNumber:is,InputOtp:os,LegacyTransfer:vc,Layout:ss,List:us,LoadingBar:Co,Log:ds,Menu:hs,Mention:fs,Message:ko,Modal:So,Notification:zo,PageHeader:vs,Pagination:Ra,Popconfirm:xs,Popover:Di,Popselect:ka,Progress:ws,QrCode:{name:`QrCode`,common:q,self:e=>({borderRadius:e.borderRadius})},Radio:Xa,Rate:Ts,Result:Os,Row:cs,Scrollbar:J,Select:Pa,Skeleton:{name:`Skeleton`,common:q,self(e){let{heightSmall:t,heightMedium:n,heightLarge:r,borderRadius:i}=e;return{color:`rgba(255, 255, 255, 0.12)`,colorEnd:`rgba(255, 255, 255, 0.18)`,borderRadius:i,heightSmall:t,heightMedium:n,heightLarge:r}}},Slider:As,Space:qo,Spin:Ns,Statistic:Fs,Steps:Rs,Switch:Bs,Table:Us,Tabs:qs,Tag:ki,Thing:Ys,TimePicker:so,Timeline:Zs,Tooltip:Wa,Transfer:$s,Tree:tc,TreeSelect:nc,Typography:oc,Upload:lc,Watermark:uc,Split:{name:`Split`,common:q},FloatButton:dc,FloatButtonGroup:{name:`FloatButtonGroup`,common:q,self(e){let{popoverColor:t,dividerColor:n,borderRadius:r}=e;return{color:t,buttonBorderColor:n,borderRadiusSquare:r,boxShadow:`0 2px 8px 0px rgba(0, 0, 0, .12)`}}},Marquee:{name:`Marquee`,common:q,self:yc}},xc=sr(`auth`,()=>{let e=I(null),t=I(null),n=I(null),r=I(!1),i=I(null),a=null,o=0,s=!1,c=N(()=>!!e.value),l=N(()=>n.value?.username||``),u=N(()=>n.value?.roles||[]);function d(){e.value=localStorage.getItem(`accessToken`),t.value=localStorage.getItem(`refreshToken`)}function f(n,r){e.value=n,t.value=r||null,r?localStorage.setItem(`refreshToken`,r):localStorage.removeItem(`refreshToken`),localStorage.setItem(`accessToken`,n)}function p(){d(),s||=(window.addEventListener(`storage`,e=>{if(e.storageArea!==localStorage||e.key!==`accessToken`&&e.key!==null)return;let t=()=>{o++,d(),n.value=null,i.value=null,h()};a&&localStorage.getItem(`accessToken`)&&localStorage.getItem(`refreshToken`)?a.then(t,t):t()}),!0),h()}function m(){return e.value}async function h(){if(!e.value)return;let t=o;try{let r=await Cc().GetMe({});r.user&&t===o&&e.value&&(n.value=r.user,i.value=null)}catch(e){t===o&&(i.value=e instanceof Error?e.message:`Не удалось восстановить сессию`)}}async function g(e,t){r.value=!0,i.value=null;let a=++o;try{let r=await Be().Login({email:e,password:t});return r.accessToken&&a===o?(n.value=null,f(r.accessToken,r.refreshToken),await h(),!0):!1}catch(e){return i.value=e instanceof Error?e.message:`Login failed`,!1}finally{r.value=!1}}function _(n=e.value){if(a)return a;let r=o,i=t.value,s=async()=>{if(r!==o)return!1;if(d(),!e.value||!t.value)return await x(),!1;if(e.value!==n||t.value!==i)return!0;try{let e=await Be().Refresh({refreshToken:i||void 0});if(r!==o||localStorage.getItem(`refreshToken`)!==i)return!1;if(!e.accessToken||!e.refreshToken)throw Error(`Сервер не вернул токены сессии`);return f(e.accessToken,e.refreshToken),!0}catch(e){if(r!==o||localStorage.getItem(`refreshToken`)!==i)return!1;if(e instanceof Error&&e.message===`unauthorized`)return await x(),!1;throw e}};return a=(navigator.locks?navigator.locks.request(`evening-detective-auth-refresh`,s):s()).finally(()=>{a=null}),a}async function v(e,t,n,a){r.value=!0,i.value=null;try{return await Be(m).Signup({username:e,email:t,acceptTerms:n,acceptPrivacy:a}),!0}catch(e){return i.value=e instanceof Error?e.message:`Signup failed`,!1}finally{r.value=!1}}async function y(e){r.value=!0,i.value=null;try{return await Cc(()=>({"X-Password":e})).DeleteAccount({}),await x(),!0}catch(e){return i.value=e instanceof Error?e.message:`Account deletion failed`,!1}finally{r.value=!1}}async function b(e){r.value=!0,i.value=null;try{return await Be(m).RefreshPassword({email:e}),!0}catch(e){return i.value=e instanceof Error?e.message:`Password reset failed`,!1}finally{r.value=!1}}async function x(){o++,e.value=null,t.value=null,n.value=null,i.value=null,localStorage.removeItem(`refreshToken`),localStorage.removeItem(`accessToken`)}function S(e){return u.value.includes(e)}function C(e){return e.some(e=>u.value.includes(e))}return{accessToken:e,refreshToken:t,user:n,isLoading:r,error:i,isAuthenticated:c,username:l,userRoles:u,initFromStorage:p,getToken:m,login:g,signup:v,deleteAccount:y,refreshPassword:b,logout:x,fetchUser:h,refreshTokenAction:_,hasRole:S,hasAnyRole:C}});async function Sc(e,t,n){let r=n();try{return await e()}catch(n){if(!(n instanceof Error)||n.message!==`unauthorized`||!await t(r))throw n;return e()}}function Cc(e){let t=xc();return wc(t.refreshTokenAction,t.getToken,e)}function wc(e,t,n){let r=De(t,n);return ve(n=>Sc(()=>r(n),e,t))}function Tc(e,t=5e3){let n=I(!0),r=null,i=()=>{n.value=!0,e(),r=window.setInterval(e,t)},a=()=>{n.value=!1,r&&=(clearInterval(r),null)};return te(i),re(a),{isActive:n,start:i,stop:a}}var Ec=sr(`devicePresence`,()=>{let e=me({}),t;function n(){let n=Symbol();return t=n,e.value={},{set(r){t===n&&(e.value=r)},clear(){t===n&&(t=void 0,e.value={})}}}return{context:e,claim:n}}),Dc=`evening-detective-device-ID`,Oc=/^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;function kc(){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function Ac(){let e=kc();try{let t=localStorage.getItem(Dc);if(t&&Oc.test(t))return t;localStorage.setItem(Dc,e)}catch{}return e}function jc(){let e=Cc(),t=Be(),n=Ec(),r=Ac(),i=kc(),a=!0,o=!1,s=!1,c=!1;async function l(){if(!(!a||s)){if(o){c=!0;return}o=!0,c=!1;try{(await(n.context.organizerGameID?e:t).DeviceHeartbeat({deviceID:r,connectionID:i,organizerGameID:n.context.organizerGameID,teamID:n.context.teamID,password:n.context.password,screenID:n.context.screenID,accessToken:n.context.accessToken})).enabled===!1&&(a=!1,d.stop())}catch{console.warn(`Не удалось обновить присутствие устройства; повтор по интервалу`),c=!1}finally{o=!1,c&&l()}}}function u(){document.visibilityState===`visible`&&l()}let d=Tc(()=>void l(),2e4);Oe(()=>n.context,()=>void l()),te(()=>{document.addEventListener(`visibilitychange`,u),window.addEventListener(`online`,l)}),re(()=>{s=!0,document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`online`,l)})}var Mc=L({__name:`App`,setup(e){return jc(),(e,t)=>(f(),D(se(Oa),{theme:se(bc)},{default:ye(()=>[y(se(Io),null,{default:ye(()=>[y(se(Ae))]),_:1})]),_:1},8,[`theme`]))}}),Nc=`modulepreload`,Pc=function(e){return`/`+e},Fc={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Pc(t,n),t=s(t),t in Fc)return;Fc[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Nc,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ic=Re({history:ce(`/`),routes:[{path:`/participation`,name:`participation`,component:()=>$(()=>import(`./ParticipationView-TaV4rzMo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))},{path:`/tickets/:token`,name:`ticket`,component:()=>$(()=>import(`./TicketView-BrswqpT2.js`),__vite__mapDeps([15,1,7,4,8,16,14,17,18,19]))},{path:`/`,name:`home`,component:()=>$(()=>import(`./HomeView-De2Wt4BH.js`),__vite__mapDeps([20,1,4,12,3,13,21]))},{path:`/login`,name:`login`,component:()=>$(()=>import(`./LoginView-Bp9RClQt.js`),__vite__mapDeps([22,1,23,2,3,4,5,6,24,10,25,26,7,8,27,28,29,30,9,11,12,13,31]))},{path:`/office`,name:`office`,component:()=>$(()=>import(`./OfficeView-CAsOcT4l.js`),__vite__mapDeps([32,1,2,3,4,5,6,33,24,10,7,8,34,30,26,35,12,13,36]))},{path:`/user-agreement`,name:`user-agreement`,component:()=>$(()=>import(`./UserAgreementView-a6MCHwYf.js`),__vite__mapDeps([37,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/privacy-policy`,name:`privacy-policy`,component:()=>$(()=>import(`./PrivacyPolicyView-3H_W5BBn.js`),__vite__mapDeps([43,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/consent`,name:`consent`,component:()=>$(()=>import(`./ConsentView-DvisXAHz.js`),__vite__mapDeps([44,1,12,3,4,13,38,35,39,28,5,40,41,42]))},{path:`/games`,name:`games`,component:()=>$(()=>import(`./GamesView-CyqroMvG.js`),__vite__mapDeps([45,1,2,3,4,5,6,33,24,10,7,8,34,46,23,25,26,30,47,28,48,49,50,29,35,9,11,51,12,13,52,14,53]))},{path:`/screen`,name:`screen`,component:()=>$(()=>import(`./ScreenView-kil-uMc-.js`),__vite__mapDeps([54,1,2,3,4,5,6,7,8,47,23,24,10,25,26,28,48,34,49,16,12,13,55,14,56,57]))},{path:`/games/:id/results`,name:`game-results`,component:()=>$(()=>import(`./GameResultsView-VzcTF_I1.js`),__vite__mapDeps([58,1,3,4,7,8,51,10,11,12,13,59]))},{path:`/games/:id`,name:`game`,component:()=>$(()=>import(`./GameView-7R4L26Pq.js`),__vite__mapDeps([60,1,25,23,2,3,4,5,6,24,10,33,7,8,34,26,27,28,29,47,48,49,50,30,61,35,9,11,51,62,16,39,63,12,13,52,55,14,56,64]))},{path:`/team-story/:id`,name:`team-story`,component:()=>$(()=>import(`./TeamStoryView-DxafuPZ8.js`),__vite__mapDeps([65,1,3,4,7,8,66,2,5,6,24,10,33,34,26,50,23,48,28,49,29,30,61,9,11,63,55,17,18,67,35,51,62,16,40,41,56,68]))},{path:`/scenarios`,name:`scenarios`,component:()=>$(()=>import(`./ScenariosView-kVl-aUow.js`),__vite__mapDeps([69,1,2,3,4,5,6,33,24,10,7,8,34,50,23,26,48,28,49,29,30,51,11,63,12,13,52,70]))},{path:`/catalog`,name:`catalog`,component:()=>$(()=>import(`./CatalogView-Dbbfdp8S.js`),__vite__mapDeps([71,1,3,4,62,26,8,12,13,72]))},{path:`/scenarios/:id/editor`,name:`scenario-editor`,component:()=>$(()=>import(`./ScenariosEditorView-QOE_o8N2.js`),__vite__mapDeps([73,1,2,3,4,5,6,33,24,10,7,8,34,47,23,25,26,28,48,49,50,29,30,66,61,9,11,63,55,17,18,67,35,51,12,13,52,74]))},{path:`/scenarios/:id`,name:`scenario`,component:()=>$(()=>import(`./ScenarioView-VnFgrJ5p.js`),__vite__mapDeps([75,1,3,4,62,26,8,12,13,76]))},{path:`/tasks`,name:`tasks`,component:()=>$(()=>import(`./TasksView-DoWYZ1G8.js`),__vite__mapDeps([77,1,25,23,2,3,4,5,6,24,10,33,7,8,34,46,26,30,78,49,47,28,48,35,51,11,39,12,13,79]))},{path:`/users`,name:`users`,component:()=>$(()=>import(`./UsersView-BDzjXO6r.js`),__vite__mapDeps([80,1,2,3,4,5,6,33,24,10,7,8,34,78,49,30,26,9,11,51,12,13,81]))},{path:`/reviews`,name:`reviews`,component:()=>$(()=>import(`./ReviewsView-1YanUVKc.js`),__vite__mapDeps([82,1,2,3,4,5,6,7,8,51,10,11,62,26,12,13,83]))}]}),Lc=En(Mc);Lc.use(qn()),xc().initFromStorage(),Lc.use(Ic),Lc.mount(`#app`);export{fr as $,Ri as A,oi as B,Na as C,Z as D,ga as E,Si as F,$r as G,ni as H,vi as I,Yr as J,Zr as K,di as L,Ni as M,Oi as N,qi as O,Ei as P,pr as Q,ui as R,Ka as S,Sa as T,ti as U,ii as V,ei as W,gr as X,xr as Y,hr as Z,wo as _,Sc as a,ut as at,uo as b,ac as c,Et as ct,Ms as d,dr as et,Cs as f,Wo as g,Ko as h,Cc as i,cr as it,Pi as j,Gi as k,Ks as l,Sn as lt,Xo as m,Ec as n,lr as nt,xc as o,on as ot,ts as p,Xr as q,Tc as r,sr as rt,cc as s,_n as st,Ic as t,ur as tt,zs as u,bn as ut,xo as v,Oa as w,oo as x,vo as y,si as z}; \ No newline at end of file diff --git a/frontend/dist/assets/keep-YWFBE5Rh.js b/frontend/dist/assets/keep-UirG4WK3.js similarity index 98% rename from frontend/dist/assets/keep-YWFBE5Rh.js rename to frontend/dist/assets/keep-UirG4WK3.js index 90b4085..783dbb8 100644 --- a/frontend/dist/assets/keep-YWFBE5Rh.js +++ b/frontend/dist/assets/keep-UirG4WK3.js @@ -1 +1 @@ -import{Mt as e,Ut as t,Vt as n,hn as r,ht as i,kt as a,nn as o}from"./client-Bz0sY7Lm.js";import{d as s,f as c,u as l}from"./Card-D1LVu21r.js";import{tt as u}from"./index-6B3OmSLg.js";function d(e){return typeof e==`string`?document.querySelector(e):e()||null}function f(e){return e instanceof HTMLElement}function p(e){for(let t=0;t=0;t--){let n=e.childNodes[t];if(f(n)&&(h(n)||m(n)))return!0}return!1}function h(e){if(!g(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function g(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.getAttribute(`disabled`))return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`SELECT`:case`TEXTAREA`:return!0;default:return!1}}var _=[],v=a({name:`FocusTrap`,props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){let i=u(),a=r(null),f=r(null),h=!1,g=!1,v=typeof document>`u`?null:document.activeElement;function y(){return _[_.length-1]===i}function b(t){var n;t.code===`Escape`&&y()&&((n=e.onEsc)==null||n.call(e,t))}t(()=>{o(()=>e.active,e=>{e?(C(),s(`keydown`,document,b)):(l(`keydown`,document,b),h&&w())},{immediate:!0})}),n(()=>{l(`keydown`,document,b),h&&w()});function x(e){if(!g&&y()){let t=S();if(t===null||t.contains(c(e)))return;T(`first`)}}function S(){let e=a.value;if(e===null)return null;let t=e;for(;t=t.nextSibling,!(t===null||t instanceof Element&&t.tagName===`DIV`););return t}function C(){var t;if(!e.disabled){if(_.push(i),e.autoFocus){let{initialFocusTo:n}=e;n===void 0?T(`first`):(t=d(n))==null||t.focus({preventScroll:!0})}h=!0,document.addEventListener(`focus`,x,!0)}}function w(){var t;if(e.disabled||(document.removeEventListener(`focus`,x,!0),_=_.filter(e=>e!==i),y()))return;let{finalFocusTo:n}=e;n===void 0?e.returnFocusOnDeactivated&&v instanceof HTMLElement&&(g=!0,v.focus({preventScroll:!0}),g=!1):(t=d(n))==null||t.focus({preventScroll:!0})}function T(t){if(y()&&e.active){let e=a.value,n=f.value;if(e!==null&&n!==null){let r=S();if(r==null||r===n){g=!0,e.focus({preventScroll:!0}),g=!1;return}g=!0;let i=t===`first`?p(r):m(r);g=!1,i||(g=!0,e.focus({preventScroll:!0}),g=!1)}}}function E(e){if(g)return;let t=S();t!==null&&(e.relatedTarget!==null&&t.contains(e.relatedTarget)?T(`last`):T(`first`))}function D(e){g||(e.relatedTarget!==null&&e.relatedTarget===a.value?T(`last`):T(`first`))}return{focusableStartRef:a,focusableEndRef:f,focusableStyle:`position: absolute; height: 0; width: 0;`,handleStartFocus:E,handleEndFocus:D}},render(){let{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();let{active:n,focusableStyle:r}=this;return e(i,null,[e(`div`,{"aria-hidden":`true`,tabindex:n?`0`:`-1`,ref:`focusableStartRef`,style:r,onFocus:this.handleStartFocus}),t(),e(`div`,{"aria-hidden":`true`,style:r,ref:`focusableEndRef`,tabindex:n?`0`:`-1`,onFocus:this.handleEndFocus})])}}),y=new WeakSet;function b(e){y.add(e)}function x(e){return!y.has(e)}function S(e,t=[],n){let r={};return t.forEach(t=>{r[t]=e[t]}),Object.assign(r,n)}export{v as i,x as n,b as r,S as t}; \ No newline at end of file +import{Mt as e,Ut as t,Vt as n,hn as r,ht as i,kt as a,nn as o}from"./client-Bz0sY7Lm.js";import{d as s,f as c,u as l}from"./Card-BGJkYb2B.js";import{nt as u}from"./index-NE0dsiiJ.js";function d(e){return typeof e==`string`?document.querySelector(e):e()||null}function f(e){return e instanceof HTMLElement}function p(e){for(let t=0;t=0;t--){let n=e.childNodes[t];if(f(n)&&(h(n)||m(n)))return!0}return!1}function h(e){if(!g(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function g(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.getAttribute(`disabled`))return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`SELECT`:case`TEXTAREA`:return!0;default:return!1}}var _=[],v=a({name:`FocusTrap`,props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){let i=u(),a=r(null),f=r(null),h=!1,g=!1,v=typeof document>`u`?null:document.activeElement;function y(){return _[_.length-1]===i}function b(t){var n;t.code===`Escape`&&y()&&((n=e.onEsc)==null||n.call(e,t))}t(()=>{o(()=>e.active,e=>{e?(C(),s(`keydown`,document,b)):(l(`keydown`,document,b),h&&w())},{immediate:!0})}),n(()=>{l(`keydown`,document,b),h&&w()});function x(e){if(!g&&y()){let t=S();if(t===null||t.contains(c(e)))return;T(`first`)}}function S(){let e=a.value;if(e===null)return null;let t=e;for(;t=t.nextSibling,!(t===null||t instanceof Element&&t.tagName===`DIV`););return t}function C(){var t;if(!e.disabled){if(_.push(i),e.autoFocus){let{initialFocusTo:n}=e;n===void 0?T(`first`):(t=d(n))==null||t.focus({preventScroll:!0})}h=!0,document.addEventListener(`focus`,x,!0)}}function w(){var t;if(e.disabled||(document.removeEventListener(`focus`,x,!0),_=_.filter(e=>e!==i),y()))return;let{finalFocusTo:n}=e;n===void 0?e.returnFocusOnDeactivated&&v instanceof HTMLElement&&(g=!0,v.focus({preventScroll:!0}),g=!1):(t=d(n))==null||t.focus({preventScroll:!0})}function T(t){if(y()&&e.active){let e=a.value,n=f.value;if(e!==null&&n!==null){let r=S();if(r==null||r===n){g=!0,e.focus({preventScroll:!0}),g=!1;return}g=!0;let i=t===`first`?p(r):m(r);g=!1,i||(g=!0,e.focus({preventScroll:!0}),g=!1)}}}function E(e){if(g)return;let t=S();t!==null&&(e.relatedTarget!==null&&t.contains(e.relatedTarget)?T(`last`):T(`first`))}function D(e){g||(e.relatedTarget!==null&&e.relatedTarget===a.value?T(`last`):T(`first`))}return{focusableStartRef:a,focusableEndRef:f,focusableStyle:`position: absolute; height: 0; width: 0;`,handleStartFocus:E,handleEndFocus:D}},render(){let{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();let{active:n,focusableStyle:r}=this;return e(i,null,[e(`div`,{"aria-hidden":`true`,tabindex:n?`0`:`-1`,ref:`focusableStartRef`,style:r,onFocus:this.handleStartFocus}),t(),e(`div`,{"aria-hidden":`true`,style:r,ref:`focusableEndRef`,tabindex:n?`0`:`-1`,onFocus:this.handleEndFocus})])}}),y=new WeakSet;function b(e){y.add(e)}function x(e){return!y.has(e)}function S(e,t=[],n){let r={};return t.forEach(t=>{r[t]=e[t]}),Object.assign(r,n)}export{v as i,x as n,b as r,S as t}; \ No newline at end of file diff --git a/frontend/dist/assets/text-BblwgAv2.js b/frontend/dist/assets/text-LOpQkUng.js similarity index 97% rename from frontend/dist/assets/text-BblwgAv2.js rename to frontend/dist/assets/text-LOpQkUng.js index 22cbc40..93a25b9 100644 --- a/frontend/dist/assets/text-BblwgAv2.js +++ b/frontend/dist/assets/text-LOpQkUng.js @@ -1,4 +1,4 @@ -import{H as e,Mt as t,U as n,at as r,bt as i,kt as a,nt as o,p as s,st as c}from"./client-Bz0sY7Lm.js";import{t as l}from"./use-compitable-BIRdD7BE.js";import{c as u}from"./index-6B3OmSLg.js";var d=o(`text`,` +import{H as e,Mt as t,U as n,at as r,bt as i,kt as a,nt as o,p as s,st as c}from"./client-Bz0sY7Lm.js";import{t as l}from"./use-compitable-BIRdD7BE.js";import{c as u}from"./index-NE0dsiiJ.js";var d=o(`text`,` transition: color .3s var(--n-bezier); color: var(--n-text-color); `,[r(`strong`,` diff --git a/frontend/dist/assets/useDeviceContext-dfnN0nNy.js b/frontend/dist/assets/useDeviceContext-mGSTXKkG.js similarity index 62% rename from frontend/dist/assets/useDeviceContext-dfnN0nNy.js rename to frontend/dist/assets/useDeviceContext-mGSTXKkG.js index 70c0874..1d6af12 100644 --- a/frontend/dist/assets/useDeviceContext-dfnN0nNy.js +++ b/frontend/dist/assets/useDeviceContext-mGSTXKkG.js @@ -1 +1 @@ -import{fn as e,nn as t}from"./client-Bz0sY7Lm.js";import{n}from"./index-6B3OmSLg.js";function r(r){let i=n().claim();t(r,i.set,{immediate:!0}),e(i.clear)}export{r as t}; \ No newline at end of file +import{fn as e,nn as t}from"./client-Bz0sY7Lm.js";import{n}from"./index-NE0dsiiJ.js";function r(r){let i=n().claim();t(r,i.set,{immediate:!0}),e(i.clear)}export{r as t}; \ No newline at end of file diff --git a/frontend/dist/assets/utils-Bog0tJH6.js b/frontend/dist/assets/utils-Bog0tJH6.js deleted file mode 100644 index 54f3a9e..0000000 --- a/frontend/dist/assets/utils-Bog0tJH6.js +++ /dev/null @@ -1,131 +0,0 @@ -import{H as e,Ht as t,J as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,at as u,bt as d,g as f,hn as p,it as m,kt as h,nn as g,nt as _,ot as v,p as y,qt as b,st as x,tt as S,vn as C,zt as w}from"./client-Bz0sY7Lm.js";import{c as T,n as E,r as D,s as O,u as k}from"./Follower-C1zQmxY2.js";import{c as A,i as j,l as M}from"./Card-D1LVu21r.js";import{i as N,o as P,s as F}from"./es-BhJOHfSF.js";import{i as ee,n as I}from"./Suffix-JLavbuLO.js";import{i as L,o as R}from"./_plugin-vue_export-helper-CtHwEvHL.js";import{F as te,I as ne,P as re,Z as z,et as B,it as ie,q as V}from"./index-6B3OmSLg.js";function H(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function U(e){return e&-e}var W=class{constructor(e,t){this.l=e,this.min=t;let n=Array(e+1);for(let t=0;tr)throw Error("[FinweckTree.sum]: `i` is larger than length.");let i=e*n;for(;e>0;)i+=t[e],e-=U(e);return i}getBound(e){let t=0,n=this.l;for(;n>t;){let r=Math.floor((t+n)/2),i=this.sum(r);if(i>e){n=r;continue}else if(i`u`?!1:(G===void 0&&(G=`matchMedia`in window?window.matchMedia(`(pointer:coarse)`).matches:!1),G)}var q;function J(){return typeof document>`u`?1:(q===void 0&&(q=`chrome`in window?window.devicePixelRatio:1),q)}var Y=`VVirtualListXScroll`;function ae({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){let r=p(0),i=p(0),a=d(()=>{let t=e.value;if(t.length===0)return null;let n=new W(t.length,0);return t.forEach((e,t)=>{n.add(t,e.width)}),n});return b(Y,{startIndexRef:B(()=>{let e=a.value;return e===null?0:Math.max(e.getBound(i.value)-1,0)}),endIndexRef:B(()=>{let t=a.value;return t===null?0:Math.min(t.getBound(i.value+r.value)+1,e.value.length-1)}),columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:e=>{let t=a.value;return t===null?0:t.sum(e)}}),{listWidthRef:r,scrollLeftRef:i}}var X=h({name:`VirtualListRow`,props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){let{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=a(Y);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){let{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:a,item:o}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:o,getLeft:a});if(r!=null){let i=[];for(let s=e;s<=t;++s){let e=n[s];i.push(r({column:e,left:a(s),item:o}))}return i}return null}}),oe=E(`.v-vl`,{maxHeight:`inherit`,height:`100%`,overflow:`auto`,minWidth:`1px`},[E(`&:not(.v-vl--show-scrollbar)`,{scrollbarWidth:`none`},[E(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,{width:0,height:0,display:`none`})])]),se=h({name:`VirtualList`,inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:`div`},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:`key`},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let r=n();oe.mount({id:`vueuc/virtual-list`,head:!0,anchorMetaName:D,ssr:r}),c(()=>{let{defaultScrollIndex:t,defaultScrollKey:n}=e;t==null?n!=null&&x({key:n}):x({index:t})});let i=!1,a=!1;w(()=>{if(i=!1,!a){a=!0;return}x({top:v.value,left:l.value})}),t(()=>{i=!0,a||=!0});let o=B(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let t=0;return e.columns.forEach(e=>{t+=e.width}),t}),s=d(()=>{let t=new Map,{keyField:n}=e;return e.items.forEach((e,r)=>{t.set(e[n],r)}),t}),{scrollLeftRef:l,listWidthRef:u}=ae({columnsRef:C(e,`columns`),renderColRef:C(e,`renderCol`),renderItemWithColsRef:C(e,`renderItemWithCols`)}),f=p(null),m=p(void 0),h=new Map,g=d(()=>{let{items:t,itemSize:n,keyField:r}=e,i=new W(t.length,n);return t.forEach((e,t)=>{let n=e[r],a=h.get(n);a!==void 0&&i.add(t,a)}),i}),_=p(0),v=p(0),y=B(()=>Math.max(g.value.getBound(v.value-N(e.paddingTop))-1,0)),b=d(()=>{let{value:t}=m;if(t===void 0)return[];let{items:n,itemSize:r}=e,i=y.value,a=Math.min(i+Math.ceil(t/r+1),n.length-1),o=[];for(let e=i;e<=a;++e)o.push(n[e]);return o}),x=(e,t)=>{if(typeof e==`number`){O(e,t,`auto`);return}let{left:n,top:r,index:i,key:a,position:o,behavior:c,debounce:l=!0}=e;if(n!==void 0||r!==void 0)O(n,r,c);else if(i!==void 0)E(i,c,l);else if(a!==void 0){let e=s.value.get(a);e!==void 0&&E(e,c,l)}else o===`bottom`?O(0,2**53-1,c):o===`top`&&O(0,0,c)},S,T=null;function E(t,n,r){let{value:i}=g,a=i.sum(t)+N(e.paddingTop);if(!r)f.value.scrollTo({left:0,top:a,behavior:n});else{S=t,T!==null&&window.clearTimeout(T),T=window.setTimeout(()=>{S=void 0,T=null},16);let{scrollTop:e,offsetHeight:r}=f.value;if(a>e){let o=i.get(t);a+o<=e+r||f.value.scrollTo({left:0,top:a+o-r,behavior:n})}else f.value.scrollTo({left:0,top:a,behavior:n})}}function O(e,t,n){f.value.scrollTo({left:e,top:t,behavior:n})}function A(t,n){if(i||e.ignoreItemResize||R(n.target))return;let{value:r}=g,a=s.value.get(t),o=r.get(a),c=n.borderBoxSize?.[0]?.blockSize??n.contentRect.height;if(c===o)return;c-e.itemSize===0?h.delete(t):h.set(t,c-e.itemSize);let l=c-o;if(l===0)return;r.add(a,l);let u=f.value;if(u!=null){if(S===void 0){let e=r.sum(a);u.scrollTop>e&&u.scrollBy(0,l)}else(au.scrollTop+u.offsetHeight)&&u.scrollBy(0,l);L()}_.value++}let j=!K(),M=!1;function P(t){var n;(n=e.onScroll)==null||n.call(e,t),(!j||!M)&&L()}function ee(t){var n;if((n=e.onWheel)==null||n.call(e,t),j){let e=f.value;if(e!=null){if(t.deltaX===0&&(e.scrollTop===0&&t.deltaY<=0||e.scrollTop+e.offsetHeight>=e.scrollHeight&&t.deltaY>=0))return;t.preventDefault(),e.scrollTop+=t.deltaY/J(),e.scrollLeft+=t.deltaX/J(),L(),M=!0,k(()=>{M=!1})}}}function I(t){if(i||R(t.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(t.contentRect.height===m.value)return}else if(t.contentRect.height===m.value&&t.contentRect.width===u.value)return;m.value=t.contentRect.height,u.value=t.contentRect.width;let{onResize:n}=e;n!==void 0&&n(t)}function L(){let{value:e}=f;e!=null&&(v.value=e.scrollTop,l.value=e.scrollLeft)}function R(e){let t=e;for(;t!==null;){if(t.style.display===`none`)return!0;t=t.parentElement}return!1}return{listHeight:m,listStyle:{overflow:`auto`},keyToIndex:s,itemsStyle:d(()=>{let{itemResizable:t}=e,n=F(g.value.sum());return _.value,[e.itemsStyle,{boxSizing:`content-box`,width:F(o.value),height:t?``:n,minHeight:t?n:``,paddingTop:F(e.paddingTop),paddingBottom:F(e.paddingBottom)}]}),visibleItemsStyle:d(()=>(_.value,{transform:`translateY(${F(g.value.sum(y.value))})`})),viewportItems:b,listElRef:f,itemsElRef:p(null),scrollTo:x,handleListResize:I,handleListScroll:P,handleListWheel:ee,handleItemResize:A}},render(){let{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:a}=this;return i(A,{onResize:this.handleListResize},{default:()=>{var o;return i(`div`,r(this.$attrs,{class:[`v-vl`,this.showScrollbar&&`v-vl--show-scrollbar`],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:`listElRef`}),[this.items.length===0?(o=this.$slots).empty?.call(o):i(`div`,{ref:`itemsElRef`,class:`v-vl-items`,style:this.itemsStyle},[i(a,Object.assign({class:`v-vl-visible-items`,style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{let{renderCol:r,renderItemWithCols:a}=this;return this.viewportItems.map(o=>{let s=o[t],c=n.get(s),l=r==null?void 0:i(X,{index:c,item:o}),u=a==null?void 0:i(X,{index:c,item:o}),d=this.$slots.default({item:o,renderedCols:l,renderedItemWithCols:u,index:c})[0];return e?i(A,{key:s,onResize:e=>this.handleItemResize(s,e)},{default:()=>d}):(d.key=s,d)})}})])])}})}});function ce(e,t){t&&(c(()=>{let{value:n}=e;n&&M.registerHandler(n,t)}),g(e,(e,t)=>{t&&M.unregisterHandler(t)},{deep:!1}),l(()=>{let{value:t}=e;t&&M.unregisterHandler(t)}))}function Z(e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?t[0]:t=>{e.forEach(e=>{e&&e(t)})}}var le=h({name:`Checkmark`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`},i(`g`,{fill:`none`},i(`path`,{d:`M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z`,fill:`currentColor`})))}}),ue=h({name:`Empty`,render(){return i(`svg`,{viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z`,fill:`currentColor`}),i(`path`,{d:`M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z`,fill:`currentColor`}))}}),de=h({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i(`div`,{style:`width: 0; height: 0`,tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function fe(e){return Array.isArray(e)?e:[e]}var pe={STOP:`STOP`};function me(e,t){let n=t(e);e.children!==void 0&&n!==pe.STOP&&e.children.forEach(e=>me(e,t))}function he(e,t={}){let{preserveGroup:n=!1}=t,r=[],i=n?e=>{e.isLeaf||(r.push(e.key),a(e.children))}:e=>{e.isLeaf||(e.isGroup||r.push(e.key),a(e.children))};function a(e){e.forEach(i)}return a(e),r}function ge(e,t){let{isLeaf:n}=e;return n===void 0?!t(e):n}function _e(e){return e.children}function ve(e){return e.key}function ye(){return!1}function be(e,t){let{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function xe(e){return e.disabled===!0}function Se(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Ce(e){return e==null?[]:Array.isArray(e)?e:e.checkedKeys??[]}function we(e){return e==null||Array.isArray(e)?[]:e.indeterminateKeys??[]}function Te(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)||n.add(e)}),Array.from(n)}function Ee(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)&&n.delete(e)}),Array.from(n)}function De(e){return e?.type===`group`}function Oe(e){let t=new Map;return e.forEach((e,n)=>{t.set(e.key,n)}),e=>t.get(e)??null}var ke=class extends Error{constructor(){super(),this.message=`SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.`}};function Ae(e,t,n,r){return Q(t.concat(e),n,r,!1)}function je(e,t){let n=new Set;return e.forEach(e=>{let r=t.treeNodeMap.get(e);if(r!==void 0){let e=r.parent;for(;e!==null&&!(e.disabled||n.has(e.key));)n.add(e.key),e=e.parent}}),n}function Me(e,t,n,r){let i=Q(t,n,r,!1),a=Q(e,n,r,!0),o=je(e,n),s=[];return i.forEach(e=>{(a.has(e)||o.has(e))&&s.push(e)}),s.forEach(e=>i.delete(e)),i}function Ne(e,t){let{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:o,leafOnly:s,checkStrategy:c,allowNotLoaded:l}=e;if(!o)return r===void 0?i===void 0?{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)}:{checkedKeys:Ee(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Te(n,r),indeterminateKeys:Array.from(a)};let{levelTreeNodeMap:u}=t,d;d=i===void 0?r===void 0?Q(n,t,l,!1):Ae(r,n,t,l):Me(i,n,t,l);let f=c===`parent`,p=c===`child`||s,m=d,h=new Set,g=Math.max.apply(null,Array.from(u.keys()));for(let e=g;e>=0;--e){let t=e===0,n=u.get(e);for(let e of n){if(e.isLeaf)continue;let{key:n,shallowLoaded:r}=e;if(p&&r&&e.children.forEach(e=>{!e.disabled&&!e.isLeaf&&e.shallowLoaded&&m.has(e.key)&&m.delete(e.key)}),e.disabled||!r)continue;let i=!0,a=!1,o=!0;for(let t of e.children){let e=t.key;if(!t.disabled){if(o&&=!1,m.has(e))a=!0;else if(h.has(e)){a=!0,i=!1;break}else if(i=!1,a)break}}i&&!o?(f&&e.children.forEach(e=>{!e.disabled&&m.has(e.key)&&m.delete(e.key)}),m.add(n)):a&&h.add(n),t&&p&&m.has(n)&&m.delete(n)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(h)}}function Q(e,t,n,r){let{treeNodeMap:i,getChildren:a}=t,o=new Set,s=new Set(e);return e.forEach(e=>{let t=i.get(e);t!==void 0&&me(t,e=>{if(e.disabled)return pe.STOP;let{key:t}=e;if(!o.has(t)&&(o.add(t),s.add(t),Se(e.rawNode,a))){if(r)return pe.STOP;if(!n)throw new ke}})}),s}function Pe(e,{includeGroup:t=!1,includeSelf:n=!0},r){let i=r.treeNodeMap,a=e==null?null:i.get(e)??null,o={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return o.treeNode=null,o;for(;a;)!a.ignored&&(t||!a.isGroup)&&o.treeNodePath.push(a),a=a.parent;return o.treeNodePath.reverse(),n||o.treeNodePath.pop(),o.keyPath=o.treeNodePath.map(e=>e.key),o}function Fe(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Ie(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function Le(e,t,{loop:n=!1,includeDisabled:r=!1}={}){let i=t===`prev`?Re:Ie,a={reverse:t===`prev`},o=!1,s=null;function c(t){if(t!==null){if(t===e){if(!o)o=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!t.disabled||r)&&!t.ignored&&!t.isGroup){s=t;return}if(t.isGroup){let e=Be(t,a);e===null?c(i(t,n)):s=e}else{let e=i(t,!1);if(e!==null)c(e);else{let e=ze(t);e?.isGroup?c(i(e,n)):n&&c(i(t,!0))}}}}return c(e),s}function Re(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function ze(e){return e.parent}function Be(e,t={}){let{reverse:n=!1}=t,{children:r}=e;if(r){let{length:e}=r,i=n?e-1:0,a=n?-1:e,o=n?-1:1;for(let e=i;e!==a;e+=o){let n=r[e];if(!n.disabled&&!n.ignored)if(n.isGroup){let e=Be(n,t);if(e!==null)return e}else return n}}return null}var Ve={getChild(){return this.ignored?null:Be(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return Le(this,`next`,e)},getPrev(e={}){return Le(this,`prev`,e)}};function He(e,t){let n=t?new Set(t):void 0,r=[];function i(e){e.forEach(e=>{r.push(e),!(e.isLeaf||!e.children||e.ignored)&&(e.isGroup||n===void 0||n.has(e.key))&&i(e.children)})}return i(e),r}function Ue(e,t){let n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function We(e,t,n,r,i,a=null,o=0){let s=[];return e.forEach((c,l)=>{var u;let d=Object.create(r);if(d.rawNode=c,d.siblings=s,d.level=o,d.index=l,d.isFirstChild=l===0,d.isLastChild=l+1===e.length,d.parent=a,!d.ignored){let e=i(c);Array.isArray(e)&&(d.children=We(e,t,n,r,i,d,o+1))}s.push(d),t.set(d.key,d),n.has(o)||n.set(o,[]),(u=n.get(o))==null||u.push(d)}),s}function Ge(e,t={}){let n=new Map,r=new Map,{getDisabled:i=xe,getIgnored:a=ye,getIsGroup:o=De,getKey:s=ve}=t,c=t.getChildren??_e,l=t.ignoreEmptyChildren?e=>{let t=c(e);return Array.isArray(t)?t.length?t:null:t}:c,u=We(e,n,r,Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return o(this.rawNode)},get isLeaf(){return ge(this.rawNode,l)},get shallowLoaded(){return be(this.rawNode,l)},get ignored(){return a(this.rawNode)},contains(e){return Ue(this,e)}},Ve),l);function d(e){if(e==null)return null;let t=n.get(e);return t&&!t.isGroup&&!t.ignored?t:null}function f(e){if(e==null)return null;let t=n.get(e);return t&&!t.ignored?t:null}function p(e,t){let n=f(e);return n?n.getPrev(t):null}function m(e,t){let n=f(e);return n?n.getNext(t):null}function h(e){let t=f(e);return t?t.getParent():null}function g(e){let t=f(e);return t?t.getChild():null}let _={treeNodes:u,treeNodeMap:n,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:l,getFlattenedNodes(e){return He(u,e)},getNode:d,getPrev:p,getNext:m,getParent:h,getChild:g,getFirstAvailableNode(){return Fe(u)},getPath(e,t={}){return Pe(e,t,_)},getCheckedKeys(e,t={}){let{cascade:n=!0,leafOnly:r=!1,checkStrategy:i=`all`,allowNotLoaded:a=!1}=t;return Ne({checkedKeys:Ce(e),indeterminateKeys:we(e),cascade:n,leafOnly:r,checkStrategy:i,allowNotLoaded:a},_)},check(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return Ne({checkedKeys:Ce(t),indeterminateKeys:we(t),keysToCheck:e==null?[]:fe(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},uncheck(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return Ne({checkedKeys:Ce(t),indeterminateKeys:we(t),keysToUncheck:e==null?[]:fe(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},getNonLeafKeys(e={}){return he(u,e)}};return _}var Ke=_(`empty`,` - display: flex; - flex-direction: column; - align-items: center; - font-size: var(--n-font-size); -`,[m(`icon`,` - width: var(--n-icon-size); - height: var(--n-icon-size); - font-size: var(--n-icon-size); - line-height: var(--n-icon-size); - color: var(--n-icon-color); - transition: - color .3s var(--n-bezier); - `,[S(`+`,[m(`description`,` - margin-top: 8px; - `)])]),m(`description`,` - transition: color .3s var(--n-bezier); - color: var(--n-text-color); - `),m(`extra`,` - text-align: center; - transition: color .3s var(--n-bezier); - margin-top: 12px; - color: var(--n-extra-text-color); - `)]),qe=h({name:`Empty`,props:Object.assign(Object.assign({},y.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:`medium`},renderIcon:Function}),slots:Object,setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:a}=s(t),o=y(`Empty`,`-empty`,Ke,te,t,n),{localeRef:c}=ee(`Empty`),l=d(()=>t.description??a?.value?.Empty?.description),u=d(()=>a?.value?.Empty?.renderIcon||(()=>i(ue,null))),f=d(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{[x(`iconSize`,e)]:r,[x(`fontSize`,e)]:i,textColor:a,iconColor:s,extraTextColor:c}}=o.value;return{"--n-icon-size":r,"--n-font-size":i,"--n-bezier":n,"--n-text-color":a,"--n-icon-color":s,"--n-extra-text-color":c}}),p=r?e(`empty`,d(()=>{let e=``,{size:n}=t;return e+=n[0],e}),f,t):void 0;return{mergedClsPrefix:n,mergedRenderIcon:u,localizedDescription:d(()=>l.value||c.value.description),cssVars:r?void 0:f,themeClass:p?.themeClass,onRender:p?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n?.(),i(`div`,{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?i(`div`,{class:`${t}-empty__icon`},e.icon?e.icon():i(V,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?i(`div`,{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?i(`div`,{class:`${t}-empty__extra`},e.extra()):null)}}),Je=h({name:`NBaseSelectGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=a(T);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){let{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:a}}=this,o=r?.(a),s=t?t(a,!1):z(a[this.labelField],a,!1),c=i(`div`,Object.assign({},o,{class:[`${e}-base-select-group-header`,o?.class]}),s);return a.render?a.render({node:c,option:a}):n?n({node:c,option:a,selected:!1}):c}});function Ye(e,t){return i(ie,{name:`fade-in-scale-up-transition`},{default:()=>e?i(V,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>i(le)}):null})}var Xe=h({name:`NBaseSelectOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:o,renderOptionRef:s,labelFieldRef:c,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:d,handleOptionClick:f,handleOptionMouseEnter:p}=a(T),m=B(()=>{let{value:t}=n;return t?e.tmNode.key===t.key:!1});function h(t){let{tmNode:n}=e;n.disabled||f(t,n)}function g(t){let{tmNode:n}=e;n.disabled||p(t,n)}function _(t){let{tmNode:n}=e,{value:r}=m;n.disabled||r||p(t,n)}return{multiple:r,isGrouped:B(()=>{let{tmNode:t}=e,{parent:n}=t;return n&&n.rawNode.type===`group`}),showCheckmark:u,nodeProps:d,isPending:m,isSelected:B(()=>{let{value:n}=t,{value:a}=r;if(n===null)return!1;let o=e.tmNode.rawNode[l.value];if(a){let{value:e}=i;return e.has(o)}else return n===o}),labelField:c,renderLabel:o,renderOption:s,handleMouseMove:_,handleMouseEnter:g,handleClick:h}},render(){let{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:a,showCheckmark:o,nodeProps:s,renderOption:c,renderLabel:l,handleClick:u,handleMouseEnter:d,handleMouseMove:f}=this,p=Ye(n,e),m=l?[l(t,n),o&&p]:[z(t[this.labelField],t,n),o&&p],h=s?.(t),g=i(`div`,Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h?.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:a,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:o}],style:[h?.style||``,t.style||``],onClick:Z([u,h?.onClick]),onMouseenter:Z([d,h?.onMouseenter]),onMousemove:Z([f,h?.onMousemove])}),i(`div`,{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:g,option:t,selected:n}):c?c({node:g,option:t,selected:n}):g}}),Ze=_(`base-select-menu`,` - line-height: 1.5; - outline: none; - z-index: 0; - position: relative; - border-radius: var(--n-border-radius); - transition: - background-color .3s var(--n-bezier), - box-shadow .3s var(--n-bezier); - background-color: var(--n-color); -`,[_(`scrollbar`,` - max-height: var(--n-height); - `),_(`virtual-list`,` - max-height: var(--n-height); - `),_(`base-select-option`,` - min-height: var(--n-option-height); - font-size: var(--n-option-font-size); - display: flex; - align-items: center; - `,[m(`content`,` - z-index: 1; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - `)]),_(`base-select-group-header`,` - min-height: var(--n-option-height); - font-size: .93em; - display: flex; - align-items: center; - `),_(`base-select-menu-option-wrapper`,` - position: relative; - width: 100%; - `),m(`loading, empty`,` - display: flex; - padding: 12px 32px; - flex: 1; - justify-content: center; - `),m(`loading`,` - color: var(--n-loading-color); - font-size: var(--n-loading-size); - `),m(`header`,` - padding: 8px var(--n-option-padding-left); - font-size: var(--n-option-font-size); - transition: - color .3s var(--n-bezier), - border-color .3s var(--n-bezier); - border-bottom: 1px solid var(--n-action-divider-color); - color: var(--n-action-text-color); - `),m(`action`,` - padding: 8px var(--n-option-padding-left); - font-size: var(--n-option-font-size); - transition: - color .3s var(--n-bezier), - border-color .3s var(--n-bezier); - border-top: 1px solid var(--n-action-divider-color); - color: var(--n-action-text-color); - `),_(`base-select-group-header`,` - position: relative; - cursor: default; - padding: var(--n-option-padding); - color: var(--n-group-header-text-color); - `),_(`base-select-option`,` - cursor: pointer; - position: relative; - padding: var(--n-option-padding); - transition: - color .3s var(--n-bezier), - opacity .3s var(--n-bezier); - box-sizing: border-box; - color: var(--n-option-text-color); - opacity: 1; - `,[u(`show-checkmark`,` - padding-right: calc(var(--n-option-padding-right) + 20px); - `),S(`&::before`,` - content: ""; - position: absolute; - left: 4px; - right: 4px; - top: 0; - bottom: 0; - border-radius: var(--n-border-radius); - transition: background-color .3s var(--n-bezier); - `),S(`&:active`,` - color: var(--n-option-text-color-pressed); - `),u(`grouped`,` - padding-left: calc(var(--n-option-padding-left) * 1.5); - `),u(`pending`,[S(`&::before`,` - background-color: var(--n-option-color-pending); - `)]),u(`selected`,` - color: var(--n-option-text-color-active); - `,[S(`&::before`,` - background-color: var(--n-option-color-active); - `),u(`pending`,[S(`&::before`,` - background-color: var(--n-option-color-active-pending); - `)])]),u(`disabled`,` - cursor: not-allowed; - `,[v(`selected`,` - color: var(--n-option-text-color-disabled); - `),u(`selected`,` - opacity: var(--n-option-opacity-disabled); - `)]),m(`check`,` - font-size: 16px; - position: absolute; - right: calc(var(--n-option-padding-right) - 4px); - top: calc(50% - 7px); - color: var(--n-option-check-color); - transition: color .3s var(--n-bezier); - `,[I({enterScale:`0.5`})])])]),Qe=h({name:`InternalSelectMenu`,props:Object.assign(Object.assign({},y.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:`medium`},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,scrollbarProps:Object,onToggle:Function}),setup(t){let{mergedClsPrefixRef:n,mergedRtlRef:r,mergedComponentPropsRef:i}=s(t),a=f(`InternalSelectMenu`,r,n),u=y(`InternalSelectMenu`,`-internal-select-menu`,Ze,re,t,C(t,`clsPrefix`)),m=p(null),h=p(null),_=p(null),v=d(()=>t.treeMate.getFlattenedNodes()),S=d(()=>Oe(v.value)),w=p(null);function E(){let{treeMate:e}=t,n=null,{value:r}=t;r===null?n=e.getFirstAvailableNode():(n=t.multiple?e.getNode((r||[])[(r||[]).length-1]):e.getNode(r),(!n||n.disabled)&&(n=e.getFirstAvailableNode())),K(n||null)}function D(){let{value:e}=w;e&&!t.treeMate.getNode(e.key)&&(w.value=null)}let k;g(()=>t.show,e=>{e?k=g(()=>t.treeMate,()=>{t.resetMenuOnOptionsChange?(t.autoPending?E():D(),o(q)):D()},{immediate:!0}):k?.()},{immediate:!0}),l(()=>{k?.()});let A=d(()=>N(u.value.self[x(`optionHeight`,t.size)])),j=d(()=>P(u.value.self[x(`padding`,t.size)])),M=d(()=>t.multiple&&Array.isArray(t.value)?new Set(t.value):new Set),F=d(()=>{let e=v.value;return e&&e.length===0}),ee=d(()=>i?.value?.Select?.renderEmpty);function I(e){let{onToggle:n}=t;n&&n(e)}function L(e){let{onScroll:n}=t;n&&n(e)}function R(e){var t;(t=_.value)==null||t.sync(),L(e)}function te(){var e;(e=_.value)==null||e.sync()}function ne(){let{value:e}=w;return e||null}function z(e,t){t.disabled||K(t,!1)}function B(e,t){t.disabled||I(t)}function ie(e){var n;H(e,`action`)||(n=t.onKeyup)==null||n.call(t,e)}function V(e){var n;H(e,`action`)||(n=t.onKeydown)==null||n.call(t,e)}function U(e){var n;(n=t.onMousedown)==null||n.call(t,e),!t.focusable&&e.preventDefault()}function W(){let{value:e}=w;e&&K(e.getNext({loop:!0}),!0)}function G(){let{value:e}=w;e&&K(e.getPrev({loop:!0}),!0)}function K(e,t=!1){w.value=e,t&&q()}function q(){var e,n;let r=w.value;if(!r)return;let i=S.value(r.key);i!==null&&(t.virtualScroll?(e=h.value)==null||e.scrollTo({index:i}):(n=_.value)==null||n.scrollTo({index:i,elSize:A.value}))}function J(e){var n;m.value?.contains(e.target)&&((n=t.onFocus)==null||n.call(t,e))}function Y(e){var n;m.value?.contains(e.relatedTarget)||(n=t.onBlur)==null||n.call(t,e)}b(T,{handleOptionMouseEnter:z,handleOptionClick:B,valueSetRef:M,pendingTmNodeRef:w,nodePropsRef:C(t,`nodeProps`),showCheckmarkRef:C(t,`showCheckmark`),multipleRef:C(t,`multiple`),valueRef:C(t,`value`),renderLabelRef:C(t,`renderLabel`),renderOptionRef:C(t,`renderOption`),labelFieldRef:C(t,`labelField`),valueFieldRef:C(t,`valueField`)}),b(O,m),c(()=>{let{value:e}=_;e&&e.sync()});let ae=d(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{height:r,borderRadius:i,color:a,groupHeaderTextColor:o,actionDividerColor:s,optionTextColorPressed:c,optionTextColor:l,optionTextColorDisabled:d,optionTextColorActive:f,optionOpacityDisabled:p,optionCheckColor:m,actionTextColor:h,optionColorPending:g,optionColorActive:_,loadingColor:v,loadingSize:y,optionColorActivePending:b,[x(`optionFontSize`,e)]:S,[x(`optionHeight`,e)]:C,[x(`optionPadding`,e)]:w}}=u.value;return{"--n-height":r,"--n-action-divider-color":s,"--n-action-text-color":h,"--n-bezier":n,"--n-border-radius":i,"--n-color":a,"--n-option-font-size":S,"--n-group-header-text-color":o,"--n-option-check-color":m,"--n-option-color-pending":g,"--n-option-color-active":_,"--n-option-color-active-pending":b,"--n-option-height":C,"--n-option-opacity-disabled":p,"--n-option-text-color":l,"--n-option-text-color-active":f,"--n-option-text-color-disabled":d,"--n-option-text-color-pressed":c,"--n-option-padding":w,"--n-option-padding-left":P(w,`left`),"--n-option-padding-right":P(w,`right`),"--n-loading-color":v,"--n-loading-size":y}}),{inlineThemeDisabled:X}=t,oe=X?e(`internal-select-menu`,d(()=>t.size[0]),ae,t):void 0,se={selfRef:m,next:W,prev:G,getPendingTmNode:ne};return ce(m,t.onResize),Object.assign({mergedTheme:u,mergedClsPrefix:n,rtlEnabled:a,virtualListRef:h,scrollbarRef:_,itemSize:A,padding:j,flattenedNodes:v,empty:F,mergedRenderEmpty:ee,virtualListContainer(){let{value:e}=h;return e?.listElRef},virtualListContent(){let{value:e}=h;return e?.itemsElRef},doScroll:L,handleFocusin:J,handleFocusout:Y,handleKeyUp:ie,handleKeyDown:V,handleMouseDown:U,handleVirtualListResize:te,handleVirtualListScroll:R,cssVars:X?void 0:ae,themeClass:oe?.themeClass,onRender:oe?.onRender},se)},render(){let{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:a,onRender:o}=this;return o?.(),i(`div`,{ref:`selfRef`,tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,`${n}-base-select-menu--${this.size}-size`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,a,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},R(e.header,e=>e&&i(`div`,{class:`${n}-base-select-menu__header`,"data-header":!0,key:`header`},e)),this.loading?i(`div`,{class:`${n}-base-select-menu__loading`},i(ne,{clsPrefix:n,strokeWidth:20})):this.empty?i(`div`,{class:`${n}-base-select-menu__empty`,"data-empty":!0},L(e.empty,()=>[this.mergedRenderEmpty?.call(this)||i(qe,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):i(j,Object.assign({ref:`scrollbarRef`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},this.scrollbarProps),{default:()=>t?i(se,{ref:`virtualListRef`,class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:e})=>e.isGroup?i(Je,{key:e.key,clsPrefix:n,tmNode:e}):e.ignored?null:i(Xe,{clsPrefix:n,key:e.key,tmNode:e})}):i(`div`,{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?i(Je,{key:e.key,clsPrefix:n,tmNode:e}):i(Xe,{clsPrefix:n,key:e.key,tmNode:e})))}),R(e.action,e=>e&&[i(`div`,{class:`${n}-base-select-menu__action`,"data-action":!0,key:`action`},e),i(de,{onFocus:this.onTabOut,key:`focus-detector`})]))}});function $(e){return e.type===`group`}function $e(e){return e.type===`ignored`}function et(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function tt(e,t){return{getIsGroup:$,getIgnored:$e,getKey(t){return $(t)?t.name||t.key||`key-required`:t[e]},getChildren(e){return e[t]}}}function nt(e,t,n,r){if(!t)return e;function i(e){if(!Array.isArray(e))return[];let a=[];for(let o of e)if($(o)){let e=i(o[r]);e.length&&a.push(Object.assign({},o,{[r]:e}))}else if($e(o))continue;else t(n,o)&&a.push(o);return a}return i(e)}function rt(e,t,n){let r=new Map;return e.forEach(e=>{$(e)?e[n].forEach(e=>{r.set(e[t],e)}):r.set(e[t],e)}),r}export{Qe as a,de as c,H as d,et as i,ce as l,rt as n,qe as o,nt as r,Ge as s,tt as t,se as u}; \ No newline at end of file diff --git a/frontend/dist/assets/utils-Dcx6g1AV.js b/frontend/dist/assets/utils-Dcx6g1AV.js new file mode 100644 index 0000000..0b9d680 --- /dev/null +++ b/frontend/dist/assets/utils-Dcx6g1AV.js @@ -0,0 +1,131 @@ +import{H as e,Ht as t,J as n,Lt as r,Mt as i,Pt as a,Rt as o,U as s,Ut as c,Vt as l,at as u,bt as d,g as f,hn as p,it as m,kt as h,nn as g,nt as _,ot as v,p as y,qt as b,st as x,tt as S,vn as C,zt as w}from"./client-Bz0sY7Lm.js";import{c as T,n as E,r as D,s as O,u as k}from"./Follower-BaR8jvSz.js";import{c as A,i as j,l as M}from"./Card-BGJkYb2B.js";import{i as N,o as P,s as F}from"./es-Qklex053.js";import{i as I,n as L}from"./Suffix-BBRLYxYK.js";import{i as R,o as z}from"./_plugin-vue_export-helper-CaiaXQaI.js";import{F as ee,I as te,J as ne,L as re,Q as B,at as ie,tt as V}from"./index-NE0dsiiJ.js";function H(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function U(e){return e&-e}var W=class{constructor(e,t){this.l=e,this.min=t;let n=Array(e+1);for(let t=0;tr)throw Error("[FinweckTree.sum]: `i` is larger than length.");let i=e*n;for(;e>0;)i+=t[e],e-=U(e);return i}getBound(e){let t=0,n=this.l;for(;n>t;){let r=Math.floor((t+n)/2),i=this.sum(r);if(i>e){n=r;continue}else if(i`u`?!1:(G===void 0&&(G=`matchMedia`in window?window.matchMedia(`(pointer:coarse)`).matches:!1),G)}var q;function J(){return typeof document>`u`?1:(q===void 0&&(q=`chrome`in window?window.devicePixelRatio:1),q)}var Y=`VVirtualListXScroll`;function ae({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){let r=p(0),i=p(0),a=d(()=>{let t=e.value;if(t.length===0)return null;let n=new W(t.length,0);return t.forEach((e,t)=>{n.add(t,e.width)}),n});return b(Y,{startIndexRef:V(()=>{let e=a.value;return e===null?0:Math.max(e.getBound(i.value)-1,0)}),endIndexRef:V(()=>{let t=a.value;return t===null?0:Math.min(t.getBound(i.value+r.value)+1,e.value.length-1)}),columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:e=>{let t=a.value;return t===null?0:t.sum(e)}}),{listWidthRef:r,scrollLeftRef:i}}var X=h({name:`VirtualListRow`,props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){let{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=a(Y);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){let{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:a,item:o}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:o,getLeft:a});if(r!=null){let i=[];for(let s=e;s<=t;++s){let e=n[s];i.push(r({column:e,left:a(s),item:o}))}return i}return null}}),oe=E(`.v-vl`,{maxHeight:`inherit`,height:`100%`,overflow:`auto`,minWidth:`1px`},[E(`&:not(.v-vl--show-scrollbar)`,{scrollbarWidth:`none`},[E(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,{width:0,height:0,display:`none`})])]),se=h({name:`VirtualList`,inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:`div`},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:`key`},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let r=n();oe.mount({id:`vueuc/virtual-list`,head:!0,anchorMetaName:D,ssr:r}),c(()=>{let{defaultScrollIndex:t,defaultScrollKey:n}=e;t==null?n!=null&&x({key:n}):x({index:t})});let i=!1,a=!1;w(()=>{if(i=!1,!a){a=!0;return}x({top:v.value,left:l.value})}),t(()=>{i=!0,a||=!0});let o=V(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let t=0;return e.columns.forEach(e=>{t+=e.width}),t}),s=d(()=>{let t=new Map,{keyField:n}=e;return e.items.forEach((e,r)=>{t.set(e[n],r)}),t}),{scrollLeftRef:l,listWidthRef:u}=ae({columnsRef:C(e,`columns`),renderColRef:C(e,`renderCol`),renderItemWithColsRef:C(e,`renderItemWithCols`)}),f=p(null),m=p(void 0),h=new Map,g=d(()=>{let{items:t,itemSize:n,keyField:r}=e,i=new W(t.length,n);return t.forEach((e,t)=>{let n=e[r],a=h.get(n);a!==void 0&&i.add(t,a)}),i}),_=p(0),v=p(0),y=V(()=>Math.max(g.value.getBound(v.value-N(e.paddingTop))-1,0)),b=d(()=>{let{value:t}=m;if(t===void 0)return[];let{items:n,itemSize:r}=e,i=y.value,a=Math.min(i+Math.ceil(t/r+1),n.length-1),o=[];for(let e=i;e<=a;++e)o.push(n[e]);return o}),x=(e,t)=>{if(typeof e==`number`){O(e,t,`auto`);return}let{left:n,top:r,index:i,key:a,position:o,behavior:c,debounce:l=!0}=e;if(n!==void 0||r!==void 0)O(n,r,c);else if(i!==void 0)E(i,c,l);else if(a!==void 0){let e=s.value.get(a);e!==void 0&&E(e,c,l)}else o===`bottom`?O(0,2**53-1,c):o===`top`&&O(0,0,c)},S,T=null;function E(t,n,r){let{value:i}=g,a=i.sum(t)+N(e.paddingTop);if(!r)f.value.scrollTo({left:0,top:a,behavior:n});else{S=t,T!==null&&window.clearTimeout(T),T=window.setTimeout(()=>{S=void 0,T=null},16);let{scrollTop:e,offsetHeight:r}=f.value;if(a>e){let o=i.get(t);a+o<=e+r||f.value.scrollTo({left:0,top:a+o-r,behavior:n})}else f.value.scrollTo({left:0,top:a,behavior:n})}}function O(e,t,n){f.value.scrollTo({left:e,top:t,behavior:n})}function A(t,n){if(i||e.ignoreItemResize||z(n.target))return;let{value:r}=g,a=s.value.get(t),o=r.get(a),c=n.borderBoxSize?.[0]?.blockSize??n.contentRect.height;if(c===o)return;c-e.itemSize===0?h.delete(t):h.set(t,c-e.itemSize);let l=c-o;if(l===0)return;r.add(a,l);let u=f.value;if(u!=null){if(S===void 0){let e=r.sum(a);u.scrollTop>e&&u.scrollBy(0,l)}else(au.scrollTop+u.offsetHeight)&&u.scrollBy(0,l);R()}_.value++}let j=!K(),M=!1;function P(t){var n;(n=e.onScroll)==null||n.call(e,t),(!j||!M)&&R()}function I(t){var n;if((n=e.onWheel)==null||n.call(e,t),j){let e=f.value;if(e!=null){if(t.deltaX===0&&(e.scrollTop===0&&t.deltaY<=0||e.scrollTop+e.offsetHeight>=e.scrollHeight&&t.deltaY>=0))return;t.preventDefault(),e.scrollTop+=t.deltaY/J(),e.scrollLeft+=t.deltaX/J(),R(),M=!0,k(()=>{M=!1})}}}function L(t){if(i||z(t.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(t.contentRect.height===m.value)return}else if(t.contentRect.height===m.value&&t.contentRect.width===u.value)return;m.value=t.contentRect.height,u.value=t.contentRect.width;let{onResize:n}=e;n!==void 0&&n(t)}function R(){let{value:e}=f;e!=null&&(v.value=e.scrollTop,l.value=e.scrollLeft)}function z(e){let t=e;for(;t!==null;){if(t.style.display===`none`)return!0;t=t.parentElement}return!1}return{listHeight:m,listStyle:{overflow:`auto`},keyToIndex:s,itemsStyle:d(()=>{let{itemResizable:t}=e,n=F(g.value.sum());return _.value,[e.itemsStyle,{boxSizing:`content-box`,width:F(o.value),height:t?``:n,minHeight:t?n:``,paddingTop:F(e.paddingTop),paddingBottom:F(e.paddingBottom)}]}),visibleItemsStyle:d(()=>(_.value,{transform:`translateY(${F(g.value.sum(y.value))})`})),viewportItems:b,listElRef:f,itemsElRef:p(null),scrollTo:x,handleListResize:L,handleListScroll:P,handleListWheel:I,handleItemResize:A}},render(){let{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:a}=this;return i(A,{onResize:this.handleListResize},{default:()=>{var o;return i(`div`,r(this.$attrs,{class:[`v-vl`,this.showScrollbar&&`v-vl--show-scrollbar`],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:`listElRef`}),[this.items.length===0?(o=this.$slots).empty?.call(o):i(`div`,{ref:`itemsElRef`,class:`v-vl-items`,style:this.itemsStyle},[i(a,Object.assign({class:`v-vl-visible-items`,style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{let{renderCol:r,renderItemWithCols:a}=this;return this.viewportItems.map(o=>{let s=o[t],c=n.get(s),l=r==null?void 0:i(X,{index:c,item:o}),u=a==null?void 0:i(X,{index:c,item:o}),d=this.$slots.default({item:o,renderedCols:l,renderedItemWithCols:u,index:c})[0];return e?i(A,{key:s,onResize:e=>this.handleItemResize(s,e)},{default:()=>d}):(d.key=s,d)})}})])])}})}});function ce(e,t){t&&(c(()=>{let{value:n}=e;n&&M.registerHandler(n,t)}),g(e,(e,t)=>{t&&M.unregisterHandler(t)},{deep:!1}),l(()=>{let{value:t}=e;t&&M.unregisterHandler(t)}))}function Z(e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?t[0]:t=>{e.forEach(e=>{e&&e(t)})}}var le=h({name:`Checkmark`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`},i(`g`,{fill:`none`},i(`path`,{d:`M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z`,fill:`currentColor`})))}}),ue=h({name:`Empty`,render(){return i(`svg`,{viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`path`,{d:`M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z`,fill:`currentColor`}),i(`path`,{d:`M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z`,fill:`currentColor`}))}}),de=h({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i(`div`,{style:`width: 0; height: 0`,tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function fe(e){return Array.isArray(e)?e:[e]}var pe={STOP:`STOP`};function me(e,t){let n=t(e);e.children!==void 0&&n!==pe.STOP&&e.children.forEach(e=>me(e,t))}function he(e,t={}){let{preserveGroup:n=!1}=t,r=[],i=n?e=>{e.isLeaf||(r.push(e.key),a(e.children))}:e=>{e.isLeaf||(e.isGroup||r.push(e.key),a(e.children))};function a(e){e.forEach(i)}return a(e),r}function ge(e,t){let{isLeaf:n}=e;return n===void 0?!t(e):n}function _e(e){return e.children}function ve(e){return e.key}function ye(){return!1}function be(e,t){let{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function xe(e){return e.disabled===!0}function Se(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Ce(e){return e==null?[]:Array.isArray(e)?e:e.checkedKeys??[]}function we(e){return e==null||Array.isArray(e)?[]:e.indeterminateKeys??[]}function Te(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)||n.add(e)}),Array.from(n)}function Ee(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)&&n.delete(e)}),Array.from(n)}function De(e){return e?.type===`group`}function Oe(e){let t=new Map;return e.forEach((e,n)=>{t.set(e.key,n)}),e=>t.get(e)??null}var ke=class extends Error{constructor(){super(),this.message=`SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.`}};function Ae(e,t,n,r){return Q(t.concat(e),n,r,!1)}function je(e,t){let n=new Set;return e.forEach(e=>{let r=t.treeNodeMap.get(e);if(r!==void 0){let e=r.parent;for(;e!==null&&!(e.disabled||n.has(e.key));)n.add(e.key),e=e.parent}}),n}function Me(e,t,n,r){let i=Q(t,n,r,!1),a=Q(e,n,r,!0),o=je(e,n),s=[];return i.forEach(e=>{(a.has(e)||o.has(e))&&s.push(e)}),s.forEach(e=>i.delete(e)),i}function Ne(e,t){let{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:o,leafOnly:s,checkStrategy:c,allowNotLoaded:l}=e;if(!o)return r===void 0?i===void 0?{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)}:{checkedKeys:Ee(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:Te(n,r),indeterminateKeys:Array.from(a)};let{levelTreeNodeMap:u}=t,d;d=i===void 0?r===void 0?Q(n,t,l,!1):Ae(r,n,t,l):Me(i,n,t,l);let f=c===`parent`,p=c===`child`||s,m=d,h=new Set,g=Math.max.apply(null,Array.from(u.keys()));for(let e=g;e>=0;--e){let t=e===0,n=u.get(e);for(let e of n){if(e.isLeaf)continue;let{key:n,shallowLoaded:r}=e;if(p&&r&&e.children.forEach(e=>{!e.disabled&&!e.isLeaf&&e.shallowLoaded&&m.has(e.key)&&m.delete(e.key)}),e.disabled||!r)continue;let i=!0,a=!1,o=!0;for(let t of e.children){let e=t.key;if(!t.disabled){if(o&&=!1,m.has(e))a=!0;else if(h.has(e)){a=!0,i=!1;break}else if(i=!1,a)break}}i&&!o?(f&&e.children.forEach(e=>{!e.disabled&&m.has(e.key)&&m.delete(e.key)}),m.add(n)):a&&h.add(n),t&&p&&m.has(n)&&m.delete(n)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(h)}}function Q(e,t,n,r){let{treeNodeMap:i,getChildren:a}=t,o=new Set,s=new Set(e);return e.forEach(e=>{let t=i.get(e);t!==void 0&&me(t,e=>{if(e.disabled)return pe.STOP;let{key:t}=e;if(!o.has(t)&&(o.add(t),s.add(t),Se(e.rawNode,a))){if(r)return pe.STOP;if(!n)throw new ke}})}),s}function Pe(e,{includeGroup:t=!1,includeSelf:n=!0},r){let i=r.treeNodeMap,a=e==null?null:i.get(e)??null,o={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return o.treeNode=null,o;for(;a;)!a.ignored&&(t||!a.isGroup)&&o.treeNodePath.push(a),a=a.parent;return o.treeNodePath.reverse(),n||o.treeNodePath.pop(),o.keyPath=o.treeNodePath.map(e=>e.key),o}function Fe(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Ie(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function Le(e,t,{loop:n=!1,includeDisabled:r=!1}={}){let i=t===`prev`?Re:Ie,a={reverse:t===`prev`},o=!1,s=null;function c(t){if(t!==null){if(t===e){if(!o)o=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!t.disabled||r)&&!t.ignored&&!t.isGroup){s=t;return}if(t.isGroup){let e=Be(t,a);e===null?c(i(t,n)):s=e}else{let e=i(t,!1);if(e!==null)c(e);else{let e=ze(t);e?.isGroup?c(i(e,n)):n&&c(i(t,!0))}}}}return c(e),s}function Re(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function ze(e){return e.parent}function Be(e,t={}){let{reverse:n=!1}=t,{children:r}=e;if(r){let{length:e}=r,i=n?e-1:0,a=n?-1:e,o=n?-1:1;for(let e=i;e!==a;e+=o){let n=r[e];if(!n.disabled&&!n.ignored)if(n.isGroup){let e=Be(n,t);if(e!==null)return e}else return n}}return null}var Ve={getChild(){return this.ignored?null:Be(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return Le(this,`next`,e)},getPrev(e={}){return Le(this,`prev`,e)}};function He(e,t){let n=t?new Set(t):void 0,r=[];function i(e){e.forEach(e=>{r.push(e),!(e.isLeaf||!e.children||e.ignored)&&(e.isGroup||n===void 0||n.has(e.key))&&i(e.children)})}return i(e),r}function Ue(e,t){let n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function We(e,t,n,r,i,a=null,o=0){let s=[];return e.forEach((c,l)=>{var u;let d=Object.create(r);if(d.rawNode=c,d.siblings=s,d.level=o,d.index=l,d.isFirstChild=l===0,d.isLastChild=l+1===e.length,d.parent=a,!d.ignored){let e=i(c);Array.isArray(e)&&(d.children=We(e,t,n,r,i,d,o+1))}s.push(d),t.set(d.key,d),n.has(o)||n.set(o,[]),(u=n.get(o))==null||u.push(d)}),s}function Ge(e,t={}){let n=new Map,r=new Map,{getDisabled:i=xe,getIgnored:a=ye,getIsGroup:o=De,getKey:s=ve}=t,c=t.getChildren??_e,l=t.ignoreEmptyChildren?e=>{let t=c(e);return Array.isArray(t)?t.length?t:null:t}:c,u=We(e,n,r,Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return o(this.rawNode)},get isLeaf(){return ge(this.rawNode,l)},get shallowLoaded(){return be(this.rawNode,l)},get ignored(){return a(this.rawNode)},contains(e){return Ue(this,e)}},Ve),l);function d(e){if(e==null)return null;let t=n.get(e);return t&&!t.isGroup&&!t.ignored?t:null}function f(e){if(e==null)return null;let t=n.get(e);return t&&!t.ignored?t:null}function p(e,t){let n=f(e);return n?n.getPrev(t):null}function m(e,t){let n=f(e);return n?n.getNext(t):null}function h(e){let t=f(e);return t?t.getParent():null}function g(e){let t=f(e);return t?t.getChild():null}let _={treeNodes:u,treeNodeMap:n,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:l,getFlattenedNodes(e){return He(u,e)},getNode:d,getPrev:p,getNext:m,getParent:h,getChild:g,getFirstAvailableNode(){return Fe(u)},getPath(e,t={}){return Pe(e,t,_)},getCheckedKeys(e,t={}){let{cascade:n=!0,leafOnly:r=!1,checkStrategy:i=`all`,allowNotLoaded:a=!1}=t;return Ne({checkedKeys:Ce(e),indeterminateKeys:we(e),cascade:n,leafOnly:r,checkStrategy:i,allowNotLoaded:a},_)},check(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return Ne({checkedKeys:Ce(t),indeterminateKeys:we(t),keysToCheck:e==null?[]:fe(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},uncheck(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return Ne({checkedKeys:Ce(t),indeterminateKeys:we(t),keysToUncheck:e==null?[]:fe(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},getNonLeafKeys(e={}){return he(u,e)}};return _}var Ke=_(`empty`,` + display: flex; + flex-direction: column; + align-items: center; + font-size: var(--n-font-size); +`,[m(`icon`,` + width: var(--n-icon-size); + height: var(--n-icon-size); + font-size: var(--n-icon-size); + line-height: var(--n-icon-size); + color: var(--n-icon-color); + transition: + color .3s var(--n-bezier); + `,[S(`+`,[m(`description`,` + margin-top: 8px; + `)])]),m(`description`,` + transition: color .3s var(--n-bezier); + color: var(--n-text-color); + `),m(`extra`,` + text-align: center; + transition: color .3s var(--n-bezier); + margin-top: 12px; + color: var(--n-extra-text-color); + `)]),qe=h({name:`Empty`,props:Object.assign(Object.assign({},y.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:`medium`},renderIcon:Function}),slots:Object,setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:a}=s(t),o=y(`Empty`,`-empty`,Ke,te,t,n),{localeRef:c}=I(`Empty`),l=d(()=>t.description??a?.value?.Empty?.description),u=d(()=>a?.value?.Empty?.renderIcon||(()=>i(ue,null))),f=d(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{[x(`iconSize`,e)]:r,[x(`fontSize`,e)]:i,textColor:a,iconColor:s,extraTextColor:c}}=o.value;return{"--n-icon-size":r,"--n-font-size":i,"--n-bezier":n,"--n-text-color":a,"--n-icon-color":s,"--n-extra-text-color":c}}),p=r?e(`empty`,d(()=>{let e=``,{size:n}=t;return e+=n[0],e}),f,t):void 0;return{mergedClsPrefix:n,mergedRenderIcon:u,localizedDescription:d(()=>l.value||c.value.description),cssVars:r?void 0:f,themeClass:p?.themeClass,onRender:p?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n?.(),i(`div`,{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?i(`div`,{class:`${t}-empty__icon`},e.icon?e.icon():i(ne,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?i(`div`,{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?i(`div`,{class:`${t}-empty__extra`},e.extra()):null)}}),Je=h({name:`NBaseSelectGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=a(T);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){let{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:a}}=this,o=r?.(a),s=t?t(a,!1):B(a[this.labelField],a,!1),c=i(`div`,Object.assign({},o,{class:[`${e}-base-select-group-header`,o?.class]}),s);return a.render?a.render({node:c,option:a}):n?n({node:c,option:a,selected:!1}):c}});function Ye(e,t){return i(ie,{name:`fade-in-scale-up-transition`},{default:()=>e?i(ne,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>i(le)}):null})}var Xe=h({name:`NBaseSelectOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:o,renderOptionRef:s,labelFieldRef:c,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:d,handleOptionClick:f,handleOptionMouseEnter:p}=a(T),m=V(()=>{let{value:t}=n;return t?e.tmNode.key===t.key:!1});function h(t){let{tmNode:n}=e;n.disabled||f(t,n)}function g(t){let{tmNode:n}=e;n.disabled||p(t,n)}function _(t){let{tmNode:n}=e,{value:r}=m;n.disabled||r||p(t,n)}return{multiple:r,isGrouped:V(()=>{let{tmNode:t}=e,{parent:n}=t;return n&&n.rawNode.type===`group`}),showCheckmark:u,nodeProps:d,isPending:m,isSelected:V(()=>{let{value:n}=t,{value:a}=r;if(n===null)return!1;let o=e.tmNode.rawNode[l.value];if(a){let{value:e}=i;return e.has(o)}else return n===o}),labelField:c,renderLabel:o,renderOption:s,handleMouseMove:_,handleMouseEnter:g,handleClick:h}},render(){let{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:a,showCheckmark:o,nodeProps:s,renderOption:c,renderLabel:l,handleClick:u,handleMouseEnter:d,handleMouseMove:f}=this,p=Ye(n,e),m=l?[l(t,n),o&&p]:[B(t[this.labelField],t,n),o&&p],h=s?.(t),g=i(`div`,Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h?.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:a,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:o}],style:[h?.style||``,t.style||``],onClick:Z([u,h?.onClick]),onMouseenter:Z([d,h?.onMouseenter]),onMousemove:Z([f,h?.onMousemove])}),i(`div`,{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:g,option:t,selected:n}):c?c({node:g,option:t,selected:n}):g}}),Ze=_(`base-select-menu`,` + line-height: 1.5; + outline: none; + z-index: 0; + position: relative; + border-radius: var(--n-border-radius); + transition: + background-color .3s var(--n-bezier), + box-shadow .3s var(--n-bezier); + background-color: var(--n-color); +`,[_(`scrollbar`,` + max-height: var(--n-height); + `),_(`virtual-list`,` + max-height: var(--n-height); + `),_(`base-select-option`,` + min-height: var(--n-option-height); + font-size: var(--n-option-font-size); + display: flex; + align-items: center; + `,[m(`content`,` + z-index: 1; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + `)]),_(`base-select-group-header`,` + min-height: var(--n-option-height); + font-size: .93em; + display: flex; + align-items: center; + `),_(`base-select-menu-option-wrapper`,` + position: relative; + width: 100%; + `),m(`loading, empty`,` + display: flex; + padding: 12px 32px; + flex: 1; + justify-content: center; + `),m(`loading`,` + color: var(--n-loading-color); + font-size: var(--n-loading-size); + `),m(`header`,` + padding: 8px var(--n-option-padding-left); + font-size: var(--n-option-font-size); + transition: + color .3s var(--n-bezier), + border-color .3s var(--n-bezier); + border-bottom: 1px solid var(--n-action-divider-color); + color: var(--n-action-text-color); + `),m(`action`,` + padding: 8px var(--n-option-padding-left); + font-size: var(--n-option-font-size); + transition: + color .3s var(--n-bezier), + border-color .3s var(--n-bezier); + border-top: 1px solid var(--n-action-divider-color); + color: var(--n-action-text-color); + `),_(`base-select-group-header`,` + position: relative; + cursor: default; + padding: var(--n-option-padding); + color: var(--n-group-header-text-color); + `),_(`base-select-option`,` + cursor: pointer; + position: relative; + padding: var(--n-option-padding); + transition: + color .3s var(--n-bezier), + opacity .3s var(--n-bezier); + box-sizing: border-box; + color: var(--n-option-text-color); + opacity: 1; + `,[u(`show-checkmark`,` + padding-right: calc(var(--n-option-padding-right) + 20px); + `),S(`&::before`,` + content: ""; + position: absolute; + left: 4px; + right: 4px; + top: 0; + bottom: 0; + border-radius: var(--n-border-radius); + transition: background-color .3s var(--n-bezier); + `),S(`&:active`,` + color: var(--n-option-text-color-pressed); + `),u(`grouped`,` + padding-left: calc(var(--n-option-padding-left) * 1.5); + `),u(`pending`,[S(`&::before`,` + background-color: var(--n-option-color-pending); + `)]),u(`selected`,` + color: var(--n-option-text-color-active); + `,[S(`&::before`,` + background-color: var(--n-option-color-active); + `),u(`pending`,[S(`&::before`,` + background-color: var(--n-option-color-active-pending); + `)])]),u(`disabled`,` + cursor: not-allowed; + `,[v(`selected`,` + color: var(--n-option-text-color-disabled); + `),u(`selected`,` + opacity: var(--n-option-opacity-disabled); + `)]),m(`check`,` + font-size: 16px; + position: absolute; + right: calc(var(--n-option-padding-right) - 4px); + top: calc(50% - 7px); + color: var(--n-option-check-color); + transition: color .3s var(--n-bezier); + `,[L({enterScale:`0.5`})])])]),Qe=h({name:`InternalSelectMenu`,props:Object.assign(Object.assign({},y.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:`medium`},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,scrollbarProps:Object,onToggle:Function}),setup(t){let{mergedClsPrefixRef:n,mergedRtlRef:r,mergedComponentPropsRef:i}=s(t),a=f(`InternalSelectMenu`,r,n),u=y(`InternalSelectMenu`,`-internal-select-menu`,Ze,ee,t,C(t,`clsPrefix`)),m=p(null),h=p(null),_=p(null),v=d(()=>t.treeMate.getFlattenedNodes()),S=d(()=>Oe(v.value)),w=p(null);function E(){let{treeMate:e}=t,n=null,{value:r}=t;r===null?n=e.getFirstAvailableNode():(n=t.multiple?e.getNode((r||[])[(r||[]).length-1]):e.getNode(r),(!n||n.disabled)&&(n=e.getFirstAvailableNode())),K(n||null)}function D(){let{value:e}=w;e&&!t.treeMate.getNode(e.key)&&(w.value=null)}let k;g(()=>t.show,e=>{e?k=g(()=>t.treeMate,()=>{t.resetMenuOnOptionsChange?(t.autoPending?E():D(),o(q)):D()},{immediate:!0}):k?.()},{immediate:!0}),l(()=>{k?.()});let A=d(()=>N(u.value.self[x(`optionHeight`,t.size)])),j=d(()=>P(u.value.self[x(`padding`,t.size)])),M=d(()=>t.multiple&&Array.isArray(t.value)?new Set(t.value):new Set),F=d(()=>{let e=v.value;return e&&e.length===0}),I=d(()=>i?.value?.Select?.renderEmpty);function L(e){let{onToggle:n}=t;n&&n(e)}function R(e){let{onScroll:n}=t;n&&n(e)}function z(e){var t;(t=_.value)==null||t.sync(),R(e)}function te(){var e;(e=_.value)==null||e.sync()}function ne(){let{value:e}=w;return e||null}function re(e,t){t.disabled||K(t,!1)}function B(e,t){t.disabled||L(t)}function ie(e){var n;H(e,`action`)||(n=t.onKeyup)==null||n.call(t,e)}function V(e){var n;H(e,`action`)||(n=t.onKeydown)==null||n.call(t,e)}function U(e){var n;(n=t.onMousedown)==null||n.call(t,e),!t.focusable&&e.preventDefault()}function W(){let{value:e}=w;e&&K(e.getNext({loop:!0}),!0)}function G(){let{value:e}=w;e&&K(e.getPrev({loop:!0}),!0)}function K(e,t=!1){w.value=e,t&&q()}function q(){var e,n;let r=w.value;if(!r)return;let i=S.value(r.key);i!==null&&(t.virtualScroll?(e=h.value)==null||e.scrollTo({index:i}):(n=_.value)==null||n.scrollTo({index:i,elSize:A.value}))}function J(e){var n;m.value?.contains(e.target)&&((n=t.onFocus)==null||n.call(t,e))}function Y(e){var n;m.value?.contains(e.relatedTarget)||(n=t.onBlur)==null||n.call(t,e)}b(T,{handleOptionMouseEnter:re,handleOptionClick:B,valueSetRef:M,pendingTmNodeRef:w,nodePropsRef:C(t,`nodeProps`),showCheckmarkRef:C(t,`showCheckmark`),multipleRef:C(t,`multiple`),valueRef:C(t,`value`),renderLabelRef:C(t,`renderLabel`),renderOptionRef:C(t,`renderOption`),labelFieldRef:C(t,`labelField`),valueFieldRef:C(t,`valueField`)}),b(O,m),c(()=>{let{value:e}=_;e&&e.sync()});let ae=d(()=>{let{size:e}=t,{common:{cubicBezierEaseInOut:n},self:{height:r,borderRadius:i,color:a,groupHeaderTextColor:o,actionDividerColor:s,optionTextColorPressed:c,optionTextColor:l,optionTextColorDisabled:d,optionTextColorActive:f,optionOpacityDisabled:p,optionCheckColor:m,actionTextColor:h,optionColorPending:g,optionColorActive:_,loadingColor:v,loadingSize:y,optionColorActivePending:b,[x(`optionFontSize`,e)]:S,[x(`optionHeight`,e)]:C,[x(`optionPadding`,e)]:w}}=u.value;return{"--n-height":r,"--n-action-divider-color":s,"--n-action-text-color":h,"--n-bezier":n,"--n-border-radius":i,"--n-color":a,"--n-option-font-size":S,"--n-group-header-text-color":o,"--n-option-check-color":m,"--n-option-color-pending":g,"--n-option-color-active":_,"--n-option-color-active-pending":b,"--n-option-height":C,"--n-option-opacity-disabled":p,"--n-option-text-color":l,"--n-option-text-color-active":f,"--n-option-text-color-disabled":d,"--n-option-text-color-pressed":c,"--n-option-padding":w,"--n-option-padding-left":P(w,`left`),"--n-option-padding-right":P(w,`right`),"--n-loading-color":v,"--n-loading-size":y}}),{inlineThemeDisabled:X}=t,oe=X?e(`internal-select-menu`,d(()=>t.size[0]),ae,t):void 0,se={selfRef:m,next:W,prev:G,getPendingTmNode:ne};return ce(m,t.onResize),Object.assign({mergedTheme:u,mergedClsPrefix:n,rtlEnabled:a,virtualListRef:h,scrollbarRef:_,itemSize:A,padding:j,flattenedNodes:v,empty:F,mergedRenderEmpty:I,virtualListContainer(){let{value:e}=h;return e?.listElRef},virtualListContent(){let{value:e}=h;return e?.itemsElRef},doScroll:R,handleFocusin:J,handleFocusout:Y,handleKeyUp:ie,handleKeyDown:V,handleMouseDown:U,handleVirtualListResize:te,handleVirtualListScroll:z,cssVars:X?void 0:ae,themeClass:oe?.themeClass,onRender:oe?.onRender},se)},render(){let{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:a,onRender:o}=this;return o?.(),i(`div`,{ref:`selfRef`,tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,`${n}-base-select-menu--${this.size}-size`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,a,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},z(e.header,e=>e&&i(`div`,{class:`${n}-base-select-menu__header`,"data-header":!0,key:`header`},e)),this.loading?i(`div`,{class:`${n}-base-select-menu__loading`},i(re,{clsPrefix:n,strokeWidth:20})):this.empty?i(`div`,{class:`${n}-base-select-menu__empty`,"data-empty":!0},R(e.empty,()=>[this.mergedRenderEmpty?.call(this)||i(qe,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):i(j,Object.assign({ref:`scrollbarRef`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},this.scrollbarProps),{default:()=>t?i(se,{ref:`virtualListRef`,class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:e})=>e.isGroup?i(Je,{key:e.key,clsPrefix:n,tmNode:e}):e.ignored?null:i(Xe,{clsPrefix:n,key:e.key,tmNode:e})}):i(`div`,{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?i(Je,{key:e.key,clsPrefix:n,tmNode:e}):i(Xe,{clsPrefix:n,key:e.key,tmNode:e})))}),z(e.action,e=>e&&[i(`div`,{class:`${n}-base-select-menu__action`,"data-action":!0,key:`action`},e),i(de,{onFocus:this.onTabOut,key:`focus-detector`})]))}});function $(e){return e.type===`group`}function $e(e){return e.type===`ignored`}function et(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function tt(e,t){return{getIsGroup:$,getIgnored:$e,getKey(t){return $(t)?t.name||t.key||`key-required`:t[e]},getChildren(e){return e[t]}}}function nt(e,t,n,r){if(!t)return e;function i(e){if(!Array.isArray(e))return[];let a=[];for(let o of e)if($(o)){let e=i(o[r]);e.length&&a.push(Object.assign({},o,{[r]:e}))}else if($e(o))continue;else t(n,o)&&a.push(o);return a}return i(e)}function rt(e,t,n){let r=new Map;return e.forEach(e=>{$(e)?e[n].forEach(e=>{r.set(e[t],e)}):r.set(e[t],e)}),r}export{Qe as a,de as c,H as d,et as i,ce as l,rt as n,qe as o,nt as r,Ge as s,tt as t,se as u}; \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 43c0dc1..c078496 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -5,7 +5,7 @@ Вечерний детектив - +