@kenyaemr/esm-patient-registration-app 4.5.1 → 4.5.3
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.
- package/dist/130.js +2 -0
- package/dist/{858.js.LICENSE.txt → 130.js.LICENSE.txt} +2 -0
- package/dist/130.js.map +1 -0
- package/dist/196.js +1 -0
- package/dist/196.js.map +1 -0
- package/dist/208.js +2 -0
- package/dist/208.js.map +1 -0
- package/dist/317.js +1 -1
- package/dist/317.js.map +1 -1
- package/dist/319.js +1 -0
- package/dist/330.js +1 -1
- package/dist/537.js +1 -0
- package/dist/537.js.map +1 -0
- package/dist/59.js +1 -1
- package/dist/59.js.map +1 -1
- package/dist/591.js +1 -1
- package/dist/591.js.map +1 -1
- package/dist/62.js +1 -1
- package/dist/62.js.map +1 -1
- package/dist/635.js +1 -1
- package/dist/635.js.map +1 -1
- package/dist/68.js +1 -1
- package/dist/68.js.map +1 -1
- package/dist/735.js +1 -1
- package/dist/742.js +1 -0
- package/dist/742.js.map +1 -0
- package/dist/757.js +1 -1
- package/dist/784.js.map +1 -1
- package/dist/788.js +1 -0
- package/dist/807.js +1 -1
- package/dist/821.js +1 -1
- package/dist/821.js.map +1 -1
- package/dist/833.js +1 -1
- package/dist/857.js +1 -0
- package/dist/857.js.map +1 -0
- package/dist/9.js +1 -1
- package/dist/9.js.map +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js.buildmanifest.json +154 -110
- package/dist/kenyaemr-esm-patient-registration-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -0
- package/package.json +2 -2
- package/src/add-patient-link.test.tsx +18 -0
- package/src/config-schema.ts +19 -3
- package/src/index.ts +36 -105
- package/src/nav-link.test.tsx +13 -0
- package/src/patient-registration/field/address/address-field.component.tsx +1 -1
- package/src/patient-registration/field/address/address-hierarchy-levels.component.tsx +1 -1
- package/src/patient-registration/field/field.test.tsx +291 -0
- package/src/patient-registration/field/name/name-field.component.tsx +45 -28
- package/src/patient-registration/form-manager.ts +1 -0
- package/src/patient-registration/input/combo-input/combo-input.component.tsx +31 -28
- package/src/patient-registration/input/input.scss +5 -0
- package/src/patient-registration/section/death-info/death-info-section.test.tsx +9 -6
- package/src/root.component.tsx +11 -11
- package/src/routes.json +56 -0
- package/translations/am.json +91 -0
- package/translations/es.json +91 -0
- package/translations/fr.json +8 -6
- package/translations/he.json +8 -6
- package/translations/km.json +8 -6
- package/dist/144.js +0 -2
- package/dist/144.js.map +0 -1
- package/dist/207.js +0 -1
- package/dist/207.js.map +0 -1
- package/dist/805.js +0 -1
- package/dist/805.js.map +0 -1
- package/dist/858.js +0 -2
- package/dist/858.js.map +0 -1
- package/dist/876.js +0 -1
- package/dist/876.js.map +0 -1
- package/dist/887.js +0 -1
- package/dist/887.js.map +0 -1
- package/dist/kenyaemr-esm-patient-registration-app.old +0 -1
- /package/dist/{144.js.LICENSE.txt → 208.js.LICENSE.txt} +0 -0
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t,e,n={225:(t,e,n)=>{"use strict";n.d(e,{X8:()=>u,bs:()=>a});var r=n(906);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id"];function s(t){return"'".concat(t.map((function(t){return t.id})).join("', '"),"'")}r.Type.Array,"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(a.map((function(t){return t.id})).join("', '"),"'."),r.Type.String,r.Type.Array,r.Type.String,"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(a.map((function(t){return t.id})).join("', '"),"'."),r.Type.String,r.Type.Array,"The parts to include in the section. Can be any of the following built-in fields: ".concat(u.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.UUID,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.ConceptUuid,r.Type.Array,r.Type.UUID,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.Boolean,r.Type.Object,r.Type.Boolean,r.Type.Number,r.Type.Number,r.Type.String,r.validators.isUrlWithTemplateParameters(["patientUuid"]),r.Type.ConceptUuid,r.Type.Array,r.Type.PatientIdentifierTypeUuid,r.Type.UUID,r.Type.UUID,r.Type.UUID,(0,r.validator)((function(t){return!t.fieldDefinitions.some((function(t){return"obs"==t.type}))||null!=t.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(t){return t.sections.every((function(e){return i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})).includes(e)}))}),(function(t){var e=i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})),n=t.sections.find((function(t){return!e.includes(t)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(s(a))+(t.sectionDefinitions.length?"; and the defined sections ".concat(s(t.sectionDefinitions),"."):".")})),(0,r.validator)((function(t){return t.sectionDefinitions.every((function(e){return e.fields.every((function(e){return i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))).includes(e)}))}))}),(function(t){var e=i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))),n=t.sectionDefinitions.find((function(t){return t.fields.some((function(t){return!e.includes(t)}))})),r=n.fields.find((function(t){return!e.includes(t)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(t.fieldDefinitions.length?"; or the defined fields ".concat(s(t.fieldDefinitions),"."):".")}))},8179:(t,e,n)=>{"use strict";n.d(e,{Kt:()=>s,QT:()=>c,UO:()=>u});var r,o,i,a=n(906),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",s="patient-registration",c=(r={},i="network-first",(o=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r)},7068:(t,e,n)=>{"use strict";n(906),n(3076),n(225),n(8179),n(6279),n(3979)},6279:(t,e,n)=>{"use strict";n.d(e,{Cg:()=>_,St:()=>E,Te:()=>T,mt:()=>O});var r=n(268),o=n.n(r),a=n(286),u=n(2777),s=n(8407),c=n(906),l=n(8179);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t){if(Array.isArray(t))return t}function p(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,u,"next",t)}function u(t){p(i,r,o,a,u,"throw",t)}a(void 0)}))}}function v(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(t,e){return d(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||w(t,e)||y()}function g(t){return d(t)||v(t)||w(t,i)||y()}function m(t){return function(t){if(Array.isArray(t))return f(t)}(t)||v(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}var Z=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},_=o().createContext(null);function T(){return j.apply(this,arguments)}function j(){return(j=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function O(){return S.apply(this,arguments)}function S(){return(S=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/relationshiptype?v=default")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function E(){return A.apply(this,arguments)}function A(){return(A=h((function(){var t,e,n,r,o,i;return Z(this,(function(u){switch(u.label){case 0:return[4,x()];case 1:return t=u.sent(),e=t.filter(Boolean),[4,Promise.all([C()].concat(m(e.map((function(t){return D(t.uuid)})))))];case 2:for(n=g.apply(void 0,[u.sent()]),r=n[0],o=n.slice(1),i=0;i<(null==e?void 0:e.length);i++)e[i].identifierSources=o[i].data.results.map((function(t){var e=(0,a.Z)(r.data.results,{source:{uuid:t.uuid}});return t.autoGenerationOption=e,t}));return[2,e]}}))}))).apply(this,arguments)}function x(){return P.apply(this,arguments)}function P(){return(P=h((function(){var t,e,n,r,o,i,a,u,s,c;return Z(this,(function(l){switch(l.label){case 0:return[4,Promise.all([I("/ws/rest/v1/patientidentifiertype?v=custom:(display,uuid,name,format,required,uniquenessBehavior)"),I("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType")])];case 1:return t=b.apply(void 0,[l.sent(),2]),e=t[0],n=t[1],e.ok?(u=null==e||null===(r=e.data)||void 0===r?void 0:r.results,s=null==n||null===(o=n.data)||void 0===o||null===(i=o.results)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.metadataUuid,c=[],u.forEach((function(t){t.uuid!==s&&c.push(L(t,!1))})),[2,c]):[2,[]]}}))}))).apply(this,arguments)}function D(t){return k.apply(this,arguments)}function k(){return(k=h((function(t){return Z(this,(function(e){switch(e.label){case 0:return[4,I("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(t))];case 1:return[2,e.sent()]}}))}))).apply(this,arguments)}function C(t){return U.apply(this,arguments)}function U(){return(U=h((function(t){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/idgen/autogenerationoption?v=full")];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function I(t){return N.apply(this,arguments)}function N(){return(N=h((function(t){var e;return Z(this,(function(n){switch(n.label){case 0:return e=new AbortController,[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(t)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(t,{headers:l.QT,signal:null==e?void 0:e.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function L(t,e){return{name:t.display,fieldName:(0,u.Z)(t.name),required:t.required,uuid:t.uuid,format:t.format,isPrimary:e,uniquenessBehavior:t.uniquenessBehavior}}},3076:(t,e,n)=>{"use strict";n.d(e,{I:()=>y});var r=n(906),o=n(8179),i=n(7117);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){l(t,e,n[e])}))}return t}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p,h=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},v=function(){function t(){c(this,t)}return t.saveRelationships=function(t,e){return s((function(){return h(this,(function(n){return[2,Promise.all(t.filter((function(t){return t.relationshipType})).filter((function(t){return!!t.action})).map((function(t){var n=t.relatedPersonUuid,r=t.relationshipType,o=t.uuid,a=t.action,u=d(r.split("/"),2),s=u[0],c=u[1],l=e.data.uuid,f="aIsToB"===c,p={personA:f?n:l,personB:f?l:n,relationshipType:s};switch(a){case"ADD":return(0,i.bL)(p);case"UPDATE":return(0,i.r6)(o,p);case"DELETE":return(0,i.kE)(o)}})))]}))}))()},t.saveObservations=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){if(t&&Object.keys(t).length>0){if(o.registrationObs.encounterTypeUuid)return a={encounterDatetime:new Date,patient:e.data.uuid,encounterType:o.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:o.registrationObs.encounterProviderRoleUuid}],form:o.registrationObs.registrationFormUuid,obs:Object.keys(t).map((function(e){return{concept:e,value:t[e]}}))},[2,(0,i.M1)(a)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},t.savePatientIdentifiers=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){var c;return a=Object.values(n).filter((function(t){var e=t.identifierValue,n=t.autoGeneration,r=t.selectedSource;return e||n&&r})).map((c=s((function(n){var r,a,u,s,c,l,f,d,p,v;return h(this,(function(h){switch(h.label){case 0:return r=n.identifierTypeUuid,a=n.identifierValue,u=n.identifierUuid,s=n.selectedSource,c=n.preferred,l=n.autoGeneration,f=n.initialValue,l?[3,1]:(p=a,[3,4]);case 1:return[4,(0,i.fX)(s.uuid)];case 2:return[4,h.sent().data.identifier];case 3:p=h.sent(),h.label=4;case 4:return v={uuid:u,identifier:d=p,identifierType:r,location:o,preferred:c},t?[3,8]:f?[3,6]:[4,(0,i.eb)(e,v)];case 5:return h.sent(),[3,8];case 6:return f===d?[3,8]:[4,(0,i.nI)(e,u,v.identifier)];case 7:h.sent(),h.label=8;case 8:return[2,v]}}))})),function(t){return c.apply(this,arguments)})),e&&Object.keys(r).filter((function(t){return!n[t]})).forEach(function(){var t=s((function(t){return h(this,(function(n){switch(n.label){case 0:return[4,(0,i.ZB)(e,r[t].identifierUuid)];case 1:return n.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[2,Promise.all(a)]}))}))()},t.getDeletedNames=function(t,e){return(null==e?void 0:e.additionalNameUuid)?[{nameUuid:e.additionalNameUuid,personUuid:t}]:[]},t.getPatientToCreate=function(e,n,r,o,i){var a,u,s;return u=n.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](u):u instanceof s)?[n.birthdate.getFullYear(),n.birthdate.getMonth()+1,n.birthdate.getDate()].join("-"):n.birthdate,{uuid:n.patientUuid,person:f({uuid:n.patientUuid,names:t.getNames(n,r),gender:n.gender.charAt(0),birthdate:a,birthdateEstimated:n.birthdateEstimated,attributes:t.getPatientAttributes(e,n,r),addresses:[n.address]},t.getPatientDeathInfo(n)),identifiers:i}},t.getNames=function(t,e){var n=[{uuid:e.preferredNameUuid,preferred:!0,givenName:t.givenName,middleName:t.middleName,familyName:t.familyName}];return t.addNameInLocalLanguage&&n.push({uuid:e.additionalNameUuid,preferred:!1,givenName:t.additionalGivenName,middleName:t.additionalMiddleName,familyName:t.additionalFamilyName}),n},t.getPatientAttributes=function(t,e,n){var o,i=[];return e.attributes&&(Object.entries(e.attributes).filter((function(t){return!!d(t,2)[1]})).forEach((function(t){var e=d(t,2),n=e[0],r=e[1];i.push({attributeType:n,value:r})})),!t&&e.patientUuid&&Object.entries(e.attributes).filter((function(t){return!d(t,2)[1]})).forEach((o=s((function(t){var o,i,a;return h(this,(function(u){switch(u.label){case 0:return o=d(t,1),i=o[0],a=n["attribute.".concat(i)],[4,(0,r.openmrsFetch)("/ws/rest/v1/person/".concat(e.patientUuid,"/attribute/").concat(a),{method:"DELETE"}).catch((function(t){console.error(t)}))];case 1:return u.sent(),[2]}}))})),function(t){return o.apply(this,arguments)}))),e.unidentifiedPatient&&i.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),i},t.getPatientDeathInfo=function(t){var e=t.isDead,n=t.deathDate,r=t.deathCause;return{dead:e,deathDate:e?n:void 0,causeOfDeath:e?r:void 0}},t.mapPatientToFhirPatient=function(t){var e,n,r,o,i,a;return{id:t.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(e=t.person)||void 0===e?void 0:e.gender],birthDate:null===(n=t.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:t.person.dead,deceasedDateTime:t.person.deathDate,name:null===(r=t.person)||void 0===r||null===(o=r.names)||void 0===o?void 0:o.map((function(t){return{given:[t.givenName,t.middleName].filter(Boolean),family:t.familyName}})),address:null===(i=t.person)||void 0===i?void 0:i.addresses.map((function(t){return{city:t.cityVillage,country:t.country,postalCode:t.postalCode,state:t.stateProvince,use:"home"}})),telecom:null===(a=t.person.attributes)||void 0===a?void 0:a.filter((function(t){return"Telephone Number"===t.attributeType}))}},t}();v.savePatientFormOffline=(p=s((function(t,e,n,i,a,u,s,c,l){var f;return h(this,(function(d){switch(d.label){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(t,e,n,i,[])),_patientRegistrationData:{isNewPatient:t,formValues:e,patientUuidMap:n,initialAddressFieldValues:i,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:s,currentUser:c,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(o.Kt,f,{id:e.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(t,e,n,r,o,i,a,u,s){return p.apply(this,arguments)}),v.savePatientFormOnline=function(){var t=s((function(t,e,n,r,o,a,u,c,l,f,d){var p,y,b;return h(this,(function(d){switch(d.label){case 0:return[4,v.savePatientIdentifiers(t,e.patientUuid,e.identifiers,u,a)];case 1:return p=d.sent(),y=v.getPatientToCreate(t,e,n,r,p),v.getDeletedNames(e.patientUuid,n).forEach(function(){var t=s((function(t){return h(this,(function(e){switch(e.label){case 0:return[4,(0,i.uO)(t.nameUuid,t.personUuid)];case 1:return e.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[4,(0,i.co)(y,t&&!f.patientSaved?void 0:e.patientUuid)];case 2:return(b=d.sent()).ok?(f.patientSaved=!0,[4,v.saveRelationships(e.relationships,b)]):[3,6];case 3:return d.sent(),[4,v.saveObservations(e.obs,b,a,c,l)];case 4:return d.sent(),l.concepts.patientPhotoUuid&&(null==o?void 0:o.imageData)?[4,(0,i.oV)(b.data.uuid,o.imageData,"/ws/rest/v1/obs",o.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2,b.data.uuid]}}))}));return function(e,n,r,o,i,a,u,s,c,l,f){return t.apply(this,arguments)}}();var y=function t(){c(this,t),this.patientSaved=!1}},7117:(t,e,n)=>{"use strict";n.d(e,{M1:()=>d,M8:()=>Z,Uu:()=>w,ZB:()=>E,bL:()=>v,co:()=>f,eb:()=>T,f$:()=>x,fX:()=>p,kE:()=>b,nI:()=>O,oV:()=>g,r6:()=>y,uO:()=>h});var r=n(268),o=n(3255),i=n(2303),a=n(906);function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}var c=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};function l(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);var i=new Blob([r],{type:n});return new File([i],"patient-photo.png")}function f(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:n.signal})}function d(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(t,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:e.signal})}function h(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(e,"/name/").concat(t),{method:"DELETE",signal:n.signal})}function v(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function y(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:e.relationshipType},signal:n.signal})}function b(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function g(t,e,n,r,o){return m.apply(this,arguments)}function m(){return(m=s((function(t,e,n,r,o){var i,u;return c(this,(function(s){return i=new AbortController,(u=new FormData).append("patient",t),u.append("file",l(e)),u.append("json",JSON.stringify({person:t,concept:o,groupMembers:[],obsDatetime:r})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:i.signal,body:u})]}))}))).apply(this,arguments)}function w(t){var e,n,r,i=(0,a.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(t,"&concept=").concat(i,"&v=full"),s=(0,o.ZP)(t?u:null,a.openmrsFetch),c=s.data,l=s.error,f=s.isLoading,d=null==c||null===(e=c.data)||void 0===e?void 0:e.results[0];return{data:d?{dateTime:null==d?void 0:d.obsDatetime,imageSrc:null==d||null===(n=d.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:l,isLoading:f}}function Z(t){return _.apply(this,arguments)}function _(){return(_=s((function(t){var e;return c(this,(function(n){return e=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(t),{signal:e.signal})]}))}))).apply(this,arguments)}function T(t,e){return j.apply(this,arguments)}function j(){return(j=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:e})]}))}))).apply(this,arguments)}function O(t,e,n){return S.apply(this,arguments)}function S(){return(S=s((function(t,e,n){var r;return c(this,(function(o){return r=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function E(t,e){return A.apply(this,arguments)}function A(){return(A=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function x(t,e){var n,o=(0,i.Z)(t?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=".concat(e,"&searchString=").concat(t):null,a.openmrsFetch),u=o.data,s=o.error,c=o.isLoading,l=(0,r.useMemo)((function(){var t;return{addresses:null!==(n=null==u||null===(t=u.data)||void 0===t?void 0:t.map((function(t){return t.address})))&&void 0!==n?n:[],error:s,isLoading:c}}),[null==u?void 0:u.data,s,c]);return l}},452:(t,e,n)=>{"use strict";var r=n(268),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=r.useState,a=r.useEffect,u=r.useLayoutEffect,s=r.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!o(t,n)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=i({inst:{value:n,getSnapshot:e}}),o=r[0].inst,l=r[1];return u((function(){o.value=n,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,n,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),s(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},3100:(t,e,n)=>{"use strict";t.exports=n(452)},3979:(t,e,n)=>{var r={"./en.json":[3574,574],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function o(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],o=e[0];return n.e(e[1]).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o},6300:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(8804);const o=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const u=a},8896:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"Map")},3549:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const r=(0,n(2411).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const u=a;var s=n(6300),c=n(8896);const l=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function f(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(c.Z||s.Z),string:new u}},f.prototype.delete=function(t){var e=l(this,t).delete(t);return this.size-=e?1:0,e},f.prototype.get=function(t){return l(this,t).get(t)},f.prototype.has=function(t){return l(this,t).has(t)},f.prototype.set=function(t,e){var n=l(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const d=f},3761:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(6300);var o=n(8896),i=n(3549);function a(t){var e=this.__data__=new r.Z(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!o.Z||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.Z(a)}return n.set(t,e),this.size=n.size,this};const u=a},187:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Uint8Array},7178:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(4405),o=n(7885),i=n(2143),a=n(6401),u=n(8532),s=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,o.Z)(t),c=!n&&(0,r.Z)(t),l=!n&&!c&&(0,i.Z)(t),f=!n&&!c&&!l&&(0,u.Z)(t),d=n||c||l||f,p=d?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=p.length;for(var v in t)!e&&!s.call(t,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||(0,a.Z)(v,h))||p.push(v);return p}},5598:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},5810:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},2938:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(5810),o=n(7885);const i=function(t,e,n){var i=e(t);return(0,o.Z)(t)?i:(0,r.Z)(i,n(t))}},8147:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0;var s=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}(t):function(t){return s.call(t)}(t)}},5745:(t,e,n)=>{"use strict";n.d(e,{Z:()=>B});var r=n(3761),o=n(3549);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o.Z;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},i.prototype.has=function(t){return this.__data__.has(t)};const a=i,u=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},s=function(t,e,n,r,o,i){var s=1&n,c=t.length,l=e.length;if(c!=l&&!(s&&l>c))return!1;var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=-1,h=!0,v=2&n?new a:void 0;for(i.set(t,e),i.set(e,t);++p<c;){var y=t[p],b=e[p];if(r)var g=s?r(b,y,p,e,t,i):r(y,b,p,t,e,i);if(void 0!==g){if(g)continue;h=!1;break}if(v){if(!u(e,(function(t,e){if(a=e,!v.has(a)&&(y===t||o(y,t,n,r,i)))return v.push(e);var a}))){h=!1;break}}else if(y!==b&&!o(y,b,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h};var c=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),h=c.Z?c.Z.prototype:void 0,v=h?h.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var g=n(4558),m=n(7885),w=n(2143),Z=n(8532),_="[object Arguments]",T="[object Array]",j="[object Object]",O=Object.prototype.hasOwnProperty;const S=function(t,e,n,o,i,a){var u=(0,m.Z)(t),c=(0,m.Z)(e),h=u?T:(0,g.Z)(t),S=c?T:(0,g.Z)(e),E=(h=h==_?j:h)==j,A=(S=S==_?j:S)==j,x=h==S;if(x&&(0,w.Z)(t)){if(!(0,w.Z)(e))return!1;u=!0,E=!1}if(x&&!E)return a||(a=new r.Z),u||(0,Z.Z)(t)?s(t,e,n,o,i,a):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new l.Z(t),new l.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=d.Z;case"[object Set]":var c=1&r;if(u||(u=p.Z),t.size!=e.size&&!c)return!1;var h=a.get(t);if(h)return h==e;r|=2,a.set(t,e);var y=s(u(t),u(e),r,o,i,a);return a.delete(t),y;case"[object Symbol]":if(v)return v.call(t)==v.call(e)}return!1}(t,e,h,n,o,i,a);if(!(1&n)){var P=E&&O.call(t,"__wrapped__"),D=A&&O.call(e,"__wrapped__");if(P||D){var k=P?t.value():t,C=D?e.value():e;return a||(a=new r.Z),i(k,C,n,o,a)}}return!!x&&(a||(a=new r.Z),function(t,e,n,r,o,i){var a=1&n,u=(0,y.Z)(t),s=u.length;if(s!=(0,y.Z)(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:b.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++c<s;){var v=t[l=u[c]],g=e[l];if(r)var m=a?r(g,v,l,e,t,i):r(v,g,l,t,e,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var w=t.constructor,Z=e.constructor;w==Z||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,o,i,a))};var E=n(3391);const A=function t(e,n,r,o,i){return e===n||(null==e||null==n||!(0,E.Z)(e)&&!(0,E.Z)(n)?e!=e&&n!=n:S(e,n,r,o,t,i))};var x=n(3122);const P=function(t){return t==t&&!(0,x.Z)(t)};var D=n(6623);const k=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},C=function(t){var e=function(t){for(var e=(0,D.Z)(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,P(o)]}return e}(t);return 1==e.length&&e[0][2]?k(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,o){var i=n.length,a=i,u=!o;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],f=s[1];if(u&&s[2]){if(void 0===l&&!(c in t))return!1}else{var d=new r.Z;if(o)var p=o(l,f,c,t,e,d);if(!(void 0===p?A(f,l,3,o,d):p))return!1}}return!0}(n,t,e)}};var U=n(2082),I=n(7969);const N=function(t,e){for(var n=0,r=(e=(0,U.Z)(e,t)).length;null!=t&&n<r;)t=t[(0,I.Z)(e[n++])];return n&&n==r?t:void 0},L=function(t,e){return null!=t&&e in Object(t)};var F=n(8693);var R=n(3502);const M=function(t,e){return(0,R.Z)(t)&&P(e)?k((0,I.Z)(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:N(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?function(t,e){return null!=t&&(0,F.Z)(t,e,L)}(n,t):A(e,r,3)}},V=function(t){return t},z=function(t){return(0,R.Z)(t)?(e=(0,I.Z)(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return N(e,t)}}(t);var e},B=function(t){return"function"==typeof t?t:null==t?V:"object"==typeof t?(0,m.Z)(t)?M(t[0],t[1]):C(t):z(t)}},3225:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return function(e){return t(e)}}},2082:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(3502),i=n(1354),a=n(63);const u=function(t,e){return(0,r.Z)(t)?t:(0,o.Z)(t,e)?[t]:(0,i.Z)((0,a.Z)(t))}},6994:(t,e,n)=>{"use strict";n.d(e,{Z:()=>D});const r=(o={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(t){return null==o?void 0:o[t]});var o,i=n(63),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var c=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="["+d+"]",h="\\d+",v="["+l+"]",y="[^\\ud800-\\udfff"+d+h+"\\u2700-\\u27bf"+l+f+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+f+"]",w="(?:"+v+"|"+y+")",Z="(?:"+m+"|"+y+")",_="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",j="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O="[\\ufe0e\\ufe0f]?",S=O+j+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",b,g].join("|")+")"+O+j+")*",E="(?:"+["[\\u2700-\\u27bf]",b,g].join("|")+")"+S,A=RegExp([m+"?"+v+"+"+_+"(?="+[p,m,"$"].join("|")+")",Z+"+"+T+"(?="+[p,m+w,"$"].join("|")+")",m+"?"+w+"+"+_,m+"+"+T,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",h,E].join("|"),"g");const x=function(t,e,n){return t=(0,i.Z)(t),void 0===(e=n?void 0:e)?function(t){return c.test(t)}(t)?function(t){return t.match(A)||[]}(t):function(t){return t.match(s)||[]}(t):t.match(e)||[]};var P=RegExp("['’]","g");const D=function(t){return function(e){return function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}(x(function(t){return(t=(0,i.Z)(t))&&t.replace(a,r).replace(u,"")}(e).replace(P,"")),t,"")}}},2168:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2938),o=n(9582),i=n(6623);const a=function(t){return(0,r.Z)(t,i.Z,o.Z)}},2411:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var r=n(8936);const o=n(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var u=n(3122),s=n(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,h=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(t){return!(!(0,u.Z)(t)||(e=t,a&&a in e))&&((0,r.Z)(t)?h:c).test((0,s.Z)(t));var e},y=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return v(n)?n:void 0}},9582:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}(i(t),(function(e){return o.call(t,e)})))}:r.Z},4558:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"DataView");var a=n(8896);const u=(0,r.Z)(o.Z,"Promise"),s=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(8147),f=n(6682),d="[object Map]",p="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(i),g=(0,f.Z)(a.Z),m=(0,f.Z)(u),w=(0,f.Z)(s),Z=(0,f.Z)(c),_=l.Z;(i&&_(new i(new ArrayBuffer(1)))!=y||a.Z&&_(new a.Z)!=d||u&&_(u.resolve())!=p||s&&_(new s)!=h||c&&_(new c)!=v)&&(_=function(t){var e=(0,l.Z)(t),n="[object Object]"==e?t.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case b:return y;case g:return d;case m:return p;case w:return h;case Z:return v}return e});const T=_},8693:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(2082),o=n(4405),i=n(7885),a=n(6401),u=n(1164),s=n(7969);const c=function(t,e,n){for(var c=-1,l=(e=(0,r.Z)(e,t)).length,f=!1;++c<l;){var d=(0,s.Z)(e[c]);if(!(f=null!=t&&n(t,d)))break;t=t[d]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,i.Z)(t)||(0,o.Z)(t))}},2690:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const o=function(t){return r.test(t)}},6401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},3502:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(t,e){if((0,r.Z)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,o.Z)(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},5441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},5500:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},7755:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&r.Z.process;const u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},6048:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},3221:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},3249:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},6202:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(2690),o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+i+")?",l="[\\ufe0e\\ufe0f]?",f=l+c+"(?:\\u200d(?:"+[a,u,s].join("|")+")"+l+c+")*",d="(?:"+[a+o+"?",o,u,s,"[\\ud800-\\udfff]"].join("|")+")",p=RegExp(i+"(?="+i+")|"+d+f,"g");const h=function(t){return(0,r.Z)(t)?function(t){return t.match(p)||[]}(t):function(t){return t.split("")}(t)}},1354:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3549);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r.Z),n}o.Cache=r.Z;var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(s=o((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,o){e.push(r?o.replace(a,"$1"):n||t)})),e}),(function(t){return 500===c.size&&c.clear(),t})),c=s.cache,s);var s,c},7969:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(2758);const o=function(t){if("string"==typeof t||(0,r.Z)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Function.prototype.toString;const o=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2777:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(1140);const o=(0,n(6994).Z)((function(t,e,n){return e=e.toLowerCase(),t+(n?(0,r.Z)(e):e)}))},1140:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(63);const o=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}(t,e,n)};var i=n(2690),a=n(6202);const u=function(t){t=(0,r.Z)(t);var e=(0,i.Z)(t)?(0,a.Z)(t):void 0,n=e?e[0]:t.charAt(0),u=e?o(e,1).join(""):t.slice(1);return n.toUpperCase()+u},s=function(t){return u((0,r.Z)(t).toLowerCase())}},8804:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},8407:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(63),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);const a=function(t){return(t=(0,r.Z)(t))&&i.test(t)?t.replace(o,"\\$&"):t}},286:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(5745),o=n(3282),i=n(6623);var a=/\s/;var u=/^\s+/;const s=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&a.test(t.charAt(e)););return e}(t)+1).replace(u,""):t};var c=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt;const v=function(t){return t?Infinity===(t=function(t){if("number"==typeof t)return t;if((0,l.Z)(t))return NaN;if((0,c.Z)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,c.Z)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var n=d.test(t);return n||p.test(t)?h(t.slice(2),n?2:8):f.test(t)?NaN:+t}(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var y=Math.max;const b=(g=function(t,e,n){var o=null==t?0:t.length;if(!o)return-1;var i,a,u=null==n?0:(i=v(n),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=y(o+u,0)),function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,(0,r.Z)(e,3),u)},function(t,e,n){var a=Object(t);if(!(0,o.Z)(t)){var u=(0,r.Z)(e,3);t=(0,i.Z)(t),e=function(t){return u(a[t],t,a)}}var s=g(t,e,n);return s>-1?a[u?t[s]:s]:void 0});var g},4405:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(8147),o=n(3391);const i=function(t){return(0,o.Z)(t)&&"[object Arguments]"==(0,r.Z)(t)};var a=Object.prototype,u=a.hasOwnProperty,s=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(t){return(0,o.Z)(t)&&u.call(t,"callee")&&!s.call(t,"callee")}},7885:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=Array.isArray},3282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8936),o=n(1164);const i=function(t){return null!=t&&(0,o.Z)(t.length)&&!(0,r.Z)(t)}},2143:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3122);const i=function(t){if(!(0,o.Z)(t))return!1;var e=(0,r.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1164:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3122:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3391:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},2758:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3391);const i=function(t){return"symbol"==typeof t||(0,o.Z)(t)&&"[object Symbol]"==(0,r.Z)(t)}},8532:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(8147),o=n(1164),i=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=n(3225),s=n(7755),c=s.Z&&s.Z.isTypedArray;const l=c?(0,u.Z)(c):function(t){return(0,i.Z)(t)&&(0,o.Z)(t.length)&&!!a[(0,r.Z)(t)]}},6623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7178),o=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var u=n(3282);const s=function(t){return(0,u.Z)(t)?(0,r.Z)(t):function(t){if(!(0,o.Z)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(){return[]}},63:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=n(5598),i=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,s=u?u.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,i.Z)(e))return(0,o.Z)(e,t)+"";if((0,a.Z)(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},l=function(t){return null==t?"":c(t)}},4729:(t,e,n)=>{"use strict";n.d(e,{$l:()=>s,BN:()=>U,DY:()=>o,J$:()=>z,JN:()=>v,LI:()=>E,PM:()=>f,W6:()=>O,i_:()=>u,ko:()=>J,kw:()=>S,mf:()=>l,o8:()=>c,qC:()=>P,s6:()=>G,sj:()=>C,u3:()=>k,u_:()=>R,w6:()=>j,xD:()=>H});var r=n(268);const o=new WeakMap,i={},a=()=>{},u=a(),s=Object,c=t=>t===u,l=t=>"function"==typeof t,f=(t,e)=>({...t,...e}),d="undefined",p=typeof window!=d,h=typeof document!=d,v=(t,e)=>{const n=o.get(t);return[()=>t.get(e)||i,r=>{const o=t.get(e);n[5](e,f(o,r),o||i)},n[6]]},y=new WeakMap;let b=0;const g=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let o,i;if(s(t)!==t||r||n==RegExp)o=r?t.toJSON():"symbol"==e?t.toString():"string"==e?JSON.stringify(t):""+t;else{if(o=y.get(t),o)return o;if(o=++b+"~",y.set(t,o),n==Array){for(o="@",i=0;i<t.length;i++)o+=g(t[i])+",";y.set(t,o)}if(n==s){o="#";const e=s.keys(t).sort();for(;!c(i=e.pop());)c(t[i])||(o+=i+":"+g(t[i])+",");y.set(t,o)}}return o};let m=!0;const[w,Z]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],_={isOnline:()=>m,isVisible:()=>{const t=h&&document.visibilityState;return c(t)||"hidden"!==t}},T={initFocus:t=>(h&&document.addEventListener("visibilitychange",t),w("focus",t),()=>{h&&document.removeEventListener("visibilitychange",t),Z("focus",t)}),initReconnect:t=>{const e=()=>{m=!0,t()},n=()=>{m=!1};return w("online",e),w("offline",n),()=>{Z("online",e),Z("offline",n)}}},j=!r.useId,O=!p||"Deno"in window,S=t=>p&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(t):setTimeout(t,1),E=O?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,x=!O&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),P=t=>{if(l(t))try{t=t()}catch(e){t=""}const e=t;return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?g(t):"",e]};let D=0;const k=()=>++D;var C={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:2};async function U(...t){const[e,n,r,i]=t,a=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{});let s=a.populateCache;const d=a.rollbackOnError;let p=a.optimisticData;const h=!1!==a.revalidate,y=a.throwOnError;if(l(n)){const t=n,r=[],o=e.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&t(e.get(o)._k)&&r.push(o)}return Promise.all(r.map(b))}return b(n);async function b(n){const[i]=P(n);if(!i)return;const[a,f]=v(e,i),[b,g,m]=o.get(e),w=b[i],Z=()=>h&&(delete m[i],w&&w[0])?w[0](2).then((()=>a().data)):a().data;if(t.length<3)return Z();let _,T=r;const j=k();g[i]=[j,0];const O=!c(p),S=a(),E=S.data,A=S._c,x=c(A)?E:A;if(O&&(p=l(p)?p(x):p,f({data:p,_c:x})),l(T))try{T=T(x)}catch(t){_=t}if(T&&l(T.then)){if(T=await T.catch((t=>{_=t})),j!==g[i][0]){if(_)throw _;return T}_&&O&&(t=>"function"==typeof d?d(t):!1!==d)(_)&&(s=!0,T=x,f({data:T,_c:u}))}s&&(_||(l(s)&&(T=s(T,x)),f({data:T,_c:u}))),g[i][1]=k();const D=await Z();if(f({_c:u}),!_)return s?D:T;if(y)throw _}}const I=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},N=(t,e)=>{if(!o.has(t)){const n=f(T,e),r={},i=U.bind(u,t);let s=a;const c={},l=(t,e)=>{const n=c[t]||[];return c[t]=n,n.push(e),()=>n.splice(n.indexOf(e),1)},d=(e,n,r)=>{t.set(e,n);const o=c[e];if(o)for(let t=o.length;t--;)o[t](r,n)},p=()=>{if(!o.has(t)&&(o.set(t,[r,{},{},{},i,d,l]),!O)){const e=n.initFocus(setTimeout.bind(u,I.bind(u,r,0))),i=n.initReconnect(setTimeout.bind(u,I.bind(u,r,1)));s=()=>{e&&e(),i&&i(),o.delete(t)}}};return p(),[t,i,p,s]}return[t,o.get(t)[4]]},[L,F]=N(new Map),R=f({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(t,e,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!c(i)&&a>i||setTimeout(r,u,o)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:x?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:x?5e3:3e3,compare:(t,e)=>g(t)==g(e),isPaused:()=>!1,cache:L,mutate:F,fallback:{}},_),M=(t,e)=>{const n=f(t,e);if(e){const{use:r,fallback:o}=t,{use:i,fallback:a}=e;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=f(o,a))}return n},V=(0,r.createContext)({}),z=t=>{const{value:e}=t,n=(0,r.useContext)(V),o=l(e),i=(0,r.useMemo)((()=>o?e(n):e),[o,n,e]),a=(0,r.useMemo)((()=>o?i:M(n,i)),[o,n,i]),s=i&&i.provider,[c]=(0,r.useState)((()=>s?N(s(a.cache||L),i):u));return c&&(a.cache=c[0],a.mutate=c[1]),E((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,r.createElement)(V.Provider,f(t,{value:a}))},B=p&&window.__SWR_DEVTOOLS_USE__,$=B?window.__SWR_DEVTOOLS_USE__:[],q=t=>l(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}],W=$.concat((t=>(e,n,r)=>t(e,n&&((...t)=>{const r=P(e)[0],[,,,i]=o.get(L),a=i[r];return a?(delete i[r],a):n(...t)}),r))),G=t=>function(...e){const n=f(R,(0,r.useContext)(V)),[o,i,a]=q(e),u=M(n,a);let s=t;const{use:c}=u,l=(c||[]).concat(W);for(let t=l.length;t--;)s=l[t](s);return s(o,i||u.fetcher||null,u)},J=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},H=(t,e)=>(...n)=>{const[r,o,i]=q(n),a=(i.use||[]).concat(e);return t(r,o,{...i,use:a})};B&&(window.__SWR_DEVTOOLS_REACT__=r)},3255:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>u});var r=n(268),o=n(3100),i=n(4729);const a={dedupe:!0};i.$l.defineProperty(i.J$,"defaultValue",{value:i.u_});var u=(0,i.s6)(((t,e,n)=>{const{cache:u,compare:s,suspense:c,fallbackData:l,revalidateOnMount:f,refreshInterval:d,refreshWhenHidden:p,refreshWhenOffline:h,keepPreviousData:v}=n,[y,b,g]=i.DY.get(u),[m,w]=(0,i.qC)(t),Z=(0,r.useRef)(!1),_=(0,r.useRef)(!1),T=(0,r.useRef)(m),j=(0,r.useRef)(e),O=(0,r.useRef)(n),S=()=>O.current,E=()=>S().isVisible()&&S().isOnline(),[A,x,P]=(0,i.JN)(u,m),D=(0,r.useRef)({}).current,k=(0,i.o8)(l)?n.fallback[m]:l,C=(t,e)=>{let n=!0;for(const r in D){const o=r;s(e[o],t[o])||"data"===o&&(0,i.o8)(t[o])&&s(e[o],V)||(n=!1)}return n},U=(0,r.useMemo)((()=>{const t=!!m&&!!e&&((0,i.o8)(f)?!S().isPaused()&&!c:f),n=()=>{const e=A(),n=(0,i.PM)(e);return delete n._k,t?{isValidating:!0,isLoading:!0,...n}:n};let r=n();return()=>{const t=n();return C(t,r)?r:r=t}}),[u,m]),I=(0,o.useSyncExternalStore)((0,r.useCallback)((t=>P(m,((e,n)=>{C(e,n)||t()}))),[u,m]),U,U),N=!Z.current,L=I.data,F=(0,i.o8)(L)?k:L,R=I.error,M=(0,r.useRef)(F),V=v?(0,i.o8)(L)?M.current:L:F,z=N&&!(0,i.o8)(f)?f:!S().isPaused()&&(c?!(0,i.o8)(F)&&n.revalidateIfStale:(0,i.o8)(F)||n.revalidateIfStale),B=!!(m&&e&&N&&z),$=(0,i.o8)(I.isValidating)?B:I.isValidating,q=(0,i.o8)(I.isLoading)?B:I.isLoading,W=(0,r.useCallback)((async t=>{const e=j.current;if(!m||!e||_.current||S().isPaused())return!1;let r,o,a=!0;const u=t||{},c=!g[m]||!u.dedupe,l=()=>i.w6?!_.current&&m===T.current&&Z.current:m===T.current,f={isValidating:!1,isLoading:!1},d=()=>{x(f)},p=()=>{const t=g[m];t&&t[1]===o&&delete g[m]},h={isValidating:!0};(0,i.o8)(A().data)&&(h.isLoading=!0);try{if(c&&(x(h),n.loadingTimeout&&(0,i.o8)(A().data)&&setTimeout((()=>{a&&l()&&S().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[e(w),(0,i.u3)()]),[r,o]=g[m],r=await r,c&&setTimeout(p,n.dedupingInterval),!g[m]||g[m][1]!==o)return c&&l()&&S().onDiscarded(m),!1;f.error=i.i_;const t=b[m];if(!(0,i.o8)(t)&&(o<=t[0]||o<=t[1]||0===t[1]))return d(),c&&l()&&S().onDiscarded(m),!1;const u=A().data;f.data=s(u,r)?u:r,c&&l()&&S().onSuccess(r,m,n)}catch(t){p();const e=S(),{shouldRetryOnError:n}=e;e.isPaused()||(f.error=t,c&&l()&&(e.onError(t,m,e),(!0===n||(0,i.mf)(n)&&n(t))&&E()&&e.onErrorRetry(t,m,e,W,{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[m,u]),G=(0,r.useCallback)(((...t)=>(0,i.BN)(u,T.current,...t)),[]);if((0,i.LI)((()=>{j.current=e,O.current=n,(0,i.o8)(L)||(M.current=L)})),(0,i.LI)((()=>{if(!m)return;const t=W.bind(i.i_,a);let e=0;const n=(0,i.ko)(m,y,(n=>{if(n==i.sj.FOCUS_EVENT){const n=Date.now();S().revalidateOnFocus&&n>e&&E()&&(e=n+S().focusThrottleInterval,t())}else if(n==i.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&E()&&t();else if(n==i.sj.MUTATE_EVENT)return W()}));return _.current=!1,T.current=m,Z.current=!0,x({_k:w}),z&&((0,i.o8)(F)||i.W6?t():(0,i.kw)(t)),()=>{_.current=!0,n()}}),[m]),(0,i.LI)((()=>{let t;function e(){const e=(0,i.mf)(d)?d(F):d;e&&-1!==t&&(t=setTimeout(n,e))}function n(){A().error||!p&&!S().isVisible()||!h&&!S().isOnline()?e():W(a).then(e)}return e(),()=>{t&&(clearTimeout(t),t=-1)}}),[d,p,h,m]),(0,r.useDebugValue)(V),c&&(0,i.o8)(F)&&m){if(!i.w6&&i.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw j.current=e,O.current=n,_.current=!1,(0,i.o8)(R)?W(a):R}return{mutate:G,get data(){return D.data=!0,V},get error(){return D.error=!0,R},get isValidating(){return D.isValidating=!0,$},get isLoading(){return D.isLoading=!0,q}}}))},2303:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3255),o=(0,n(4729).xD)(r.ZP,(t=>(e,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r))))}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t](i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@kenyaemr/esm-patient-registration-app:",o.l=(n,r,i,a)=>{if(t[n])t[n].push(r);else{var u,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==e+i){u=f;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",e+i),u.src=n),t[n]=[r];var d=(e,r)=>{u.onerror=u.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((t=>t(r))),e)return e(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),s&&document.head.appendChild(u)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{o.S={};var t={},e={};o.I=(n,r)=>{r||(r=[]);var i=e[n];if(i||(i=e[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),t[n])return t[n];o.o(o.S,n)||(o.S[n]={});var a=o.S[n],u="@kenyaemr/esm-patient-registration-app",s=(t,e,n,r)=>{var o=a[t]=a[t]||{},i=o[e];(!i||!i.loaded&&(!r!=!i.eager?r:u>i.from))&&(o[e]={get:n,from:u,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework","4.2.1-pre.619",(()=>Promise.all([o.e(858),o.e(268)]).then((()=>()=>o(6858))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(62),o.e(268)]).then((()=>()=>o(7884))))),s("react-router-dom","6.4.3",(()=>Promise.all([o.e(591),o.e(268)]).then((()=>()=>o(6591))))),s("react","18.2.0",(()=>o.e(784).then((()=>()=>o(6292)))))),t[n]=c.length?Promise.all(c).then((()=>t[n]=1)):1}}})(),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t=t=>{var e=t=>t.split(".").map((t=>+t==t?+t:t)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(t),r=n[1]?e(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,e(n[2]))),n[3]&&(r.push([]),r.push.apply(r,e(n[3]))),r},e=t=>{var n=t[0],r="";if(1===t.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<t.length;i++)o--,r+="u"==(typeof(u=t[i]))[0]?"-":(o>0?".":"")+(o=2,u);return r}var a=[];for(i=1;i<t.length;i++){var u=t[i];a.push(0===u?"not("+s()+")":1===u?"("+s()+" || "+s()+")":2===u?a.pop()+" "+a.pop():e(u))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],i=o<0;i&&(o=-o-1);for(var a=0,u=1,s=!0;;u++,a++){var c,l,f=u<e.length?(typeof e[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(c=r[a]))[0]))return!s||("u"==f?u>o&&!i:""==f!=i);if("u"==l){if(!s||"u"!=f)return!1}else if(s)if(f==l)if(u<=o){if(c!=e[u])return!1}else{if(i?c>e[u]:c<e[u])return!1;c!=e[u]&&(s=!1)}else if("s"!=f&&"n"!=f){if(i||u<=o)return!1;s=!1,u--}else{if(u<=o||l<f!=i)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()},r=(e,n)=>{var r=e[n];return Object.keys(r).reduce(((e,n)=>!e||!r[e].loaded&&((e,n)=>{e=t(e),n=t(n);for(var r=0;;){if(r>=e.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=e[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var a=n[r],u=(typeof a)[0];if(i!=u)return"o"==i&&"n"==u||"s"==u||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;r++}})(e,n)?n:e),0)},i=(t,o,i,u)=>{var s=r(t,i);return n(u,s)||"undefined"!=typeof console&&console.warn&&console.warn(((t,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&t[n][r].from)+" of shared singleton module "+n+" (required "+e(o)+")")(t,i,s,u)),a(t[i][s])},a=t=>(t.loaded=1,t.get()),u=(t=>function(e,n,r,i){var a=o.I(e);return a&&a.then?a.then(t.bind(t,e,o.S[e],n,r,i)):t(e,o.S[e],n,r,i)})(((t,e,n,r,a)=>e&&o.o(e,n)?i(e,0,n,r):a())),s={},c={4924:()=>u("default","react-i18next",[1,11],(()=>o.e(62).then((()=>()=>o(7884))))),8744:()=>u("default","react-router-dom",[1,6],(()=>o.e(591).then((()=>()=>o(6591))))),268:()=>u("default","react",[1,18],(()=>o.e(784).then((()=>()=>o(6292))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>o.e(858).then((()=>()=>o(6858)))))};[906,268].forEach((t=>{o.m[t]=e=>{s[t]=0,delete o.c[t];var n=c[t]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+t);e.exports=n()}}));var l={268:[268],876:[8744],924:[4924]};o.f.consumes=(t,e)=>{o.o(l,t)&&l[t].forEach((t=>{if(o.o(s,t))return e.push(s[t]);var n=e=>{s[t]=0,o.m[t]=n=>{delete o.c[t],n.exports=e()}},r=e=>{delete s[t],o.m[t]=n=>{throw delete o.c[t],e}};try{var i=c[t]();i.then?e.push(s[t]=i.then(n).catch(r)):n(i)}catch(t){r(t)}}))}})(),(()=>{var t={179:0,268:0,68:0,9:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(e))t[e]=0;else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(e),u=new Error;o.l(a,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,r[1](u)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[a,u,s]=n,c=0;if(a.some((e=>0!==t[e]))){for(r in u)o.o(u,r)&&(o.m[r]=u[r]);s&&s(o)}for(e&&e(n);c<a.length;c++)i=a[c],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),o.nc=void 0,o(7068)})();
|
|
2
|
+
(()=>{var e,t,n={225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>u,bs:()=>a});var r=n(2870);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id","phone & email"];function s(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}r.Type.Array,"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,r.Type.String,"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,"The parts to include in the section. Can be any of the following built-in fields: ".concat(u.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.UUID,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.ConceptUuid,r.Type.Array,r.Type.UUID,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.Boolean,r.Type.Object,r.Type.Boolean,r.Type.Number,r.Type.Number,r.Type.String,r.validators.isUrlWithTemplateParameters(["patientUuid"]),r.Type.ConceptUuid,r.Type.Array,r.Type.PatientIdentifierTypeUuid,r.Type.UUID,r.Type.UUID,r.Type.UUID,(0,r.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(e){return e.sections.every((function(t){return o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(s(a))+(e.sectionDefinitions.length?"; and the defined sections ".concat(s(e.sectionDefinitions),"."):".")})),(0,r.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),r=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(s(e.fieldDefinitions),"."):".")}))},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>c,QT:()=>l,UO:()=>u,e1:()=>s});var r,i,o,a=n(2870),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",s="@kenyaemr/esm-patient-registration-app",c="patient-registration",l=(r={},o="network-first",(i=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r)},7068:(e,t,n)=>{"use strict";var r=n(2870),i=(n(225),n(8179));n(6279),n(3076),n(3979);var o={featureName:"Patient Registration",moduleName:i.e1};(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(857),n.e(821),n.e(924),n.e(196)]).then(n.bind(n,7196))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(857),n.e(821),n.e(924),n.e(196)]).then(n.bind(n,7196))}),{featureName:"edit-patient-details-form",moduleName:i.e1}),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(857),n.e(742)]).then(n.bind(n,8742))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(924),n.e(735)]).then(n.bind(n,5735))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(317),n.e(975)]).then(n.bind(n,9975))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(924),n.e(635)]).then(n.bind(n,2635))}),{featureName:"edit-patient-details",moduleName:i.e1}),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(924),n.e(537)]).then(n.bind(n,3537))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(924),n.e(330)]).then(n.bind(n,1330))}),o),(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(208),n.e(924),n.e(59)]).then(n.bind(n,7059))}),o)},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>Z,St:()=>S,Te:()=>_,mt:()=>j});var r=n(268),o=n.n(r),a=n(286),u=n(2777),s=n(8407),c=n(2870),l=n(8179);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){if(Array.isArray(e))return e}function p(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){p(o,r,i,a,u,"next",e)}function u(e){p(o,r,i,a,u,"throw",e)}a(void 0)}))}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){return d(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||g(e,t)||y()}function m(e){return d(e)||v(e)||g(e,i)||y()}function g(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}var w=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Z=o().createContext(null);function _(){return T.apply(this,arguments)}function T(){return(T=h((function(){return w(this,(function(e){switch(e.label){case 0:return[4,C("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)")];case 1:return[2,e.sent().data]}}))}))).apply(this,arguments)}function j(){return O.apply(this,arguments)}function O(){return(O=h((function(){return w(this,(function(e){switch(e.label){case 0:return[4,C("/ws/rest/v1/relationshiptype?v=default")];case 1:return[2,e.sent().data]}}))}))).apply(this,arguments)}function S(){return E.apply(this,arguments)}function E(){return E=h((function(){var e,t,n,r,i,o;return w(this,(function(u){switch(u.label){case 0:return[4,A()];case 1:return e=u.sent(),t=e.filter(Boolean),[4,Promise.all([D()].concat((s=t.map((function(e){return function(e){return x.apply(this,arguments)}(e.uuid)})),function(e){if(Array.isArray(e))return f(e)}(s)||v(s)||g(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())))];case 2:for(n=m.apply(void 0,[u.sent()]),r=n[0],i=n.slice(1),o=0;o<(null==t?void 0:t.length);o++)t[o].identifierSources=i[o].data.results.map((function(e){var t=(0,a.Z)(r.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e}));return[2,t]}var s}))})),E.apply(this,arguments)}function A(){return P.apply(this,arguments)}function P(){return(P=h((function(){var e,t,n,r,i,o,a,s,c,l;return w(this,(function(f){switch(f.label){case 0:return[4,Promise.all([C("/ws/rest/v1/patientidentifiertype?v=custom:(display,uuid,name,format,required,uniquenessBehavior)"),C("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType")])];case 1:return e=b.apply(void 0,[f.sent(),2]),t=e[0],n=e[1],t.ok?(s=null==t||null===(r=t.data)||void 0===r?void 0:r.results,c=null==n||null===(i=n.data)||void 0===i||null===(o=i.results)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.metadataUuid,l=[],s.forEach((function(e){var t;e.uuid!==c&&l.push((!1,{name:(t=e).display,fieldName:(0,u.Z)(t.name),required:t.required,uuid:t.uuid,format:t.format,isPrimary:false,uniquenessBehavior:t.uniquenessBehavior}))})),[2,l]):[2,[]]}}))}))).apply(this,arguments)}function x(){return(x=h((function(e){return w(this,(function(t){switch(t.label){case 0:return[4,C("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(e))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function D(e){return k.apply(this,arguments)}function k(){return(k=h((function(e){return w(this,(function(e){switch(e.label){case 0:return[4,C("/ws/rest/v1/idgen/autogenerationoption?v=full")];case 1:return[2,e.sent()]}}))}))).apply(this,arguments)}function C(e){return U.apply(this,arguments)}function U(){return(U=h((function(e){var t;return w(this,(function(n){switch(n.label){case 0:return t=new AbortController,[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(e)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(e,{headers:l.QT,signal:null==t?void 0:t.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>y,y:()=>v});var r=n(2870),i=n(8179),o=n(7117);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p,h=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},v=function(){function e(){c(this,e)}return e.saveRelationships=function(e,t){return s((function(){return h(this,(function(n){return[2,Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var n=e.relatedPersonUuid,r=e.relationshipType,i=e.uuid,a=e.action,u=d(r.split("/"),2),s=u[0],c=u[1],l=t.data.uuid,f="aIsToB"===c,p={personA:f?n:l,personB:f?l:n,relationshipType:s};switch(a){case"ADD":return(0,o.bL)(p);case"UPDATE":return(0,o.r6)(i,p);case"DELETE":return(0,o.kE)(i)}})))]}))}))()},e.saveObservations=function(e,t,n,r,i){return s((function(){var a;return h(this,(function(u){if(e&&Object.keys(e).length>0){if(i.registrationObs.encounterTypeUuid)return a={encounterDatetime:new Date,patient:t.data.uuid,encounterType:i.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:i.registrationObs.encounterProviderRoleUuid}],form:i.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},[2,(0,o.M1)(a)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},e.savePatientIdentifiers=function(e,t,n,r,i){return s((function(){var a;return h(this,(function(u){var c;return a=Object.values(n).filter((function(e){var t=e.identifierValue,n=e.autoGeneration,r=e.selectedSource;return t||n&&r})).map((c=s((function(n){var r,a,u,s,c,l,f,d,p,v;return h(this,(function(h){switch(h.label){case 0:return r=n.identifierTypeUuid,a=n.identifierValue,u=n.identifierUuid,s=n.selectedSource,c=n.preferred,l=n.autoGeneration,f=n.initialValue,l?[3,1]:(p=a,[3,4]);case 1:return[4,(0,o.fX)(s.uuid)];case 2:return[4,h.sent().data.identifier];case 3:p=h.sent(),h.label=4;case 4:return v={uuid:u,identifier:d=p,identifierType:r,location:i,preferred:c},e?[3,8]:f?[3,6]:[4,(0,o.eb)(t,v)];case 5:return h.sent(),[3,8];case 6:return f===d?[3,8]:[4,(0,o.nI)(t,u,v.identifier)];case 7:h.sent(),h.label=8;case 8:return[2,v]}}))})),function(e){return c.apply(this,arguments)})),t&&Object.keys(r).filter((function(e){return!n[e]})).forEach(function(){var e=s((function(e){return h(this,(function(n){switch(n.label){case 0:return[4,(0,o.ZB)(t,r[e].identifierUuid)];case 1:return n.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[2,Promise.all(a)]}))}))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,r,i,o){var a,u,s;return u=n.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](u):u instanceof s)?[n.birthdate.getFullYear(),n.birthdate.getMonth()+1,n.birthdate.getDate()].join("-"):n.birthdate,{uuid:n.patientUuid,person:f({uuid:n.patientUuid,names:e.getNames(n,r),gender:n.gender.charAt(0),birthdate:a,birthdateEstimated:n.birthdateEstimated,attributes:e.getPatientAttributes(t,n,r),addresses:[n.address]},e.getPatientDeathInfo(n)),identifiers:o}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e,t,n){var i,o=[];return t.attributes&&(Object.entries(t.attributes).filter((function(e){return!!d(e,2)[1]})).forEach((function(e){var t=d(e,2),n=t[0],r=t[1];o.push({attributeType:n,value:r})})),!e&&t.patientUuid&&Object.entries(t.attributes).filter((function(e){return!d(e,2)[1]})).forEach((i=s((function(e){var i,o,a;return h(this,(function(u){switch(u.label){case 0:return i=d(e,1),o=i[0],a=n["attribute.".concat(o)],[4,(0,r.openmrsFetch)("/ws/rest/v1/person/".concat(t.patientUuid,"/attribute/").concat(a),{method:"DELETE"}).catch((function(e){console.error(e)}))];case 1:return u.sent(),[2]}}))})),function(e){return i.apply(this,arguments)}))),t.unidentifiedPatient&&o.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),o},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,r=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?r:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,r,i,o,a;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(r=e.person)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(o=e.person)||void 0===o?void 0:o.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(a=e.person.attributes)||void 0===a?void 0:a.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();v.savePatientFormOffline=(p=s((function(e,t,n,o,a,u,s,c,l){var f;return h(this,(function(d){switch(d.label){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(e,t,n,o,[])),_patientRegistrationData:{isNewPatient:e,formValues:t,patientUuidMap:n,initialAddressFieldValues:o,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:s,currentUser:c,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(i.Kt,f,{id:t.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(e,t,n,r,i,o,a,u,s){return p.apply(this,arguments)}),v.savePatientFormOnline=function(){var e=s((function(e,t,n,r,i,a,u,c,l,f,d){var p,y,b;return h(this,(function(d){switch(d.label){case 0:return[4,v.savePatientIdentifiers(e,t.patientUuid,t.identifiers,u,a)];case 1:return p=d.sent(),y=v.getPatientToCreate(e,t,n,r,p),v.getDeletedNames(t.patientUuid,n).forEach(function(){var e=s((function(e){return h(this,(function(t){switch(t.label){case 0:return[4,(0,o.uO)(e.nameUuid,e.personUuid)];case 1:return t.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[4,(0,o.co)(y,e&&!f.patientSaved?void 0:t.patientUuid)];case 2:return(b=d.sent()).ok?(f.patientSaved=!0,[4,v.saveRelationships(t.relationships,b)]):[3,6];case 3:return d.sent(),[4,v.saveObservations(t.obs,b,a,c,l)];case 4:return d.sent(),l.concepts.patientPhotoUuid&&(null==i?void 0:i.imageData)?[4,(0,o.oV)(b.data.uuid,i.imageData,"/ws/rest/v1/obs",i.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2,b.data.uuid]}}))}));return function(t,n,r,i,o,a,u,s,c,l,f){return e.apply(this,arguments)}}();var y=function e(){c(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>f,M8:()=>w,Uu:()=>g,ZB:()=>S,bL:()=>h,co:()=>l,eb:()=>_,f$:()=>A,fX:()=>d,kE:()=>y,nI:()=>j,oV:()=>b,r6:()=>v,uO:()=>p});var r=n(268),i=n(3255),o=n(2303),a=n(2870);function u(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}var c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function l(e,t){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t||""),{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:n.signal})}function f(e){var t=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:t.signal})}function d(e){var t=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function p(e,t){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function h(e){var t=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:t.signal})}function v(e,t){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(e),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:t.relationshipType},signal:n.signal})}function y(e){var t=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(e),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:t.signal})}function b(e,t,n,r,i){return m.apply(this,arguments)}function m(){return(m=s((function(e,t,n,r,i){var o,u;return c(this,(function(s){return o=new AbortController,(u=new FormData).append("patient",e),u.append("file",function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);var o=new Blob([r],{type:n});return new File([o],"patient-photo.png")}(t)),u.append("json",JSON.stringify({person:e,concept:i,groupMembers:[],obsDatetime:r})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:o.signal,body:u})]}))}))).apply(this,arguments)}function g(e){var t,n,r,o=(0,a.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(o,"&v=full"),s=(0,i.ZP)(e?u:null,a.openmrsFetch),c=s.data,l=s.error,f=s.isLoading,d=null==c||null===(t=c.data)||void 0===t?void 0:t.results[0];return{data:d?{dateTime:null==d?void 0:d.obsDatetime,imageSrc:null==d||null===(n=d.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:l,isLoading:f}}function w(e){return Z.apply(this,arguments)}function Z(){return(Z=s((function(e){var t;return c(this,(function(n){return t=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(e),{signal:t.signal})]}))}))).apply(this,arguments)}function _(e,t){return T.apply(this,arguments)}function T(){return(T=s((function(e,t){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:t})]}))}))).apply(this,arguments)}function j(e,t,n){return O.apply(this,arguments)}function O(){return(O=s((function(e,t,n){var r;return c(this,(function(i){return r=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function S(e,t){return E.apply(this,arguments)}function E(){return(E=s((function(e,t){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function A(e,t){var n,i=(0,o.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=".concat(t,"&searchString=").concat(e):null,a.openmrsFetch),u=i.data,s=i.error,c=i.isLoading,l=(0,r.useMemo)((function(){var e;return{addresses:null!==(n=null==u||null===(e=u.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==n?n:[],error:s,isLoading:c}}),[null==u?void 0:u.data,s,c]);return l}},452:(e,t,n)=>{"use strict";var r=n(268),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,u=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return u((function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})}),[e,n,t]),a((function(){return c(i)&&l({inst:i}),e((function(){c(i)&&l({inst:i})}))}),[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},3100:(e,t,n)=>{"use strict";e.exports=n(452)},3979:(e,t,n)=>{var r={"./am.json":[8788,788],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},6300:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(8804);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const u=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"Map")},3549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});const r=(0,n(2411).Z)(Object,"create");var i=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const u=a;var s=n(6300),c=n(8896);const l=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function f(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(c.Z||s.Z),string:new u}},f.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},f.prototype.get=function(e){return l(this,e).get(e)},f.prototype.has=function(e){return l(this,e).has(e)},f.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=f},3761:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(6300);var i=n(8896),o=n(3549);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const u=a},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Uint8Array},7178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(4405),i=n(7885),o=n(2143),a=n(6401),u=n(8532),s=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,i.Z)(e),c=!n&&(0,r.Z)(e),l=!n&&!c&&(0,o.Z)(e),f=!n&&!c&&!l&&(0,u.Z)(e),d=n||c||l||f,p=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=p.length;for(var v in e)!t&&!s.call(e,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||(0,a.Z)(v,h))||p.push(v);return p}},5598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},5810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2938:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5810),i=n(7885);const o=function(e,t,n){var o=t(e);return(0,i.Z)(e)?o:(0,r.Z)(o,n(e))}},8147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,u=r.Z?r.Z.toStringTag:void 0;var s=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[u]=n:delete e[u]),i}(e):function(e){return s.call(e)}(e)}},5745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(3761),i=n(3549);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.Z;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},o.prototype.has=function(e){return this.__data__.has(e)};const a=o,u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},s=function(e,t,n,r,i,o){var s=1&n,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=-1,h=!0,v=2&n?new a:void 0;for(o.set(e,t),o.set(t,e);++p<c;){var y=e[p],b=t[p];if(r)var m=s?r(b,y,p,t,e,o):r(y,b,p,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!u(t,(function(e,t){if(a=t,!v.has(a)&&(y===e||i(y,e,n,r,o)))return v.push(t);var a}))){h=!1;break}}else if(y!==b&&!i(y,b,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var c=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),h=c.Z?c.Z.prototype:void 0,v=h?h.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var m=n(4558),g=n(7885),w=n(2143),Z=n(8532),_="[object Arguments]",T="[object Array]",j="[object Object]",O=Object.prototype.hasOwnProperty;const S=function(e,t,n,i,o,a){var u=(0,g.Z)(e),c=(0,g.Z)(t),h=u?T:(0,m.Z)(e),S=c?T:(0,m.Z)(t),E=(h=h==_?j:h)==j,A=(S=S==_?j:S)==j,P=h==S;if(P&&(0,w.Z)(e)){if(!(0,w.Z)(t))return!1;u=!0,E=!1}if(P&&!E)return a||(a=new r.Z),u||(0,Z.Z)(e)?s(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new l.Z(e),new l.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=d.Z;case"[object Set]":var c=1&r;if(u||(u=p.Z),e.size!=t.size&&!c)return!1;var h=a.get(e);if(h)return h==t;r|=2,a.set(e,t);var y=s(u(e),u(t),r,i,o,a);return a.delete(e),y;case"[object Symbol]":if(v)return v.call(e)==v.call(t)}return!1}(e,t,h,n,i,o,a);if(!(1&n)){var x=E&&O.call(e,"__wrapped__"),D=A&&O.call(t,"__wrapped__");if(x||D){var k=x?e.value():e,C=D?t.value():t;return a||(a=new r.Z),o(k,C,n,i,a)}}return!!P&&(a||(a=new r.Z),function(e,t,n,r,i,o){var a=1&n,u=(0,y.Z)(e),s=u.length;if(s!=(0,y.Z)(t).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in t:b.call(t,l)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var h=a;++c<s;){var v=e[l=u[c]],m=t[l];if(r)var g=a?r(m,v,l,t,e,o):r(v,m,l,e,t,o);if(!(void 0===g?v===m||i(v,m,n,r,o):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var w=e.constructor,Z=t.constructor;w==Z||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,i,o,a))};var E=n(3391);const A=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,E.Z)(t)&&!(0,E.Z)(n)?t!=t&&n!=n:S(t,n,r,i,e,o))};var P=n(3122);const x=function(e){return e==e&&!(0,P.Z)(e)};var D=n(6623);const k=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},C=function(e){var t=function(e){for(var t=(0,D.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,x(i)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var o=n.length,a=o,u=!i;if(null==e)return!a;for(e=Object(e);o--;){var s=n[o];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){var c=(s=n[o])[0],l=e[c],f=s[1];if(u&&s[2]){if(void 0===l&&!(c in e))return!1}else{var d=new r.Z;if(i)var p=i(l,f,c,e,t,d);if(!(void 0===p?A(f,l,3,i,d):p))return!1}}return!0}(n,e,t)}};var U=n(2082),I=n(7969);const N=function(e,t){for(var n=0,r=(t=(0,U.Z)(t,e)).length;null!=e&&n<r;)e=e[(0,I.Z)(t[n++])];return n&&n==r?e:void 0},L=function(e,t){return null!=e&&t in Object(e)};var R=n(8693);var F=n(3502);const M=function(e,t){return(0,F.Z)(e)&&x(t)?k((0,I.Z)(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&(0,R.Z)(e,t,L)}(n,e):A(t,r,3)}},V=function(e){return e},z=function(e){return(0,F.Z)(e)?(t=(0,I.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return N(t,e)}}(e);var t},B=function(e){return"function"==typeof e?e:null==e?V:"object"==typeof e?(0,g.Z)(e)?M(e[0],e[1]):C(e):z(e)}},3225:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},2082:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(3502),o=n(1354),a=n(63);const u=function(e,t){return(0,r.Z)(e)?e:(0,i.Z)(e,t)?[e]:(0,o.Z)((0,a.Z)(e))}},6994:(e,t,n)=>{"use strict";n.d(t,{Z:()=>U});const r=(i={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==i?void 0:i[e]});var i,o=n(63),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var c=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var l="\\ud800-\\udfff",f="\\u2700-\\u27bf",d="a-z\\xdf-\\xf6\\xf8-\\xff",p="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",v="["+h+"]",y="\\d+",b="["+f+"]",m="["+d+"]",g="[^"+l+h+y+f+d+p+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",_="["+p+"]",T="(?:"+m+"|"+g+")",j="(?:"+_+"|"+g+")",O="(?:['’](?:d|ll|m|re|s|t|ve))?",S="(?:['’](?:D|LL|M|RE|S|T|VE))?",E="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",A="[\\ufe0e\\ufe0f]?",P=A+E+"(?:\\u200d(?:"+["[^"+l+"]",w,Z].join("|")+")"+A+E+")*",x="(?:"+[b,w,Z].join("|")+")"+P,D=RegExp([_+"?"+m+"+"+O+"(?="+[v,_,"$"].join("|")+")",j+"+"+S+"(?="+[v,_+T,"$"].join("|")+")",_+"?"+T+"+"+O,_+"+"+S,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",y,x].join("|"),"g");const k=function(e,t,n){return e=(0,o.Z)(e),void 0===(t=n?void 0:t)?function(e){return c.test(e)}(e)?function(e){return e.match(D)||[]}(e):function(e){return e.match(s)||[]}(e):e.match(t)||[]};var C=RegExp("['’]","g");const U=function(e){return function(t){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(k(function(e){return(e=(0,o.Z)(e))&&e.replace(a,r).replace(u,"")}(t).replace(C,"")),e,"")}}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2938),i=n(9582),o=n(6623);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},2411:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(8936);const i=n(3221).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var u=n(3122),s=n(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,h=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(e){return!(!(0,u.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,s.Z)(e));var t},y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return v(n)?n:void 0}},9582:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(813),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const a=o?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(o(e),(function(t){return i.call(e,t)})))}:r.Z},4558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(2411),i=n(3221);const o=(0,r.Z)(i.Z,"DataView");var a=n(8896);const u=(0,r.Z)(i.Z,"Promise"),s=(0,r.Z)(i.Z,"Set"),c=(0,r.Z)(i.Z,"WeakMap");var l=n(8147),f=n(6682),d="[object Map]",p="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(o),m=(0,f.Z)(a.Z),g=(0,f.Z)(u),w=(0,f.Z)(s),Z=(0,f.Z)(c),_=l.Z;(o&&_(new o(new ArrayBuffer(1)))!=y||a.Z&&_(new a.Z)!=d||u&&_(u.resolve())!=p||s&&_(new s)!=h||c&&_(new c)!=v)&&(_=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case b:return y;case m:return d;case g:return p;case w:return h;case Z:return v}return t});const T=_},8693:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2082),i=n(4405),o=n(7885),a=n(6401),u=n(1164),s=n(7969);const c=function(e,t,n){for(var c=-1,l=(t=(0,r.Z)(t,e)).length,f=!1;++c<l;){var d=(0,s.Z)(t[c]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,o.Z)(e)||(0,i.Z)(e))}},2690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const i=function(e){return r.test(e)}},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(2758),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,i.Z)(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},5500:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2168),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i&&r.Z.process;const u=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2168),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},3249:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},6202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(2690),i="\\ud800-\\udfff",o="["+i+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",u="\\ud83c[\\udffb-\\udfff]",s="[^"+i+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",f="(?:"+a+"|"+u+")?",d="[\\ufe0e\\ufe0f]?",p=d+f+"(?:\\u200d(?:"+[s,c,l].join("|")+")"+d+f+")*",h="(?:"+[s+a+"?",a,c,l,o].join("|")+")",v=RegExp(u+"(?="+u+")|"+h+p,"g");const y=function(e){return(0,r.Z)(e)?function(e){return e.match(v)||[]}(e):function(e){return e.split("")}(e)}},1354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3549);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r.Z),n}i.Cache=r.Z;var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(s=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}),(function(e){return 500===c.size&&c.clear(),e})),c=s.cache,s);var s,c},7969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2758);const i=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(1140);const i=(0,n(6994).Z)((function(e,t,n){return t=t.toLowerCase(),e+(n?(0,r.Z)(t):t)}))},1140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(63);const i=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)};var o=n(2690),a=n(6202);const u=function(e){e=(0,r.Z)(e);var t=(0,o.Z)(e)?(0,a.Z)(e):void 0,n=t?t[0]:e.charAt(0),u=t?i(t,1).join(""):e.slice(1);return n.toUpperCase()+u},s=function(e){return u((0,r.Z)(e).toLowerCase())}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},8407:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(63),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);const a=function(e){return(e=(0,r.Z)(e))&&o.test(e)?e.replace(i,"\\$&"):e}},286:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(5745),i=n(3282),o=n(6623);var a=/\s/;var u=/^\s+/;const s=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}(e)+1).replace(u,""):e};var c=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt;const v=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,l.Z)(e))return NaN;if((0,c.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,c.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var n=d.test(e);return n||p.test(e)?h(e.slice(2),n?2:8):f.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var y=Math.max;const b=(m=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o,a,u=null==n?0:(o=v(n),a=o%1,o==o?a?o-a:o:0);return u<0&&(u=y(i+u,0)),function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,(0,r.Z)(t,3),u)},function(e,t,n){var a=Object(e);if(!(0,i.Z)(e)){var u=(0,r.Z)(t,3);e=(0,o.Z)(e),t=function(e){return u(a[e],e,a)}}var s=m(e,t,n);return s>-1?a[u?e[s]:s]:void 0});var m},4405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(8147),i=n(3391);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,u=a.hasOwnProperty,s=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&u.call(e,"callee")&&!s.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8936),i=n(1164);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},2143:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3221);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3122);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8147),i=n(3391);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},8532:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8147),i=n(1164),o=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=n(3225),s=n(7755),c=s.Z&&s.Z.isTypedArray;const l=c?(0,u.Z)(c):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]}},6623:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7178),i=n(5441);const o=(0,n(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var u=n(3282);const s=function(e){return(0,u.Z)(e)?(0,r.Z)(e):function(e){if(!(0,i.Z)(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},813:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}},63:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=n(5598),o=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,s=u?u.toString:void 0;const c=function e(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,i.Z)(t,e)+"";if((0,a.Z)(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},l=function(e){return null==e?"":c(e)}},4729:(e,t,n)=>{"use strict";n.d(t,{$l:()=>s,BN:()=>I,DY:()=>i,J$:()=>B,JN:()=>v,LI:()=>E,PM:()=>f,W6:()=>O,i_:()=>u,ko:()=>H,kw:()=>S,mf:()=>l,o8:()=>c,qC:()=>x,s6:()=>J,sj:()=>U,u3:()=>k,u_:()=>M,w6:()=>j,xD:()=>Y});var r=n(268);const i=new WeakMap,o={},a=()=>{},u=a(),s=Object,c=e=>e===u,l=e=>"function"==typeof e,f=(e,t)=>({...e,...t}),d="undefined",p=typeof window!=d,h=typeof document!=d,v=(e,t)=>{const n=i.get(e);return[()=>e.get(t)||o,r=>{const i=e.get(t);n[5](t,f(i,r),i||o)},n[6]]},y=new WeakMap;let b=0;const m=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(s(e)!==e||r||n==RegExp)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=y.get(e),i)return i;if(i=++b+"~",y.set(e,i),n==Array){for(i="@",o=0;o<e.length;o++)i+=m(e[o])+",";y.set(e,i)}if(n==s){i="#";const t=s.keys(e).sort();for(;!c(o=t.pop());)c(e[o])||(i+=o+":"+m(e[o])+",");y.set(e,i)}}return i};let g=!0;const[w,Z]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],_={isOnline:()=>g,isVisible:()=>{const e=h&&document.visibilityState;return c(e)||"hidden"!==e}},T={initFocus:e=>(h&&document.addEventListener("visibilitychange",e),w("focus",e),()=>{h&&document.removeEventListener("visibilitychange",e),Z("focus",e)}),initReconnect:e=>{const t=()=>{g=!0,e()},n=()=>{g=!1};return w("online",t),w("offline",n),()=>{Z("online",t),Z("offline",n)}}},j=!r.useId,O=!p||"Deno"in window,S=e=>p&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(e):setTimeout(e,1),E=O?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,P=!O&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),x=e=>{if(l(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?m(e):"",t]};let D=0;const k=()=>++D,C=2;var U={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:C};async function I(...e){const[t,n,r,o]=e,a=f({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let s=a.populateCache;const d=a.rollbackOnError;let p=a.optimisticData;const h=!1!==a.revalidate,y=a.throwOnError;if(l(n)){const e=n,r=[],i=t.keys();for(let n=i.next();!n.done;n=i.next()){const i=n.value;!i.startsWith("$inf$")&&e(t.get(i)._k)&&r.push(i)}return Promise.all(r.map(b))}return b(n);async function b(n){const[o]=x(n);if(!o)return;const[a,f]=v(t,o),[b,m,g]=i.get(t),w=b[o],Z=()=>h&&(delete g[o],w&&w[0])?w[0](C).then((()=>a().data)):a().data;if(e.length<3)return Z();let _,T=r;const j=k();m[o]=[j,0];const O=!c(p),S=a(),E=S.data,A=S._c,P=c(A)?E:A;if(O&&(p=l(p)?p(P):p,f({data:p,_c:P})),l(T))try{T=T(P)}catch(e){_=e}if(T&&l(T.then)){if(T=await T.catch((e=>{_=e})),j!==m[o][0]){if(_)throw _;return T}_&&O&&(e=>"function"==typeof d?d(e):!1!==d)(_)&&(s=!0,T=P,f({data:T,_c:u}))}s&&(_||(l(s)&&(T=s(T,P)),f({data:T,_c:u}))),m[o][1]=k();const D=await Z();if(f({_c:u}),!_)return s?D:T;if(y)throw _}}const N=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},L=(e,t)=>{if(!i.has(e)){const n=f(T,t),r={},o=I.bind(u,e);let s=a;const c={},l=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,r)=>{e.set(t,n);const i=c[t];if(i)for(let e=i.length;e--;)i[e](r,n)},p=()=>{if(!i.has(e)&&(i.set(e,[r,{},{},{},o,d,l]),!O)){const t=n.initFocus(setTimeout.bind(u,N.bind(u,r,0))),o=n.initReconnect(setTimeout.bind(u,N.bind(u,r,1)));s=()=>{t&&t(),o&&o(),i.delete(e)}}};return p(),[e,o,p,s]}return[e,i.get(e)[4]]},[R,F]=L(new Map),M=f({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!c(o)&&a>o||setTimeout(r,u,i)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:P?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:P?5e3:3e3,compare:(e,t)=>m(e)==m(t),isPaused:()=>!1,cache:R,mutate:F,fallback:{}},_),V=(e,t)=>{const n=f(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=f(i,a))}return n},z=(0,r.createContext)({}),B=e=>{const{value:t}=e,n=(0,r.useContext)(z),i=l(t),o=(0,r.useMemo)((()=>i?t(n):t),[i,n,t]),a=(0,r.useMemo)((()=>i?o:V(n,o)),[i,n,o]),s=o&&o.provider,[c]=(0,r.useState)((()=>s?L(s(a.cache||R),o):u));return c&&(a.cache=c[0],a.mutate=c[1]),E((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,r.createElement)(z.Provider,f(e,{value:a}))},$=p&&window.__SWR_DEVTOOLS_USE__,q=$?window.__SWR_DEVTOOLS_USE__:[],W=e=>l(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],G=q.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const r=x(t)[0],[,,,o]=i.get(R),a=o[r];return a?(delete o[r],a):n(...e)}),r))),J=e=>function(...t){const n=f(M,(0,r.useContext)(z)),[i,o,a]=W(t),u=V(n,a);let s=e;const{use:c}=u,l=(c||[]).concat(G);for(let e=l.length;e--;)s=l[e](s);return s(i,o||u.fetcher||null,u)},H=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Y=(e,t)=>(...n)=>{const[r,i,o]=W(n),a=(o.use||[]).concat(t);return e(r,i,{...o,use:a})};$&&(window.__SWR_DEVTOOLS_REACT__=r)},3255:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>u});var r=n(268),i=n(3100),o=n(4729);const a={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});var u=(0,o.s6)(((e,t,n)=>{const{cache:u,compare:s,suspense:c,fallbackData:l,revalidateOnMount:f,refreshInterval:d,refreshWhenHidden:p,refreshWhenOffline:h,keepPreviousData:v}=n,[y,b,m]=o.DY.get(u),[g,w]=(0,o.qC)(e),Z=(0,r.useRef)(!1),_=(0,r.useRef)(!1),T=(0,r.useRef)(g),j=(0,r.useRef)(t),O=(0,r.useRef)(n),S=()=>O.current,E=()=>S().isVisible()&&S().isOnline(),[A,P,x]=(0,o.JN)(u,g),D=(0,r.useRef)({}).current,k=(0,o.o8)(l)?n.fallback[g]:l,C=(e,t)=>{let n=!0;for(const r in D){const i=r;s(t[i],e[i])||"data"===i&&(0,o.o8)(e[i])&&s(t[i],V)||(n=!1)}return n},U=(0,r.useMemo)((()=>{const e=!!g&&!!t&&((0,o.o8)(f)?!S().isPaused()&&!c:f),n=()=>{const t=A(),n=(0,o.PM)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n};let r=n();return()=>{const e=n();return C(e,r)?r:r=e}}),[u,g]),I=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>x(g,((t,n)=>{C(t,n)||e()}))),[u,g]),U,U),N=!Z.current,L=I.data,R=(0,o.o8)(L)?k:L,F=I.error,M=(0,r.useRef)(R),V=v?(0,o.o8)(L)?M.current:L:R,z=N&&!(0,o.o8)(f)?f:!S().isPaused()&&(c?!(0,o.o8)(R)&&n.revalidateIfStale:(0,o.o8)(R)||n.revalidateIfStale),B=!!(g&&t&&N&&z),$=(0,o.o8)(I.isValidating)?B:I.isValidating,q=(0,o.o8)(I.isLoading)?B:I.isLoading,W=(0,r.useCallback)((async e=>{const t=j.current;if(!g||!t||_.current||S().isPaused())return!1;let r,i,a=!0;const u=e||{},c=!m[g]||!u.dedupe,l=()=>o.w6?!_.current&&g===T.current&&Z.current:g===T.current,f={isValidating:!1,isLoading:!1},d=()=>{P(f)},p=()=>{const e=m[g];e&&e[1]===i&&delete m[g]},h={isValidating:!0};(0,o.o8)(A().data)&&(h.isLoading=!0);try{if(c&&(P(h),n.loadingTimeout&&(0,o.o8)(A().data)&&setTimeout((()=>{a&&l()&&S().onLoadingSlow(g,n)}),n.loadingTimeout),m[g]=[t(w),(0,o.u3)()]),[r,i]=m[g],r=await r,c&&setTimeout(p,n.dedupingInterval),!m[g]||m[g][1]!==i)return c&&l()&&S().onDiscarded(g),!1;f.error=o.i_;const e=b[g];if(!(0,o.o8)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return d(),c&&l()&&S().onDiscarded(g),!1;const u=A().data;f.data=s(u,r)?u:r,c&&l()&&S().onSuccess(r,g,n)}catch(e){p();const t=S(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,c&&l()&&(t.onError(e,g,t),(!0===n||(0,o.mf)(n)&&n(e))&&E()&&t.onErrorRetry(e,g,t,W,{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[g,u]),G=(0,r.useCallback)(((...e)=>(0,o.BN)(u,T.current,...e)),[]);if((0,o.LI)((()=>{j.current=t,O.current=n,(0,o.o8)(L)||(M.current=L)})),(0,o.LI)((()=>{if(!g)return;const e=W.bind(o.i_,a);let t=0;const n=(0,o.ko)(g,y,(n=>{if(n==o.sj.FOCUS_EVENT){const n=Date.now();S().revalidateOnFocus&&n>t&&E()&&(t=n+S().focusThrottleInterval,e())}else if(n==o.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&E()&&e();else if(n==o.sj.MUTATE_EVENT)return W()}));return _.current=!1,T.current=g,Z.current=!0,P({_k:w}),z&&((0,o.o8)(R)||o.W6?e():(0,o.kw)(e)),()=>{_.current=!0,n()}}),[g]),(0,o.LI)((()=>{let e;function t(){const t=(0,o.mf)(d)?d(R):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){A().error||!p&&!S().isVisible()||!h&&!S().isOnline()?t():W(a).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[d,p,h,g]),(0,r.useDebugValue)(V),c&&(0,o.o8)(R)&&g){if(!o.w6&&o.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw j.current=t,O.current=n,_.current=!1,(0,o.o8)(F)?W(a):F}return{mutate:G,get data(){return D.data=!0,V},get error(){return D.error=!0,F},get isValidating(){return D.isValidating=!0,$},get isLoading(){return D.isLoading=!0,q}}}))},2303:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3255),i=(0,n(4729).xD)(r.ZP,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r))))}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@kenyaemr/esm-patient-registration-app:",o.l=(n,r,i,a)=>{if(e[n])e[n].push(r);else{var u,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==t+i){u=f;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+i),u.src=n),e[n]=[r];var d=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var i=e[n];if(delete e[n],u.parentNode&&u.parentNode.removeChild(u),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),s&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{o.S={};var e={},t={};o.I=(n,r)=>{r||(r=[]);var i=t[n];if(i||(i=t[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),e[n])return e[n];o.o(o.S,n)||(o.S[n]={});var a=o.S[n],u="@kenyaemr/esm-patient-registration-app",s=(e,t,n,r)=>{var i=a[e]=a[e]||{},o=i[t];(!o||!o.loaded&&(!r!=!o.eager?r:u>o.from))&&(i[t]={get:n,from:u,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework","5.0.3-pre.846",(()=>Promise.all([o.e(130),o.e(268)]).then((()=>()=>o(130))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(62),o.e(268)]).then((()=>()=>o(6062))))),s("react-router-dom","6.4.3",(()=>Promise.all([o.e(591),o.e(268)]).then((()=>()=>o(6591))))),s("react","18.2.0",(()=>o.e(784).then((()=>()=>o(6292)))))),e[n]=c.length?Promise.all(c).then((()=>e[n]=1)):1}}})(),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,o=1;o<e.length;o++)i--,r+="u"==(typeof(u=e[o]))[0]?"-":(i>0?".":"")+(i=2,u);return r}var a=[];for(o=1;o<e.length;o++){var u=e[o];a.push(0===u?"not("+s()+")":1===u?"("+s()+" || "+s()+")":2===u?a.pop()+" "+a.pop():t(u))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],o=i<0;o&&(i=-i-1);for(var a=0,u=1,s=!0;;u++,a++){var c,l,f=u<t.length?(typeof t[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(c=r[a]))[0]))return!s||("u"==f?u>i&&!o:""==f!=o);if("u"==l){if(!s||"u"!=f)return!1}else if(s)if(f==l)if(u<=i){if(c!=t[u])return!1}else{if(o?c>t[u]:c<t[u])return!1;c!=t[u]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||u<=i)return!1;s=!1,u--}else{if(u<=i||l<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<t.length;a++){var h=t[a];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],o=(typeof i)[0];if(r>=n.length)return"u"==o;var a=n[r],u=(typeof a)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&i!=a)return i<a;r++}})(t,n)?n:t),0)},i=(e,i,o,s)=>{var c=r(e,o);return n(s,c)||a(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,o,c,s)),u(e[o][c])},a=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},u=e=>(e.loaded=1,e.get()),s=(e=>function(t,n,r,i){var a=o.I(t);return a&&a.then?a.then(e.bind(e,t,o.S[t],n,r,i)):e(t,o.S[t],n,r,i)})(((e,t,n,r,a)=>t&&o.o(t,n)?i(t,0,n,r):a())),c={},l={4924:()=>s("default","react-i18next",[1,11],(()=>o.e(62).then((()=>()=>o(6062))))),8744:()=>s("default","react-router-dom",[1,6],(()=>o.e(591).then((()=>()=>o(6591))))),268:()=>s("default","react",[1,18],(()=>o.e(784).then((()=>()=>o(6292))))),2870:()=>s("default","@openmrs/esm-framework",[1,5],(()=>o.e(130).then((()=>()=>o(130)))))};[2870,268].forEach((e=>{o.m[e]=t=>{c[e]=0,delete o.c[e];var n=l[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var f={196:[8744],268:[268],924:[4924]};o.f.consumes=(e,t)=>{o.o(f,e)&&f[e].forEach((e=>{if(o.o(c,e))return t.push(c[e]);var n=t=>{c[e]=0,o.m[e]=n=>{delete o.c[e],n.exports=t()}},r=t=>{delete c[e],o.m[e]=n=>{throw delete o.c[e],t}};try{var i=l[e]();i.then?t.push(c[e]=i.then(n).catch(r)):n(i)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,268:0,68:0,9:0};o.f.j=(t,n)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(t))e[t]=0;else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var a=o.p+o.u(t),u=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,r[1](u)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[a,u,s]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in u)o.o(u,r)&&(o.m[r]=u[r]);s&&s(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),o.nc=void 0,o(7068)})();
|