1
0
Fork 0
forked from Simnation/Main
Main/resources/[tools]/unlimited-spectre/html/assets/Player.01a99d74.js

13 lines
108 KiB
JavaScript
Raw Normal View History

2025-06-07 08:51:21 +02:00
import{q as D,bq as Ft,br as qa,b as et,b9 as Ea,F as Qt,H as Jt,bs as $a,k as K,d as ce,x as v,ao as Ve,A as tt,h as kt,bt as Sa,bn as Aa,z as gt,ab as M,ax as Oa,bu as Ta,bv as Ra,as as Ha,_ as ue,o as g,c as G,w as h,a as c,a6 as Z,a5 as H,a7 as u,S as Ce,a8 as at,U as p,aP as Be,aQ as Ue,W as te,aa as nt,ac as ot,a9 as U,P as vt,R as bt,X as P,Y as ee,Z as Ge,V as B,aE as ve,L as Ya,aV as Tt,aT as La,T as za,n as Ia,ai as Na,aD as Va,e as Wt,bw as Ba,bx as Ua,aA as Zt,bf as Kt,at as Rt,by as Ga,f as ja,ap as Fa,aJ as Qa,r as Ja,$ as Wa}from"./app-014d9ed9.js";import{Q as Za,a as Ka,b as Xa,c as en}from"./QTabPanels.e712c208.js";import{Q as Xt,a as ea,b as se,u as tn,c as an,d as nn}from"./QTable.d759a99d.js";import{Q as Ee}from"./QMarkupTable.ba6854cc.js";import{p as Y,a as Se,Q as xe,c as je}from"./QItemLabel.b6dd3adb.js";import{Q as Fe,b as Ht,d as on}from"./QSelect.d7ce3d4c.js";import{u as ln}from"./use-panel.c35d3e1e.js";import{Q as sn}from"./QPopupProxy.441c18a6.js";import{d as ta}from"./utils.9ce591f3.js";import{P as rn,W as cn}from"./WaypointsModal.ac8f44d9.js";import{B as Ze}from"./BasicDialog.9dd9de92.js";import{B as Yt}from"./BasicInput.94e22095.js";import{B as un}from"./BasicPrompt.0f8aac67.js";import{Q as dn}from"./QImg.91aecb73.js";import{e as mn}from"./export-file.dc78ba05.js";import{Q as hn}from"./QTooltip.9d840032.js";import"./externalHosting.js";import"./QResizeObserver.2503502b.js";import"./rtl.b51694b1.js";import"./QList.9d5bb77f.js";import"./position-engine.65ebcb34.js";import"./selection.2a17b691.js";import"./touch.70a9dd44.js";const be=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];function pn(e,t,o){return Object.prototype.toString.call(e)==="[object Date]"&&(o=e.getDate(),t=e.getMonth()+1,e=e.getFullYear()),vn(_t(e,t,o))}function Lt(e,t,o){return na(gn(e,t,o))}function fn(e){return yn(e)===0}function Xe(e,t){return t<=6?31:t<=11||fn(e)?30:29}function yn(e){const t=be.length;let o=be[0],i,a,l,s,m;if(e<o||e>=be[t-1])throw new Error("Invalid Jalaali year "+e);for(m=1;m<t&&(i=be[m],a=i-o,!(e<i));m+=1)o=i;return s=e-o,a-s<6&&(s=s-a+z(a+4,33)*33),l=ae(ae(s+1,33)-1,4),l===-1&&(l=4),l}function aa(e,t){const o=be.length,i=e+621;let a=-14,l=be[0],s,m,C,A,k;if(e<l||e>=be[o-1])throw new Error("Invalid Jalaali year "+e);for(k=1;k<o&&(s=be[k],m=s-l,!(e<s));k+=1)a=a+z(m,33)*8+z(ae(m,33),4),l=s;A=e-l,a=a+z(A,33)*8+z(ae(A,33)+3,4),ae(m,33)===4&&m-A===4&&(a+=1);const q=z(i,4)-z((z(i,100)+1)*3,4)-150,O=20+a-q;return t||(m-A<6&&(A=A-m+z(m+4,33)*33),C=ae(ae(A+1,33)-1,4),C===-1&&(C=4)),{leap:C,gy:i,march:O}}function gn(e,t,o){const i=aa(e,!0);return _t(i.gy,3,i.march)+(t-1)*31-z(t,7)*(t-7)+o-1}function vn(e){const t=na(e).gy;let o=t-621,i,a,l;const s=aa(o,!1),m=_t(t,3,s.march);if(l=e-m,l>=0){if(l<=185)return a=1+z(l,31),i=ae(l,31)+1,{jy:o,jm:a,jd:i};l-=186}else o-=1,l+=179,s.leap===1&&(l+=1);return a=7+z(l,30),i=ae(l,30)+1,{jy:o,jm:a,jd:i}}function _t(e,t,o){let i=z((e+z(t-8,6)+100100)*1461,4)+z(153*ae(t+9,12)+2,5)+o-34840408;return i=i-z(z(e+100100+z(t-8,6),100)*3,4)+752,i}function na(e){let t=4*e+139361631;t=t+z(z(4*e+183187720,146097)*3,4)*4-3908;const o=z(ae(t,1461),4)*5+308,i=z(ae(o,153),5)+1,a=ae(z(o,153),12)+1;return{gy:z(t,1461)-100100+z(8-a,6),gm:a,gd:i}}function z(e,t){return~~(e/t)}function ae(e,t){return e-~~(e/t)*t}const bn=["gregorian","persian"],Cn={modelValue:{required:!0},mask:{type:String},locale:Object,calendar:{type:String,validator:e=>bn.includes(e),default:"gregorian"},landscape:Boolean,color:String,textColor:String,square:Boolean,flat:Boolean,bordered:Boolean,readonly:Boolean,disable:Boolean},kn=["update:modelValue"];function ye(e){return e.year+"/"+Y(e.month)+"/"+Y(e.day)}function _n(e,t){const o=D(()=>e.disable!==!0&&e.readonly!==!0),i=D(()=>e.editable===!0?0:-1),a=D(()=>{const m=[];return e.color!==void 0&&m.push(`bg-${e.color}`),e.textColor!==void 0&&m.push(`text-${e.textColor}`),m.join(" ")});function l(){return e.locale!==void 0?{...t.lang.date,...e.locale}:t.lang.date}function s(m){const C=new Date,A=m===!0?null:0;if(e.calendar==="persian"){
`)),this.$q.dialog({component:un,componentProps:{title:this.$i18n.t("general.success"),message:this.$i18n.t("components.inventory.msg.success.fixedPlayerItems")},persistent:!0}).onDismiss(()=>{this.$router.push({name:"game-player-detail",params:{citizenid:this.$route.params.citizenid}}).then(()=>{this.$router.go()})})})}).onCancel(()=>{this.$router.back()})})},teleportPlayer(){this.$axios.post("/api/players/teleport",{citizenid:this.$route.params.citizenid,coords:this.player.PlayerData.position}).then(e=>{if(!e.data.resCode){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t("components.player.msg.error.notOnline")}),this.$router.push({name:"game-player-list"});return}this.$q.notify({message:this.$i18n.t("general.success"),position:"top",color:"green",icon:"fas fa-check",caption:this.$i18n.t("general.teleported")})})},tryChangeAccount(){this.$q.dialog({component:Ze,componentProps:{title:this.$i18n.t("components.player.changeAccountHeader"),message:this.$i18n.t("components.player.changeAccountSub",{name:`${this.player.PlayerData.charinfo.firstname} ${this.player.PlayerData.charinfo.lastname}`})},cancel:!0,persistent:!0}).onOk(()=>{this.$axios.post("/api/players/change-account",{citizenid:this.$route.params.citizenid,license:this.player.PlayerData.license}).then(e=>{if(!e.data.resCode){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t(`components.player.msg.error.${e.data.resMsg}`)});return}this.$q.notify({message:this.$i18n.t("general.success"),position:"top",color:"green",icon:"fas fa-check",caption:this.$i18n.t("general.saved")}),this.loadPlayer()})})},tryChangeBucket(){this.$axios.post("/api/players/bucket",{citizenid:this.$route.params.citizenid,bucket:this.player.PlayerData.bucket}).then(e=>{const t=e.data.resCode,o=e.data.resMsg;if(!t){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t(`components.player.msg.error.${o}`)});return}this.$q.notify({message:this.$i18n.t("general.success"),position:"top",color:"green",icon:"fas fa-check",caption:this.$i18n.t("components.player.msg.success.changedBucket")}),this.loadPlayer()})},tryPlayerWarn(){this.$q.dialog({component:Kn,componentProps:{title:this.$i18n.t("general.warnHeader"),message:this.$i18n.t("general.warnMsg",{name:`${this.player.PlayerData.charinfo.firstname} ${this.player.PlayerData.charinfo.lastname}`})},cancel:!0,persistent:!0}).onOk(e=>{this.$axios.post("/api/players/warn",{citizenid:this.$route.params.citizenid,reason:e.input}).then(t=>{if(!t.data.resCode){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t(`components.player.msg.error.${t.data.resMsg}`)});return}this.$q.notify({message:this.$i18n.t("general.success"),position:"top",color:"green",icon:"fas fa-check",caption:this.$i18n.t("general.warnSuccess")}),this.loadPlayer()})})},tryPlayerBan(){this.$q.dialog({component:rn,componentProps:{title:this.$i18n.t("general.banHeader"),message:this.$i18n.t("general.banMsg",{name:`${this.player.PlayerData.charinfo.firstname} ${this.player.PlayerData.charinfo.lastname}`})},cancel:!0,persistent:!0}).onOk(e=>{this.$axios.post("/api/players/ban",{citizenid:this.$route.params.citizenid,reason:e.input,time:e.time,hwid:e.hwid}).then(t=>{if(!t.data.resCode){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t("components.player.msg.error.notOnline")});return}this.$q.notify({message:this.$i18n.t("general.success"),position:"top",color:"green",icon:"fas fa-check",caption:this.$i18n.t("general.banSuccess")}),this.loadPlayer()})})},tryGetPlayerScreen(){this.$axios.get(`/api/players/${this.$route.params.citizenid}/screen`).then(e=>{if(!e.data.resCode){this.$q.notify({message:"Error",position:"top",color:"red",icon:"fas fa-exclamation-triangle",caption:this.$i18n.t("components.player.msg.error.couldNotFetchScreen")});return}const o=e.data.img;this.$q.dialog({compon
<!doctype html>
<html>
<head>
<title>Print - ${document.title}</title>
</head>
<body>
<div>${this.el.innerHTML}</div>
</body>
</html>
`),a.print(),a.close();return}else if(t==="link"){const a=this.getParentAttribute("href");if(a===null){const l=this.selectWord(this.selection),s=l?l.toString():"";if(!s.length&&(!this.range||!this.range.cloneContents().querySelector("img")))return;this.eVm.editLinkUrl.value=Ys.test(s)?s:"https://",document.execCommand("createLink",!1,this.eVm.editLinkUrl.value),this.save(l.getRangeAt(0))}else this.eVm.editLinkUrl.value=a,this.range.selectNodeContents(this.parent),this.save();return}else if(t==="fullscreen"){this.eVm.toggleFullscreen(),i();return}else if(t==="viewsource"){this.eVm.isViewingSource.value=this.eVm.isViewingSource.value===!1,this.eVm.setContent(this.eVm.props.modelValue),i();return}document.execCommand(t,!1,o),i()}selectWord(t){if(t===null||t.isCollapsed!==!0||t.modify===void 0)return t;const o=document.createRange();o.setStart(t.anchorNode,t.anchorOffset),o.setEnd(t.focusNode,t.focusOffset);const i=o.collapsed?["backward","forward"]:["forward","backward"];o.detach();const a=t.focusNode,l=t.focusOffset;return t.collapse(t.anchorNode,t.anchorOffset),t.modify("move",i[0],"character"),t.modify("move",i[1],"word"),t.extend(a,l),t.modify("extend",i[1],"character"),t.modify("extend",i[0],"word"),t}}const zs=et({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:t}){const o=D(()=>{const i=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(a=>e[a]===!0).map(a=>`q-btn-group--${a}`).join(" ");return`q-btn-group row no-wrap${i.length>0?" "+i:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>v("div",{class:o.value},tt(t.default))}}),ua=Object.keys(Ba),Is=ua.reduce((e,t)=>(e[t]={})&&e,{}),Ns=e=>ua.reduce((t,o)=>{const i=e[o];return i!==void 0&&(t[o]=i),t},{}),Vs=et({name:"QBtnDropdown",props:{...Is,...Na,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","before-show","show","before-hide","hide"],setup(e,{slots:t,emit:o}){const{proxy:i}=kt(),a=K(e.modelValue),l=K(null),s=Va(),m=D(()=>{const b={"aria-expanded":a.value===!0?"true":"false","aria-haspopup":"true","aria-controls":s,"aria-owns":s,"aria-label":e.toggleAriaLabel||i.$q.lang.label[a.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(b["aria-disabled"]="true"),b}),C=D(()=>"q-btn-dropdown__arrow"+(a.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),A=D(()=>Ua(e)),k=D(()=>Ns(e));ce(()=>e.modelValue,b=>{l.value!==null&&l.value[b?"show":"hide"]()}),ce(()=>e.split,Q);function q(b){a.value=!0,o("before-show",b)}function O(b){o("show",b),o("update:modelValue",!0)}function $(b){a.value=!1,o("before-hide",b)}function V(b){o("hide",b),o("update:modelValue",!1)}function J(b){o("click",b)}function L(b){Zt(b),Q(),o("click",b)}function le(b){l.value!==null&&l.value.toggle(b)}function de(b){l.value!==null&&l.value.show(b)}function Q(b){l.value!==null&&l.value.hide(b)}return Object.assign(i,{show:de,hide:Q,toggle:le}),Wt(()=>{e.modelValue===!0&&de()}),()=>{const b=[v(Ce,{class:C.value,name:e.dropdownIcon||i.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&b.push(v(on,{ref:l,id:s,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:q,onShow:O,onBeforeHide:$,onHide:V},t.default)),e.split===!1?v(M,{class:"q-btn-d