{"version":3,"sources":["jsdelivr-header.js","/npm/mns-core-ui-header@8.3.21/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IACI,WADA,KAAO,QAAQ,QAEf,UAAY,GACZ,UAAY,QAAQ,eAExB,SAAS,uBACL,OAAO,KAAK,KAAK,MAAO,qBAAsB,YAAa,SAC/D,CAEA,SAAS,oBACL,OAAO,KAAK,KAAK,WAAY,uBAAwB,OAAQ,SACjE,CAOA,IACI,WAAa,KAAK,QAAQ,QAAQ,QAAQ,sBAC9C,CAAE,MAAO,GACL,WAAa,QAAQ,KACzB,CAEA,IAAI,aAAe,QAAQ,KAAK,KAAK,WAAY,uBAAwB,QAAS,iBAC9E,OAAS,QAAQ,KAAK,KAAK,WAAY,uBAAwB,QAAS,WAE5E,UAAU,KAAK,KAAK,KAAK,WAAY,QACrC,UAAU,KAAK,KAAK,KAAK,WAAY,SACrC,UAAY,UAAU,OAAO,UAAU,WAEvC,IAAI,UAAY,KAAK,KAAK,WAAY,iCAEtC,SAAS,UAAU,QACS,IAApB,IAEA,EAAkB,mBAEtB,IAAI,EAAe,QAAQ,KAAK,KAAK,oBAAqB,EAAiB,cACvE,EAAa,OAAO,KAAK,GAAc,GAW3C,OAVA,EAAa,GAAY,eAAiB,GAAG,QAAQ,IAAI,oCAC5C,CACT,IAAK,EACL,KAAM,EACN,WAAY,CACR,OAAQ,QAAQ,KAAK,KAAK,oBAAqB,EAAiB,cAAc,OAC9E,cAAe,QAAQ,KAAK,KAAK,oBAAqB,EAAiB,qBAAqB,cAC5F,SAAU,QAAQ,KAAK,KAAK,oBAAqB,EAAiB,qBAAqB,UAInG,CAEA,OAAO,QAAU,CACb,aAAc,aACd,OAAQ,OACR,OAAQ,UACR,UAAW,UACX,WAAY,UACZ,cAAe,CACX,KAAM,KAAK,KAAK,WAAY,OAAQ","file":"/npm/mns-core-ui-header@8.3.21/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/mns-core-ui-header@8.3.21/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","var path = require('path');\nvar entryPoint;\nvar sassPaths = [];\nvar mnsCoreUi = require('mns-core-ui');\n\nfunction getLibrarySourcePath() {\n    return path.join('src', 'mns-core-ui-header', 'templates', 'header');\n}\n\nfunction getConfigDataPath() {\n    return path.join(entryPoint, getLibrarySourcePath(), 'data', 'config');\n}\n\n/**\n * will define entry point to module depending\n * on if the module is installed in an application\n * or is running in development mode.\n */\ntry {\n    entryPoint = path.dirname(require.resolve('mns-core-ui-header'));\n} catch (e) {\n    entryPoint = process.cwd();\n}\n\nvar ExposeRoutes = require(path.join(entryPoint, getLibrarySourcePath(), 'mocks', 'ExposeRoutes'));\nvar router = require(path.join(entryPoint, getLibrarySourcePath(), 'mocks', 'routes'));\n\nsassPaths.push(path.join(entryPoint, 'src'));\nsassPaths.push(path.join(entryPoint, 'dist'));\nsassPaths = sassPaths.concat(mnsCoreUi.sassPaths);\n\nvar assetsDir = path.join(entryPoint, '/dist/templates/header/assets');\n\nfunction getConfig(storeIdentifier) {\n    if (storeIdentifier === undefined)\n    {\n        storeIdentifier = 'marksandspencer';\n    }\n    var headerConfig = require(path.join(getConfigDataPath(), storeIdentifier, 'header.js'));\n    var CONFIG_KEY = Object.keys(headerConfig)[0];\n    headerConfig[CONFIG_KEY].loyaltyApiHost = `${process.env.LOYALTY_API_HOST}/loyalty-service/`;\n    var config = {\n        key: CONFIG_KEY,\n        data: headerConfig,\n        decorators: {\n            labels: require(path.join(getConfigDataPath(), storeIdentifier, 'labels.js')).labels,\n            featureSwitch: require(path.join(getConfigDataPath(), storeIdentifier, 'featureSwitch.js')).featureSwitch,\n            features: require(path.join(getConfigDataPath(), storeIdentifier, 'featureSwitch.js')).features\n        }\n    };\n    return config;\n}\n\nmodule.exports = {\n    ExposeRoutes: ExposeRoutes,\n    router: router,\n    config: getConfig,\n    sassPaths: sassPaths,\n    assetPaths: assetsDir,\n    templatePaths: {\n        html: path.join(entryPoint, 'dist', 'templates')\n    }\n};\n"]}