Файловый менеджер - Редактировать - /var/www/vhosts/aviointeriors.dev1.mndrn.cloud/admin/09-07-24/assets/Main-nV2zK5qT.js
Назад
import{_ as _e}from"./notification-card-J6kb9vU5.js";import{p as $,r as U,s as T,c as h,a as Ve,w as C,o as j,b as Z,m as me,g as z,u as fe,d as W,e as he,f as ge,t as O,h as X,i as o,j as D,k as Te,l as Be,C as xe,n as Ne,q as Ee,v as Me,x as Ce,y as Pe,z as Ie,A as Le,B as Ae,D as Re,T as He,F as pe,E as De,G as Ye,H as We,I as ne,J as Oe,K as $e,L as Ue,M as Y,N as f,V as ze,O as le,P as M,Q as q,R,S as re,U as ie,W as Xe,X as Fe,Y as qe}from"./index-FCrC1QvJ.js";import{m as je,V as se,a as Ze,b as Ke,l as Ge}from"./VToolbar-S7F1tmKE.js";import{m as Je,a as Qe,b as et,u as tt,c as ue,d as at,e as ot,f as nt,t as lt,_ as rt,V as it,g as st,h as ut}from"./index-sfcGBrqh.js";import{V as ct,a as F,b as x,c as ce}from"./VMenu-XxkLhr4X.js";import{u as dt}from"./VOverlay-WmndlTuI.js";import{m as vt,V as H}from"./VBtn-NW2yLqkh.js";import"./forwardRefs-g5bhJaRn.js";const mt=$({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function ft(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:s}=n;let l=0;const a=U(null),t=T(0),i=T(0),y=T(0),b=T(!1),v=T(!1),r=h(()=>Number(e.scrollThreshold)),p=h(()=>Ve((r.value-t.value)/r.value||0)),m=()=>{const u=a.value;!u||s&&!s.value||(l=t.value,t.value="window"in u?u.pageYOffset:u.scrollTop,v.value=t.value<l,y.value=Math.abs(t.value-r.value))};return C(v,()=>{i.value=i.value||t.value}),C(b,()=>{i.value=0}),j(()=>{C(()=>e.scrollTarget,u=>{var S;const _=u?document.querySelector(u):window;_&&_!==a.value&&((S=a.value)==null||S.removeEventListener("scroll",m),a.value=_,a.value.addEventListener("scroll",m,{passive:!0}))},{immediate:!0})}),Z(()=>{var u;(u=a.value)==null||u.removeEventListener("scroll",m)}),s&&C(s,m,{immediate:!0}),{scrollThreshold:r,currentScroll:t,currentThreshold:y,isScrollActive:b,scrollRatio:p,isScrollingUp:v,savedScroll:i}}const ht=$({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...je(),...me(),...mt(),height:{type:[Number,String],default:64}},"VAppBar"),gt=z()({name:"VAppBar",props:ht(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:s}=n;const l=U(),a=fe(e,"modelValue"),t=h(()=>{var N;const w=new Set(((N=e.scrollBehavior)==null?void 0:N.split(" "))??[]);return{hide:w.has("hide"),inverted:w.has("inverted"),collapse:w.has("collapse"),elevate:w.has("elevate"),fadeImage:w.has("fade-image")}}),i=h(()=>{const w=t.value;return w.hide||w.inverted||w.collapse||w.elevate||w.fadeImage||!a.value}),{currentScroll:y,scrollThreshold:b,isScrollingUp:v,scrollRatio:r}=ft(e,{canScroll:i}),p=h(()=>e.collapse||t.value.collapse&&(t.value.inverted?r.value>0:r.value===0)),m=h(()=>e.flat||t.value.elevate&&(t.value.inverted?y.value>0:y.value===0)),u=h(()=>t.value.fadeImage?t.value.inverted?1-r.value:r.value:void 0),_=h(()=>{var B,P;if(t.value.hide&&t.value.inverted)return 0;const w=((B=l.value)==null?void 0:B.contentHeight)??0,N=((P=l.value)==null?void 0:P.extensionHeight)??0;return w+N});W(h(()=>!!e.scrollBehavior),()=>{Te(()=>{t.value.hide?t.value.inverted?a.value=y.value>b.value:a.value=v.value||y.value<b.value:a.value=!0})});const{ssrBootStyles:S}=he(),{layoutItemStyles:L}=ge({id:e.name,order:h(()=>parseInt(e.order,10)),position:O(e,"location"),layoutSize:_,elementSize:T(void 0),active:a,absolute:O(e,"absolute")});return X(()=>{const w=se.filterProps(e);return o(se,D({ref:l,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...L.value,"--v-toolbar-image-opacity":u.value,height:void 0,...S.value},e.style]},w,{collapse:p.value,flat:m.value}),s)}),{}}}),pt=$({...vt({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),yt=z()({name:"VAppBarNavIcon",props:pt(),setup(e,n){let{slots:s}=n;return X(()=>o(H,D(e,{class:["v-app-bar-nav-icon"]}),s)),{}}}),wt=z()({name:"VAppBarTitle",props:Ze(),setup(e,n){let{slots:s}=n;return X(()=>o(Ke,D(e,{class:"v-app-bar-title"}),s)),{}}});function bt(e){let{rootEl:n,isSticky:s,layoutItemStyles:l}=e;const a=T(!1),t=T(0),i=h(()=>{const v=typeof a.value=="boolean"?"top":a.value;return[s.value?{top:"auto",bottom:"auto",height:void 0}:void 0,a.value?{[v]:Be(t.value)}:{top:l.value.top}]});j(()=>{C(s,v=>{v?window.addEventListener("scroll",b,{passive:!0}):window.removeEventListener("scroll",b)},{immediate:!0})}),Z(()=>{window.removeEventListener("scroll",b)});let y=0;function b(){const v=y>window.scrollY?"up":"down",r=n.value.getBoundingClientRect(),p=parseFloat(l.value.top??0),m=window.scrollY-Math.max(0,t.value-p),u=r.height+Math.max(t.value,p)-window.scrollY-window.innerHeight,_=parseFloat(getComputedStyle(n.value).getPropertyValue("--v-body-scroll-y"))||0;r.height<window.innerHeight-p?(a.value="top",t.value=p):v==="up"&&a.value==="bottom"||v==="down"&&a.value==="top"?(t.value=window.scrollY+r.top-_,a.value=!0):v==="down"&&u<=0?(t.value=0,a.value="bottom"):v==="up"&&m<=0&&(_?a.value!=="top"&&(t.value=-m+_+p,a.value="top"):(t.value=r.top+m,a.value="top")),y=window.scrollY}return{isStuck:a,stickyStyles:i}}const St=100,kt=20;function de(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function ve(e){if(e.length<2)return 0;if(e.length===2)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let n=0;for(let s=e.length-1;s>0;s--){if(e[s].t===e[s-1].t)continue;const l=de(n),a=(e[s].d-e[s-1].d)/(e[s].t-e[s-1].t);n+=(a-l)*Math.abs(a),s===e.length-1&&(n*=.5)}return de(n)*1e3}function _t(){const e={};function n(a){Array.from(a.changedTouches).forEach(t=>{(e[t.identifier]??(e[t.identifier]=new xe(kt))).push([a.timeStamp,t])})}function s(a){Array.from(a.changedTouches).forEach(t=>{delete e[t.identifier]})}function l(a){var v;const t=(v=e[a])==null?void 0:v.values().reverse();if(!t)throw new Error(`No samples for touch id ${a}`);const i=t[0],y=[],b=[];for(const r of t){if(i[0]-r[0]>St)break;y.push({t:r[0],d:r[1].clientX}),b.push({t:r[0],d:r[1].clientY})}return{x:ve(y),y:ve(b),get direction(){const{x:r,y:p}=this,[m,u]=[Math.abs(r),Math.abs(p)];return m>u&&r>=0?"right":m>u&&r<=0?"left":u>m&&p>=0?"down":u>m&&p<=0?"up":Vt()}}}return{addMovement:n,endTouch:s,getVelocity:l}}function Vt(){throw new Error}function Tt(e){let{isActive:n,isTemporary:s,width:l,touchless:a,position:t}=e;j(()=>{window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",N,{passive:!1}),window.addEventListener("touchend",B,{passive:!0})}),Z(()=>{window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",N),window.removeEventListener("touchend",B)});const i=h(()=>["left","right"].includes(t.value)),{addMovement:y,endTouch:b,getVelocity:v}=_t();let r=!1;const p=T(!1),m=T(0),u=T(0);let _;function S(d,c){return(t.value==="left"?d:t.value==="right"?document.documentElement.clientWidth-d:t.value==="top"?d:t.value==="bottom"?document.documentElement.clientHeight-d:A())-(c?l.value:0)}function L(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const g=t.value==="left"?(d-u.value)/l.value:t.value==="right"?(document.documentElement.clientWidth-d-u.value)/l.value:t.value==="top"?(d-u.value)/l.value:t.value==="bottom"?(document.documentElement.clientHeight-d-u.value)/l.value:A();return c?Math.max(0,Math.min(1,g)):g}function w(d){if(a.value)return;const c=d.changedTouches[0].clientX,g=d.changedTouches[0].clientY,k=25,E=t.value==="left"?c<k:t.value==="right"?c>document.documentElement.clientWidth-k:t.value==="top"?g<k:t.value==="bottom"?g>document.documentElement.clientHeight-k:A(),I=n.value&&(t.value==="left"?c<l.value:t.value==="right"?c>document.documentElement.clientWidth-l.value:t.value==="top"?g<l.value:t.value==="bottom"?g>document.documentElement.clientHeight-l.value:A());(E||I||n.value&&s.value)&&(r=!0,_=[c,g],u.value=S(i.value?c:g,n.value),m.value=L(i.value?c:g),b(d),y(d))}function N(d){const c=d.changedTouches[0].clientX,g=d.changedTouches[0].clientY;if(r){if(!d.cancelable){r=!1;return}const E=Math.abs(c-_[0]),I=Math.abs(g-_[1]);(i.value?E>I&&E>3:I>E&&I>3)?(p.value=!0,r=!1):(i.value?I:E)>3&&(r=!1)}if(!p.value)return;d.preventDefault(),y(d);const k=L(i.value?c:g,!1);m.value=Math.max(0,Math.min(1,k)),k>1?u.value=S(i.value?c:g,!0):k<0&&(u.value=S(i.value?c:g,!1))}function B(d){if(r=!1,!p.value)return;y(d),p.value=!1;const c=v(d.changedTouches[0].identifier),g=Math.abs(c.x),k=Math.abs(c.y);(i.value?g>k&&g>400:k>g&&k>3)?n.value=c.direction===({left:"right",right:"left",top:"down",bottom:"up"}[t.value]||A()):n.value=m.value>.5}const P=h(()=>p.value?{transform:t.value==="left"?`translateX(calc(-100% + ${m.value*l.value}px))`:t.value==="right"?`translateX(calc(100% - ${m.value*l.value}px))`:t.value==="top"?`translateY(calc(-100% + ${m.value*l.value}px))`:t.value==="bottom"?`translateY(calc(100% - ${m.value*l.value}px))`:A(),transition:"none"}:void 0);return{isDragging:p,dragProgress:m,dragStyles:P}}function A(){throw new Error}const Bt=["start","end","left","right","top","bottom"],xt=$({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>Bt.includes(e)},sticky:Boolean,...Je(),...Ne(),...Ee(),...Qe(),...me(),...et(),...Me({tag:"nav"}),...Ce()},"VNavigationDrawer"),Nt=z()({name:"VNavigationDrawer",props:xt(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,n){let{attrs:s,emit:l,slots:a}=n;const{isRtl:t}=Pe(),{themeClasses:i}=Ie(e),{borderClasses:y}=tt(e),{backgroundColorClasses:b,backgroundColorStyles:v}=ue(O(e,"color")),{elevationClasses:r}=at(e),{displayClasses:p,mobile:m}=Le(e),{roundedClasses:u}=ot(e),_=nt(),S=fe(e,"modelValue",null,V=>!!V),{ssrBootStyles:L}=he(),{scopeId:w}=dt(),N=U(),B=T(!1),P=h(()=>e.rail&&e.expandOnHover&&B.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),d=h(()=>lt(e.location,t.value)),c=h(()=>!e.permanent&&(m.value||e.temporary)),g=h(()=>e.sticky&&!c.value&&d.value!=="bottom");W(()=>e.expandOnHover&&e.rail!=null,()=>{C(B,V=>l("update:rail",!V))}),W(()=>!e.disableResizeWatcher,()=>{C(c,V=>!e.permanent&&De(()=>S.value=!V))}),W(()=>!e.disableRouteWatcher&&!!_,()=>{C(_.currentRoute,()=>c.value&&(S.value=!1))}),C(()=>e.permanent,V=>{V&&(S.value=!0)}),Ae(()=>{e.modelValue!=null||c.value||(S.value=e.permanent||!m.value)});const{isDragging:k,dragProgress:E,dragStyles:I}=Tt({isActive:S,isTemporary:c,width:P,touchless:O(e,"touchless"),position:d}),K=h(()=>{const V=c.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):P.value;return k.value?V*E.value:V}),{layoutItemStyles:G,layoutItemScrimStyles:ye}=ge({id:e.name,order:h(()=>parseInt(e.order,10)),position:d,layoutSize:K,elementSize:P,active:h(()=>S.value||k.value),disableTransitions:h(()=>k.value),absolute:h(()=>e.absolute||g.value&&typeof J.value!="string")}),{isStuck:J,stickyStyles:we}=bt({rootEl:N,isSticky:g,layoutItemStyles:G}),Q=ue(h(()=>typeof e.scrim=="string"?e.scrim:null)),be=h(()=>({...k.value?{opacity:E.value*.2,transition:"none"}:void 0,...ye.value}));Re({VList:{bgColor:"transparent"}});function Se(){B.value=!0}function ke(){B.value=!1}return X(()=>{const V=a.image||e.image;return o(pe,null,[o(e.tag,D({ref:N,onMouseenter:Se,onMouseleave:ke,class:["v-navigation-drawer",`v-navigation-drawer--${d.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":B.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":c.value,"v-navigation-drawer--active":S.value,"v-navigation-drawer--sticky":g.value},i.value,b.value,y.value,p.value,r.value,u.value,e.class],style:[v.value,G.value,I.value,L.value,we.value,e.style]},w,s),{default:()=>{var ee,te,ae,oe;return[V&&o("div",{key:"image",class:"v-navigation-drawer__img"},[a.image?(ee=a.image)==null?void 0:ee.call(a,{image:e.image}):o("img",{src:e.image,alt:""},null)]),a.prepend&&o("div",{class:"v-navigation-drawer__prepend"},[(te=a.prepend)==null?void 0:te.call(a)]),o("div",{class:"v-navigation-drawer__content"},[(ae=a.default)==null?void 0:ae.call(a)]),a.append&&o("div",{class:"v-navigation-drawer__append"},[(oe=a.append)==null?void 0:oe.call(a)])]}}),o(He,{name:"fade-transition"},{default:()=>[c.value&&(k.value||S.value)&&!!e.scrim&&o("div",D({class:["v-navigation-drawer__scrim",Q.backgroundColorClasses.value],style:[be.value,Q.backgroundColorStyles.value],onClick:()=>S.value=!1},w),null)]})])}),{isStuck:J}}}),Et={setup(){U(null);const e=Ye();return e.fetchNotifications(),{authStore:e}},data:()=>({username:null,drawer:null,logo:Ge}),created(){We()||(ne(),this.authStore.currentUser=null,this.authStore.isLoggedIn=!1,this.$router.replace("/login")),this.connectWebSocketServer()},computed:{unreadNotifications(){return this.authStore.getUnread},readNotifications(){return this.authStore.getRead},allNotifications(){return this.authStore.notifications}},methods:{signOut(){ne(),this.authStore.currentUser=null,this.authStore.isLoggedIn=!1,Oe.post("/logout").then(e=>{console.log(e),this.$router.replace("/login")}).catch(e=>{console.log(e)})},connectWebSocketServer(){var e=window.Pusher.subscribe("notifications.admin");e.bind("notification",n=>{var s=$e(n.message,Ue.camelCase);this.authStore.pushNotification(s),this.authStore.sortNotifications()})}}},Mt={class:"text-center"},Ct=["src"],Pt={key:0,class:"notification-alert"},It={key:0,class:"my-4 mx-2 text-variant pr-16"},Lt={key:1,class:"d-flex justify-space-between"},At=q("p",{class:"d-flex align-center"},"Notifications",-1),Rt={key:1,class:"text-uppercase text-h5"};function Ht(e,n,s,l,a,t){const i=le("router-link"),y=_e,b=le("router-view");return M(),Y(ze,null,{default:f(()=>[o(Nt,{permanent:"",modelValue:e.drawer,"onUpdate:modelValue":n[0]||(n[0]=v=>e.drawer=v)},{default:f(()=>[o(i,{to:"/"},{default:f(()=>[q("div",Mt,[q("img",{src:e.logo,alt:"Aviointeriors",height:"50",class:"mx-auto pa-2"},null,8,Ct)])]),_:1}),o(ct),o(F,{density:"default",nav:"",class:"main-nav pa-0"},{default:f(()=>[o(i,{to:"/dashboard"},{default:f(()=>[o(x,{link:"",title:"Dashboard","append-icon":"mdi-view-dashboard",color:"primary",class:"rounded-0"})]),_:1}),o(i,{to:"/documents"},{default:f(()=>[o(x,{link:"",title:"Documents","append-icon":"mdi-folder",color:"primary",class:"rounded-0"})]),_:1}),o(i,{to:"/users"},{default:f(()=>[o(x,{link:"",title:"Users","append-icon":"mdi-account-group",color:"primary",class:"rounded-0"})]),_:1}),o(i,{to:"/companies"},{default:f(()=>[o(x,{link:"",title:"Companies","append-icon":"mdi-office-building",color:"primary",class:"rounded-0"})]),_:1}),o(i,{to:"/partnumbers"},{default:f(()=>[o(x,{link:"",title:"Part numbers","append-icon":"mdi-layers",color:"primary",class:"rounded-0"})]),_:1}),o(i,{to:"/notifications"},{default:f(()=>[o(x,{link:"",title:"Notifications","append-icon":"mdi-bell",color:"primary",class:"rounded-0"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(gt,null,{default:f(()=>[o(yt,{onClick:n[1]||(n[1]=v=>{e.drawer=!e.drawer})}),o(wt),o(H,{class:"rounded-circle pa-0",variant:"plain",icon:"mdi-bell",color:"primary"},{default:f(()=>[o(it,{icon:"mdi-bell",color:"primary"}),this.unreadNotifications.length?(M(),R("div",Pt)):re("",!0),o(ce,{activator:"parent",class:"rounded-0"},{default:f(()=>[o(F,{density:"compact",style:{"max-height":"240px","max-width":"33vw"}},{default:f(()=>[o(x,{class:"justify-space-between align-center"},{default:f(()=>[this.unreadNotifications.length?(M(),R("div",Lt,[At,o(i,{to:"notifications"},{default:f(()=>[o(H,{variant:"plain",color:"primary"},{default:f(()=>[ie("View all")]),_:1})]),_:1})])):(M(),R("p",It,"No unread notifications."))]),_:1}),(M(!0),R(pe,null,Xe(this.unreadNotifications,v=>(M(),Y(x,{link:""},{default:f(()=>[o(y,{notification:v,onStatusChanged:n[2]||(n[2]=r=>this.authStore.sortNotifications())},null,8,["notification"])]),_:2},1024))),256)),o(x,{class:"d-flex justify-end"},{default:f(()=>[o(i,{to:"/notifications"},{default:f(()=>[o(H,{variant:"plain",color:"primary"},{default:f(()=>[ie("View all")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l.authStore.user?(M(),Y(H,{key:0,ripple:!1,variant:"plain","append-icon":"mdi-menu-down",style:{opacity:"1"}},{default:f(()=>[o(st,{color:"primary"},{default:f(()=>[l.authStore.user.avatar?(M(),Y(ut,{key:0,src:l.authStore.user.avatar,alt:"{{ authStore.user.name }}"},null,8,["src"])):(M(),R("span",Rt,Fe(l.authStore.user.name[0]),1))]),_:1}),o(ce,{activator:"parent",class:"rounded-0"},{default:f(()=>[o(F,{nav:"",density:"compact"},{default:f(()=>[o(i,{to:"/users/"+l.authStore.user.id},{default:f(()=>[o(x,{link:"","append-icon":"mdi-cog",title:"Settings"})]),_:1},8,["to"]),o(x,{link:"","append-icon":"mdi-exit-run",title:"Logout",onClick:n[3]||(n[3]=v=>{t.signOut()})})]),_:1})]),_:1})]),_:1})):re("",!0)]),_:1}),o(qe,null,{default:f(()=>[o(b)]),_:1})]),_:1})}const Ft=rt(Et,[["render",Ht]]);export{Ft as default};
| ver. 1.4 |
Github
|
.
| PHP 8.2.5 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка