@pih/esm-audit-app 2.1.1-pre.148 → 2.1.1-pre.154

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,3 +1,3 @@
1
- var _pih_esm_audit_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@pih/esm-audit-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@pih/esm-audit-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={3204(e,t,r){"use strict";var n=r(523),o=r.n(n);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw n}}return i}}(e,t)||l(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function l(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}var u=[].filter(function(e){return e.plugin}).map(function(e){return(0,e.plugin)(e.params)}),c={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){var p,d,f,h,m,g,y,b,S,v,O,E,M=function(e,t,r){e&&e[t]&&(e[t]=r)},_=function(e,t,r){var n,o=r();Array.isArray(o)?(null!=e[t]||(e[t]=[]),(n=e[t]).push.apply(n,function(e){if(Array.isArray(e))return i(e)}(o)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||l(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):(void 0===o?"undefined":s(o))==="object"&&null!==o&&(null!=e[t]||(e[t]={}),Object.assign(e[t],o))},R=function(e,t,r){null!=e[t]||(e[t]=r())},w=null!=(p=null==(g=r.remotesLoadingData)?void 0:g.chunkMapping)?p:{},T=null!=(d=null==(y=r.remotesLoadingData)?void 0:y.moduleIdToRemoteDataMapping)?d:{},I=null!=(f=null==(b=r.initializeSharingData)?void 0:b.scopeToSharingDataMapping)?f:{},k=null!=(h=null==(S=r.consumesLoadingData)?void 0:S.chunkMapping)?h:{},P=null!=(m=null==(v=r.consumesLoadingData)?void 0:v.moduleIdToConsumeDataMapping)?m:{},j={},x=[],N={},C=null==(O=r.initializeExposesData)?void 0:O.shareScope;for(var D in o())r.federation[D]=o()[D];R(r.federation,"consumesLoadingModuleToHandlerMapping",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(P)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=s[1];e[l]={getter:u.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:u.requiredVersion,strictVersion:u.strictVersion,singleton:u.singleton,eager:u.eager},scope:[u.shareScope]},shareKey:u.shareKey}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),R(r.federation,"initOptions",function(){return{}}),R(r.federation.initOptions,"name",function(){return"@pih/esm-audit-app"}),R(r.federation.initOptions,"shareStrategy",function(){return"version-first"}),R(r.federation.initOptions,"shared",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(I)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=a(o.value,2),u=l[0],c=l[1],p=!0,d=!1,f=void 0;try{for(var h,m=c[Symbol.iterator]();!(p=(h=m.next()).done);p=!0){var g=h.value;if((void 0===g?"undefined":s(g))==="object"&&null!==g){var y=g.name,b=g.version,S=g.factory,v=g.eager,O=g.singleton,E=g.requiredVersion,M=g.strictVersion,_={},R=function(e){return void 0!==e};R(O)&&(_.singleton=O),R(E)&&(_.requiredVersion=E),R(v)&&(_.eager=v),R(M)&&(_.strictVersion=M);var w={version:b,scope:[u],shareConfig:_,get:S};e[y]?e[y].push(w):e[y]=[w]}}}catch(e){d=!0,f=e}finally{try{p||null==m.return||m.return()}finally{if(d)throw f}}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),_(r.federation.initOptions,"remotes",function(){return Object.values(c).flat().filter(function(e){return"script"===e.externalType})}),_(r.federation.initOptions,"plugins",function(){return u}),R(r.federation,"bundlerRuntimeOptions",function(){return{}}),R(r.federation.bundlerRuntimeOptions,"remotes",function(){return{}}),R(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",function(){return w}),R(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",function(){return c}),R(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(T)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=s[1];e[l]=[u.shareScope,u.name,u.externalModuleId,u.remoteName]}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),R(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",function(){return r}),_(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(T)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=c[s[1].remoteName];u&&(e[l]=u)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),M(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),M(r.f,"remotes",function(e,t){return r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:w,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})}),M(r.f,"consumes",function(e,t){return r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:k,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:j,webpackRequire:r})}),M(r,"I",function(e,t){return r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:x,initTokens:N,webpackRequire:r})}),M(r,"initContainer",function(e,t,n){return r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:C,webpackRequire:r})}),M(r,"getContainer",function(e,t){var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(function(){throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(E=r.consumesLoadingData)?void 0:E.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:j,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},8448(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,c=l.length;u<c;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@pih/esm-audit-app:2.1.1-pre.148";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,c=l.length;u<c;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:c,moduleToHandlerMapping:p}=e;n.attachShareScopeMap(u),u.o(c,t)&&c[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=p[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:c,getter:d,shareInfo:f,treeShakingGetter:h}=p[e],m=i.getUsedExports(u,c),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let y=o.loadShare(c,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:c}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
1
+ var _pih_esm_audit_app;!function(){var e="u">typeof globalThis?globalThis:self;if(void 0===e._FEDERATION_RUNTIME_CORE||void 0===e._OPENMRS_FEDERATION_SDK||void 0===e._OPENMRS_FEDERATION_ERROR_CODES)throw Error("@pih/esm-audit-app cannot start: the OpenMRS app shell serving this page does not provide the Module Federation runtime. This app was built with newer OpenMRS tooling than the app shell, so either upgrade @openmrs/esm-app-shell, or rebuild this app with tooling matching the app shell.");var t=e._FEDERATION_RUNTIME_CORE_FROM;t&&t.version&&"2.8"!==String(t.version).split(".").slice(0,2).join(".")&&console.warn("@pih/esm-audit-app was built against Module Federation 2.8.x but the app shell provides "+t.version+". Shared dependencies may not de-duplicate correctly.")}(),(()=>{var e,t,r,n,o,i={3204(e,t,r){"use strict";var n=r(523),o=r.n(n);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw n}}return i}}(e,t)||l(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function l(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}var u=[].filter(function(e){return e.plugin}).map(function(e){return(0,e.plugin)(e.params)}),c={};if((r.initializeSharingData||r.initializeExposesData)&&r.federation){var p,d,f,h,m,g,y,b,S,v,O,E,M=function(e,t,r){e&&e[t]&&(e[t]=r)},_=function(e,t,r){var n,o=r();Array.isArray(o)?(null!=e[t]||(e[t]=[]),(n=e[t]).push.apply(n,function(e){if(Array.isArray(e))return i(e)}(o)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||l(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):(void 0===o?"undefined":s(o))==="object"&&null!==o&&(null!=e[t]||(e[t]={}),Object.assign(e[t],o))},R=function(e,t,r){null!=e[t]||(e[t]=r())},w=null!=(p=null==(g=r.remotesLoadingData)?void 0:g.chunkMapping)?p:{},T=null!=(d=null==(y=r.remotesLoadingData)?void 0:y.moduleIdToRemoteDataMapping)?d:{},I=null!=(f=null==(b=r.initializeSharingData)?void 0:b.scopeToSharingDataMapping)?f:{},k=null!=(h=null==(S=r.consumesLoadingData)?void 0:S.chunkMapping)?h:{},P=null!=(m=null==(v=r.consumesLoadingData)?void 0:v.moduleIdToConsumeDataMapping)?m:{},j={},x=[],N={},C=null==(O=r.initializeExposesData)?void 0:O.shareScope;for(var D in o())r.federation[D]=o()[D];R(r.federation,"consumesLoadingModuleToHandlerMapping",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(P)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=s[1];e[l]={getter:u.fallback,shareInfo:{shareConfig:{fixedDependencies:!1,requiredVersion:u.requiredVersion,strictVersion:u.strictVersion,singleton:u.singleton,eager:u.eager},scope:[u.shareScope]},shareKey:u.shareKey}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),R(r.federation,"initOptions",function(){return{}}),R(r.federation.initOptions,"name",function(){return"@pih/esm-audit-app"}),R(r.federation.initOptions,"shareStrategy",function(){return"version-first"}),R(r.federation.initOptions,"shared",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(I)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=a(o.value,2),u=l[0],c=l[1],p=!0,d=!1,f=void 0;try{for(var h,m=c[Symbol.iterator]();!(p=(h=m.next()).done);p=!0){var g=h.value;if((void 0===g?"undefined":s(g))==="object"&&null!==g){var y=g.name,b=g.version,S=g.factory,v=g.eager,O=g.singleton,E=g.requiredVersion,M=g.strictVersion,_={},R=function(e){return void 0!==e};R(O)&&(_.singleton=O),R(E)&&(_.requiredVersion=E),R(v)&&(_.eager=v),R(M)&&(_.strictVersion=M);var w={version:b,scope:[u],shareConfig:_,get:S};e[y]?e[y].push(w):e[y]=[w]}}}catch(e){d=!0,f=e}finally{try{p||null==m.return||m.return()}finally{if(d)throw f}}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),_(r.federation.initOptions,"remotes",function(){return Object.values(c).flat().filter(function(e){return"script"===e.externalType})}),_(r.federation.initOptions,"plugins",function(){return u}),R(r.federation,"bundlerRuntimeOptions",function(){return{}}),R(r.federation.bundlerRuntimeOptions,"remotes",function(){return{}}),R(r.federation.bundlerRuntimeOptions.remotes,"chunkMapping",function(){return w}),R(r.federation.bundlerRuntimeOptions.remotes,"remoteInfos",function(){return c}),R(r.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(T)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=s[1];e[l]=[u.shareScope,u.name,u.externalModuleId,u.remoteName]}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),R(r.federation.bundlerRuntimeOptions.remotes,"webpackRequire",function(){return r}),_(r.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",function(){var e={},t=!0,r=!1,n=void 0;try{for(var o,i=Object.entries(T)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var s=a(o.value,2),l=s[0],u=c[s[1].remoteName];u&&(e[l]=u)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}),M(r,"S",r.federation.bundlerRuntime.S),r.federation.attachShareScopeMap&&r.federation.attachShareScopeMap(r),M(r.f,"remotes",function(e,t){return r.federation.bundlerRuntime.remotes({chunkId:e,promises:t,chunkMapping:w,idToExternalAndNameMapping:r.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:r.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:r})}),M(r.f,"consumes",function(e,t){return r.federation.bundlerRuntime.consumes({chunkId:e,promises:t,chunkMapping:k,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping,installedModules:j,webpackRequire:r})}),M(r,"I",function(e,t){return r.federation.bundlerRuntime.I({shareScopeName:e,initScope:t,initPromises:x,initTokens:N,webpackRequire:r})}),M(r,"initContainer",function(e,t,n){return r.federation.bundlerRuntime.initContainerEntry({shareScope:e,initScope:t,remoteEntryInitOptions:n,shareScopeKey:C,webpackRequire:r})}),M(r,"getContainer",function(e,t){var n=r.initializeExposesData.moduleMap;return r.R=t,t=Object.prototype.hasOwnProperty.call(n,e)?n[e]():Promise.resolve().then(function(){throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t}),r.federation.instance=r.federation.runtime.init(r.federation.initOptions),(null==(E=r.consumesLoadingData)?void 0:E.initialConsumes)&&r.federation.bundlerRuntime.installInitialConsumes({webpackRequire:r,installedModules:j,initialConsumes:r.consumesLoadingData.initialConsumes,moduleToHandlerMapping:r.federation.consumesLoadingModuleToHandlerMapping})}},8448(e,t,r){"use strict";r.d(t,{get:()=>r.getContainer,init:()=>r.initContainer})},3054(e){"use strict";e.exports=globalThis._FEDERATION_RUNTIME_CORE},9170(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_ERROR_CODES},1853(e){"use strict";e.exports=globalThis._OPENMRS_FEDERATION_SDK},1772(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,c=l.length;u<c;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},9837(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r(1772);let n=r(7789),o=r(3054),i={...o.helpers.global,getGlobalFederationInstance:n.getGlobalFederationInstance},a=o.helpers.share,s=o.helpers.utils;t.default={global:i,share:a,utils:s},t.global=i,t.share=a,t.utils=s},3738(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),r(1772);let n=r(7789),o=r(3054),i=r(9170);function a(e){let t=new((0,o.getGlobalFederationConstructor)()||o.ModuleFederation)({id:`${e.name}@${e.version||Date.now()}`,...e});return(0,o.setGlobalFederationInstance)(t),t}let s=null;(0,o.setGlobalFederationConstructor)(o.ModuleFederation),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return o.Module}}),t.ModuleFederation=o.ModuleFederation,t.createInstance=a,t.getInstance=function(e){return e?o.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(e)||null:s},Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return o.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return o.getRemoteInfo}}),t.init=function(e){let t=n.getGlobalFederationInstance(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),s||(s=t),t):s=a(r)},t.loadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadRemote.apply(s,e)},Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.loadShare=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShare.apply(s,e)},t.loadShareSync=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.loadShareSync.apply(s,e)},t.preloadRemote=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.preloadRemote.apply(s,e)},Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return o.registerGlobalPlugins}}),t.registerPlugins=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerPlugins.apply(s,e)},t.registerRemotes=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerRemotes.apply(s,e)},t.registerShared=function(...e){return(0,o.assert)(s,i.RUNTIME_009,i.runtimeDescMap),s.registerShared.apply(s,e)}},7789(e,t,r){r(1772);let n=r(3054);t.getGlobalFederationInstance=function(e,t){let r="@pih/esm-audit-app:2.1.1-pre.154";return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},223(e,t){var r=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;t.__toESM=(e,t,l)=>(l=null!=e?r(a(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=i(t),u=0,c=l.length;u<c;u++)a=l[u],s.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(r=o(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e))},3545(e,t){t.attachShareScopeMap=function(e){e.S&&!e.federation.hasAttachShareScopeMap&&e.federation.instance&&e.federation.instance.shareScopeMap&&(e.S=e.federation.instance.shareScopeMap,e.federation.hasAttachShareScopeMap=!0)}},6917(e,t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.FEDERATION_SUPPORTED_TYPES=["script"]},1864(e,t,r){let n=r(3545),o=r(1092),i=r(2677),a=r(85),s=r(6781);t.consumes=function(e){o.updateConsumeOptions(e);let{chunkId:t,promises:r,installedModules:l,webpackRequire:u,chunkMapping:c,moduleToHandlerMapping:p}=e;n.attachShareScopeMap(u),u.o(c,t)&&c[t].forEach(e=>{if(u.o(l,e))return r.push(l[e]);let t=t=>{l[e]=0,u.m[e]=r=>{delete u.c[e];let n=t(),{shareInfo:o}=p[e];if(o?.shareConfig?.layer&&n&&"object"==typeof n)try{n.hasOwnProperty("layer")&&void 0!==n.layer||(n.layer=o.shareConfig.layer)}catch(e){}r.exports=n}},n=t=>{delete l[e],u.m[e]=r=>{throw delete u.c[e],t}};try{let o=u.federation.instance;if(!o)throw Error("Federation instance not found!");let{shareKey:c,getter:d,shareInfo:f,treeShakingGetter:h}=p[e],m=i.getUsedExports(u,c),g={...f};Array.isArray(g.scope)&&Array.isArray(g.scope[0])&&(g.scope=g.scope[0]),m&&(g.treeShaking={usedExports:m,useIn:[o.options.name]});let y=o.loadShare(c,{customShareInfo:g}).then(e=>{if(!1===e){if("function"!=typeof d)throw Error(s.getShortErrorMsg(a.RUNTIME_012,{[a.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},{shareKey:c}));return h?.()||d()}return e});y.then?r.push(l[e]=y.then(t).catch(n)):t(y)}catch(e){n(e)}})}},85(e,t){t.RUNTIME_012="RUNTIME-012"},6781(e,t){t.getShortErrorMsg=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),n&&o.push(`Original Error Message:
2
2
  ${n}`),o.join("\n")}},1315(e,t){t.getSharedFallbackGetter=({shareKey:e,factory:t,version:r,webpackRequire:n,libraryType:o="global"})=>{let{runtime:i,instance:a,bundlerRuntime:s,sharedFallback:l}=n.federation;if(!l)return t;let u=l[e];if(!u)return t;let c=r?u.find(e=>e[1]===r):u[0];if(!c)throw Error(`No fallback item found for shareKey: ${e} and version: ${r}`);return()=>i.getRemoteEntry({origin:n.federation.instance,remoteInfo:{name:c[2],entry:`${n.p}${c[0]}`,type:o,entryGlobalName:c[2],shareScope:"default"}}).then(t=>{if(!t)throw Error(`Failed to load fallback entry for shareKey: ${e} and version: ${r}`);return t.init(n.federation.instance,s).then(()=>t.get())})}},2677(e,t){t.getUsedExports=function(e,t){let r=e.federation.usedExports;if(r)return r[t]}},523(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let n=r(223),o=r(3545),i=r(3586),a=r(1864),s=r(2221),l=r(4307),u=r(1180),c=r(367),p=r(1315),d=r(3738);d=n.__toESM(d);let f={remotes:i.remotes,consumes:a.consumes,I:s.initializeSharing,S:{},installInitialConsumes:l.installInitialConsumes,initContainerEntry:u.initContainerEntry,init:c.init,getSharedFallbackGetter:p.getSharedFallbackGetter},h={runtime:d,instance:void 0,initOptions:void 0,bundlerRuntime:f,attachShareScopeMap:o.attachShareScopeMap,bundlerRuntimeOptions:{}},m=h.instance,g=h.initOptions,y=h.bundlerRuntimeOptions;t.attachShareScopeMap=o.attachShareScopeMap,t.bundlerRuntime=f,t.bundlerRuntimeOptions=y,t.default=h,t.initOptions=g,t.instance=m,Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return d}})},367(e,t,r){let n=r(223),o=r(3738),i=r(9837);i=n.__toESM(i),t.init=function({webpackRequire:e}){let{initOptions:t,runtime:n,sharedFallback:a,bundlerRuntime:s,libraryType:l}=e.federation;if(!t)throw Error("initOptions is required!");return t.plugins||=[],t.plugins.push({name:"tree-shake-plugin",beforeInit(t){let{userOptions:n,origin:u,options:c}=t,p=n.version||c.version;if(!a)return t;let d=n.shared||{},f=[];Object.keys(d).forEach(t=>{(Array.isArray(d[t])?d[t]:[d[t]]).forEach(r=>{f.push([t,r]),"get"in r&&(r.treeShaking||={},r.treeShaking.get=r.get,r.get=s.getSharedFallbackGetter({shareKey:t,factory:r.get,webpackRequire:e,libraryType:l,version:r.version}))})});let h=i.default.global.getGlobalSnapshotInfoByModuleInfo({name:u.name,version:p});return h&&"shared"in h&&(Object.keys(c.shared||{}).forEach(e=>{c.shared[e].forEach(t=>{f.push([e,t])})}),f.forEach(([e,t])=>{((e,t)=>{let n=h.shared.find(t=>t.sharedName===e);if(!n)return;let{treeShaking:i}=t;if(!i)return;let{secondarySharedTreeShakingName:a,secondarySharedTreeShakingEntry:s,treeShakingStatus:c}=n;i.status!==c&&(i.status=c,s&&l&&a&&(i.get=async()=>{let e=await (0,o.getRemoteEntry)({origin:u,remoteInfo:{name:a,entry:s,type:l,entryGlobalName:a,shareScope:"default"}});return await e.init(u,r.federation.bundlerRuntime),e.get()}))})(e,t)})),t}}),n.init(t)}},1180(e,t){t.initContainerEntry=function(e){let{webpackRequire:t,shareScope:r,initScope:n,shareScopeKey:o,remoteEntryInitOptions:i}=e;if(!t.S||!t.federation||!t.federation.instance||!t.federation.initOptions)return;let a=t.federation.instance;a.initOptions({name:t.federation.initOptions.name,remotes:[],...i});let s=i?.shareScopeKeys,l=i?.shareScopeMap;if(o&&"string"!=typeof o)o.forEach(e=>{if(!s||!l)return void a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}});l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})});else{let e=o||"default";Array.isArray(s)?s.forEach(e=>{l[e]||(l[e]={});let t=l[e];a.initShareScopeMap(e,t,{hostShareScopeMap:i?.shareScopeMap||{}})}):a.initShareScopeMap(e,r,{hostShareScopeMap:i?.shareScopeMap||{}})}return(t.federation.attachShareScopeMap&&t.federation.attachShareScopeMap(t),Array.isArray(o))?t.federation.initOptions.shared?t.I(o,n):Promise.all(o.map(e=>t.I(e,n))).then(()=>!0):t.I(o||"default",n)}},2221(e,t,r){let n=r(3545),o=r(6917);t.initializeSharing=function({shareScopeName:e,webpackRequire:t,initPromises:r,initTokens:i,initScope:a}){let s=Array.isArray(e)?e:[e];var l=[],u=function(s){a||(a=[]);let l=t.federation.instance;var u=i[s];if(u||(u=i[s]={from:l.name}),a.indexOf(u)>=0)return;a.push(u);let c=r[s];if(c)return c;var p=r=>{var n=e=>{let t;return t="Initialization of sharing external failed: "+e,"u">typeof console&&console.warn&&console.warn(t)};try{var o=t(r);if(!o)return;var i=r=>r&&r.init&&r.init(t.S[s],a,{shareScopeMap:t.S||{},shareScopeKeys:e});if(o.then)return d.push(o.then(i,n));var l=i(o);if(l&&"boolean"!=typeof l&&l.then)return d.push(l.catch(n))}catch(e){n(e)}};let d=l.initializeSharing(s,{strategy:l.options.shareStrategy,initScope:a,from:"build"});n.attachShareScopeMap(t);let f=t.federation.bundlerRuntimeOptions.remotes;return(f&&Object.keys(f.idToRemoteMap).forEach(e=>{let t=f.idToRemoteMap[e],r=f.idToExternalAndNameMapping[e][2];if(t.length>1)p(r);else if(1===t.length){let e=t[0];o.FEDERATION_SUPPORTED_TYPES.includes(e.externalType)||p(r)}}),d.length)?r[s]=Promise.all(d).then(()=>r[s]=!0):r[s]=!0};return s.forEach(e=>{l.push(u(e))}),Promise.all(l).then(()=>!0)}},4307(e,t,r){let n=r(1092),o=r(2677);t.installInitialConsumes=function(e){n.updateConsumeOptions(e);let{moduleToHandlerMapping:t,webpackRequire:r,installedModules:i,initialConsumes:a,asyncLoad:s}=e,l=[];a.forEach(e=>{l.push([e,()=>(function(e){let{moduleId:t,moduleToHandlerMapping:r,webpackRequire:n,asyncLoad:i}=e,a=n.federation.instance;if(!a)throw Error("Federation instance not found!");let{shareKey:s,shareInfo:l}=r[t];try{let e=o.getUsedExports(n,s),t={...l};if(e&&(t.treeShaking={usedExports:e,useIn:[a.options.name]}),i)return a.loadShare(s,{customShareInfo:t});return a.loadShareSync(s,{customShareInfo:t})}catch(e){throw console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.'),console.error("The original error message is as follows: "),e}})({moduleId:e,moduleToHandlerMapping:t,webpackRequire:r,asyncLoad:s})])});let u=(e,n)=>{r.m[e]=o=>{i[e]=0,delete r.c[e];let a=n();if("function"!=typeof a)throw Error(`Shared module is not available for eager consumption: ${e}`);let s=a(),{shareInfo:l}=t[e];if(l?.shareConfig?.layer&&s&&"object"==typeof s)try{s.hasOwnProperty("layer")&&void 0!==s.layer||(s.layer=l.shareConfig.layer)}catch(e){}o.exports=s}};if(s)return Promise.all(l.map(async([e,t])=>{let r=await t();u(e,()=>r)}));l.forEach(([e,t])=>{u(e,t)})}},3586(e,t,r){r(223);let n=r(3545),o=r(6917),i=r(1092),a=r(1853);t.remotes=function(e){i.updateRemoteOptions(e);let{chunkId:t,promises:r,webpackRequire:s,chunkMapping:l,idToExternalAndNameMapping:u,idToRemoteMap:c}=e;n.attachShareScopeMap(s),s.o(l,t)&&l[t].forEach(e=>{let t=s.R;t||(t=[]);let n=u[e],i=c[e]||[];if(t.indexOf(n)>=0)return;if(t.push(n),n.p)return r.push(n.p);let l=t=>{t||(t=Error("Container missing")),"string"==typeof t.message&&(t.message+=`
3
3
  while loading "${n[1]}" from ${n[2]}`),s.m[e]=()=>{throw t},n.p=0},p=(e,t,o,i,a,s)=>{try{let u=e(t,o);if(!u||!u.then)return a(u,i,s);{let e=u.then(e=>a(e,i),l);if(!s)return e;r.push(n.p=e)}}catch(e){l(e)}};var d=(e,r,o)=>p(r.get,n[1],t,0,f,o),f=t=>{n.p=1,s.m[e]=e=>{e.exports=t()}};1===i.length&&o.FEDERATION_SUPPORTED_TYPES.includes(i[0].externalType)&&i[0].name?p(()=>{try{let e=(0,a.decodeName)(i[0].name,a.ENCODE_NAME_PREFIX)+n[1].slice(1),t=s.federation.instance,r=()=>s.federation.instance.loadRemote(e,{loadFactory:!1,from:"build"});if("version-first"===t.options.shareStrategy){let e=Array.isArray(n[0])?n[0]:[n[0]];return Promise.all(e.map(e=>t.sharedHandler.initializeSharing(e))).then(()=>r())}return r()}catch(e){l(e)}},n[2],0,0,f,1):p(s,n[2],0,0,(e,t,r)=>e?p(s.I,n[0],0,e,d,r):l(),1)})}},1092(e,t){t.updateConsumeOptions=function(e){let{webpackRequire:t,moduleToHandlerMapping:r}=e,{consumesLoadingData:n,initializeSharingData:o}=t,{sharedFallback:i,bundlerRuntime:a,libraryType:s}=t.federation;if(n&&!n._updated){let{moduleIdToConsumeDataMapping:o={},initialConsumes:l=[],chunkMapping:u={}}=n;if(Object.entries(o).forEach(([e,n])=>{r[e]||(r[e]={getter:i?a?.getSharedFallbackGetter({shareKey:n.shareKey,factory:n.fallback,webpackRequire:t,libraryType:s}):n.fallback,treeShakingGetter:i?n.fallback:void 0,shareInfo:{shareConfig:{requiredVersion:n.requiredVersion,strictVersion:n.strictVersion,singleton:n.singleton,eager:n.eager,layer:n.layer},scope:Array.isArray(n.shareScope)?n.shareScope:[n.shareScope||"default"],treeShaking:i?{get:n.fallback,mode:n.treeShakingMode}:void 0},shareKey:n.shareKey})}),"initialConsumes"in e){let{initialConsumes:t=[]}=e;l.forEach(e=>{t.includes(e)||t.push(e)})}if("chunkMapping"in e){let{chunkMapping:t={}}=e;Object.entries(u).forEach(([e,r])=>{t[e]||(t[e]=[]),r.forEach(r=>{t[e].includes(r)||t[e].push(r)})})}n._updated=1}if(o&&!o._updated){let{federation:e}=t;if(!e.instance||!o.scopeToSharingDataMapping)return;let r={};for(let[e,t]of Object.entries(o.scopeToSharingDataMapping))for(let n of t)if("object"==typeof n&&null!==n){let{name:t,version:o,factory:i,eager:a,singleton:s,requiredVersion:l,strictVersion:u}=n,c={requiredVersion:`^${o}`},p=function(e){return void 0!==e};p(s)&&(c.singleton=s),p(l)&&(c.requiredVersion=l),p(a)&&(c.eager=a),p(u)&&(c.strictVersion=u);let d={version:o,scope:[e],shareConfig:c,get:i};r[t]?r[t].push(d):r[t]=[d]}e.instance.registerShared(r),o._updated=1}},t.updateRemoteOptions=function(e){let{webpackRequire:t,idToExternalAndNameMapping:r={},idToRemoteMap:n={},chunkMapping:o={}}=e,{remotesLoadingData:i}=t,a=t.federation?.bundlerRuntimeOptions?.remotes?.remoteInfos;if(!i||i._updated||!a)return;let{chunkMapping:s,moduleIdToRemoteDataMapping:l}=i;if(s&&l){for(let[e,t]of Object.entries(l))if(r[e]||(r[e]=[t.shareScope,t.name,t.externalModuleId]),!n[e]&&a[t.remoteName]){let r=a[t.remoteName];n[e]||=[],r.forEach(t=>{n[e].includes(t)||n[e].push(t)})}o&&Object.entries(s).forEach(([e,t])=>{o[e]||(o[e]=[]),t.forEach(t=>{o[e].includes(t)||o[e].push(t)})}),i._updated=1}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,exports:{}};return i[e].call(r.exports,r,r.exports,s),r.exports}s.m=i,s.c=a,s.x=()=>s(8448),s.federation||(s.federation={chunkMatcher:function(e){return!/^(323|732|769|966|990)$/.test(e)},rootOutputDir:""}),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},u=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);s.r(r);var n={};l=l||[null,u({}),u([]),u(u)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~l.indexOf(o);o=u(o))Object.getOwnPropertyNames(o).forEach(t=>{n[t]=()=>e[t]});return n.default=()=>e,s.d(r,n),r},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".js",s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c={},s.l=function(e,t,r,n){if(c[e])return void c[e].push(t);if(void 0!==r)for(var o,i,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var u=a[l];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@pih/esm-audit-app:"+r){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@pih/esm-audit-app:"+r),o.src=e),c[e]=[t];var p=function(t,r){o.onerror=o.onload=null,clearTimeout(d);var n=c[e];if(delete c[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nc=void 0,s.rv=()=>"1.7.9",s.S={},s.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@openmrs/esm-framework",version:"10.0.1-pre.5263",factory:()=>Promise.all([s.e("689"),s.e("455"),s.e("94"),s.e("990"),s.e("323"),s.e("769"),s.e("966"),s.e("732")]).then(()=>()=>s(7333)),eager:0,singleton:1,requiredVersion:"8.x",strictVersion:0},{name:"i18next",version:"25.6.0",factory:()=>s.e("913").then(()=>()=>s(7304)),eager:0,singleton:1,requiredVersion:"^19.0.0",strictVersion:0},{name:"react-i18next",version:"16.2.3",factory:()=>Promise.all([s.e("349"),s.e("990"),s.e("769")]).then(()=>()=>s(6268)),eager:0,singleton:1,requiredVersion:"16.x",strictVersion:0},{name:"react-router-dom",version:"6.22.3",factory:()=>Promise.all([s.e("689"),s.e("712"),s.e("990")]).then(()=>()=>s(7059)),eager:0,singleton:1,requiredVersion:"^6.x",strictVersion:0},{name:"react",version:"18.2.0",factory:()=>s.e("466").then(()=>()=>s(4041)),eager:0,singleton:1,requiredVersion:"18.x",strictVersion:0},{name:"swr/_internal",version:"2.2.5",factory:()=>Promise.all([s.e("989"),s.e("990")]).then(()=>()=>s(2372)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/immutable",version:"2.2.5",factory:()=>Promise.all([s.e("61"),s.e("990"),s.e("323"),s.e("240")]).then(()=>()=>s(9876)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0},{name:"swr/infinite",version:"2.2.5",factory:()=>Promise.all([s.e("771"),s.e("990"),s.e("323"),s.e("859")]).then(()=>()=>s(2470)),eager:0,singleton:1,requiredVersion:"2.x",strictVersion:0}]},uniqueName:"@pih/esm-audit-app"},s.I=s.I||function(){throw Error("should have __webpack_require__.I")},s.g.importScripts&&(p=s.g.location+"");var l,u,c,p,d=s.g.document;if(!p&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(p=d.currentScript.src),!p)){var f=d.getElementsByTagName("script");if(f.length)for(var h=f.length-1;h>-1&&(!p||!/^http(s?):/.test(p));)p=f[h--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");s.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.consumesLoadingData={chunkMapping:{323:["9966"],966:["9896","8254"],115:["6178"],990:["9485"],769:["1480"],732:["761","7703"]},moduleIdToConsumeDataMapping:{7703:{shareScope:"default",shareKey:"react-router-dom",import:"react-router-dom",requiredVersion:"^6.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("689"),s.e("712")]).then(()=>()=>s(7059))},9485:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("466").then(()=>()=>s(4041))},6178:{shareScope:"default",shareKey:"@openmrs/esm-framework",import:"@openmrs/esm-framework",requiredVersion:"8.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("689"),s.e("455"),s.e("94"),s.e("323"),s.e("769"),s.e("966")]).then(()=>()=>s(7333))},8254:{shareScope:"default",shareKey:"swr/immutable",import:"swr/immutable",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("61").then(()=>()=>s(9876))},761:{shareScope:"default",shareKey:"react-i18next",import:"react-i18next",requiredVersion:"16.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([s.e("349"),s.e("769")]).then(()=>()=>s(6268))},1480:{shareScope:"default",shareKey:"i18next",import:"i18next",requiredVersion:"^19.0.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("913").then(()=>()=>s(7304))},9966:{shareScope:"default",shareKey:"swr/_internal",import:"swr/_internal",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("989").then(()=>()=>s(2372))},9896:{shareScope:"default",shareKey:"swr/infinite",import:"swr/infinite",requiredVersion:"2.x",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>s.e("771").then(()=>()=>s(2470))}},initialConsumes:[]},s.f.consumes=s.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},s.initializeExposesData={moduleMap:{"./start":()=>Promise.all([s.e("990"),s.e("732"),s.e("115")]).then(()=>()=>s(5390))},shareScope:"default"},s.getContainer=s.getContainer||function(){throw Error("should have __webpack_require__.getContainer")},s.initContainer=s.initContainer||function(){throw Error("should have __webpack_require__.initContainer")},e={121:0},s.f.j=function(t,r){var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(323|732|769|966|990)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=o);var i=s.p+s.u(t),a=Error();s.l(i,function(r){if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}},"chunk-"+t,t)}},t=(t,r)=>{var n,o,[i,a,l]=r,u=0;if(i.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);l&&l(s)}for(t&&t(r);u<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},(r=globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),s.ruid="bundler=rspack@1.7.9",n=s.x,o=!1,s.x=function(){if(o||(o=!0,s(3204)),"function"==typeof n)return n();console.warn("[MF] Invalid prevStartup")},_pih_esm_audit_app=s.x()})();
@@ -29,9 +29,9 @@
29
29
  "rendered": true,
30
30
  "initial": false,
31
31
  "entry": false,
32
- "size": 5154,
32
+ "size": 5110,
33
33
  "sizes": {
34
- "javascript": 5154
34
+ "javascript": 5110
35
35
  },
36
36
  "names": [],
37
37
  "idHints": [],
@@ -45,7 +45,7 @@
45
45
  "auxiliaryFiles": [
46
46
  "117.js.map"
47
47
  ],
48
- "hash": "ad6e538df4f33e0c",
48
+ "hash": "0882b3e8a79e8e83",
49
49
  "childrenByOrder": {}
50
50
  },
51
51
  {
@@ -73,7 +73,7 @@
73
73
  "auxiliaryFiles": [
74
74
  "pih-esm-audit-app.js.map"
75
75
  ],
76
- "hash": "143d2d6a7a4fa29b",
76
+ "hash": "71a0fb195f10dde6",
77
77
  "childrenByOrder": {}
78
78
  },
79
79
  {
@@ -206,9 +206,9 @@
206
206
  "rendered": true,
207
207
  "initial": false,
208
208
  "entry": false,
209
- "size": 6184,
209
+ "size": 6134,
210
210
  "sizes": {
211
- "javascript": 6184
211
+ "javascript": 6134
212
212
  },
213
213
  "names": [],
214
214
  "idHints": [],
@@ -222,7 +222,7 @@
222
222
  "auxiliaryFiles": [
223
223
  "508.js.map"
224
224
  ],
225
- "hash": "5102497c7ea84512",
225
+ "hash": "3b9069416bf40695",
226
226
  "childrenByOrder": {}
227
227
  },
228
228
  {
@@ -230,9 +230,9 @@
230
230
  "rendered": true,
231
231
  "initial": false,
232
232
  "entry": false,
233
- "size": 250208,
233
+ "size": 250106,
234
234
  "sizes": {
235
- "javascript": 250208
235
+ "javascript": 250106
236
236
  },
237
237
  "names": [],
238
238
  "idHints": [],
@@ -246,7 +246,7 @@
246
246
  "auxiliaryFiles": [
247
247
  "514.js.map"
248
248
  ],
249
- "hash": "3729b5e74360d92a",
249
+ "hash": "d648c72c6a3e4231",
250
250
  "childrenByOrder": {}
251
251
  },
252
252
  {
@@ -474,7 +474,7 @@
474
474
  "auxiliaryFiles": [
475
475
  "main.js.map"
476
476
  ],
477
- "hash": "72f8b41a68dda11c",
477
+ "hash": "e9f88c0f6bbd223b",
478
478
  "childrenByOrder": {}
479
479
  },
480
480
  {
@@ -482,9 +482,9 @@
482
482
  "rendered": true,
483
483
  "initial": false,
484
484
  "entry": false,
485
- "size": 5861,
485
+ "size": 5812,
486
486
  "sizes": {
487
- "javascript": 5861
487
+ "javascript": 5812
488
488
  },
489
489
  "names": [],
490
490
  "idHints": [],
@@ -498,7 +498,7 @@
498
498
  "auxiliaryFiles": [
499
499
  "912.js.map"
500
500
  ],
501
- "hash": "f0a789336f17a1d7",
501
+ "hash": "40f746c2367391da",
502
502
  "childrenByOrder": {}
503
503
  },
504
504
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","extensions":[{"name":"audit-dashboard-link","slot":"homepage-dashboard-slot","component":"auditDashboardLink","meta":{"name":"audit","slot":"audit-dashboard-slot","title":"Audit"}},{"name":"audit-dashboard","slot":"audit-dashboard-slot","component":"root"}],"version":"2.1.1-pre.148"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","extensions":[{"name":"audit-dashboard-link","slot":"homepage-dashboard-slot","component":"auditDashboardLink","meta":{"name":"audit","slot":"audit-dashboard-slot","title":"Audit"}},{"name":"audit-dashboard","slot":"audit-dashboard-slot","component":"root"}],"version":"2.1.1-pre.154"}
@@ -0,0 +1,118 @@
1
+ {
2
+ "searchBy": "Search by",
3
+ "patients": "Patients",
4
+ "users": "Users",
5
+ "providers": "Providers",
6
+ "auditTrail": "Audit trail",
7
+ "encounterAudit": "Encounter audit",
8
+ "encounterNotFound": "That encounter could not be found.",
9
+ "patient": "Patient",
10
+ "identifier": "Identifier",
11
+ "encounterDate": "Encounter date",
12
+ "location": "Location",
13
+ "visit": "Visit",
14
+ "encounterType": "Encounter type",
15
+ "form": "Form",
16
+ "createdBy": "Created by",
17
+ "changedBy": "Changed by",
18
+ "deletedBy": "Deleted by",
19
+ "deletionReason": "Reason for deletion",
20
+ "encounter": "Encounter",
21
+ "deleted": "Deleted",
22
+ "encounterDeletedSubtitle": "This encounter has been deleted. Its observations are shown as they were left.",
23
+ "encounterDeleted": "Deleted encounter",
24
+ "encounterSummary": "Encounter summary",
25
+ "noProviders": "No providers are recorded for this encounter.",
26
+ "role": "Role",
27
+ "providerName": "Provider name",
28
+ "backToEncounters": "Back to encounters",
29
+ "allEncounterTypes": "All encounter types",
30
+ "encounterDateRange": "Encounter date range",
31
+ "clearFilters": "Clear filters",
32
+ "edited": "Edited",
33
+ "editedLegend": "the value was changed after it was first recorded",
34
+ "addedLater": "Added later",
35
+ "addedLaterLegend": "recorded after the encounter itself was created",
36
+ "deletedLegend": "removed from the encounter",
37
+ "previousValue": "Previous value",
38
+ "previousValueLegend": "the value that an edit replaced",
39
+ "observations": "Observations",
40
+ "showDeletedObs": "Show deleted observations",
41
+ "showConceptDescriptions": "Show concept descriptions",
42
+ "noObservations": "This encounter has no observations.",
43
+ "questionConcept": "Question concept",
44
+ "value": "Value",
45
+ "change": "Change",
46
+ "recordedBy": "Recorded by",
47
+ "wasPreviously": "was {{value}}",
48
+ "changedByUser": "Changed by {{user}}",
49
+ "encounterCreatedAction": "Created encounter",
50
+ "encounterChangedAction": "Changed encounter",
51
+ "encounterDeletedAction": "Deleted encounter",
52
+ "obsRecordedAction": "Recorded observation",
53
+ "obsEditedAction": "Edited observation",
54
+ "obsDeletedAction": "Deleted observation",
55
+ "recordActivity": "Patient activity",
56
+ "readingObservations": "Reading observations from {{read}} of {{total}} encounters…",
57
+ "noActivity": "There is no recorded activity to show.",
58
+ "whoTouchedThisRecord": "Who modified this patient record",
59
+ "user": "User",
60
+ "encountersCreated": "Encounters created",
61
+ "obsRecordedCount": "Observations recorded",
62
+ "obsEditedCount": "Observations edited",
63
+ "obsDeletedCount": "Observations deleted",
64
+ "firstActivity": "First activity",
65
+ "lastActivity": "Last activity",
66
+ "showOnlyThisUser": "Show only this user's activity",
67
+ "unknownUser": "Unknown user",
68
+ "activityLog": "Activity log",
69
+ "showEveryone": "Show everyone",
70
+ "when": "When",
71
+ "action": "Action",
72
+ "detail": "Detail",
73
+ "encounters": "Encounters",
74
+ "noEncountersMatchFilters": "No encounters match these filters.",
75
+ "noEncountersFound": "This patient has no encounters to audit.",
76
+ "provider": "Provider",
77
+ "status": "Status",
78
+ "backToPatientSearch": "Back to patient search",
79
+ "includeDeletedEncounters": "Include deleted encounters",
80
+ "cannotIncludeDeletedEncounters": "Deleted encounters can only be listed for a patient who has an identifier.",
81
+ "deletedEncountersUnavailable": "Deleted encounters unavailable",
82
+ "auditViews": "Audit views",
83
+ "searchForPatient": "Search for a patient by name or identifier",
84
+ "searchToBegin": "Enter a patient name or identifier to begin auditing their records.",
85
+ "patientSearchResults": "Patient search results",
86
+ "noPatientsFound": "No patients match \"{{searchTerm}}\".",
87
+ "patientName": "Patient name",
88
+ "gender": "Gender",
89
+ "age": "Age",
90
+ "birthdate": "Date of birth",
91
+ "backToProviderSearch": "Back to provider search",
92
+ "providerEncountersScope": "These are the encounters this provider is recorded on, which is not the same as the ones they entered or changed — the last column names who did that, and the Users tab searches by it.",
93
+ "recordedAsProvider": "Recorded as provider",
94
+ "noProviderEncountersMatch": "No encounters for this provider match these filters.",
95
+ "noProviderEncounters": "This provider is not recorded on any encounters.",
96
+ "searchForProvider": "Search for a provider by name or identifier",
97
+ "searchProviderToBegin": "Enter a provider name or identifier to see the encounters they are recorded on.",
98
+ "providerSearchResults": "Provider search results",
99
+ "noProvidersFound": "No providers match \"{{searchTerm}}\".",
100
+ "backToUserSearch": "Back to user search",
101
+ "changedBetween": "Changed between",
102
+ "readingUserObservations": "Read {{obsRead}} observations so far…",
103
+ "noUserEncountersMatch": "This user did not change any observations matching these filters.",
104
+ "noUserEncounters": "This user has not recorded or deleted any observations.",
105
+ "userScanStoppedEarly": "Stopped after reading {{obsRead}} observation changes without filling the page. Narrow the date range to search further back.",
106
+ "partialUserScan": "Part of the trail",
107
+ "lastChanged": "Last changed",
108
+ "lookingForMoreEncounters": "Looking for more encounters…",
109
+ "encounterRange": "Encounters {{from}}–{{to}}",
110
+ "searchForUser": "Search for a user by name or username",
111
+ "searchUserToBegin": "Enter a name or username to see the encounters that user has modified.",
112
+ "userSearchResults": "User search results",
113
+ "noUsersFound": "No users match \"{{searchTerm}}\".",
114
+ "name": "Name",
115
+ "username": "Username",
116
+ "retired": "Retired",
117
+ "audit": ""
118
+ }
@@ -0,0 +1,118 @@
1
+ {
2
+ "searchBy": "Search by",
3
+ "patients": "Patients",
4
+ "users": "Users",
5
+ "providers": "Providers",
6
+ "auditTrail": "Audit trail",
7
+ "encounterAudit": "Encounter audit",
8
+ "encounterNotFound": "That encounter could not be found.",
9
+ "patient": "Patient",
10
+ "identifier": "Identifier",
11
+ "encounterDate": "Encounter date",
12
+ "location": "Location",
13
+ "visit": "Visit",
14
+ "encounterType": "Encounter type",
15
+ "form": "Form",
16
+ "createdBy": "Created by",
17
+ "changedBy": "Changed by",
18
+ "deletedBy": "Deleted by",
19
+ "deletionReason": "Reason for deletion",
20
+ "encounter": "Encounter",
21
+ "deleted": "Deleted",
22
+ "encounterDeletedSubtitle": "This encounter has been deleted. Its observations are shown as they were left.",
23
+ "encounterDeleted": "Deleted encounter",
24
+ "encounterSummary": "Encounter summary",
25
+ "noProviders": "No providers are recorded for this encounter.",
26
+ "role": "Role",
27
+ "providerName": "Provider name",
28
+ "backToEncounters": "Back to encounters",
29
+ "allEncounterTypes": "All encounter types",
30
+ "encounterDateRange": "Encounter date range",
31
+ "clearFilters": "Clear filters",
32
+ "edited": "Edited",
33
+ "editedLegend": "the value was changed after it was first recorded",
34
+ "addedLater": "Added later",
35
+ "addedLaterLegend": "recorded after the encounter itself was created",
36
+ "deletedLegend": "removed from the encounter",
37
+ "previousValue": "Previous value",
38
+ "previousValueLegend": "the value that an edit replaced",
39
+ "observations": "Observations",
40
+ "showDeletedObs": "Show deleted observations",
41
+ "showConceptDescriptions": "Show concept descriptions",
42
+ "noObservations": "This encounter has no observations.",
43
+ "questionConcept": "Question concept",
44
+ "value": "Value",
45
+ "change": "Change",
46
+ "recordedBy": "Recorded by",
47
+ "wasPreviously": "was {{value}}",
48
+ "changedByUser": "Changed by {{user}}",
49
+ "encounterCreatedAction": "Created encounter",
50
+ "encounterChangedAction": "Changed encounter",
51
+ "encounterDeletedAction": "Deleted encounter",
52
+ "obsRecordedAction": "Recorded observation",
53
+ "obsEditedAction": "Edited observation",
54
+ "obsDeletedAction": "Deleted observation",
55
+ "recordActivity": "Patient activity",
56
+ "readingObservations": "Reading observations from {{read}} of {{total}} encounters…",
57
+ "noActivity": "There is no recorded activity to show.",
58
+ "whoTouchedThisRecord": "Who modified this patient record",
59
+ "user": "User",
60
+ "encountersCreated": "Encounters created",
61
+ "obsRecordedCount": "Observations recorded",
62
+ "obsEditedCount": "Observations edited",
63
+ "obsDeletedCount": "Observations deleted",
64
+ "firstActivity": "First activity",
65
+ "lastActivity": "Last activity",
66
+ "showOnlyThisUser": "Show only this user's activity",
67
+ "unknownUser": "Unknown user",
68
+ "activityLog": "Activity log",
69
+ "showEveryone": "Show everyone",
70
+ "when": "When",
71
+ "action": "Action",
72
+ "detail": "Detail",
73
+ "encounters": "Encounters",
74
+ "noEncountersMatchFilters": "No encounters match these filters.",
75
+ "noEncountersFound": "This patient has no encounters to audit.",
76
+ "provider": "Provider",
77
+ "status": "Status",
78
+ "backToPatientSearch": "Back to patient search",
79
+ "includeDeletedEncounters": "Include deleted encounters",
80
+ "cannotIncludeDeletedEncounters": "Deleted encounters can only be listed for a patient who has an identifier.",
81
+ "deletedEncountersUnavailable": "Deleted encounters unavailable",
82
+ "auditViews": "Audit views",
83
+ "searchForPatient": "Search for a patient by name or identifier",
84
+ "searchToBegin": "Enter a patient name or identifier to begin auditing their records.",
85
+ "patientSearchResults": "Patient search results",
86
+ "noPatientsFound": "No patients match \"{{searchTerm}}\".",
87
+ "patientName": "Patient name",
88
+ "gender": "Gender",
89
+ "age": "Age",
90
+ "birthdate": "Date of birth",
91
+ "backToProviderSearch": "Back to provider search",
92
+ "providerEncountersScope": "These are the encounters this provider is recorded on, which is not the same as the ones they entered or changed — the last column names who did that, and the Users tab searches by it.",
93
+ "recordedAsProvider": "Recorded as provider",
94
+ "noProviderEncountersMatch": "No encounters for this provider match these filters.",
95
+ "noProviderEncounters": "This provider is not recorded on any encounters.",
96
+ "searchForProvider": "Search for a provider by name or identifier",
97
+ "searchProviderToBegin": "Enter a provider name or identifier to see the encounters they are recorded on.",
98
+ "providerSearchResults": "Provider search results",
99
+ "noProvidersFound": "No providers match \"{{searchTerm}}\".",
100
+ "backToUserSearch": "Back to user search",
101
+ "changedBetween": "Changed between",
102
+ "readingUserObservations": "Read {{obsRead}} observations so far…",
103
+ "noUserEncountersMatch": "This user did not change any observations matching these filters.",
104
+ "noUserEncounters": "This user has not recorded or deleted any observations.",
105
+ "userScanStoppedEarly": "Stopped after reading {{obsRead}} observation changes without filling the page. Narrow the date range to search further back.",
106
+ "partialUserScan": "Part of the trail",
107
+ "lastChanged": "Last changed",
108
+ "lookingForMoreEncounters": "Looking for more encounters…",
109
+ "encounterRange": "Encounters {{from}}–{{to}}",
110
+ "searchForUser": "Search for a user by name or username",
111
+ "searchUserToBegin": "Enter a name or username to see the encounters that user has modified.",
112
+ "userSearchResults": "User search results",
113
+ "noUsersFound": "No users match \"{{searchTerm}}\".",
114
+ "name": "Name",
115
+ "username": "Username",
116
+ "retired": "Retired",
117
+ "audit": ""
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pih/esm-audit-app",
3
- "version": "2.1.1-pre.148",
3
+ "version": "2.1.1-pre.154",
4
4
  "description": "An audit trail for patient encounters and observations in the PIH EMR",
5
5
  "browser": "dist/pih-esm-audit-app.js",
6
6
  "main": "src/index.ts",
@@ -302,19 +302,35 @@ export function useAllPatientEncounters(
302
302
  };
303
303
  }
304
304
 
305
+ /** One entry of the pihapps encounter type count endpoint. */
306
+ interface EncounterTypeCount {
307
+ encounterType: OpenmrsResourceRef;
308
+ count: number;
309
+ }
310
+
305
311
  /**
306
- * Every encounter type in the system, for a filter that cannot be narrowed to what a particular
307
- * search contains. The user drill-down needs this because it discovers encounters lazily and so
308
- * does not know which types a trail holds until it has read all of it. Retired types are left out.
312
+ * The encounter types this implementation actually records against, for a filter that cannot be
313
+ * narrowed to what a particular search contains. The user and provider drill-downs need this
314
+ * because they discover encounters lazily or page them on the server, and so do not know which
315
+ * types a trail holds until all of it is read.
316
+ *
317
+ * Every type in the system would be mostly noise, since which ones are in use varies a great deal
318
+ * by country, so the types come from pihapps' count endpoint, which is asked to leave out those
319
+ * with no encounters. Deleted encounters count, as they do everywhere else in an audit: a type whose
320
+ * encounters have all been deleted still has a trail to look at. Retired types are kept for the
321
+ * same reason, since encounters recorded before a type was retired can still be audited.
309
322
  */
310
- export function useAllEncounterTypes() {
311
- const { data, error, isLoading } = useOpenmrsFetchAll<OpenmrsResourceRef>(
312
- `${restBaseUrl}/encountertype?v=custom:(uuid,display)&limit=${bulkPageSize}`,
313
- restFetchOptions,
323
+ export function useUsedEncounterTypes() {
324
+ const { data, error, isLoading } = useSWR<FetchResponse<{ results: Array<EncounterTypeCount> }>>(
325
+ `${restBaseUrl}/pihapps/encounterTypeCount?includeVoided=true&onlyUsed=true&v=custom:(uuid,display)`,
326
+ openmrsFetch,
314
327
  );
315
328
 
316
329
  const encounterTypes = useMemo(
317
- () => (data ?? []).slice().sort((a, b) => (a.display ?? '').localeCompare(b.display ?? '')),
330
+ () =>
331
+ (data?.data?.results ?? [])
332
+ .map((entry) => entry.encounterType)
333
+ .sort((a, b) => (a.display ?? '').localeCompare(b.display ?? '')),
318
334
  [data],
319
335
  );
320
336
 
@@ -170,23 +170,8 @@
170
170
  background-color: $color-blue-10;
171
171
  }
172
172
 
173
- /* Paging a list whose length is not known: a range and two buttons, no page count. */
174
- .lazyPagination {
175
- display: flex;
176
- align-items: center;
177
- gap: layout.$spacing-03;
178
- padding: layout.$spacing-03 0;
179
- border-top: 1px solid $ui-03;
180
- }
181
-
182
- .paginationRange {
183
- @include type.type-style('label-01');
184
- color: $text-02;
185
- margin-right: auto;
186
- }
187
-
188
- /* Sits inline with the paging controls, so the row does not jump as it appears and goes. */
173
+ /* Sits above the pager while the trail is still being read, so the list does not look finished. */
189
174
  .discovering {
190
175
  min-height: auto;
191
- margin-right: layout.$spacing-03;
176
+ margin-bottom: layout.$spacing-03;
192
177
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { render, screen, waitFor } from '@testing-library/react';
2
+ import { render, screen, waitFor, within } from '@testing-library/react';
3
3
  import userEvent from '@testing-library/user-event';
4
4
  import { SWRConfig } from 'swr';
5
5
  import { openmrsFetch, useConfig } from '@openmrs/esm-framework';
@@ -41,15 +41,20 @@ const encounters: Array<AuditEncounter> = [
41
41
  },
42
42
  ];
43
43
 
44
- const encounterTypes = [
45
- { uuid: 'type-2', display: 'Inscription' },
46
- { uuid: 'type-1', display: 'Oncology Consultation' },
44
+ const encounterTypeCounts = [
45
+ { encounterType: { uuid: 'type-2', display: 'Inscription' }, count: 12 },
46
+ { encounterType: { uuid: 'type-3', display: 'Never Recorded' }, count: 0 },
47
+ { encounterType: { uuid: 'type-1', display: 'Oncology Consultation' }, count: 30 },
47
48
  ];
48
49
 
49
50
  function mockRestApi({ results = encounters } = {}) {
50
51
  mockOpenmrsFetch.mockImplementation((url: string) => {
51
- if (url.includes('/encountertype')) {
52
- return Promise.resolve({ data: { results: encounterTypes } }) as ReturnType<typeof openmrsFetch>;
52
+ if (url.includes('/pihapps/encounterTypeCount')) {
53
+ // the endpoint leaves out unused types only when asked, so the mock does too
54
+ const results = url.includes('onlyUsed=true')
55
+ ? encounterTypeCounts.filter((entry) => entry.count > 0)
56
+ : encounterTypeCounts;
57
+ return Promise.resolve({ data: { results } }) as ReturnType<typeof openmrsFetch>;
53
58
  }
54
59
  if (url.includes('/pihapps/encounter?')) {
55
60
  return Promise.resolve({ data: { results, totalCount: results.length } }) as ReturnType<typeof openmrsFetch>;
@@ -153,6 +158,28 @@ describe('<ProviderEncounters />', () => {
153
158
  expect(await screen.findByText(/not the same as the ones they entered or changed/i)).toBeInTheDocument();
154
159
  });
155
160
 
161
+ it('offers only the encounter types something has been recorded against', async () => {
162
+ renderProviderEncounters();
163
+ await screen.findByRole('cell', { name: 'Oncology Consultation' });
164
+
165
+ await userEvent.click(screen.getByRole('combobox', { name: /encounter type/i }));
166
+
167
+ const options = within(screen.getByRole('listbox')).getAllByRole('option');
168
+ expect(options.map((option) => option.textContent)).toEqual(['Inscription', 'Oncology Consultation']);
169
+ });
170
+
171
+ it('counts deleted encounters towards their type, as the rest of the audit does', async () => {
172
+ renderProviderEncounters();
173
+ await screen.findByRole('cell', { name: 'Oncology Consultation' });
174
+
175
+ const countUrls = mockOpenmrsFetch.mock.calls
176
+ .map(([url]) => String(url))
177
+ .filter((url) => url.includes('/pihapps/encounterTypeCount'));
178
+ expect(countUrls.length).toBeGreaterThan(0);
179
+ expect(countUrls.every((url) => url.includes('includeVoided=true'))).toBe(true);
180
+ expect(countUrls.every((url) => url.includes('onlyUsed=true'))).toBe(true);
181
+ });
182
+
156
183
  it('narrows the search on the server by encounter type', async () => {
157
184
  renderProviderEncounters();
158
185
  await screen.findByRole('cell', { name: 'Oncology Consultation' });
@@ -17,7 +17,7 @@ import {
17
17
  import { ArrowLeftIcon, ErrorState, useConfig } from '@openmrs/esm-framework';
18
18
  import { type Config } from '../config-schema';
19
19
  import { formatAuditDatetime, formatUserAndDate } from './audit-format';
20
- import { useAllEncounterTypes, useAuditProvider, useProviderEncounters } from './audit.resource';
20
+ import { useAuditProvider, useProviderEncounters, useUsedEncounterTypes } from './audit.resource';
21
21
  import { type EncounterFilters, hasActiveFilters } from './encounter-filters';
22
22
  import EncounterFiltersBar from './encounter-filters.component';
23
23
  import styles from './audit.scss';
@@ -47,7 +47,7 @@ export default function ProviderEncounters({
47
47
  const [filters, setFilters] = useState<EncounterFilters>({});
48
48
 
49
49
  const { provider, error: providerError, isLoading: isLoadingProvider } = useAuditProvider(providerUuid);
50
- const { encounterTypes, isLoading: isLoadingTypes } = useAllEncounterTypes();
50
+ const { encounterTypes, isLoading: isLoadingTypes } = useUsedEncounterTypes();
51
51
  const { encounters, totalCount, currentPage, goTo, error, isLoading } = useProviderEncounters(
52
52
  providerUuid,
53
53
  pageSize,
@@ -66,7 +66,7 @@ export default function ProviderEncounters({
66
66
 
67
67
  {/*
68
68
  Both filters narrow on the server, so the page count and totals stay right — which is why
69
- the encounter types come from the system-wide list rather than from what is on screen.
69
+ the encounter types come from those in use system-wide rather than from what is on screen.
70
70
  */}
71
71
  <EncounterFiltersBar
72
72
  encounterTypes={encounterTypes}