@openmrs/esm-styleguide 3.2.1-pre.1086 → 3.2.1-pre.1098

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"openmrs-esm-styleguide.js","mappings":"uPAAA,MAAMA,EAAmBC,EAAAA,KAAAA,EAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUVC,EAAAA,EAAmBC,OAASD,EAAAA,EAAmBC,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsBJ,EAAAA,GAC9BK,MACJ,uHAIJC,EAAAA,EAA0BV,EACxBI,EAAAA,EAAmBC,KAAKC,IACxBH,K,cCuDND,EAAQ,EAlCR,SAA0BS,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS,GAAaJ,EAAEI,SAAW,IAAMJ,EAAEI,SACxDC,EAAmB,EACrBC,EAAQF,EAASG,OACZF,IAAqBN,GAAsBO,GAAS,GAE5C,MADFF,IAAWE,IAEpBD,IAIJ,GAAIA,IAAqBN,EACvB,MAAMH,MACJ,iDACEG,EACA,gDACAM,EACA,qBACAP,GAIN,IAAIU,EAAYJ,EAASK,MAAM,EAAGH,EAAQ,GAE1C,OAAON,EAAEU,SAAW,KAAOV,EAAEW,KAAOH,GAOpCI,OAAOC,W,+RClFT,IAAIC,EAAsBC,EAAQ,KA4B9BC,EA1BuBD,EAAQ,IAARA,EA0BK,SAAcE,EAAIC,GAChD,OAAOJ,EAAOG,EAAGV,QAAQ,WACvB,OAAOU,EAAGE,MAAMD,EAASE,iBAG7BC,EAAOhC,QAAU2B,G,cCjCjB,IAAIM,EAAsBP,EAAQ,KA2B9BQ,EAzBuBR,EAAQ,IAARA,EAyBM,SAAeS,GAC9C,OAAgB,MAATA,GAAwC,mBAAhBA,EAAMD,MAAuBC,E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iBtG,GACxBsG,EAAO,mBAAoBpG,GAC3BoG,EAAO,yBAA0B0C,GACjC1C,EAAO,uBAAwB2C,GAC/B3C,EAAO,qBAAsBjD,GAC7BiD,EAAO,qBAAsB4C,I","sources":["webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/bind.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/clone.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/equals.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_arity.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_arrayFromIterator.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_clone.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_cloneRegExp.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry1.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry2.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry3.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_equals.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_functionName.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_has.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_includesWith.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArguments.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArray.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArrayLike.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isObject.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isPlaceholder.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isString.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_objectIs.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_reduce.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_xwrap.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/keys.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeDeepRight.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeDeepWithKey.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeWithKey.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/reduce.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/type.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/external system \"@openmrs/esm-state\"","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/external system \"single-spa\"","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/bootstrap","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/compat get default export","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/define property getters","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/types.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/validator.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/type-validators.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/module-config/state.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/module-config/module-config.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/navigation/interpolate-string.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/navigation/navigate.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/validators.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/bootstrap","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/__system_context__","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/define property getters","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/global","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/publicPath","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/unistore/dist/unistore.es.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/./src/state.ts","webpack://@openmrs/esm-styleguide/external system \"@openmrs/esm-extensions\"","webpack://@openmrs/esm-styleguide/external system \"react\"","webpack://@openmrs/esm-styleguide/external system \"react-dom\"","webpack://@openmrs/esm-styleguide/external system \"rxjs\"","webpack://@openmrs/esm-styleguide/webpack/bootstrap","webpack://@openmrs/esm-styleguide/webpack/runtime/__system_context__","webpack://@openmrs/esm-styleguide/webpack/runtime/global","webpack://@openmrs/esm-styleguide/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/webpack/runtime/publicPath","webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-styleguide/./src/svg-utils.ts","webpack://@openmrs/esm-styleguide/./src/notifications/index.tsx","webpack://@openmrs/esm-styleguide/./src/toasts/index.tsx","webpack://@openmrs/esm-styleguide/./src/modals/index.tsx","webpack://@openmrs/esm-styleguide/./src/brand.ts","webpack://@openmrs/esm-styleguide/./src/index.ts","webpack://@openmrs/esm-styleguide/./src/logo/index.ts","webpack://@openmrs/esm-styleguide/./src/icons/index.ts"],"sourcesContent":["const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\n\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nmodule.exports = bind;","var _clone = /*#__PURE__*/require('./internal/_clone');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Creates a deep copy of the value which may contain (nested) `Array`s and\n * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are\n * assigned by reference rather than copied\n *\n * Dispatches to a `clone` method if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n * const objects = [{}, {}, {}];\n * const objectsClone = R.clone(objects);\n * objects === objectsClone; //=> false\n * objects[0] === objectsClone[0]; //=> false\n */\n\n\nvar clone = /*#__PURE__*/_curry1(function clone(value) {\n return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);\n});\nmodule.exports = clone;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _equals = /*#__PURE__*/require('./internal/_equals');\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\n\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nmodule.exports = equals;","function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}\nmodule.exports = _arity;","function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}\nmodule.exports = _arrayFromIterator;","var _cloneRegExp = /*#__PURE__*/require('./_cloneRegExp');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\n\n\nfunction _clone(value, refFrom, refTo, deep) {\n var copy = function copy(copiedValue) {\n var len = refFrom.length;\n var idx = 0;\n while (idx < len) {\n if (value === refFrom[idx]) {\n return refTo[idx];\n }\n idx += 1;\n }\n refFrom[idx + 1] = value;\n refTo[idx + 1] = copiedValue;\n for (var key in value) {\n copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n }\n return copiedValue;\n };\n switch (type(value)) {\n case 'Object':\n return copy({});\n case 'Array':\n return copy([]);\n case 'Date':\n return new Date(value.valueOf());\n case 'RegExp':\n return _cloneRegExp(value);\n default:\n return value;\n }\n}\nmodule.exports = _clone;","function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}\nmodule.exports = _cloneRegExp;","var _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\nmodule.exports = _curry1;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\nmodule.exports = _curry2;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\nmodule.exports = _curry3;","var _arrayFromIterator = /*#__PURE__*/require('./_arrayFromIterator');\n\nvar _includesWith = /*#__PURE__*/require('./_includesWith');\n\nvar _functionName = /*#__PURE__*/require('./_functionName');\n\nvar _has = /*#__PURE__*/require('./_has');\n\nvar _objectIs = /*#__PURE__*/require('./_objectIs');\n\nvar keys = /*#__PURE__*/require('../keys');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}\nmodule.exports = _equals;","function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}\nmodule.exports = _functionName;","function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nmodule.exports = _has;","function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}\nmodule.exports = _includesWith;","var _has = /*#__PURE__*/require('./_has');\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nmodule.exports = _isArguments;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nmodule.exports = Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isString = /*#__PURE__*/require('./_isString');\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\n\n\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nmodule.exports = _isArrayLike;","function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\nmodule.exports = _isObject;","function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\nmodule.exports = _isPlaceholder;","function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}\nmodule.exports = _isString;","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nmodule.exports = typeof Object.is === 'function' ? Object.is : _objectIs;","var _isArrayLike = /*#__PURE__*/require('./_isArrayLike');\n\nvar _xwrap = /*#__PURE__*/require('./_xwrap');\n\nvar bind = /*#__PURE__*/require('../bind');\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nfunction _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}\nmodule.exports = _reduce;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nfunction _xwrap(fn) {\n return new XWrap(fn);\n}\nmodule.exports = _xwrap;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\nvar _isArguments = /*#__PURE__*/require('./internal/_isArguments');\n\n// cover IE < 9 keys issues\n\n\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nmodule.exports = keys;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar mergeDeepWithKey = /*#__PURE__*/require('./mergeDeepWithKey');\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\n\n\nvar mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\nmodule.exports = mergeDeepRight;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _isObject = /*#__PURE__*/require('./internal/_isObject');\n\nvar mergeWithKey = /*#__PURE__*/require('./mergeWithKey');\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n * recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n * using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeDeepWithKey(concatValues,\n * { a: true, c: { thing: 'foo', values: [10, 20] }},\n * { b: true, c: { thing: 'bar', values: [15, 35] }});\n * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\n\n\nvar mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) {\n return mergeWithKey(function (k, lVal, rVal) {\n if (_isObject(lVal) && _isObject(rVal)) {\n return mergeDeepWithKey(fn, lVal, rVal);\n } else {\n return fn(k, lVal, rVal);\n }\n }, lObj, rObj);\n});\nmodule.exports = mergeDeepWithKey;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.merge, R.mergeWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeWithKey(concatValues,\n * { a: true, thing: 'foo', values: [10, 20] },\n * { b: true, thing: 'bar', values: [15, 35] });\n * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\n\n\nvar mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) {\n var result = {};\n var k;\n\n for (k in l) {\n if (_has(k, l)) {\n result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];\n }\n }\n\n for (k in r) {\n if (_has(k, r) && !_has(k, result)) {\n result[k] = r[k];\n }\n }\n\n return result;\n});\nmodule.exports = mergeWithKey;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\n\nvar reduce = /*#__PURE__*/_curry3(_reduce);\nmodule.exports = reduce;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\n\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nmodule.exports = type;","module.exports = __WEBPACK_EXTERNAL_MODULE__685__;","module.exports = __WEBPACK_EXTERNAL_MODULE__645__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export enum Type {\n Array = \"Array\",\n Boolean = \"Boolean\",\n ConceptUuid = \"ConceptUuid\",\n Number = \"Number\",\n Object = \"Object\",\n String = \"String\",\n UUID = \"UUID\",\n PersonAttributeTypeUuid = \"PersonAttributeTypeUuid\",\n}\n\n// Full-powered typing for Config and Schema trees depends on being able to\n// have types like `string not \"_default\"`. There is an experimental PR\n// for this feature, https://github.com/microsoft/TypeScript/pull/29317\n// But it is not likely to be merged any time terribly soon. (Nov 11, 2020)\nexport interface ConfigSchema {\n [key: string]: ConfigSchema | ConfigValue;\n _type?: Type;\n _validators?: Array<Validator>;\n _elements?: ConfigSchema;\n}\n\nexport interface Config extends Object {\n [moduleName: string]: { [key: string]: any };\n}\n\nexport interface ConfigObject extends Object {\n [key: string]: any;\n}\n\nexport type ConfigValue =\n | string\n | number\n | boolean\n | void\n | Array<any>\n | object;\n\nexport interface ExtensionSlotConfig {\n add?: Array<string>;\n remove?: Array<string>;\n order?: Array<string>;\n configure?: ExtensionSlotConfigureValueObject;\n}\n\nexport interface ExtensionSlotConfigureValueObject {\n [key: string]: object;\n}\n\nexport interface ExtensionSlotConfigObject {\n /** Additional extension IDs to assign to this slot, in addition to those `attach`ed in code. */\n add?: Array<string>;\n /** Extension IDs which were `attach`ed to the slot but which should not be assigned. */\n remove?: Array<string>;\n /** Overrides the default ordering of extensions. */\n order?: Array<string>;\n}\n\nexport type ProvidedConfig = {\n source: string;\n config: Config;\n};\n\nexport type ValidatorFunction = (value: any) => boolean;\n\nexport type Validator = (value: any) => void | string;\n","import { Validator, ValidatorFunction } from \"../types\";\n\nexport function validator(\n validationFunction: ValidatorFunction,\n message: string\n): Validator {\n return (value) => {\n if (!validationFunction(value)) {\n return message;\n }\n };\n}\n","import { validator } from \"./validator\";\n\nexport const isArray = validator(\n (val) => Array.isArray(val),\n \"must be an array\"\n);\n\nexport const isBoolean = validator(\n (val) => typeof val === \"boolean\",\n \"must be a boolean\"\n);\n\nexport const isNumber = validator(\n (val) => typeof val === \"number\",\n \"must be a number\"\n);\n\nexport const isString = validator(\n (val) => typeof val === \"string\",\n \"must be a string\"\n);\n\nexport const isObject = validator(\n (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null,\n \"must be an object (not an array or null)\"\n);\n\nexport const isUuid = validator(\n (val) =>\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n val\n ) || /^[0-9a-f]{36}$/i.test(val),\n \"must be a valid UUID or a 36-character hexadecimal string\"\n);\n","import { createGlobalStore, getGlobalStore } from \"@openmrs/esm-state\";\nimport {\n Config,\n ConfigObject,\n ConfigSchema,\n ExtensionSlotConfigObject,\n ProvidedConfig,\n} from \"../types\";\n\n/**\n * Internal store\n * A store of the inputs and internal state\n * @internal\n */\nexport interface ConfigInternalStore {\n /** Configs added using the `provide` function */\n providedConfigs: Array<ProvidedConfig>;\n /** An object with module names for keys and schemas for values */\n schemas: Record<string, ConfigSchema>;\n /** Whether to use dev defaults or not */\n devDefaultsAreOn: boolean;\n}\n\nconst configInternalStoreInitialValue = {\n providedConfigs: [],\n schemas: {},\n devDefaultsAreOn: getAreDevDefaultsOn(),\n};\n\n/**\n * @internal\n */\nexport const configInternalStore = createGlobalStore<ConfigInternalStore>(\n \"config-internal\",\n configInternalStoreInitialValue\n);\n\nlet lastValueOfDevDefaultsAreOn = getAreDevDefaultsOn();\nconfigInternalStore.subscribe((state) => {\n if (state.devDefaultsAreOn != lastValueOfDevDefaultsAreOn) {\n setAreDevDefaultsOn(state.devDefaultsAreOn);\n lastValueOfDevDefaultsAreOn = state.devDefaultsAreOn;\n }\n});\n\nfunction setAreDevDefaultsOn(value: boolean) {\n localStorage.setItem(\"openmrs:configAreDevDefaultsOn\", JSON.stringify(value));\n}\n\nfunction getAreDevDefaultsOn(): boolean {\n try {\n return JSON.parse(\n localStorage.getItem(\"openmrs:configAreDevDefaultsOn\") || \"false\"\n );\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Temporary config\n * LocalStorage-based config used by the implementer tools\n * @internal\n */\nexport interface TemporaryConfigStore {\n config: Config;\n}\n\n/** @internal */\nexport const temporaryConfigStore = createGlobalStore<TemporaryConfigStore>(\n \"temporary-config\",\n { config: getTemporaryConfig() }\n);\n\ntemporaryConfigStore.subscribe((state) => {\n setTemporaryConfig(state.config);\n});\n\nfunction setTemporaryConfig(value: Config) {\n localStorage.setItem(\"openmrs:temporaryConfig\", JSON.stringify(value));\n}\n\nfunction getTemporaryConfig(): Config {\n try {\n return JSON.parse(localStorage.getItem(\"openmrs:temporaryConfig\") || \"{}\");\n } catch (e) {\n return {};\n }\n}\n\n/**\n * Config-side extension store\n * Just what esm-config needs to know about extension state. This\n * is to avoid having esm-config depend on esm-extensions, which would\n * create a circular dependency.\n * @internal\n */\nexport interface ConfigExtensionStore {\n mountedExtensions: Array<ConfigExtensionStoreElement>;\n}\n\n/** @internal */\nexport interface ConfigExtensionStoreElement {\n slotModuleName: string;\n extensionModuleName: string;\n slotName: string;\n extensionId: string;\n}\n\n/** @internal */\nexport const configExtensionStore = createGlobalStore<ConfigExtensionStore>(\n \"config-store-of-extension-state\",\n { mountedExtensions: [] }\n);\n\n/**\n * Output configs\n *\n * Each module has its own stores for its config and its extension slots' configs.\n * @internal\n */\nexport interface ConfigStore {\n config: ConfigObject | null;\n loaded: boolean;\n}\n\nfunction initializeConfigStore() {\n return {\n config: null,\n loaded: false,\n };\n}\n\n/** @internal */\nexport function getConfigStore(moduleName: string) {\n // We use a store for each module's config, named `config-${moduleName}`\n return getGlobalStore<ConfigStore>(\n `config-module-${moduleName}`,\n initializeConfigStore()\n );\n}\n\n/**\n * Configuration for all the specific extension slots\n * @internal\n */\nexport interface ExtensionSlotsConfigStore {\n slots: {\n [slotName: string]: {\n config: ExtensionSlotConfigObject;\n loaded: boolean;\n };\n };\n}\n\n/** @internal */\nexport function getExtensionSlotsConfigStore() {\n return getGlobalStore<ExtensionSlotsConfigStore>(`config-extension-slots`, {\n slots: {},\n });\n}\n\n/** @internal */\nexport function getExtensionSlotConfig(slotName: string) {\n return getExtensionSlotConfigFromStore(\n getExtensionSlotsConfigStore().getState(),\n slotName\n );\n}\n\n/** @internal */\nexport function getExtensionSlotConfigFromStore(\n state: ExtensionSlotsConfigStore,\n slotName: string\n) {\n const slotConfig = state.slots[slotName];\n return slotConfig ?? { loaded: false, config: {} };\n}\n\n/** @internal */\nexport interface ExtensionsConfigStore {\n configs: {\n [slotName: string]: {\n [extensionId: string]: ConfigStore;\n };\n };\n}\n\n/**\n * One store for all the extensions\n * @internal\n */\nexport function getExtensionsConfigStore() {\n return getGlobalStore<ExtensionsConfigStore>(`config-extensions`, {\n configs: {},\n });\n}\n\n/** @internal */\nexport function getExtensionConfig(slotName: string, extensionId: string) {\n return getExtensionConfigFromStore(\n getExtensionsConfigStore().getState(),\n slotName,\n extensionId\n );\n}\n\n/** @internal */\nexport function getExtensionConfigFromStore(\n state: ExtensionsConfigStore,\n slotName: string,\n extensionId: string\n) {\n const extensionConfig = state.configs[slotName]?.[extensionId];\n return extensionConfig ?? { loaded: false, config: null };\n}\n\n/**\n * A store of the implementer tools output config\n * @internal\n */\nexport interface ImplementerToolsConfigStore {\n config: Config;\n}\n\n/** @internal */\nexport const implementerToolsConfigStore =\n createGlobalStore<ImplementerToolsConfigStore>(\"config-implementer-tools\", {\n config: {},\n });\n","import { clone, reduce, mergeDeepRight, equals } from \"ramda\";\nimport {\n Config,\n ConfigObject,\n ConfigSchema,\n ExtensionSlotConfig,\n ExtensionSlotConfigObject,\n Type,\n} from \"../types\";\nimport {\n isArray,\n isBoolean,\n isUuid,\n isNumber,\n isObject,\n isString,\n} from \"../validators/type-validators\";\nimport {\n ConfigExtensionStore,\n ConfigInternalStore,\n configInternalStore,\n ConfigStore,\n configExtensionStore,\n getConfigStore,\n getExtensionsConfigStore,\n implementerToolsConfigStore,\n temporaryConfigStore,\n getExtensionSlotsConfigStore,\n ExtensionsConfigStore,\n} from \"./state\";\nimport type {} from \"@openmrs/esm-globals\";\nimport { TemporaryConfigStore } from \"..\";\n\n/**\n * Store setup\n *\n *\n * Set up stores and subscriptions so that inputs get processed appropriately.\n *\n * There are *input* stores and *output* stores. The *input* stores\n * are configInternalStore, temporaryConfigStore, and configExtensionStore. The\n * output stores are set in the `compute...` functions. They are the module\n * config stores, the extension slot config stores (by module), the extension\n * config stores, and the implementer tools config store.\n *\n * This code sets up the subscriptions so that when an input store changes,\n * the correct set of output stores are updated.\n *\n * All `compute...` functions except `computeExtensionConfigs` are pure\n * (or are supposed to be), other than the fact that they all `setState`\n * store values at the end. `computeExtensionConfigs` calls `getGlobalStore`,\n * which creates stores.\n */\ncomputeModuleConfig(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeModuleConfig(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeModuleConfig(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeImplementerToolsConfig(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeImplementerToolsConfig(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeImplementerToolsConfig(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeExtensionSlotConfigs(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeExtensionSlotConfigs(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeExtensionSlotConfigs(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeExtensionConfigs(\n configInternalStore.getState(),\n configExtensionStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) => {\n computeExtensionConfigs(\n configState,\n configExtensionStore.getState(),\n temporaryConfigStore.getState()\n );\n});\nconfigExtensionStore.subscribe((extensionState) => {\n computeExtensionConfigs(\n configInternalStore.getState(),\n extensionState,\n temporaryConfigStore.getState()\n );\n});\ntemporaryConfigStore.subscribe((tempConfigState) => {\n computeExtensionConfigs(\n configInternalStore.getState(),\n configExtensionStore.getState(),\n tempConfigState\n );\n});\n\nfunction computeModuleConfig(\n state: ConfigInternalStore,\n tempState: TemporaryConfigStore\n) {\n for (let moduleName of Object.keys(state.schemas)) {\n const config = getConfigForModule(moduleName, state, tempState);\n const moduleStore = getConfigStore(moduleName);\n moduleStore.setState({ loaded: true, config });\n }\n}\n\nfunction computeExtensionSlotConfigs(\n state: ConfigInternalStore,\n tempState: TemporaryConfigStore\n) {\n const slotConfigs = getExtensionSlotConfigs(state, tempState);\n const newSlotStoreEntries = Object.fromEntries(\n Object.entries(slotConfigs).map(([slotName, config]) => [\n slotName,\n { loaded: true, config },\n ])\n );\n const slotStore = getExtensionSlotsConfigStore();\n const oldState = slotStore.getState();\n const newState = { slots: { ...oldState.slots, ...newSlotStoreEntries } };\n if (!equals(oldState, newState)) {\n slotStore.setState(newState);\n }\n}\n\nfunction computeImplementerToolsConfig(\n state: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n) {\n const config = getImplementerToolsConfig(state, tempConfigState);\n implementerToolsConfigStore.setState({ config });\n}\n\nfunction computeExtensionConfigs(\n configState: ConfigInternalStore,\n extensionState: ConfigExtensionStore,\n tempConfigState: TemporaryConfigStore\n) {\n const configs = {};\n for (let extension of extensionState.mountedExtensions) {\n const config = computeExtensionConfig(\n extension.slotModuleName,\n extension.extensionModuleName,\n extension.slotName,\n extension.extensionId,\n configState,\n tempConfigState\n );\n configs[extension.slotName] = {\n ...configs[extension.slotName],\n [extension.extensionId]: { config, loaded: true },\n };\n }\n getExtensionsConfigStore().setState({ configs });\n}\n\n/*\n * API\n *\n */\n\n/**\n * This defines a configuration schema for a module. The schema tells the\n * configuration system how the module can be configured. It specifies\n * what makes configuration valid or invalid.\n *\n * See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)\n * for more information about defining a config schema.\n *\n * @param moduleName Name of the module the schema is being defined for. Generally\n * should be the one in which the `defineConfigSchema` call takes place.\n * @param schema The config schema for the module\n */\nexport function defineConfigSchema(moduleName: string, schema: ConfigSchema) {\n validateConfigSchema(moduleName, schema);\n const state = configInternalStore.getState();\n configInternalStore.setState({\n schemas: { ...state.schemas, [moduleName]: schema },\n });\n}\n\n/**\n * This defines a configuration schema for an extension. When a schema is defined\n * for an extension, that extension will receive the configuration corresponding\n * to that schema, rather than the configuration corresponding to the module\n * in which it is defined.\n *\n * The schema tells the configuration system how the module can be configured.\n * It specifies what makes configuration valid or invalid.\n *\n * See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)\n * for more information about defining a config schema.\n *\n * @param extensionName Name of the extension the schema is being defined for.\n * Should match the `name` of one of the `extensions` entries being returned\n * by `setupOpenMRS`.\n * @param schema The config schema for the extension\n */\nexport function defineExtensionConfigSchema(\n extensionName: string,\n schema: ConfigSchema\n) {\n validateConfigSchema(extensionName, schema);\n const state = configInternalStore.getState();\n if (state.schemas[extensionName]) {\n console.warn(\n `Config schema for extension ${extensionName} already exists. If there are multiple extensions with this same name, one will probably crash.`\n );\n }\n configInternalStore.setState({\n schemas: { ...state.schemas, [extensionName]: schema },\n });\n}\n\nexport function provide(config: Config, sourceName = \"provided\") {\n const state = configInternalStore.getState();\n configInternalStore.setState({\n providedConfigs: [...state.providedConfigs, { source: sourceName, config }],\n });\n}\n\n/**\n * A promise-based way to access the config as soon as it is fully loaded.\n * If it is already loaded, resolves the config in its present state.\n *\n * In general you should use the Unistore-based API provided by\n * `getConfigStore`, which allows creating a subscription so that you always\n * have the latest config. If using React, just use `useConfig`.\n *\n * This is a useful function if you need to get the config in the course\n * of the execution of a function.\n *\n * @param moduleName The name of the module for which to look up the config\n */\nexport function getConfig(moduleName: string): Promise<Config> {\n return new Promise<Config>((resolve) => {\n const store = getConfigStore(moduleName);\n function update(state: ConfigStore) {\n if (state.loaded && state.config) {\n resolve(state.config);\n unsubscribe && unsubscribe();\n }\n }\n update(store.getState());\n const unsubscribe = store.subscribe(update);\n });\n}\n\n/**\n * Validate and interpolate defaults for `providedConfig` according to `schema`\n *\n * @param schema a configuration schema\n * @param providedConfig an object of config values (without the top-level module name)\n * @param keyPathContext a dot-deparated string which helps the user figure out where\n * the provided config came from\n */\nexport function processConfig(\n schema: ConfigSchema,\n providedConfig: ConfigObject,\n keyPathContext: string,\n devDefaultsAreOn: boolean = false\n) {\n validateConfig(schema, providedConfig, keyPathContext);\n const config = setDefaults(schema, providedConfig, devDefaultsAreOn);\n return config;\n}\n\n/*\n * Helper functions\n *\n */\n\n/**\n * Returns the configuration for an extension. This configuration is specific\n * to the slot in which it is mounted, and its ID within that slot.\n *\n * The schema for that configuration is the extension schema. If no extension\n * schema has been provided, the schema used is the schema of the module in\n * which the extension is defined.\n *\n * @param slotModuleName The name of the module which defines the extension slot\n * @param extensionModuleName The name of the module which defines the extension (and therefore the config schema)\n * @param slotName The name of the extension slot where the extension is mounted\n * @param extensionId The ID of the extension in its slot\n */\nfunction computeExtensionConfig(\n slotModuleName: string,\n extensionModuleName: string,\n slotName: string,\n extensionId: string,\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n) {\n const extensionName = getExtensionNameFromId(extensionId);\n const extensionConfigSchema = configState.schemas[extensionName];\n const nameOfSchemaSource = extensionConfigSchema\n ? extensionName\n : extensionModuleName;\n const providedConfigs = getProvidedConfigs(configState, tempConfigState);\n const slotModuleConfig = mergeConfigsFor(slotModuleName, providedConfigs);\n const configOverride =\n slotModuleConfig?.extensionSlots?.[slotName]?.configure?.[extensionId] ??\n {};\n const extensionConfig = mergeConfigsFor(nameOfSchemaSource, providedConfigs);\n const combinedConfig = mergeConfigs([extensionConfig, configOverride]);\n // TODO: validate that a schema exists for the module\n const schema =\n extensionConfigSchema ?? configState.schemas[extensionModuleName];\n validateConfig(schema, combinedConfig, nameOfSchemaSource);\n const config = setDefaults(\n schema,\n combinedConfig,\n configState.devDefaultsAreOn\n );\n delete config.extensionSlots;\n return config;\n}\n\nfunction getImplementerToolsConfig(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Record<string, Config> {\n let result = getSchemaWithValuesAndSources(clone(configState.schemas));\n const configsAndSources = [\n ...configState.providedConfigs.map((c) => [c.config, c.source]),\n [tempConfigState.config, \"temporary config\"],\n ] as Array<[Config, string]>;\n for (let [config, source] of configsAndSources) {\n result = mergeConfigs([result, createValuesAndSourcesTree(config, source)]);\n }\n return result;\n}\n\nfunction getSchemaWithValuesAndSources(schema) {\n if (schema.hasOwnProperty(\"_default\")) {\n return { ...schema, _value: schema._default, _source: \"default\" };\n } else if (isOrdinaryObject(schema)) {\n return Object.keys(schema).reduce((obj, key) => {\n obj[key] = getSchemaWithValuesAndSources(schema[key]);\n return obj;\n }, {});\n } else {\n // Schema is bad; error will have been logged during schema validation\n return {};\n }\n}\n\nfunction createValuesAndSourcesTree(config: ConfigObject, source: string) {\n if (isOrdinaryObject(config)) {\n return Object.keys(config).reduce((obj, key) => {\n obj[key] = createValuesAndSourcesTree(config[key], source);\n return obj;\n }, {});\n } else {\n return { _value: config, _source: source };\n }\n}\n\nfunction getExtensionSlotConfigs(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Record<string, ExtensionSlotConfigObject> {\n const allConfigs = mergeConfigs(\n getProvidedConfigs(configState, tempConfigState)\n );\n const slotConfigPerModule: Record<\n string,\n Record<string, ExtensionSlotConfig>\n > = Object.keys(allConfigs).reduce((obj, key) => {\n if (allConfigs[key]?.extensionSlots) {\n obj[key] = allConfigs[key]?.extensionSlots;\n }\n return obj;\n }, {});\n validateAllExtensionSlotConfigs(slotConfigPerModule);\n const slotConfigs = Object.keys(slotConfigPerModule).reduce((obj, key) => {\n obj = { ...obj, ...slotConfigPerModule[key] };\n return obj;\n }, {});\n return slotConfigs;\n}\n\nfunction validateAllExtensionSlotConfigs(\n slotConfigPerModule: Record<string, Record<string, ExtensionSlotConfig>>\n) {\n for (let [moduleName, configBySlotName] of Object.entries(\n slotConfigPerModule\n )) {\n for (let [slotName, config] of Object.entries(configBySlotName)) {\n validateExtensionSlotConfig(config, moduleName, slotName);\n }\n }\n}\n\nfunction validateExtensionSlotConfig(\n config: ExtensionSlotConfig,\n moduleName: string,\n slotName: string\n): void {\n const errorPrefix = `Extension slot config '${moduleName}.extensionSlots.${slotName}`;\n const invalidKeys = Object.keys(config).filter(\n (k) => ![\"add\", \"remove\", \"order\", \"configure\"].includes(k)\n );\n if (invalidKeys.length) {\n console.error(\n errorPrefix + `' contains invalid keys '${invalidKeys.join(\"', '\")}'`\n );\n }\n if (config.add) {\n if (\n !Array.isArray(config.add) ||\n !config.add.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.add' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.remove) {\n if (\n !Array.isArray(config.remove) ||\n !config.remove.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.remove' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.order) {\n if (\n !Array.isArray(config.order) ||\n !config.order.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.order' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.configure) {\n if (!isOrdinaryObject(config.configure)) {\n console.error(\n errorPrefix +\n `.configure' is invalid. Must be an object with extension IDs for keys`\n );\n }\n }\n}\n\nfunction getProvidedConfigs(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Array<Config> {\n return [\n ...configState.providedConfigs.map((c) => c.config),\n tempConfigState.config,\n ];\n}\n\nfunction validateConfigSchema(\n moduleName: string,\n schema: ConfigSchema,\n keyPath = \"\"\n) {\n const updateMessage = `Please verify that you are running the latest version and, if so, alert the maintainer.`;\n\n for (const key of Object.keys(schema).filter((k) => !k.startsWith(\"_\"))) {\n const thisKeyPath = keyPath + (keyPath && \".\") + key;\n const schemaPart = schema[key] as ConfigSchema;\n\n if (!isOrdinaryObject(schemaPart)) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}`\n );\n continue;\n }\n\n if (!schemaPart.hasOwnProperty(\"_default\")) {\n // recurse for nested config keys\n validateConfigSchema(moduleName, schemaPart, thisKeyPath);\n }\n\n const elements = schemaPart._elements;\n if (hasObjectSchema(elements)) {\n validateConfigSchema(moduleName, elements, thisKeyPath + \"._elements\");\n }\n\n if (schemaPart._validators) {\n for (let validator of schemaPart._validators) {\n if (typeof validator !== \"function\") {\n console.error(\n `${moduleName} has invalid validator for key '${thisKeyPath}' ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: validators must be functions that return either ` +\n `undefined or an error string. Received ${validator}.`\n );\n }\n }\n }\n\n const valueType = schemaPart._type;\n if (valueType && !Object.values(Type).includes(valueType)) {\n console.error(\n `${moduleName} has invalid type for key '${thisKeyPath}' ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: the allowed types are ${Object.values(\n Type\n ).join(\", \")}. ` +\n `Received '${valueType}'`\n );\n }\n\n if (\n Object.keys(schemaPart).every((k) =>\n [\"_description\", \"_validators\", \"_elements\", \"_type\"].includes(k)\n ) &&\n !keyPath.includes(\"._elements\")\n ) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: all config elements must have a default. ` +\n `Received ${JSON.stringify(schemaPart)}`\n );\n }\n\n if (\n elements &&\n valueType &&\n ![Type.Array, Type.Object].includes(valueType)\n ) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. ` +\n `Received ${JSON.stringify(valueType)}`\n );\n }\n }\n}\n\nfunction getConfigForModule(\n moduleName: string,\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): ConfigObject {\n if (!configState.schemas.hasOwnProperty(moduleName)) {\n throw Error(\"No config schema has been defined for \" + moduleName);\n }\n\n const schema = configState.schemas[moduleName];\n const inputConfig = mergeConfigsFor(\n moduleName,\n getProvidedConfigs(configState, tempConfigState)\n );\n validateConfig(schema, inputConfig, moduleName);\n const config = setDefaults(schema, inputConfig, configState.devDefaultsAreOn);\n delete config.extensionSlots;\n return config;\n}\n\nfunction mergeConfigsFor(\n moduleName: string,\n allConfigs: Array<Config>\n): ConfigObject {\n const allConfigsForModule = allConfigs\n .map(({ [moduleName]: c }) => c)\n .filter((c) => !!c);\n\n return mergeConfigs(allConfigsForModule);\n}\n\nfunction mergeConfigs(configs: Array<Config>) {\n const mergeDeepAll = reduce(mergeDeepRight);\n return mergeDeepAll({}, configs) as Config;\n}\n\n// Recursively check the provided config tree to make sure that all\n// of the provided properties exist in the schema. Run validators\n// where present in the schema.\nconst validateConfig = (\n schema: ConfigSchema,\n config: ConfigObject,\n keyPath = \"\"\n) => {\n for (const key of Object.keys(config)) {\n const value = config[key];\n const thisKeyPath = keyPath + \".\" + key;\n const schemaPart = schema[key] as ConfigSchema;\n\n if (!schema.hasOwnProperty(key)) {\n if (key !== \"extensionSlots\") {\n console.error(\n `Unknown config key '${thisKeyPath}' provided. Ignoring.`\n );\n }\n\n continue;\n }\n\n checkType(thisKeyPath, schemaPart._type, value);\n runValidators(thisKeyPath, schemaPart._validators, value);\n\n if (isOrdinaryObject(value)) {\n // structurally validate only if there's elements specified\n // or there's a `_default` value, which indicates a freeform object\n if (schemaPart._type === Type.Object) {\n validateDictionary(schemaPart, value, thisKeyPath);\n } else if (!schemaPart.hasOwnProperty(\"_default\")) {\n // recurse to validate nested object structure\n validateConfig(schemaPart, value, thisKeyPath);\n }\n } else {\n if (schemaPart._type === Type.Array) {\n validateArray(schemaPart, value, thisKeyPath);\n }\n }\n }\n};\n\nfunction validateDictionary(\n dictionarySchema: ConfigSchema,\n config: ConfigObject,\n keyPath: string\n) {\n if (dictionarySchema._elements) {\n for (const key of Object.keys(config)) {\n const value = config[key];\n validateConfig(dictionarySchema._elements, value, `${keyPath}.${key}`);\n }\n }\n}\n\nfunction validateArray(\n arraySchema: ConfigSchema,\n value: ConfigObject,\n keyPath: string\n) {\n // if there is an array element object schema, verify that elements match it\n if (hasObjectSchema(arraySchema._elements)) {\n for (let i = 0; i < value.length; i++) {\n validateConfig(arraySchema._elements, value[i], `${keyPath}[${i}]`);\n }\n }\n\n for (let i = 0; i < value.length; i++) {\n checkType(`${keyPath}[${i}]`, arraySchema._elements?._type, value[i]);\n runValidators(\n `${keyPath}[${i}]`,\n arraySchema._elements?._validators,\n value[i]\n );\n }\n}\n\nfunction checkType(keyPath: string, _type: Type | undefined, value: any) {\n if (_type) {\n const validator: Record<string, Function> = {\n Array: isArray,\n Boolean: isBoolean,\n ConceptUuid: isUuid,\n Number: isNumber,\n Object: isObject,\n String: isString,\n UUID: isUuid,\n PersonAttributeTypeUuid: isUuid,\n };\n runValidators(keyPath, [validator[_type]], value);\n }\n}\n\nfunction runValidators(\n keyPath: string,\n validators: Array<Function> | undefined,\n value: any\n) {\n if (validators) {\n try {\n for (let validator of validators) {\n const validatorResult = validator(value);\n\n if (typeof validatorResult === \"string\") {\n const valueString =\n typeof value === \"object\" ? JSON.stringify(value) : value;\n console.error(\n `Invalid configuration value ${valueString} for ${keyPath}: ${validatorResult}`\n );\n }\n }\n } catch (e) {\n console.error(`Skipping invalid validator at \"${keyPath}\".`);\n }\n }\n}\n\n// Recursively fill in the config with values from the schema.\nconst setDefaults = (\n schema: ConfigSchema,\n inputConfig: Config,\n devDefaultsAreOn: boolean\n) => {\n const config = clone(inputConfig);\n\n if (!schema) {\n return config;\n }\n\n for (const key of Object.keys(schema)) {\n const configPart = config[key];\n const schemaPart = schema[key] as ConfigSchema;\n\n // The `schemaPart &&` clause of this `if` statement will only fail\n // if the schema is very invalid. It is there to prevent the app from\n // crashing completely, though it will produce unexpected behavior.\n // If this happens, there should be legible errors in the console from\n // the schema validator.\n if (schemaPart && schemaPart.hasOwnProperty(\"_default\")) {\n // We assume that schemaPart defines a config value, since it has\n // a property `_default`.\n if (!config.hasOwnProperty(key)) {\n const devDefault = schemaPart[\"_devDefault\"] || schemaPart[\"_default\"];\n\n (config[key] as any) = devDefaultsAreOn\n ? devDefault\n : schemaPart[\"_default\"];\n }\n\n // We also check if it is an object or array with object elements, in which case we recurse\n const elements = schemaPart._elements;\n\n if (configPart && hasObjectSchema(elements)) {\n if (schemaPart._type === Type.Array) {\n const configWithDefaults = configPart.map((conf: Config) =>\n setDefaults(elements, conf, devDefaultsAreOn)\n );\n config[key] = configWithDefaults;\n } else if (schemaPart._type === Type.Object) {\n for (let objectKey of Object.keys(configPart)) {\n configPart[objectKey] = setDefaults(\n elements,\n configPart[objectKey],\n devDefaultsAreOn\n );\n }\n }\n }\n } else if (isOrdinaryObject(schemaPart)) {\n // Since schemaPart has no property \"_default\", if it's an ordinary object\n // (unlike, importantly, the validators array), we assume it is a parent config property.\n // We recurse to config[key] and schema[key]. Default config[key] to {}.\n const selectedConfigPart = config.hasOwnProperty(key) ? configPart : {};\n\n if (isOrdinaryObject(selectedConfigPart)) {\n config[key] = setDefaults(\n schemaPart,\n selectedConfigPart,\n devDefaultsAreOn\n );\n }\n }\n }\n\n return config;\n};\n\nfunction hasObjectSchema(\n elementsSchema: Object | undefined\n): elementsSchema is ConfigSchema {\n return (\n !!elementsSchema &&\n Object.keys(elementsSchema).filter(\n (e) => ![\"_default\", \"_validators\"].includes(e)\n ).length > 0\n );\n}\n\nfunction isOrdinaryObject(value) {\n return typeof value === \"object\" && !Array.isArray(value) && value !== null;\n}\n\n/**\n * Copied over from esm-extensions. It rightly belongs to that module, but esm-config\n * cannot depend on esm-extensions.\n */\nfunction getExtensionNameFromId(extensionId: string) {\n const [extensionName] = extensionId.split(\"#\");\n return extensionName;\n}\n","function trimTrailingSlash(str: string) {\n return str.replace(/\\/$/, \"\");\n}\n\n/**\n * Interpolates a string with openmrsBase and openmrsSpaBase.\n *\n * Useful for accepting `${openmrsBase}` or `${openmrsSpaBase}` template\n * parameters in configurable URLs.\n *\n * @param template A string to interpolate\n * @category Navigation\n */\nexport function interpolateUrl(template: string): string {\n const openmrsSpaBase = trimTrailingSlash(window.getOpenmrsSpaBase());\n return interpolateString(template, {\n openmrsBase: window.openmrsBase,\n openmrsSpaBase: openmrsSpaBase,\n }).replace(/^\\/\\//, \"/\"); // remove extra initial slash if present\n}\n\n/**\n * Interpolates values of `params` into the `template` string.\n *\n * Useful for additional template parameters in URLs.\n *\n * Example usage:\n * ```js\n * navigate({\n * to: interpolateString(\n * config.links.patientChart,\n * { patientUuid: patient.uuid }\n * )\n * });\n * ```\n *\n * @param template With optional params wrapped in `${ }`\n * @param params Values to interpolate into the string template\n * @category Navigation\n */\nexport function interpolateString(template: string, params: object): string {\n const names = Object.keys(params);\n return names.reduce(\n (prev, curr) => prev.split(\"${\" + curr + \"}\").join(params[curr]),\n template\n );\n}\n","import { navigateToUrl } from \"single-spa\";\nimport { interpolateUrl } from \"./interpolate-string\";\nimport type {} from \"@openmrs/esm-globals\";\n\nfunction trimTrailingSlash(str: string) {\n return str.replace(/\\/$/, \"\");\n}\n\nexport interface NavigateOptions {\n to: string;\n}\n\n/**\n * Calls `location.assign` for non-SPA paths and [navigateToUrl](https://single-spa.js.org/docs/api/#navigatetourl) for SPA paths\n *\n * Example usage:\n * ```js\n * const config = getConfig();\n * const submitHandler = () => {\n * navigate({ to: config.links.submitSuccess });\n * };\n * ```\n *\n * @param to The target path or URL. Supports templating with 'openmrsBase' and 'openmrsSpaBase'.\n * For example, `${openmrsSpaBase}/home` will resolve to `/openmrs/spa/home`\n * for implementations using the standard OpenMRS and SPA base paths.\n * @category Navigation\n */\nexport function navigate({ to }: NavigateOptions): void {\n const openmrsSpaBase = trimTrailingSlash(window.getOpenmrsSpaBase());\n const target = interpolateUrl(to);\n const isSpaPath = target.startsWith(openmrsSpaBase);\n\n if (isSpaPath) {\n navigateToUrl(target);\n } else {\n window.location.assign(target);\n }\n}\n","import { validator } from \"./validator\";\n\n/**\n * Verifies that the value is between the provided minimum and maximum\n *\n * @param min Minimum acceptable value\n * @param max Maximum acceptable value\n */\nexport const inRange = (min: number, max: number) => {\n return validator(\n (val) => min <= val && val <= max,\n `must be between ${min} and ${max}`\n );\n};\n\n/**\n * Verifies that a string contains only the default URL template\n * parameters, plus any specified in `allowedTemplateParameters`.\n *\n * @param allowedTemplateParameters To be added to `openmrsBase` and `openmrsSpaBase`\n * @category Navigation\n */\nexport const isUrlWithTemplateParameters = (\n allowedTemplateParameters: string[]\n) => {\n const allowedParams = allowedTemplateParameters.concat([\n \"openmrsBase\",\n \"openmrsSpaBase\",\n ]);\n return validator((val) => {\n if (!val || typeof val != \"string\") {\n return false;\n }\n\n const rx = /\\${(.*?)}/g;\n let match = rx.exec(val);\n\n while (match) {\n if (!allowedParams.includes(match[1])) {\n return false;\n }\n\n match = rx.exec(val);\n }\n\n return true;\n }, \"should be a URL or path. The allowed template parameters are \" + allowedParams.map((p) => \"${\" + p + \"}\").join(\", \"));\n};\n\n/**\n * Verifies that a string contains only the default URL template parameters.\n *\n * @category Navigation\n */\nexport const isUrl = isUrlWithTemplateParameters([]);\n\nexport const validators = {\n inRange,\n isUrl,\n isUrlWithTemplateParameters,\n};\n","const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","function n(n,t){for(var r in t)n[r]=t[r];return n}export default function(t){var r=[];function u(n){for(var t=[],u=0;u<r.length;u++)r[u]===n?n=null:t.push(r[u]);r=t}function e(u,e,f){t=e?u:n(n({},t),u);for(var i=r,o=0;o<i.length;o++)i[o](t,f)}return t=t||{},{action:function(n){function r(t){e(t,!1,n)}return function(){for(var u=arguments,e=[t],f=0;f<arguments.length;f++)e.push(u[f]);var i=n.apply(this,e);if(null!=i)return i.then?i.then(r):r(i)}},setState:e,subscribe:function(n){return r.push(n),function(){u(n)}},unsubscribe:u,getState:function(){return t}}}\n//# sourceMappingURL=unistore.es.js.map\n","import createStore, { Store } from \"unistore\";\n\ninterface StoreEntity {\n value: Store<any>;\n active: boolean;\n}\n\nconst availableStores: Record<string, StoreEntity> = {};\n\n/**\n * Creates a Unistore [store](https://github.com/developit/unistore#store).\n *\n * @param name A name by which the store can be looked up later.\n * Must be unique across the entire application.\n * @param initialState An object which will be the initial state of the store.\n * @returns The newly created store.\n */\nexport function createGlobalStore<TState>(\n name: string,\n initialState: TState\n): Store<TState> {\n const available = availableStores[name];\n\n if (available) {\n if (available.active) {\n console.error(\n \"Cannot override an existing store. Make sure that stores are only created once.\"\n );\n } else {\n available.value.setState(initialState, true);\n }\n\n available.active = true;\n return available.value;\n } else {\n const store = createStore(initialState);\n\n availableStores[name] = {\n value: store,\n active: true,\n };\n\n return store;\n }\n}\n\n/**\n * Returns the existing [store](https://github.com/developit/unistore#store) named `name`,\n * or creates a new store named `name` if none exists.\n *\n * @param name The name of the store to look up.\n * @param fallbackState The initial value of the new store if no store named `name` exists.\n * @returns The found or newly created store.\n */\nexport function getGlobalStore<TState = any>(\n name: string,\n fallbackState?: TState\n): Store<TState> {\n const available = availableStores[name];\n\n if (!available) {\n const store = createStore(fallbackState);\n availableStores[name] = {\n value: store,\n active: false,\n };\n return store;\n }\n\n return available.value;\n}\n\nexport interface AppState {}\n\n/**\n * @internal\n */\nexport function createAppState(initialState: AppState) {\n return createGlobalStore(\"app\", initialState);\n}\n\n/**\n * @returns The [store](https://github.com/developit/unistore#store) named `app`.\n */\nexport function getAppState() {\n return getGlobalStore<AppState>(\"app\", {});\n}\n\nexport function subscribeTo<T, U>(\n store: Store<T>,\n select: (state: T) => U,\n handle: (subState: U) => void\n) {\n let previous = select(store.getState());\n\n return store.subscribe((state) => {\n const current = select(state);\n\n if (current !== previous) {\n previous = current;\n handle(current);\n }\n });\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__45__;","module.exports = __WEBPACK_EXTERNAL_MODULE__954__;","module.exports = __WEBPACK_EXTERNAL_MODULE__493__;","module.exports = __WEBPACK_EXTERNAL_MODULE__792__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","/* The svg container is a div that contains all the OpenMRS svgs, with\n * an HTML id that can be referenced with the following code:\n * <svg role=\"img\">\n * <use link:href=\"#the-svg-id\"></use>\n * </svg>\n *\n * This approach is known as \"svg sprites\"\n */\nconst svgContainer = document.createElement(\"div\");\nconst appendContainer = () => {\n document.body.appendChild(svgContainer);\n};\nsvgContainer.id = \"omrs-svgs-container\";\nsvgContainer.style.display = \"none\";\n\nif (document.readyState === \"complete\") {\n appendContainer();\n} else {\n window.addEventListener(\"load\", appendContainer);\n}\n\nexport function addSvg(htmlId: string, svgString: string) {\n const domParser = new DOMParser();\n const dom = domParser.parseFromString(svgString, \"text/html\");\n const svgElement = dom.querySelector(\"svg\");\n\n if (svgElement) {\n svgElement.id = htmlId;\n svgContainer.appendChild(svgElement);\n }\n}\n","import React from \"react\";\nimport { render } from \"react-dom\";\nimport { Subject } from \"rxjs\";\nimport {\n InlineNotificationMeta,\n NotificationDescriptor,\n} from \"./notification.component\";\nimport ActiveNotifications from \"./active-notifications.component\";\nimport isEmpty from \"lodash-es/isEmpty\";\n\nconst inlineNotificationsSubject = new Subject<InlineNotificationMeta>();\nlet notificationId = 0;\n\n/**\n * Starts a rendering host for inline notifications. Should only be used by the app shell.\n * Under normal conditions there is no need to use this function.\n * @param target The container target that hosts the inline notifications.\n */\nexport function renderInlineNotifications(target: HTMLElement | null) {\n if (target) {\n render(\n <ActiveNotifications subject={inlineNotificationsSubject} />,\n target\n );\n }\n}\n\nfunction isNotEmpty(description: React.ReactNode) {\n return typeof description === \"string\"\n ? description.trim().length > 0\n : typeof description === \"object\"\n ? !isEmpty(description)\n : false;\n}\n\n/**\n * Displays an inline notification in the UI.\n * @param notification The description of the notification to display.\n */\nexport function showNotification(notification: NotificationDescriptor) {\n if (notification && isNotEmpty(notification.description)) {\n setTimeout(() => {\n // always use in subsequent cycle\n inlineNotificationsSubject.next({\n ...notification,\n id: notificationId++,\n });\n }, 0);\n } else {\n console.error(\n `showNotification must be called with an object having a 'description' property that is a non-empty string or object`\n );\n }\n}\n","import React from \"react\";\nimport { render } from \"react-dom\";\nimport { Subject } from \"rxjs\";\nimport { ToastDescriptor, ToastNotificationMeta } from \"./toast.component\";\nimport ActiveToasts from \"./active-toasts.component\";\nimport isEmpty from \"lodash-es/isEmpty\";\n\nconst toastsSubject = new Subject<ToastNotificationMeta>();\nlet toastId = 0;\n\n/**\n * Starts a rendering host for toast notifications. Should only be used by the app shell.\n * Under normal conditions there is no need to use this function.\n * @param target The container target that hosts the toast notifications.\n */\nexport function renderToasts(target: HTMLElement | null) {\n if (target) {\n render(<ActiveToasts subject={toastsSubject} />, target);\n }\n}\n\nfunction isNotEmpty(description: React.ReactNode) {\n return typeof description === \"string\"\n ? description.trim().length > 0\n : typeof description === \"object\"\n ? !isEmpty(description)\n : false;\n}\n\n/**\n * Displays a toast notification in the UI.\n * @param toast The description of the toast to display.\n */\nexport function showToast(toast: ToastDescriptor) {\n if (toast && isNotEmpty(toast.description)) {\n setTimeout(() => {\n // always use in subsequent cycle\n toastsSubject.next({\n ...toast,\n id: toastId++,\n });\n }, 0);\n } else {\n console.error(\n `showToast must be called with an object having a 'description' property that is a non-empty string or object`\n );\n }\n}\n","import { renderExtension } from \"@openmrs/esm-extensions\";\nimport { createGlobalStore } from \"@openmrs/esm-state\";\n\ntype ModalInstanceState = \"NEW\" | \"MOUNTED\" | \"TO_BE_DELETED\";\n\ninterface ModalInstance {\n container?: HTMLElement;\n state: ModalInstanceState;\n onClose: () => void;\n cleanup?: () => void;\n extensionId: string;\n props: Record<string, any>;\n}\n\ninterface ModalState {\n modalContainer: HTMLElement | null;\n modalStack: Array<ModalInstance>;\n}\n\nconst modalStore = createGlobalStore<ModalState>(\"globalModalState\", {\n modalContainer: null,\n modalStack: [],\n});\n\nfunction htmlToElement(html: string) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.firstChild as ChildNode;\n}\n\nfunction createModalFrame() {\n const closeButton = htmlToElement(\n `\n <button\n class=\"bx--modal-close\"\n type=\"button\">\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><defs><style>.cls-1{fill:#000000;}.cls-2{fill:none;}</style></defs><title>close</title><polygon class=\"cls-1\" points=\"24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4\"/><rect class=\"cls-2\" width=\"32\" height=\"32\"/></svg>\n </button>`.trim()\n ) as HTMLButtonElement;\n\n closeButton.addEventListener(\"click\", closeHighestInstance);\n const outer = document.createElement(\"div\");\n outer.className = \"bx--modal-container\";\n const contentContainer = document.createElement(\"div\");\n\n outer.append(closeButton);\n outer.append(contentContainer);\n\n return { outer, contentContainer };\n}\n\nconst original = window.getComputedStyle(document.body).overflow;\n\nfunction handleModalStateUpdate({ modalStack, modalContainer }: ModalState) {\n if (!modalContainer) return;\n\n if (modalStack.length) {\n // spin up the container if it was hidden previously\n if (!modalContainer.style.visibility) {\n addEventListener(\"keydown\", handleEscKey);\n document.body.style.overflow = \"hidden\";\n modalContainer.style.visibility = \"unset\";\n }\n\n modalStack.forEach((instance, index) => {\n switch (instance.state) {\n case \"NEW\":\n const { outer, contentContainer } = createModalFrame();\n instance.container = outer;\n instance.cleanup = renderExtension(\n contentContainer,\n \"\",\n \"\",\n instance.extensionId,\n undefined,\n instance.props\n );\n instance.state = \"MOUNTED\";\n modalContainer.prepend(outer);\n outer.style.visibility = \"unset\";\n break;\n\n case \"MOUNTED\":\n if (instance.container) {\n instance.container.style.visibility = index ? \"hidden\" : \"unset\";\n }\n break;\n\n case \"TO_BE_DELETED\":\n instance.onClose();\n instance.cleanup?.();\n instance.container?.remove();\n setTimeout(() => {\n modalStore.setState({\n modalContainer,\n modalStack: modalStack.filter((x) => x !== instance),\n });\n }, 0);\n break;\n }\n });\n } else {\n modalContainer.style.removeProperty(\"visibility\");\n document.body.style.overflow = original;\n removeEventListener(\"keydown\", handleEscKey);\n }\n}\n\nexport function renderModals(modalContainer: HTMLElement | null) {\n if (modalContainer) {\n modalStore.subscribe(handleModalStateUpdate);\n\n modalStore.setState({\n ...modalStore.getState(),\n modalContainer,\n });\n }\n}\nfunction openInstance(instance: ModalInstance) {\n const state = modalStore.getState();\n const modalStack = [instance, ...state.modalStack];\n\n modalStore.setState({\n ...state,\n modalStack,\n });\n}\n\nfunction closeInstance(instance: ModalInstance) {\n const state = modalStore.getState();\n const modalStack = state.modalStack.map(\n (x): ModalInstance =>\n x === instance ? { ...x, state: \"TO_BE_DELETED\" } : x\n );\n modalStore.setState({\n ...state,\n modalStack,\n });\n}\n\nfunction closeHighestInstance() {\n const state = modalStore.getState();\n const [top] = state.modalStack;\n\n if (top) {\n closeInstance(top);\n }\n}\n\nfunction handleEscKey(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n closeHighestInstance();\n }\n}\n\n/**\n * Shows the provided extension component in a modal dialog.\n * @param extensionId The id of the extension to show.\n * @param props The optional props to provide to the extension.\n * @param onClose The optional notification to receive when the modal is closed.\n * @returns The dispose function to force closing the modal dialog.\n */\nexport function showModal(\n extensionId: string,\n props: Record<string, any> = {},\n onClose: () => void = () => {}\n) {\n const close = () => {\n const state = modalStore.getState();\n const item = state.modalStack.find((m) => m.onClose === onClose);\n\n if (item) {\n closeInstance(item);\n }\n };\n\n openInstance({\n state: \"NEW\",\n onClose,\n extensionId,\n props: {\n extensionId,\n close,\n ...props,\n },\n });\n\n return close;\n}\n","import { defineConfigSchema, getConfigStore, Type } from \"@openmrs/esm-config\";\n\nexport function setupBranding() {\n defineConfigSchema(\"@openmrs/esm-styleguide\", {\n \"Brand color #1\": {\n _default: \"#005d5d\",\n _type: Type.String,\n },\n \"Brand color #2\": {\n _default: \"#004144\",\n _type: Type.String,\n },\n \"Brand color #3\": {\n _default: \"#007d79\",\n _type: Type.String,\n },\n });\n\n getConfigStore(\"@openmrs/esm-styleguide\").subscribe((store) => {\n if (store.loaded && store.config) {\n setGlobalCSSVariable(\"--brand-01\", store.config[\"Brand color #1\"]);\n setGlobalCSSVariable(\"--brand-02\", store.config[\"Brand color #2\"]);\n setGlobalCSSVariable(\"--brand-03\", store.config[\"Brand color #3\"]);\n }\n });\n\n function setGlobalCSSVariable(name: string, value: string) {\n document.documentElement.style.setProperty(name, value);\n }\n}\n","import { setupLogo } from \"./logo\";\nimport { setupIcons } from \"./icons\";\nimport { setupBranding } from \"./brand\";\n\nexport * from \"./breakpoints\";\nexport * from \"./spinner\";\nexport * from \"./notifications\";\nexport * from \"./toasts\";\nexport * from \"./modals\";\n\nsetupBranding();\nsetupLogo();\nsetupIcons();\n","/// <reference path=\"../declarations.d.ts\" />\n\nimport fullLogo from \"./openmrs-logo-full.svg\";\nimport partialLogo from \"./openmrs-logo-partial.svg\";\nimport iconLogo from \"./openmrs-logo-icon.svg\";\nimport whiteLogo from \"./openmrs-logo-white.svg\";\nimport { addSvg } from \"../svg-utils\";\n\nexport function setupLogo() {\n addSvg(\"omrs-logo-full-color\", fullLogo);\n addSvg(\"omrs-logo-full-mono\", fullLogo);\n addSvg(\"omrs-logo-full-grey\", fullLogo);\n addSvg(\"omrs-logo-partial-color\", partialLogo);\n addSvg(\"omrs-logo-partial-mono\", partialLogo);\n addSvg(\"omrs-logo-partial-grey\", partialLogo);\n addSvg(\"omrs-logo-icon-color\", iconLogo);\n addSvg(\"omrs-logo-icon-mono\", iconLogo);\n addSvg(\"omrs-logo-icon-grey\", iconLogo);\n addSvg(\"omrs-logo-white\", whiteLogo);\n}\n","/// <reference path=\"../declarations.d.ts\" />\n\nimport visibility from \"./svgs/visibility_24px_rounded.svg\";\nimport menu from \"./svgs/menu_24px_rounded.svg\";\nimport search from \"./svgs/search_24px_rounded.svg\";\nimport arrow_back from \"./svgs/arrow_back_24px_rounded.svg\";\nimport arrow_forward from \"./svgs/arrow_forward_24px.svg\";\nimport arrow_downward from \"./svgs/arrow_downward_24px_rounded.svg\";\nimport arrow_upward from \"./svgs/arrow_upward_24px_rounded.svg\";\nimport chevron_left from \"./svgs/chevron_left_24px_rounded.svg\";\nimport chevron_right from \"./svgs/chevron_right_24px_rounded.svg\";\nimport chevron_up from \"./svgs/chevron_up_24px_rounded.svg\";\nimport chevron_down from \"./svgs/chevron_down-24px_rounded.svg\";\nimport user from \"./svgs/supervised_user_circle_24px_rounded.svg\";\nimport home from \"./svgs/home_24px_rounded.svg\";\nimport close from \"./svgs/close-24px.svg\";\nimport notification from \"./svgs/important_notification_24px_rounded.svg\";\nimport calendar from \"./svgs/calendar_24px_rounded.svg\";\nimport time from \"./svgs/access_time-24px_rounded.svg\";\nimport add from \"./svgs/add_24px_rounded.svg\";\nimport remove from \"./svgs/remove-24px_rounded.svg\";\nimport check from \"./svgs/check_circle-24px.svg\";\nimport zoom from \"./svgs/zoom_out_map_24px_rounded.svg\";\nimport location from \"./svgs/location-24px.svg\";\nimport download from \"./svgs/download_24px_rounded.svg\";\nimport { addSvg } from \"../svg-utils\";\n\nexport function setupIcons() {\n addSvg(\"omrs-icon-visibility\", visibility);\n addSvg(\"omrs-icon-menu\", menu);\n addSvg(\"omrs-icon-search\", search);\n addSvg(\"omrs-icon-arrow-back\", arrow_back);\n addSvg(\"omrs-icon-arrow-forward\", arrow_forward);\n addSvg(\"omrs-icon-arrow-downward\", arrow_downward);\n addSvg(\"omrs-icon-arrow-upward\", arrow_upward);\n addSvg(\"omrs-icon-chevron-left\", chevron_left);\n addSvg(\"omrs-icon-chevron-right\", chevron_right);\n addSvg(\"omrs-icon-chevron-up\", chevron_up);\n addSvg(\"omrs-icon-chevron-down\", chevron_down);\n addSvg(\"omrs-icon-supervised-user-circle\", user);\n addSvg(\"omrs-icon-home\", home);\n addSvg(\"omrs-icon-close\", close);\n addSvg(\"omrs-icon-important-notification\", notification);\n addSvg(\"omrs-icon-calendar\", calendar);\n addSvg(\"omrs-icon-access-time\", time);\n addSvg(\"omrs-icon-add\", add);\n addSvg(\"omrs-icon-remove\", remove);\n addSvg(\"omrs-icon-check-circle\", check);\n addSvg(\"omrs-icon-zoomoutmap\", zoom);\n addSvg(\"omrs-icon-location\", location);\n addSvg(\"omrs-icon-download\", download);\n}\n"],"names":["resolveDirectory","require","exports","rootDirLevel","__system_context__","meta","url","console","error","Error","__webpack_public_path__","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","_arity","n","bind","fn","thisObj","apply","arguments","module","_clone","clone","value","_curry2","_equals","equals","b","this","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","iter","next","list","done","push","_cloneRegExp","type","refFrom","refTo","deep","copy","copiedValue","len","idx","key","Date","valueOf","pattern","RegExp","source","global","ignoreCase","multiline","sticky","unicode","_isPlaceholder","f1","_curry1","f2","_b","_a","f3","c","_c","_arrayFromIterator","_includesWith","_functionName","_has","_objectIs","keys","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","aItem","typeA","constructor","name","message","size","entries","concat","values","keysA","extendedStackA","extendedStackB","f","match","String","prop","obj","Object","prototype","hasOwnProperty","call","pred","x","toString","_isArguments","Array","isArray","val","_isArray","_isString","_isArrayLike","nodeType","is","_xwrap","_iterableReduce","xf","acc","step","_methodReduce","methodName","symIterator","Symbol","iterator","reduce","TypeError","XWrap","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","item","nIdx","ks","checkArgsLength","mergeDeepWithKey","mergeDeepRight","lObj","rObj","k","lVal","rVal","_curry3","_isObject","mergeWithKey","l","r","result","__WEBPACK_EXTERNAL_MODULE__685__","__WEBPACK_EXTERNAL_MODULE__645__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","default","e","d","definition","o","defineProperty","enumerable","get","toStringTag","Type","validator","validationFunction","isBoolean","isNumber","isString","isObject","isUuid","test","configInternalStoreInitialValue","providedConfigs","schemas","devDefaultsAreOn","getAreDevDefaultsOn","configInternalStore","createGlobalStore","lastValueOfDevDefaultsAreOn","JSON","parse","localStorage","getItem","subscribe","state","setItem","stringify","temporaryConfigStore","config","configExtensionStore","mountedExtensions","getConfigStore","moduleName","getGlobalStore","loaded","getExtensionSlotsConfigStore","slots","getExtensionSlotConfig","slotName","getExtensionSlotConfigFromStore","getState","getExtensionsConfigStore","configs","getExtensionConfig","extensionId","getExtensionConfigFromStore","extensionConfig","implementerToolsConfigStore","computeModuleConfig","tempState","getConfigForModule","setState","computeExtensionSlotConfigs","slotConfigs","configState","tempConfigState","allConfigs","mergeConfigs","getProvidedConfigs","slotConfigPerModule","extensionSlots","configBySlotName","validateExtensionSlotConfig","newSlotStoreEntries","fromEntries","map","slotStore","oldState","newState","u","computeImplementerToolsConfig","getSchemaWithValuesAndSources","i","configsAndSources","createValuesAndSourcesTree","computeExtensionConfigs","extensionState","extension","computeExtensionConfig","slotModuleName","extensionModuleName","defineConfigSchema","schema","validateConfigSchema","defineExtensionConfigSchema","extensionName","warn","provide","sourceName","getConfig","Promise","resolve","store","update","unsubscribe","processConfig","providedConfig","keyPathContext","validateConfig","setDefaults","split","extensionConfigSchema","nameOfSchemaSource","configOverride","mergeConfigsFor","configure","combinedConfig","_value","_default","_source","isOrdinaryObject","errorPrefix","invalidKeys","filter","includes","join","add","every","remove","order","keyPath","updateMessage","startsWith","thisKeyPath","schemaPart","elements","_elements","hasObjectSchema","_validators","valueType","_type","inputConfig","t","checkType","runValidators","validateDictionary","validateArray","dictionarySchema","arraySchema","Boolean","ConceptUuid","UUID","PersonAttributeTypeUuid","validators","validatorResult","valueString","configPart","devDefault","_devDefault","configWithDefaults","conf","objectKey","selectedConfigPart","elementsSchema","interpolateUrl","template","openmrsSpaBase","window","getOpenmrsSpaBase","replace","interpolateString","openmrsBase","params","prev","curr","navigate","to","target","navigateToUrl","location","assign","inRange","min","max","isUrlWithTemplateParameters","allowedTemplateParameters","allowedParams","rx","exec","p","isUrl","s","R","y","g","globalThis","Function","scriptUrl","importScripts","currentScript","src","scripts","getElementsByTagName","action","then","availableStores","initialState","available","active","createStore","fallbackState","createAppState","getAppState","subscribeTo","select","handle","previous","current","__WEBPACK_EXTERNAL_MODULE__45__","__WEBPACK_EXTERNAL_MODULE__954__","__WEBPACK_EXTERNAL_MODULE__493__","__WEBPACK_EXTERNAL_MODULE__792__","undefined","autoPublicPath","svgContainer","appendContainer","body","appendChild","addSvg","htmlId","svgString","svgElement","DOMParser","parseFromString","querySelector","id","style","display","readyState","addEventListener","Subject","modalContainer","modalStack","getComputedStyle","overflow","setGlobalCSSVariable","documentElement","setProperty","setupBranding","fullLogo","partialLogo","iconLogo","whiteLogo","visibility","menu","search","arrow_back","arrow_forward","arrow_downward","arrow_upward","chevron_left","chevron_right","chevron_up","chevron_down","user","home","close","notification","calendar","time","check","zoom","download"],"sourceRoot":""}
1
+ {"version":3,"file":"openmrs-esm-styleguide.js","mappings":"uPAAA,MAAMA,EAAmBC,EAAAA,KAAAA,EAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUVC,EAAAA,EAAmBC,OAASD,EAAAA,EAAmBC,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsBJ,EAAAA,GAC9BK,MACJ,uHAIJC,EAAAA,EAA0BV,EACxBI,EAAAA,EAAmBC,KAAKC,IACxBH,K,cCuDND,EAAQ,EAlCR,SAA0BS,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS,GAAaJ,EAAEI,SAAW,IAAMJ,EAAEI,SACxDC,EAAmB,EACrBC,EAAQF,EAASG,OACZF,IAAqBN,GAAsBO,GAAS,GAE5C,MADFF,IAAWE,IAEpBD,IAIJ,GAAIA,IAAqBN,EACvB,MAAMH,MACJ,iDACEG,EACA,gDACAM,EACA,qBACAP,GAIN,IAAIU,EAAYJ,EAASK,MAAM,EAAGH,EAAQ,GAE1C,OAAON,EAAEU,SAAW,KAAOV,EAAEW,KAAOH,GAOpCI,OAAOC,W,+RClFT,IAAIC,EAAsBC,EAAQ,KA4B9BC,EA1BuBD,EAAQ,IAARA,EA0BK,SAAcE,EAAIC,GAChD,OAAOJ,EAAOG,EAAGV,QAAQ,WACvB,OAAOU,EAAGE,MAAMD,EAASE,iBAG7BC,EAAOhC,QAAU2B,G,cCjCjB,IAAIM,EAAsB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O,kBAAmBsC,GAC1BtC,EAAO,mCAAoCuC,GAC3CvC,EAAO,qBAAsBwC,GAC7BxC,EAAO,wBAAyByC,GAChCzC,EAAO,gBAAiBtG,GACxBsG,EAAO,mBAAoBpG,GAC3BoG,EAAO,yBAA0B0C,GACjC1C,EAAO,uBAAwB2C,GAC/B3C,EAAO,qBAAsBjD,GAC7BiD,EAAO,qBAAsB4C,I","sources":["webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/bind.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/clone.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/equals.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_arity.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_arrayFromIterator.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_clone.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_cloneRegExp.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry1.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry2.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_curry3.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_equals.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_functionName.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_has.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_includesWith.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArguments.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArray.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isArrayLike.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isObject.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isPlaceholder.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_isString.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_objectIs.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_reduce.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/internal/_xwrap.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/keys.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeDeepRight.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeDeepWithKey.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/mergeWithKey.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/reduce.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/../../../node_modules/ramda/src/type.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/external system \"@openmrs/esm-state\"","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/external system \"single-spa\"","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/bootstrap","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/compat get default export","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/define property getters","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/types.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/validator.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/type-validators.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/module-config/state.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/module-config/module-config.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/navigation/interpolate-string.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/navigation/navigate.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-config/./src/validators/validators.ts","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/bootstrap","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/__system_context__","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/define property getters","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/global","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/webpack/runtime/publicPath","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/../../../node_modules/unistore/dist/unistore.es.js","webpack://@openmrs/esm-styleguide/@openmrs/esm-state/./src/state.ts","webpack://@openmrs/esm-styleguide/external system \"@openmrs/esm-extensions\"","webpack://@openmrs/esm-styleguide/external system \"react\"","webpack://@openmrs/esm-styleguide/external system \"react-dom\"","webpack://@openmrs/esm-styleguide/external system \"rxjs\"","webpack://@openmrs/esm-styleguide/webpack/bootstrap","webpack://@openmrs/esm-styleguide/webpack/runtime/__system_context__","webpack://@openmrs/esm-styleguide/webpack/runtime/global","webpack://@openmrs/esm-styleguide/webpack/runtime/make namespace object","webpack://@openmrs/esm-styleguide/webpack/runtime/publicPath","webpack://@openmrs/esm-styleguide/../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-styleguide/./src/svg-utils.ts","webpack://@openmrs/esm-styleguide/./src/notifications/index.tsx","webpack://@openmrs/esm-styleguide/./src/toasts/index.tsx","webpack://@openmrs/esm-styleguide/./src/modals/index.tsx","webpack://@openmrs/esm-styleguide/./src/brand.ts","webpack://@openmrs/esm-styleguide/./src/index.ts","webpack://@openmrs/esm-styleguide/./src/logo/index.ts","webpack://@openmrs/esm-styleguide/./src/icons/index.ts"],"sourcesContent":["const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\n\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nmodule.exports = bind;","var _clone = /*#__PURE__*/require('./internal/_clone');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Creates a deep copy of the value which may contain (nested) `Array`s and\n * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are\n * assigned by reference rather than copied\n *\n * Dispatches to a `clone` method if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n * const objects = [{}, {}, {}];\n * const objectsClone = R.clone(objects);\n * objects === objectsClone; //=> false\n * objects[0] === objectsClone[0]; //=> false\n */\n\n\nvar clone = /*#__PURE__*/_curry1(function clone(value) {\n return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);\n});\nmodule.exports = clone;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _equals = /*#__PURE__*/require('./internal/_equals');\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\n\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nmodule.exports = equals;","function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}\nmodule.exports = _arity;","function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}\nmodule.exports = _arrayFromIterator;","var _cloneRegExp = /*#__PURE__*/require('./_cloneRegExp');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\n\n\nfunction _clone(value, refFrom, refTo, deep) {\n var copy = function copy(copiedValue) {\n var len = refFrom.length;\n var idx = 0;\n while (idx < len) {\n if (value === refFrom[idx]) {\n return refTo[idx];\n }\n idx += 1;\n }\n refFrom[idx + 1] = value;\n refTo[idx + 1] = copiedValue;\n for (var key in value) {\n copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n }\n return copiedValue;\n };\n switch (type(value)) {\n case 'Object':\n return copy({});\n case 'Array':\n return copy([]);\n case 'Date':\n return new Date(value.valueOf());\n case 'RegExp':\n return _cloneRegExp(value);\n default:\n return value;\n }\n}\nmodule.exports = _clone;","function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}\nmodule.exports = _cloneRegExp;","var _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\nmodule.exports = _curry1;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\nmodule.exports = _curry2;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\nmodule.exports = _curry3;","var _arrayFromIterator = /*#__PURE__*/require('./_arrayFromIterator');\n\nvar _includesWith = /*#__PURE__*/require('./_includesWith');\n\nvar _functionName = /*#__PURE__*/require('./_functionName');\n\nvar _has = /*#__PURE__*/require('./_has');\n\nvar _objectIs = /*#__PURE__*/require('./_objectIs');\n\nvar keys = /*#__PURE__*/require('../keys');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}\nmodule.exports = _equals;","function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}\nmodule.exports = _functionName;","function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nmodule.exports = _has;","function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}\nmodule.exports = _includesWith;","var _has = /*#__PURE__*/require('./_has');\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nmodule.exports = _isArguments;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nmodule.exports = Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isString = /*#__PURE__*/require('./_isString');\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\n\n\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nmodule.exports = _isArrayLike;","function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\nmodule.exports = _isObject;","function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\nmodule.exports = _isPlaceholder;","function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}\nmodule.exports = _isString;","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nmodule.exports = typeof Object.is === 'function' ? Object.is : _objectIs;","var _isArrayLike = /*#__PURE__*/require('./_isArrayLike');\n\nvar _xwrap = /*#__PURE__*/require('./_xwrap');\n\nvar bind = /*#__PURE__*/require('../bind');\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nfunction _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}\nmodule.exports = _reduce;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nfunction _xwrap(fn) {\n return new XWrap(fn);\n}\nmodule.exports = _xwrap;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\nvar _isArguments = /*#__PURE__*/require('./internal/_isArguments');\n\n// cover IE < 9 keys issues\n\n\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nmodule.exports = keys;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar mergeDeepWithKey = /*#__PURE__*/require('./mergeDeepWithKey');\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\n\n\nvar mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\nmodule.exports = mergeDeepRight;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _isObject = /*#__PURE__*/require('./internal/_isObject');\n\nvar mergeWithKey = /*#__PURE__*/require('./mergeWithKey');\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n * recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n * using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeDeepWithKey(concatValues,\n * { a: true, c: { thing: 'foo', values: [10, 20] }},\n * { b: true, c: { thing: 'bar', values: [15, 35] }});\n * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\n\n\nvar mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) {\n return mergeWithKey(function (k, lVal, rVal) {\n if (_isObject(lVal) && _isObject(rVal)) {\n return mergeDeepWithKey(fn, lVal, rVal);\n } else {\n return fn(k, lVal, rVal);\n }\n }, lObj, rObj);\n});\nmodule.exports = mergeDeepWithKey;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.merge, R.mergeWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeWithKey(concatValues,\n * { a: true, thing: 'foo', values: [10, 20] },\n * { b: true, thing: 'bar', values: [15, 35] });\n * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\n\n\nvar mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) {\n var result = {};\n var k;\n\n for (k in l) {\n if (_has(k, l)) {\n result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];\n }\n }\n\n for (k in r) {\n if (_has(k, r) && !_has(k, result)) {\n result[k] = r[k];\n }\n }\n\n return result;\n});\nmodule.exports = mergeWithKey;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\n\nvar reduce = /*#__PURE__*/_curry3(_reduce);\nmodule.exports = reduce;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\n\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nmodule.exports = type;","module.exports = __WEBPACK_EXTERNAL_MODULE__685__;","module.exports = __WEBPACK_EXTERNAL_MODULE__645__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export enum Type {\n Array = \"Array\",\n Boolean = \"Boolean\",\n ConceptUuid = \"ConceptUuid\",\n Number = \"Number\",\n Object = \"Object\",\n String = \"String\",\n UUID = \"UUID\",\n PersonAttributeTypeUuid = \"PersonAttributeTypeUuid\",\n}\n\n// Full-powered typing for Config and Schema trees depends on being able to\n// have types like `string not \"_default\"`. There is an experimental PR\n// for this feature, https://github.com/microsoft/TypeScript/pull/29317\n// But it is not likely to be merged any time terribly soon. (Nov 11, 2020)\nexport interface ConfigSchema {\n [key: string]: ConfigSchema | ConfigValue;\n _type?: Type;\n _validators?: Array<Validator>;\n _elements?: ConfigSchema;\n}\n\nexport interface Config extends Object {\n [moduleName: string]: { [key: string]: any };\n}\n\nexport interface ConfigObject extends Object {\n [key: string]: any;\n}\n\nexport type ConfigValue =\n | string\n | number\n | boolean\n | void\n | Array<any>\n | object;\n\nexport interface ExtensionSlotConfig {\n add?: Array<string>;\n remove?: Array<string>;\n order?: Array<string>;\n configure?: ExtensionSlotConfigureValueObject;\n}\n\nexport interface ExtensionSlotConfigureValueObject {\n [key: string]: object;\n}\n\nexport interface ExtensionSlotConfigObject {\n /** Additional extension IDs to assign to this slot, in addition to those `attach`ed in code. */\n add?: Array<string>;\n /** Extension IDs which were `attach`ed to the slot but which should not be assigned. */\n remove?: Array<string>;\n /** Overrides the default ordering of extensions. */\n order?: Array<string>;\n}\n\nexport type ProvidedConfig = {\n source: string;\n config: Config;\n};\n\nexport type ValidatorFunction = (value: any) => boolean;\n\nexport type Validator = (value: any) => void | string;\n","/** @module @category Config Validation */\nimport { Validator, ValidatorFunction } from \"../types\";\n\nexport function validator(\n validationFunction: ValidatorFunction,\n message: string\n): Validator {\n return (value) => {\n if (!validationFunction(value)) {\n return message;\n }\n };\n}\n","import { validator } from \"./validator\";\n\nexport const isArray = validator(\n (val) => Array.isArray(val),\n \"must be an array\"\n);\n\nexport const isBoolean = validator(\n (val) => typeof val === \"boolean\",\n \"must be a boolean\"\n);\n\nexport const isNumber = validator(\n (val) => typeof val === \"number\",\n \"must be a number\"\n);\n\nexport const isString = validator(\n (val) => typeof val === \"string\",\n \"must be a string\"\n);\n\nexport const isObject = validator(\n (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null,\n \"must be an object (not an array or null)\"\n);\n\nexport const isUuid = validator(\n (val) =>\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n val\n ) || /^[0-9a-f]{36}$/i.test(val),\n \"must be a valid UUID or a 36-character hexadecimal string\"\n);\n","/** @module @category Config */\nimport { createGlobalStore, getGlobalStore } from \"@openmrs/esm-state\";\nimport {\n Config,\n ConfigObject,\n ConfigSchema,\n ExtensionSlotConfigObject,\n ProvidedConfig,\n} from \"../types\";\n\n/**\n * Internal store\n * A store of the inputs and internal state\n * @internal\n */\nexport interface ConfigInternalStore {\n /** Configs added using the `provide` function */\n providedConfigs: Array<ProvidedConfig>;\n /** An object with module names for keys and schemas for values */\n schemas: Record<string, ConfigSchema>;\n /** Whether to use dev defaults or not */\n devDefaultsAreOn: boolean;\n}\n\nconst configInternalStoreInitialValue = {\n providedConfigs: [],\n schemas: {},\n devDefaultsAreOn: getAreDevDefaultsOn(),\n};\n\n/**\n * @internal\n */\nexport const configInternalStore = createGlobalStore<ConfigInternalStore>(\n \"config-internal\",\n configInternalStoreInitialValue\n);\n\nlet lastValueOfDevDefaultsAreOn = getAreDevDefaultsOn();\nconfigInternalStore.subscribe((state) => {\n if (state.devDefaultsAreOn != lastValueOfDevDefaultsAreOn) {\n setAreDevDefaultsOn(state.devDefaultsAreOn);\n lastValueOfDevDefaultsAreOn = state.devDefaultsAreOn;\n }\n});\n\nfunction setAreDevDefaultsOn(value: boolean) {\n localStorage.setItem(\"openmrs:configAreDevDefaultsOn\", JSON.stringify(value));\n}\n\nfunction getAreDevDefaultsOn(): boolean {\n try {\n return JSON.parse(\n localStorage.getItem(\"openmrs:configAreDevDefaultsOn\") || \"false\"\n );\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Temporary config\n * LocalStorage-based config used by the implementer tools\n * @internal\n */\nexport interface TemporaryConfigStore {\n config: Config;\n}\n\n/** @internal */\nexport const temporaryConfigStore = createGlobalStore<TemporaryConfigStore>(\n \"temporary-config\",\n { config: getTemporaryConfig() }\n);\n\ntemporaryConfigStore.subscribe((state) => {\n setTemporaryConfig(state.config);\n});\n\nfunction setTemporaryConfig(value: Config) {\n localStorage.setItem(\"openmrs:temporaryConfig\", JSON.stringify(value));\n}\n\nfunction getTemporaryConfig(): Config {\n try {\n return JSON.parse(localStorage.getItem(\"openmrs:temporaryConfig\") || \"{}\");\n } catch (e) {\n return {};\n }\n}\n\n/**\n * Config-side extension store\n * Just what esm-config needs to know about extension state. This\n * is to avoid having esm-config depend on esm-extensions, which would\n * create a circular dependency.\n * @internal\n */\nexport interface ConfigExtensionStore {\n mountedExtensions: Array<ConfigExtensionStoreElement>;\n}\n\n/** @internal */\nexport interface ConfigExtensionStoreElement {\n slotModuleName: string;\n extensionModuleName: string;\n slotName: string;\n extensionId: string;\n}\n\n/** @internal */\nexport const configExtensionStore = createGlobalStore<ConfigExtensionStore>(\n \"config-store-of-extension-state\",\n { mountedExtensions: [] }\n);\n\n/**\n * Output configs\n *\n * Each module has its own stores for its config and its extension slots' configs.\n * @internal\n */\nexport interface ConfigStore {\n config: ConfigObject | null;\n loaded: boolean;\n}\n\nfunction initializeConfigStore() {\n return {\n config: null,\n loaded: false,\n };\n}\n\n/** @internal */\nexport function getConfigStore(moduleName: string) {\n // We use a store for each module's config, named `config-${moduleName}`\n return getGlobalStore<ConfigStore>(\n `config-module-${moduleName}`,\n initializeConfigStore()\n );\n}\n\n/**\n * Configuration for all the specific extension slots\n * @internal\n */\nexport interface ExtensionSlotsConfigStore {\n slots: {\n [slotName: string]: {\n config: ExtensionSlotConfigObject;\n loaded: boolean;\n };\n };\n}\n\n/** @internal */\nexport function getExtensionSlotsConfigStore() {\n return getGlobalStore<ExtensionSlotsConfigStore>(`config-extension-slots`, {\n slots: {},\n });\n}\n\n/** @internal */\nexport function getExtensionSlotConfig(slotName: string) {\n return getExtensionSlotConfigFromStore(\n getExtensionSlotsConfigStore().getState(),\n slotName\n );\n}\n\n/** @internal */\nexport function getExtensionSlotConfigFromStore(\n state: ExtensionSlotsConfigStore,\n slotName: string\n) {\n const slotConfig = state.slots[slotName];\n return slotConfig ?? { loaded: false, config: {} };\n}\n\n/** @internal */\nexport interface ExtensionsConfigStore {\n configs: {\n [slotName: string]: {\n [extensionId: string]: ConfigStore;\n };\n };\n}\n\n/**\n * One store for all the extensions\n * @internal\n */\nexport function getExtensionsConfigStore() {\n return getGlobalStore<ExtensionsConfigStore>(`config-extensions`, {\n configs: {},\n });\n}\n\n/** @internal */\nexport function getExtensionConfig(slotName: string, extensionId: string) {\n return getExtensionConfigFromStore(\n getExtensionsConfigStore().getState(),\n slotName,\n extensionId\n );\n}\n\n/** @internal */\nexport function getExtensionConfigFromStore(\n state: ExtensionsConfigStore,\n slotName: string,\n extensionId: string\n) {\n const extensionConfig = state.configs[slotName]?.[extensionId];\n return extensionConfig ?? { loaded: false, config: null };\n}\n\n/**\n * A store of the implementer tools output config\n * @internal\n */\nexport interface ImplementerToolsConfigStore {\n config: Config;\n}\n\n/** @internal */\nexport const implementerToolsConfigStore =\n createGlobalStore<ImplementerToolsConfigStore>(\"config-implementer-tools\", {\n config: {},\n });\n","/** @module @category Config */\nimport { clone, reduce, mergeDeepRight, equals } from \"ramda\";\nimport {\n Config,\n ConfigObject,\n ConfigSchema,\n ExtensionSlotConfig,\n ExtensionSlotConfigObject,\n Type,\n} from \"../types\";\nimport {\n isArray,\n isBoolean,\n isUuid,\n isNumber,\n isObject,\n isString,\n} from \"../validators/type-validators\";\nimport {\n ConfigExtensionStore,\n ConfigInternalStore,\n configInternalStore,\n ConfigStore,\n configExtensionStore,\n getConfigStore,\n getExtensionsConfigStore,\n implementerToolsConfigStore,\n temporaryConfigStore,\n getExtensionSlotsConfigStore,\n ExtensionsConfigStore,\n} from \"./state\";\nimport type {} from \"@openmrs/esm-globals\";\nimport { TemporaryConfigStore } from \"..\";\n\n/**\n * Store setup\n *\n *\n * Set up stores and subscriptions so that inputs get processed appropriately.\n *\n * There are *input* stores and *output* stores. The *input* stores\n * are configInternalStore, temporaryConfigStore, and configExtensionStore. The\n * output stores are set in the `compute...` functions. They are the module\n * config stores, the extension slot config stores (by module), the extension\n * config stores, and the implementer tools config store.\n *\n * This code sets up the subscriptions so that when an input store changes,\n * the correct set of output stores are updated.\n *\n * All `compute...` functions except `computeExtensionConfigs` are pure\n * (or are supposed to be), other than the fact that they all `setState`\n * store values at the end. `computeExtensionConfigs` calls `getGlobalStore`,\n * which creates stores.\n */\ncomputeModuleConfig(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeModuleConfig(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeModuleConfig(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeImplementerToolsConfig(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeImplementerToolsConfig(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeImplementerToolsConfig(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeExtensionSlotConfigs(\n configInternalStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) =>\n computeExtensionSlotConfigs(configState, temporaryConfigStore.getState())\n);\ntemporaryConfigStore.subscribe((tempConfigState) =>\n computeExtensionSlotConfigs(configInternalStore.getState(), tempConfigState)\n);\n\ncomputeExtensionConfigs(\n configInternalStore.getState(),\n configExtensionStore.getState(),\n temporaryConfigStore.getState()\n);\nconfigInternalStore.subscribe((configState) => {\n computeExtensionConfigs(\n configState,\n configExtensionStore.getState(),\n temporaryConfigStore.getState()\n );\n});\nconfigExtensionStore.subscribe((extensionState) => {\n computeExtensionConfigs(\n configInternalStore.getState(),\n extensionState,\n temporaryConfigStore.getState()\n );\n});\ntemporaryConfigStore.subscribe((tempConfigState) => {\n computeExtensionConfigs(\n configInternalStore.getState(),\n configExtensionStore.getState(),\n tempConfigState\n );\n});\n\nfunction computeModuleConfig(\n state: ConfigInternalStore,\n tempState: TemporaryConfigStore\n) {\n for (let moduleName of Object.keys(state.schemas)) {\n const config = getConfigForModule(moduleName, state, tempState);\n const moduleStore = getConfigStore(moduleName);\n moduleStore.setState({ loaded: true, config });\n }\n}\n\nfunction computeExtensionSlotConfigs(\n state: ConfigInternalStore,\n tempState: TemporaryConfigStore\n) {\n const slotConfigs = getExtensionSlotConfigs(state, tempState);\n const newSlotStoreEntries = Object.fromEntries(\n Object.entries(slotConfigs).map(([slotName, config]) => [\n slotName,\n { loaded: true, config },\n ])\n );\n const slotStore = getExtensionSlotsConfigStore();\n const oldState = slotStore.getState();\n const newState = { slots: { ...oldState.slots, ...newSlotStoreEntries } };\n if (!equals(oldState, newState)) {\n slotStore.setState(newState);\n }\n}\n\nfunction computeImplementerToolsConfig(\n state: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n) {\n const config = getImplementerToolsConfig(state, tempConfigState);\n implementerToolsConfigStore.setState({ config });\n}\n\nfunction computeExtensionConfigs(\n configState: ConfigInternalStore,\n extensionState: ConfigExtensionStore,\n tempConfigState: TemporaryConfigStore\n) {\n const configs = {};\n for (let extension of extensionState.mountedExtensions) {\n const config = computeExtensionConfig(\n extension.slotModuleName,\n extension.extensionModuleName,\n extension.slotName,\n extension.extensionId,\n configState,\n tempConfigState\n );\n configs[extension.slotName] = {\n ...configs[extension.slotName],\n [extension.extensionId]: { config, loaded: true },\n };\n }\n getExtensionsConfigStore().setState({ configs });\n}\n\n/*\n * API\n *\n */\n\n/**\n * This defines a configuration schema for a module. The schema tells the\n * configuration system how the module can be configured. It specifies\n * what makes configuration valid or invalid.\n *\n * See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)\n * for more information about defining a config schema.\n *\n * @param moduleName Name of the module the schema is being defined for. Generally\n * should be the one in which the `defineConfigSchema` call takes place.\n * @param schema The config schema for the module\n */\nexport function defineConfigSchema(moduleName: string, schema: ConfigSchema) {\n validateConfigSchema(moduleName, schema);\n const state = configInternalStore.getState();\n configInternalStore.setState({\n schemas: { ...state.schemas, [moduleName]: schema },\n });\n}\n\n/**\n * This defines a configuration schema for an extension. When a schema is defined\n * for an extension, that extension will receive the configuration corresponding\n * to that schema, rather than the configuration corresponding to the module\n * in which it is defined.\n *\n * The schema tells the configuration system how the module can be configured.\n * It specifies what makes configuration valid or invalid.\n *\n * See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)\n * for more information about defining a config schema.\n *\n * @param extensionName Name of the extension the schema is being defined for.\n * Should match the `name` of one of the `extensions` entries being returned\n * by `setupOpenMRS`.\n * @param schema The config schema for the extension\n */\nexport function defineExtensionConfigSchema(\n extensionName: string,\n schema: ConfigSchema\n) {\n validateConfigSchema(extensionName, schema);\n const state = configInternalStore.getState();\n if (state.schemas[extensionName]) {\n console.warn(\n `Config schema for extension ${extensionName} already exists. If there are multiple extensions with this same name, one will probably crash.`\n );\n }\n configInternalStore.setState({\n schemas: { ...state.schemas, [extensionName]: schema },\n });\n}\n\nexport function provide(config: Config, sourceName = \"provided\") {\n const state = configInternalStore.getState();\n configInternalStore.setState({\n providedConfigs: [...state.providedConfigs, { source: sourceName, config }],\n });\n}\n\n/**\n * A promise-based way to access the config as soon as it is fully loaded.\n * If it is already loaded, resolves the config in its present state.\n *\n * In general you should use the Unistore-based API provided by\n * `getConfigStore`, which allows creating a subscription so that you always\n * have the latest config. If using React, just use `useConfig`.\n *\n * This is a useful function if you need to get the config in the course\n * of the execution of a function.\n *\n * @param moduleName The name of the module for which to look up the config\n */\nexport function getConfig(moduleName: string): Promise<Config> {\n return new Promise<Config>((resolve) => {\n const store = getConfigStore(moduleName);\n function update(state: ConfigStore) {\n if (state.loaded && state.config) {\n resolve(state.config);\n unsubscribe && unsubscribe();\n }\n }\n update(store.getState());\n const unsubscribe = store.subscribe(update);\n });\n}\n\n/**\n * Validate and interpolate defaults for `providedConfig` according to `schema`\n *\n * @param schema a configuration schema\n * @param providedConfig an object of config values (without the top-level module name)\n * @param keyPathContext a dot-deparated string which helps the user figure out where\n * the provided config came from\n * @internal\n */\nexport function processConfig(\n schema: ConfigSchema,\n providedConfig: ConfigObject,\n keyPathContext: string,\n devDefaultsAreOn: boolean = false\n) {\n validateConfig(schema, providedConfig, keyPathContext);\n const config = setDefaults(schema, providedConfig, devDefaultsAreOn);\n return config;\n}\n\n/*\n * Helper functions\n *\n */\n\n/**\n * Returns the configuration for an extension. This configuration is specific\n * to the slot in which it is mounted, and its ID within that slot.\n *\n * The schema for that configuration is the extension schema. If no extension\n * schema has been provided, the schema used is the schema of the module in\n * which the extension is defined.\n *\n * @param slotModuleName The name of the module which defines the extension slot\n * @param extensionModuleName The name of the module which defines the extension (and therefore the config schema)\n * @param slotName The name of the extension slot where the extension is mounted\n * @param extensionId The ID of the extension in its slot\n */\nfunction computeExtensionConfig(\n slotModuleName: string,\n extensionModuleName: string,\n slotName: string,\n extensionId: string,\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n) {\n const extensionName = getExtensionNameFromId(extensionId);\n const extensionConfigSchema = configState.schemas[extensionName];\n const nameOfSchemaSource = extensionConfigSchema\n ? extensionName\n : extensionModuleName;\n const providedConfigs = getProvidedConfigs(configState, tempConfigState);\n const slotModuleConfig = mergeConfigsFor(slotModuleName, providedConfigs);\n const configOverride =\n slotModuleConfig?.extensionSlots?.[slotName]?.configure?.[extensionId] ??\n {};\n const extensionConfig = mergeConfigsFor(nameOfSchemaSource, providedConfigs);\n const combinedConfig = mergeConfigs([extensionConfig, configOverride]);\n // TODO: validate that a schema exists for the module\n const schema =\n extensionConfigSchema ?? configState.schemas[extensionModuleName];\n validateConfig(schema, combinedConfig, nameOfSchemaSource);\n const config = setDefaults(\n schema,\n combinedConfig,\n configState.devDefaultsAreOn\n );\n delete config.extensionSlots;\n return config;\n}\n\nfunction getImplementerToolsConfig(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Record<string, Config> {\n let result = getSchemaWithValuesAndSources(clone(configState.schemas));\n const configsAndSources = [\n ...configState.providedConfigs.map((c) => [c.config, c.source]),\n [tempConfigState.config, \"temporary config\"],\n ] as Array<[Config, string]>;\n for (let [config, source] of configsAndSources) {\n result = mergeConfigs([result, createValuesAndSourcesTree(config, source)]);\n }\n return result;\n}\n\nfunction getSchemaWithValuesAndSources(schema) {\n if (schema.hasOwnProperty(\"_default\")) {\n return { ...schema, _value: schema._default, _source: \"default\" };\n } else if (isOrdinaryObject(schema)) {\n return Object.keys(schema).reduce((obj, key) => {\n obj[key] = getSchemaWithValuesAndSources(schema[key]);\n return obj;\n }, {});\n } else {\n // Schema is bad; error will have been logged during schema validation\n return {};\n }\n}\n\nfunction createValuesAndSourcesTree(config: ConfigObject, source: string) {\n if (isOrdinaryObject(config)) {\n return Object.keys(config).reduce((obj, key) => {\n obj[key] = createValuesAndSourcesTree(config[key], source);\n return obj;\n }, {});\n } else {\n return { _value: config, _source: source };\n }\n}\n\nfunction getExtensionSlotConfigs(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Record<string, ExtensionSlotConfigObject> {\n const allConfigs = mergeConfigs(\n getProvidedConfigs(configState, tempConfigState)\n );\n const slotConfigPerModule: Record<\n string,\n Record<string, ExtensionSlotConfig>\n > = Object.keys(allConfigs).reduce((obj, key) => {\n if (allConfigs[key]?.extensionSlots) {\n obj[key] = allConfigs[key]?.extensionSlots;\n }\n return obj;\n }, {});\n validateAllExtensionSlotConfigs(slotConfigPerModule);\n const slotConfigs = Object.keys(slotConfigPerModule).reduce((obj, key) => {\n obj = { ...obj, ...slotConfigPerModule[key] };\n return obj;\n }, {});\n return slotConfigs;\n}\n\nfunction validateAllExtensionSlotConfigs(\n slotConfigPerModule: Record<string, Record<string, ExtensionSlotConfig>>\n) {\n for (let [moduleName, configBySlotName] of Object.entries(\n slotConfigPerModule\n )) {\n for (let [slotName, config] of Object.entries(configBySlotName)) {\n validateExtensionSlotConfig(config, moduleName, slotName);\n }\n }\n}\n\nfunction validateExtensionSlotConfig(\n config: ExtensionSlotConfig,\n moduleName: string,\n slotName: string\n): void {\n const errorPrefix = `Extension slot config '${moduleName}.extensionSlots.${slotName}`;\n const invalidKeys = Object.keys(config).filter(\n (k) => ![\"add\", \"remove\", \"order\", \"configure\"].includes(k)\n );\n if (invalidKeys.length) {\n console.error(\n errorPrefix + `' contains invalid keys '${invalidKeys.join(\"', '\")}'`\n );\n }\n if (config.add) {\n if (\n !Array.isArray(config.add) ||\n !config.add.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.add' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.remove) {\n if (\n !Array.isArray(config.remove) ||\n !config.remove.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.remove' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.order) {\n if (\n !Array.isArray(config.order) ||\n !config.order.every((n) => typeof n === \"string\")\n ) {\n console.error(\n errorPrefix +\n `.order' is invalid. Must be an array of strings (extension IDs)`\n );\n }\n }\n if (config.configure) {\n if (!isOrdinaryObject(config.configure)) {\n console.error(\n errorPrefix +\n `.configure' is invalid. Must be an object with extension IDs for keys`\n );\n }\n }\n}\n\nfunction getProvidedConfigs(\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): Array<Config> {\n return [\n ...configState.providedConfigs.map((c) => c.config),\n tempConfigState.config,\n ];\n}\n\nfunction validateConfigSchema(\n moduleName: string,\n schema: ConfigSchema,\n keyPath = \"\"\n) {\n const updateMessage = `Please verify that you are running the latest version and, if so, alert the maintainer.`;\n\n for (const key of Object.keys(schema).filter((k) => !k.startsWith(\"_\"))) {\n const thisKeyPath = keyPath + (keyPath && \".\") + key;\n const schemaPart = schema[key] as ConfigSchema;\n\n if (!isOrdinaryObject(schemaPart)) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}`\n );\n continue;\n }\n\n if (!schemaPart.hasOwnProperty(\"_default\")) {\n // recurse for nested config keys\n validateConfigSchema(moduleName, schemaPart, thisKeyPath);\n }\n\n const elements = schemaPart._elements;\n if (hasObjectSchema(elements)) {\n validateConfigSchema(moduleName, elements, thisKeyPath + \"._elements\");\n }\n\n if (schemaPart._validators) {\n for (let validator of schemaPart._validators) {\n if (typeof validator !== \"function\") {\n console.error(\n `${moduleName} has invalid validator for key '${thisKeyPath}' ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: validators must be functions that return either ` +\n `undefined or an error string. Received ${validator}.`\n );\n }\n }\n }\n\n const valueType = schemaPart._type;\n if (valueType && !Object.values(Type).includes(valueType)) {\n console.error(\n `${moduleName} has invalid type for key '${thisKeyPath}' ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: the allowed types are ${Object.values(\n Type\n ).join(\", \")}. ` +\n `Received '${valueType}'`\n );\n }\n\n if (\n Object.keys(schemaPart).every((k) =>\n [\"_description\", \"_validators\", \"_elements\", \"_type\"].includes(k)\n ) &&\n !keyPath.includes(\"._elements\")\n ) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: all config elements must have a default. ` +\n `Received ${JSON.stringify(schemaPart)}`\n );\n }\n\n if (\n elements &&\n valueType &&\n ![Type.Array, Type.Object].includes(valueType)\n ) {\n console.error(\n `${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +\n `\\n\\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. ` +\n `Received ${JSON.stringify(valueType)}`\n );\n }\n }\n}\n\nfunction getConfigForModule(\n moduleName: string,\n configState: ConfigInternalStore,\n tempConfigState: TemporaryConfigStore\n): ConfigObject {\n if (!configState.schemas.hasOwnProperty(moduleName)) {\n throw Error(\"No config schema has been defined for \" + moduleName);\n }\n\n const schema = configState.schemas[moduleName];\n const inputConfig = mergeConfigsFor(\n moduleName,\n getProvidedConfigs(configState, tempConfigState)\n );\n validateConfig(schema, inputConfig, moduleName);\n const config = setDefaults(schema, inputConfig, configState.devDefaultsAreOn);\n delete config.extensionSlots;\n return config;\n}\n\nfunction mergeConfigsFor(\n moduleName: string,\n allConfigs: Array<Config>\n): ConfigObject {\n const allConfigsForModule = allConfigs\n .map(({ [moduleName]: c }) => c)\n .filter((c) => !!c);\n\n return mergeConfigs(allConfigsForModule);\n}\n\nfunction mergeConfigs(configs: Array<Config>) {\n const mergeDeepAll = reduce(mergeDeepRight);\n return mergeDeepAll({}, configs) as Config;\n}\n\n// Recursively check the provided config tree to make sure that all\n// of the provided properties exist in the schema. Run validators\n// where present in the schema.\nconst validateConfig = (\n schema: ConfigSchema,\n config: ConfigObject,\n keyPath = \"\"\n) => {\n for (const key of Object.keys(config)) {\n const value = config[key];\n const thisKeyPath = keyPath + \".\" + key;\n const schemaPart = schema[key] as ConfigSchema;\n\n if (!schema.hasOwnProperty(key)) {\n if (key !== \"extensionSlots\") {\n console.error(\n `Unknown config key '${thisKeyPath}' provided. Ignoring.`\n );\n }\n\n continue;\n }\n\n checkType(thisKeyPath, schemaPart._type, value);\n runValidators(thisKeyPath, schemaPart._validators, value);\n\n if (isOrdinaryObject(value)) {\n // structurally validate only if there's elements specified\n // or there's a `_default` value, which indicates a freeform object\n if (schemaPart._type === Type.Object) {\n validateDictionary(schemaPart, value, thisKeyPath);\n } else if (!schemaPart.hasOwnProperty(\"_default\")) {\n // recurse to validate nested object structure\n validateConfig(schemaPart, value, thisKeyPath);\n }\n } else {\n if (schemaPart._type === Type.Array) {\n validateArray(schemaPart, value, thisKeyPath);\n }\n }\n }\n};\n\nfunction validateDictionary(\n dictionarySchema: ConfigSchema,\n config: ConfigObject,\n keyPath: string\n) {\n if (dictionarySchema._elements) {\n for (const key of Object.keys(config)) {\n const value = config[key];\n validateConfig(dictionarySchema._elements, value, `${keyPath}.${key}`);\n }\n }\n}\n\nfunction validateArray(\n arraySchema: ConfigSchema,\n value: ConfigObject,\n keyPath: string\n) {\n // if there is an array element object schema, verify that elements match it\n if (hasObjectSchema(arraySchema._elements)) {\n for (let i = 0; i < value.length; i++) {\n validateConfig(arraySchema._elements, value[i], `${keyPath}[${i}]`);\n }\n }\n\n for (let i = 0; i < value.length; i++) {\n checkType(`${keyPath}[${i}]`, arraySchema._elements?._type, value[i]);\n runValidators(\n `${keyPath}[${i}]`,\n arraySchema._elements?._validators,\n value[i]\n );\n }\n}\n\nfunction checkType(keyPath: string, _type: Type | undefined, value: any) {\n if (_type) {\n const validator: Record<string, Function> = {\n Array: isArray,\n Boolean: isBoolean,\n ConceptUuid: isUuid,\n Number: isNumber,\n Object: isObject,\n String: isString,\n UUID: isUuid,\n PersonAttributeTypeUuid: isUuid,\n };\n runValidators(keyPath, [validator[_type]], value);\n }\n}\n\nfunction runValidators(\n keyPath: string,\n validators: Array<Function> | undefined,\n value: any\n) {\n if (validators) {\n try {\n for (let validator of validators) {\n const validatorResult = validator(value);\n\n if (typeof validatorResult === \"string\") {\n const valueString =\n typeof value === \"object\" ? JSON.stringify(value) : value;\n console.error(\n `Invalid configuration value ${valueString} for ${keyPath}: ${validatorResult}`\n );\n }\n }\n } catch (e) {\n console.error(`Skipping invalid validator at \"${keyPath}\".`);\n }\n }\n}\n\n// Recursively fill in the config with values from the schema.\nconst setDefaults = (\n schema: ConfigSchema,\n inputConfig: Config,\n devDefaultsAreOn: boolean\n) => {\n const config = clone(inputConfig);\n\n if (!schema) {\n return config;\n }\n\n for (const key of Object.keys(schema)) {\n const configPart = config[key];\n const schemaPart = schema[key] as ConfigSchema;\n\n // The `schemaPart &&` clause of this `if` statement will only fail\n // if the schema is very invalid. It is there to prevent the app from\n // crashing completely, though it will produce unexpected behavior.\n // If this happens, there should be legible errors in the console from\n // the schema validator.\n if (schemaPart && schemaPart.hasOwnProperty(\"_default\")) {\n // We assume that schemaPart defines a config value, since it has\n // a property `_default`.\n if (!config.hasOwnProperty(key)) {\n const devDefault = schemaPart[\"_devDefault\"] || schemaPart[\"_default\"];\n\n (config[key] as any) = devDefaultsAreOn\n ? devDefault\n : schemaPart[\"_default\"];\n }\n\n // We also check if it is an object or array with object elements, in which case we recurse\n const elements = schemaPart._elements;\n\n if (configPart && hasObjectSchema(elements)) {\n if (schemaPart._type === Type.Array) {\n const configWithDefaults = configPart.map((conf: Config) =>\n setDefaults(elements, conf, devDefaultsAreOn)\n );\n config[key] = configWithDefaults;\n } else if (schemaPart._type === Type.Object) {\n for (let objectKey of Object.keys(configPart)) {\n configPart[objectKey] = setDefaults(\n elements,\n configPart[objectKey],\n devDefaultsAreOn\n );\n }\n }\n }\n } else if (isOrdinaryObject(schemaPart)) {\n // Since schemaPart has no property \"_default\", if it's an ordinary object\n // (unlike, importantly, the validators array), we assume it is a parent config property.\n // We recurse to config[key] and schema[key]. Default config[key] to {}.\n const selectedConfigPart = config.hasOwnProperty(key) ? configPart : {};\n\n if (isOrdinaryObject(selectedConfigPart)) {\n config[key] = setDefaults(\n schemaPart,\n selectedConfigPart,\n devDefaultsAreOn\n );\n }\n }\n }\n\n return config;\n};\n\nfunction hasObjectSchema(\n elementsSchema: Object | undefined\n): elementsSchema is ConfigSchema {\n return (\n !!elementsSchema &&\n Object.keys(elementsSchema).filter(\n (e) => ![\"_default\", \"_validators\"].includes(e)\n ).length > 0\n );\n}\n\nfunction isOrdinaryObject(value) {\n return typeof value === \"object\" && !Array.isArray(value) && value !== null;\n}\n\n/**\n * Copied over from esm-extensions. It rightly belongs to that module, but esm-config\n * cannot depend on esm-extensions.\n */\nfunction getExtensionNameFromId(extensionId: string) {\n const [extensionName] = extensionId.split(\"#\");\n return extensionName;\n}\n","/** @module @category Navigation */\n\nfunction trimTrailingSlash(str: string) {\n return str.replace(/\\/$/, \"\");\n}\n\n/**\n * Interpolates a string with openmrsBase and openmrsSpaBase.\n *\n * Useful for accepting `${openmrsBase}` or `${openmrsSpaBase}` template\n * parameters in configurable URLs.\n *\n * @param template A string to interpolate\n */\nexport function interpolateUrl(template: string): string {\n const openmrsSpaBase = trimTrailingSlash(window.getOpenmrsSpaBase());\n return interpolateString(template, {\n openmrsBase: window.openmrsBase,\n openmrsSpaBase: openmrsSpaBase,\n }).replace(/^\\/\\//, \"/\"); // remove extra initial slash if present\n}\n\n/**\n * Interpolates values of `params` into the `template` string.\n *\n * Useful for additional template parameters in URLs.\n *\n * Example usage:\n * ```js\n * navigate({\n * to: interpolateString(\n * config.links.patientChart,\n * { patientUuid: patient.uuid }\n * )\n * });\n * ```\n *\n * @param template With optional params wrapped in `${ }`\n * @param params Values to interpolate into the string template\n */\nexport function interpolateString(template: string, params: object): string {\n const names = Object.keys(params);\n return names.reduce(\n (prev, curr) => prev.split(\"${\" + curr + \"}\").join(params[curr]),\n template\n );\n}\n","/** @module @category Navigation */\nimport { navigateToUrl } from \"single-spa\";\nimport { interpolateUrl } from \"./interpolate-string\";\nimport type {} from \"@openmrs/esm-globals\";\n\nfunction trimTrailingSlash(str: string) {\n return str.replace(/\\/$/, \"\");\n}\n\nexport interface NavigateOptions {\n to: string;\n}\n\n/**\n * Calls `location.assign` for non-SPA paths and [navigateToUrl](https://single-spa.js.org/docs/api/#navigatetourl) for SPA paths\n *\n * Example usage:\n * ```js\n * const config = getConfig();\n * const submitHandler = () => {\n * navigate({ to: config.links.submitSuccess });\n * };\n * ```\n *\n * @param to The target path or URL. Supports templating with 'openmrsBase' and 'openmrsSpaBase'.\n * For example, `${openmrsSpaBase}/home` will resolve to `/openmrs/spa/home`\n * for implementations using the standard OpenMRS and SPA base paths.\n */\nexport function navigate({ to }: NavigateOptions): void {\n const openmrsSpaBase = trimTrailingSlash(window.getOpenmrsSpaBase());\n const target = interpolateUrl(to);\n const isSpaPath = target.startsWith(openmrsSpaBase);\n\n if (isSpaPath) {\n navigateToUrl(target);\n } else {\n window.location.assign(target);\n }\n}\n","/** @module @category Config Validation */\nimport { validator } from \"./validator\";\n\n/**\n * Verifies that the value is between the provided minimum and maximum\n *\n * @param min Minimum acceptable value\n * @param max Maximum acceptable value\n */\nexport const inRange = (min: number, max: number) => {\n return validator(\n (val) => min <= val && val <= max,\n `must be between ${min} and ${max}`\n );\n};\n\n/**\n * Verifies that a string contains only the default URL template\n * parameters, plus any specified in `allowedTemplateParameters`.\n *\n * @param allowedTemplateParameters To be added to `openmrsBase` and `openmrsSpaBase`\n * @category Navigation\n */\nexport const isUrlWithTemplateParameters = (\n allowedTemplateParameters: string[]\n) => {\n const allowedParams = allowedTemplateParameters.concat([\n \"openmrsBase\",\n \"openmrsSpaBase\",\n ]);\n return validator((val) => {\n if (!val || typeof val != \"string\") {\n return false;\n }\n\n const rx = /\\${(.*?)}/g;\n let match = rx.exec(val);\n\n while (match) {\n if (!allowedParams.includes(match[1])) {\n return false;\n }\n\n match = rx.exec(val);\n }\n\n return true;\n }, \"should be a URL or path. The allowed template parameters are \" + allowedParams.map((p) => \"${\" + p + \"}\").join(\", \"));\n};\n\n/**\n * Verifies that a string contains only the default URL template parameters.\n *\n * @category Navigation\n */\nexport const isUrl = isUrlWithTemplateParameters([]);\n\nexport const validators = {\n inRange,\n isUrl,\n isUrlWithTemplateParameters,\n};\n","const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","function n(n,t){for(var r in t)n[r]=t[r];return n}export default function(t){var r=[];function u(n){for(var t=[],u=0;u<r.length;u++)r[u]===n?n=null:t.push(r[u]);r=t}function e(u,e,f){t=e?u:n(n({},t),u);for(var i=r,o=0;o<i.length;o++)i[o](t,f)}return t=t||{},{action:function(n){function r(t){e(t,!1,n)}return function(){for(var u=arguments,e=[t],f=0;f<arguments.length;f++)e.push(u[f]);var i=n.apply(this,e);if(null!=i)return i.then?i.then(r):r(i)}},setState:e,subscribe:function(n){return r.push(n),function(){u(n)}},unsubscribe:u,getState:function(){return t}}}\n//# sourceMappingURL=unistore.es.js.map\n","/** @module @category Store */\nimport createStore, { Store } from \"unistore\";\n\ninterface StoreEntity {\n value: Store<any>;\n active: boolean;\n}\n\nconst availableStores: Record<string, StoreEntity> = {};\n\n/**\n * Creates a Unistore [store](https://github.com/developit/unistore#store).\n *\n * @param name A name by which the store can be looked up later.\n * Must be unique across the entire application.\n * @param initialState An object which will be the initial state of the store.\n * @returns The newly created store.\n */\nexport function createGlobalStore<TState>(\n name: string,\n initialState: TState\n): Store<TState> {\n const available = availableStores[name];\n\n if (available) {\n if (available.active) {\n console.error(\n \"Cannot override an existing store. Make sure that stores are only created once.\"\n );\n } else {\n available.value.setState(initialState, true);\n }\n\n available.active = true;\n return available.value;\n } else {\n const store = createStore(initialState);\n\n availableStores[name] = {\n value: store,\n active: true,\n };\n\n return store;\n }\n}\n\n/**\n * Returns the existing [store](https://github.com/developit/unistore#store) named `name`,\n * or creates a new store named `name` if none exists.\n *\n * @param name The name of the store to look up.\n * @param fallbackState The initial value of the new store if no store named `name` exists.\n * @returns The found or newly created store.\n */\nexport function getGlobalStore<TState = any>(\n name: string,\n fallbackState?: TState\n): Store<TState> {\n const available = availableStores[name];\n\n if (!available) {\n const store = createStore(fallbackState);\n availableStores[name] = {\n value: store,\n active: false,\n };\n return store;\n }\n\n return available.value;\n}\n\nexport interface AppState {}\n\n/**\n * @internal\n */\nexport function createAppState(initialState: AppState) {\n return createGlobalStore(\"app\", initialState);\n}\n\n/**\n * @returns The [store](https://github.com/developit/unistore#store) named `app`.\n */\nexport function getAppState() {\n return getGlobalStore<AppState>(\"app\", {});\n}\n\nexport function subscribeTo<T, U>(\n store: Store<T>,\n select: (state: T) => U,\n handle: (subState: U) => void\n) {\n let previous = select(store.getState());\n\n return store.subscribe((state) => {\n const current = select(state);\n\n if (current !== previous) {\n previous = current;\n handle(current);\n }\n });\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__45__;","module.exports = __WEBPACK_EXTERNAL_MODULE__954__;","module.exports = __WEBPACK_EXTERNAL_MODULE__493__;","module.exports = __WEBPACK_EXTERNAL_MODULE__792__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","/* The svg container is a div that contains all the OpenMRS svgs, with\n * an HTML id that can be referenced with the following code:\n * <svg role=\"img\">\n * <use link:href=\"#the-svg-id\"></use>\n * </svg>\n *\n * This approach is known as \"svg sprites\"\n */\nconst svgContainer = document.createElement(\"div\");\nconst appendContainer = () => {\n document.body.appendChild(svgContainer);\n};\nsvgContainer.id = \"omrs-svgs-container\";\nsvgContainer.style.display = \"none\";\n\nif (document.readyState === \"complete\") {\n appendContainer();\n} else {\n window.addEventListener(\"load\", appendContainer);\n}\n\nexport function addSvg(htmlId: string, svgString: string) {\n const domParser = new DOMParser();\n const dom = domParser.parseFromString(svgString, \"text/html\");\n const svgElement = dom.querySelector(\"svg\");\n\n if (svgElement) {\n svgElement.id = htmlId;\n svgContainer.appendChild(svgElement);\n }\n}\n","/** @module @category UI */\nimport React from \"react\";\nimport { render } from \"react-dom\";\nimport { Subject } from \"rxjs\";\nimport {\n InlineNotificationMeta,\n NotificationDescriptor,\n} from \"./notification.component\";\nimport ActiveNotifications from \"./active-notifications.component\";\nimport isEmpty from \"lodash-es/isEmpty\";\n\nconst inlineNotificationsSubject = new Subject<InlineNotificationMeta>();\nlet notificationId = 0;\n\n/**\n * Starts a rendering host for inline notifications. Should only be used by the app shell.\n * Under normal conditions there is no need to use this function.\n * @param target The container target that hosts the inline notifications.\n */\nexport function renderInlineNotifications(target: HTMLElement | null) {\n if (target) {\n render(\n <ActiveNotifications subject={inlineNotificationsSubject} />,\n target\n );\n }\n}\n\nfunction isNotEmpty(description: React.ReactNode) {\n return typeof description === \"string\"\n ? description.trim().length > 0\n : typeof description === \"object\"\n ? !isEmpty(description)\n : false;\n}\n\n/**\n * Displays an inline notification in the UI.\n * @param notification The description of the notification to display.\n */\nexport function showNotification(notification: NotificationDescriptor) {\n if (notification && isNotEmpty(notification.description)) {\n setTimeout(() => {\n // always use in subsequent cycle\n inlineNotificationsSubject.next({\n ...notification,\n id: notificationId++,\n });\n }, 0);\n } else {\n console.error(\n `showNotification must be called with an object having a 'description' property that is a non-empty string or object`\n );\n }\n}\n","/** @module @category UI */\nimport React from \"react\";\nimport { render } from \"react-dom\";\nimport { Subject } from \"rxjs\";\nimport { ToastDescriptor, ToastNotificationMeta } from \"./toast.component\";\nimport ActiveToasts from \"./active-toasts.component\";\nimport isEmpty from \"lodash-es/isEmpty\";\n\nconst toastsSubject = new Subject<ToastNotificationMeta>();\nlet toastId = 0;\n\n/**\n * Starts a rendering host for toast notifications. Should only be used by the app shell.\n * Under normal conditions there is no need to use this function.\n * @param target The container target that hosts the toast notifications.\n */\nexport function renderToasts(target: HTMLElement | null) {\n if (target) {\n render(<ActiveToasts subject={toastsSubject} />, target);\n }\n}\n\nfunction isNotEmpty(description: React.ReactNode) {\n return typeof description === \"string\"\n ? description.trim().length > 0\n : typeof description === \"object\"\n ? !isEmpty(description)\n : false;\n}\n\n/**\n * Displays a toast notification in the UI.\n * @param toast The description of the toast to display.\n */\nexport function showToast(toast: ToastDescriptor) {\n if (toast && isNotEmpty(toast.description)) {\n setTimeout(() => {\n // always use in subsequent cycle\n toastsSubject.next({\n ...toast,\n id: toastId++,\n });\n }, 0);\n } else {\n console.error(\n `showToast must be called with an object having a 'description' property that is a non-empty string or object`\n );\n }\n}\n","/** @module @category UI */\nimport { renderExtension } from \"@openmrs/esm-extensions\";\nimport { createGlobalStore } from \"@openmrs/esm-state\";\n\ntype ModalInstanceState = \"NEW\" | \"MOUNTED\" | \"TO_BE_DELETED\";\n\ninterface ModalInstance {\n container?: HTMLElement;\n state: ModalInstanceState;\n onClose: () => void;\n cleanup?: () => void;\n extensionId: string;\n props: Record<string, any>;\n}\n\ninterface ModalState {\n modalContainer: HTMLElement | null;\n modalStack: Array<ModalInstance>;\n}\n\nconst modalStore = createGlobalStore<ModalState>(\"globalModalState\", {\n modalContainer: null,\n modalStack: [],\n});\n\nfunction htmlToElement(html: string) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.firstChild as ChildNode;\n}\n\nfunction createModalFrame() {\n const closeButton = htmlToElement(\n `\n <button\n class=\"bx--modal-close\"\n type=\"button\">\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><defs><style>.cls-1{fill:#000000;}.cls-2{fill:none;}</style></defs><title>close</title><polygon class=\"cls-1\" points=\"24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4\"/><rect class=\"cls-2\" width=\"32\" height=\"32\"/></svg>\n </button>`.trim()\n ) as HTMLButtonElement;\n\n closeButton.addEventListener(\"click\", closeHighestInstance);\n const outer = document.createElement(\"div\");\n outer.className = \"bx--modal-container\";\n const contentContainer = document.createElement(\"div\");\n\n outer.append(closeButton);\n outer.append(contentContainer);\n\n return { outer, contentContainer };\n}\n\nconst original = window.getComputedStyle(document.body).overflow;\n\nfunction handleModalStateUpdate({ modalStack, modalContainer }: ModalState) {\n if (!modalContainer) return;\n\n if (modalStack.length) {\n // spin up the container if it was hidden previously\n if (!modalContainer.style.visibility) {\n addEventListener(\"keydown\", handleEscKey);\n document.body.style.overflow = \"hidden\";\n modalContainer.style.visibility = \"unset\";\n }\n\n modalStack.forEach((instance, index) => {\n switch (instance.state) {\n case \"NEW\":\n const { outer, contentContainer } = createModalFrame();\n instance.container = outer;\n instance.cleanup = renderExtension(\n contentContainer,\n \"\",\n \"\",\n instance.extensionId,\n undefined,\n instance.props\n );\n instance.state = \"MOUNTED\";\n modalContainer.prepend(outer);\n outer.style.visibility = \"unset\";\n break;\n\n case \"MOUNTED\":\n if (instance.container) {\n instance.container.style.visibility = index ? \"hidden\" : \"unset\";\n }\n break;\n\n case \"TO_BE_DELETED\":\n instance.onClose();\n instance.cleanup?.();\n instance.container?.remove();\n setTimeout(() => {\n modalStore.setState({\n modalContainer,\n modalStack: modalStack.filter((x) => x !== instance),\n });\n }, 0);\n break;\n }\n });\n } else {\n modalContainer.style.removeProperty(\"visibility\");\n document.body.style.overflow = original;\n removeEventListener(\"keydown\", handleEscKey);\n }\n}\n\nexport function renderModals(modalContainer: HTMLElement | null) {\n if (modalContainer) {\n modalStore.subscribe(handleModalStateUpdate);\n\n modalStore.setState({\n ...modalStore.getState(),\n modalContainer,\n });\n }\n}\nfunction openInstance(instance: ModalInstance) {\n const state = modalStore.getState();\n const modalStack = [instance, ...state.modalStack];\n\n modalStore.setState({\n ...state,\n modalStack,\n });\n}\n\nfunction closeInstance(instance: ModalInstance) {\n const state = modalStore.getState();\n const modalStack = state.modalStack.map(\n (x): ModalInstance =>\n x === instance ? { ...x, state: \"TO_BE_DELETED\" } : x\n );\n modalStore.setState({\n ...state,\n modalStack,\n });\n}\n\nfunction closeHighestInstance() {\n const state = modalStore.getState();\n const [top] = state.modalStack;\n\n if (top) {\n closeInstance(top);\n }\n}\n\nfunction handleEscKey(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n closeHighestInstance();\n }\n}\n\n/**\n * Shows the provided extension component in a modal dialog.\n * @param extensionId The id of the extension to show.\n * @param props The optional props to provide to the extension.\n * @param onClose The optional notification to receive when the modal is closed.\n * @returns The dispose function to force closing the modal dialog.\n */\nexport function showModal(\n extensionId: string,\n props: Record<string, any> = {},\n onClose: () => void = () => {}\n) {\n const close = () => {\n const state = modalStore.getState();\n const item = state.modalStack.find((m) => m.onClose === onClose);\n\n if (item) {\n closeInstance(item);\n }\n };\n\n openInstance({\n state: \"NEW\",\n onClose,\n extensionId,\n props: {\n extensionId,\n close,\n ...props,\n },\n });\n\n return close;\n}\n","import { defineConfigSchema, getConfigStore, Type } from \"@openmrs/esm-config\";\n\nexport function setupBranding() {\n defineConfigSchema(\"@openmrs/esm-styleguide\", {\n \"Brand color #1\": {\n _default: \"#005d5d\",\n _type: Type.String,\n },\n \"Brand color #2\": {\n _default: \"#004144\",\n _type: Type.String,\n },\n \"Brand color #3\": {\n _default: \"#007d79\",\n _type: Type.String,\n },\n });\n\n getConfigStore(\"@openmrs/esm-styleguide\").subscribe((store) => {\n if (store.loaded && store.config) {\n setGlobalCSSVariable(\"--brand-01\", store.config[\"Brand color #1\"]);\n setGlobalCSSVariable(\"--brand-02\", store.config[\"Brand color #2\"]);\n setGlobalCSSVariable(\"--brand-03\", store.config[\"Brand color #3\"]);\n }\n });\n\n function setGlobalCSSVariable(name: string, value: string) {\n document.documentElement.style.setProperty(name, value);\n }\n}\n","import { setupLogo } from \"./logo\";\nimport { setupIcons } from \"./icons\";\nimport { setupBranding } from \"./brand\";\n\nexport * from \"./breakpoints\";\nexport * from \"./spinner\";\nexport * from \"./notifications\";\nexport * from \"./toasts\";\nexport * from \"./modals\";\n\nsetupBranding();\nsetupLogo();\nsetupIcons();\n","/// <reference path=\"../declarations.d.ts\" />\n\nimport fullLogo from \"./openmrs-logo-full.svg\";\nimport partialLogo from \"./openmrs-logo-partial.svg\";\nimport iconLogo from \"./openmrs-logo-icon.svg\";\nimport whiteLogo from \"./openmrs-logo-white.svg\";\nimport { addSvg } from \"../svg-utils\";\n\nexport function setupLogo() {\n addSvg(\"omrs-logo-full-color\", fullLogo);\n addSvg(\"omrs-logo-full-mono\", fullLogo);\n addSvg(\"omrs-logo-full-grey\", fullLogo);\n addSvg(\"omrs-logo-partial-color\", partialLogo);\n addSvg(\"omrs-logo-partial-mono\", partialLogo);\n addSvg(\"omrs-logo-partial-grey\", partialLogo);\n addSvg(\"omrs-logo-icon-color\", iconLogo);\n addSvg(\"omrs-logo-icon-mono\", iconLogo);\n addSvg(\"omrs-logo-icon-grey\", iconLogo);\n addSvg(\"omrs-logo-white\", whiteLogo);\n}\n","/// <reference path=\"../declarations.d.ts\" />\n\nimport visibility from \"./svgs/visibility_24px_rounded.svg\";\nimport menu from \"./svgs/menu_24px_rounded.svg\";\nimport search from \"./svgs/search_24px_rounded.svg\";\nimport arrow_back from \"./svgs/arrow_back_24px_rounded.svg\";\nimport arrow_forward from \"./svgs/arrow_forward_24px.svg\";\nimport arrow_downward from \"./svgs/arrow_downward_24px_rounded.svg\";\nimport arrow_upward from \"./svgs/arrow_upward_24px_rounded.svg\";\nimport chevron_left from \"./svgs/chevron_left_24px_rounded.svg\";\nimport chevron_right from \"./svgs/chevron_right_24px_rounded.svg\";\nimport chevron_up from \"./svgs/chevron_up_24px_rounded.svg\";\nimport chevron_down from \"./svgs/chevron_down-24px_rounded.svg\";\nimport user from \"./svgs/supervised_user_circle_24px_rounded.svg\";\nimport home from \"./svgs/home_24px_rounded.svg\";\nimport close from \"./svgs/close-24px.svg\";\nimport notification from \"./svgs/important_notification_24px_rounded.svg\";\nimport calendar from \"./svgs/calendar_24px_rounded.svg\";\nimport time from \"./svgs/access_time-24px_rounded.svg\";\nimport add from \"./svgs/add_24px_rounded.svg\";\nimport remove from \"./svgs/remove-24px_rounded.svg\";\nimport check from \"./svgs/check_circle-24px.svg\";\nimport zoom from \"./svgs/zoom_out_map_24px_rounded.svg\";\nimport location from \"./svgs/location-24px.svg\";\nimport download from \"./svgs/download_24px_rounded.svg\";\nimport { addSvg } from \"../svg-utils\";\n\nexport function setupIcons() {\n addSvg(\"omrs-icon-visibility\", visibility);\n addSvg(\"omrs-icon-menu\", menu);\n addSvg(\"omrs-icon-search\", search);\n addSvg(\"omrs-icon-arrow-back\", arrow_back);\n addSvg(\"omrs-icon-arrow-forward\", arrow_forward);\n addSvg(\"omrs-icon-arrow-downward\", arrow_downward);\n addSvg(\"omrs-icon-arrow-upward\", arrow_upward);\n addSvg(\"omrs-icon-chevron-left\", chevron_left);\n addSvg(\"omrs-icon-chevron-right\", chevron_right);\n addSvg(\"omrs-icon-chevron-up\", chevron_up);\n addSvg(\"omrs-icon-chevron-down\", chevron_down);\n addSvg(\"omrs-icon-supervised-user-circle\", user);\n addSvg(\"omrs-icon-home\", home);\n addSvg(\"omrs-icon-close\", close);\n addSvg(\"omrs-icon-important-notification\", notification);\n addSvg(\"omrs-icon-calendar\", calendar);\n addSvg(\"omrs-icon-access-time\", time);\n addSvg(\"omrs-icon-add\", add);\n addSvg(\"omrs-icon-remove\", remove);\n addSvg(\"omrs-icon-check-circle\", check);\n addSvg(\"omrs-icon-zoomoutmap\", zoom);\n addSvg(\"omrs-icon-location\", location);\n addSvg(\"omrs-icon-download\", download);\n}\n"],"names":["resolveDirectory","require","exports","rootDirLevel","__system_context__","meta","url","console","error","Error","__webpack_public_path__","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","_arity","n","bind","fn","thisObj","apply","arguments","module","_clone","clone","value","_curry2","_equals","equals","b","this","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","iter","next","list","done","push","_cloneRegExp","type","refFrom","refTo","deep","copy","copiedValue","len","idx","key","Date","valueOf","pattern","RegExp","source","global","ignoreCase","multiline","sticky","unicode","_isPlaceholder","f1","_curry1","f2","_b","_a","f3","c","_c","_arrayFromIterator","_includesWith","_functionName","_has","_objectIs","keys","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","aItem","typeA","constructor","name","message","size","entries","concat","values","keysA","extendedStackA","extendedStackB","f","match","String","prop","obj","Object","prototype","hasOwnProperty","call","pred","x","toString","_isArguments","Array","isArray","val","_isArray","_isString","_isArrayLike","nodeType","is","_xwrap","_iterableReduce","xf","acc","step","_methodReduce","methodName","symIterator","Symbol","iterator","reduce","TypeError","XWrap","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","item","nIdx","ks","checkArgsLength","mergeDeepWithKey","mergeDeepRight","lObj","rObj","k","lVal","rVal","_curry3","_isObject","mergeWithKey","l","r","result","__WEBPACK_EXTERNAL_MODULE__685__","__WEBPACK_EXTERNAL_MODULE__645__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","default","e","d","definition","o","defineProperty","enumerable","get","toStringTag","Type","validator","validationFunction","isBoolean","isNumber","isString","isObject","isUuid","test","configInternalStoreInitialValue","providedConfigs","schemas","devDefaultsAreOn","getAreDevDefaultsOn","configInternalStore","createGlobalStore","lastValueOfDevDefaultsAreOn","JSON","parse","localStorage","getItem","subscribe","state","setItem","stringify","temporaryConfigStore","config","configExtensionStore","mountedExtensions","getConfigStore","moduleName","getGlobalStore","loaded","getExtensionSlotsConfigStore","slots","getExtensionSlotConfig","slotName","getExtensionSlotConfigFromStore","getState","getExtensionsConfigStore","configs","getExtensionConfig","extensionId","getExtensionConfigFromStore","extensionConfig","implementerToolsConfigStore","computeModuleConfig","tempState","getConfigForModule","setState","computeExtensionSlotConfigs","slotConfigs","configState","tempConfigState","allConfigs","mergeConfigs","getProvidedConfigs","slotConfigPerModule","extensionSlots","configBySlotName","validateExtensionSlotConfig","newSlotStoreEntries","fromEntries","map","slotStore","oldState","newState","u","computeImplementerToolsConfig","getSchemaWithValuesAndSources","i","configsAndSources","createValuesAndSourcesTree","computeExtensionConfigs","extensionState","extension","computeExtensionConfig","slotModuleName","extensionModuleName","defineConfigSchema","schema","validateConfigSchema","defineExtensionConfigSchema","extensionName","warn","provide","sourceName","getConfig","Promise","resolve","store","update","unsubscribe","processConfig","providedConfig","keyPathContext","validateConfig","setDefaults","split","extensionConfigSchema","nameOfSchemaSource","configOverride","mergeConfigsFor","configure","combinedConfig","_value","_default","_source","isOrdinaryObject","errorPrefix","invalidKeys","filter","includes","join","add","every","remove","order","keyPath","updateMessage","startsWith","thisKeyPath","schemaPart","elements","_elements","hasObjectSchema","_validators","valueType","_type","inputConfig","t","checkType","runValidators","validateDictionary","validateArray","dictionarySchema","arraySchema","Boolean","ConceptUuid","UUID","PersonAttributeTypeUuid","validators","validatorResult","valueString","configPart","devDefault","_devDefault","configWithDefaults","conf","objectKey","selectedConfigPart","elementsSchema","interpolateUrl","template","openmrsSpaBase","window","getOpenmrsSpaBase","replace","interpolateString","openmrsBase","params","prev","curr","navigate","to","target","navigateToUrl","location","assign","inRange","min","max","isUrlWithTemplateParameters","allowedTemplateParameters","allowedParams","rx","exec","p","isUrl","s","R","y","g","globalThis","Function","scriptUrl","importScripts","currentScript","src","scripts","getElementsByTagName","action","then","availableStores","initialState","available","active","createStore","fallbackState","createAppState","getAppState","subscribeTo","select","handle","previous","current","__WEBPACK_EXTERNAL_MODULE__45__","__WEBPACK_EXTERNAL_MODULE__954__","__WEBPACK_EXTERNAL_MODULE__493__","__WEBPACK_EXTERNAL_MODULE__792__","undefined","autoPublicPath","svgContainer","appendContainer","body","appendChild","addSvg","htmlId","svgString","svgElement","DOMParser","parseFromString","querySelector","id","style","display","readyState","addEventListener","Subject","modalContainer","modalStack","getComputedStyle","overflow","setGlobalCSSVariable","documentElement","setProperty","setupBranding","fullLogo","partialLogo","iconLogo","whiteLogo","visibility","menu","search","arrow_back","arrow_forward","arrow_downward","arrow_upward","chevron_left","chevron_right","chevron_up","chevron_down","user","home","close","notification","calendar","time","check","zoom","download"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-styleguide",
3
- "version": "3.2.1-pre.1086",
3
+ "version": "3.2.1-pre.1098",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-styleguide.js",
@@ -51,7 +51,7 @@
51
51
  "rxjs": "6.x"
52
52
  },
53
53
  "devDependencies": {
54
- "@openmrs/esm-extensions": "^3.2.1-pre.1086",
54
+ "@openmrs/esm-extensions": "^3.2.1-pre.1098",
55
55
  "@pickra/copy-code-block": "^1.1.7",
56
56
  "@storybook/addon-a11y": "^5.2.1",
57
57
  "@storybook/addon-knobs": "^5.2.1",
@@ -66,5 +66,5 @@
66
66
  "react-dom": "^16.13.1",
67
67
  "rxjs": "^6.5.3"
68
68
  },
69
- "gitHead": "1d7c22577d05b50c73bb6ca9969cd7085b71ae8d"
69
+ "gitHead": "d9e828d489c789866fe3381086dbc7afeb9fb9e4"
70
70
  }
