diff --git a/mail-vue/src/init/init.js b/mail-vue/src/init/init.js index 76e9cd1..01174a4 100644 --- a/mail-vue/src/init/init.js +++ b/mail-vue/src/init/init.js @@ -17,7 +17,9 @@ export async function init() { const token = localStorage.getItem('token'); if (!settingStore.lang) { - settingStore.lang = navigator.language.split('-')[0] + let lang = navigator.language.split('-')[0] + lang = lang === 'zh' ? lang : 'en' + settingStore.lang = lang } i18n.global.locale.value = settingStore.lang diff --git a/mail-worker/dist/assets/index-ONNky_gH.js b/mail-worker/dist/assets/index-CNTu5xWQ.js similarity index 97% rename from mail-worker/dist/assets/index-ONNky_gH.js rename to mail-worker/dist/assets/index-CNTu5xWQ.js index 69cb931..c5e898b 100644 --- a/mail-worker/dist/assets/index-ONNky_gH.js +++ b/mail-worker/dist/assets/index-CNTu5xWQ.js @@ -58,7 +58,7 @@ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[TD]=this[TD]={accessors:{}}).accessors,a=this.prototype;function o(i){const s=$d(i);r[s]||(Wle(a,i),r[s]=!0)}return Je.isArray(t)?t.forEach(o):o(t),this}};to.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Je.reduceDescriptors(to.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Je.freezeMethods(to);function e1(e,t){const n=this||av,r=t||n,a=to.from(r.headers);let o=r.data;return Je.forEach(e,function(s){o=s.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function lF(e){return!!(e&&e.__CANCEL__)}function dd(e,t,n){pn.call(this,e??"canceled",pn.ERR_CANCELED,t,n),this.name="CanceledError"}Je.inherits(dd,pn,{__CANCEL__:!0});function uF(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pn("Request failed with status code "+n.status,[pn.ERR_BAD_REQUEST,pn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Kle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jle(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[o];i||(i=u),n[a]=l,r[a]=u;let f=o,h=0;for(;f!==a;)h+=n[f++],f=f%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),u-i{n=c,a=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?i(u,c):(a=u,o||(o=setTimeout(()=>{o=null,i(a)},r-f)))},()=>a&&i(a)]}const Sy=(e,t,n=3)=>{let r=0;const a=jle(50,250);return Yle(o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,l=i-r,u=a(l),c=i<=s;r=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-i)/u:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},ED=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kD=e=>(...t)=>Je.asap(()=>e(...t)),Gle=ma.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ma.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ma.origin),ma.navigator&&/(msie|trident)/i.test(ma.navigator.userAgent)):()=>!0,qle=ma.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];Je.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Je.isString(r)&&i.push("path="+r),Je.isString(a)&&i.push("domain="+a),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zle(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cF(e,t,n){let r=!Xle(t);return e&&(r||n==!1)?Zle(e,t):t}const xD=e=>e instanceof to?{...e}:e;function vc(e,t){t=t||{};const n={};function r(u,c,f,h){return Je.isPlainObject(u)&&Je.isPlainObject(c)?Je.merge.call({caseless:h},u,c):Je.isPlainObject(c)?Je.merge({},c):Je.isArray(c)?c.slice():c}function a(u,c,f,h){if(Je.isUndefined(c)){if(!Je.isUndefined(u))return r(void 0,u,f,h)}else return r(u,c,f,h)}function o(u,c){if(!Je.isUndefined(c))return r(void 0,c)}function i(u,c){if(Je.isUndefined(c)){if(!Je.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(u,c,f)=>a(xD(u),xD(c),f,!0)};return Je.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||a,h=f(e[c],t[c],c);Je.isUndefined(h)&&f!==s||(n[c]=h)}),n}const fF=e=>{const t=vc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:s}=t;t.headers=i=to.from(i),t.url=oF(cF(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Je.isFormData(n)){if(ma.hasStandardBrowserEnv||ma.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(ma.hasStandardBrowserEnv&&(r&&Je.isFunction(r)&&(r=r(t)),r||r!==!1&&Gle(t.url))){const u=a&&o&&qle.read(o);u&&i.set(a,u)}return t},Jle=typeof XMLHttpRequest<"u",Qle=Jle&&function(e){return new Promise(function(n,r){const a=fF(e);let o=a.data;const i=to.from(a.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=a,c,f,h,d,p;function v(){d&&d(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(a.method.toUpperCase(),a.url,!0),m.timeout=a.timeout;function g(){if(!m)return;const _=to.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:_,config:e,request:m};uF(function(E){n(E),v()},function(E){r(E),v()},C),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(r(new pn("Request aborted",pn.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new pn("Network Error",pn.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const C=a.transitional||iF;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new pn(w,C.clarifyTimeoutError?pn.ETIMEDOUT:pn.ECONNABORTED,e,m)),m=null},o===void 0&&i.setContentType(null),"setRequestHeader"in m&&Je.forEach(i.toJSON(),function(w,C){m.setRequestHeader(C,w)}),Je.isUndefined(a.withCredentials)||(m.withCredentials=!!a.withCredentials),s&&s!=="json"&&(m.responseType=a.responseType),u&&([h,p]=Sy(u,!0),m.addEventListener("progress",h)),l&&m.upload&&([f,d]=Sy(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",d)),(a.cancelToken||a.signal)&&(c=_=>{m&&(r(!_||_.type?new dd(null,e,m):_),m.abort(),m=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const b=Kle(a.url);if(b&&ma.protocols.indexOf(b)===-1){r(new pn("Unsupported protocol "+b+":",pn.ERR_BAD_REQUEST,e));return}m.send(o||null)})},eue=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(u){if(!a){a=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof pn?c:new dd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,o(new pn(`timeout ${t} of ms exceeded`,pn.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>Je.asap(s),l}},tue=function*(e,t){let n=e.byteLength;if(n{const a=nue(e,t);let o=0,i,s=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await a.next();if(u){s(),l.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),a.return()}},{highWaterMark:2})},ab=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",dF=ab&&typeof ReadableStream=="function",aue=ab&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hF=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oue=dF&&hF(()=>{let e=!1;const t=new Request(ma.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),AD=64*1024,BS=dF&&hF(()=>Je.isReadableStream(new Response("").body)),Cy={stream:BS&&(e=>e.body)};ab&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Cy[t]&&(Cy[t]=Je.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pn(`Response type '${t}' is not supported`,pn.ERR_NOT_SUPPORT,r)})})})(new Response);const iue=async e=>{if(e==null)return 0;if(Je.isBlob(e))return e.size;if(Je.isSpecCompliantForm(e))return(await new Request(ma.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Je.isArrayBufferView(e)||Je.isArrayBuffer(e))return e.byteLength;if(Je.isURLSearchParams(e)&&(e=e+""),Je.isString(e))return(await aue(e)).byteLength},sue=async(e,t)=>{const n=Je.toFiniteNumber(e.getContentLength());return n??iue(t)},lue=ab&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:i,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=fF(e);u=u?(u+"").toLowerCase():"text";let d=eue([a,o&&o.toAbortSignal()],i),p;const v=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(l&&oue&&n!=="get"&&n!=="head"&&(m=await sue(c,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(Je.isFormData(r)&&(S=C.headers.get("content-type"))&&c.setContentType(S),C.body){const[E,M]=ED(m,Sy(kD(l)));r=MD(C.body,AD,E,M)}}Je.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...h,signal:d,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let b=await fetch(p);const _=BS&&(u==="stream"||u==="response");if(BS&&(s||_&&v)){const C={};["status","statusText","headers"].forEach(x=>{C[x]=b[x]});const S=Je.toFiniteNumber(b.headers.get("content-length")),[E,M]=s&&ED(S,Sy(kD(s),!0))||[];b=new Response(MD(b.body,AD,E,()=>{M&&M(),v&&v()}),C)}u=u||"text";let w=await Cy[Je.findKey(Cy,u)||"text"](b,e);return!_&&v&&v(),await new Promise((C,S)=>{uF(C,S,{data:w,headers:to.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new pn("Network Error",pn.ERR_NETWORK,e,p),{cause:g.cause||g}):pn.from(g,g&&g.code,e,p)}}),VS={http:Cle,xhr:Qle,fetch:lue};Je.forEach(VS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const DD=e=>`- ${e}`,uue=e=>Je.isFunction(e)||e===null||e===!1,pF={getAdapter:e=>{e=Je.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(DD).join(` `):" "+DD(o[0]):"as no adapter specified";throw new pn("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:VS};function t1(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new dd(null,e)}function ID(e){return t1(e),e.headers=to.from(e.headers),e.data=e1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pF.getAdapter(e.adapter||av.adapter)(e).then(function(r){return t1(e),r.data=e1.call(e,e.transformResponse,r),r.headers=to.from(r.headers),r},function(r){return lF(r)||(t1(e),r&&r.response&&(r.response.data=e1.call(e,e.transformResponse,r.response),r.response.headers=to.from(r.response.headers))),Promise.reject(r)})}const vF="1.8.4",ob={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ob[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const PD={};ob.transitional=function(t,n,r){function a(o,i){return"[Axios v"+vF+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,s)=>{if(t===!1)throw new pn(a(i," has been removed"+(n?" in "+n:"")),pn.ERR_DEPRECATED);return n&&!PD[i]&&(PD[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,s):!0}};ob.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function cue(e,t,n){if(typeof e!="object")throw new pn("options must be an object",pn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const s=e[o],l=s===void 0||i(s,o,e);if(l!==!0)throw new pn("option "+o+" must be "+l,pn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pn("Unknown option "+o,pn.ERR_BAD_OPTION)}}const bg={assertOptions:cue,validators:ob},Fi=bg.validators;let oc=class{constructor(t){this.defaults=t,this.interceptors={request:new CD,response:new CD}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vc(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&bg.assertOptions(r,{silentJSONParsing:Fi.transitional(Fi.boolean),forcedJSONParsing:Fi.transitional(Fi.boolean),clarifyTimeoutError:Fi.transitional(Fi.boolean)},!1),a!=null&&(Je.isFunction(a)?n.paramsSerializer={serialize:a}:bg.assertOptions(a,{encode:Fi.function,serialize:Fi.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bg.assertOptions(n,{baseUrl:Fi.spelling("baseURL"),withXsrfToken:Fi.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&Je.merge(o.common,o[n.method]);o&&Je.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=to.concat(i,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!l){const p=[ID.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,u),h=p.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new dd(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mF(function(a){t=a}),cancel:t}}};function due(e){return function(n){return e.apply(null,n)}}function hue(e){return Je.isObject(e)&&e.isAxiosError===!0}const zS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zS).forEach(([e,t])=>{zS[t]=e});function gF(e){const t=new oc(e),n=G8(oc.prototype.request,t);return Je.extend(n,oc.prototype,t,{allOwnKeys:!0}),Je.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return gF(vc(e,a))},n}const Ar=gF(av);Ar.Axios=oc;Ar.CanceledError=dd;Ar.CancelToken=fue;Ar.isCancel=lF;Ar.VERSION=vF;Ar.toFormData=rb;Ar.AxiosError=pn;Ar.Cancel=Ar.CanceledError;Ar.all=function(t){return Promise.all(t)};Ar.spread=due;Ar.isAxiosError=hue;Ar.mergeConfig=vc;Ar.AxiosHeaders=to;Ar.formToJSON=e=>sF(Je.isHTMLForm(e)?new FormData(e):e);Ar.getAdapter=pF.getAdapter;Ar.HttpStatusCode=zS;Ar.default=Ar;const{Axios:TMe,AxiosError:EMe,CanceledError:kMe,isCancel:xMe,CancelToken:MMe,VERSION:AMe,all:DMe,Cancel:IMe,isAxiosError:PMe,spread:OMe,toFormData:LMe,AxiosHeaders:RMe,HttpStatusCode:NMe,formToJSON:$Me,getAdapter:FMe,mergeConfig:BMe}=Ar,pue={inbox:"Inbox",drafts:"Drafts",sent:"Sent",starred:"Starred",settings:"Settings",analytics:"Analytics",allUsers:"All Users",allMail:"All Mail",permissions:"Role",inviteCode:"Invite Code",SystemSettings:"System Settings",noMoreData:"No more data",noMessagesFound:"No messages found",addAccount:"Add Account",emailAccount:"Email",deleteUser:"Delete Account",deleteUserBtn:"Delete",changePassword:"Change Password",newPassword:"New password",confirmPassword:"Confirm password",add:"Add",manage:"Manage",rename:"Rename",delete:"Delete",save:"Save",profile:"Profile",change:"Change",changePwdBtn:"Change",username:"Username",password:"Password",delAccount:"Delete Account",delAccountMsg:"This will permanently delete your account and data. It cannot be reactivated.",totalReceived:"Total Received",totalSent:"Total Sent",totalMailboxes:"Total Accounts",totalUsers:"Total Users",deleted:"Deleted",selectDeleted:"Deleted",active:"Active",emailSource:"Email Source",userGrowth:"User Growth",emailGrowth:"Email Growth",emailSent:"Sent",emailReceived:"Received",sentToday:"Sent Today",total:"Total",growthTotalUsers:"Total Users",searchByEmail:"Enter email to search",tabEmailAddress:"Email",tabReceived:"Received",tabSent:"Sent",tabMailboxes:"Accounts",tabRegisteredAt:"Registered at",tabStatus:"Status",tabRole:"Role",roleName:"Name",role:"Name",all:"All",normal:"Normal",banned:"Banned",reset:"Reset",restore:"Restore",tabSetting:"Settings",registrationIp:"Registration IP",recentIP:"Recent IP",recentActivity:"Recent Activity",loginDevice:"Login Device",loginSystem:"Login System",browserLogin:"Browser Login",unauthorized:"Unauthorized",unlimited:"Unlimited",sendCount:"Send email : ",accountCount:"Add account : ",action:"Action",chgPwd:"Pwd",perm:"Role",btnBan:"Ban",admin:"Admin",addUser:"Add User",select:"Select",unknown:"Unknown",changePerm:"Change Role",from:"From",subject:"Subject",sender:"Sender",user:"User",searchByContent:"Enter text to search",noRecipient:"No recipient",received:"Received",selectEmail:"Email",order:"Order",default:"Default",description:"Description",removeContent:"Remove content",removeAll:"Remove all",expand:"Expand",collapse:"Collapse",daily:"Daily",searchRegKeyDesc:"Enter invite code to search",remainingUses:"Remaining Uses",exhausted:"Exhausted",validUntil:"Valid Until",expired:"Expired",copy:"Copy",history:"History",addRegKey:"Add Invite Code",regKey:"Invite Code",noCodeFound:"No messages found",useHistory:"Usage History",date:"Date",roleDesc:"Role",noSubject:"No subject",recipient:"To",delivered:"Delivered",complained:"Complained",delayed:"Delayed",bounced:"Bounced",attachments:"Attachments",attCount:"Total {total}",emailCount:"Total {total}",error404:"404 Not Found",home:"Home",loginBtn:"Sign in",regBtn:"Sign up",loginTitle:"Sign in to your account to access email",regTitle:"Sign up for an account to use email",confirmPwd:"Confirm password",regKeyOptional:"Invite code (Optional)",noAccount:"Don't have an account? ​",hasAccount:"Already have an account? ​",regSwitch:"Sign up",loginSwitch:"Sign in",websiteSetting:"Website",websiteReg:"Sign Up",loginDomain:"Sign-In Box Domain",multipleEmail:"Multiple Accounts",multipleEmailDesc:"Enable this feature to allow users to add multiple accounts.",physicallyWipeData:"Physically Wipe Data",physicallyWipeDataDesc:"This action will permanently erase all deleted data.",customization:"Customization",websiteTitle:"Title",loginBoxOpacity:"Login Box Opacity",loginBackground:"Background",emailSetting:"Email",receiveEmail:"Receive Email",autoRefresh:"Auto Refresh",autoRefreshDesc:"Automatically fetch the latest emails from the server.",sendEmail:"Send Email",resendToken:"Resend Token",R2OS:"R2 Object Storage",osDomain:"Domain",emailPush:"Email Push",tgBot:"Telegram Bot",disable:"Disable",disabled:"Disabled",otherEmail:"Forwarding to External Email",forwardingRules:"Forwarding Rules",forwardAll:"All",rules:"Rules",turnstileSetting:"Turnstile",signUpVerification:"Sign Up Verification",addEmailVerification:"Add Account Verification",about:"About",version:"Version",community:"Community",changeTitle:"Change Title",addResendTokenDesc:"Input to add; leave empty to delete.",addOsDomain:"Add Domain",domainDesc:"Domain",addTurnstileSecret:"Add turnstile secret",backgroundTitle:"Change Background",tgBotDesc:"Forward received emails to a Telegram bot",tgBotToken:"Bot token",toBotTokenDesc:"Multiple user chat_ids, separated by commas",otherEmailDesc:"emails can be forwarded to external email, but must be verified via cloudflare.",otherEmailInputDesc:"Separate multiple email addresses with commas.",forwardingRulesDesc:"Rule-based forwarding only forwards emails received by the specified address.",ruleEmailsInputDesc:"Separate multiple email addresses with commas.",resendTokenList:"Token List",domain:"Domain",optional:"Optional",subjectInputDesc:"Please enter the email subject.",changeUserName:"Change Username",sendSeparately:"Separately",send:"Send",reply:"Reply",confirm:"Confirm",cancel:"Cancel",delEmailConfirm:"Confirm deleting this email?",delSuccessMsg:"Deleted successfully",emptyEmailMsg:"Email cannot be empty",notEmailMsg:"Invalid email",emptyPwdMsg:"Password cannot be empty",pwdLengthMsg:"Password must be at least 6 characters",confirmPwdFailMsg:"The two passwords do not match",emptyRegKeyMsg:"Invite code cannot be empty",regSuccessMsg:"Sign up successful",copySuccessMsg:"Copied successfully",copyFailMsg:"Copy failed",clearRegKey:"Confirm clearing all invalid invite codes?",clearSuccess:"Cleared successfully",emptyRole:"Role cannot be empty",emptyTimeMsg:"Valid until time cannot be empty",emptyCountMsg:"Available count cannot be empty",addSuccessMsg:"Addition successful",delConfirm:"Confirm deleting {msg}?",emptyRoleNameMsg:"Role name cannot be empty",saveSuccessMsg:"Saved successfully",changeRoleTitle:"Change Role",addRoleTitle:"Add Role",emptyUserNameMsg:"Name cannot be empty",delAccountConfirm:"Confirm deleting current account and all associated data?",clearAllDelConfirm:'This action is irreversible. Enter DELETE to proceed',warning:"Warning",delInputPattern:"DELETE",inputErrorMessage:"Please enter DELETE to confirm",delBackgroundConfirm:"Confirm deleting this background?",enable:"Enable",enabled:"Enabled",reSendConfirm:"Confirm reset of {msg} send count?",reSuccessMsg:"Reset successful",restoreConfirm:"Confirm restoring {msg}?",normalRestore:"Normal restore",allRestore:"Includes deleted data",restoreSuccessMsg:"Restore successful",banRestore:"Confirm banning {msg}?",logOut:"Sign out",clearContentConfirm:"Are you sure to clear all content?",attLimitMsg:"Attachment size limit: 28MB",emptyRecipientMsg:"Recipient email cannot be empty",emptySubjectMsg:"Subject cannot be empty",emptyContentMsg:"Content cannot be empty",noSeparateSendMsg:"Separate sending does not support attachments yet",sendSuccessMsg:"Send successful",sendFailMsg:"Send failed",saveDraftConfirm:"Save draft?",delEmailsConfirm:"Confirm batch delete these emails?",sending:"Sending email...",sendingErrorMsg:"Sending in progress",networkErrorMsg:"Network error. Check your internet",timeoutErrorMsg:"Timeout. Try again later",serverBusyErrorMsg:"Server busy. Please try again later",reqFailErrorMsg:"Request failed. Try again later",message:"Message",language:"Language",totalUserAccount:"{msg}",sendBanned:"Banned",wrote:"wrote",support:"Support",supportDesc:"Buy me tea",featDesc:"Feature Description",emailInterception:"Email Interception",emailInterceptionDesc:"Enter a domain or email address to prevent users from receiving emails from certain websites.",availableDomains:"Available Domains",availableDomainsDesc:"Restrict users to email domains specified. Domains not on the approved list will be blocked from registration, adding email addresses, and sending/receiving emails. If left blank, all domains will be allowed by default.",backgroundUrlDesc:"Image URL",localUpload:" Local upload",imageLink:"Image URL",imageLinkErrorMsg:"Invalid image URL",backgroundWarning:"Image file size affects website load speed.",rulesVerify:"Rules",rulesVerifyTitle:"Trigger After {count} Daily Uses per IP",botVerifyMsg:"Please verify that you are human",noticeTitle:"Notice",noticePopup:"Sign-In Popup",icon:"Icon",position:"Position",offset:"Offset",duration:"Duration",topRight:"Top Right",topLeft:"Top Left",bottomRight:"Bottom Right",bottomLeft:"Bottom Left",width:"Width",titleDesc:"Title",noticeContentDesc:"Notice content supports HTML",verifyModuleFailed:"Verification module failed to load. Please refresh the page",popUp:"Pop Up",noRecipientTitle:"No Recipient",noRecipientDesc:"Emails can be received even without a registered email address.",preview:"Preview",help:"Help",document:"Document"},vue={inbox:"收件箱",drafts:"草稿箱",sent:"已发送",starred:"星标邮件",settings:"个人设置",analytics:"分析页",allUsers:"用户列表",allMail:"全部邮件",permissions:"权限控制",inviteCode:"注册密钥",SystemSettings:"系统设置",noMoreData:"没有更多数据了",noMessagesFound:"没有任何邮件",addAccount:"添加邮箱",emailAccount:"邮箱",deleteUser:"删除账户",deleteUserBtn:"删除账户",changePassword:"修改密码",newPassword:"新的密码",confirmPassword:"确认密码",add:"添加",manage:"管理",rename:"改名",delete:"删除",save:"保存",profile:"个人信息",change:"修改",changePwdBtn:"修改密码",username:"用户名",password:"密码",delAccount:"删除账户",delAccountMsg:"此操作将永久删除您的账户及其所有数据,无法恢复",totalReceived:"收件数量",totalSent:"发送数量",totalMailboxes:"邮箱数量",totalUsers:"用户数量",deleted:"删除",selectDeleted:"已删除",active:"正常",emailSource:"邮件来源",userGrowth:"用户增长",emailGrowth:"邮件增长",emailSent:"发送",emailReceived:"接收",sentToday:"今日发件",total:"次数",growthTotalUsers:"用户数",searchByEmail:"输入邮箱搜索",tabEmailAddress:"用户邮箱",tabReceived:"收件数量",tabSent:"发件数量",tabMailboxes:"邮箱数量",tabRegisteredAt:"注册时间",tabStatus:"状态",tabRole:"权限身份",roleName:"名字",role:"权限身份",all:"全部",normal:"正常",banned:"封禁",reset:"重置",restore:"恢复",tabSetting:"设置",registrationIp:"注册IP",recentIP:"近期IP",recentActivity:"近期活动",loginDevice:"登录设备",loginSystem:"登录系统",browserLogin:"登录浏览器",unauthorized:"无权限",unlimited:"无限制",sendCount:"邮件发送 :",accountCount:"邮箱添加 :",action:"操作",chgPwd:"改密",perm:"权限",btnBan:"禁用",admin:"超级管理员",addUser:"添加用户",select:"请选择",unknown:"未知",changePerm:"修改权限",from:"发件人",subject:"主题",sender:"发件人",user:"用户",searchByContent:"输入内容查询",noRecipient:"无收件人",received:"已接收",selectEmail:"邮箱",order:"排序",default:"默认",description:"描述",removeContent:"移除正文",removeAll:"丢弃邮件",expand:"展开",collapse:"收起",daily:"每天",searchRegKeyDesc:"输入注册码搜索",remainingUses:"剩余次数",exhausted:"已用尽",validUntil:"有效至期",expired:"已过期",copy:"复制",history:"记录",addRegKey:"添加注册码",regKey:"注册码",noCodeFound:"没有任何注册码",useHistory:"使用记录",date:"时间",roleDesc:"权限身份",noSubject:"无主题",recipient:"收件人",delivered:"发送成功",complained:"被标记为垃圾",delayed:"发送被延迟",bounced:"发送失败",attachments:"附件列表",attCount:"共 {total} 个",emailCount:"共 {total} 封",error404:"404错误, 找不到页面",home:"返回首页",loginBtn:"登录",regBtn:"注册",loginTitle:"输入账号信息以开始使用邮箱系统",regTitle:"输入账号密码以开始注册邮箱系统",confirmPwd:"确认密码",regKeyOptional:"注册码(可选)",noAccount:"还没有账号?",hasAccount:"已有账号?",regSwitch:"创建账号",loginSwitch:"去登录",websiteSetting:"网站设置",websiteReg:"用户注册",loginDomain:"登录框域名",multipleEmail:"多号模式",multipleEmailDesc:"开启后账号栏出现一个用户可以添加多个邮箱",physicallyWipeData:"物理清空数据",physicallyWipeDataDesc:"该操作会物理清空所有已被删除的数据",customization:"个性化设置",websiteTitle:"网站标题",loginBoxOpacity:"登录透明",loginBackground:"登录背景",emailSetting:"邮件设置",receiveEmail:"邮件接收",autoRefresh:"自动刷新",autoRefreshDesc:"轮询请求服务器获取最新邮件",sendEmail:"邮件发送",resendToken:"添加 Resend Token",R2OS:"R2 对象存储",osDomain:"访问域名",emailPush:"邮件推送",tgBot:"Telegram 机器人",disable:"关闭",disabled:"已关闭",otherEmail:"第三方邮箱",forwardingRules:"转发规则",forwardAll:"全部转发",rules:"规则转发",turnstileSetting:"Turnstile 人机验证",signUpVerification:"注册验证",addEmailVerification:"添加验证",about:"关于",version:"版本",community:"交流",changeTitle:"修改标题",addResendTokenDesc:"输入内容添加,不填则删除",addOsDomain:"添加域名",domainDesc:"域名",addTurnstileSecret:"添加 Turnstile 密钥",backgroundTitle:"设置背景",tgBotDesc:"可以将接收的邮件转发到Tg机器人",tgBotToken:"机器人 token",toBotTokenDesc:"用户 chat_id 多个用,分开",otherEmailDesc:"可以将邮件转到其他服务商邮箱,需要在cloudflare验证邮箱",otherEmailInputDesc:"多个邮箱用, 分开",forwardingRulesDesc:"规则转发只会转发设置邮箱所接收的邮件",ruleEmailsInputDesc:"多个邮箱用, 分开",resendTokenList:"Token 列表",domain:"域名",optional:"可选",subjectInputDesc:"请输入邮件主题",changeUserName:"修改用户名",sendSeparately:"分别发送",send:"发送",reply:"回复",confirm:"确定",cancel:"取消",delEmailConfirm:"确认删除该邮件吗?",delSuccessMsg:"删除成功",emptyEmailMsg:"邮箱不能为空",notEmailMsg:"输入的邮箱不合法",emptyPwdMsg:"密码不能为空",pwdLengthMsg:"密码最少六位",confirmPwdFailMsg:"两次密码输入不一致",emptyRegKeyMsg:"注册码不能为空",regSuccessMsg:"注册成功",copySuccessMsg:"复制成功",copyFailMsg:"复制失败",clearRegKey:"确认清除所有不可用的注册码?",clearSuccess:"清除成功",emptyRole:"身份类型不能为空",emptyTimeMsg:"有效时间不能为空",emptyCountMsg:"可用次数不能为空",addSuccessMsg:"添加成功",delConfirm:"确认删除{msg}吗?",emptyRoleNameMsg:"身份名不能为空",saveSuccessMsg:"保存成功",changeRoleTitle:"修改身份",addRoleTitle:"添加身份",emptyUserNameMsg:"用户名不能为空",delAccountConfirm:"确认删除当前账号及所有数据吗?",clearAllDelConfirm:'此操作不可逆转, 输入 确认删除 继续操作',warning:"警告",delInputPattern:"确认删除",inputErrorMessage:"请输入确认删除",delBackgroundConfirm:"确定要删除这个背景吗?",enable:"启用",enabled:"已启用",reSendConfirm:"确认重置 {msg} 发件次数吗?",reSuccessMsg:"重置成功",restoreConfirm:"确认要恢复 {msg} 吗?",normalRestore:"普通恢复",allRestore:"包括已删除的数据",restoreSuccessMsg:"恢复成功",banRestore:"确认禁用 {msg} 吗?",logOut:"退出",clearContentConfirm:"确定要清空所有内容吗?",attLimitMsg:"附件大小限制28mb",emptyRecipientMsg:"收件人邮箱地址不能为空",emptySubjectMsg:"主题不能为空",emptyContentMsg:"邮件正文不能为空",noSeparateSendMsg:"分别发送暂时不支持附件",sendSuccessMsg:"发送成功",sendFailMsg:"发送失败",saveDraftConfirm:"是否保存草稿?",delEmailsConfirm:"确认批量删除这些邮件吗?",sending:"邮件正在发送中",sendingErrorMsg:"邮件正在发送中",networkErrorMsg:"网络错误,请检查网络连接",timeoutErrorMsg:"请求超时,请稍后重试",serverBusyErrorMsg:"服务器繁忙,请稍后重试",reqFailErrorMsg:"请求失败,请稍后再试",message:"邮件详情",language:"网站语言",totalUserAccount:"{msg} 个",sendBanned:"已禁用",wrote:"来信",support:"捐助",supportDesc:"请我喝杯奶茶",featDesc:"功能说明",emailInterception:"邮件拦截",emailInterceptionDesc:"输入邮箱或域名拦截邮件,可用于禁止用户接收某些网站的邮件",availableDomains:"可用域名",availableDomainsDesc:"限制用户只能使用指定的域名邮箱,不在配置名单内的域名会被禁止使用注册添加邮箱,接收发送邮件等功能,留空默认允许可用所有域名",backgroundUrlDesc:"在线图片链接",localUpload:"本地上传",imageLink:"图片链接",imageLinkErrorMsg:"图片链接不正确",backgroundWarning:"图片文件大小会影响网站加载速度",rulesVerify:"规则",rulesVerifyTitle:"IP 每天使用 {count} 次后触发",botVerifyMsg:"请完成人机验证",noticeTitle:"网站公告",noticePopup:"登录弹窗",icon:"图标",position:"位置",offset:"偏移距离",duration:"显示时长",topRight:"右上",topLeft:"左上",bottomRight:"右下",bottomLeft:"左下",width:"宽度",titleDesc:"标题",noticeContentDesc:"公告内容,支持HTML",verifyModuleFailed:"人机验证模块加载失败,请刷新页面",popUp:"弹出",noRecipientTitle:"无人收件",noRecipientDesc:"即使没有注册的邮箱也能收到邮件",preview:"预览",help:"帮助",document:"项目文档"},hf=fie({legacy:!1,messages:{zh:vue,en:pue}});let rn=Ar.create({baseURL:"/api"});rn.interceptors.request.use(e=>{const{lang:t}=Jr();return e.headers.Authorization=`${localStorage.getItem("token")}`,e.headers["accept-language"]=t,e});rn.interceptors.response.use(e=>new Promise((t,n)=>{const r=e.config.noMsg,a=e.data;r?a.code===200?t(a.data):n(a):a.code===401?(kt({message:a.message,type:"error",plain:!0,grouping:!0,repeatNum:-4}),localStorage.removeItem("token"),lr.push("/login"),n(a)):a.code===403?(kt({message:a.message,type:"warning",plain:!0,grouping:!0,repeatNum:-4}),n(a)):a.code!==200&&(kt({message:a.message,type:"error",plain:!0,grouping:!0,repeatNum:-4}),n(a)),t(a.data)}),e=>(e.config.noMsg||(e.message.includes("Network Error")?kt({message:hf.global.t("networkErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4}):e.code==="ECONNABORTED"?(kt({message:hf.global.t("timeoutErrorMsg"),type:"error",plain:!0,grouping:!0}),kt.error("")):e.response?kt({message:hf.global.t("serverBusyErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4}):kt({message:hf.global.t("reqFailErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4})),Promise.reject(e)));function Ty(){return rn.get("/my/loginUserInfo")}function mue(e){return rn.put("/my/resetPassword",{password:e})}function gue(){return rn.delete("/my/delete")}const ei=Ic("user",{state:()=>({user:{},refreshList:0}),actions:{refreshUserList(){Ty().then(e=>{this.refreshList++})},refreshUserInfo(){Ty().then(e=>{this.user=e})}}}),Gs=Ic("account",{state:()=>({currentAccountId:0,currentAccount:{},changeUserAccountName:""})}),yue={mounted(e,t){const r=ei().user.permKeys,a=t.value;if(r.includes("*"))return;(Array.isArray(a)?a.some(i=>r.includes(i)):r.includes(a))||e.parentNode&&e.parentNode.removeChild(e)}};function Ia(e){const{permKeys:t}=ei().user;return t.includes("*")||t.includes(e)}function yF(e){const t=[];return Object.keys(OD).forEach(n=>{(e.includes(n)||e.includes("*"))&&t.push(...OD[n])}),t}const OD={"email:send":[{path:"/sent",name:"send",component:()=>da(()=>Promise.resolve().then(()=>Hpe),void 0),meta:{title:"sent",name:"send",menu:!0}},{path:"/drafts",name:"draft",component:()=>da(()=>Promise.resolve().then(()=>Kpe),void 0),meta:{title:"drafts",name:"draft",menu:!0}}],"user:query":[{path:"/all-users",name:"user",component:()=>da(()=>Promise.resolve().then(()=>Nve),void 0),meta:{title:"allUsers",name:"user",menu:!0}}],"role:query":[{path:"/role",name:"role",component:()=>da(()=>Promise.resolve().then(()=>Xve),void 0),meta:{title:"permissions",name:"role",menu:!0}}],"setting:query":[{path:"/system-setting",name:"sys-setting",component:()=>da(()=>Promise.resolve().then(()=>Pge),void 0),meta:{title:"SystemSettings",name:"sys-setting",menu:!0}}],"reg-key:query":[{path:"/invite-code",name:"reg-key",component:()=>da(()=>Promise.resolve().then(()=>rye),void 0),meta:{title:"inviteCode",name:"reg-key",menu:!0}}],"all-email:query":[{path:"/all-mail",name:"all-email",component:()=>da(()=>Promise.resolve().then(()=>lye),void 0),meta:{title:"allMail",name:"all-email",menu:!0}}],"analysis:query":[{path:"/analysis",name:"analysis",component:()=>da(()=>Promise.resolve().then(()=>yMe),void 0),meta:{title:"analytics",name:"analysis",menu:!0}}]};function bue(e){return rn.put("/setting/set",e)}function _ue(){return rn.get("/setting/query")}function LD(){return rn.get("/setting/websiteConfig")}function wue(e){return rn.put("/setting/setBackground",{background:e})}function Sue(){return rn.delete("/setting/physicsDeleteAll")}function qf(e){if(!e)return"NaN";if(e.startsWith("https://"))return e;const{settings:t}=Jr();let n=t.r2Domain;return n.startsWith("http")?(n.endsWith("/")&&(n=n.slice(0,-1)),n+"/"+e):"https://"+n+"/"+e}async function Cue(){document.title="​";const e=Jr(),t=ei(),n=Gs(),r=localStorage.getItem("token");e.lang||(e.lang=navigator.language.split("-")[0]),hf.global.locale.value=e.lang;let a=null;if(r){const s=Ty().catch(c=>(console.error(c),null)),[l,u]=await Promise.all([LD(),s]);a=l,e.settings=a,e.domainList=a.domainList,document.title=a.title,u&&(n.currentAccountId=u.accountId,t.user=u,yF(u.permKeys).forEach(f=>{lr.addRoute("layout",f)}))}else a=await LD(),e.settings=a,e.domainList=a.domainList,document.title=a.title;const o=document.getElementById("loading-first");if(!a.background){o.remove();return}const i=new Image;i.src=qf(a.background),i.onload=()=>{o.remove()},i.onerror=()=>{console.warn("背景图片加载失败:",i.src),o.remove()}}const Tue=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Eue=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,kue=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function xue(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Mue(e);return}return t}function Mue(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Aue(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!kue.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Tue.test(e)||Eue.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,xue)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}function Due(e,t){if(e==null)return;let n=e;for(let r=0;r1&&(t=zE(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function bF(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const n={};for(const r in e)n[r]=e[r];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const n={};for(const r in e)n[r]=e[r];return n}return zE(e,bF(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function _F(e,t){return t.map(n=>n.split(".")).map(n=>[n,Due(e,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>zE(n,r[1],r[0]),{})}function wF(e,t){return t.map(n=>n.split(".")).reduce((n,r)=>bF(n,r),e)}function RD(e,{storage:t,serializer:n,key:r,debug:a,pick:o,omit:i,beforeHydrate:s,afterHydrate:l},u,c=!0){try{c&&s?.(u);const f=t.getItem(r);if(f){const h=n.deserialize(f),d=o?_F(h,o):h,p=i?wF(d,i):d;e.$patch(p)}c&&l?.(u)}catch(f){a&&console.error("[pinia-plugin-persistedstate]",f)}}function ND(e,{storage:t,serializer:n,key:r,debug:a,pick:o,omit:i}){try{const s=o?_F(e,o):e,l=i?wF(s,i):s,u=n.serialize(l);t.setItem(r,u)}catch(s){a&&console.error("[pinia-plugin-persistedstate]",s)}}function Iue(e,t,n){const{pinia:r,store:a,options:{persist:o=n}}=e;if(!o)return;if(!(a.$id in r.state.value)){const l=r._s.get(a.$id.replace("__hot:",""));l&&Promise.resolve().then(()=>l.$persist());return}const s=(Array.isArray(o)?o:o===!0?[{}]:[o]).map(t);a.$hydrate=({runHooks:l=!0}={})=>{s.forEach(u=>{RD(a,u,e,l)})},a.$persist=()=>{s.forEach(l=>{ND(a.$state,l)})},s.forEach(l=>{RD(a,l,e),a.$subscribe((u,c)=>ND(c,l),{detached:!0})})}function Pue(e={}){return function(t){Iue(t,n=>({key:(e.key?e.key:r=>r)(n.key??t.store.$id),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:r=>JSON.stringify(r),deserialize:r=>Aue(r)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate,afterHydrate:n.afterHydrate,pick:n.pick,omit:n.omit}),e.auto??!1)}}var Oue=Pue();const Lue=Sie().use(Oue),HE=zH(Die).use(Lue);await Cue();HE.use(lr).use(hf).directive("perm",yue);HE.config.devtools=!0;HE.mount("#app");const SF=/^[a-z0-9]+(-[a-z0-9]+)*$/,ib=(e,t,n,r="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;r=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),l=a.pop(),u={provider:a.length>0?a[0]:r,prefix:l,name:s};return t&&!_g(u)?null:u}const o=a[0],i=o.split("-");if(i.length>1){const s={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!_g(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!_g(s,n)?null:s}return null},_g=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,CF=Object.freeze({left:0,top:0,width:16,height:16}),Ey=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sb=Object.freeze({...CF,...Ey}),HS=Object.freeze({...sb,body:"",hidden:!1});function Rue(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function $D(e,t){const n=Rue(e,t);for(const r in HS)r in Ey?r in e&&!(r in n)&&(n[r]=Ey[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Nue(e,t){const n=e.icons,r=e.aliases||Object.create(null),a=Object.create(null);function o(i){if(n[i])return a[i]=[];if(!(i in a)){a[i]=null;const s=r[i]&&r[i].parent,l=s&&o(s);l&&(a[i]=[s].concat(l))}return a[i]}return Object.keys(n).concat(Object.keys(r)).forEach(o),a}function $ue(e,t,n){const r=e.icons,a=e.aliases||Object.create(null);let o={};function i(s){o=$D(r[s]||a[s],o)}return i(t),n.forEach(i),$D(e,o)}function TF(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(a=>{t(a,null),n.push(a)});const r=Nue(e);for(const a in r){const o=r[a];o&&(t(a,$ue(e,a,o)),n.push(a))}return n}const Fue={provider:"",aliases:{},not_found:{},...CF};function n1(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function EF(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!n1(e,Fue))return null;const n=t.icons;for(const a in n){const o=n[a];if(!a||typeof o.body!="string"||!n1(o,HS))return null}const r=t.aliases||Object.create(null);for(const a in r){const o=r[a],i=o.parent;if(!a||typeof i!="string"||!n[i]&&!r[i]||!n1(o,HS))return null}return t}const FD=Object.create(null);function Bue(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Xf(e,t){const n=FD[e]||(FD[e]=Object.create(null));return n[t]||(n[t]=Bue(e,t))}function kF(e,t){return EF(t)?TF(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Vue(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let wp=!1;function xF(e){return typeof e=="boolean"&&(wp=e),wp}function zue(e){const t=typeof e=="string"?ib(e,!0,wp):e;if(t){const n=Xf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Hue(e,t){const n=ib(e,!0,wp);if(!n)return!1;const r=Xf(n.provider,n.prefix);return t?Vue(r,n.name,t):(r.missing.add(n.name),!0)}function Uue(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),wp&&!t&&!e.prefix){let a=!1;return EF(e)&&(e.prefix="",TF(e,(o,i)=>{Hue(o,i)&&(a=!0)})),a}const n=e.prefix;if(!_g({prefix:n,name:"a"}))return!1;const r=Xf(t,n);return!!kF(r,e)}const MF=Object.freeze({width:null,height:null}),AF=Object.freeze({...MF,...Ey}),Wue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Kue=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function BD(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Wue);if(r===null||!r.length)return e;const a=[];let o=r.shift(),i=Kue.test(o);for(;;){if(i){const s=parseFloat(o);isNaN(s)?a.push(o):a.push(Math.ceil(s*t*n)/n)}else a.push(o);if(o=r.shift(),o===void 0)return a.join("");i=!i}}function jue(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const a=e.indexOf(">",r),o=e.indexOf("",o);if(i===-1)break;n+=e.slice(a+1,o).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:n,content:e}}function Yue(e,t){return e?""+e+""+t:t}function Gue(e,t,n){const r=jue(e);return Yue(r.defs,t+r.content+n)}const que=e=>e==="unset"||e==="undefined"||e==="none";function Xue(e,t){const n={...sb,...e},r={...AF,...t},a={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const m=[],g=v.hFlip,b=v.vFlip;let _=v.rotate;g?b?_+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let w;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:w=a.height/2+a.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}_%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),m.length&&(o=Gue(o,'',""))});const i=r.width,s=r.height,l=a.width,u=a.height;let c,f;i===null?(f=s===null?"1em":s==="auto"?u:s,c=BD(f,l/u)):(c=i==="auto"?l:i,f=s===null?BD(c,u/l):s==="auto"?u:s);const h={},d=(v,m)=>{que(m)||(h[v]=m.toString())};d("width",c),d("height",f);const p=[a.left,a.top,l,u];return h.viewBox=p.join(" "),{attributes:h,viewBox:p,body:o}}const Zue=/\sid="(\S+)"/g,Jue="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Que=0;function ece(e,t=Jue){const n=[];let r;for(;r=Zue.exec(e);)n.push(r[1]);if(!n.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const i=typeof t=="function"?t(o):t+(Que++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}const US=Object.create(null);function tce(e,t){US[e]=t}function WS(e){return US[e]||US[""]}function UE(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const WE=Object.create(null),Fd=["https://api.simplesvg.com","https://api.unisvg.com"],wg=[];for(;Fd.length>0;)Fd.length===1||Math.random()>.5?wg.push(Fd.shift()):wg.push(Fd.pop());WE[""]=UE({resources:["https://api.iconify.design"].concat(wg)});function nce(e,t){const n=UE(t);return n===null?!1:(WE[e]=n,!0)}function KE(e){return WE[e]}const rce=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let VD=rce();function ace(e,t){const n=KE(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let a=0;n.resources.forEach(i=>{a=Math.max(a,i.length)});const o=t+".json?icons=";r=n.maxURL-a-n.path.length-o.length}return r}function oce(e){return e===404}const ice=(e,t,n)=>{const r=[],a=ace(e,t),o="icons";let i={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((l,u)=>{s+=l.length+1,s>=a&&u>0&&(r.push(i),i={type:o,provider:e,prefix:t,icons:[]},s=l.length),i.icons.push(l)}),r.push(i),r};function sce(e){if(typeof e=="string"){const t=KE(e);if(t)return t.path}return"/"}const lce=(e,t,n)=>{if(!VD){n("abort",424);return}let r=sce(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});r+=o+".json?"+l.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let a=503;VD(e+r).then(o=>{const i=o.status;if(i!==200){setTimeout(()=>{n(oce(i)?"abort":"next",i)});return}return a=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",a)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",a)})},uce={prepare:ice,send:lce};function cce(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((a,o)=>a.provider!==o.provider?a.provider.localeCompare(o.provider):a.prefix!==o.prefix?a.prefix.localeCompare(o.prefix):a.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(a=>{if(r.name===a.name&&r.prefix===a.prefix&&r.provider===a.provider)return;r=a;const o=a.provider,i=a.prefix,s=a.name,l=n[o]||(n[o]=Object.create(null)),u=l[i]||(l[i]=Xf(o,i));let c;s in u.icons?c=t.loaded:i===""||u.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:i,name:s};c.push(f)}),t}function DF(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(a=>a.id!==t))})}function fce(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,a=e.prefix;t.forEach(o=>{const i=o.icons,s=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==a)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:r,prefix:a,name:u});else if(e.missing.has(u))i.missing.push({provider:r,prefix:a,name:u});else return n=!0,!0;return!1}),i.pending.length!==s&&(n||DF([e],o.id),o.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),o.abort))})}))}let dce=0;function hce(e,t,n){const r=dce++,a=DF.bind(null,n,r);if(!t.pending.length)return a;const o={id:r,icons:t,callback:e,abort:a};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(o)}),a}function pce(e,t=!0,n=!1){const r=[];return e.forEach(a=>{const o=typeof a=="string"?ib(a,t,n):a;o&&r.push(o)}),r}var vce={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function mce(e,t,n,r){const a=e.resources.length,o=e.random?Math.floor(Math.random()*a):e.index;let i;if(e.random){let S=e.resources.slice(0);for(i=[];S.length>1;){const E=Math.floor(Math.random()*S.length);i.push(S[E]),S=S.slice(0,E).concat(S.slice(E+1))}i=i.concat(S)}else i=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",u=0,c,f=null,h=[],d=[];typeof r=="function"&&d.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),p(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function m(S,E){E&&(d=[]),typeof S=="function"&&d.push(S)}function g(){return{startTime:s,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:m,abort:v}}function b(){l="failed",d.forEach(S=>{S(void 0,c)})}function _(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function w(S,E,M){const x=E!=="success";switch(h=h.filter(D=>D!==S),l){case"pending":break;case"failed":if(x||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){c=M,b();return}if(x){c=M,h.length||(i.length?C():b());return}if(p(),_(),!e.random){const D=e.resources.indexOf(S.resource);D!==-1&&D!==e.index&&(e.index=D)}l="completed",d.forEach(D=>{D(M)})}function C(){if(l!=="pending")return;p();const S=i.shift();if(S===void 0){if(h.length){f=setTimeout(()=>{p(),l==="pending"&&(_(),b())},e.timeout);return}b();return}const E={status:"pending",resource:S,callback:(M,x)=>{w(E,M,x)}};h.push(E),u++,f=setTimeout(C,e.rotate),n(S,t,E.callback)}return setTimeout(C),g}function IF(e){const t={...vce,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function a(s,l,u){const c=mce(t,s,l,(f,h)=>{r(),u&&u(f,h)});return n.push(c),c}function o(s){return n.find(l=>s(l))||null}return{query:a,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function zD(){}const r1=Object.create(null);function gce(e){if(!r1[e]){const t=KE(e);if(!t)return;const n=IF(t),r={config:t,redundancy:n};r1[e]=r}return r1[e]}function yce(e,t,n){let r,a;if(typeof e=="string"){const o=WS(e);if(!o)return n(void 0,424),zD;a=o.send;const i=gce(e);i&&(r=i.redundancy)}else{const o=UE(e);if(o){r=IF(o);const i=e.resources?e.resources[0]:"",s=WS(i);s&&(a=s.send)}}return!r||!a?(n(void 0,424),zD):r.query(t,a,n)().abort}function HD(){}function bce(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,fce(e)}))}function _ce(e){const t=[],n=[];return e.forEach(r=>{(r.match(SF)?t:n).push(r)}),{valid:t,invalid:n}}function Bd(e,t,n){function r(){const a=e.pendingIcons;t.forEach(o=>{a&&a.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!kF(e,n).length){r();return}}catch(a){console.error(a)}r(),bce(e)}function UD(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function wce(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,a=e.iconsToLoad;if(delete e.iconsToLoad,!a||!a.length)return;const o=e.loadIcon;if(e.loadIcons&&(a.length>1||!o)){UD(e.loadIcons(a,r,n),c=>{Bd(e,a,c)});return}if(o){a.forEach(c=>{const f=o(c,r,n);UD(f,h=>{const d=h?{prefix:r,icons:{[c]:h}}:null;Bd(e,[c],d)})});return}const{valid:i,invalid:s}=_ce(a);if(s.length&&Bd(e,s,null),!i.length)return;const l=r.match(SF)?WS(n):null;if(!l){Bd(e,i,null);return}l.prepare(n,r,i).forEach(c=>{yce(n,c,f=>{Bd(e,c.icons,f)})})}))}const Sce=(e,t)=>{const n=pce(e,!0,xF()),r=cce(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,HD)}),()=>{l=!1}}const a=Object.create(null),o=[];let i,s;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===s&&u===i)return;i=u,s=c,o.push(Xf(u,c));const f=a[u]||(a[u]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=Xf(u,c),d=h.pendingIcons||(h.pendingIcons=new Set);d.has(f)||(d.add(f),a[u][c].push(f))}),o.forEach(l=>{const u=a[l.provider][l.prefix];u.length&&wce(l,u)}),t?hce(t,r,o):HD};function Cce(e,t){const n={...e};for(const r in t){const a=t[r],o=typeof a;r in MF?(a===null||a&&(o==="string"||o==="number"))&&(n[r]=a):o===typeof n[r]&&(n[r]=r==="rotate"?a%4:a)}return n}const Tce=/[\s,]+/;function Ece(e,t){t.split(Tce).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function kce(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(a){for(;a<0;)a+=4;return a%4}if(n===""){const a=parseInt(e);return isNaN(a)?0:r(a)}else if(n!==e){let a=0;switch(n){case"%":a=25;break;case"deg":a=90}if(a){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/a,o%1===0?r(o):0)}}return t}function xce(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function Mce(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Ace(e){return"data:image/svg+xml,"+Mce(e)}function Dce(e){return'url("'+Ace(e)+'")'}const WD={...AF,inline:!1},Ice={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Pce={display:"inline-block"},KS={backgroundColor:"currentColor"},PF={backgroundColor:"transparent"},KD={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},jD={webkitMask:KS,mask:KS,background:PF};for(const e in jD){const t=jD[e];for(const n in KD)t[e+n]=KD[n]}const Sg={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Sg[e+"-flip"]=t,Sg[e.slice(0,1)+"-flip"]=t,Sg[e+"Flip"]=t});function YD(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const GD=(e,t)=>{const n=Cce(WD,t),r={...Ice},a=t.mode||"svg",o={},i=t.style,s=typeof i=="object"&&!(i instanceof Array)?i:{};for(let v in t){const m=t[v];if(m!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[v]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&Ece(n,m);break;case"color":o.color=m;break;case"rotate":typeof m=="string"?n[v]=kce(m):typeof m=="number"&&(n[v]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete r["aria-hidden"];break;default:{const g=Sg[v];g?(m===!0||m==="true"||m===1)&&(n[g]=!0):WD[v]===void 0&&(r[v]=m)}}}const l=Xue(e,n),u=l.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),a==="svg"){r.style={...o,...s},Object.assign(r,u);let v=0,m=t.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),r.innerHTML=ece(l.body,m?()=>m+"ID"+v++:"iconifyVue"),Et("svg",r)}const{body:c,width:f,height:h}=e,d=a==="mask"||(a==="bg"?!1:c.indexOf("currentColor")!==-1),p=xce(c,{...u,width:f+"",height:h+""});return r.style={...o,"--svg":Dce(p),width:YD(u.width),height:YD(u.height),...Pce,...d?KS:PF,...s},Et("span",r)};xF(!0);tce("",uce);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Uue(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const a=t[n];if(typeof a!="object"||!a||a.resources===void 0)continue;nce(n,a)||console.error(r)}catch{console.error(r)}}}}const Oce={...sb,body:""},it=Ae({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let r;if(typeof e!="string"||(r=ib(e,!1,!0))===null)return this.abortLoading(),null;let a=zue(r);if(!a)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",a!==null&&(this._loadingIcon={name:e,abort:Sce([r],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),n){a=Object.assign({},a);const i=n(a.body,r.name,r.prefix,r.provider);typeof i=="string"&&(a.body=i)}const o=["iconify"];return r.prefix!==""&&o.push("iconify--"+r.prefix),r.provider!==""&&o.push("iconify--"+r.provider),{data:a,classes:o}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return GD(Oce,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),GD({...sb,...t.data},n)}}),yr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Lce={class:"title"},Rce={class:"menu-name",style:{"margin-left":"21px"}},Nce={class:"menu-name",style:{"margin-left":"21px"}},$ce={class:"menu-name",style:{"margin-left":"22px"}},Fce={class:"menu-name",style:{"margin-left":"21px"}},Bce={class:"menu-name",style:{"margin-left":"21px"}},Vce={class:"manage-title"},zce={class:"menu-name",style:{"margin-left":"18px"}},Hce={class:"menu-name",style:{"margin-left":"21px"}},Uce={class:"menu-name",style:{"margin-left":"20px"}},Wce={class:"menu-name",style:{"margin-left":"20px"}},Kce={class:"menu-name",style:{"margin-left":"20px"}},jce={class:"menu-name",style:{"margin-left":"22px"}},Yce={__name:"index",setup(e){const t=Jr(),n=Q0();return(r,a)=>{const o=Uee,i=Hee,s=Ua,l=Ks("perm");return R(),he(s,{class:"scroll"},{default:X(()=>[A("div",null,[A("div",Lce,[V(y(it),{icon:"mdi:email-outline",width:"24",height:"24"}),A("div",null,te(y(t).settings.title),1)]),V(i,{collapse:!1,"text-color":"#fff","active-text-color":"#fff",style:{"margin-top":"10px"}},{default:X(()=>[V(o,{onClick:a[0]||(a[0]=u=>y(lr).push({name:"email"})),index:"email",class:Z(y(n).meta.name==="email"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"hugeicons:mailbox-01",width:"20",height:"20"}),A("span",Rce,te(r.$t("inbox")),1)]),_:1},8,["class"]),Rt((R(),he(o,{onClick:a[1]||(a[1]=u=>y(lr).push({name:"send"})),index:"send",class:Z(y(n).meta.name==="send"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"cil:send",width:"20",height:"20"}),A("span",Nce,te(r.$t("sent")),1)]),_:1},8,["class"])),[[l,"email:send"]]),Rt((R(),he(o,{onClick:a[2]||(a[2]=u=>y(lr).push({name:"draft"})),index:"draft",class:Z(y(n).meta.name==="draft"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"ep:document",width:"19",height:"19"}),A("span",$ce,te(r.$t("drafts")),1)]),_:1},8,["class"])),[[l,"email:send"]]),V(o,{onClick:a[3]||(a[3]=u=>y(lr).push({name:"star"})),index:"star",class:Z(y(n).meta.name==="star"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"solar:star-line-duotone",width:"20",height:"20"}),A("span",Fce,te(r.$t("starred")),1)]),_:1},8,["class"]),V(o,{onClick:a[4]||(a[4]=u=>y(lr).push({name:"setting"})),index:"setting",class:Z(y(n).meta.name==="setting"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:settings-48-regular",width:"20",height:"20"}),A("span",Bce,te(r.$t("settings")),1)]),_:1},8,["class"]),Rt((R(),re("div",Vce,[A("div",null,te(r.$t("manage")),1)])),[[l,["user:query","role:query","setting:query","analysis:query","reg-key:query"]]]),Rt((R(),he(o,{onClick:a[5]||(a[5]=u=>y(lr).push({name:"analysis"})),index:"analysis",class:Z(y(n).meta.name==="analysis"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:data-pie-20-regular",width:"24",height:"24"}),A("span",zce,te(r.$t("analytics")),1)]),_:1},8,["class"])),[[l,"analysis:query"]]),Rt((R(),he(o,{onClick:a[6]||(a[6]=u=>y(lr).push({name:"user"})),index:"setting",class:Z(y(n).meta.name==="user"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"si:user-alt-2-line",width:"20",height:"20"}),A("span",Hce,te(r.$t("allUsers")),1)]),_:1},8,["class"])),[[l,"user:query"]]),Rt((R(),he(o,{onClick:a[7]||(a[7]=u=>y(lr).push({name:"all-email"})),index:"all-email",class:Z(y(n).meta.name==="all-email"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:mail-list-28-regular",width:"22",height:"22"}),A("span",Uce,te(r.$t("allMail")),1)]),_:1},8,["class"])),[[l,"all-email:query"]]),Rt((R(),he(o,{onClick:a[8]||(a[8]=u=>y(lr).push({name:"role"})),index:"setting",class:Z(y(n).meta.name==="role"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:lock-closed-16-regular",width:"22",height:"22"}),A("span",Wce,te(r.$t("permissions")),1)]),_:1},8,["class"])),[[l,"role:query"]]),Rt((R(),he(o,{onClick:a[9]||(a[9]=u=>y(lr).push({name:"reg-key"})),index:"reg-key",class:Z(y(n).meta.name==="reg-key"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:fingerprint-20-filled",width:"22",height:"22"}),A("span",Kce,te(r.$t("inviteCode")),1)]),_:1},8,["class"])),[[l,"reg-key:query"]]),Rt((R(),he(o,{onClick:a[10]||(a[10]=u=>y(lr).push({name:"sys-setting"})),index:"sys-setting",class:Z(y(n).meta.name==="sys-setting"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"eos-icons:system-ok-outlined",width:"18",height:"18",style:{"margin-left":"2px"}}),A("span",jce,te(r.$t("SystemSettings")),1)]),_:1},8,["class"])),[[l,"setting:query"]])]),_:1})])]),_:1})}}},Gce=yr(Yce,[["__scopeId","data-v-d15e04fa"]]),qce={__name:"index",props:{isActive:{type:Boolean,default:!1}},setup(e,{emit:t}){const n=t,r=()=>{n("toggleClick")};return(a,o)=>(R(),re("div",{style:{padding:"0 15px",cursor:"pointer"},onClick:r},[(R(),re("svg",{class:Z([{"is-active":e.isActive},"hamburger"]),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"currentColor"},o[0]||(o[0]=[A("path",{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"},null,-1)]),2))]))}},Xce=yr(qce,[["__scopeId","data-v-b2fb0d8c"]]);function Zce(e,t){return rn.post("/login",{email:e,password:t})}function Jce(){return rn.delete("/logout")}function Qce(e){return rn.post("/register",e)}const efe={class:"header-btn"},tfe={class:"breadcrumb-item"},nfe={class:"writer"},rfe={class:"toolbar"},afe={class:"translate icon-item"},ofe={class:"avatar"},ife={class:"avatar-text"},sfe={class:"user-details"},lfe={class:"details-avatar"},ufe={class:"user-name"},cfe={class:"detail-user-type"},ffe={class:"action-info"},dfe={style:{"margin-right":"10px"}},hfe={style:{"margin-right":"10px"}},pfe={key:0,style:{"margin-right":"5px"}},vfe={key:1,style:{"margin-right":"5px"}},mfe={class:"logout"},gfe={__name:"index",setup(e){const{t}=Zr(),n=Q0(),r=Jr(),a=ei(),o=cs(),i=K(!1),s=j(()=>a.user.role.accountCount),l=j(()=>{if(r.settings.send===1)return t("disabled");if(!Ia("email:send"))return t("unauthorized");if(a.user.role.sendType==="ban")return t("sendBanned");if(!a.user.role.sendCount)return t("unlimited");if(a.user.role.sendType==="day")return t("daily");if(a.user.role.sendType==="count")return t("total")}),u=j(()=>!Ia("email:send")||a.user.role.sendType==="ban"||!a.user.role.sendCount||r.settings.send===1?null:a.user.sendCount+"/"+a.user.role.sendCount);async function c(g){try{await navigator.clipboard.writeText(g),kt({message:t("copySuccessMsg"),type:"success",plain:!0})}catch(b){console.error(`${t("copyFailMsg")}:`,b),kt({message:t("copyFailMsg"),type:"error",plain:!0})}}function f(g){r.lang=g}function h(){o.showNotice()}function d(){o.writerRef.open()}function p(){o.asideShow=!o.asideShow}function v(){i.value=!0,Jce().then(()=>{localStorage.removeItem("token"),lr.replace("/login")}).finally(()=>{i.value=!1})}function m(g){return g[0]?.toUpperCase()||""}return(g,b)=>{const _=ev,w=tv,C=Qp,S=Dc,E=ra,M=Ks("perm");return R(),re("div",{class:Z(["header",y(Ia)("email:send")?"":"not-send"])},[A("div",efe,[V(Xce,{onClick:p}),A("span",tfe,te(g.$t(y(n).meta.title)),1)]),Rt((R(),re("div",{class:"writer-box",onClick:d},[A("div",nfe,[V(y(it),{icon:"material-symbols:edit-outline-sharp",width:"22",height:"22"})])])),[[M,"email:send"]]),A("div",rfe,[V(C,null,{dropdown:X(()=>[V(w,null,{default:X(()=>[V(_,{onClick:b[0]||(b[0]=x=>f("zh"))},{default:X(()=>b[3]||(b[3]=[Ze("简体中文")])),_:1}),V(_,{onClick:b[1]||(b[1]=x=>f("en"))},{default:X(()=>b[4]||(b[4]=[Ze("English")])),_:1})]),_:1})]),default:X(()=>[A("div",afe,[V(y(it),{icon:"carbon:ibm-watson-language-translator"})])]),_:1}),A("div",{class:"notice icon-item",onClick:h},[V(y(it),{icon:"streamline-plump:announcement-megaphone"})]),V(C,{teleported:!1,"popper-class":"detail-dropdown"},{dropdown:X(()=>[A("div",sfe,[A("div",lfe,te(m(y(a).user.email)),1),A("div",ufe,te(y(a).user.name),1),A("div",{class:"detail-email",onClick:b[2]||(b[2]=x=>c(y(a).user.email))},te(y(a).user.email),1),A("div",cfe,[V(S,null,{default:X(()=>[Ze(te(g.$t(y(a).user.role.name)),1)]),_:1})]),A("div",ffe,[A("div",null,[A("span",dfe,te(g.$t("sendCount")),1),A("span",hfe,te(g.$t("accountCount")),1)]),A("div",null,[A("div",null,[u.value?(R(),re("span",pfe,te(u.value),1)):be("",!0),y(Ia)("email:send")?(R(),he(S,{key:2},{default:X(()=>[Ze(te(l.value),1)]),_:1})):(R(),he(S,{key:1},{default:X(()=>[Ze(te(l.value),1)]),_:1}))]),A("div",null,[y(r).settings.manyEmail||y(r).settings.addEmail?(R(),he(S,{key:0},{default:X(()=>[Ze(te(g.$t("disabled")),1)]),_:1})):s.value&&y(Ia)("account:add")?(R(),re("span",vfe,te(g.$t("totalUserAccount",{msg:s.value})),1)):!s.value&&y(Ia)("account:add")?(R(),he(S,{key:2},{default:X(()=>[Ze(te(g.$t("unlimited")),1)]),_:1})):y(Ia)("account:add")?be("",!0):(R(),he(S,{key:3},{default:X(()=>[Ze(te(g.$t("unauthorized")),1)]),_:1}))])])]),A("div",mfe,[V(E,{type:"primary",loading:i.value,onClick:v},{default:X(()=>[Ze(te(g.$t("logOut")),1)]),_:1},8,["loading"])])])]),default:X(()=>[A("div",ofe,[A("div",ife,[A("div",null,te(m(y(a).user.email)),1)]),V(y(it),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"24",height:"24"})])]),_:1})])],2)}}},yfe=yr(gfe,[["__scopeId","data-v-02041a05"]]);function bfe(e,t){return rn.get("/account/list",{params:{accountId:e,size:t}})}function _fe(e,t){return rn.post("/account/add",{email:e,token:t})}function OF(e,t){return rn.put("/account/setName",{name:t,accountId:e})}function wfe(e){return rn.delete("/account/delete",{params:{accountId:e}})}function Kl(e){return/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(e)}function Sfe(e){return/^(?!:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(e)}const Cfe={class:"account-box"},Tfe={class:"head-opt"},Efe={"infinite-scroll-distance":600,"infinite-scroll-immediate":!1},kfe={class:"account"},xfe={class:"opt"},Mfe={style:{display:"flex","justify-content":"space-between"}},Afe={style:{display:"flex","justify-content":"space-between"}},Dfe={key:2,class:"noLoading"},Ife={key:3,class:"empty"},Pfe={class:"container"},Ofe={style:{color:"#333"}},Lfe=["data-sitekey"],Rfe={key:0,style:{"font-size":"12px",color:"#F56C6C"}},Nfe={class:"container"},$fe={__name:"index",setup(e){const{t}=Zr(),n=ei(),r=Gs(),a=Jr(),o=K(!1),i=K(!1),s=a.domainList,l=Jt([]),u=K(!1),c=K(!1),f=K(!1),h=K(!1),d=K(!1),p=K(!1),v=K(null),m=K({});let g=null,b=null;const _=K(!1);let w="",C=0;const S=Jt({email:"",suffix:a.domainList[0]}),E={accountId:0,size:20},M=K();Ia("account:query")&&N(),Xe(()=>r.changeUserAccountName,()=>{l[0].name=r.changeUserAccountName});const x=()=>{M.value.toggleMenu()};window.onTurnstileError=W=>{C>=4||(C++,console.warn("人机验加载失败",W),setTimeout(()=>{Nt(()=>{b?window.turnstile.reset(b):b=window.turnstile.render(".add-email-turnstile")})},1500))},window.onTurnstileSuccess=W=>{w=W};function D(){let W=v.value;if(W===g.name){d.value=!1;return}if(!W){kt({message:t("emptyUserNameMsg"),type:"error",plain:!0});return}p.value=!0,OF(g.accountId,W).then(()=>{g.name=W,d.value=!1,g.accountId===n.user.accountId&&(n.user.name=W),kt({message:t("saveSuccessMsg"),type:"success",plain:!0})}).finally(()=>{p.value=!1})}function I(W){v.value=W.name,g=W,d.value=!0}function L(W){return!Ia("email:send")&&!(W.accountId!==n.user.accountId&&Ia("account:delete"))}function G(W){return r.currentAccountId===W?"item-choose":""}function U(W){La.confirm(t("delConfirm",{msg:W.email}),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{wfe(W.accountId).then(()=>{const Q=l.findIndex(fe=>fe.accountId===W.accountId);l.splice(Q,1),l.length{m.value.focus()},100)}async function P(W){try{await navigator.clipboard.writeText(W),kt({message:t("copySuccessMsg"),type:"success",plain:!0})}catch(Q){console.error(`${t("copyFailMsg")}:`,Q),kt({message:t("copyFailMsg"),type:"error",plain:!0})}}function N(){c.value||f.value||u.value||(l.length===0?c.value=!0:f.value=!0,bfe(E.accountId,E.size).then(W=>{W.length{c.value=!1,f.value=!1}))}function q(){if(!S.email){kt({message:t("emptyEmailMsg"),type:"error",plain:!0});return}if(!Kl(S.email+S.suffix)){kt({message:t("notEmailMsg"),type:"error",plain:!0});return}if(!w&&(a.settings.addEmailVerify===0||a.settings.addEmailVerify===2&&a.settings.addVerifyOpen)){h.value?_.value||kt({message:t("botVerifyMsg"),type:"error",plain:!0}):(h.value=!0,Nt(()=>{if(b)window.turnstile.reset(".add-email-turnstile");else try{b=window.turnstile.render(".add-email-turnstile")}catch{_.value=!0,console.log("人机验证js加载失败")}}));return}i.value=!0,_fe(S.email+S.suffix,w).then(W=>{i.value=!1,o.value=!1,S.email="",l.push(W),w="",a.settings.addVerifyOpen=W.addVerifyOpen,kt({message:t("addSuccessMsg"),type:"success",plain:!0}),h.value=!1,n.refreshUserInfo()}).catch(W=>{W.code===400&&(w="",b?window.turnstile.reset(b):Nt(()=>{b=window.turnstile.render(".add-email-turnstile")}),h.value=!0),i.value=!1})}return(W,Q)=>{const fe=ev,me=tv,Ce=Qp,ie=gX,ue=ene,_e=Qte,pe=W0,Ve=Ua,Ke=ru,J=nu,se=Hr,de=ra,Te=ud,$e=Ks("perm"),He=t8;return R(),re("div",Cfe,[A("div",Tfe,[Rt(V(y(it),{class:"icon add",icon:"ion:add-outline",width:"23",height:"23",onClick:H},null,512),[[$e,"account:add"]]),V(y(it),{class:"icon refresh",icon:"ion:reload",width:"18",height:"18",onClick:B})]),V(Ve,{class:"scrollbar"},{default:X(()=>[Rt((R(),re("div",Efe,[(R(!0),re(yt,null,sn(l,ne=>(R(),he(ie,{class:Z(["item",G(ne.accountId)]),key:ne.accountId,onClick:ae=>F(ne)},{default:X(()=>[A("div",kfe,te(ne.email),1),A("div",xfe,[A("div",{class:"send-email",onClick:Q[0]||(Q[0]=$t(()=>{},["stop"]))},[V(y(it),{icon:"eva:email-fill",width:"22",height:"22",color:"#fccb1a"})]),A("div",{class:"settings",onClick:Q[1]||(Q[1]=$t(()=>{},["stop"]))},[V(y(it),{icon:"fluent-color:clipboard-24",width:"22",height:"22",onClick:$t(ae=>P(ne.email),["stop"])},null,8,["onClick"]),L(ne)?(R(),he(y(it),{key:0,icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})):(R(),he(Ce,{key:1},{dropdown:X(()=>[V(me,null,{default:X(()=>[y(Ia)("email:send")?(R(),he(fe,{key:0,onClick:ae=>I(ne)},{default:X(()=>[Ze(te(W.$t("rename")),1)]),_:2},1032,["onClick"])):be("",!0),ne.accountId!==y(n).user.accountId&&y(Ia)("account:delete")?(R(),he(fe,{key:1,onClick:ae=>U(ne)},{default:X(()=>[Ze(te(W.$t("delete")),1)]),_:2},1032,["onClick"])):be("",!0)]),_:2},1024)]),default:X(()=>[V(y(it),{icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})]),_:2},1024))])])]),_:2},1032,["class","onClick"]))),128)),c.value?(R(),re(yt,{key:0},sn(3,ne=>V(_e,{key:ne,animated:""},{template:X(()=>[V(ie,{class:"item"},{default:X(()=>[V(ue,{variant:"p",style:{width:"70%",height:"20px","margin-bottom":"20px"}}),A("div",Mfe,[V(ue,{variant:"text",style:{width:"20px"}}),V(ue,{variant:"text",style:{width:"20px"}})])]),_:1})]),_:2},1024)),64)):be("",!0),l.length>0&&!u.value?(R(),he(_e,{key:1,animated:""},{template:X(()=>[V(ie,{class:"item"},{default:X(()=>[V(ue,{variant:"p",style:{width:"70%",height:"20px","margin-bottom":"20px"}}),A("div",Afe,[V(ue,{variant:"text",style:{width:"20px"}}),V(ue,{variant:"text",style:{width:"20px"}})])]),_:1})]),_:1})):be("",!0),u.value&&l.length>0?(R(),re("div",Dfe,[A("div",null,te(W.$t("noMoreData")),1)])):be("",!0),u.value&&l.length===0?(R(),re("div",Ife,[V(pe,{description:W.$t("noMessagesFound")},null,8,["description"])])):be("",!0)])),[[He,N]])]),_:1}),V(Te,{modelValue:o.value,"onUpdate:modelValue":Q[4]||(Q[4]=ne=>o.value=ne),title:W.$t("addAccount")},{default:X(()=>[A("div",Pfe,[V(se,{modelValue:S.email,"onUpdate:modelValue":Q[3]||(Q[3]=ne=>S.email=ne),ref_key:"addRef",ref:m,type:"text",placeholder:W.$t("emailAccount"),autocomplete:"off"},{append:X(()=>[A("div",{onClick:$t(x,["stop"])},[V(J,{ref_key:"mySelect",ref:M,modelValue:S.suffix,"onUpdate:modelValue":Q[2]||(Q[2]=ne=>S.suffix=ne),placeholder:W.$t("select"),class:"select"},{default:X(()=>[(R(!0),re(yt,null,sn(y(s),ne=>(R(),he(Ke,{key:ne,label:ne,value:ne},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),A("div",Ofe,[A("span",null,te(S.suffix),1),V(y(it),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),V(de,{class:"btn",type:"primary",onClick:q,loading:i.value},{default:X(()=>[Ze(te(W.$t("add")),1)]),_:1},8,["loading"])]),A("div",{class:Z(["add-email-turnstile",h.value?"turnstile-show":"turnstile-hide"]),"data-sitekey":y(a).settings.siteKey,"data-callback":"onTurnstileSuccess","data-error-callback":"onTurnstileError"},[_.value?(R(),re("span",Rfe,te(W.$t("verifyModuleFailed")),1)):be("",!0)],10,Lfe)]),_:1},8,["modelValue","title"]),V(Te,{modelValue:d.value,"onUpdate:modelValue":Q[6]||(Q[6]=ne=>d.value=ne),title:W.$t("changeUserName")},{default:X(()=>[A("div",Nfe,[V(se,{modelValue:v.value,"onUpdate:modelValue":Q[5]||(Q[5]=ne=>v.value=ne),type:"text",placeholder:W.$t("username"),autocomplete:"off"},null,8,["modelValue","placeholder"]),V(de,{class:"btn",type:"primary",onClick:D,loading:p.value},{default:X(()=>[Ze(te(W.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}},Ffe=yr($fe,[["__scopeId","data-v-5b8a6425"]]),Bfe={__name:"index",setup(e){const t=Jr(),n=cs(),r=Q0();let a=window.innerWidth,o=null;const i=j(()=>n.accountShow&&t.settings.manyEmail===0);Xe(()=>n.changeNotice,()=>{const u=t.settings;let c={notice:u.notice,noticeWidth:u.noticeWidth,noticeTitle:u.noticeTitle,noticeContent:u.noticeContent,noticeType:u.noticeType,noticeDuration:u.noticeDuration,noticePosition:u.noticePosition,noticeOffset:u.noticeOffset};s(c)}),Xe(()=>n.changePreview,()=>{s(n.previewData)});function s(u){if(u.notice===1)return;o&&o.close();const c=document.createElement("style");c.innerHTML=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vc(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&bg.assertOptions(r,{silentJSONParsing:Fi.transitional(Fi.boolean),forcedJSONParsing:Fi.transitional(Fi.boolean),clarifyTimeoutError:Fi.transitional(Fi.boolean)},!1),a!=null&&(Je.isFunction(a)?n.paramsSerializer={serialize:a}:bg.assertOptions(a,{encode:Fi.function,serialize:Fi.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bg.assertOptions(n,{baseUrl:Fi.spelling("baseURL"),withXsrfToken:Fi.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&Je.merge(o.common,o[n.method]);o&&Je.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=to.concat(i,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!l){const p=[ID.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,u),h=p.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new dd(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mF(function(a){t=a}),cancel:t}}};function due(e){return function(n){return e.apply(null,n)}}function hue(e){return Je.isObject(e)&&e.isAxiosError===!0}const zS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zS).forEach(([e,t])=>{zS[t]=e});function gF(e){const t=new oc(e),n=G8(oc.prototype.request,t);return Je.extend(n,oc.prototype,t,{allOwnKeys:!0}),Je.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return gF(vc(e,a))},n}const Ar=gF(av);Ar.Axios=oc;Ar.CanceledError=dd;Ar.CancelToken=fue;Ar.isCancel=lF;Ar.VERSION=vF;Ar.toFormData=rb;Ar.AxiosError=pn;Ar.Cancel=Ar.CanceledError;Ar.all=function(t){return Promise.all(t)};Ar.spread=due;Ar.isAxiosError=hue;Ar.mergeConfig=vc;Ar.AxiosHeaders=to;Ar.formToJSON=e=>sF(Je.isHTMLForm(e)?new FormData(e):e);Ar.getAdapter=pF.getAdapter;Ar.HttpStatusCode=zS;Ar.default=Ar;const{Axios:TMe,AxiosError:EMe,CanceledError:kMe,isCancel:xMe,CancelToken:MMe,VERSION:AMe,all:DMe,Cancel:IMe,isAxiosError:PMe,spread:OMe,toFormData:LMe,AxiosHeaders:RMe,HttpStatusCode:NMe,formToJSON:$Me,getAdapter:FMe,mergeConfig:BMe}=Ar,pue={inbox:"Inbox",drafts:"Drafts",sent:"Sent",starred:"Starred",settings:"Settings",analytics:"Analytics",allUsers:"All Users",allMail:"All Mail",permissions:"Role",inviteCode:"Invite Code",SystemSettings:"System Settings",noMoreData:"No more data",noMessagesFound:"No messages found",addAccount:"Add Account",emailAccount:"Email",deleteUser:"Delete Account",deleteUserBtn:"Delete",changePassword:"Change Password",newPassword:"New password",confirmPassword:"Confirm password",add:"Add",manage:"Manage",rename:"Rename",delete:"Delete",save:"Save",profile:"Profile",change:"Change",changePwdBtn:"Change",username:"Username",password:"Password",delAccount:"Delete Account",delAccountMsg:"This will permanently delete your account and data. It cannot be reactivated.",totalReceived:"Total Received",totalSent:"Total Sent",totalMailboxes:"Total Accounts",totalUsers:"Total Users",deleted:"Deleted",selectDeleted:"Deleted",active:"Active",emailSource:"Email Source",userGrowth:"User Growth",emailGrowth:"Email Growth",emailSent:"Sent",emailReceived:"Received",sentToday:"Sent Today",total:"Total",growthTotalUsers:"Total Users",searchByEmail:"Enter email to search",tabEmailAddress:"Email",tabReceived:"Received",tabSent:"Sent",tabMailboxes:"Accounts",tabRegisteredAt:"Registered at",tabStatus:"Status",tabRole:"Role",roleName:"Name",role:"Name",all:"All",normal:"Normal",banned:"Banned",reset:"Reset",restore:"Restore",tabSetting:"Settings",registrationIp:"Registration IP",recentIP:"Recent IP",recentActivity:"Recent Activity",loginDevice:"Login Device",loginSystem:"Login System",browserLogin:"Browser Login",unauthorized:"Unauthorized",unlimited:"Unlimited",sendCount:"Send email : ",accountCount:"Add account : ",action:"Action",chgPwd:"Pwd",perm:"Role",btnBan:"Ban",admin:"Admin",addUser:"Add User",select:"Select",unknown:"Unknown",changePerm:"Change Role",from:"From",subject:"Subject",sender:"Sender",user:"User",searchByContent:"Enter text to search",noRecipient:"No recipient",received:"Received",selectEmail:"Email",order:"Order",default:"Default",description:"Description",removeContent:"Remove content",removeAll:"Remove all",expand:"Expand",collapse:"Collapse",daily:"Daily",searchRegKeyDesc:"Enter invite code to search",remainingUses:"Remaining Uses",exhausted:"Exhausted",validUntil:"Valid Until",expired:"Expired",copy:"Copy",history:"History",addRegKey:"Add Invite Code",regKey:"Invite Code",noCodeFound:"No messages found",useHistory:"Usage History",date:"Date",roleDesc:"Role",noSubject:"No subject",recipient:"To",delivered:"Delivered",complained:"Complained",delayed:"Delayed",bounced:"Bounced",attachments:"Attachments",attCount:"Total {total}",emailCount:"Total {total}",error404:"404 Not Found",home:"Home",loginBtn:"Sign in",regBtn:"Sign up",loginTitle:"Sign in to your account to access email",regTitle:"Sign up for an account to use email",confirmPwd:"Confirm password",regKeyOptional:"Invite code (Optional)",noAccount:"Don't have an account? ​",hasAccount:"Already have an account? ​",regSwitch:"Sign up",loginSwitch:"Sign in",websiteSetting:"Website",websiteReg:"Sign Up",loginDomain:"Sign-In Box Domain",multipleEmail:"Multiple Accounts",multipleEmailDesc:"Enable this feature to allow users to add multiple accounts.",physicallyWipeData:"Physically Wipe Data",physicallyWipeDataDesc:"This action will permanently erase all deleted data.",customization:"Customization",websiteTitle:"Title",loginBoxOpacity:"Login Box Opacity",loginBackground:"Background",emailSetting:"Email",receiveEmail:"Receive Email",autoRefresh:"Auto Refresh",autoRefreshDesc:"Automatically fetch the latest emails from the server.",sendEmail:"Send Email",resendToken:"Resend Token",R2OS:"R2 Object Storage",osDomain:"Domain",emailPush:"Email Push",tgBot:"Telegram Bot",disable:"Disable",disabled:"Disabled",otherEmail:"Forwarding to External Email",forwardingRules:"Forwarding Rules",forwardAll:"All",rules:"Rules",turnstileSetting:"Turnstile",signUpVerification:"Sign Up Verification",addEmailVerification:"Add Account Verification",about:"About",version:"Version",community:"Community",changeTitle:"Change Title",addResendTokenDesc:"Input to add; leave empty to delete.",addOsDomain:"Add Domain",domainDesc:"Domain",addTurnstileSecret:"Add turnstile secret",backgroundTitle:"Change Background",tgBotDesc:"Forward received emails to a Telegram bot",tgBotToken:"Bot token",toBotTokenDesc:"Multiple user chat_ids, separated by commas",otherEmailDesc:"emails can be forwarded to external email, but must be verified via cloudflare.",otherEmailInputDesc:"Separate multiple email addresses with commas.",forwardingRulesDesc:"Rule-based forwarding only forwards emails received by the specified address.",ruleEmailsInputDesc:"Separate multiple email addresses with commas.",resendTokenList:"Token List",domain:"Domain",optional:"Optional",subjectInputDesc:"Please enter the email subject.",changeUserName:"Change Username",sendSeparately:"Separately",send:"Send",reply:"Reply",confirm:"Confirm",cancel:"Cancel",delEmailConfirm:"Confirm deleting this email?",delSuccessMsg:"Deleted successfully",emptyEmailMsg:"Email cannot be empty",notEmailMsg:"Invalid email",emptyPwdMsg:"Password cannot be empty",pwdLengthMsg:"Password must be at least 6 characters",confirmPwdFailMsg:"The two passwords do not match",emptyRegKeyMsg:"Invite code cannot be empty",regSuccessMsg:"Sign up successful",copySuccessMsg:"Copied successfully",copyFailMsg:"Copy failed",clearRegKey:"Confirm clearing all invalid invite codes?",clearSuccess:"Cleared successfully",emptyRole:"Role cannot be empty",emptyTimeMsg:"Valid until time cannot be empty",emptyCountMsg:"Available count cannot be empty",addSuccessMsg:"Addition successful",delConfirm:"Confirm deleting {msg}?",emptyRoleNameMsg:"Role name cannot be empty",saveSuccessMsg:"Saved successfully",changeRoleTitle:"Change Role",addRoleTitle:"Add Role",emptyUserNameMsg:"Name cannot be empty",delAccountConfirm:"Confirm deleting current account and all associated data?",clearAllDelConfirm:'This action is irreversible. Enter DELETE to proceed',warning:"Warning",delInputPattern:"DELETE",inputErrorMessage:"Please enter DELETE to confirm",delBackgroundConfirm:"Confirm deleting this background?",enable:"Enable",enabled:"Enabled",reSendConfirm:"Confirm reset of {msg} send count?",reSuccessMsg:"Reset successful",restoreConfirm:"Confirm restoring {msg}?",normalRestore:"Normal restore",allRestore:"Includes deleted data",restoreSuccessMsg:"Restore successful",banRestore:"Confirm banning {msg}?",logOut:"Sign out",clearContentConfirm:"Are you sure to clear all content?",attLimitMsg:"Attachment size limit: 28MB",emptyRecipientMsg:"Recipient email cannot be empty",emptySubjectMsg:"Subject cannot be empty",emptyContentMsg:"Content cannot be empty",noSeparateSendMsg:"Separate sending does not support attachments yet",sendSuccessMsg:"Send successful",sendFailMsg:"Send failed",saveDraftConfirm:"Save draft?",delEmailsConfirm:"Confirm batch delete these emails?",sending:"Sending email...",sendingErrorMsg:"Sending in progress",networkErrorMsg:"Network error. Check your internet",timeoutErrorMsg:"Timeout. Try again later",serverBusyErrorMsg:"Server busy. Please try again later",reqFailErrorMsg:"Request failed. Try again later",message:"Message",language:"Language",totalUserAccount:"{msg}",sendBanned:"Banned",wrote:"wrote",support:"Support",supportDesc:"Buy me tea",featDesc:"Feature Description",emailInterception:"Email Interception",emailInterceptionDesc:"Enter a domain or email address to prevent users from receiving emails from certain websites.",availableDomains:"Available Domains",availableDomainsDesc:"Restrict users to email domains specified. Domains not on the approved list will be blocked from registration, adding email addresses, and sending/receiving emails. If left blank, all domains will be allowed by default.",backgroundUrlDesc:"Image URL",localUpload:" Local upload",imageLink:"Image URL",imageLinkErrorMsg:"Invalid image URL",backgroundWarning:"Image file size affects website load speed.",rulesVerify:"Rules",rulesVerifyTitle:"Trigger After {count} Daily Uses per IP",botVerifyMsg:"Please verify that you are human",noticeTitle:"Notice",noticePopup:"Sign-In Popup",icon:"Icon",position:"Position",offset:"Offset",duration:"Duration",topRight:"Top Right",topLeft:"Top Left",bottomRight:"Bottom Right",bottomLeft:"Bottom Left",width:"Width",titleDesc:"Title",noticeContentDesc:"Notice content supports HTML",verifyModuleFailed:"Verification module failed to load. Please refresh the page",popUp:"Pop Up",noRecipientTitle:"No Recipient",noRecipientDesc:"Emails can be received even without a registered email address.",preview:"Preview",help:"Help",document:"Document"},vue={inbox:"收件箱",drafts:"草稿箱",sent:"已发送",starred:"星标邮件",settings:"个人设置",analytics:"分析页",allUsers:"用户列表",allMail:"全部邮件",permissions:"权限控制",inviteCode:"注册密钥",SystemSettings:"系统设置",noMoreData:"没有更多数据了",noMessagesFound:"没有任何邮件",addAccount:"添加邮箱",emailAccount:"邮箱",deleteUser:"删除账户",deleteUserBtn:"删除账户",changePassword:"修改密码",newPassword:"新的密码",confirmPassword:"确认密码",add:"添加",manage:"管理",rename:"改名",delete:"删除",save:"保存",profile:"个人信息",change:"修改",changePwdBtn:"修改密码",username:"用户名",password:"密码",delAccount:"删除账户",delAccountMsg:"此操作将永久删除您的账户及其所有数据,无法恢复",totalReceived:"收件数量",totalSent:"发送数量",totalMailboxes:"邮箱数量",totalUsers:"用户数量",deleted:"删除",selectDeleted:"已删除",active:"正常",emailSource:"邮件来源",userGrowth:"用户增长",emailGrowth:"邮件增长",emailSent:"发送",emailReceived:"接收",sentToday:"今日发件",total:"次数",growthTotalUsers:"用户数",searchByEmail:"输入邮箱搜索",tabEmailAddress:"用户邮箱",tabReceived:"收件数量",tabSent:"发件数量",tabMailboxes:"邮箱数量",tabRegisteredAt:"注册时间",tabStatus:"状态",tabRole:"权限身份",roleName:"名字",role:"权限身份",all:"全部",normal:"正常",banned:"封禁",reset:"重置",restore:"恢复",tabSetting:"设置",registrationIp:"注册IP",recentIP:"近期IP",recentActivity:"近期活动",loginDevice:"登录设备",loginSystem:"登录系统",browserLogin:"登录浏览器",unauthorized:"无权限",unlimited:"无限制",sendCount:"邮件发送 :",accountCount:"邮箱添加 :",action:"操作",chgPwd:"改密",perm:"权限",btnBan:"禁用",admin:"超级管理员",addUser:"添加用户",select:"请选择",unknown:"未知",changePerm:"修改权限",from:"发件人",subject:"主题",sender:"发件人",user:"用户",searchByContent:"输入内容查询",noRecipient:"无收件人",received:"已接收",selectEmail:"邮箱",order:"排序",default:"默认",description:"描述",removeContent:"移除正文",removeAll:"丢弃邮件",expand:"展开",collapse:"收起",daily:"每天",searchRegKeyDesc:"输入注册码搜索",remainingUses:"剩余次数",exhausted:"已用尽",validUntil:"有效至期",expired:"已过期",copy:"复制",history:"记录",addRegKey:"添加注册码",regKey:"注册码",noCodeFound:"没有任何注册码",useHistory:"使用记录",date:"时间",roleDesc:"权限身份",noSubject:"无主题",recipient:"收件人",delivered:"发送成功",complained:"被标记为垃圾",delayed:"发送被延迟",bounced:"发送失败",attachments:"附件列表",attCount:"共 {total} 个",emailCount:"共 {total} 封",error404:"404错误, 找不到页面",home:"返回首页",loginBtn:"登录",regBtn:"注册",loginTitle:"输入账号信息以开始使用邮箱系统",regTitle:"输入账号密码以开始注册邮箱系统",confirmPwd:"确认密码",regKeyOptional:"注册码(可选)",noAccount:"还没有账号?",hasAccount:"已有账号?",regSwitch:"创建账号",loginSwitch:"去登录",websiteSetting:"网站设置",websiteReg:"用户注册",loginDomain:"登录框域名",multipleEmail:"多号模式",multipleEmailDesc:"开启后账号栏出现一个用户可以添加多个邮箱",physicallyWipeData:"物理清空数据",physicallyWipeDataDesc:"该操作会物理清空所有已被删除的数据",customization:"个性化设置",websiteTitle:"网站标题",loginBoxOpacity:"登录透明",loginBackground:"登录背景",emailSetting:"邮件设置",receiveEmail:"邮件接收",autoRefresh:"自动刷新",autoRefreshDesc:"轮询请求服务器获取最新邮件",sendEmail:"邮件发送",resendToken:"添加 Resend Token",R2OS:"R2 对象存储",osDomain:"访问域名",emailPush:"邮件推送",tgBot:"Telegram 机器人",disable:"关闭",disabled:"已关闭",otherEmail:"第三方邮箱",forwardingRules:"转发规则",forwardAll:"全部转发",rules:"规则转发",turnstileSetting:"Turnstile 人机验证",signUpVerification:"注册验证",addEmailVerification:"添加验证",about:"关于",version:"版本",community:"交流",changeTitle:"修改标题",addResendTokenDesc:"输入内容添加,不填则删除",addOsDomain:"添加域名",domainDesc:"域名",addTurnstileSecret:"添加 Turnstile 密钥",backgroundTitle:"设置背景",tgBotDesc:"可以将接收的邮件转发到Tg机器人",tgBotToken:"机器人 token",toBotTokenDesc:"用户 chat_id 多个用,分开",otherEmailDesc:"可以将邮件转到其他服务商邮箱,需要在cloudflare验证邮箱",otherEmailInputDesc:"多个邮箱用, 分开",forwardingRulesDesc:"规则转发只会转发设置邮箱所接收的邮件",ruleEmailsInputDesc:"多个邮箱用, 分开",resendTokenList:"Token 列表",domain:"域名",optional:"可选",subjectInputDesc:"请输入邮件主题",changeUserName:"修改用户名",sendSeparately:"分别发送",send:"发送",reply:"回复",confirm:"确定",cancel:"取消",delEmailConfirm:"确认删除该邮件吗?",delSuccessMsg:"删除成功",emptyEmailMsg:"邮箱不能为空",notEmailMsg:"输入的邮箱不合法",emptyPwdMsg:"密码不能为空",pwdLengthMsg:"密码最少六位",confirmPwdFailMsg:"两次密码输入不一致",emptyRegKeyMsg:"注册码不能为空",regSuccessMsg:"注册成功",copySuccessMsg:"复制成功",copyFailMsg:"复制失败",clearRegKey:"确认清除所有不可用的注册码?",clearSuccess:"清除成功",emptyRole:"身份类型不能为空",emptyTimeMsg:"有效时间不能为空",emptyCountMsg:"可用次数不能为空",addSuccessMsg:"添加成功",delConfirm:"确认删除{msg}吗?",emptyRoleNameMsg:"身份名不能为空",saveSuccessMsg:"保存成功",changeRoleTitle:"修改身份",addRoleTitle:"添加身份",emptyUserNameMsg:"用户名不能为空",delAccountConfirm:"确认删除当前账号及所有数据吗?",clearAllDelConfirm:'此操作不可逆转, 输入 确认删除 继续操作',warning:"警告",delInputPattern:"确认删除",inputErrorMessage:"请输入确认删除",delBackgroundConfirm:"确定要删除这个背景吗?",enable:"启用",enabled:"已启用",reSendConfirm:"确认重置 {msg} 发件次数吗?",reSuccessMsg:"重置成功",restoreConfirm:"确认要恢复 {msg} 吗?",normalRestore:"普通恢复",allRestore:"包括已删除的数据",restoreSuccessMsg:"恢复成功",banRestore:"确认禁用 {msg} 吗?",logOut:"退出",clearContentConfirm:"确定要清空所有内容吗?",attLimitMsg:"附件大小限制28mb",emptyRecipientMsg:"收件人邮箱地址不能为空",emptySubjectMsg:"主题不能为空",emptyContentMsg:"邮件正文不能为空",noSeparateSendMsg:"分别发送暂时不支持附件",sendSuccessMsg:"发送成功",sendFailMsg:"发送失败",saveDraftConfirm:"是否保存草稿?",delEmailsConfirm:"确认批量删除这些邮件吗?",sending:"邮件正在发送中",sendingErrorMsg:"邮件正在发送中",networkErrorMsg:"网络错误,请检查网络连接",timeoutErrorMsg:"请求超时,请稍后重试",serverBusyErrorMsg:"服务器繁忙,请稍后重试",reqFailErrorMsg:"请求失败,请稍后再试",message:"邮件详情",language:"网站语言",totalUserAccount:"{msg} 个",sendBanned:"已禁用",wrote:"来信",support:"捐助",supportDesc:"请我喝杯奶茶",featDesc:"功能说明",emailInterception:"邮件拦截",emailInterceptionDesc:"输入邮箱或域名拦截邮件,可用于禁止用户接收某些网站的邮件",availableDomains:"可用域名",availableDomainsDesc:"限制用户只能使用指定的域名邮箱,不在配置名单内的域名会被禁止使用注册添加邮箱,接收发送邮件等功能,留空默认允许可用所有域名",backgroundUrlDesc:"在线图片链接",localUpload:"本地上传",imageLink:"图片链接",imageLinkErrorMsg:"图片链接不正确",backgroundWarning:"图片文件大小会影响网站加载速度",rulesVerify:"规则",rulesVerifyTitle:"IP 每天使用 {count} 次后触发",botVerifyMsg:"请完成人机验证",noticeTitle:"网站公告",noticePopup:"登录弹窗",icon:"图标",position:"位置",offset:"偏移距离",duration:"显示时长",topRight:"右上",topLeft:"左上",bottomRight:"右下",bottomLeft:"左下",width:"宽度",titleDesc:"标题",noticeContentDesc:"公告内容,支持HTML",verifyModuleFailed:"人机验证模块加载失败,请刷新页面",popUp:"弹出",noRecipientTitle:"无人收件",noRecipientDesc:"即使没有注册的邮箱也能收到邮件",preview:"预览",help:"帮助",document:"项目文档"},hf=fie({legacy:!1,messages:{zh:vue,en:pue}});let rn=Ar.create({baseURL:"/api"});rn.interceptors.request.use(e=>{const{lang:t}=Jr();return e.headers.Authorization=`${localStorage.getItem("token")}`,e.headers["accept-language"]=t,e});rn.interceptors.response.use(e=>new Promise((t,n)=>{const r=e.config.noMsg,a=e.data;r?a.code===200?t(a.data):n(a):a.code===401?(kt({message:a.message,type:"error",plain:!0,grouping:!0,repeatNum:-4}),localStorage.removeItem("token"),lr.push("/login"),n(a)):a.code===403?(kt({message:a.message,type:"warning",plain:!0,grouping:!0,repeatNum:-4}),n(a)):a.code!==200&&(kt({message:a.message,type:"error",plain:!0,grouping:!0,repeatNum:-4}),n(a)),t(a.data)}),e=>(e.config.noMsg||(e.message.includes("Network Error")?kt({message:hf.global.t("networkErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4}):e.code==="ECONNABORTED"?(kt({message:hf.global.t("timeoutErrorMsg"),type:"error",plain:!0,grouping:!0}),kt.error("")):e.response?kt({message:hf.global.t("serverBusyErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4}):kt({message:hf.global.t("reqFailErrorMsg"),type:"error",plain:!0,grouping:!0,repeatNum:-4})),Promise.reject(e)));function Ty(){return rn.get("/my/loginUserInfo")}function mue(e){return rn.put("/my/resetPassword",{password:e})}function gue(){return rn.delete("/my/delete")}const ei=Ic("user",{state:()=>({user:{},refreshList:0}),actions:{refreshUserList(){Ty().then(e=>{this.refreshList++})},refreshUserInfo(){Ty().then(e=>{this.user=e})}}}),Gs=Ic("account",{state:()=>({currentAccountId:0,currentAccount:{},changeUserAccountName:""})}),yue={mounted(e,t){const r=ei().user.permKeys,a=t.value;if(r.includes("*"))return;(Array.isArray(a)?a.some(i=>r.includes(i)):r.includes(a))||e.parentNode&&e.parentNode.removeChild(e)}};function Ia(e){const{permKeys:t}=ei().user;return t.includes("*")||t.includes(e)}function yF(e){const t=[];return Object.keys(OD).forEach(n=>{(e.includes(n)||e.includes("*"))&&t.push(...OD[n])}),t}const OD={"email:send":[{path:"/sent",name:"send",component:()=>da(()=>Promise.resolve().then(()=>Hpe),void 0),meta:{title:"sent",name:"send",menu:!0}},{path:"/drafts",name:"draft",component:()=>da(()=>Promise.resolve().then(()=>Kpe),void 0),meta:{title:"drafts",name:"draft",menu:!0}}],"user:query":[{path:"/all-users",name:"user",component:()=>da(()=>Promise.resolve().then(()=>Nve),void 0),meta:{title:"allUsers",name:"user",menu:!0}}],"role:query":[{path:"/role",name:"role",component:()=>da(()=>Promise.resolve().then(()=>Xve),void 0),meta:{title:"permissions",name:"role",menu:!0}}],"setting:query":[{path:"/system-setting",name:"sys-setting",component:()=>da(()=>Promise.resolve().then(()=>Pge),void 0),meta:{title:"SystemSettings",name:"sys-setting",menu:!0}}],"reg-key:query":[{path:"/invite-code",name:"reg-key",component:()=>da(()=>Promise.resolve().then(()=>rye),void 0),meta:{title:"inviteCode",name:"reg-key",menu:!0}}],"all-email:query":[{path:"/all-mail",name:"all-email",component:()=>da(()=>Promise.resolve().then(()=>lye),void 0),meta:{title:"allMail",name:"all-email",menu:!0}}],"analysis:query":[{path:"/analysis",name:"analysis",component:()=>da(()=>Promise.resolve().then(()=>yMe),void 0),meta:{title:"analytics",name:"analysis",menu:!0}}]};function bue(e){return rn.put("/setting/set",e)}function _ue(){return rn.get("/setting/query")}function LD(){return rn.get("/setting/websiteConfig")}function wue(e){return rn.put("/setting/setBackground",{background:e})}function Sue(){return rn.delete("/setting/physicsDeleteAll")}function qf(e){if(!e)return"NaN";if(e.startsWith("https://"))return e;const{settings:t}=Jr();let n=t.r2Domain;return n.startsWith("http")?(n.endsWith("/")&&(n=n.slice(0,-1)),n+"/"+e):"https://"+n+"/"+e}async function Cue(){document.title="​";const e=Jr(),t=ei(),n=Gs(),r=localStorage.getItem("token");if(!e.lang){let s=navigator.language.split("-")[0];s=s==="zh"?s:"en",e.lang=s}hf.global.locale.value=e.lang;let a=null;if(r){const s=Ty().catch(c=>(console.error(c),null)),[l,u]=await Promise.all([LD(),s]);a=l,e.settings=a,e.domainList=a.domainList,document.title=a.title,u&&(n.currentAccountId=u.accountId,t.user=u,yF(u.permKeys).forEach(f=>{lr.addRoute("layout",f)}))}else a=await LD(),e.settings=a,e.domainList=a.domainList,document.title=a.title;const o=document.getElementById("loading-first");if(!a.background){o.remove();return}const i=new Image;i.src=qf(a.background),i.onload=()=>{o.remove()},i.onerror=()=>{console.warn("背景图片加载失败:",i.src),o.remove()}}const Tue=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Eue=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,kue=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function xue(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Mue(e);return}return t}function Mue(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Aue(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!kue.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Tue.test(e)||Eue.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,xue)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}function Due(e,t){if(e==null)return;let n=e;for(let r=0;r1&&(t=zE(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function bF(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const n={};for(const r in e)n[r]=e[r];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const n={};for(const r in e)n[r]=e[r];return n}return zE(e,bF(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function _F(e,t){return t.map(n=>n.split(".")).map(n=>[n,Due(e,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>zE(n,r[1],r[0]),{})}function wF(e,t){return t.map(n=>n.split(".")).reduce((n,r)=>bF(n,r),e)}function RD(e,{storage:t,serializer:n,key:r,debug:a,pick:o,omit:i,beforeHydrate:s,afterHydrate:l},u,c=!0){try{c&&s?.(u);const f=t.getItem(r);if(f){const h=n.deserialize(f),d=o?_F(h,o):h,p=i?wF(d,i):d;e.$patch(p)}c&&l?.(u)}catch(f){a&&console.error("[pinia-plugin-persistedstate]",f)}}function ND(e,{storage:t,serializer:n,key:r,debug:a,pick:o,omit:i}){try{const s=o?_F(e,o):e,l=i?wF(s,i):s,u=n.serialize(l);t.setItem(r,u)}catch(s){a&&console.error("[pinia-plugin-persistedstate]",s)}}function Iue(e,t,n){const{pinia:r,store:a,options:{persist:o=n}}=e;if(!o)return;if(!(a.$id in r.state.value)){const l=r._s.get(a.$id.replace("__hot:",""));l&&Promise.resolve().then(()=>l.$persist());return}const s=(Array.isArray(o)?o:o===!0?[{}]:[o]).map(t);a.$hydrate=({runHooks:l=!0}={})=>{s.forEach(u=>{RD(a,u,e,l)})},a.$persist=()=>{s.forEach(l=>{ND(a.$state,l)})},s.forEach(l=>{RD(a,l,e),a.$subscribe((u,c)=>ND(c,l),{detached:!0})})}function Pue(e={}){return function(t){Iue(t,n=>({key:(e.key?e.key:r=>r)(n.key??t.store.$id),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:r=>JSON.stringify(r),deserialize:r=>Aue(r)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate,afterHydrate:n.afterHydrate,pick:n.pick,omit:n.omit}),e.auto??!1)}}var Oue=Pue();const Lue=Sie().use(Oue),HE=zH(Die).use(Lue);await Cue();HE.use(lr).use(hf).directive("perm",yue);HE.config.devtools=!0;HE.mount("#app");const SF=/^[a-z0-9]+(-[a-z0-9]+)*$/,ib=(e,t,n,r="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;r=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),l=a.pop(),u={provider:a.length>0?a[0]:r,prefix:l,name:s};return t&&!_g(u)?null:u}const o=a[0],i=o.split("-");if(i.length>1){const s={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!_g(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!_g(s,n)?null:s}return null},_g=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,CF=Object.freeze({left:0,top:0,width:16,height:16}),Ey=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sb=Object.freeze({...CF,...Ey}),HS=Object.freeze({...sb,body:"",hidden:!1});function Rue(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function $D(e,t){const n=Rue(e,t);for(const r in HS)r in Ey?r in e&&!(r in n)&&(n[r]=Ey[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Nue(e,t){const n=e.icons,r=e.aliases||Object.create(null),a=Object.create(null);function o(i){if(n[i])return a[i]=[];if(!(i in a)){a[i]=null;const s=r[i]&&r[i].parent,l=s&&o(s);l&&(a[i]=[s].concat(l))}return a[i]}return Object.keys(n).concat(Object.keys(r)).forEach(o),a}function $ue(e,t,n){const r=e.icons,a=e.aliases||Object.create(null);let o={};function i(s){o=$D(r[s]||a[s],o)}return i(t),n.forEach(i),$D(e,o)}function TF(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(a=>{t(a,null),n.push(a)});const r=Nue(e);for(const a in r){const o=r[a];o&&(t(a,$ue(e,a,o)),n.push(a))}return n}const Fue={provider:"",aliases:{},not_found:{},...CF};function n1(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function EF(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!n1(e,Fue))return null;const n=t.icons;for(const a in n){const o=n[a];if(!a||typeof o.body!="string"||!n1(o,HS))return null}const r=t.aliases||Object.create(null);for(const a in r){const o=r[a],i=o.parent;if(!a||typeof i!="string"||!n[i]&&!r[i]||!n1(o,HS))return null}return t}const FD=Object.create(null);function Bue(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Xf(e,t){const n=FD[e]||(FD[e]=Object.create(null));return n[t]||(n[t]=Bue(e,t))}function kF(e,t){return EF(t)?TF(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Vue(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let wp=!1;function xF(e){return typeof e=="boolean"&&(wp=e),wp}function zue(e){const t=typeof e=="string"?ib(e,!0,wp):e;if(t){const n=Xf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Hue(e,t){const n=ib(e,!0,wp);if(!n)return!1;const r=Xf(n.provider,n.prefix);return t?Vue(r,n.name,t):(r.missing.add(n.name),!0)}function Uue(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),wp&&!t&&!e.prefix){let a=!1;return EF(e)&&(e.prefix="",TF(e,(o,i)=>{Hue(o,i)&&(a=!0)})),a}const n=e.prefix;if(!_g({prefix:n,name:"a"}))return!1;const r=Xf(t,n);return!!kF(r,e)}const MF=Object.freeze({width:null,height:null}),AF=Object.freeze({...MF,...Ey}),Wue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Kue=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function BD(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Wue);if(r===null||!r.length)return e;const a=[];let o=r.shift(),i=Kue.test(o);for(;;){if(i){const s=parseFloat(o);isNaN(s)?a.push(o):a.push(Math.ceil(s*t*n)/n)}else a.push(o);if(o=r.shift(),o===void 0)return a.join("");i=!i}}function jue(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const a=e.indexOf(">",r),o=e.indexOf("",o);if(i===-1)break;n+=e.slice(a+1,o).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:n,content:e}}function Yue(e,t){return e?""+e+""+t:t}function Gue(e,t,n){const r=jue(e);return Yue(r.defs,t+r.content+n)}const que=e=>e==="unset"||e==="undefined"||e==="none";function Xue(e,t){const n={...sb,...e},r={...AF,...t},a={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const m=[],g=v.hFlip,b=v.vFlip;let _=v.rotate;g?b?_+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let w;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:w=a.height/2+a.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}_%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),m.length&&(o=Gue(o,'',""))});const i=r.width,s=r.height,l=a.width,u=a.height;let c,f;i===null?(f=s===null?"1em":s==="auto"?u:s,c=BD(f,l/u)):(c=i==="auto"?l:i,f=s===null?BD(c,u/l):s==="auto"?u:s);const h={},d=(v,m)=>{que(m)||(h[v]=m.toString())};d("width",c),d("height",f);const p=[a.left,a.top,l,u];return h.viewBox=p.join(" "),{attributes:h,viewBox:p,body:o}}const Zue=/\sid="(\S+)"/g,Jue="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Que=0;function ece(e,t=Jue){const n=[];let r;for(;r=Zue.exec(e);)n.push(r[1]);if(!n.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const i=typeof t=="function"?t(o):t+(Que++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}const US=Object.create(null);function tce(e,t){US[e]=t}function WS(e){return US[e]||US[""]}function UE(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const WE=Object.create(null),Fd=["https://api.simplesvg.com","https://api.unisvg.com"],wg=[];for(;Fd.length>0;)Fd.length===1||Math.random()>.5?wg.push(Fd.shift()):wg.push(Fd.pop());WE[""]=UE({resources:["https://api.iconify.design"].concat(wg)});function nce(e,t){const n=UE(t);return n===null?!1:(WE[e]=n,!0)}function KE(e){return WE[e]}const rce=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let VD=rce();function ace(e,t){const n=KE(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let a=0;n.resources.forEach(i=>{a=Math.max(a,i.length)});const o=t+".json?icons=";r=n.maxURL-a-n.path.length-o.length}return r}function oce(e){return e===404}const ice=(e,t,n)=>{const r=[],a=ace(e,t),o="icons";let i={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((l,u)=>{s+=l.length+1,s>=a&&u>0&&(r.push(i),i={type:o,provider:e,prefix:t,icons:[]},s=l.length),i.icons.push(l)}),r.push(i),r};function sce(e){if(typeof e=="string"){const t=KE(e);if(t)return t.path}return"/"}const lce=(e,t,n)=>{if(!VD){n("abort",424);return}let r=sce(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});r+=o+".json?"+l.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let a=503;VD(e+r).then(o=>{const i=o.status;if(i!==200){setTimeout(()=>{n(oce(i)?"abort":"next",i)});return}return a=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",a)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",a)})},uce={prepare:ice,send:lce};function cce(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((a,o)=>a.provider!==o.provider?a.provider.localeCompare(o.provider):a.prefix!==o.prefix?a.prefix.localeCompare(o.prefix):a.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(a=>{if(r.name===a.name&&r.prefix===a.prefix&&r.provider===a.provider)return;r=a;const o=a.provider,i=a.prefix,s=a.name,l=n[o]||(n[o]=Object.create(null)),u=l[i]||(l[i]=Xf(o,i));let c;s in u.icons?c=t.loaded:i===""||u.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:i,name:s};c.push(f)}),t}function DF(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(a=>a.id!==t))})}function fce(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,a=e.prefix;t.forEach(o=>{const i=o.icons,s=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==a)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:r,prefix:a,name:u});else if(e.missing.has(u))i.missing.push({provider:r,prefix:a,name:u});else return n=!0,!0;return!1}),i.pending.length!==s&&(n||DF([e],o.id),o.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),o.abort))})}))}let dce=0;function hce(e,t,n){const r=dce++,a=DF.bind(null,n,r);if(!t.pending.length)return a;const o={id:r,icons:t,callback:e,abort:a};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(o)}),a}function pce(e,t=!0,n=!1){const r=[];return e.forEach(a=>{const o=typeof a=="string"?ib(a,t,n):a;o&&r.push(o)}),r}var vce={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function mce(e,t,n,r){const a=e.resources.length,o=e.random?Math.floor(Math.random()*a):e.index;let i;if(e.random){let S=e.resources.slice(0);for(i=[];S.length>1;){const E=Math.floor(Math.random()*S.length);i.push(S[E]),S=S.slice(0,E).concat(S.slice(E+1))}i=i.concat(S)}else i=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",u=0,c,f=null,h=[],d=[];typeof r=="function"&&d.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),p(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function m(S,E){E&&(d=[]),typeof S=="function"&&d.push(S)}function g(){return{startTime:s,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:m,abort:v}}function b(){l="failed",d.forEach(S=>{S(void 0,c)})}function _(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function w(S,E,M){const x=E!=="success";switch(h=h.filter(D=>D!==S),l){case"pending":break;case"failed":if(x||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){c=M,b();return}if(x){c=M,h.length||(i.length?C():b());return}if(p(),_(),!e.random){const D=e.resources.indexOf(S.resource);D!==-1&&D!==e.index&&(e.index=D)}l="completed",d.forEach(D=>{D(M)})}function C(){if(l!=="pending")return;p();const S=i.shift();if(S===void 0){if(h.length){f=setTimeout(()=>{p(),l==="pending"&&(_(),b())},e.timeout);return}b();return}const E={status:"pending",resource:S,callback:(M,x)=>{w(E,M,x)}};h.push(E),u++,f=setTimeout(C,e.rotate),n(S,t,E.callback)}return setTimeout(C),g}function IF(e){const t={...vce,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function a(s,l,u){const c=mce(t,s,l,(f,h)=>{r(),u&&u(f,h)});return n.push(c),c}function o(s){return n.find(l=>s(l))||null}return{query:a,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function zD(){}const r1=Object.create(null);function gce(e){if(!r1[e]){const t=KE(e);if(!t)return;const n=IF(t),r={config:t,redundancy:n};r1[e]=r}return r1[e]}function yce(e,t,n){let r,a;if(typeof e=="string"){const o=WS(e);if(!o)return n(void 0,424),zD;a=o.send;const i=gce(e);i&&(r=i.redundancy)}else{const o=UE(e);if(o){r=IF(o);const i=e.resources?e.resources[0]:"",s=WS(i);s&&(a=s.send)}}return!r||!a?(n(void 0,424),zD):r.query(t,a,n)().abort}function HD(){}function bce(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,fce(e)}))}function _ce(e){const t=[],n=[];return e.forEach(r=>{(r.match(SF)?t:n).push(r)}),{valid:t,invalid:n}}function Bd(e,t,n){function r(){const a=e.pendingIcons;t.forEach(o=>{a&&a.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!kF(e,n).length){r();return}}catch(a){console.error(a)}r(),bce(e)}function UD(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function wce(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,a=e.iconsToLoad;if(delete e.iconsToLoad,!a||!a.length)return;const o=e.loadIcon;if(e.loadIcons&&(a.length>1||!o)){UD(e.loadIcons(a,r,n),c=>{Bd(e,a,c)});return}if(o){a.forEach(c=>{const f=o(c,r,n);UD(f,h=>{const d=h?{prefix:r,icons:{[c]:h}}:null;Bd(e,[c],d)})});return}const{valid:i,invalid:s}=_ce(a);if(s.length&&Bd(e,s,null),!i.length)return;const l=r.match(SF)?WS(n):null;if(!l){Bd(e,i,null);return}l.prepare(n,r,i).forEach(c=>{yce(n,c,f=>{Bd(e,c.icons,f)})})}))}const Sce=(e,t)=>{const n=pce(e,!0,xF()),r=cce(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,HD)}),()=>{l=!1}}const a=Object.create(null),o=[];let i,s;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===s&&u===i)return;i=u,s=c,o.push(Xf(u,c));const f=a[u]||(a[u]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=Xf(u,c),d=h.pendingIcons||(h.pendingIcons=new Set);d.has(f)||(d.add(f),a[u][c].push(f))}),o.forEach(l=>{const u=a[l.provider][l.prefix];u.length&&wce(l,u)}),t?hce(t,r,o):HD};function Cce(e,t){const n={...e};for(const r in t){const a=t[r],o=typeof a;r in MF?(a===null||a&&(o==="string"||o==="number"))&&(n[r]=a):o===typeof n[r]&&(n[r]=r==="rotate"?a%4:a)}return n}const Tce=/[\s,]+/;function Ece(e,t){t.split(Tce).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function kce(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(a){for(;a<0;)a+=4;return a%4}if(n===""){const a=parseInt(e);return isNaN(a)?0:r(a)}else if(n!==e){let a=0;switch(n){case"%":a=25;break;case"deg":a=90}if(a){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/a,o%1===0?r(o):0)}}return t}function xce(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function Mce(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Ace(e){return"data:image/svg+xml,"+Mce(e)}function Dce(e){return'url("'+Ace(e)+'")'}const WD={...AF,inline:!1},Ice={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Pce={display:"inline-block"},KS={backgroundColor:"currentColor"},PF={backgroundColor:"transparent"},KD={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},jD={webkitMask:KS,mask:KS,background:PF};for(const e in jD){const t=jD[e];for(const n in KD)t[e+n]=KD[n]}const Sg={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Sg[e+"-flip"]=t,Sg[e.slice(0,1)+"-flip"]=t,Sg[e+"Flip"]=t});function YD(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const GD=(e,t)=>{const n=Cce(WD,t),r={...Ice},a=t.mode||"svg",o={},i=t.style,s=typeof i=="object"&&!(i instanceof Array)?i:{};for(let v in t){const m=t[v];if(m!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[v]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&Ece(n,m);break;case"color":o.color=m;break;case"rotate":typeof m=="string"?n[v]=kce(m):typeof m=="number"&&(n[v]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete r["aria-hidden"];break;default:{const g=Sg[v];g?(m===!0||m==="true"||m===1)&&(n[g]=!0):WD[v]===void 0&&(r[v]=m)}}}const l=Xue(e,n),u=l.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),a==="svg"){r.style={...o,...s},Object.assign(r,u);let v=0,m=t.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),r.innerHTML=ece(l.body,m?()=>m+"ID"+v++:"iconifyVue"),Et("svg",r)}const{body:c,width:f,height:h}=e,d=a==="mask"||(a==="bg"?!1:c.indexOf("currentColor")!==-1),p=xce(c,{...u,width:f+"",height:h+""});return r.style={...o,"--svg":Dce(p),width:YD(u.width),height:YD(u.height),...Pce,...d?KS:PF,...s},Et("span",r)};xF(!0);tce("",uce);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Uue(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const a=t[n];if(typeof a!="object"||!a||a.resources===void 0)continue;nce(n,a)||console.error(r)}catch{console.error(r)}}}}const Oce={...sb,body:""},it=Ae({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let r;if(typeof e!="string"||(r=ib(e,!1,!0))===null)return this.abortLoading(),null;let a=zue(r);if(!a)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",a!==null&&(this._loadingIcon={name:e,abort:Sce([r],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),n){a=Object.assign({},a);const i=n(a.body,r.name,r.prefix,r.provider);typeof i=="string"&&(a.body=i)}const o=["iconify"];return r.prefix!==""&&o.push("iconify--"+r.prefix),r.provider!==""&&o.push("iconify--"+r.provider),{data:a,classes:o}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return GD(Oce,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),GD({...sb,...t.data},n)}}),yr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Lce={class:"title"},Rce={class:"menu-name",style:{"margin-left":"21px"}},Nce={class:"menu-name",style:{"margin-left":"21px"}},$ce={class:"menu-name",style:{"margin-left":"22px"}},Fce={class:"menu-name",style:{"margin-left":"21px"}},Bce={class:"menu-name",style:{"margin-left":"21px"}},Vce={class:"manage-title"},zce={class:"menu-name",style:{"margin-left":"18px"}},Hce={class:"menu-name",style:{"margin-left":"21px"}},Uce={class:"menu-name",style:{"margin-left":"20px"}},Wce={class:"menu-name",style:{"margin-left":"20px"}},Kce={class:"menu-name",style:{"margin-left":"20px"}},jce={class:"menu-name",style:{"margin-left":"22px"}},Yce={__name:"index",setup(e){const t=Jr(),n=Q0();return(r,a)=>{const o=Uee,i=Hee,s=Ua,l=Ks("perm");return R(),he(s,{class:"scroll"},{default:X(()=>[A("div",null,[A("div",Lce,[V(y(it),{icon:"mdi:email-outline",width:"24",height:"24"}),A("div",null,te(y(t).settings.title),1)]),V(i,{collapse:!1,"text-color":"#fff","active-text-color":"#fff",style:{"margin-top":"10px"}},{default:X(()=>[V(o,{onClick:a[0]||(a[0]=u=>y(lr).push({name:"email"})),index:"email",class:Z(y(n).meta.name==="email"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"hugeicons:mailbox-01",width:"20",height:"20"}),A("span",Rce,te(r.$t("inbox")),1)]),_:1},8,["class"]),Rt((R(),he(o,{onClick:a[1]||(a[1]=u=>y(lr).push({name:"send"})),index:"send",class:Z(y(n).meta.name==="send"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"cil:send",width:"20",height:"20"}),A("span",Nce,te(r.$t("sent")),1)]),_:1},8,["class"])),[[l,"email:send"]]),Rt((R(),he(o,{onClick:a[2]||(a[2]=u=>y(lr).push({name:"draft"})),index:"draft",class:Z(y(n).meta.name==="draft"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"ep:document",width:"19",height:"19"}),A("span",$ce,te(r.$t("drafts")),1)]),_:1},8,["class"])),[[l,"email:send"]]),V(o,{onClick:a[3]||(a[3]=u=>y(lr).push({name:"star"})),index:"star",class:Z(y(n).meta.name==="star"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"solar:star-line-duotone",width:"20",height:"20"}),A("span",Fce,te(r.$t("starred")),1)]),_:1},8,["class"]),V(o,{onClick:a[4]||(a[4]=u=>y(lr).push({name:"setting"})),index:"setting",class:Z(y(n).meta.name==="setting"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:settings-48-regular",width:"20",height:"20"}),A("span",Bce,te(r.$t("settings")),1)]),_:1},8,["class"]),Rt((R(),re("div",Vce,[A("div",null,te(r.$t("manage")),1)])),[[l,["user:query","role:query","setting:query","analysis:query","reg-key:query"]]]),Rt((R(),he(o,{onClick:a[5]||(a[5]=u=>y(lr).push({name:"analysis"})),index:"analysis",class:Z(y(n).meta.name==="analysis"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:data-pie-20-regular",width:"24",height:"24"}),A("span",zce,te(r.$t("analytics")),1)]),_:1},8,["class"])),[[l,"analysis:query"]]),Rt((R(),he(o,{onClick:a[6]||(a[6]=u=>y(lr).push({name:"user"})),index:"setting",class:Z(y(n).meta.name==="user"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"si:user-alt-2-line",width:"20",height:"20"}),A("span",Hce,te(r.$t("allUsers")),1)]),_:1},8,["class"])),[[l,"user:query"]]),Rt((R(),he(o,{onClick:a[7]||(a[7]=u=>y(lr).push({name:"all-email"})),index:"all-email",class:Z(y(n).meta.name==="all-email"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:mail-list-28-regular",width:"22",height:"22"}),A("span",Uce,te(r.$t("allMail")),1)]),_:1},8,["class"])),[[l,"all-email:query"]]),Rt((R(),he(o,{onClick:a[8]||(a[8]=u=>y(lr).push({name:"role"})),index:"setting",class:Z(y(n).meta.name==="role"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:lock-closed-16-regular",width:"22",height:"22"}),A("span",Wce,te(r.$t("permissions")),1)]),_:1},8,["class"])),[[l,"role:query"]]),Rt((R(),he(o,{onClick:a[9]||(a[9]=u=>y(lr).push({name:"reg-key"})),index:"reg-key",class:Z(y(n).meta.name==="reg-key"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"fluent:fingerprint-20-filled",width:"22",height:"22"}),A("span",Kce,te(r.$t("inviteCode")),1)]),_:1},8,["class"])),[[l,"reg-key:query"]]),Rt((R(),he(o,{onClick:a[10]||(a[10]=u=>y(lr).push({name:"sys-setting"})),index:"sys-setting",class:Z(y(n).meta.name==="sys-setting"?"choose-item":"")},{default:X(()=>[V(y(it),{icon:"eos-icons:system-ok-outlined",width:"18",height:"18",style:{"margin-left":"2px"}}),A("span",jce,te(r.$t("SystemSettings")),1)]),_:1},8,["class"])),[[l,"setting:query"]])]),_:1})])]),_:1})}}},Gce=yr(Yce,[["__scopeId","data-v-d15e04fa"]]),qce={__name:"index",props:{isActive:{type:Boolean,default:!1}},setup(e,{emit:t}){const n=t,r=()=>{n("toggleClick")};return(a,o)=>(R(),re("div",{style:{padding:"0 15px",cursor:"pointer"},onClick:r},[(R(),re("svg",{class:Z([{"is-active":e.isActive},"hamburger"]),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"currentColor"},o[0]||(o[0]=[A("path",{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"},null,-1)]),2))]))}},Xce=yr(qce,[["__scopeId","data-v-b2fb0d8c"]]);function Zce(e,t){return rn.post("/login",{email:e,password:t})}function Jce(){return rn.delete("/logout")}function Qce(e){return rn.post("/register",e)}const efe={class:"header-btn"},tfe={class:"breadcrumb-item"},nfe={class:"writer"},rfe={class:"toolbar"},afe={class:"translate icon-item"},ofe={class:"avatar"},ife={class:"avatar-text"},sfe={class:"user-details"},lfe={class:"details-avatar"},ufe={class:"user-name"},cfe={class:"detail-user-type"},ffe={class:"action-info"},dfe={style:{"margin-right":"10px"}},hfe={style:{"margin-right":"10px"}},pfe={key:0,style:{"margin-right":"5px"}},vfe={key:1,style:{"margin-right":"5px"}},mfe={class:"logout"},gfe={__name:"index",setup(e){const{t}=Zr(),n=Q0(),r=Jr(),a=ei(),o=cs(),i=K(!1),s=j(()=>a.user.role.accountCount),l=j(()=>{if(r.settings.send===1)return t("disabled");if(!Ia("email:send"))return t("unauthorized");if(a.user.role.sendType==="ban")return t("sendBanned");if(!a.user.role.sendCount)return t("unlimited");if(a.user.role.sendType==="day")return t("daily");if(a.user.role.sendType==="count")return t("total")}),u=j(()=>!Ia("email:send")||a.user.role.sendType==="ban"||!a.user.role.sendCount||r.settings.send===1?null:a.user.sendCount+"/"+a.user.role.sendCount);async function c(g){try{await navigator.clipboard.writeText(g),kt({message:t("copySuccessMsg"),type:"success",plain:!0})}catch(b){console.error(`${t("copyFailMsg")}:`,b),kt({message:t("copyFailMsg"),type:"error",plain:!0})}}function f(g){r.lang=g}function h(){o.showNotice()}function d(){o.writerRef.open()}function p(){o.asideShow=!o.asideShow}function v(){i.value=!0,Jce().then(()=>{localStorage.removeItem("token"),lr.replace("/login")}).finally(()=>{i.value=!1})}function m(g){return g[0]?.toUpperCase()||""}return(g,b)=>{const _=ev,w=tv,C=Qp,S=Dc,E=ra,M=Ks("perm");return R(),re("div",{class:Z(["header",y(Ia)("email:send")?"":"not-send"])},[A("div",efe,[V(Xce,{onClick:p}),A("span",tfe,te(g.$t(y(n).meta.title)),1)]),Rt((R(),re("div",{class:"writer-box",onClick:d},[A("div",nfe,[V(y(it),{icon:"material-symbols:edit-outline-sharp",width:"22",height:"22"})])])),[[M,"email:send"]]),A("div",rfe,[V(C,null,{dropdown:X(()=>[V(w,null,{default:X(()=>[V(_,{onClick:b[0]||(b[0]=x=>f("zh"))},{default:X(()=>b[3]||(b[3]=[Ze("简体中文")])),_:1}),V(_,{onClick:b[1]||(b[1]=x=>f("en"))},{default:X(()=>b[4]||(b[4]=[Ze("English")])),_:1})]),_:1})]),default:X(()=>[A("div",afe,[V(y(it),{icon:"carbon:ibm-watson-language-translator"})])]),_:1}),A("div",{class:"notice icon-item",onClick:h},[V(y(it),{icon:"streamline-plump:announcement-megaphone"})]),V(C,{teleported:!1,"popper-class":"detail-dropdown"},{dropdown:X(()=>[A("div",sfe,[A("div",lfe,te(m(y(a).user.email)),1),A("div",ufe,te(y(a).user.name),1),A("div",{class:"detail-email",onClick:b[2]||(b[2]=x=>c(y(a).user.email))},te(y(a).user.email),1),A("div",cfe,[V(S,null,{default:X(()=>[Ze(te(g.$t(y(a).user.role.name)),1)]),_:1})]),A("div",ffe,[A("div",null,[A("span",dfe,te(g.$t("sendCount")),1),A("span",hfe,te(g.$t("accountCount")),1)]),A("div",null,[A("div",null,[u.value?(R(),re("span",pfe,te(u.value),1)):be("",!0),y(Ia)("email:send")?(R(),he(S,{key:2},{default:X(()=>[Ze(te(l.value),1)]),_:1})):(R(),he(S,{key:1},{default:X(()=>[Ze(te(l.value),1)]),_:1}))]),A("div",null,[y(r).settings.manyEmail||y(r).settings.addEmail?(R(),he(S,{key:0},{default:X(()=>[Ze(te(g.$t("disabled")),1)]),_:1})):s.value&&y(Ia)("account:add")?(R(),re("span",vfe,te(g.$t("totalUserAccount",{msg:s.value})),1)):!s.value&&y(Ia)("account:add")?(R(),he(S,{key:2},{default:X(()=>[Ze(te(g.$t("unlimited")),1)]),_:1})):y(Ia)("account:add")?be("",!0):(R(),he(S,{key:3},{default:X(()=>[Ze(te(g.$t("unauthorized")),1)]),_:1}))])])]),A("div",mfe,[V(E,{type:"primary",loading:i.value,onClick:v},{default:X(()=>[Ze(te(g.$t("logOut")),1)]),_:1},8,["loading"])])])]),default:X(()=>[A("div",ofe,[A("div",ife,[A("div",null,te(m(y(a).user.email)),1)]),V(y(it),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"24",height:"24"})])]),_:1})])],2)}}},yfe=yr(gfe,[["__scopeId","data-v-02041a05"]]);function bfe(e,t){return rn.get("/account/list",{params:{accountId:e,size:t}})}function _fe(e,t){return rn.post("/account/add",{email:e,token:t})}function OF(e,t){return rn.put("/account/setName",{name:t,accountId:e})}function wfe(e){return rn.delete("/account/delete",{params:{accountId:e}})}function Kl(e){return/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(e)}function Sfe(e){return/^(?!:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(e)}const Cfe={class:"account-box"},Tfe={class:"head-opt"},Efe={"infinite-scroll-distance":600,"infinite-scroll-immediate":!1},kfe={class:"account"},xfe={class:"opt"},Mfe={style:{display:"flex","justify-content":"space-between"}},Afe={style:{display:"flex","justify-content":"space-between"}},Dfe={key:2,class:"noLoading"},Ife={key:3,class:"empty"},Pfe={class:"container"},Ofe={style:{color:"#333"}},Lfe=["data-sitekey"],Rfe={key:0,style:{"font-size":"12px",color:"#F56C6C"}},Nfe={class:"container"},$fe={__name:"index",setup(e){const{t}=Zr(),n=ei(),r=Gs(),a=Jr(),o=K(!1),i=K(!1),s=a.domainList,l=Jt([]),u=K(!1),c=K(!1),f=K(!1),h=K(!1),d=K(!1),p=K(!1),v=K(null),m=K({});let g=null,b=null;const _=K(!1);let w="",C=0;const S=Jt({email:"",suffix:a.domainList[0]}),E={accountId:0,size:20},M=K();Ia("account:query")&&N(),Xe(()=>r.changeUserAccountName,()=>{l[0].name=r.changeUserAccountName});const x=()=>{M.value.toggleMenu()};window.onTurnstileError=W=>{C>=4||(C++,console.warn("人机验加载失败",W),setTimeout(()=>{Nt(()=>{b?window.turnstile.reset(b):b=window.turnstile.render(".add-email-turnstile")})},1500))},window.onTurnstileSuccess=W=>{w=W};function D(){let W=v.value;if(W===g.name){d.value=!1;return}if(!W){kt({message:t("emptyUserNameMsg"),type:"error",plain:!0});return}p.value=!0,OF(g.accountId,W).then(()=>{g.name=W,d.value=!1,g.accountId===n.user.accountId&&(n.user.name=W),kt({message:t("saveSuccessMsg"),type:"success",plain:!0})}).finally(()=>{p.value=!1})}function I(W){v.value=W.name,g=W,d.value=!0}function L(W){return!Ia("email:send")&&!(W.accountId!==n.user.accountId&&Ia("account:delete"))}function G(W){return r.currentAccountId===W?"item-choose":""}function U(W){La.confirm(t("delConfirm",{msg:W.email}),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{wfe(W.accountId).then(()=>{const Q=l.findIndex(fe=>fe.accountId===W.accountId);l.splice(Q,1),l.length{m.value.focus()},100)}async function P(W){try{await navigator.clipboard.writeText(W),kt({message:t("copySuccessMsg"),type:"success",plain:!0})}catch(Q){console.error(`${t("copyFailMsg")}:`,Q),kt({message:t("copyFailMsg"),type:"error",plain:!0})}}function N(){c.value||f.value||u.value||(l.length===0?c.value=!0:f.value=!0,bfe(E.accountId,E.size).then(W=>{W.length{c.value=!1,f.value=!1}))}function q(){if(!S.email){kt({message:t("emptyEmailMsg"),type:"error",plain:!0});return}if(!Kl(S.email+S.suffix)){kt({message:t("notEmailMsg"),type:"error",plain:!0});return}if(!w&&(a.settings.addEmailVerify===0||a.settings.addEmailVerify===2&&a.settings.addVerifyOpen)){h.value?_.value||kt({message:t("botVerifyMsg"),type:"error",plain:!0}):(h.value=!0,Nt(()=>{if(b)window.turnstile.reset(".add-email-turnstile");else try{b=window.turnstile.render(".add-email-turnstile")}catch{_.value=!0,console.log("人机验证js加载失败")}}));return}i.value=!0,_fe(S.email+S.suffix,w).then(W=>{i.value=!1,o.value=!1,S.email="",l.push(W),w="",a.settings.addVerifyOpen=W.addVerifyOpen,kt({message:t("addSuccessMsg"),type:"success",plain:!0}),h.value=!1,n.refreshUserInfo()}).catch(W=>{W.code===400&&(w="",b?window.turnstile.reset(b):Nt(()=>{b=window.turnstile.render(".add-email-turnstile")}),h.value=!0),i.value=!1})}return(W,Q)=>{const fe=ev,me=tv,Ce=Qp,ie=gX,ue=ene,_e=Qte,pe=W0,Ve=Ua,Ke=ru,J=nu,se=Hr,de=ra,Te=ud,$e=Ks("perm"),He=t8;return R(),re("div",Cfe,[A("div",Tfe,[Rt(V(y(it),{class:"icon add",icon:"ion:add-outline",width:"23",height:"23",onClick:H},null,512),[[$e,"account:add"]]),V(y(it),{class:"icon refresh",icon:"ion:reload",width:"18",height:"18",onClick:B})]),V(Ve,{class:"scrollbar"},{default:X(()=>[Rt((R(),re("div",Efe,[(R(!0),re(yt,null,sn(l,ne=>(R(),he(ie,{class:Z(["item",G(ne.accountId)]),key:ne.accountId,onClick:ae=>F(ne)},{default:X(()=>[A("div",kfe,te(ne.email),1),A("div",xfe,[A("div",{class:"send-email",onClick:Q[0]||(Q[0]=$t(()=>{},["stop"]))},[V(y(it),{icon:"eva:email-fill",width:"22",height:"22",color:"#fccb1a"})]),A("div",{class:"settings",onClick:Q[1]||(Q[1]=$t(()=>{},["stop"]))},[V(y(it),{icon:"fluent-color:clipboard-24",width:"22",height:"22",onClick:$t(ae=>P(ne.email),["stop"])},null,8,["onClick"]),L(ne)?(R(),he(y(it),{key:0,icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})):(R(),he(Ce,{key:1},{dropdown:X(()=>[V(me,null,{default:X(()=>[y(Ia)("email:send")?(R(),he(fe,{key:0,onClick:ae=>I(ne)},{default:X(()=>[Ze(te(W.$t("rename")),1)]),_:2},1032,["onClick"])):be("",!0),ne.accountId!==y(n).user.accountId&&y(Ia)("account:delete")?(R(),he(fe,{key:1,onClick:ae=>U(ne)},{default:X(()=>[Ze(te(W.$t("delete")),1)]),_:2},1032,["onClick"])):be("",!0)]),_:2},1024)]),default:X(()=>[V(y(it),{icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})]),_:2},1024))])])]),_:2},1032,["class","onClick"]))),128)),c.value?(R(),re(yt,{key:0},sn(3,ne=>V(_e,{key:ne,animated:""},{template:X(()=>[V(ie,{class:"item"},{default:X(()=>[V(ue,{variant:"p",style:{width:"70%",height:"20px","margin-bottom":"20px"}}),A("div",Mfe,[V(ue,{variant:"text",style:{width:"20px"}}),V(ue,{variant:"text",style:{width:"20px"}})])]),_:1})]),_:2},1024)),64)):be("",!0),l.length>0&&!u.value?(R(),he(_e,{key:1,animated:""},{template:X(()=>[V(ie,{class:"item"},{default:X(()=>[V(ue,{variant:"p",style:{width:"70%",height:"20px","margin-bottom":"20px"}}),A("div",Afe,[V(ue,{variant:"text",style:{width:"20px"}}),V(ue,{variant:"text",style:{width:"20px"}})])]),_:1})]),_:1})):be("",!0),u.value&&l.length>0?(R(),re("div",Dfe,[A("div",null,te(W.$t("noMoreData")),1)])):be("",!0),u.value&&l.length===0?(R(),re("div",Ife,[V(pe,{description:W.$t("noMessagesFound")},null,8,["description"])])):be("",!0)])),[[He,N]])]),_:1}),V(Te,{modelValue:o.value,"onUpdate:modelValue":Q[4]||(Q[4]=ne=>o.value=ne),title:W.$t("addAccount")},{default:X(()=>[A("div",Pfe,[V(se,{modelValue:S.email,"onUpdate:modelValue":Q[3]||(Q[3]=ne=>S.email=ne),ref_key:"addRef",ref:m,type:"text",placeholder:W.$t("emailAccount"),autocomplete:"off"},{append:X(()=>[A("div",{onClick:$t(x,["stop"])},[V(J,{ref_key:"mySelect",ref:M,modelValue:S.suffix,"onUpdate:modelValue":Q[2]||(Q[2]=ne=>S.suffix=ne),placeholder:W.$t("select"),class:"select"},{default:X(()=>[(R(!0),re(yt,null,sn(y(s),ne=>(R(),he(Ke,{key:ne,label:ne,value:ne},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),A("div",Ofe,[A("span",null,te(S.suffix),1),V(y(it),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),V(de,{class:"btn",type:"primary",onClick:q,loading:i.value},{default:X(()=>[Ze(te(W.$t("add")),1)]),_:1},8,["loading"])]),A("div",{class:Z(["add-email-turnstile",h.value?"turnstile-show":"turnstile-hide"]),"data-sitekey":y(a).settings.siteKey,"data-callback":"onTurnstileSuccess","data-error-callback":"onTurnstileError"},[_.value?(R(),re("span",Rfe,te(W.$t("verifyModuleFailed")),1)):be("",!0)],10,Lfe)]),_:1},8,["modelValue","title"]),V(Te,{modelValue:d.value,"onUpdate:modelValue":Q[6]||(Q[6]=ne=>d.value=ne),title:W.$t("changeUserName")},{default:X(()=>[A("div",Nfe,[V(se,{modelValue:v.value,"onUpdate:modelValue":Q[5]||(Q[5]=ne=>v.value=ne),type:"text",placeholder:W.$t("username"),autocomplete:"off"},null,8,["modelValue","placeholder"]),V(de,{class:"btn",type:"primary",onClick:D,loading:p.value},{default:X(()=>[Ze(te(W.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}},Ffe=yr($fe,[["__scopeId","data-v-5b8a6425"]]),Bfe={__name:"index",setup(e){const t=Jr(),n=cs(),r=Q0();let a=window.innerWidth,o=null;const i=j(()=>n.accountShow&&t.settings.manyEmail===0);Xe(()=>n.changeNotice,()=>{const u=t.settings;let c={notice:u.notice,noticeWidth:u.noticeWidth,noticeTitle:u.noticeTitle,noticeContent:u.noticeContent,noticeType:u.noticeType,noticeDuration:u.noticeDuration,noticePosition:u.noticePosition,noticeOffset:u.noticeOffset};s(c)}),Xe(()=>n.changePreview,()=>{s(n.previewData)});function s(u){if(u.notice===1)return;o&&o.close();const c=document.createElement("style");c.innerHTML=` .custom-notice.el-notification { --el-notification-width: min(${u.noticeWidth}px,calc(100% - 30px)) !important; } diff --git a/mail-worker/dist/index.html b/mail-worker/dist/index.html index 40bcd1e..d0098dc 100644 --- a/mail-worker/dist/index.html +++ b/mail-worker/dist/index.html @@ -7,7 +7,7 @@ - +