/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/@nuxt/loading-screen@2.0.4/lib/module.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
module.exports=function(){if(!this.options.dev)return;const o=require("defu"),e=require("./loading"),{nuxt:r}=this,i=r.options.router.base+"_loading",t=this.options.build.loadingScreen=o(this.options.build.loadingScreen,{baseURL:i,baseURLAlt:i,altPort:!1,image:void 0,colors:{}}),s=new e(t);r.options.serverMiddleware.push({path:"/_loading",handler:(o,e)=>{s.app(o,e)}}),t.altPort&&r.hook("listen",(async(o,{url:e})=>{await s.initAlt({url:e})})),r.hook("close",(async()=>{await s.close()})),r.hook("bundler:progress",(o=>{s.setStates(o)})),r.hook("cli:buildError",(o=>{s.setError(o)})),r.hook("server:nuxt:renderLoading",((o,e)=>{s.serveIndex(o,e)}))};
//# sourceMappingURL=/sm/8d22a36c4fe3d0abb0b6242a54e29b1863dd76f806323e23cc225a35e963802a.map