(function(){"use strict";var e={6674:function(e,n,t){var r=t(5130),o=t(5587),i=(t(4188),t(6768));function a(e,n,t,r,o,a){const u=(0,i.g2)("router-view");return(0,i.uX)(),(0,i.Wv)(u)}var u=t(782),c={computed:{...(0,u.L8)(["userConfig"])},mounted(){this.setSiteTitle(),this.setSiteIcon()},methods:{setSiteTitle(){document.title=this.userConfig?.siteTitle||"Sanyue ImgHub"},setSiteIcon(){const e=document.createElement("link");e.rel="icon",e.href=this.userConfig?.siteIcon||"/logo.png",document.head.appendChild(e)}}},s=t(1241);const l=(0,s.A)(c,[["render",a]]);var f=l,d=t(1387),p=t(1219),g=t(4570),h=t.n(g);const m=[{path:"/",name:"home",component:()=>Promise.all([t.e(373),t.e(954)]).then(t.bind(t,2954)),beforeEnter:(e,n,t)=>{const r=h().get("authCode");null===r&&"login"!==e.name?(p.nk.error("请先认证!"),t({name:"login"})):t()}},{path:"/login",name:"login",component:()=>Promise.all([t.e(373),t.e(650)]).then(t.bind(t,1650))}],v=(0,d.aE)({history:(0,d.LA)("/"),routes:m});var b=v,y=(0,u.y$)({state:{userConfig:null,bingWallPapers:[]},getters:{userConfig:e=>e.userConfig,bingWallPapers:e=>e.bingWallPapers},mutations:{setUserConfig(e,n){e.userConfig=n},setBingWallPapers(e,n){e.bingWallPapers=n}},actions:{async fetchUserConfig({commit:e}){try{const n=await fetch("/userConfig"),t=await n.json();e("setUserConfig",t)}catch(n){console.log(n)}},async fetchBingWallPapers({commit:e}){try{const n=await fetch("/api/bing/wallpaper"),t=await n.json(),r=t.data,o=r.map((e=>({url:"https://www.bing.com"+e.url})));await Promise.all(o.map((e=>new Promise(((n,t)=>{const r=new Image;r.onload=n,r.onerror=t,r.src=e.url}))))),e("setBingWallPapers",o)}catch(n){console.log(n)}}},modules:{}}),C=t(7477);const w=(0,r.Ef)(f);for(const[k,P]of Object.entries(C))w.component(k,P);y.dispatch("fetchUserConfig").then((()=>{w.use(y).use(b).use(o.A).mount("#app")})).catch((e=>{console.error("Failed to load user configuration:",e),w.use(y).use(b).use(o.A).mount("#app")}))}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return e[r].call(i.exports,i,i.exports,t),i.exports}t.m=e,function(){var e=[];t.O=function(n,r,o,i){if(!r){var a=1/0;for(l=0;l=i)&&Object.keys(t.O).every((function(e){return t.O[e](r[c])}))?r.splice(c--,1):(u=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,o,i]}}(),function(){t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,{a:n}),n}}(),function(){t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}}(),function(){t.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(n,r){return t.f[r](e,n),n}),[]))}}(),function(){t.u=function(e){return"js/"+e+"."+{373:"7707906e",650:"f38af2af",954:"6a4e09c7"}[e]+".js"}}(),function(){t.miniCssF=function(e){return"css/"+e+"."+{650:"dcab35db",954:"3b0148e6"}[e]+".css"}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){var e={},n="sanyue_imghub:";t.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var u,c;if(void 0!==i)for(var s=document.getElementsByTagName("script"),l=0;l