@@ -1,3 +1,4 @@
1
+ /** @module @category UI */
1
2
  import { renderExtension } from "@openmrs/esm-extensions";
2
3
  import { createGlobalStore } from "@openmrs/esm-state";
3
4
 
@@ -1,3 +1,4 @@
1
+ /** @module @category UI */
1
2
  import React from "react";
2
3
  import { render } from "react-dom";
3
4
  import { Subject } from "rxjs";
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { InlineNotification } from "carbon-components-react";
3
+ /** @module @category UI */
3
4
 
4
5
  export interface NotificationProps {
5
6
  notification: InlineNotificationMeta;
package/src/public.ts ADDED
@@ -0,0 +1,12 @@
1
+ export { showNotification } from "./notifications";
2
+ export {
3
+ NotificationDescriptor,
4
+ InlineNotificationType,
5
+ } from "./notifications/notification.component";
6
+ export { showToast } from "./toasts";
7
+ export { showModal } from "./modals";
8
+ export {
9
+ ToastDescriptor,
10
+ ToastType,
11
+ ToastNotificationMeta,
12
+ } from "./toasts/toast.component";
@@ -1,3 +1,4 @@
1
+ /** @module @category UI */
1
2
  import React from "react";
2
3
  import { render } from "react-dom";
3
4
  import { Subject } from "rxjs";
@@ -1,3 +1,4 @@
1
+ /** @module @category UI */
1
2
  import React, { useEffect, useState } from "react";
2
3
  import { ToastNotification } from "carbon-components-react";
3
4