{"version":3,"sources":["jsdelivr-header.js","/npm/rfc6570-expand@0.2.0/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,MAAM,YAAc,QAAQ,eACtB,aAAe,QAAQ,gBACvB,WAAa,QAAQ,cACrB,KAAQ,IAqBH,CAAE,OApBO,IACZ,MAAM,EAAa,YAAY,mBAAmB,GAC5C,EAAS,GACf,IAAI,EAAQ,EACZ,OAAa,CACT,MAAM,EAAY,EAAS,QAAQ,IAAK,GACxC,GAAI,EAAY,EAAG,CACf,EAAO,KAAK,WAAW,SAAS,EAAS,MAAM,KAC/C,KACJ,CACA,EAAO,KAAK,WAAW,SAAS,EAAS,MAAM,EAAO,KACtD,MAAM,EAAa,EAAS,QAAQ,IAAK,EAAY,GACrD,GAAI,EAAa,EACb,MAAM,IAAI,MAEd,EAAO,KAAK,aAAa,WAAW,EAAS,MAAM,EAAW,EAAa,GAAI,IAC/E,EAAQ,EAAa,CACzB,CACA,OAAO,EAAO,KAAK,GAAG,IAI9B,QAAQ,KAAO","file":"/npm/rfc6570-expand@0.2.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/rfc6570-expand@0.2.0/lib/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\";\nconst variables_1 = require('./variables');\nconst expression_1 = require('./expression');\nconst literals_1 = require('./literals');\nconst init = (template) => {\n    const expand = (variables) => {\n        const normalized = variables_1.normalizeVariables(variables);\n        const result = [];\n        let index = 0;\n        while (true) {\n            const openIndex = template.indexOf('{', index);\n            if (openIndex < 0) {\n                result.push(literals_1.literals(template.slice(index)));\n                break;\n            }\n            result.push(literals_1.literals(template.slice(index, openIndex)));\n            const closeIndex = template.indexOf('}', openIndex + 1);\n            if (closeIndex < 0) {\n                throw new Error();\n            }\n            result.push(expression_1.expression(template.slice(openIndex, closeIndex + 1), normalized));\n            index = closeIndex + 1;\n        }\n        return result.join('');\n    };\n    return { expand: expand };\n};\nexports.init = init;\n"]}