{"version":3,"sources":["jsdelivr-header.js","/npm/@akala/server@27.2.39/dist/esm/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,MCNO,wBACE,KAAK,0BACP,kBACE,KAAK,kBACL,KAAK,oBACP,cAAe,uBACb,kBACA,wBAA2B,yBAC3B,eAAkB,4BAClB,mBAAsB,uBACtB,yBAA4B,0CAC5B,eAAkB,qBAClB,uBACA,YAAe,4BACjB,SAAS,QAAQ,EAAS,KAAa,GAG1C,OAFK,IACD,EAAW,CAAE,SAAU,UAAU,KAAM,UAAW,OAC/C,oBAAoB,EAAS,CAAE,SAAU,UAAU,QAAS,MAAe,EACtF,QACO,eAAe,MAAM,GACxB,MAAM,EAAS,IAAI,WAUnB,aATM,QAAQ,IAAI,EAAQ,KAAK,KAAI,MAAO,IACtC,MAAM,QAAe,eAAe,QAAQ,IAAI,IAAI,GAAM,CAAE,OAAQ,EAAQ,SAC5E,IAAI,WAAW,CAAE,KAAM,EAAI,aAAc,KAAK,IAE1C,MADA,EAAI,IAAM,IAAI,IAAI,EAAI,IAAK,GACrB,UAAU,IACjB,cAAc,GAAQ,SAAS,EAAO,KAEzC,EAAQ,eACR,EAAQ,cAAc,SAAQ,CAAC,EAAQ,EAAG,IAAY,EAAO,cAAc,IAAI,qBAAqB,EAAQ,CAAE,YAAa,EAAQ,aAAe,EAAI,EAAQ,OAAS,OACpK,CACX","file":"/npm/@akala/server@27.2.39/dist/esm/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@akala/server@27.2.39/dist/esm/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import './translator.js';\nexport * from './router/index.js';\nimport './http.js';\nexport * from './http.js';\nexport * from './queue.js';\nimport container from './commands.js';\nexport { container };\nimport { connectByPreference } from '@akala/commands';\nimport { HttpRouter } from './router/router.js';\nimport { serverHandlers } from './handlers.js';\nimport { StaticFileMiddleware } from './router/staticFileMiddleware.js';\nimport { NotHandled } from '@akala/core';\nexport { serverHandlers };\nexport { trigger } from './triggers/http.js';\nexport function connect(options, settings, ...orders) {\n    if (!settings)\n        settings = { metadata: container.meta, container: null };\n    return connectByPreference(options, { metadata: container.meta, ...settings }, ...orders);\n}\nexport async function serve(options) {\n    const router = new HttpRouter();\n    await Promise.all(options.urls.map(async (url) => {\n        const server = await serverHandlers.process(new URL(url), { signal: options.signal });\n        new HttpRouter({ name: url.toString() }).use((req) => {\n            req.uri = new URL(req.url, url);\n            throw NotHandled;\n        }).useMiddleware(router).attachTo(server);\n    }));\n    if (options.staticFolders)\n        options.staticFolders.forEach((folder, i, folders) => router.useMiddleware(new StaticFileMiddleware(folder, { fallthrough: options.fallthrough || i < folders.length - 1 })));\n    return router;\n}\n"]}