{"version":3,"sources":["jsdelivr-header.js","/npm/erfan-flmngr-server-fixed@1.1.4/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,IAAI,gBAAmB,MAAQ,KAAK,iBAAoB,SAAU,GAC9D,OAAQ,GAAO,EAAI,WAAc,EAAM,CAAE,QAAW,EACxD,EACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,wBAA0B,QAAQ,gBAAa,EACvD,MAAM,UAAY,gBAAgB,QAAQ,YACpC,cAAgB,gBAAgB,QAAQ,gBACxC,KAAO,QAAQ,QACrB,IAAI,OAAS,QAAQ,kBACrB,MAAM,SAAW,QAAQ,YACzB,SAAS,WAAW,GAChB,EAAO,IAAI,IAAI,QACf,EAAO,IAAI,IAAI,EAAO,IAAK,cAAc,QAAQ,QACjD,EAAO,IAAI,IAAI,EAAO,IAAK,cAAc,QAAQ,WAAW,CAAE,UAAU,KACxE,EAAO,IAAI,IAAI,EAAO,IAAK,UAC3B,EAAO,IAAI,IAAI,EAAO,IAAK,SAAS,aAAa,GACrD,CAEA,SAAS,wBAAwB,GAE7B,IAAI,EAAM,UAAU,UAChB,EAAiB,CACjB,QAAS,EAAO,QAChB,SAAU,EAAO,UAiBrB,OAfA,EAAO,OAAS,CAAE,SAAU,GAE5B,WAAW,CACP,IAAK,EACL,IAAK,EAAO,IAAM,EAAO,IAAM,IAC/B,IAAK,EAAO,SACZ,OAAQ,EAAO,SAEf,EAAO,SACP,EAAI,IAAI,UAAU,QAAQ,OAAO,EAAO,UAE5C,EAAI,OAAO,EAAO,KAAO,EAAO,KAAO,KAAM,EAAO,KAAO,EAAO,KAAO,aAAa,KAElF,QAAQ,IAAI,yCAA2C,EAAO,KAAO,IAAM,EAAO,KAAK,IAEpF,CACX,CAxBA,QAAQ,WAAa,WAyBrB,QAAQ,wBAA0B","file":"/npm/erfan-flmngr-server-fixed@1.1.4/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/erfan-flmngr-server-fixed@1.1.4/dist/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","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.startFlmngrMicroservice = exports.bindFlmngr = void 0;\r\nconst express_1 = __importDefault(require(\"express\"));\r\nconst body_parser_1 = __importDefault(require(\"body-parser\"));\r\nconst cors = require('cors');\r\nvar busboy = require('connect-busboy');\r\nconst router_1 = require(\"./router\");\r\nfunction bindFlmngr(config) {\r\n    config.app.use(cors());\r\n    config.app.use(config.url, body_parser_1.default.json());\r\n    config.app.use(config.url, body_parser_1.default.urlencoded({ extended: true }));\r\n    config.app.use(config.url, busboy());\r\n    config.app.use(config.url, router_1.createRouter(config));\r\n}\r\nexports.bindFlmngr = bindFlmngr;\r\nfunction startFlmngrMicroservice(config) {\r\n    // Create Express app\r\n    let app = express_1.default();\r\n    let configUploader = {\r\n        dirRoot: config.dirRoot,\r\n        dirFiles: config.dirFiles\r\n    };\r\n    config.config = { uploader: configUploader };\r\n    // Attach Flmngr\r\n    bindFlmngr({\r\n        app: app,\r\n        url: config.url ? config.url : \"/\",\r\n        dir: config.dirFiles,\r\n        config: config.config\r\n    });\r\n    if (config.dirRoot)\r\n        app.use(express_1.default.static(config.dirRoot)); // Serve HTML and CSS files from 'www' directory\r\n    // Listen the 8080-th port on localhost\r\n    app.listen(config.port ? config.port : 8080, config.host ? config.host : 'localhost', () => {\r\n        // Server started successfully\r\n        console.log(\"Flmngr microservice started on http://\" + config.host + \":\" + config.port);\r\n    });\r\n    return app;\r\n}\r\nexports.startFlmngrMicroservice = startFlmngrMicroservice;\r\n"]}