@openmrs/esm-home-app 3.1.2-pre.103 → 4.0.0
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/.turbo/turbo-build.log +27 -29
- package/dist/{499.js → 193.js} +1 -1
- package/dist/347.js +1 -0
- package/dist/372.js +2 -0
- package/dist/{97.js.LICENSE.txt → 372.js.LICENSE.txt} +13 -2
- package/dist/{994.js → 423.js} +1 -1
- package/dist/{520.js → 444.js} +1 -1
- package/dist/{199.js → 572.js} +1 -1
- package/dist/{183.js → 631.js} +1 -1
- package/dist/709.js +1 -1
- package/dist/787.js +1 -0
- package/dist/81.js +1 -0
- package/dist/858.js +1 -1
- package/dist/858.js.LICENSE.txt +2 -2
- package/dist/928.js +1 -0
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-home-app.js +1 -1
- package/dist/openmrs-esm-home-app.js.buildmanifest.json +111 -111
- package/dist/openmrs-esm-home-app.old +1 -1
- package/jest.config.js +23 -0
- package/package.json +7 -12
- package/setupTests.ts +2 -1
- package/src/dashboard/home-dashboard.component.tsx +7 -5
- package/src/dashboard/home-dashboard.test.tsx +55 -42
- package/src/helpers/render-with-router.tsx +1 -1
- package/src/index.ts +5 -1
- package/src/openmrs-esm-home-schema.ts +6 -0
- package/dist/354.js +0 -1
- package/dist/54.js +0 -1
- package/dist/59.js +0 -1
- package/dist/870.js +0 -1
- package/dist/97.js +0 -2
- package/jest.config.json +0 -32
- package/src/set-public-path.ts +0 -3
package/dist/858.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 858.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_openmrs_esm_home_app=self.webpackChunk_openmrs_esm_home_app||[]).push([[858],{560:(e,t,n)=>{System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var r={},o={};return{setters:[function(e){r.Type=e.Type,r.defineConfigSchema=e.defineConfigSchema,r.getConfig=e.getConfig,r.navigate=e.navigate,r.validators=e.validators},function(e){o.reportError=e.reportError}],execute:function(){e((()=>{var e={672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,u=n,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return c}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(o=a%4?64*o+i:i,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return c})}()},525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],u=[];for(i=0;i<a.length;i++)u.push(a[i].resource);o(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),s=r[0],l=r[1],f=o[l];if(c===s&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(u,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),c=n(719),s=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),E=i.Http(e,n),O=f.Path,j=O(e.baseUrl),k=j.slash(":type || :resource.resourceType"),$=k.slash("_history"),C=k.slash(":id || :resource.id"),A=C.slash("_history"),P=C.slash(":versionId || :resource.meta.versionId"),T=j.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(j.slash("metadata")).end(E),document:w.and(j.slash("Document")).end(E),profile:b.and(j.slash("Profile").slash(":type")).end(E),transaction:w.and(j).end(E),history:b.and(j.slash("_history")).and(R).end(E),typeHistory:b.and($).and(R).end(E),resourceHistory:b.and(A).and(R).end(E),read:b.and(s.$WithPatient).and(C).end(E),vread:b.and(P).end(E),delete:x.and(C).and(I).end(E),create:w.and(k).and(I).end(E),validate:w.and(k.slash("_validate")).end(E),meta:{add:w.and(T.slash("$meta-add")).end(E),delete:w.and(T.slash("$meta-delete")).end(E),read:b.and(T.slash("$meta")).end(E)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(R).end(E),update:_.and(C).and(I).end(E),conditionalUpdate:_.and(k).and(r.$SearchParams).and(I).end(E),conditionalDelete:x.and(k).and(r.$SearchParams).and(I).end(E),nextPage:b.and(c.$$BundleLinkUrl("next")).end(E),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:S.and(C).and(y("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var u=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===u}))[0]||(null!=n?n[u]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(s(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(u[a]&&(l.operator=u[a]),c[a]&&(l.modifier=c[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),s(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],u=o.length;(e||"object"!==i(a))&&(a={});for(var c=0;c<u;++c){var s=o[c];if("object"===i(s))for(var l in s)if("__proto__"!==l){var f=e?n.clone(s[l]):s[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},602:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new $(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function m(){}function g(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(C([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=g.prototype=y.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,u){var c=l(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function C(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:t,done:!0}}return m.prototype=g,c(x,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(x),c(x,u,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},385:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=r},254:e=>{"use strict";e.exports=o}},i={};function a(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.y=t,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{OpenmrsFetchError:()=>ne,VisitMode:()=>Be,VisitStatus:()=>Fe,backendDependencies:()=>qe,clearCurrentUser:()=>de,defaultVisitCustomRepresentation:()=>De,fetchCurrentPatient:()=>_e,fhir:()=>oe,fhirBaseUrl:()=>re,getCurrentUser:()=>le,getLocations:()=>Ke,getLoggedInUser:()=>ve,getSessionLocation:()=>ye,getSessionStore:()=>fe,getStartedVisit:()=>ze,getVisitTypes:()=>He,getVisitsForPatient:()=>Ne,makeUrl:()=>X,openmrsFetch:()=>ee,openmrsObservableFetch:()=>te,refetchCurrentUser:()=>pe,saveVisit:()=>Me,sessionEndpoint:()=>J,setSessionLocation:()=>me,setupApiModule:()=>be,toLocationObject:()=>We,toVisitTypeObject:()=>Ve,updateVisit:()=>Ue,userHasAccess:()=>he});var e=a(602),t=a.n(e),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e){return"function"==typeof e}var c=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,c=e},get useDeprecatedSynchronousErrorHandling(){return c}};function l(e){setTimeout((function(){throw e}),0)}var f={closed:!0,next:function(e){},error:function(e){if(s.useDeprecatedSynchronousErrorHandling)throw e;l(e)},complete:function(){}},p=Array.isArray||function(e){return e&&"number"==typeof e.length},d=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),h=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n,r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,c=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var s=0;s<o.length;++s)o[s].remove(this);if(i(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){t=e instanceof d?v(e.errors):[e]}}if(p(c)){s=-1;for(var l=c.length;++s<l;){var f=c[s];if(null!==(n=f)&&"object"==typeof n)try{f.unsubscribe()}catch(e){t=t||[],e instanceof d?t=t.concat(v(e.errors)):t.push(e)}}}if(t)throw new d(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function v(e){return e.reduce((function(e,t){return e.concat(t instanceof d?t.errors:t)}),[])}var y="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),m=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=f;break;case 1:if(!n){i.destination=f;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new g(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new g(i,n,r,o)}return i}return o(t,e),t.prototype[y]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(h),g=function(e){function t(t,n,r,o){var a,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return i(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==f&&(i((c=Object.create(n)).unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=o,u}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):l(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;l(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw e;l(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return s.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(l(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(m),b="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(e){return e}function _(e){return 0===e.length?w:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var x=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(e instanceof m)return e;if(e[y])return e[y]()}return e||t||n?new m(e,t,n):new m(f)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof m?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=S(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[b]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:_(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=S(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function S(e){if(e||(e=s.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var O="object"==typeof self&&self&&self.Object===Object&&self;const j=(E||O||Function("return this")()).Symbol;var k=Object.prototype,$=k.hasOwnProperty,C=k.toString,A=j?j.toStringTag:void 0,P=Object.prototype.toString,T=j?j.toStringTag:void 0;const I=(R=Object.getPrototypeOf,L=Object,function(e){return R(L(e))});var R,L,D=Function.prototype,N=Object.prototype,M=D.toString,U=N.hasOwnProperty,B=M.call(Object);const F=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":T&&T in Object(e)?function(e){var t=$.call(e,A),n=e[A];try{e[A]=void 0;var r=!0}catch(e){}var o=C.call(e);return r&&(t?e[A]=n:delete e[A]),o}(e):function(e){return P.call(e)}(e)}(e))return!1;var t=I(e);if(null===t)return!0;var n=U.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&M.call(n)==B};var z=a(824);function V(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){V(i,r,o,a,u,"next",e)}function u(e){V(i,r,o,a,u,"throw",e)}a(void 0)}))}}function W(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function K(e,t,n){return K=W()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Z(o,n.prototype),o},K.apply(null,arguments)}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function G(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e,t){return Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Z(e,t)}var Y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Q(e){var t="function"==typeof Map?new Map:void 0;return Q=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return K(e,arguments,q(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Z(r,e)},Q(e)}var J="/ws/rest/v1/session";function X(e){return window.openmrsBase+e}function ee(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof n)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var r=X(e);n.headers||(n.headers={}),F(n.body)&&(n.body=JSON.stringify(n.body)),void 0===n.headers.Accept&&(n.headers.Accept="application/json"),null===n.headers.Accept&&delete n.headers.Accept;var o,i=Error();return window.fetch(r,n).then((o=H(t().mark((function e(n){var o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o=n).ok){e.next=10;break}if(204!==o.status){e.next=7;break}return o.data=null,e.abrupt("return",o);case 7:return e.abrupt("return",o.text().then((function(e){try{e&&(o.data=JSON.parse(e))}catch(e){}return o})));case 8:e.next=19;break;case 10:return e.next=12,(0,z.getConfig)("@openmrs/esm-api");case 12:if(a=e.sent.redirectAuthFailure,!(r===X(J)&&403===o.status||a.enabled&&a.errors.includes(o.status))){e.next=18;break}return(0,z.navigate)({to:a.url}),e.abrupt("return",a.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",o.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new ne(r,o,t,i)}),(function(e){throw new ne(r,o,null,i)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)}))}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new x((function(r){var o=!1;return ee(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))}var ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Z(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=q(t);if(n){var o=q(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return G(this,e)});function o(e,t,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=t,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(Q(Error)),re="/ws/fhir2/R4",oe=a(256)({baseUrl:re},{http:function(e){return ee(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),ie=a(254);function ae(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ue(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ae(i,r,o,a,u,"next",e)}function u(e){ae(i,r,o,a,u,"throw",e)}a(void 0)}))}}var ce=(0,a(385).createGlobalStore)("session",{loaded:!1,session:null}),se=0;function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(se<Date.now()-6e4||!ce.getState().loaded)&&pe(),new x((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(ce.getState()),ce.subscribe(n)}))}function fe(){return(se<Date.now()-6e4||!ce.getState().loaded)&&pe(),ce}function pe(){return new Promise((function(e,t){se=Date.now(),ee(J).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),ce.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,ie.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))}function de(){ce.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function he(e,t){return function(e,t){return t.privileges.find((function(t){return e===t.display}))}(e,t)||function(e){return e.roles.find((function(e){return"System Developer"===e.display}))}(t)}function ve(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(ce.getState()),e||(t=ce.subscribe(o))}))}function ye(){return new Promise((function(e,t){var n=le().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))}function me(e,t){return ge.apply(this,arguments)}function ge(){return(ge=ue(t().mark((function e(n,r){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee(J,{method:"POST",body:{sessionLocation:n},headers:{"Content-Type":"application/json"},signal:r.signal});case 2:pe();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(){(0,z.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:z.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:z.Type.String,_default:"${openmrsSpaBase}/login",_validators:[z.validators.isUrl]},errors:{_type:z.Type.Array,_default:[401],_elements:{_type:z.Type.Number,_validators:[z.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:z.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),pe()}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){return e?oe.read(function(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){we(e,t,n[t])}))}return e}({type:"Patient",patient:e},t)):Promise.resolve(null)}var xe=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Se=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(h),Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return o(t,e),t}(m),Oe=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[y]=function(){return new Ee(this)},t.prototype.lift=function(e){var t=new je(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new xe;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new xe;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new xe;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new xe;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new xe;return this.hasError?(e.error(this.thrownError),h.EMPTY):this.isStopped?(e.complete(),h.EMPTY):(this.observers.push(e),new Se(this,e))},t.prototype.asObservable=function(){var e=new x;return e.source=this,e},t.create=function(e,t){return new je(e,t)},t}(x),je=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):h.EMPTY},t}(Oe),ke=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new xe;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Oe),$e=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Ce=new x((function(e){return e.complete()}));function Ae(e){return function(t){return 0===e?Ce:t.lift(new Pe(e))}}var Pe=function(){function e(e){if(this.total=e,this.total<0)throw new $e}return e.prototype.call=function(e,t){return t.subscribe(new Te(e,this.total))},e}(),Te=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(m);function Ie(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Re(e,t))}}var Re=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Le(e,this.project,this.thisArg))},e}(),Le=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(m),De="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Ne(e,t,n){var r=null!=n?n:De;return te("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Ae(1)).pipe(Ie((function(e){return e})))}function Me(e,t){return te("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Ue(e,t,n){return te("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}var Be,Fe,ze=new ke(null);function Ve(e){return{uuid:e.uuid,display:e.display,name:e.name}}function He(){return te("/ws/rest/v1/visittype").pipe(Ie((function(e){return e.data.results.map(Ve)}))).pipe(Ae(1))}function We(e){return{uuid:e.uuid,display:e.display}}function Ke(){return te("/ws/rest/v1/location").pipe(Ie((function(e){return e.data.results.map(We)}))).pipe(Ae(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Be||(Be={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Fe||(Fe={}));var qe={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),u})())}}}))},473:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=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.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),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{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");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function n(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=n;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=e(p(g));else{var b=e(p(g.prefix)),w=e(p(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var x=n[n.length-1],S="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;a||(v+="(?:"+h+"(?="+d+"))?"),S||(v+="(?="+h+"|"+d+")")}return new RegExp(v,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return u}(n,o),r,o)}function r(e,o,i){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,o):Array.isArray(e)?function(e,n,o){var i=e.map((function(e){return r(e,n,o).source}));return new RegExp("(?:"+i.join("|")+")",t(o))}(e,o,i):n(e,o,i)}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){return function(e){if(Array.isArray(e))return a(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 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)||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.")}()}o.r(i),o.d(i,{filterBreadcrumbs:()=>v,getBreadcrumbs:()=>p,getBreadcrumbsFor:()=>y,registerBreadcrumb:()=>l,registerBreadcrumbs:()=>f});var c=(0,o(685).createGlobalStore)("breadcrumbs",[]);function s(e){return t=e.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n)?e.matcher:"string"==typeof e.matcher?r(e.matcher):r(e.path);var t,n}function l(e){return f([e])}function f(e){var t=p(),n=e.map((function(e){return{matcher:s(e),settings:e}})),r=u(t).concat(u(n));c.setState(r,!0)}function p(){return c.getState()}function d(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 h(e,t){if(t)return function(e,t){return(n=e.filter((function(e){return e.matcher.test(t)})),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return d(e,1);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)?d(e,1):void 0}}(n)||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.")}())[0];var n}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=h(e,n.join("/"));if(r)return r}}(e,t)}function v(e,t){if(e.length>0){var n=h(e,t);if(n){for(var r=[n],o=h(e,n.settings.parent);void 0!==o;)r.push(o),o=h(e,o.settings.parent);return r.reverse()}}return[]}function y(e){return v(p(),e)}})(),i})())}}}))},538:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(e,t){var n={},r={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore,n.getGlobalStore=e.getGlobalStore},function(e){r.navigateToUrl=e.navigateToUrl}],execute:function(){e((()=>{"use strict";var e={685:e=>{e.exports=n},645:e=>{e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{function e(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function t(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}}function n(n){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:t((function(e){return n(o,e)}));default:return e(o)&&e(i)?r:e(o)?t((function(e){return n(e,i)})):e(i)?t((function(e){return n(o,e)})):n(o,i)}}}function r(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function u(e,t){return Object.prototype.hasOwnProperty.call(t,e)}o.r(i),o.d(i,{Type:()=>N,configExtensionStore:()=>Q,configInternalStore:()=>q,defineConfigSchema:()=>ye,defineExtensionConfigSchema:()=>me,getConfig:()=>be,getConfigStore:()=>J,getExtensionConfig:()=>re,getExtensionConfigFromStore:()=>oe,getExtensionSlotConfig:()=>ee,getExtensionSlotConfigFromStore:()=>te,getExtensionSlotsConfigStore:()=>X,getExtensionsConfigStore:()=>ne,implementerToolsConfigStore:()=>ie,inRange:()=>Ve,interpolateString:()=>Fe,interpolateUrl:()=>Be,isUrl:()=>We,isUrlWithTemplateParameters:()=>He,navigate:()=>ze,oneOf:()=>Ke,processConfig:()=>we,provide:()=>ge,temporaryConfigStore:()=>Y,validator:()=>M,validators:()=>qe});const c="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var s=Object.prototype.toString,l=function(){return"[object Arguments]"===s.call(arguments)?function(e){return"[object Arguments]"===s.call(e)}:function(e){return u("callee",e)}}();const f=l;var p=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),v=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const y="function"!=typeof Object.keys||h?t((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=h&&f(e);for(t in e)!u(t,e)||o&&"length"===t||(r[r.length]=t);if(p)for(n=d.length-1;n>=0;)u(t=d[n],e)&&!v(r,t)&&(r[r.length]=t),n-=1;return r})):t((function(e){return Object(e)!==e?[]:Object.keys(e)})),m=t((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function g(e,t,n,o){var i=r(e);function u(e,t){return b(e,t,n.slice(),o.slice())}return!a((function(e,t){return!a(u,t,e)}),r(t),i)}function b(e,t,n,r){if(c(e,t))return!0;var o,i,a=m(e);if(a!==m(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!c(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!c(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&g(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&g(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=y(e);if(l.length!==y(t).length)return!1;var f=n.concat([e]),p=r.concat([t]);for(s=l.length-1;s>=0;){var d=l[s];if(!u(d,t)||!b(t[d],e[d],f,p))return!1;s-=1}return!0}const w=n((function(e,t){return b(e,t,[],[])}));function _(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?_(e[u],t,n,!0):e[u];return o};switch(m(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const x=t((function(e){return null!=e&&"function"==typeof e.clone?e.clone():_(e,[],[],!0)}));function S(r){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return e(i)?o:n((function(e,t){return r(i,e,t)}));case 2:return e(i)&&e(a)?o:e(i)?n((function(e,t){return r(e,a,t)})):e(a)?n((function(e,t){return r(i,e,t)})):t((function(e){return r(i,a,e)}));default:return e(i)&&e(a)&&e(u)?o:e(i)&&e(a)?n((function(e,t){return r(e,t,u)})):e(i)&&e(u)?n((function(e,t){return r(e,a,t)})):e(a)&&e(u)?n((function(e,t){return r(i,e,t)})):e(i)?t((function(e){return r(e,a,u)})):e(a)?t((function(e){return r(i,e,u)})):e(u)?t((function(e){return r(i,a,e)})):r(i,a,u)}}}const E=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},O=t((function(e){return!!E(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var j=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),k=n((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const $=k;function C(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function A(e,t,n,r){return e["@@transducer/result"](n[r]($(e["@@transducer/step"],e),t))}var P="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const T=S((function(e,t,n){if("function"==typeof e&&(e=function(e){return new j(e)}(e)),O(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return A(e,t,n,"fantasy-land/reduce");if(null!=n[P])return C(e,t,n[P]());if("function"==typeof n.next)return C(e,t,n);if("function"==typeof n.reduce)return A(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));function I(e){return"[object Object]"===Object.prototype.toString.call(e)}const R=S((function(e,t,n){var r,o={};for(r in t)u(r,t)&&(o[r]=u(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),L=S((function e(t,n,r){return R((function(n,r,o){return I(r)&&I(o)?e(t,r,o):t(n,r,o)}),n,r)})),D=n((function(e,t){return L((function(e,t,n){return n}),e,t)}));var N;function M(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(N||(N={}));var U=M((function(e){return Array.isArray(e)}),"must be an array"),B=M((function(e){return"boolean"==typeof e}),"must be a boolean"),F=M((function(e){return"number"==typeof e}),"must be a number"),z=M((function(e){return"string"==typeof e}),"must be a string"),V=M((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),H=M((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),W=o(685),K={providedConfigs:[],schemas:{},devDefaultsAreOn:Z()},q=(0,W.createGlobalStore)("config-internal",K),G=Z();function Z(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}q.subscribe((function(e){var t;e.devDefaultsAreOn!=G&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),G=e.devDefaultsAreOn)}));var Y=(0,W.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Y.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Q=(0,W.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function J(e){return(0,W.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})}function X(){return(0,W.getGlobalStore)("config-extension-slots",{slots:{}})}function ee(e){return te(X().getState(),e)}function te(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}}function ne(){return(0,W.getGlobalStore)("config-extensions",{configs:{}})}function re(e,t){return oe(ne().getState(),e,t)}function oe(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}var ie=(0,W.createGlobalStore)("config-implementer-tools",{config:{}});function ae(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 ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(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){ue(e,t,n[t])}))}return e}function se(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||fe(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.")}()}function le(e){return function(e){if(Array.isArray(e))return ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fe(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.")}()}function fe(e,t){if(e){if("string"==typeof e)return ae(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)?ae(e,t):void 0}}function pe(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=ke(u,e,t);J(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function de(e,t){var n,r,o=(n=Ce(Oe(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=se(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=se(p.value,2),v=h[0];Ee(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return ce({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=se(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=X(),u=a.getState(),c={slots:ce({},u.slots,i)};w(u,c)||a.setState(c)}function he(e,t){var n=function(e,t){var n=xe(x(e.schemas)),r=le(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=se(u.value,2);n=Ce([n,Se(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);ie.setState({config:n})}function ve(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=_e(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=ce({},r[s.slotName],ue({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}ne().setState({configs:r})}function ye(e,t){je(e,t);var n=q.getState();q.setState({schemas:ce({},n.schemas,ue({},e,t))})}function me(e,t){je(e,t);var n=q.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),q.setState({schemas:ce({},n.schemas,ue({},e,t))})}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=q.getState();q.setState({providedConfigs:le(n.providedConfigs).concat([{source:t,config:e}])})}function be(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=J(e);n(r.getState());var o=r.subscribe(n)}))}function we(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Ae(e,t,n);var o=Le(e,t,r);return Te(e,o,n),o}function _e(e,t,n,r,o,i){var a,u,c,s,l=function(e){return se(e.split("#"),1)[0]}(r),f=o.schemas[l],p=f?l:t,d=Oe(o,i),h=$e(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=Ce([$e(p,d),v]),m=null!=f?f:o.schemas[t];Ae(m,y,p);var g=Le(m,y,o.devDefaultsAreOn);return Te(m,g,p),delete g.extensionSlots,g}function xe(e){return e.hasOwnProperty("_default")?ce({},e,{_value:e._default,_source:"default"}):Ne(e)?Object.keys(e).reduce((function(t,n){return t[n]=xe(e[n]),t}),{}):{}}function Se(e,t){return Ne(e)?Object.keys(e).reduce((function(n,r){return n[r]=Se(e[r],t),n}),{}):{_value:e,_source:t}}function Ee(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Ne(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Oe(e,t){return le(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!Ne(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||je(e,c,u);var s=c._elements;if(De(s)&&je(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(N).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(N).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![N.Array,N.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function ke(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=$e(e,Oe(t,n));Ae(r,o,e);var i=Le(r,o,t.devDefaultsAreOn);return Te(r,i,e),delete i.extensionSlots,i}function $e(e,t){return Ce(t.map((function(t){return t[e]})).filter((function(e){return!!e})))}function Ce(e){return T(D)({},e)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Pe(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}function Pe(e,t,n){Ie(n,e._type,t),Ne(t)?e._type===N.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];Ae(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Ae(e,t,n):e._type===N.Array&&function(e,t,n){if(De(e._elements))for(var r=0;r<t.length;r++)Pe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;Ie("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Te(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Re(n,e._validators,t),Ne(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===N.Object&&e._elements?Te(e._elements,s,l):Te(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Te(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}function Ie(e,t,n){t&&Re(e,[{Array:U,Boolean:B,ConceptUuid:H,Number:F,Object:V,String:z,UUID:H,PersonAttributeTypeUuid:H,PatientIdentifierTypeUuid:H}[t]],n)}function Re(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}}pe(q.getState(),Y.getState()),q.subscribe((function(e){return pe(e,Y.getState())})),Y.subscribe((function(e){return pe(q.getState(),e)})),he(q.getState(),Y.getState()),q.subscribe((function(e){return he(e,Y.getState())})),Y.subscribe((function(e){return he(q.getState(),e)})),de(q.getState(),Y.getState()),q.subscribe((function(e){return de(e,Y.getState())})),Y.subscribe((function(e){return de(q.getState(),e)})),ve(q.getState(),Q.getState(),Y.getState()),q.subscribe((function(e){ve(e,Q.getState(),Y.getState())})),Q.subscribe((function(e){ve(q.getState(),e,Y.getState())})),Y.subscribe((function(e){ve(q.getState(),Q.getState(),e)}));var Le=function(e,t,n){var r=x(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&De(s))if(u._type===N.Array&&Array.isArray(a)){var l=a.map((function(e){return Le(s,e,n)}));r[i]=l}else if(u._type===N.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Le(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(Ne(u)){var m=r.hasOwnProperty(i)?a:{};Ne(m)&&(r[i]=Le(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r};function De(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0}function Ne(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var Me=o(645);function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Fe(e,function(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){Ue(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")}function Fe(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)}function ze(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Be(t,n);o.startsWith(r)?(0,Me.navigateToUrl)(o):window.location.assign(o)}var Ve=function(e,t){return M((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},He=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return M((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=He([]),Ke=function(e){return M((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},qe={inRange:Ve,isUrl:We,isUrlWithTemplateParameters:He,oneOf:Ke}})(),i})())}}}))},41:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=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.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),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{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");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>t});var e=o(728);function t(e){var t=r(e);setTimeout((function(){throw t}))}function n(){var e=Error();return function(n){r(n).stack+="\nAsync stacktrace:\n".concat(e.stack),t(n)}}function r(e){var t,n,r;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(){return(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},282:(e,t,n)=>{e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(r,o){var i={},a={},u={};return{setters:[function(e){i.configExtensionStore=e.configExtensionStore,i.getExtensionConfigFromStore=e.getExtensionConfigFromStore,i.getExtensionSlotConfig=e.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){a.createGlobalStore=e.createGlobalStore,a.getGlobalStore=e.getGlobalStore},function(e){u.mountRootParcel=e.mountRootParcel}],execute:function(){r((()=>{var r={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=i},685:e=>{"use strict";e.exports=a},645:e=>{"use strict";e.exports=u}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.y=o,s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})();var l={};return(0,s(968).s)(1),(()=>{"use strict";s.r(l),s.d(l,{attach:()=>jt,checkStatus:()=>Lt,checkStatusFor:()=>Dt,detach:()=>kt,detachAll:()=>$t,extensionStore:()=>Wt,getAssignedExtensions:()=>Tt,getConnectedExtensions:()=>At,getCustomProps:()=>Nt,getExtensionInternalStore:()=>at,getExtensionNameFromId:()=>xt,getExtensionRegistration:()=>Et,getExtensionRegistrationFrom:()=>St,getExtensionStore:()=>ct,registerExtension:()=>Ot,registerExtensionSlot:()=>It,renderExtension:()=>Ht,reset:()=>Rt,updateInternalExtensionStore:()=>ut});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=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=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const u=a,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=c||f||Function("return this")(),d=p.Symbol;var h=Object.prototype,v=h.hasOwnProperty,y=h.toString,m=d?d.toStringTag:void 0,g=Object.prototype.toString,b=d?d.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=v.call(e,m),n=e[m];try{e[m]=void 0;var r=!0}catch(e){}var o=y.call(e);return r&&(t?e[m]=n:delete e[m]),o}(e):function(e){return g.call(e)}(e)},_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},x=function(e){if(!_(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},S=p["__core-js_shared__"];var E,O=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",j=Function.prototype.toString;const k=function(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var $=/^\[object .+?Constructor\]$/,C=Function.prototype,A=Object.prototype,P=C.toString,T=A.hasOwnProperty,I=RegExp("^"+P.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const R=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!_(e)||(t=e,O&&O in t))&&(x(e)?I:$).test(k(e));var t}(n)?n:void 0},L=R(p,"Map"),D=R(Object,"create");var N=Object.prototype.hasOwnProperty,M=Object.prototype.hasOwnProperty;function U(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])}}U.prototype.clear=function(){this.__data__=D?D(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return N.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:M.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=D&&void 0===t?"__lodash_hash_undefined__":t,this};const B=U,F=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function z(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])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new B,map:new(L||u),string:new B}},z.prototype.delete=function(e){var t=F(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return F(this,e).get(e)},z.prototype.has=function(e){return F(this,e).has(e)},z.prototype.set=function(e,t){var n=F(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const V=z;function H(e){var t=this.__data__=new u(e);this.size=t.size}H.prototype.clear=function(){this.__data__=new u,this.size=0},H.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},H.prototype.get=function(e){return this.__data__.get(e)},H.prototype.has=function(e){return this.__data__.has(e)},H.prototype.set=function(e,t){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!L||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(e,t),this.size=n.size,this};const W=H;function K(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new V;++t<n;)this.add(e[t])}K.prototype.add=K.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},K.prototype.has=function(e){return this.__data__.has(e)};const q=K,G=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},Z=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new q:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!G(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Y=p.Uint8Array,Q=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var X=d?d.prototype:void 0,ee=X?X.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var ue=Object.prototype,ce=ue.hasOwnProperty,se=ue.propertyIsEnumerable,le=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ce.call(e,"callee")&&!se.call(e,"callee")};const fe=le;var pe=t&&!t.nodeType&&t,de=pe&&e&&!e.nodeType&&e,he=de&&de.exports===pe?p.Buffer:void 0;const ve=(he?he.isBuffer:void 0)||function(){return!1};var ye=/^(?:0|[1-9]\d*)$/;const me=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t},ge=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;var we=t&&!t.nodeType&&t,_e=we&&e&&!e.nodeType&&e,xe=_e&&_e.exports===we&&c.process,Se=function(){try{return _e&&_e.require&&_e.require("util").types||xe&&xe.binding&&xe.binding("util")}catch(e){}}(),Ee=Se&&Se.isTypedArray;const Oe=Ee?(je=Ee,function(e){return je(e)}):function(e){return ie(e)&&ge(e.length)&&!!be[w(e)]};var je,ke=Object.prototype.hasOwnProperty,$e=Object.prototype;const Ce=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ae=Object.prototype.hasOwnProperty;const Pe=function(e){return null!=(t=e)&&ge(t.length)&&!x(t)?function(e,t){var n=te(e),r=!n&&fe(e),o=!n&&!r&&ve(e),i=!n&&!r&&!o&&Oe(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=u.length;for(var s in e)!ke.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||me(s,c))||u.push(s);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||$e))return Ce(e);var t,n,r=[];for(var o in Object(e))Ae.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Te=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Pe,oe)};var Ie=Object.prototype.hasOwnProperty;const Re=R(p,"DataView"),Le=R(p,"Promise"),De=R(p,"Set"),Ne=R(p,"WeakMap");var Me="[object Map]",Ue="[object Promise]",Be="[object Set]",Fe="[object WeakMap]",ze="[object DataView]",Ve=k(Re),He=k(L),We=k(Le),Ke=k(De),qe=k(Ne),Ge=w;(Re&&Ge(new Re(new ArrayBuffer(1)))!=ze||L&&Ge(new L)!=Me||Le&&Ge(Le.resolve())!=Ue||De&&Ge(new De)!=Be||Ne&&Ge(new Ne)!=Fe)&&(Ge=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?k(n):"";if(r)switch(r){case Ve:return ze;case He:return Me;case We:return Ue;case Ke:return Be;case qe:return Fe}return t});const Ze=Ge;var Ye="[object Arguments]",Qe="[object Array]",Je="[object Object]",Xe=Object.prototype.hasOwnProperty;const et=function(e,t,n,o,i,a){var u=te(e),c=te(t),s=u?Qe:Ze(e),l=c?Qe:Ze(t),f=(s=s==Ye?Je:s)==Je,p=(l=l==Ye?Je:l)==Je,d=s==l;if(d&&ve(e)){if(!ve(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new W),u||Oe(e)?Z(e,t,n,o,i,a):function(e,t,n,o,i,a,u){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||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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 c=Q;case"[object Set]":var s=1&o;if(c||(c=J),e.size!=t.size&&!s)return!1;var l=u.get(e);if(l)return l==t;o|=2,u.set(e,t);var f=Z(c(e),c(t),o,i,a,u);return u.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Xe.call(e,"__wrapped__"),v=p&&Xe.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new W),i(y,m,n,o,a)}}return!!d&&(a||(a=new W),function(e,t,n,r,o,i){var a=1&n,u=Te(e),c=u.length;if(c!=Te(t).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in t:Ie.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++s<c;){var v=e[l=u[s]],y=t[l];if(r)var m=a?r(y,v,l,t,e,i):r(v,y,l,e,t,i);if(!(void 0===m?v===y||o(v,y,n,r,i):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))},tt=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:et(t,n,r,o,e,i))},nt=function(e,t){return tt(e,t)};var rt=s(824),ot=s(685),it=(0,ot.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),at=function(){return(0,ot.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function ut(e){var t=it.getState(),n=e(t);n!==t&&it.setState(n)}var ct=function(){return(0,ot.getGlobalStore)("extensions",{slots:{}})};function st(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}nt(rt.configExtensionStore.getState().mountedExtensions,t)||rt.configExtensionStore.setState({mountedExtensions:t})}function lt(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 ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pt(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){ft(e,t,n[t])}))}return e}function dt(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||vt(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.")}()}function ht(e){return function(e){if(Array.isArray(e))return lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vt(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.")}()}function vt(e,t){if(e){if("string"==typeof e)return lt(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)?lt(e,t):void 0}}st(it.getState()),it.subscribe(st);var yt=at(),mt=ct(),gt=(0,rt.getExtensionSlotsConfigStore)(),bt=(0,rt.getExtensionsConfigStore)();function wt(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=dt(u.value,2),l=s[0],f=s[1],p=Pt(l,e,(0,rt.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}nt(mt.getState().slots,r)||mt.setState({slots:r})}function _t(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function xt(e){return dt(e.split("#"),1)[0]}function St(e,t){var n=xt(t);return e.extensions[n]}function Et(e){return St(yt.getState(),e)}yt.subscribe((function(e){wt(e,gt.getState(),bt.getState())})),gt.subscribe((function(e){wt(yt.getState(),e,bt.getState())})),bt.subscribe((function(e){wt(yt.getState(),gt.getState(),e)}));var Ot=yt.action((function(e,t){e.extensions[t.name]=pt({},t,{instances:[]})}));function jt(e,t){ut((function(n){var r=n.slots[e];return pt({},n,r?{slots:pt({},n.slots,ft({},e,pt({},r,{attachedIds:ht(r.attachedIds).concat([t])})))}:{slots:pt({},n.slots,ft({},e,pt({},_t(e),{attachedIds:[t]})))})}))}function kt(e,t){ut((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?pt({},n,{slots:pt({},n.slots,ft({},e,pt({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))}function $t(e){ut((function(t){var n=t.slots[e];return n?pt({},t,{slots:pt({},t.slots,ft({},e,pt({},n,{attachedIds:[]})))}):t}))}function Ct(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1}function At(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return Dt(n,e.online,e.offline)}))}function Pt(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=yt.getState().extensions;return ht(t).concat(ht(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=Ct(e,o,null===(r=i[xt(e)])||void 0===r?void 0:r.order,t),c=Ct(n,o,null===(a=i[xt(n)])||void 0===a?void 0:a.order,t);return-1===c?-1:-1===u?1:u-c}))}(n,t.slots[e].attachedIds),i=[],a=!0,u=!1,c=void 0;try{for(var s,l=o[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var f=s.value,p=(0,rt.getExtensionConfigFromStore)(r,e,f).config,d=xt(f),h=t.extensions[d];h&&i.push({id:f,name:d,moduleName:h.moduleName,config:p,meta:h.meta,online:h.online,offline:h.offline})}}catch(e){u=!0,c=e}finally{try{a||null==l.return||l.return()}finally{if(u)throw c}}return i}function Tt(e){return Pt(e,yt.getState(),(0,rt.getExtensionSlotConfig)(e).config,bt.getState())}var It=yt.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return pt({},e,{slots:pt({},e.slots,ft({},n,pt({},e.slots[n],{moduleName:t})))});var i=_t(n,t);return pt({},e,{slots:pt({},e.slots,ft({},n,i))})})),Rt=mt.action((function(){return{slots:{},extensions:{}}}));function Lt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return Dt(n,e,t)}function Dt(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function Nt(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}}var Mt=s(645);function Ut(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 Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(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){Bt(e,t,n[t])}))}return e}function zt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Vt(e){return function(e){if(Array.isArray(e))return Ut(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 Ut(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)?Ut(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.")}()}function Ht(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=xt(r),u=Et(r),c=!0,s=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var l=u.load,f=u.online,p=u.offline,d=u.meta,h=u.moduleName;Lt(f,p)&&(l().then((function(a){var u=a.default,l=zt(a,["default"]);c&&(s=(0,Mt.mountRootParcel)(o(null!=u?u:l),Ft({},Nt(f,p),i,{_meta:d,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e})))})),ut((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return Ft({},o,{extensions:Ft({},o.extensions,Bt({},a,Ft({},o.extensions[a],{instances:Vt(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}}var Wt=at()})(),l})())}}}))},858:(e,t,n)=>{"use strict";n.r(t);var r=n(560),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(473);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(538);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(41);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var c=n(282);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var s=n(875);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var l=n(212);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(211);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var p=n(435);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var d=n(742);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var h=n(540);o={};for(const e in h)"default"!==e&&(o[e]=()=>h[e]);n.d(t,o)},875:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>u,setupPaths:()=>h,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>c,subscribeToastShown:()=>d});var e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){var n=function(e){return t(e.detail)};return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}function i(e){return e({online:navigator.onLine}),n(e)}var a="openmrs:precache-static-dependencies";function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:e}))}function c(e){var t=function(t){return e(t.detail)};return window.addEventListener(a,t),function(){return window.removeEventListener(a,t)}}var s="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){window.dispatchEvent(new CustomEvent(s,{detail:e}))}function p(e){var t=function(t){return e(t.detail)};return window.addEventListener(s,t),function(){return window.removeEventListener(s,t)}}function d(e){var t=function(t){return e(t.detail)};return window.addEventListener(l,t),function(){return window.removeEventListener(l,t)}}function h(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}}function v(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}}})(),o})())}}}))},212:(e,t,n)=>{System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},o={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){o.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={602:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new $(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function m(){}function g(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(C([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=g.prototype=y.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,u){var c=l(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function C(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:t,done:!0}}return m.prototype=g,c(x,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(x),c(x,u,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o}},i={};function a(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={exports:{}};return e[t](r,r.exports,a),r.exports}a.y=t,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{activateOfflineCapability:()=>F,beginEditSynchronizationItem:()=>_o,canBeginEditSynchronizationItemsOfType:()=>wo,deleteSynchronizationItem:()=>So,generateOfflineUuid:()=>Ro,getCurrentOfflineMode:()=>U,getDynamicOfflineDataEntries:()=>Vo,getDynamicOfflineDataEntriesFor:()=>Wo,getDynamicOfflineDataHandlers:()=>Fo,getFullSynchronizationItems:()=>yo,getFullSynchronizationItemsFor:()=>fo,getOfflineDb:()=>Fr,getOfflinePatientDataStore:()=>li,getOfflineSynchronizationStore:()=>Jr,getOmrsServiceWorker:()=>y,getSynchronizationItem:()=>go,getSynchronizationItems:()=>ho,getSynchronizationItemsFor:()=>so,isOfflineUuid:()=>Lo,messageOmrsServiceWorker:()=>O,offlineUuidPrefix:()=>Io,omrsOfflineCachingStrategyHttpHeaderName:()=>b,omrsOfflineResponseBodyHttpHeaderName:()=>m,omrsOfflineResponseStatusHttpHeaderName:()=>g,putDynamicOfflineData:()=>qo,putDynamicOfflineDataFor:()=>Zo,queueSynchronizationItem:()=>uo,queueSynchronizationItemFor:()=>io,registerOfflinePatientHandler:()=>fi,registerOmrsServiceWorker:()=>v,removeDynamicOfflineData:()=>Qo,removeDynamicOfflineDataFor:()=>Xo,runSynchronization:()=>Xr,setCurrentOfflineMode:()=>B,setupDynamicOfflineDataHandler:()=>zo,setupOfflineSync:()=>Oo,syncAllDynamicOfflineData:()=>ti,syncDynamicOfflineData:()=>ri,syncOfflinePatientData:()=>pi});try{self["workbox:window:6.5.1"]&&_()}catch(e){}function e(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function t(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 r(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:6.5.1"]&&_()}catch(e){}var o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function i(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function s(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function l(){}var f={type:"SKIP_WAITING"};function p(e,t){if(!t)return e&&e.then?e.then(l):Promise.resolve()}var d=function(t){var n,r;function a(e,n){var r,a;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new c(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new c("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new c("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(a=function(e){var t=e.data,n=e.ports,o=e.source;return s(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new c("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(a.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,l=a.prototype;return l.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return p(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),s(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new c("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},l.update=function(){try{return this.fn?p(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(t){try{return s(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,f)},l.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},l.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return s(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,u),a}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),h=void 0;function v(e,t){if(void 0!==h)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),h;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new d(e,t);return h=n.register().then((function(){return n.controlling.then((function(){return n}))}))}function y(){return null!=h?h:Promise.resolve(void 0)}var m="x-omrs-offline-response-body",g="x-omrs-offline-response-status",b="x-omrs-offline-caching-strategy",w=a(602),x=a.n(w);function S(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}function O(e){return j.apply(this,arguments)}function j(){return(j=E(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,u,"next",e)}function u(e){k(i,r,o,a,u,"throw",e)}a(void 0)}))}}function C(){return A.apply(this,arguments)}function A(){return(A=$(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=window.sessionStorage,e.prev=1,t.setItem("someKeyHere","test"),t.removeItem("someKeyHere"),e.next=10;break;case 6:if(e.prev=6,e.t0=e.catch(1),e.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==t.length){e.next=10;break}return e.abrupt("return",!0);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function P(){return T.apply(this,arguments)}function T(){return(T=$(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!window.indexedDB);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return R.apply(this,arguments)}function R(){return R=$(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}})));case 1:case"end":return e.stop()}}),e)}))),R.apply(this,arguments)}function L(){return D.apply(this,arguments)}function D(){return(D=$(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I();case 2:if(e.t1=e.sent,e.t1){e.next=7;break}return e.next=6,P();case 6:e.t1=e.sent;case 7:if(e.t0=e.t1,e.t0){e.next=12;break}return e.next=11,C();case 11:e.t0=e.sent;case 12:return e.abrupt("return",e.t0);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N="openmrs3:offline-mode",M="unavailable";function U(){return{current:M,notAvailable:"unavailable"===M,active:"on"===M}}function B(e){"unavailable"!==M&&"unavailable"!==e&&(localStorage.setItem(N,"on"===e?"active":"disabled"),M=e)}function F(){return z.apply(this,arguments)}function z(){return(z=$(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:e.sent||(M="active"===localStorage.getItem(N)?"on":"off"),navigator.onLine;case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,H=Object.keys,W=Array.isArray;function K(e,t){return"object"!=typeof t||H(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||V.Promise||(V.Promise=Promise);const q=Object.getPrototypeOf,G={}.hasOwnProperty;function Z(e,t){return G.call(e,t)}function Y(e,t){"function"==typeof t&&(t=t(q(e))),("undefined"==typeof Reflect?H:Reflect.ownKeys)(t).forEach((n=>{J(e,n,t[n])}))}const Q=Object.defineProperty;function J(e,t,n,r){Q(e,t,K(n&&Z(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function X(e){return{from:function(t){return e.prototype=Object.create(t.prototype),J(e.prototype,"constructor",e),{extend:Y.bind(null,e.prototype)}}}}const ee=Object.getOwnPropertyDescriptor;function te(e,t){let n;return ee(e,t)||(n=q(e))&&te(n,t)}const ne=[].slice;function re(e,t,n){return ne.call(e,t,n)}function oe(e,t){return t(e)}function ie(e){if(!e)throw new Error("Assertion Failed")}function ae(e){V.setImmediate?setImmediate(e):setTimeout(e,0)}function ue(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function ce(e,t){if(Z(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=ce(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:ce(u,t.substr(a+1))}}function se(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){ie("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)se(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?W(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c||(c=e[a]={}),se(c,u,n)}}else void 0===n?W(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function le(e){var t={};for(var n in e)Z(e,n)&&(t[n]=e[n]);return t}const fe=[].concat;function pe(e){return fe.apply([],e)}const de="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(pe([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>V[e])),he=de.map((e=>V[e]));ue(de,(e=>[e,!0]));let ve=null;function ye(e){ve="undefined"!=typeof WeakMap&&new WeakMap;const t=me(e);return ve=null,t}function me(e){if(!e||"object"!=typeof e)return e;let t=ve&&ve.get(e);if(t)return t;if(W(e)){t=[],ve&&ve.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(me(e[n]))}else if(he.indexOf(e.constructor)>=0)t=e;else{const n=q(e);for(var o in t=n===Object.prototype?{}:Object.create(n),ve&&ve.set(e,t),e)Z(e,o)&&(t[o]=me(e[o]))}return t}const{toString:ge}={};function be(e){return ge.call(e).slice(8,-1)}const we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e="symbol"==typeof we?function(e){var t;return null!=e&&(t=e[we])&&t.apply(e)}:function(){return null},xe={};function Se(e){var t,n,r,o;if(1===arguments.length){if(W(e))return e.slice();if(this===xe&&"string"==typeof e)return[e];if(o=_e(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Ee="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var Oe="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function je(e,t){Oe=e,ke=t}var ke=()=>!0;const $e=!new Error("").stack;function Ce(){if($e)try{throw Ce.arguments,new Error}catch(e){return e}return new Error}function Ae(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(ke).map((e=>"\n"+e)).join("")):""}var Pe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Te=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Pe),Ie={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Re(e,t){this._e=Ce(),this.name=e,this.message=t}function Le(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function De(e,t,n,r){this._e=Ce(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Le(e,t)}function Ne(e,t){this._e=Ce(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Le(e,t)}X(Re).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ae(this._e,2))}},toString:function(){return this.name+": "+this.message}}),X(De).from(Re),X(Ne).from(Re);var Me=Te.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Ue=Re;var Be=Te.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Ce(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Ie[t]||n,this.inner=null)}return X(r).from(Ue),e[t]=r,e}),{});Be.Syntax=SyntaxError,Be.Type=TypeError,Be.Range=RangeError;var Fe=Pe.reduce(((e,t)=>(e[t+"Error"]=Be[t],e)),{}),ze=Te.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Be[t]),e)),{});function Ve(){}function He(e){return e}function We(e,t){return null==e||e===He?t:function(n){return t(e(n))}}function Ke(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function qe(e,t){return e===Ve?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Ke(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Ke(o,this.onerror):o),void 0!==i?i:n}}function Ge(e,t){return e===Ve?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Ke(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ke(r,this.onerror):r)}}function Ze(e,t){return e===Ve?t:function(n){var r=e.apply(this,arguments);K(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Ke(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Ke(i,this.onerror):i),void 0===r?void 0===a?void 0:a:K(r,a)}}function Ye(e,t){return e===Ve?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Qe(e,t){return e===Ve?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}ze.ModifyError=De,ze.DexieError=Re,ze.BulkError=Ne;var Je={};const[Xe,et,tt]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,q(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,q(t),e]})(),nt=et&&et.then,rt=Xe&&Xe.constructor,ot=!!tt;var it=!1,at=tt?()=>{tt.then(Ct)}:V.setImmediate?setImmediate.bind(null,Ct):V.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Ct(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ct,0)},ut=function(e,t){yt.push([e,t]),st&&(at(),st=!1)},ct=!0,st=!0,lt=[],ft=[],pt=null,dt=He,ht={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Xt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Xt(e[0],e[1])}catch(e){}}))}},vt=ht,yt=[],mt=0,gt=[];function bt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ve,this._lib=!1;var t=this._PSD=vt;if(Oe&&(this._stackHolder=Ce(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Je)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&St(this,this._value))}this._state=null,this._value=null,++t.ref,xt(this,e)}const wt={get:function(){var e=vt,t=Ut;function n(n,r){var o=!e.global&&(e!==vt||t!==Ut);const i=o&&!Vt();var a=new bt(((t,a)=>{Ot(this,new _t(Qt(n,e,o,i),Qt(r,e,o,i),t,a,e))}));return Oe&&$t(a,this),a}return n.prototype=Je,n},set:function(e){J(this,"then",e&&e.prototype===Je?wt:{get:function(){return e},set:wt.set})}};function _t(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function xt(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&At();t&&"function"==typeof t.then?xt(e,((e,n)=>{t instanceof bt?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Et(e)),n&&Pt()}}),St.bind(null,e))}catch(t){St(e,t)}}function St(e,t){if(ft.push(t),null===e._state){var n=e._lib&&At();t=dt(t),e._state=!1,e._value=t,Oe&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=te(t,"stack");t._promise=e,J(t,"stack",{get:()=>it?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){lt.some((t=>t._value===e._value))||lt.push(e)}(e),Et(e),n&&Pt()}}function Et(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)Ot(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===mt&&(++mt,ut((()=>{0==--mt&&Tt()}),[]))}function Ot(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++mt,ut(jt,[n,e,t])}else e._listeners.push(t)}function jt(e,t,n){try{pt=t;var r,o=t._value;t._state?r=e(o):(ft.length&&(ft=[]),r=e(o),-1===ft.indexOf(o)&&function(e){for(var t=lt.length;t;)if(lt[--t]._value===e._value)return void lt.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{pt=null,0==--mt&&Tt(),--n.psd.ref||n.psd.finalize()}}function kt(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Ae(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Oe&&((r=Ae(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&kt(e._prev,t,n)),t}function $t(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Ct(){At()&&Pt()}function At(){var e=ct;return ct=!1,st=!1,e}function Pt(){var e,t,n;do{for(;yt.length>0;)for(e=yt,yt=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(yt.length>0);ct=!0,st=!0}function Tt(){var e=lt;lt=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=gt.slice(0),n=t.length;n;)t[--n]()}function It(e){return new bt(Je,!1,e)}function Rt(e,t){var n=vt;return function(){var r=At(),o=vt;try{return qt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{qt(o,!1),r&&Pt()}}}Y(bt.prototype,{then:wt,_then:function(e,t){Ot(this,new _t(null,null,e,t,vt))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):It(e))):this.then(null,(e=>e&&e.name===t?n(e):It(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),It(t))))},stack:{get:function(){if(this._stack)return this._stack;try{it=!0;var e=kt(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{it=!1}}},timeout:function(e,t){return e<1/0?new bt(((n,r)=>{var o=setTimeout((()=>r(new Be.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&J(bt.prototype,Symbol.toStringTag,"Dexie.Promise"),ht.env=Gt(),Y(bt,{all:function(){var e=Se.apply(null,arguments).map(Ht);return new bt((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>bt.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof bt)return e;if(e&&"function"==typeof e.then)return new bt(((t,n)=>{e.then(t,n)}));var t=new bt(Je,!0,e);return $t(t,pt),t},reject:It,race:function(){var e=Se.apply(null,arguments).map(Ht);return new bt(((t,n)=>{e.map((e=>bt.resolve(e).then(t,n)))}))},PSD:{get:()=>vt,set:e=>vt=e},totalEchoes:{get:()=>Ut},newPSD:Ft,usePSD:Zt,scheduler:{get:()=>ut,set:e=>{ut=e}},rejectionMapper:{get:()=>dt,set:e=>{dt=e}},follow:(e,t)=>new bt(((n,r)=>Ft(((t,n)=>{var r=vt;r.unhandleds=[],r.onunhandled=n,r.finalize=Ke((function(){!function(e){gt.push((function t(){e(),gt.splice(gt.indexOf(t),1)})),++mt,ut((()=>{0==--mt&&Tt()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),rt&&(rt.allSettled&&J(bt,"allSettled",(function(){const e=Se.apply(null,arguments).map(Ht);return new bt((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>bt.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),rt.any&&"undefined"!=typeof AggregateError&&J(bt,"any",(function(){const e=Se.apply(null,arguments).map(Ht);return new bt(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>bt.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Lt={awaits:0,echoes:0,id:0};var Dt=0,Nt=[],Mt=0,Ut=0,Bt=0;function Ft(e,t,n,r){var o=vt,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Bt;var a=ht.env;i.env=ot?{Promise:bt,PromiseProp:{value:bt,configurable:!0,writable:!0},all:bt.all,race:bt.race,allSettled:bt.allSettled,any:bt.any,resolve:bt.resolve,reject:bt.reject,nthen:Jt(a.nthen,i),gthen:Jt(a.gthen,i)}:{},t&&K(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Zt(i,e,n,r);return 0===i.ref&&i.finalize(),u}function zt(){return Lt.id||(Lt.id=++Dt),++Lt.awaits,Lt.echoes+=100,Lt.id}function Vt(){return!!Lt.awaits&&(0==--Lt.awaits&&(Lt.id=0),Lt.echoes=100*Lt.awaits,!0)}function Ht(e){return Lt.echoes&&e&&e.constructor===rt?(zt(),e.then((e=>(Vt(),e)),(e=>(Vt(),en(e))))):e}function Wt(e){++Ut,Lt.echoes&&0!=--Lt.echoes||(Lt.echoes=Lt.id=0),Nt.push(vt),qt(e,!0)}function Kt(){var e=Nt[Nt.length-1];Nt.pop(),qt(e,!1)}function qt(e,t){var n=vt;if((t?!Lt.echoes||Mt++&&e===vt:!Mt||--Mt&&e===vt)||Yt(t?Wt.bind(null,e):Kt),e!==vt&&(vt=e,n===ht&&(ht.env=Gt()),ot)){var r=ht.env.Promise,o=e.env;et.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(V,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Gt(){var e=V.Promise;return ot?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(V,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:et.then,gthen:e.prototype.then}:{}}function Zt(e,t,n,r,o){var i=vt;try{return qt(e,!0),t(n,r,o)}finally{qt(i,!1)}}function Yt(e){nt.call(Xe,e)}function Qt(e,t,n,r){return"function"!=typeof e?e:function(){var o=vt;n&&zt(),qt(t,!0);try{return e.apply(this,arguments)}finally{qt(o,!1),r&&Yt(Vt)}}}function Jt(e,t){return function(n,r){return e.call(this,Qt(n,t),Qt(r,t))}}function Xt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(V.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),K(r,o)):V.CustomEvent&&K(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&V.dispatchEvent&&(dispatchEvent(r),!V.PromiseRejectionEvent&&V.onunhandledrejection))try{V.onunhandledrejection(r)}catch(e){}Oe&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+nt).indexOf("[native code]")&&(zt=Vt=Ve);var en=bt.reject;function tn(e,t,n,r){if(e.idbdb&&(e._state.openComplete||vt.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Me.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>tn(e,t,n,r)))):en(o)}return o._promise(t,((e,t)=>Ft((()=>(vt.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return en(new Be.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return en(new Be.DatabaseClosed);e.open().catch(Ve)}return e._state.dbReadyPromise.then((()=>tn(e,t,n,r)))}const nn=String.fromCharCode(65535),rn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",on=[],an="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),un=an,cn=an,sn=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function ln(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const fn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function pn(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ye(t))[e],t)}class dn{_trans(e,t,n){const r=this._tx||vt.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Be.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=At();try{return r&&r.db===this.db?r===vt.trans?r._promise(e,i,n):Ft((()=>r._promise(e,i,n)),{trans:r,transless:vt.transless||vt}):tn(this.db,e,[this.name],i)}finally{a&&Pt()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(W(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=H(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==nn)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&Oe&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,u]=t.reduce((([t,n],o)=>{const a=r[o],u=e[o];return[t||a,t||!a?ln(n,a&&a.multi?e=>{const t=ce(e,o);return W(t)&&t.some((e=>i(u,e)))}:e=>i(u,ce(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(u):n?this.filter(u):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,W(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(Z(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){K(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=pn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?bt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{se(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||W(e))return this.where(":id").equals(e).modify(t);{const n=ce(e,this.schema.primKey.keyPath);if(void 0===n)return en(new Be.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?H(t).forEach((n=>{se(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=pn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?bt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{se(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?bt.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:fn}))).then((e=>e.numFailures?bt.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Be.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let u=i&&n?e.map(pn(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:u,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Ne(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Be.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let u=i&&n?e.map(pn(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:u,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Ne(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Ne(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function hn(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=Ye),o||(o=Ve);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){H(e).forEach((function(t){var n=e[t];if(W(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Be.InvalidArgument("Invalid event config");var r=i(t,He,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){ae((function(){e.apply(null,t)}))}))}))}}))}}function vn(e,t){return X(t).from({prototype:e}),t}function yn(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function mn(e,t){e.filter=ln(e.filter,t)}function gn(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>ln(r(),t()):t,e.justLimit=n&&!r}function bn(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Be.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function wn(e,t,n){const r=bn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function _n(e,t,n,r){const o=e.replayFilter?ln(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),Z(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),xn(wn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return xn(wn(e,r,n),ln(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function xn(e,t,n,r){var o=Rt(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=Ve}),(t=>{e.fail(t),n=Ve}))||o(e.value,e,(e=>n=e)),n()}))}))}function Sn(e,t){try{const n=En(e),r=En(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(On(e),On(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Sn(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function En(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=be(e);return"ArrayBuffer"===n?"binary":n}function On(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class jn{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,en.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,en.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=ln(t.algorithm,e)}_iterate(e,t){return _n(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&K(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>_n(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(yn(t,!0))return n.count({trans:e,query:{index:bn(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return _n(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function u(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(u)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&yn(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=bn(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return _n(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,yn(t)?gn(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):gn(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),gn(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return mn(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return mn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=ln(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&yn(t,!0)&&t.limit>0)return this._read((e=>{var n=bn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return mn(this._ctx,(function(e){var t=e.primaryKey.toString(),r=Z(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=H(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],u=e[a];ce(t,a)!==u&&(se(t,a,u),n=!0)}return n}}const a=t.table.core,{outbound:u,extractKey:c}=a.schema.primaryKey,s=this.db._options.modifyChunkSize||200,l=[];let f=0;const p=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of H(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(s,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((p=>{const h=[],v=[],y=u?[]:null,m=[];for(let e=0;e<f;++e){const t=p[e],n={value:ye(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?m.push(o[l+e]):u||0===Sn(c(t),c(n.value))?(v.push(n.value),u&&y.push(o[l+e])):(m.push(o[l+e]),h.push(n.value)))}const g=yn(t)&&t.limit===1/0&&("function"!=typeof e||e===kn)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:n,type:"add",values:h}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);d(h.length,e)}))).then((()=>(v.length>0||g&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:y,values:v,criteria:g,changeSpec:"function"!=typeof e&&e}).then((e=>d(v.length,e))))).then((()=>(m.length>0||g&&e===kn)&&a.mutate({trans:n,type:"delete",keys:m,criteria:g}).then((e=>d(m.length,e))))).then((()=>o.length>l+f&&i(l+s)))}))};return i(0).then((()=>{if(l.length>0)throw new De("Error modifying one or more objects",l,f,p);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return yn(e)&&(e.isPrimKey&&!cn||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new De("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(kn)}}const kn=(e,t)=>t.value=null;function $n(e,t){return e<t?-1:e===t?0:1}function Cn(e,t){return e>t?-1:e===t?0:1}function An(e,t,n){var r=e instanceof Dn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Pn(e){return new e.Collection(e,(()=>Ln(""))).limit(0)}function Tn(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)}function In(e,t,n,r){var o,i,a,u,c,s,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return An(e,"String expected.");function p(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?$n:Cn;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>Rn(u[0],c[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,c,h))return!0;for(var d=null,v=h;v<f;++v){var y=Tn(o,p,u[v],c[v],a,s);null===y&&null===d?h=v+1:(null===d||a(d,y)>0)&&(d=y)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Rn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ln(e){return{type:1,lower:e,upper:e}}class Dn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Pn(this):new this.Collection(this,(()=>Rn(e,t,!n,!r)))}catch(e){return An(this,rn)}}equals(e){return null==e?An(this,rn):new this.Collection(this,(()=>Ln(e)))}above(e){return null==e?An(this,rn):new this.Collection(this,(()=>Rn(e,void 0,!0)))}aboveOrEqual(e){return null==e?An(this,rn):new this.Collection(this,(()=>Rn(e,void 0,!1)))}below(e){return null==e?An(this,rn):new this.Collection(this,(()=>Rn(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?An(this,rn):new this.Collection(this,(()=>Rn(void 0,e)))}startsWith(e){return"string"!=typeof e?An(this,"String expected."):this.between(e,e+nn,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):In(this,((e,t)=>0===e.indexOf(t[0])),[e],nn)}equalsIgnoreCase(e){return In(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Se.apply(xe,arguments);return 0===e.length?Pn(this):In(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Se.apply(xe,arguments);return 0===e.length?Pn(this):In(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,nn)}anyOf(){const e=Se.apply(xe,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return An(this,rn)}if(0===e.length)return Pn(this);const n=new this.Collection(this,(()=>Rn(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Se.apply(xe,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return An(this,rn)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Pn(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return An(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Be.InvalidArgument);const u=!t||!1!==t.includeLowers,c=t&&!0===t.includeUppers;let s,l=r;function f(e,t){return l(e[0],t[0])}try{s=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),s.sort(f)}catch(e){return An(this,rn)}let p=0;const d=c?e=>r(e,s[p][1])>0:e=>r(e,s[p][1])>=0,h=u?e=>o(e,s[p][0])>0:e=>o(e,s[p][0])>=0;let v=d;const y=new this.Collection(this,(()=>Rn(s[0][0],s[s.length-1][1],!u,!c)));return y._ondirectionchange=e=>{"next"===e?(v=d,l=r):(v=h,l=o),s.sort(f)},y._addAlgorithm(((e,t,n)=>{for(var o=e.key;v(o);)if(++p,p===s.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,s[p][1])||0===this._cmp(o,s[p][0])||t((()=>{l===r?e.continue(s[p][0]):e.continue(s[p][1])})),!1)})),y}startsWithAnyOf(){const e=Se.apply(xe,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Pn(this):this.inAnyRange(e.map((e=>[e,e+nn]))):An(this,"startsWithAnyOf() only works with strings")}}function Nn(e){return Rt((function(t){return Mn(t),e(t.target.error),!1}))}function Mn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Un=hn(null,"storagemutated");class Bn{_lock(){return ie(!vt.global),++this._reculock,1!==this._reculock||vt.global||(vt.lockOwnerFor=this),this}_unlock(){if(ie(!vt.global),0==--this._reculock)for(vt.global||(vt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Zt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&vt.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(ie(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Be.DatabaseClosed(n);case"MissingAPIError":throw new Be.MissingAPI(n.message,n);default:throw new Be.OpenFailed(n)}if(!this.active)throw new Be.TransactionInactive;return ie(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Rt((t=>{Mn(t),this._reject(e.error)})),e.onabort=Rt((t=>{Mn(t),this.active&&this._reject(new Be.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Rt((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Un.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return en(new Be.ReadOnly("Transaction is readonly"));if(!this.active)return en(new Be.TransactionInactive);if(this._locked())return new bt(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},vt])}));if(n)return Ft((()=>{var e=new bt(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new bt(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=bt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new bt(((e,r)=>{n.then((n=>t._waitingQueue.push(Rt(e.bind(null,n)))),(e=>t._waitingQueue.push(Rt(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Be.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(Z(t,e))return t[e];const n=this.schema[e];if(!n)throw new Be.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Fn(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+zn(t)}}function zn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function Vn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:ue(n,(e=>[e.name,e]))}}let Hn=e=>{try{return e.only([[]]),Hn=()=>[[]],[[]]}catch(e){return Hn=()=>nn,nn}};function Wn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>ce(t,e)}(e):t=>ce(t,e)}function Kn(e){return[].slice.call(e)}let qn=0;function Gn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Zn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Kn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=W(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:Wn(t)},indexes:Kn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:W(o),keyPath:o,unique:n,multiEntry:r,extractKey:Wn(o)};return i[Gn(o)]=a,a})),getIndexByKeyPath:e=>i[Gn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[Gn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((u,c)=>{u=Rt(u);const s=e.objectStore(t),l=null==s.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],v=[];let y=0;const m=e=>{++y,Mn(e)};if("deleteRange"===n){if(4===a.type)return u({numFailures:y,failures:v,results:[],lastResult:void 0});3===a.type?h.push(d=s.clear()):h.push(d=s.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?s[n](e[r],t[r]):s[n](e[r])),d.onerror=m;else for(let t=0;t<p;++t)h.push(d=s[n](e[t])),d.onerror=m}const g=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),u({numFailures:y,failures:v,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{m(e),g(e)},d.onsuccess=g}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Rt(r);const i=e.objectStore(t),a=n.length,u=new Array(a);let c,s=0,l=0;const f=e=>{const t=e.target;u[t._pos]=t.result,++l===s&&r(u)},p=Nn(o);for(let e=0;e<a;++e)null!=n[e]&&(c=i.get(n[e]),c._pos=e,c.onsuccess=f,c.onerror=p,++s);0===s&&r(u)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Rt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Nn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Rt(o);const{trans:a,values:u,limit:c,query:s}=n,l=c===1/0?void 0:c,{index:f,range:p}=s,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===c)return o({result:[]});if(e){const e=u?h.getAll(v,l):h.getAllKeys(v,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Nn(i)}else{let e=0;const t=u||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(u?i.value:i.primaryKey),++e===c?o({result:n}):void i.continue()):o({result:n})},t.onerror=Nn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((u,c)=>{u=Rt(u);const{index:s,range:l}=o,f=e.objectStore(t),p=s.isPrimaryKey?f:f.index(s.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=Nn(c),h.onsuccess=Rt((t=>{const n=h.result;if(!n)return void u(null);n.___id=++qn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Rt(c),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Rt(e),h.onerror=Nn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),u=()=>{if(h.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return h.onsuccess=Rt((e=>{h.onsuccess=u,u()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),t},u(n)}),c)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const u=n.objectStore(t),c=o.isPrimaryKey?u:u.index(o.name),s=r(i),l=s?c.count(s):c.count();l.onsuccess=Rt((t=>e(t.target.result))),l.onerror=Nn(a)}))}}}(e))),u={};return a.forEach((e=>u[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw new Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:Hn(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Yn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=te(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?J(t,n,{get(){return this.table(n)},set(e){Q(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function Qn({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Jn(e,t){return e._cfg.version-t._cfg.version}function Xn(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!an)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function er(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>tr(o,e))),o}function tr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function nr(e,t,n){const r={};return re(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Fn(zn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var u=Fn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(u)}r[e]=Vn(e,i,a)})),r}function rr({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+re(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&V.WorkerGlobalScope&&V instanceof V.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class or{_parseStoresSpec(e,t){H(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Fn(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),W(r),0===t)})),o=r.shift();if(o.multi)throw new Be.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Be.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Be.Schema("Index must have a name and cannot be an empty string")})),t[n]=Vn(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?K(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{K(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,Qn(t,[t._allTables,t,t.Transaction.prototype]),Yn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],H(o),o),t._storeNames=H(o),this}upgrade(e){return this._cfg.contentUpgrade=Qe(this._cfg.contentUpgrade||Ve,e),this}}function ir(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new jr("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function ar(e){return e&&"function"==typeof e.databases}function ur(e){return Ft((function(){return vt.letThrough=!0,e()}))}function cr(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function sr(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):W(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function lr(e,t,n){var r=arguments.length;if(r<2)throw new Be.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=pe(o);return[e,i,n]}function fr(e,t,n,r,o){return bt.resolve().then((()=>{const i=vt.transless||vt,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Me.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>fr(e,t,n,null,o)))):en(r)}const c=Ee(o);let s;c&&zt();const l=bt.follow((()=>{if(s=o.call(a,a),s)if(c){var e=Vt.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=sr(s))}),u);return(s&&"function"==typeof s.then?bt.resolve(s).then((e=>a.active?e:en(new Be.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>s))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),en(e))))}))}function pr(e,t,n){const r=W(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const dr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=Gn(e),u=o[r]=o[r]||[],c=null==e?0:"string"==typeof e?1:e.length,s=t>0,l={...n,isVirtual:s,keyTail:t,keyLength:c,extractKey:Wn(e),unique:!s&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),c>1&&a(2===c?e[0]:e.slice(0,c-1),t+1,n),u.sort(((e,t)=>e.keyTail-t.keyTail)),l}const u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const e of r.indexes)a(e.keyPath,0,e);function c(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:pr(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:pr(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const s={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(e){const t=o[Gn(e)];return t&&t[0]}},count:e=>n.count(c(e)),query:e=>n.query(c(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(c(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(pr(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(pr(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return s}}}};function hr(e,t,n,r){return n=n||{},r=r||"",H(e).forEach((o=>{if(Z(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=be(i);e!==be(a)?n[r+o]=t[o]:"Object"===e?hr(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),H(t).forEach((o=>{Z(e,o)||(n[r+o]=t[o])})),n}const vr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=vt.trans,{deleting:i,creating:a,updating:u}=o.table(t).hook;switch(e.type){case"add":if(a.fire===Ve)break;return o._promise("readwrite",(()=>c(e)),!0);case"put":if(a.fire===Ve&&u.fire===Ve)break;return o._promise("readwrite",(()=>c(e)),!0);case"delete":if(i.fire===Ve)break;return o._promise("readwrite",(()=>c(e)),!0);case"deleteRange":if(i.fire===Ve)break;return o._promise("readwrite",(()=>function(e){return s(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function c(e){const t=vt.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((c=>{const s=o.map(((n,o)=>{const s=c[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,s,t);else if("add"===e.type||void 0===s){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||se(e.values[o],r.keyPath,n))}else{const r=hr(s,e.values[o]),i=u.fire.call(l,r,n,s,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{Z(t,e)?t[e]=i[e]:se(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=s[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&c[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(s.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function s(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>c({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:s(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function yr(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Sn(t.keys[o],e[i])&&(r.push(n?ye(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const mr={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=yr(e.keys,e.trans._cache,"clone"===e.cache);return t?bt.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ye(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function gr(e){return!("from"in e)}const br=function(e,t){if(!this){const t=new br;return e&&"d"in e&&K(t,e),t}K(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function wr(e,t,n){const r=Sn(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(gr(e))return K(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Sn(n,e.from)<0)return o?wr(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Sr(e);if(Sn(t,e.to)>0)return i?wr(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Sr(e);Sn(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Sn(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&_r(e,o),i&&a&&_r(e,i)}function _r(e,t){gr(t)||function e(t,{from:n,to:r,l:o,r:i}){wr(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function xr(e){let t=gr(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Sn(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Sn(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Sr(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Er(n)}e.d=Er(e)}function Er({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Y(br.prototype,{add(e){return _r(this,e),this},addKey(e){return wr(this,e,e),this},addKeys(e){return e.forEach((e=>wr(this,e,e))),this},[we](){return xr(this)}});const Or={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new br(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:u,outbound:c}=a,s={...o,mutate:e=>{const a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=e=>{const n=`idb://${t}/${r}/${e}`;return u[n]||(u[n]=new br)},s=c(""),l=c(":dels"),{type:f}=e;let[p,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const h=e.trans._cache;return o.mutate(e).then((e=>{if(W(p)){"delete"!==f&&(p=e.results),s.addKeys(p);const t=yr(p,h);t||"add"===f||l.addKeys(p),(t||d)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&W(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),u=r&&i(r[t]);0!==Sn(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(c,i,t,d)}else if(p){const e={from:p.lower,to:p.upper};l.add(e),s.add(e)}else s.add(n),l.add(n),i.indexes.forEach((e=>c(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new br(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new br(e.key)],getMany:e=>[a,(new br).addKeys(e.keys)],count:l,query:l,openCursor:l};return H(f).forEach((e=>{s[e]=function(i){const{subscr:a}=vt;if(a){const s=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new br)},l=s(""),p=s(":dels"),[d,h]=f[e](i);if(s(d.name||"").add(h),!d.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(c&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(u):n.result;i.values?l.addKeys(e):p.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(p.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return p.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}p.add(n)}}return o[e].apply(this,arguments)}})),s}}}};class jr{constructor(e,t){this._middlewares={},this.verno=0;const n=jr.dependencies;this._options=t={addons:jr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ve,dbReadyPromise:null,cancelOpen:Ve,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new bt((e=>{o.dbReadyResolve=e})),o.openCanceller=new bt(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=hn(this,"populate","blocked","versionchange","close",{ready:[Qe,Ve]}),this.on.ready.subscribe=oe(this.on.ready.subscribe,(e=>(t,n)=>{jr.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||bt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,vn(jn.prototype,(function(e,t){this.db=i;let n=fn,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,u=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:u!==He?u:null}}))),this.Table=function(e){return vn(dn.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:hn(null,{creating:[qe,Ve],reading:[We,He],updating:[Ze,Ve],deleting:[Ge,Ve]})}))}(this),this.Transaction=function(e){return vn(Bn.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=hn(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new bt(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),en(e)}))}))}(this),this.Version=function(e){return vn(or.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return vn(Dn.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Be.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=Hn(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),on.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(dr),this.use(vr),this.use(Or),this.use(mr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Be.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Be.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Jn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||vt.letThrough||this._vip)?e():new bt(((e,t)=>{if(this._state.openComplete)return t(new Be.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Be.DatabaseClosed);this.open().catch(Ve)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?en(t.dbOpenError):e));Oe&&(t.openCanceller._stackHolder=Ce()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Be.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,u=!1;return bt.race([r,("undefined"==typeof navigator?bt.resolve():cr()).then((()=>new bt(((r,i)=>{if(o(),!n)throw new Be.MissingAPI;const c=e.name,s=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!s)throw new Be.MissingAPI;s.onerror=Nn(i),s.onblocked=Rt(e._fireOnBlocked),s.onupgradeneeded=Rt((r=>{if(a=s.transaction,t.autoSchema&&!e._options.allowEmptyDB){s.onerror=Mn,a.abort(),s.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=Rt((()=>{i(new Be.NoSuchDatabase(`Database ${c} doesnt exist`))}))}else{a.onerror=Nn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,e._novip.idbdb=s.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),u=vt.transless||vt;Ft((()=>{vt.trans=i,vt.transless=u,0===t?(H(o).forEach((e=>{er(n,e,o[e].primKey,o[e].indexes)})),Zn(e,n),bt.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=nr(0,e.idbdb,r),u=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,c=i._cfg.dbschema;rr(e,o,r),rr(e,c,r),a=e._dbSchema=c;const s=Xn(o,c);s.add.forEach((e=>{er(r,e[0],e[1].primKey,e[1].indexes)})),s.change.forEach((e=>{if(e.recreate)throw new Be.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>tr(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),tr(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){Zn(e,r),n._memoizedTables={},u=!0;let t=le(c);s.del.forEach((e=>{t[e]=o[e]})),Qn(e,[e.Transaction.prototype]),Yn(e,[e.Transaction.prototype],H(t),t),n.schema=t;const i=Ee(l);let a;i&&zt();const f=bt.follow((()=>{if(a=l(n),a&&i){var e=Vt.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?bt.resolve(a):f.then((()=>a))}})),o.push((t=>{u&&un||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),Qn(e,[e.Transaction.prototype]),Yn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?bt.resolve(o.shift()(n.idbtrans)).then(e):bt.resolve()}().then((()=>{var e,t;t=r,H(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||er(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),s.onsuccess=Rt((()=>{a=null;const n=e._novip.idbdb=s.result,o=re(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=nr(0,t,n);e._storeNames=re(t.objectStoreNames,0),Yn(e,[e._allTables],H(r),r)}(e,n,r):(rr(e,e._dbSchema,r),function(e,t){const n=Xn(nr(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Zn(e,r)}catch(e){}var i;on.push(e),n.onversionchange=Rt((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Rt((t=>{e.on("close").fire(t)})),u&&function({indexedDB:e,IDBKeyRange:t},n){!ar(e)&&"__dbnames"!==n&&ir(e,t).put({name:n}).catch(Ve)}(e._deps,c),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],bt.resolve(ur((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Qe,Ve);return t.onReadyBeingFired=[],bt.resolve(ur((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),en(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=on.indexOf(this);if(t>=0&&on.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new bt((t=>{e.dbReadyResolve=t})),e.openCanceller=new bt(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Be.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new bt(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Rt((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!ar(e)&&"__dbnames"!==n&&ir(e,t).delete(n).catch(Ve)}(this._deps,this.name),n()})),e.onerror=Nn(r),e.onblocked=this._fireOnBlocked};if(e)throw new Be.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return H(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=lr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=vt.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Be.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Be.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Be.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):en(e)}const u=fr.bind(null,this,i,a,r,n);return r?r._promise(i,u,"lock"):vt.trans?Zt(vt.transless,(()=>this._whenReady(u))):this._whenReady(u)}table(e){if(!Z(this._allTables,e))throw new Be.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const kr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class $r{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[kr](){return this}}function Cr(e,t){return H(t).forEach((n=>{_r(e[n]||(e[n]=new br),t[n])})),e}let Ar;try{Ar={indexedDB:V.indexedDB||V.mozIndexedDB||V.webkitIndexedDB||V.msIndexedDB,IDBKeyRange:V.IDBKeyRange||V.webkitIDBKeyRange}}catch(r){Ar={indexedDB:null,IDBKeyRange:null}}const Pr=jr;function Tr(e){let t=Ir;try{Ir=!0,Un.storagemutated.fire(e)}finally{Ir=t}}Y(Pr,{...ze,delete:e=>new Pr(e,{addons:[]}).delete(),exists:e=>new Pr(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return ar(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):ir(e,t).toCollection().primaryKeys()}(Pr.dependencies).then(e)}catch(e){return en(new Be.MissingAPI)}},defineClass:()=>function(e){K(this,e)},ignoreTransaction:e=>vt.trans?Zt(vt.transless,e):e(),vip:ur,async:function(e){return function(){try{var t=sr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:bt.resolve(t)}catch(e){return en(e)}}},spawn:function(e,t,n){try{var r=sr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:bt.resolve(r)}catch(e){return en(e)}},currentTransaction:{get:()=>vt.trans||null},waitFor:function(e,t){const n=bt.resolve("function"==typeof e?Pr.ignoreTransaction(e):e).timeout(t||6e4);return vt.trans?vt.trans.waitFor(n):n},Promise:bt,debug:{get:()=>Oe,set:e=>{je(e,"dexie"===e?()=>!0:sn)}},derive:X,extend:K,props:Y,override:oe,Events:hn,on:Un,liveQuery:function(e){return new $r((t=>{const n=Ee(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Un.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let u=!1,c=!1;function s(){return H(i).some((e=>o[e]&&function(e,t){const n=xr(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=xr(e);let a=i.next(o.from),u=a.value;for(;!r.done&&!a.done;){if(Sn(u.from,o.to)<=0&&Sn(u.to,o.from)>=0)return!0;Sn(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Cr(o,e),s()&&f()},f=()=>{if(u||r)return;o={};const p={},d=function(t){n&&zt();const r=()=>Ft(e,{subscr:t,trans:null}),o=vt.trans?Zt(vt.transless,r):r();return n&&o.then(Vt,Vt),o}(p);c||(Un("storagemutated",l),c=!0),u=!0,Promise.resolve(d).then((e=>{u=!1,r||(s()?f():(o={},i=p,t.next&&t.next(e)))}),(e=>{u=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Cr,getByKeyPath:ce,setByKeyPath:se,delByKeyPath:function(e,t){"string"==typeof t?se(e,t,void 0):"length"in t&&[].map.call(t,(function(t){se(e,t,void 0)}))},shallowClone:le,deepClone:ye,getObjectDiff:hr,cmp:Sn,asap:ae,minKey:-1/0,addons:[],connections:on,errnames:Me,dependencies:Ar,semVer:"3.2.1",version:"3.2.1".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Pr.maxKey=Hn(Pr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Un("storagemutated",(e=>{if(!Ir){let t;an?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Ir=!0,dispatchEvent(t),Ir=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Ir||Tr(e)})));let Ir=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");Un("storagemutated",(t=>{Ir||e.postMessage(t)})),e.onmessage=e=>{e.data&&Tr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Un("storagemutated",(e=>{try{Ir||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Tr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Tr(e.changedParts)}))}bt.rejectionMapper=function(e,t){if(!e||e instanceof Re||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Fe[e.name])return e;var n=new Fe[e.name](t||e.message,e);return"stack"in e&&J(n,"stack",{get:function(){return this.inner.stack}}),n},je(Oe,sn);var Rr=a(766),Lr=a(685);function Dr(e){return Dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dr(e)}function Nr(e,t){return!t||"object"!==Ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mr(e,t){return Mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mr(e,t)}var Ur=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mr(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Dr(t);if(n){var o=Dr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Nr(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return o}(jr);function Fr(){return new Br}function zr(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 Vr(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Hr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Vr(i,r,o,a,u,"next",e)}function u(e){Vr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(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){Wr(e,t,n[t])}))}return e}function qr(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zr(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)?zr(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 Gr,Zr=new Br,Yr={},Qr=(0,Lr.createGlobalStore)("offline-synchronization",{});function Jr(){return Qr}function Xr(){return eo.apply(this,arguments)}function eo(){return eo=Hr(x().mark((function e(){var t,n,r,o,i,a,u,c,s,l,f,p,d;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Qr.getState().synchronization){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Zr.syncQueue.count();case 4:t=e.sent,n={},r=Object.entries(Yr),o=r.length,i={},a=new AbortController,u=function(){var e=Qr.getState().synchronization;Qr.setState({synchronization:Kr({},e,{pendingCount:e.pendingCount-1})})},e.prev=11,Qr.setState({synchronization:{totalCount:t,pendingCount:t,abortController:a}}),c=0;case 14:if(!(c<o&&r.length>0)){e.next=30;break}s=r.length;case 16:if(!s--){e.next=27;break}if(l=qr(r[s],2),f=l[0],p=l[1],!(d=p.dependsOn.map((function(e){return n[e]}))).every(Boolean)){e.next=25;break}return i[f]={},e.next=23,Promise.all(d);case 23:n[f]=to(p,i,a,u),r.splice(s,1);case 25:e.next=16;break;case 27:c++,e.next=14;break;case 30:return e.next=32,Promise.allSettled(Object.values(n));case 32:return e.prev=32,Qr.setState({synchronization:void 0}),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[11,,32,35]])}))),eo.apply(this,arguments)}function to(e,t,n,r){return no.apply(this,arguments)}function no(){return no=Hr(x().mark((function e(t,n,r,o){var i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.type,a=t.dependsOn,u=t.process,c=[],s=[],e.next=5,ro();case 5:return l=e.sent,e.next=8,Zr.syncQueue.where({type:i,userId:l}).each((function(e,t){c.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}));case 8:f=0;case 9:if(!(f<c.length)){e.next=31;break}return p=qr(c[f],3),d=p[0],h=p[1],v=p[2],y=v.id,m=v.dependencies,g=void 0===m?[]:m,e.prev=11,e.next=14,u(h,{abort:r,index:f,items:s,userId:l,dependencies:g.map((function(e){var t=e.id,r=e.type;return a.includes(r)?n[r][t]:void 0}))});case 14:return b=e.sent,void 0!==y&&(n[i][y]=b),e.next=18,Zr.syncQueue.delete(d);case 18:e.next=25;break;case 20:return e.prev=20,e.t0=e.catch(11),e.next=25,Zr.syncQueue.update(d,{lastError:{name:null===e.t0||void 0===e.t0?void 0:e.t0.name,message:null!==(w=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==w?w:null===e.t0||void 0===e.t0?void 0:e.t0.toString()}});case 25:return e.prev=25,o(),e.finish(25);case 28:f++,e.next=9;break;case 31:case"end":return e.stop()}}),e,null,[[11,20,25,28]])}))),no.apply(this,arguments)}function ro(){return oo.apply(this,arguments)}function oo(){return(oo=Hr(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Rr.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function io(e,t,n,r){return ao.apply(this,arguments)}function ao(){return(ao=Hr(x().mark((function e(t,n,r,o){var i,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=o&&o.id)){e.next=4;break}return e.next=4,Zr.syncQueue.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===i})).delete().catch(jr.errnames.DatabaseClosed);case 4:return e.next=6,Zr.syncQueue.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date}).catch(jr.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function uo(e,t,n){return co.apply(this,arguments)}function co(){return(co=Hr(x().mark((function e(t,n,r){var o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ro();case 2:return o=e.sent,e.next=5,io(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function so(e,t){return lo.apply(this,arguments)}function lo(){return(lo=Hr(x().mark((function e(t,n){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fo(t,n);case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return e.content})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fo(e,t){return po.apply(this,arguments)}function po(){return(po=Hr(x().mark((function e(t,n){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,userId:t}:{userId:t},e.next=3,Zr.syncQueue.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ho(e){return vo.apply(this,arguments)}function vo(){return(vo=Hr(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ro();case 2:return n=e.sent,e.next=5,so(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yo(e){return mo.apply(this,arguments)}function mo(){return(mo=Hr(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ro();case 2:return n=e.sent,e.next=5,fo(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function go(e){return bo.apply(this,arguments)}function bo(){return(bo=Hr(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zr.syncQueue.get(t).catch(jr.errnames.DatabaseClosed,(function(){}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wo(e){var t;return!!(null===(t=Yr[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)}function _o(e){return xo.apply(this,arguments)}function xo(){return(xo=Hr(x().mark((function e(t){var n,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,go(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=Yr[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function So(e){return Eo.apply(this,arguments)}function Eo(){return(Eo=Hr(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zr.syncQueue.delete(t).catch(jr.errnames.DatabaseClosed);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Yr[e]={type:e,dependsOn:t,process:n,options:r}}var jo=new Uint8Array(16);function ko(){if(!Gr&&!(Gr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gr(jo)}const $o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Co=function(e){return"string"==typeof e&&$o.test(e)};for(var Ao=[],Po=0;Po<256;++Po)Ao.push((Po+256).toString(16).substr(1));const To=function(e,t,n){var r=(e=e||{}).random||(e.rng||ko)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ao[e[t+0]]+Ao[e[t+1]]+Ao[e[t+2]]+Ao[e[t+3]]+"-"+Ao[e[t+4]]+Ao[e[t+5]]+"-"+Ao[e[t+6]]+Ao[e[t+7]]+"-"+Ao[e[t+8]]+Ao[e[t+9]]+"-"+Ao[e[t+10]]+Ao[e[t+11]]+Ao[e[t+12]]+Ao[e[t+13]]+Ao[e[t+14]]+Ao[e[t+15]]).toLowerCase();if(!Co(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var Io="OFFLINE+";function Ro(){return Io+To()}function Lo(e){return e.startsWith(Io)}function Do(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 No(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Mo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){No(i,r,o,a,u,"next",e)}function u(e){No(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Uo(e){return function(e){if(Array.isArray(e))return Do(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 Do(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)?Do(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 Bo={};function Fo(){return Object.values(Bo)}function zo(e){Bo[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),Bo[e.id]=e}function Vo(e){return Ho.apply(this,arguments)}function Ho(){return(Ho=Mo(x().mark((function e(t){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ii();case 2:return n=e.sent,e.next=5,Wo(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wo(e,t){return Ko.apply(this,arguments)}function Ko(){return Ko=Mo(x().mark((function e(t,n){var r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,users:t}:{users:t},o=new Br,e.next=4,o.dynamicOfflineData.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)}))),Ko.apply(this,arguments)}function qo(e,t){return Go.apply(this,arguments)}function Go(){return(Go=Mo(x().mark((function e(t,n){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ii();case 2:return r=e.sent,e.next=5,Zo(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zo(e,t,n){return Yo.apply(this,arguments)}function Yo(){return Yo=Mo(x().mark((function e(t,n,r){var o,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new Br,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(i=e.sent){e.next=9;break}return e.next=7,o.dynamicOfflineData.add({users:[t],type:n,identifier:r}).catch(jr.errnames.DatabaseClosed);case 7:e.next=12;break;case 9:if(i.users.includes(t)){e.next=12;break}return e.next=12,o.dynamicOfflineData.update(i.id,{users:Uo(i.users).concat([t])}).catch(jr.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)}))),Yo.apply(this,arguments)}function Qo(e,t){return Jo.apply(this,arguments)}function Jo(){return(Jo=Mo(x().mark((function e(t,n){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ii();case 2:return r=e.sent,e.next=5,Xo(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xo(e,t,n){return ei.apply(this,arguments)}function ei(){return ei=Mo(x().mark((function e(t,n,r){var o,i;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new Br,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:t}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=e.sent)){e.next=12;break}if(!(i.users.length>1)){e.next=10;break}return e.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(e){return e!==t}))}).catch(jr.errnames.DatabaseClosed);case 8:e.next=12;break;case 10:return e.next=12,o.dynamicOfflineData.delete(i.id).catch(jr.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)}))),ei.apply(this,arguments)}function ti(e,t){return ni.apply(this,arguments)}function ni(){return ni=Mo(x().mark((function e(t,n){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vo(t);case 2:return r=e.sent,e.next=5,Promise.all(r.map(function(){var e=Mo(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ri(t.type,t.identifier,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),ni.apply(this,arguments)}function ri(e,t,n){return oi.apply(this,arguments)}function oi(){return oi=Mo(x().mark((function e(t,n,r){var o,i,a,u,c,s,l,f,p;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo(t,n);case 2:return o=new Br,e.next=5,ii();case 5:return i=e.sent,e.next=8,o.dynamicOfflineData.get({type:t,identifier:n}).catch(jr.errnames.DatabaseClosed,(function(){}));case 8:if(a=e.sent,u=Fo().filter((function(e){return e.type===t})),a){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,Promise.all(u.map(function(){var e=Mo(x().mark((function e(t){var o,i,a;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.sync(n,r),e.abrupt("return",{id:t.id,error:void 0});case 5:return e.prev=5,e.t0=e.catch(0),a=null!==(i=null===(o=e.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:e.t0.toString(),e.abrupt("return",{id:t.id,error:a});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 14:if(c=e.sent,s=c.filter((function(e){return!e.error})).map((function(e){return e.id})),l=c.filter((function(e){return e.error})).map((function(e){return e.id})),f=c.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),p={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!a.id){e.next=22;break}return e.next=22,o.dynamicOfflineData.update(a.id,{syncState:p}).catch(jr.errnames.DatabaseClosed);case 22:case"end":return e.stop()}}),e)}))),oi.apply(this,arguments)}function ii(){return ai.apply(this,arguments)}function ai(){return(ai=Mo(x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Rr.getLoggedInUser)();case 2:if(t=e.sent.uuid){e.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ui(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ci(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ui(i,r,o,a,u,"next",e)}function u(e){ui(i,r,o,a,u,"throw",e)}a(void 0)}))}}var si=(0,Lr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function li(){return hi(),si}function fi(e,t){hi(),zo({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})}function pi(e){return di.apply(this,arguments)}function di(){return(di=ci(x().mark((function e(t){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return hi(),e.next=3,ri("patient",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hi(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}})(),u})())}}}))},211:(e,t,n)=>{e=n.nmd(e),System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(r,o){var i={},a={},u={},c={},s={},l={},f={},p={},d={};return{setters:[function(e){i.createContext=e.createContext,i.createElement=e.createElement,i.default=e.default,i.useCallback=e.useCallback,i.useContext=e.useContext,i.useDebugValue=e.useDebugValue,i.useEffect=e.useEffect,i.useLayoutEffect=e.useLayoutEffect,i.useMemo=e.useMemo,i.useReducer=e.useReducer,i.useRef=e.useRef,i.useState=e.useState},function(e){a.getConfigStore=e.getConfigStore,a.getExtensionConfigFromStore=e.getExtensionConfigFromStore,a.getExtensionsConfigStore=e.getExtensionsConfigStore,a.interpolateUrl=e.interpolateUrl,a.navigate=e.navigate},function(e){u.getConnectedExtensions=e.getConnectedExtensions,u.getExtensionInternalStore=e.getExtensionInternalStore,u.getExtensionStore=e.getExtensionStore,u.registerExtensionSlot=e.registerExtensionSlot,u.renderExtension=e.renderExtension},function(e){c.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){s.default=e.default},function(e){l.default=e.default},function(e){f.I18nextProvider=e.I18nextProvider},function(e){p.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,p.fetchCurrentPatient=e.fetchCurrentPatient,p.getCurrentUser=e.getCurrentUser,p.getLocations=e.getLocations,p.getSessionStore=e.getSessionStore,p.getVisitTypes=e.getVisitTypes,p.openmrsFetch=e.openmrsFetch,p.userHasAccess=e.userHasAccess},function(e){d.default=e.default}],execute:function(){r((()=>{var r={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",c=32,s=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",S="[object Number]",E="[object Object]",O="[object Promise]",j="[object RegExp]",k="[object Set]",$="[object String]",C="[object Symbol]",A="[object WeakMap]",P="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",L="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",U="[object Uint8ClampedArray]",B="[object Uint16Array]",F="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,q=RegExp(W.source),G=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,se=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\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",Oe="["+Ee+"]",je="["+_e+"]",ke="\\d+",$e="["+xe+"]",Ce="[^\\ud800-\\udfff"+Ee+ke+"\\u2700-\\u27bf"+xe+Se+"]",Ae="\\ud83c[\\udffb-\\udfff]",Pe="[^\\ud800-\\udfff]",Te="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+Se+"]",Le="(?:"+$e+"|"+Ce+")",De="(?:"+Re+"|"+Ce+")",Ne="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+je+"|"+Ae+")?",Be="[\\ufe0e\\ufe0f]?",Fe=Be+Ue+"(?:\\u200d(?:"+[Pe,Te,Ie].join("|")+")"+Be+Ue+")*",ze="(?:"+["[\\u2700-\\u27bf]",Te,Ie].join("|")+")"+Fe,Ve="(?:"+[Pe+je+"?",je,Te,Ie,"[\\ud800-\\udfff]"].join("|")+")",He=RegExp("['’]","g"),We=RegExp(je,"g"),Ke=RegExp(Ae+"(?="+Ae+")|"+Ve+Fe,"g"),qe=RegExp([Re+"?"+$e+"+"+Ne+"(?="+[Oe,Re,"$"].join("|")+")",De+"+"+Me+"(?="+[Oe,Re+Le,"$"].join("|")+")",Re+"?"+Le+"+"+Ne,Re+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,ze].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Je={};Je[I]=Je[R]=Je[L]=Je[D]=Je[N]=Je[M]=Je[U]=Je[B]=Je[F]=!0,Je[v]=Je[y]=Je[P]=Je[m]=Je[T]=Je[g]=Je[b]=Je[w]=Je[x]=Je[S]=Je[E]=Je[j]=Je[k]=Je[$]=Je[A]=!1;var Xe={};Xe[v]=Xe[y]=Xe[P]=Xe[T]=Xe[m]=Xe[g]=Xe[I]=Xe[R]=Xe[L]=Xe[D]=Xe[N]=Xe[x]=Xe[S]=Xe[E]=Xe[j]=Xe[k]=Xe[$]=Xe[C]=Xe[M]=Xe[U]=Xe[B]=Xe[F]=!0,Xe[b]=Xe[w]=Xe[A]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,ut=at&&e&&!e.nodeType&&e,ct=ut&&ut.exports===at,st=ct&&rt.process,lt=function(){try{return ut&&ut.require&&ut.require("util").types||st&&st.binding&&st.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,dt=lt&<.isMap,ht=lt&<.isRegExp,vt=lt&<.isSet,yt=lt&<.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function gt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function xt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function St(e,t){return!(null==e||!e.length)&&It(e,t,0)>-1}function Et(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ot(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function jt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function kt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function $t(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var At=Nt("length");function Pt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Tt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function It(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Tt(e,Lt,n)}function Rt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Lt(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:p}function Nt(e){return function(t){return null==t?o:t[e]}}function Mt(e){return function(t){return null==e?o:e[t]}}function Ut(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Bt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function Vt(e){return function(t){return e(t)}}function Ht(e,t){return Ot(t,(function(t){return e[t]}))}function Wt(e,t){return e.has(t)}function Kt(e,t){for(var n=-1,r=e.length;++n<r&&It(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Zt=Mt({À:"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"}),Yt=Mt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Qt(e){return"\\"+et[e]}function Jt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){return Jt(e)?function(e){for(var t=Ke.lastIndex=0;Ke.test(e);)++t;return t}(e):At(e)}function on(e){return Jt(e)?function(e){return e.match(Ke)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var un=Mt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?it:cn.defaults(it.Object(),t,cn.pick(it,Ye))).Array,oe=t.Date,_e=t.Error,xe=t.Function,Se=t.Math,Ee=t.Object,Oe=t.RegExp,je=t.String,ke=t.TypeError,$e=r.prototype,Ce=xe.prototype,Ae=Ee.prototype,Pe=t["__core-js_shared__"],Te=Ce.toString,Ie=Ae.hasOwnProperty,Re=0,Le=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=Ae.toString,Ne=Te.call(Ee),Me=it._,Ue=Oe("^"+Te.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ct?t.Buffer:o,Fe=t.Symbol,ze=t.Uint8Array,Ve=Be?Be.allocUnsafe:o,Ke=en(Ee.getPrototypeOf,Ee),Ge=Ee.create,et=Ae.propertyIsEnumerable,rt=$e.splice,ot=Fe?Fe.isConcatSpreadable:o,at=Fe?Fe.iterator:o,ut=Fe?Fe.toStringTag:o,st=function(){try{var e=si(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,At=oe&&oe.now!==it.Date.now&&oe.now,Mt=t.setTimeout!==it.setTimeout&&t.setTimeout,sn=Se.ceil,ln=Se.floor,fn=Ee.getOwnPropertySymbols,pn=Be?Be.isBuffer:o,dn=t.isFinite,hn=$e.join,vn=en(Ee.keys,Ee),yn=Se.max,mn=Se.min,gn=oe.now,bn=t.parseInt,wn=Se.random,_n=$e.reverse,xn=si(t,"DataView"),Sn=si(t,"Map"),En=si(t,"Promise"),On=si(t,"Set"),jn=si(t,"WeakMap"),kn=si(Ee,"create"),$n=jn&&new jn,Cn={},An=Mi(xn),Pn=Mi(Sn),Tn=Mi(En),In=Mi(On),Rn=Mi(jn),Ln=Fe?Fe.prototype:o,Dn=Ln?Ln.valueOf:o,Nn=Ln?Ln.toString:o;function Mn(e){if(tu(e)&&!Ha(e)&&!(e instanceof zn)){if(e instanceof Fn)return e;if(Ie.call(e,"__wrapped__"))return Ui(e)}return new Fn(e)}var Un=function(){function e(){}return function(t){if(!eu(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(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])}}function Hn(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])}}function Wn(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])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Gn(e,t){var n=Ha(e),r=!n&&Va(e),o=!n&&!r&&Ga(e),i=!n&&!r&&!o&&su(e),a=n||r||o||i,u=a?Ft(e.length,je):[],c=u.length;for(var s in e)!t&&!Ie.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||yi(s,c))||u.push(s);return u}function Zn(e){var t=e.length;return t?e[Wr(0,t-1)]:o}function Yn(e,t){return Ii(ko(e),ir(t,0,e.length))}function Qn(e){return Ii(ko(e))}function Jn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Xn(e,t,n){var r=e[t];Ie.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function tr(e,t,n,r){return lr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&$o(t,Pu(t),e)}function rr(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),u=null==e;++n<i;)a[n]=u?o:ju(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var u,c=1&t,s=2&t,l=4&t;if(n&&(u=i?n(e,r,i,a):n(e)),u!==o)return u;if(!eu(e))return e;var f=Ha(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return ko(e,u)}else{var p=pi(e),d=p==w||p==_;if(Ga(e))return _o(e,c);if(p==E||p==v||d&&!i){if(u=s||d?{}:hi(e),!c)return s?function(e,t){return $o(e,fi(e),t)}(e,function(e,t){return e&&$o(t,Tu(t),e)}(u,e)):function(e,t){return $o(e,li(e),t)}(e,nr(u,e))}else{if(!Xe[p])return i?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case P:return xo(e);case m:case g:return new o(+e);case T:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case R:case L:case D:case N:case M:case U:case B:case F:return So(e,n);case x:return new o;case S:case $:return new o(e);case j:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new o;case C:return r=e,Dn?Ee(Dn.call(r)):{}}}(e,p,c)}}a||(a=new qn);var h=a.get(e);if(h)return h;a.set(e,u),au(e)?e.forEach((function(r){u.add(ar(r,t,n,r,e,a))})):nu(e)&&e.forEach((function(r,o){u.set(o,ar(r,t,n,o,e,a))}));var y=f?o:(l?s?ni:ti:s?Tu:Pu)(e);return bt(y||e,(function(r,o){y&&(r=e[o=r]),Xn(u,o,ar(r,t,n,o,e,a))})),u}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new ke(i);return Ci((function(){e.apply(o,n)}),t)}function sr(e,t,n,r){var o=-1,i=St,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=Ot(t,Vt(n))),r?(i=Et,a=!1):t.length>=200&&(i=Wt,a=!1,t=new Kn(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Mn.templateSettings={escape:Z,evaluate:Y,interpolate:Q,variable:"",imports:{_:Mn}},Mn.prototype=Bn.prototype,Mn.prototype.constructor=Mn,Fn.prototype=Un(Bn.prototype),Fn.prototype.constructor=Fn,zn.prototype=Un(Bn.prototype),zn.prototype.constructor=zn,Vn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===a?o:n}return Ie.call(t,e)?t[e]:o},Vn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==o:Ie.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===o?a:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},Hn.prototype.has=function(e){return er(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(Sn||Hn),string:new Vn}},Wn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return ui(this,e).get(e)},Wn.prototype.has=function(e){return ui(this,e).has(e)},Wn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Hn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var lr=Po(gr),fr=Po(br,!0);function pr(e,t){var n=!0;return lr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(c===o?u==u&&!cu(u):n(u,c)))var c=u,s=a}return s}function hr(e,t){var n=[];return lr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function vr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=vi),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?vr(u,t-1,n,r,o):jt(o,u):r||(o[o.length]=u)}return o}var yr=To(),mr=To(!0);function gr(e,t){return e&&yr(e,t,Pu)}function br(e,t){return e&&mr(e,t,Pu)}function wr(e,t){return xt(t,(function(t){return Qa(e[t])}))}function _r(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Ni(t[n++])];return n&&n==r?e:o}function xr(e,t,n){var r=t(e);return Ha(e)?r:jt(r,n(e))}function Sr(e){return null==e?e===o?"[object Undefined]":"[object Null]":ut&&ut in Ee(e)?function(e){var t=Ie.call(e,ut),n=e[ut];try{e[ut]=o;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[ut]=n:delete e[ut]),i}(e):function(e){return De.call(e)}(e)}function Er(e,t){return e>t}function Or(e,t){return null!=e&&Ie.call(e,t)}function jr(e,t){return null!=e&&t in Ee(e)}function kr(e,t,n){for(var i=n?Et:St,a=e[0].length,u=e.length,c=u,s=r(u),l=1/0,f=[];c--;){var p=e[c];c&&t&&(p=Ot(p,Vt(t))),l=mn(p.length,l),s[c]=!n&&(t||a>=120&&p.length>=120)?new Kn(c&&p):o}p=e[0];var d=-1,h=s[0];e:for(;++d<a&&f.length<l;){var v=p[d],y=t?t(v):v;if(v=n||0!==v?v:0,!(h?Wt(h,y):i(f,y,n))){for(c=u;--c;){var m=s[c];if(!(m?Wt(m,y):i(e[c],y,n)))continue e}h&&h.push(y),f.push(v)}}return f}function $r(e,t,n){var r=null==(e=Oi(e,t=mo(t,e)))?e:e[Ni(Yi(t))];return null==r?o:mt(r,e,n)}function Cr(e){return tu(e)&&Sr(e)==v}function Ar(e,t,n,r,i){return e===t||(null==e||null==t||!tu(e)&&!tu(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Ha(e),c=Ha(t),s=u?y:pi(e),l=c?y:pi(t),f=(s=s==v?E:s)==E,p=(l=l==v?E:l)==E,d=s==l;if(d&&Ga(e)){if(!Ga(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new qn),u||su(e)?Xo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case m:case g:case S:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case j:case $:return e==t+"";case x:var u=Xt;case k:var c=1&r;if(u||(u=nn),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Xo(u(e),u(t),r,o,i,a);return a.delete(e),l;case C:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,s,n,r,i,a);if(!(1&n)){var h=f&&Ie.call(e,"__wrapped__"),w=p&&Ie.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,O=w?t.value():t;return a||(a=new qn),i(_,O,n,r,a)}}return!!d&&(a||(a=new qn),function(e,t,n,r,i,a){var u=1&n,c=ti(e),s=c.length;if(s!=ti(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:Ie.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(r)var g=u?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(!(g===o?y===m||i(y,m,n,r,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Ar,i))}function Pr(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=Ee(e);i--;){var c=n[i];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var s=(c=n[i])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===o&&!(s in e))return!1}else{var p=new qn;if(r)var d=r(l,f,s,e,t,p);if(!(d===o?Ar(f,l,3,r,p):d))return!1}}return!0}function Tr(e){return!(!eu(e)||(t=e,Le&&Le in t))&&(Qa(e)?Ue:ve).test(Mi(e));var t}function Ir(e){return"function"==typeof e?e:null==e?rc:"object"==typeof e?Ha(e)?Mr(e[0],e[1]):Nr(e):pc(e)}function Rr(e){if(!_i(e))return vn(e);var t=[];for(var n in Ee(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Dr(e,t){var n=-1,o=Ka(e)?r(e.length):[];return lr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Nr(e){var t=ci(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Mr(e,t){return gi(e)&&xi(t)?Si(Ni(e),t):function(n){var r=ju(n,e);return r===o&&r===t?ku(n,e):Ar(t,r,3)}}function Ur(e,t,n,r,i){e!==t&&yr(t,(function(a,u){if(i||(i=new qn),eu(a))!function(e,t,n,r,i,a,u){var c=ki(e,n),s=ki(t,n),l=u.get(s);if(l)Jn(e,n,l);else{var f=a?a(c,s,n+"",e,t,u):o,p=f===o;if(p){var d=Ha(s),h=!d&&Ga(s),v=!d&&!h&&su(s);f=s,d||h||v?Ha(c)?f=c:qa(c)?f=ko(c):h?(p=!1,f=_o(s,!0)):v?(p=!1,f=So(s,!0)):f=[]:ou(s)||Va(s)?(f=c,Va(c)?f=mu(c):eu(c)&&!Qa(c)||(f=hi(s))):p=!1}p&&(u.set(s,f),i(f,s,r,a,u),u.delete(s)),Jn(e,n,f)}}(e,t,u,n,Ur,r,i);else{var c=r?r(ki(e,u),a,u+"",e,t,i):o;c===o&&(c=a),Jn(e,u,c)}}),Tu)}function Br(e,t){var n=e.length;if(n)return yi(t+=t<0?n:0,n)?e[t]:o}function Fr(e,t,n){t=t.length?Ot(t,(function(e){return Ha(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[rc];var r=-1;t=Ot(t,Vt(ai()));var o=Dr(e,(function(e,n,o){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=Eo(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function zr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=_r(e,a);n(u,a)&&Yr(i,mo(a,e),u)}return i}function Vr(e,t,n,r){var o=r?Rt:It,i=-1,a=t.length,u=e;for(e===t&&(t=ko(t)),n&&(u=Ot(e,Vt(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&rt.call(u,c,1),rt.call(e,c,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?rt.call(e,o,1):co(e,o)}}return e}function Wr(e,t){return e+ln(wn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ln(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return Ai(Ei(e,t,rc),e+"")}function Gr(e){return Zn(Bu(e))}function Zr(e,t){var n=Bu(e);return Ii(n,ir(t,0,n.length))}function Yr(e,t,n,r){if(!eu(e))return e;for(var i=-1,a=(t=mo(t,e)).length,u=a-1,c=e;null!=c&&++i<a;){var s=Ni(t[i]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=u){var f=c[s];(l=r?r(f,s,c):o)===o&&(l=eu(f)?f:yi(t[i+1])?[]:{})}Xn(c,s,l),c=c[s]}return e}var Qr=$n?function(e,t){return $n.set(e,t),e}:rc,Jr=st?function(e,t){return st(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:rc;function Xr(e){return Ii(Bu(e))}function eo(e,t,n){var o=-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 a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return lr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cu(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,rc,n)}function ro(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,c=null===t,s=cu(t),l=t===o;i<a;){var f=ln((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,y=cu(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?i=f+1:a=f}return mn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!Ba(u,c)){var c=u;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:cu(e)?p:+e}function ao(e){if("string"==typeof e)return e;if(Ha(e))return Ot(e,ao)+"";if(cu(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=St,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=Et;else if(i>=200){var s=t?null:qo(e);if(s)return nn(s);a=!1,o=Wt,c=new Kn}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u}function co(e,t){return null==(e=Oi(e,t=mo(t,e)))||delete e[Ni(Yi(t))]}function so(e,t,n,r){return Yr(e,t,n(_r(e,t)),r)}function lo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function fo(e,t){var n=e;return n instanceof zn&&(n=n.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function po(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],c=-1;++c<o;)c!=i&&(a[i]=sr(a[i]||u,e[c],t,n));return uo(vr(a,1),t,n)}function ho(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var c=r<a?t[r]:o;n(u,e[r],c)}return u}function vo(e){return qa(e)?e:[]}function yo(e){return"function"==typeof e?e:rc}function mo(e,t){return Ha(e)?e:gi(e,t)?[e]:Di(gu(e))}var go=qr;function bo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var wo=lt||function(e){return it.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function So(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cu(e),u=t!==o,c=null===t,s=t==t,l=cu(t);if(!c&&!l&&!a&&e>t||a&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||c&&n&&i||!u&&i||!s)return-1}return 0}function Oo(e,t,n,o){for(var i=-1,a=e.length,u=n.length,c=-1,s=t.length,l=yn(a-u,0),f=r(s+l),p=!o;++c<s;)f[c]=t[c];for(;++i<u;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}function jo(e,t,n,o){for(var i=-1,a=e.length,u=-1,c=n.length,s=-1,l=t.length,f=yn(a-c,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++s<l;)p[h+s]=t[s];for(;++u<c;)(d||i<a)&&(p[h+n[u]]=e[i++]);return p}function ko(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function $o(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],s=r?r(n[c],e[c],c,n,e):o;s===o&&(s=e[c]),i?rr(n,c,s):Xn(n,c,s)}return n}function Co(e,t){return function(n,r){var o=Ha(n)?gt:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function Ao(e){return qr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&mi(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=Ee(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))}function Po(e,t){return function(n,r){if(null==n)return n;if(!Ka(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function To(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}}function Io(e){return function(t){var n=Jt(t=gu(t))?on(t):o,r=n?n[0]:t.charAt(0),i=n?bo(n,1).join(""):t.slice(1);return r[e]()+i}}function Ro(e){return function(t){return kt(Qu(Vu(t).replace(He,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Un(e.prototype),r=e.apply(n,t);return eu(r)?r:n}}function Do(e){return function(t,n,r){var i=Ee(t);if(!Ka(t)){var a=ai(n,3);t=Pu(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}}function No(e){return ei((function(t){var n=t.length,r=n,a=Fn.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new ke(i);if(a&&!c&&"wrapper"==oi(u))var c=new Fn([],!0)}for(r=c?r:n;++r<n;){var s=oi(u=t[r]),l="wrapper"==s?ri(u):o;c=l&&bi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[oi(l[0])].apply(c,l[3]):1==u.length&&bi(u)?c[s]():c.thru(u)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ha(r))return c.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Mo(e,t,n,i,a,u,c,l,f,p){var d=t&s,h=1&t,v=2&t,y=24&t,m=512&t,g=v?o:Lo(e);return function o(){for(var s=arguments.length,b=r(s),w=s;w--;)b[w]=arguments[w];if(y)var _=ii(o),x=Gt(b,_);if(i&&(b=Oo(b,i,a,y)),u&&(b=jo(b,u,c,y)),s-=x,y&&s<p){var S=tn(b,_);return Wo(e,t,Mo,o.placeholder,n,b,S,l,f,p-s)}var E=h?n:this,O=v?E[e]:e;return s=b.length,l?b=ji(b,l):m&&s>1&&b.reverse(),d&&f<s&&(b.length=f),this&&this!==it&&this instanceof o&&(O=g||Lo(O)),O.apply(E,b)}}function Uo(e,t){return function(n,r){return function(e,t,n,r){return gr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Fo(e){return ei((function(t){return t=Ot(t,Vt(ai())),qr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function zo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?Kr(t,e):t;var r=Kr(t,sn(e/rn(t)));return Jt(t)?bo(on(r),0,e).join(""):r.slice(0,e)}function Vo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=du(t),n===o?(n=t,t=0):n=du(n),function(e,t,n,o){for(var i=-1,a=yn(sn((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,i=i===o?t<n?1:-1:du(i),e)}}function Ho(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=yu(t),n=yu(n)),e(t,n)}}function Wo(e,t,n,r,i,a,u,s,l,f){var p=8&t;t|=p?c:64,4&(t&=~(p?64:c))||(t&=-4);var d=[e,t,i,p?a:o,p?u:o,p?o:a,p?o:u,s,l,f],h=n.apply(o,d);return bi(e)&&$i(h,d),h.placeholder=r,Pi(h,e,t)}function Ko(e){var t=Se[e];return function(e,n){if(e=yu(e),(n=null==n?0:mn(hu(n),292))&&dn(e)){var r=(gu(e)+"e").split("e");return+((r=(gu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qo=On&&1/nn(new On([,-0]))[1]==l?function(e){return new On(e)}:cc;function Go(e){return function(t){var n=pi(t);return n==x?Xt(t):n==k?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new ke(i);var v=a?a.length:0;if(v||(t&=-97,a=l=o),p=p===o?p:yn(hu(p),0),d=d===o?d:hu(d),v-=l?l.length:0,64&t){var y=a,m=l;a=l=o}var g=h?o:ri(e),b=[e,t,n,a,l,y,m,f,p,d];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Oo(l,c,t[4]):c,e[4]=l?tn(e[3],u):t[4]}(c=t[5])&&(l=e[5],e[5]=l?jo(l,c,t[6]):c,e[6]=l?tn(e[5],u):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,g),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:yn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Lo(e);return function a(){for(var u=arguments.length,c=r(u),s=u,l=ii(a);s--;)c[s]=arguments[s];var f=u<3&&c[0]!==l&&c[u-1]!==l?[]:tn(c,l);return(u-=f.length)<n?Wo(e,t,Mo,a.placeholder,o,c,f,o,o,n-u):mt(this&&this!==it&&this instanceof a?i:e,this,c)}}(e,t,d):t!=c&&33!=t||l.length?Mo.apply(o,b):function(e,t,n,o){var i=1&t,a=Lo(e);return function t(){for(var u=-1,c=arguments.length,s=-1,l=o.length,f=r(l+c),p=this&&this!==it&&this instanceof t?a:e;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++u];return mt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Pi((g?Qr:$i)(w,b),e,t)}function Yo(e,t,n,r){return e===o||Ba(e,Ae[n])&&!Ie.call(r,n)?t:e}function Qo(e,t,n,r,i,a){return eu(e)&&eu(t)&&(a.set(t,e),Ur(e,t,o,Qo,a),a.delete(t)),e}function Jo(e){return ou(e)?o:e}function Xo(e,t,n,r,i,a){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new Kn:o;for(a.set(e,t),a.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==o){if(m)continue;d=!1;break}if(h){if(!Ct(t,(function(e,t){if(!Wt(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!i(v,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ei(e){return Ai(Ei(e,o,Wi),e+"")}function ti(e){return xr(e,Pu,li)}function ni(e){return xr(e,Tu,fi)}var ri=$n?function(e){return $n.get(e)}:cc;function oi(e){for(var t=e.name+"",n=Cn[t],r=Ie.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Ie.call(Mn,"placeholder")?Mn:e).placeholder}function ai(){var e=Mn.iteratee||oc;return e=e===oc?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ci(e){for(var t=Pu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t}function si(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Tr(n)?n:o}var li=fn?function(e){return null==e?[]:(e=Ee(e),xt(fn(e),(function(t){return et.call(e,t)})))}:vc,fi=fn?function(e){for(var t=[];e;)jt(t,li(e)),e=Ke(e);return t}:vc,pi=Sr;function di(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Ni(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Xa(o)&&yi(a,o)&&(Ha(e)||Va(e))}function hi(e){return"function"!=typeof e.constructor||_i(e)?{}:Un(Ke(e))}function vi(e){return Ha(e)||Va(e)||!!(ot&&e&&e[ot])}function yi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function mi(e,t,n){if(!eu(n))return!1;var r=typeof t;return!!("number"==r?Ka(n)&&yi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function gi(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cu(e))||X.test(e)||!J.test(e)||null!=t&&e in Ee(t)}function bi(e){var t=oi(e),n=Mn[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(xn&&pi(new xn(new ArrayBuffer(1)))!=T||Sn&&pi(new Sn)!=x||En&&pi(En.resolve())!=O||On&&pi(new On)!=k||jn&&pi(new jn)!=A)&&(pi=function(e){var t=Sr(e),n=t==E?e.constructor:o,r=n?Mi(n):"";if(r)switch(r){case An:return T;case Pn:return x;case Tn:return O;case In:return k;case Rn:return A}return t});var wi=Pe?Qa:yc;function _i(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function xi(e){return e==e&&!eu(e)}function Si(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ee(n))}}function Ei(e,t,n){return t=yn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=yn(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var c=r(t+1);++i<t;)c[i]=o[i];return c[t]=n(u),mt(e,this,c)}}function Oi(e,t){return t.length<2?e:_r(e,eo(t,0,-1))}function ji(e,t){for(var n=e.length,r=mn(t.length,n),i=ko(e);r--;){var a=t[r];e[r]=yi(a,n)?i[a]:o}return e}function ki(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var $i=Ti(Qr),Ci=Mt||function(e,t){return it.setTimeout(e,t)},Ai=Ti(Jr);function Pi(e,t,n){var r=t+"";return Ai(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(h,(function(n){var r="_."+n[0];t&n[1]&&!St(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(r),n)))}function Ti(e){var t=0,n=0;return function(){var r=gn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ii(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Wr(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Ri,Li,Di=(Ri=Ra((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Li.size&&Li.clear(),e})),Li=Ri.cache,Ri);function Ni(e){if("string"==typeof e||cu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mi(e){if(null!=e){try{return Te.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ui(e){if(e instanceof zn)return e.clone();var t=new Fn(e.__wrapped__,e.__chain__);return t.__actions__=ko(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=qr((function(e,t){return qa(e)?sr(e,vr(t,1,qa,!0)):[]})),Fi=qr((function(e,t){var n=Yi(t);return qa(n)&&(n=o),qa(e)?sr(e,vr(t,1,qa,!0),ai(n,2)):[]})),zi=qr((function(e,t){var n=Yi(t);return qa(n)&&(n=o),qa(e)?sr(e,vr(t,1,qa,!0),o,n):[]}));function Vi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hu(n);return o<0&&(o=yn(r+o,0)),Tt(e,ai(t,3),o)}function Hi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=hu(n),i=n<0?yn(r+i,0):mn(i,r-1)),Tt(e,ai(t,3),i,!0)}function Wi(e){return null!=e&&e.length?vr(e,1):[]}function Ki(e){return e&&e.length?e[0]:o}var qi=qr((function(e){var t=Ot(e,vo);return t.length&&t[0]===e[0]?kr(t):[]})),Gi=qr((function(e){var t=Yi(e),n=Ot(e,vo);return t===Yi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?kr(n,ai(t,2)):[]})),Zi=qr((function(e){var t=Yi(e),n=Ot(e,vo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?kr(n,o,t):[]}));function Yi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Qi=qr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Xi=ei((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Hr(e,Ot(t,(function(e){return yi(e,n)?+e:e})).sort(Eo)),r}));function ea(e){return null==e?e:_n.call(e)}var ta=qr((function(e){return uo(vr(e,1,qa,!0))})),na=qr((function(e){var t=Yi(e);return qa(t)&&(t=o),uo(vr(e,1,qa,!0),ai(t,2))})),ra=qr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,uo(vr(e,1,qa,!0),o,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=xt(e,(function(e){if(qa(e))return t=yn(e.length,t),!0})),Ft(t,(function(t){return Ot(e,Nt(t))}))}function ia(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:Ot(n,(function(e){return mt(t,o,e)}))}var aa=qr((function(e,t){return qa(e)?sr(e,t):[]})),ua=qr((function(e){return po(xt(e,qa))})),ca=qr((function(e){var t=Yi(e);return qa(t)&&(t=o),po(xt(e,qa),ai(t,2))})),sa=qr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,po(xt(e,qa),o,t)})),la=qr(oa),fa=qr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ia(e,n)}));function pa(e){var t=Mn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var ha=ei((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&yi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:da,args:[i],thisArg:o}),new Fn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),va=Co((function(e,t,n){Ie.call(e,n)?++e[n]:rr(e,n,1)})),ya=Do(Vi),ma=Do(Hi);function ga(e,t){return(Ha(e)?bt:lr)(e,ai(t,3))}function ba(e,t){return(Ha(e)?wt:fr)(e,ai(t,3))}var wa=Co((function(e,t,n){Ie.call(e,n)?e[n].push(t):rr(e,n,[t])})),_a=qr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ka(e)?r(e.length):[];return lr(e,(function(e){a[++o]=i?mt(t,e,n):$r(e,t,n)})),a})),xa=Co((function(e,t,n){rr(e,n,t)}));function Sa(e,t){return(Ha(e)?Ot:Dr)(e,ai(t,3))}var Ea=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Oa=qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),Fr(e,vr(t,1),[])})),ja=At||function(){return it.Date.now()};function ka(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Zo(e,s,o,o,o,o,t)}function $a(e,t){var n;if("function"!=typeof t)throw new ke(i);return e=hu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=qr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ii(Ca));r|=c}return Zo(e,r,t,n,o)})),Aa=qr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ii(Aa));r|=c}return Zo(t,r,e,n,o)}));function Pa(e,t,n){var r,a,u,c,s,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new ke(i);function v(t){var n=r,i=a;return r=a=o,f=t,c=e.apply(i,n)}function y(e){return f=e,s=Ci(g,t),p?v(e):c}function m(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=u}function g(){var e=ja();if(m(e))return b(e);s=Ci(g,function(e){var n=t-(e-l);return d?mn(n,u-(e-f)):n}(e))}function b(e){return s=o,h&&r?v(e):(r=a=o,c)}function w(){var e=ja(),n=m(e);if(r=arguments,a=this,l=e,n){if(s===o)return y(l);if(d)return wo(s),s=Ci(g,t),v(l)}return s===o&&(s=Ci(g,t)),c}return t=yu(t)||0,eu(n)&&(p=!!n.leading,u=(d="maxWait"in n)?yn(yu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),w.cancel=function(){s!==o&&wo(s),f=0,r=l=a=s=o},w.flush=function(){return s===o?c:b(ja())},w}var Ta=qr((function(e,t){return cr(e,1,t)})),Ia=qr((function(e,t,n){return cr(e,yu(t)||0,n)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ra.Cache||Wn),n}function La(e){if("function"!=typeof e)throw new ke(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Wn;var Da=go((function(e,t){var n=(t=1==t.length&&Ha(t[0])?Ot(t[0],Vt(ai())):Ot(vr(t,1),Vt(ai()))).length;return qr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return mt(e,this,r)}))})),Na=qr((function(e,t){var n=tn(t,ii(Na));return Zo(e,c,o,t,n)})),Ma=qr((function(e,t){var n=tn(t,ii(Ma));return Zo(e,64,o,t,n)})),Ua=ei((function(e,t){return Zo(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var Fa=Ho(Er),za=Ho((function(e,t){return e>=t})),Va=Cr(function(){return arguments}())?Cr:function(e){return tu(e)&&Ie.call(e,"callee")&&!et.call(e,"callee")},Ha=r.isArray,Wa=ft?Vt(ft):function(e){return tu(e)&&Sr(e)==P};function Ka(e){return null!=e&&Xa(e.length)&&!Qa(e)}function qa(e){return tu(e)&&Ka(e)}var Ga=pn||yc,Za=pt?Vt(pt):function(e){return tu(e)&&Sr(e)==g};function Ya(e){if(!tu(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ou(e)}function Qa(e){if(!eu(e))return!1;var t=Sr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==hu(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function eu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function tu(e){return null!=e&&"object"==typeof e}var nu=dt?Vt(dt):function(e){return tu(e)&&pi(e)==x};function ru(e){return"number"==typeof e||tu(e)&&Sr(e)==S}function ou(e){if(!tu(e)||Sr(e)!=E)return!1;var t=Ke(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Te.call(n)==Ne}var iu=ht?Vt(ht):function(e){return tu(e)&&Sr(e)==j},au=vt?Vt(vt):function(e){return tu(e)&&pi(e)==k};function uu(e){return"string"==typeof e||!Ha(e)&&tu(e)&&Sr(e)==$}function cu(e){return"symbol"==typeof e||tu(e)&&Sr(e)==C}var su=yt?Vt(yt):function(e){return tu(e)&&Xa(e.length)&&!!Je[Sr(e)]},lu=Ho(Lr),fu=Ho((function(e,t){return e<=t}));function pu(e){if(!e)return[];if(Ka(e))return uu(e)?on(e):ko(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=pi(e);return(t==x?Xt:t==k?nn:Bu)(e)}function du(e){return e?(e=yu(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hu(e){var t=du(e),n=t%1;return t==t?n?t-n:t:0}function vu(e){return e?ir(hu(e),0,d):0}function yu(e){if("number"==typeof e)return e;if(cu(e))return p;if(eu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):de.test(e)?p:+e}function mu(e){return $o(e,Tu(e))}function gu(e){return null==e?"":ao(e)}var bu=Ao((function(e,t){if(_i(t)||Ka(t))$o(t,Pu(t),e);else for(var n in t)Ie.call(t,n)&&Xn(e,n,t[n])})),wu=Ao((function(e,t){$o(t,Tu(t),e)})),_u=Ao((function(e,t,n,r){$o(t,Tu(t),e,r)})),xu=Ao((function(e,t,n,r){$o(t,Pu(t),e,r)})),Su=ei(or),Eu=qr((function(e,t){e=Ee(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Tu(a),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===o||Ba(f,Ae[l])&&!Ie.call(e,l))&&(e[l]=a[l])}return e})),Ou=qr((function(e){return e.push(o,Qo),mt(Ru,o,e)}));function ju(e,t,n){var r=null==e?o:_r(e,t);return r===o?n:r}function ku(e,t){return null!=e&&di(e,t,jr)}var $u=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n}),ec(rc)),Cu=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),ai),Au=qr($r);function Pu(e){return Ka(e)?Gn(e):Rr(e)}function Tu(e){return Ka(e)?Gn(e,!0):function(e){if(!eu(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=_i(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}(e)}var Iu=Ao((function(e,t,n){Ur(e,t,n)})),Ru=Ao((function(e,t,n,r){Ur(e,t,n,r)})),Lu=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=mo(t,e),r||(r=t.length>1),t})),$o(e,ni(e),n),r&&(n=ar(n,7,Jo));for(var o=t.length;o--;)co(n,t[o]);return n})),Du=ei((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return ku(e,n)}))}(e,t)}));function Nu(e,t){if(null==e)return{};var n=Ot(ni(e),(function(e){return[e]}));return t=ai(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var Mu=Go(Pu),Uu=Go(Tu);function Bu(e){return null==e?[]:Ht(e,Pu(e))}var Fu=Ro((function(e,t,n){return t=t.toLowerCase(),e+(n?zu(t):t)}));function zu(e){return Yu(gu(e).toLowerCase())}function Vu(e){return(e=gu(e))&&e.replace(ge,Zt).replace(We,"")}var Hu=Ro((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wu=Ro((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ku=Io("toLowerCase"),qu=Ro((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gu=Ro((function(e,t,n){return e+(n?" ":"")+Yu(t)})),Zu=Ro((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Yu=Io("toUpperCase");function Qu(e,t,n){return e=gu(e),(t=n?o:t)===o?function(e){return Ze.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Ju=qr((function(e,t){try{return mt(e,o,t)}catch(e){return Ya(e)?e:new _e(e)}})),Xu=ei((function(e,t){return bt(t,(function(t){t=Ni(t),rr(e,t,Ca(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=No(),nc=No(!0);function rc(e){return e}function oc(e){return Ir("function"==typeof e?e:ar(e,1))}var ic=qr((function(e,t){return function(n){return $r(n,e,t)}})),ac=qr((function(e,t){return function(n){return $r(e,n,t)}}));function uc(e,t,n){var r=Pu(t),o=wr(t,r);null!=n||eu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Pu(t)));var i=!(eu(n)&&"chain"in n&&!n.chain),a=Qa(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function cc(){}var sc=Fo(Ot),lc=Fo(_t),fc=Fo(Ct);function pc(e){return gi(e)?Nt(Ni(e)):function(e){return function(t){return _r(t,e)}}(e)}var dc=Vo(),hc=Vo(!0);function vc(){return[]}function yc(){return!1}var mc,gc=Bo((function(e,t){return e+t}),0),bc=Ko("ceil"),wc=Bo((function(e,t){return e/t}),1),_c=Ko("floor"),xc=Bo((function(e,t){return e*t}),1),Sc=Ko("round"),Ec=Bo((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new ke(i);return e=hu(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=ka,Mn.assign=bu,Mn.assignIn=wu,Mn.assignInWith=_u,Mn.assignWith=xu,Mn.at=Su,Mn.before=$a,Mn.bind=Ca,Mn.bindAll=Xu,Mn.bindKey=Aa,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},Mn.chain=pa,Mn.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:yn(hu(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,c=r(sn(i/t));a<i;)c[u++]=eo(e,a,a+=t);return c},Mn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return jt(Ha(n)?ko(n):[n],vr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new ke(i);return[n(e[0]),e[1]]})):[],qr((function(n){for(var r=-1;++r<t;){var o=e[r];if(mt(o[0],this,n))return mt(o[1],this,n)}}))},Mn.conforms=function(e){return function(e){var t=Pu(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Mn.constant=ec,Mn.countBy=va,Mn.create=function(e,t){var n=Un(e);return null==t?n:nr(n,t)},Mn.curry=function e(t,n,r){var i=Zo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.curryRight=function e(t,n,r){var i=Zo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.debounce=Pa,Mn.defaults=Eu,Mn.defaultsDeep=Ou,Mn.defer=Ta,Mn.delay=Ia,Mn.difference=Bi,Mn.differenceBy=Fi,Mn.differenceWith=zi,Mn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:hu(t))<0?0:t,r):[]},Mn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:hu(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},Mn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=hu(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:hu(r))<0&&(r+=i),r=n>r?0:vu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Mn.filter=function(e,t){return(Ha(e)?xt:hr)(e,ai(t,3))},Mn.flatMap=function(e,t){return vr(Sa(e,t),1)},Mn.flatMapDeep=function(e,t){return vr(Sa(e,t),l)},Mn.flatMapDepth=function(e,t,n){return n=n===o?1:hu(n),vr(Sa(e,t),n)},Mn.flatten=Wi,Mn.flattenDeep=function(e){return null!=e&&e.length?vr(e,l):[]},Mn.flattenDepth=function(e,t){return null!=e&&e.length?vr(e,t=t===o?1:hu(t)):[]},Mn.flip=function(e){return Zo(e,512)},Mn.flow=tc,Mn.flowRight=nc,Mn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Mn.functions=function(e){return null==e?[]:wr(e,Pu(e))},Mn.functionsIn=function(e){return null==e?[]:wr(e,Tu(e))},Mn.groupBy=wa,Mn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Mn.intersection=qi,Mn.intersectionBy=Gi,Mn.intersectionWith=Zi,Mn.invert=$u,Mn.invertBy=Cu,Mn.invokeMap=_a,Mn.iteratee=oc,Mn.keyBy=xa,Mn.keys=Pu,Mn.keysIn=Tu,Mn.map=Sa,Mn.mapKeys=function(e,t){var n={};return t=ai(t,3),gr(e,(function(e,r,o){rr(n,t(e,r,o),e)})),n},Mn.mapValues=function(e,t){var n={};return t=ai(t,3),gr(e,(function(e,r,o){rr(n,r,t(e,r,o))})),n},Mn.matches=function(e){return Nr(ar(e,1))},Mn.matchesProperty=function(e,t){return Mr(e,ar(t,1))},Mn.memoize=Ra,Mn.merge=Iu,Mn.mergeWith=Ru,Mn.method=ic,Mn.methodOf=ac,Mn.mixin=uc,Mn.negate=La,Mn.nthArg=function(e){return e=hu(e),qr((function(t){return Br(t,e)}))},Mn.omit=Lu,Mn.omitBy=function(e,t){return Nu(e,La(ai(t)))},Mn.once=function(e){return $a(2,e)},Mn.orderBy=function(e,t,n,r){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(n=r?o:n)||(n=null==n?[]:[n]),Fr(e,t,n))},Mn.over=sc,Mn.overArgs=Da,Mn.overEvery=lc,Mn.overSome=fc,Mn.partial=Na,Mn.partialRight=Ma,Mn.partition=Ea,Mn.pick=Du,Mn.pickBy=Nu,Mn.property=pc,Mn.propertyOf=function(e){return function(t){return null==e?o:_r(e,t)}},Mn.pull=Qi,Mn.pullAll=Ji,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,ai(n,2)):e},Mn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,o,n):e},Mn.pullAt=Xi,Mn.range=dc,Mn.rangeRight=hc,Mn.rearg=Ua,Mn.reject=function(e,t){return(Ha(e)?xt:hr)(e,La(ai(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Hr(e,o),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new ke(i);return qr(e,t=t===o?t:hu(t))},Mn.reverse=ea,Mn.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:hu(t),(Ha(e)?Yn:Zr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Yr(e,t,n)},Mn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Yr(e,t,n,r)},Mn.shuffle=function(e){return(Ha(e)?Qn:Xr)(e)},Mn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:hu(t),n=n===o?r:hu(n)),eo(e,t,n)):[]},Mn.sortBy=Oa,Mn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Mn.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=gu(e))&&("string"==typeof t||null!=t&&!iu(t))&&!(t=ao(t))&&Jt(e)?bo(on(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new ke(i);return t=null==t?0:yn(hu(t),0),qr((function(n){var r=n[t],o=bo(n,0,t);return r&&jt(o,r),mt(e,this,o)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:hu(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:hu(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ke(i);return eu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Pa(e,t,{leading:r,maxWait:t,trailing:o})},Mn.thru=da,Mn.toArray=pu,Mn.toPairs=Mu,Mn.toPairsIn=Uu,Mn.toPath=function(e){return Ha(e)?Ot(e,Ni):cu(e)?[e]:ko(Di(gu(e)))},Mn.toPlainObject=mu,Mn.transform=function(e,t,n){var r=Ha(e),o=r||Ga(e)||su(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:eu(e)&&Qa(i)?Un(Ke(e)):{}}return(o?bt:gr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Mn.unary=function(e){return ka(e,1)},Mn.union=ta,Mn.unionBy=na,Mn.unionWith=ra,Mn.uniq=function(e){return e&&e.length?uo(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?uo(e,ai(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Mn.unset=function(e,t){return null==e||co(e,t)},Mn.unzip=oa,Mn.unzipWith=ia,Mn.update=function(e,t,n){return null==e?e:so(e,t,yo(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:so(e,t,yo(n),r)},Mn.values=Bu,Mn.valuesIn=function(e){return null==e?[]:Ht(e,Tu(e))},Mn.without=aa,Mn.words=Qu,Mn.wrap=function(e,t){return Na(yo(t),e)},Mn.xor=ua,Mn.xorBy=ca,Mn.xorWith=sa,Mn.zip=la,Mn.zipObject=function(e,t){return ho(e||[],t||[],Xn)},Mn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Yr)},Mn.zipWith=fa,Mn.entries=Mu,Mn.entriesIn=Uu,Mn.extend=wu,Mn.extendWith=_u,uc(Mn,Mn),Mn.add=gc,Mn.attempt=Ju,Mn.camelCase=Fu,Mn.capitalize=zu,Mn.ceil=bc,Mn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=yu(n))==n?n:0),t!==o&&(t=(t=yu(t))==t?t:0),ir(yu(e),t,n)},Mn.clone=function(e){return ar(e,4)},Mn.cloneDeep=function(e){return ar(e,5)},Mn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Mn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Mn.conformsTo=function(e,t){return null==t||ur(e,t,Pu(t))},Mn.deburr=Vu,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=wc,Mn.endsWith=function(e,t,n){e=gu(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(hu(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Mn.eq=Ba,Mn.escape=function(e){return(e=gu(e))&&G.test(e)?e.replace(K,Yt):e},Mn.escapeRegExp=function(e){return(e=gu(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,n){var r=Ha(e)?_t:pr;return n&&mi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.find=ya,Mn.findIndex=Vi,Mn.findKey=function(e,t){return Pt(e,ai(t,3),gr)},Mn.findLast=ma,Mn.findLastIndex=Hi,Mn.findLastKey=function(e,t){return Pt(e,ai(t,3),br)},Mn.floor=_c,Mn.forEach=ga,Mn.forEachRight=ba,Mn.forIn=function(e,t){return null==e?e:yr(e,ai(t,3),Tu)},Mn.forInRight=function(e,t){return null==e?e:mr(e,ai(t,3),Tu)},Mn.forOwn=function(e,t){return e&&gr(e,ai(t,3))},Mn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Mn.get=ju,Mn.gt=Fa,Mn.gte=za,Mn.has=function(e,t){return null!=e&&di(e,t,Or)},Mn.hasIn=ku,Mn.head=Ki,Mn.identity=rc,Mn.includes=function(e,t,n,r){e=Ka(e)?e:Bu(e),n=n&&!r?hu(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),uu(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&It(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hu(n);return o<0&&(o=yn(r+o,0)),It(e,t,o)},Mn.inRange=function(e,t,n){return t=du(t),n===o?(n=t,t=0):n=du(n),function(e,t,n){return e>=mn(t,n)&&e<yn(t,n)}(e=yu(e),t,n)},Mn.invoke=Au,Mn.isArguments=Va,Mn.isArray=Ha,Mn.isArrayBuffer=Wa,Mn.isArrayLike=Ka,Mn.isArrayLikeObject=qa,Mn.isBoolean=function(e){return!0===e||!1===e||tu(e)&&Sr(e)==m},Mn.isBuffer=Ga,Mn.isDate=Za,Mn.isElement=function(e){return tu(e)&&1===e.nodeType&&!ou(e)},Mn.isEmpty=function(e){if(null==e)return!0;if(Ka(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||su(e)||Va(e)))return!e.length;var t=pi(e);if(t==x||t==k)return!e.size;if(_i(e))return!Rr(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Ar(e,t)},Mn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Ar(e,t,o,n):!!r},Mn.isError=Ya,Mn.isFinite=function(e){return"number"==typeof e&&dn(e)},Mn.isFunction=Qa,Mn.isInteger=Ja,Mn.isLength=Xa,Mn.isMap=nu,Mn.isMatch=function(e,t){return e===t||Pr(e,t,ci(t))},Mn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Pr(e,t,ci(t),n)},Mn.isNaN=function(e){return ru(e)&&e!=+e},Mn.isNative=function(e){if(wi(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Tr(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=ru,Mn.isObject=eu,Mn.isObjectLike=tu,Mn.isPlainObject=ou,Mn.isRegExp=iu,Mn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=f},Mn.isSet=au,Mn.isString=uu,Mn.isSymbol=cu,Mn.isTypedArray=su,Mn.isUndefined=function(e){return e===o},Mn.isWeakMap=function(e){return tu(e)&&pi(e)==A},Mn.isWeakSet=function(e){return tu(e)&&"[object WeakSet]"==Sr(e)},Mn.join=function(e,t){return null==e?"":hn.call(e,t)},Mn.kebabCase=Hu,Mn.last=Yi,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=hu(n))<0?yn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Tt(e,Lt,i,!0)},Mn.lowerCase=Wu,Mn.lowerFirst=Ku,Mn.lt=lu,Mn.lte=fu,Mn.max=function(e){return e&&e.length?dr(e,rc,Er):o},Mn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Er):o},Mn.mean=function(e){return Dt(e,rc)},Mn.meanBy=function(e,t){return Dt(e,ai(t,2))},Mn.min=function(e){return e&&e.length?dr(e,rc,Lr):o},Mn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Lr):o},Mn.stubArray=vc,Mn.stubFalse=yc,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=xc,Mn.nth=function(e,t){return e&&e.length?Br(e,hu(t)):o},Mn.noConflict=function(){return it._===this&&(it._=Me),this},Mn.noop=cc,Mn.now=ja,Mn.pad=function(e,t,n){e=gu(e);var r=(t=hu(t))?rn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return zo(ln(o),n)+e+zo(sn(o),n)},Mn.padEnd=function(e,t,n){e=gu(e);var r=(t=hu(t))?rn(e):0;return t&&r<t?e+zo(t-r,n):e},Mn.padStart=function(e,t,n){e=gu(e);var r=(t=hu(t))?rn(e):0;return t&&r<t?zo(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(gu(e).replace(re,""),t||0)},Mn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=du(e),t===o?(t=e,e=0):t=du(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return mn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Wr(e,t)},Mn.reduce=function(e,t,n){var r=Ha(e)?kt:Ut,o=arguments.length<3;return r(e,ai(t,4),n,o,lr)},Mn.reduceRight=function(e,t,n){var r=Ha(e)?$t:Ut,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Mn.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:hu(t),Kr(gu(e),t)},Mn.replace=function(){var e=arguments,t=gu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Ni(t[r])];a===o&&(r=i,a=n),e=Qa(a)?a.call(e):a}return e},Mn.round=Sc,Mn.runInContext=e,Mn.sample=function(e){return(Ha(e)?Zn:Gr)(e)},Mn.size=function(e){if(null==e)return 0;if(Ka(e))return uu(e)?rn(e):e.length;var t=pi(e);return t==x||t==k?e.size:Rr(e).length},Mn.snakeCase=qu,Mn.some=function(e,t,n){var r=Ha(e)?Ct:to;return n&&mi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.sortedIndex=function(e,t){return no(e,t)},Mn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return no(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Mn.startCase=Gu,Mn.startsWith=function(e,t,n){return e=gu(e),n=null==n?0:ir(hu(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},Mn.subtract=Ec,Mn.sum=function(e){return e&&e.length?Bt(e,rc):0},Mn.sumBy=function(e,t){return e&&e.length?Bt(e,ai(t,2)):0},Mn.template=function(e,t,n){var r=Mn.templateSettings;n&&mi(e,t,n)&&(t=o),e=gu(e),t=_u({},t,r,Yo);var i,a,u=_u({},t.imports,r.imports,Yo),c=Pu(u),s=Ht(u,c),l=0,f=t.interpolate||be,p="__p += '",d=Oe((t.escape||be).source+"|"+f.source+"|"+(f===Q?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(d,(function(t,n,r,o,u,c){return r||(r=o),p+=e.slice(l,c).replace(we,Qt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=Ie.call(t,"variable")&&t.variable;if(v){if(se.test(v))throw new _e("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(z,""):p).replace(V,"$1").replace(H,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Ju((function(){return xe(c,h+"return "+p).apply(o,s)}));if(y.source=p,Ya(y))throw y;return y},Mn.times=function(e,t){if((e=hu(e))<1||e>f)return[];var n=d,r=mn(e,d);t=ai(t),e-=d;for(var o=Ft(r,t);++n<e;)t(n);return o},Mn.toFinite=du,Mn.toInteger=hu,Mn.toLength=vu,Mn.toLower=function(e){return gu(e).toLowerCase()},Mn.toNumber=yu,Mn.toSafeInteger=function(e){return e?ir(hu(e),-9007199254740991,f):0===e?e:0},Mn.toString=gu,Mn.toUpper=function(e){return gu(e).toUpperCase()},Mn.trim=function(e,t,n){if((e=gu(e))&&(n||t===o))return zt(e);if(!e||!(t=ao(t)))return e;var r=on(e),i=on(t);return bo(r,Kt(r,i),qt(r,i)+1).join("")},Mn.trimEnd=function(e,t,n){if((e=gu(e))&&(n||t===o))return e.slice(0,an(e)+1);if(!e||!(t=ao(t)))return e;var r=on(e);return bo(r,0,qt(r,on(t))+1).join("")},Mn.trimStart=function(e,t,n){if((e=gu(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=on(e);return bo(r,Kt(r,on(t))).join("")},Mn.truncate=function(e,t){var n=30,r="...";if(eu(t)){var i="separator"in t?t.separator:i;n="length"in t?hu(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=gu(e)).length;if(Jt(e)){var u=on(e);a=u.length}if(n>=a)return e;var c=n-rn(r);if(c<1)return r;var s=u?bo(u,0,c).join(""):e.slice(0,c);if(i===o)return s+r;if(u&&(c+=s.length-c),iu(i)){if(e.slice(c).search(i)){var l,f=s;for(i.global||(i=Oe(i.source,gu(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;s=s.slice(0,p===o?c:p)}}else if(e.indexOf(ao(i),c)!=c){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+r},Mn.unescape=function(e){return(e=gu(e))&&q.test(e)?e.replace(W,un):e},Mn.uniqueId=function(e){var t=++Re;return gu(e)+t},Mn.upperCase=Zu,Mn.upperFirst=Yu,Mn.each=ga,Mn.eachRight=ba,Mn.first=Ki,uc(Mn,(mc={},gr(Mn,(function(e,t){Ie.call(Mn.prototype,t)||(mc[t]=e)})),mc),{chain:!1}),Mn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),bt(["drop","take"],(function(e,t){zn.prototype[e]=function(n){n=n===o?1:yn(hu(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(rc)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=qr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return $r(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(La(ai(e)))},zn.prototype.slice=function(e,t){e=hu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=hu(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(d)},gr(zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Mn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Mn.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,c=t instanceof zn,s=u[0],l=c||Ha(t),f=function(e){var t=i.apply(Mn,jt([e],u));return r&&p?t[0]:t};l&&n&&"function"==typeof s&&1!=s.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=c&&!d;if(!a&&l){t=v?t:new zn(this);var y=e.apply(t,u);return y.__actions__.push({func:da,args:[f],thisArg:o}),new Fn(y,p)}return h&&v?e.apply(this,u):(y=this.thru(f),h?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=$e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ha(o)?o:[],e)}return this[n]((function(n){return t.apply(Ha(n)?n:[],e)}))}})),gr(zn.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Ie.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Mo(o,2).name]=[{name:"wrapper",func:o}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=ko(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ko(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ko(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return fo(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},Mn.prototype.at=ha,Mn.prototype.chain=function(){return pa(this)},Mn.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===o&&(this.__values__=pu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Ui(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:da,args:[ea],thisArg:o}),new Fn(t,this.__chain__)}return this.thru(ea)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,at&&(Mn.prototype[at]=function(){return this}),Mn}();it._=cn,(r=function(){return cn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},385:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:e=>{"use strict";e.exports=p},824:e=>{"use strict";e.exports=a},45:e=>{"use strict";e.exports=u},728:e=>{"use strict";e.exports=c},688:e=>{"use strict";e.exports=d},64:e=>{"use strict";e.exports=l},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=s},281:e=>{"use strict";e.exports=f}},h={};function v(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,v),n.loaded=!0,n.exports}v.y=o,v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},v.d=(e,t)=>{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;v.g.importScripts&&(e=v.g.location+"");var t=v.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),v.p=e})();var y={};return(0,v(968).s)(1),(()=>{"use strict";v.r(y),v.d(y,{ComponentContext:()=>o,ConfigurableLink:()=>u,Extension:()=>d,ExtensionSlot:()=>$,UserHasAccess:()=>Wn,createUseStore:()=>l,getAsyncExtensionLifecycle:()=>oe,getAsyncLifecycle:()=>ne,getLifecycle:()=>te,getSyncLifecycle:()=>re,isDesktop:()=>Mn,openmrsComponentDecorator:()=>ee,useAssignedExtensionIds:()=>ae,useAssignedExtensions:()=>_,useBodyScrollLock:()=>ue,useConfig:()=>fn,useConnectedExtensions:()=>x,useConnectivity:()=>g,useCurrentPatient:()=>Cn,useExtensionInternalStore:()=>An,useExtensionSlot:()=>S,useExtensionSlotMeta:()=>Pn,useExtensionStore:()=>Tn,useForceUpdate:()=>Rn,useLayoutType:()=>Nn,useLocations:()=>Bn,useOnClickOutside:()=>Fn,usePagination:()=>ro,usePatient:()=>_n,useSession:()=>qn,useStore:()=>tr,useStoreWithActions:()=>nr,useVisit:()=>Jr,useVisitTypes:()=>eo});var r=v(954),o=r.default.createContext({moduleName:""}),i=v(824);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e){var t=e.to,n=e.templateParams,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return r.default.createElement("a",a({onClick:function(e){return function(e,t,n){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,i.navigate)({to:t,templateParams:n}))}(e,t,n)},href:(0,i.interpolateUrl)(t,n)},u),o)}function c(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 s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(t){var n=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,2);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)?c(e,2):void 0}}(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.")}()}((0,r.useState)(e.getState())),o=n[0],i=n[1];(0,r.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var a={};return t&&(a=(0,r.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(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){s(e,t,n[t])}))}return e}({},o,a)}}var f=v(45);function p(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}var d=function(e){var t=e.state,n=e.wrap,i=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,2);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)?p(e,2):void 0}}(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.")}()}((0,r.useState)()),a=i[0],u=i[1],c=(0,r.useContext)(o).extension,s=(0,r.useCallback)((function(e){u(e)}),[]);(0,r.useEffect)((function(){if(null!=a&&c)return(0,f.renderExtension)(a,c.extensionSlotName,c.extensionSlotModuleName,c.extensionId,void 0,t)}),[null==c?void 0:c.extensionSlotName,null==c?void 0:c.extensionId,null==c?void 0:c.extensionSlotModuleName,t,a]);var l=r.default.createElement("div",{ref:s,"data-extension-id":null==c?void 0:c.extensionId,style:{position:"relative"}});return c&&n?n(l,c):l},h=v(728);function m(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 g(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return m(e,2);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)?m(e,2):void 0}}(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.")}()}((0,r.useState)(window.navigator.onLine)),t=e[0],n=e[1];return(0,r.useEffect)((function(){return(0,h.subscribeConnectivityChanged)((function(e){var t=e.online;return n(t)}))}),[]),t}var b=v(891);function w(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 _(e){var t=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,2);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)?w(e,2):void 0}}(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.")}()}((0,r.useState)([])),n=t[0],o=t[1];return(0,r.useEffect)((function(){var t=function(t){var r,i,a=null!==(i=null===(r=t.slots[e])||void 0===r?void 0:r.assignedExtensions)&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)};return t((0,f.getExtensionStore)().getState()),(0,f.getExtensionStore)().subscribe(t)}),[e,n]),n}function x(e){var t=g(),n=_(e);return(0,r.useMemo)((function(){return(0,f.getConnectedExtensions)(n,t)}),[n,t])}function S(e){var t=(0,r.useContext)(o).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)((function(){(0,f.registerExtensionSlot)(t,e)}),[]),{extensions:x(e),extensionSlotName:e,extensionSlotModuleName:t}}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function j(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){E(e,t,n[t])}))}return e}function k(e){return e}var $=function(e){var t=e.extensionSlotName,n=e.select,i=void 0===n?k:n,a=e.children,u=e.state,c=e.style,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),l=(0,r.useRef)(null),f=S(t),p=f.extensions,h=f.extensionSlotModuleName,v=(0,r.useRef)(u);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(v.current,u)||(v.current=u);var y=(0,r.useMemo)((function(){return t&&i(p).map((function(e){return r.default.createElement(o.Provider,{key:e.id,value:{moduleName:h,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:h}}},null!=a?a:r.default.createElement(d,{state:v.current}))}))}),[i,p,t,v.current]);return r.default.createElement("div",O({ref:l,"data-extension-slot-name":t,"data-extension-slot-module-name":h,style:j({},c,{position:"relative"})},s),y)},C=v(493);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(R(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(R(e)));return e}}var D=null;try{D=n(268).createContext()}catch(A){}var N={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function M(e){if("object"!==T(e))throw new Error("single-spa-react requires a configuration object");var t=P(P({},N),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!D&&t.React.createContext&&(D=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:U.bind(null,t),mount:B.bind(null,t),unmount:F.bind(null,t)};return t.parcelCanUpdate&&(n.update=z.bind(null,t)),n}function U(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function B(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=V(e,t,(function(){n(this)})),i=L(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function F(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function z(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=V(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=L(e,t)();e.ReactDOM.render(r,i)}}))}function V(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=D?e.React.createElement(D.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,P(P({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)}var H=v(64),W=v(281);function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(this,arguments)}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function G(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e,t){return Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Z(e,t)}var Y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Q=H.default.default||H.default,J={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},X=function(e){(0,r.useEffect)((function(){return Q.on("languageChanged",e.forceUpdate),function(){return Q.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,r.useRef)(null);if(t.current)throw t.current;if(!Q.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw Q.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return r.default.createElement(r.default.Fragment,null,e.children)};function ee(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},J,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Z(e,t)}(c,n);var i,a,u=(i=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(i);if(a){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return G(this,e)});function c(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=u.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var s=c.prototype;return s.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},s.render=function(){if(this.state.caughtError)return r.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,i=r.default.createElement(o.Provider,{value:this.state.config},r.default.createElement(r.default.Suspense,{fallback:null},t.disableTranslations?r.default.createElement(e,K({},this.props)):r.default.createElement(X,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},r.default.createElement(W.I18nextProvider,{i18n:Q,defaultNS:t.moduleName},r.default.createElement(e,K({},this.props))))));return t.strictMode||!r.default.StrictMode?i:r.default.createElement(r.default.StrictMode,null,i)},c}(r.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}}function te(e,t){return M({React:r.default,ReactDOM:C.default,rootComponent:ee(t)(e)})}function ne(e,t){return function(){return e().then((function(e){return te(e.default,t)}))}}function re(e,t){return function(){return Promise.resolve(te(e,t))}}var oe=ne;function ie(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 ae(e){var t=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ie(e,2);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)?ie(e,2):void 0}}(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.")}()}((0,r.useState)([])),n=t[0],o=t[1];return(0,r.useEffect)((function(){return(0,f.getExtensionStore)().subscribe((function(t){var r,i,a=null!==(i=null===(r=t.slots[e])||void 0===r?void 0:r.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)}))}),[]),n}function ue(e){(0,r.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])}const ce=function(e,t){return e===t||e!=e&&t!=t},se=function(e,t){for(var n=e.length;n--;)if(ce(e[n][0],t))return n;return-1};var le=Array.prototype.splice;function fe(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])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=se(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=se(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return se(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const pe=fe,de="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var he="object"==typeof self&&self&&self.Object===Object&&self;const ve=de||he||Function("return this")(),ye=ve.Symbol;var me=Object.prototype,ge=me.hasOwnProperty,be=me.toString,we=ye?ye.toStringTag:void 0,_e=Object.prototype.toString,xe=ye?ye.toStringTag:void 0;const Se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":xe&&xe in Object(e)?function(e){var t=ge.call(e,we),n=e[we];try{e[we]=void 0;var r=!0}catch(e){}var o=be.call(e);return r&&(t?e[we]=n:delete e[we]),o}(e):function(e){return _e.call(e)}(e)},Ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Oe=function(e){if(!Ee(e))return!1;var t=Se(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},je=ve["__core-js_shared__"];var ke,$e=(ke=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||""))?"Symbol(src)_1."+ke:"",Ce=Function.prototype.toString;const Ae=function(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Pe=/^\[object .+?Constructor\]$/,Te=Function.prototype,Ie=Object.prototype,Re=Te.toString,Le=Ie.hasOwnProperty,De=RegExp("^"+Re.call(Le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Ne=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||(t=e,$e&&$e in t))&&(Oe(e)?De:Pe).test(Ae(e));var t}(n)?n:void 0},Me=Ne(ve,"Map"),Ue=Ne(Object,"create");var Be=Object.prototype.hasOwnProperty,Fe=Object.prototype.hasOwnProperty;function ze(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])}}ze.prototype.clear=function(){this.__data__=Ue?Ue(null):{},this.size=0},ze.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ze.prototype.get=function(e){var t=this.__data__;if(Ue){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Be.call(t,e)?t[e]:void 0},ze.prototype.has=function(e){var t=this.__data__;return Ue?void 0!==t[e]:Fe.call(t,e)},ze.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ue&&void 0===t?"__lodash_hash_undefined__":t,this};const Ve=ze,He=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function We(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])}}We.prototype.clear=function(){this.size=0,this.__data__={hash:new Ve,map:new(Me||pe),string:new Ve}},We.prototype.delete=function(e){var t=He(this,e).delete(e);return this.size-=t?1:0,t},We.prototype.get=function(e){return He(this,e).get(e)},We.prototype.has=function(e){return He(this,e).has(e)},We.prototype.set=function(e,t){var n=He(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const Ke=We;function qe(e){var t=this.__data__=new pe(e);this.size=t.size}qe.prototype.clear=function(){this.__data__=new pe,this.size=0},qe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qe.prototype.get=function(e){return this.__data__.get(e)},qe.prototype.has=function(e){return this.__data__.has(e)},qe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof pe){var r=n.__data__;if(!Me||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ke(r)}return n.set(e,t),this.size=n.size,this};const Ge=qe;function Ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ke;++t<n;)this.add(e[t])}Ze.prototype.add=Ze.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ze.prototype.has=function(e){return this.__data__.has(e)};const Ye=Ze,Qe=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},Je=function(e,t){return e.has(t)},Xe=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Ye:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Qe(t,(function(e,t){if(!Je(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},et=ve.Uint8Array,tt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},nt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var rt=ye?ye.prototype:void 0,ot=rt?rt.valueOf:void 0;const it=Array.isArray;var at=Object.prototype.propertyIsEnumerable,ut=Object.getOwnPropertySymbols;const ct=ut?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(ut(e),(function(t){return at.call(e,t)})))}:function(){return[]},st=function(e){return null!=e&&"object"==typeof e},lt=function(e){return st(e)&&"[object Arguments]"==Se(e)};var ft=Object.prototype,pt=ft.hasOwnProperty,dt=ft.propertyIsEnumerable,ht=lt(function(){return arguments}())?lt:function(e){return st(e)&&pt.call(e,"callee")&&!dt.call(e,"callee")};const vt=ht;var yt=t&&!t.nodeType&&t,mt=yt&&e&&!e.nodeType&&e,gt=mt&&mt.exports===yt?ve.Buffer:void 0;const bt=(gt?gt.isBuffer:void 0)||function(){return!1};var wt=/^(?:0|[1-9]\d*)$/;const _t=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&wt.test(e))&&e>-1&&e%1==0&&e<t},xt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var St={};St["[object Float32Array]"]=St["[object Float64Array]"]=St["[object Int8Array]"]=St["[object Int16Array]"]=St["[object Int32Array]"]=St["[object Uint8Array]"]=St["[object Uint8ClampedArray]"]=St["[object Uint16Array]"]=St["[object Uint32Array]"]=!0,St["[object Arguments]"]=St["[object Array]"]=St["[object ArrayBuffer]"]=St["[object Boolean]"]=St["[object DataView]"]=St["[object Date]"]=St["[object Error]"]=St["[object Function]"]=St["[object Map]"]=St["[object Number]"]=St["[object Object]"]=St["[object RegExp]"]=St["[object Set]"]=St["[object String]"]=St["[object WeakMap]"]=!1;var Et=t&&!t.nodeType&&t,Ot=Et&&e&&!e.nodeType&&e,jt=Ot&&Ot.exports===Et&&de.process,kt=function(){try{return Ot&&Ot.require&&Ot.require("util").types||jt&&jt.binding&&jt.binding("util")}catch(e){}}(),$t=kt&&kt.isTypedArray;const Ct=$t?(At=$t,function(e){return At(e)}):function(e){return st(e)&&xt(e.length)&&!!St[Se(e)]};var At,Pt=Object.prototype.hasOwnProperty,Tt=Object.prototype;const It=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Rt=Object.prototype.hasOwnProperty;const Lt=function(e){return null!=(t=e)&&xt(t.length)&&!Oe(t)?function(e,t){var n=it(e),r=!n&&vt(e),o=!n&&!r&&bt(e),i=!n&&!r&&!o&&Ct(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=u.length;for(var s in e)!Pt.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||_t(s,c))||u.push(s);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Tt))return It(e);var t,n,r=[];for(var o in Object(e))Rt.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Dt=function(e){return function(e,t,n){var r=t(e);return it(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Lt,ct)};var Nt=Object.prototype.hasOwnProperty;const Mt=Ne(ve,"DataView"),Ut=Ne(ve,"Promise"),Bt=Ne(ve,"Set"),Ft=Ne(ve,"WeakMap");var zt="[object Map]",Vt="[object Promise]",Ht="[object Set]",Wt="[object WeakMap]",Kt="[object DataView]",qt=Ae(Mt),Gt=Ae(Me),Zt=Ae(Ut),Yt=Ae(Bt),Qt=Ae(Ft),Jt=Se;(Mt&&Jt(new Mt(new ArrayBuffer(1)))!=Kt||Me&&Jt(new Me)!=zt||Ut&&Jt(Ut.resolve())!=Vt||Bt&&Jt(new Bt)!=Ht||Ft&&Jt(new Ft)!=Wt)&&(Jt=function(e){var t=Se(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ae(n):"";if(r)switch(r){case qt:return Kt;case Gt:return zt;case Zt:return Vt;case Yt:return Ht;case Qt:return Wt}return t});const Xt=Jt;var en="[object Arguments]",tn="[object Array]",nn="[object Object]",rn=Object.prototype.hasOwnProperty;const on=function e(t,n,r,o,i){return t===n||(null==t||null==n||!st(t)&&!st(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=it(e),u=it(t),c=a?tn:Xt(e),s=u?tn:Xt(t),l=(c=c==en?nn:c)==nn,f=(s=s==en?nn:s)==nn,p=c==s;if(p&&bt(e)){if(!bt(t))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new Ge),a||Ct(e)?Xe(e,t,n,r,o,i):function(e,t,n,r,o,i,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||!i(new et(e),new et(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ce(+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=tt;case"[object Set]":var c=1&r;if(u||(u=nt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Xe(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(ot)return ot.call(e)==ot.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var d=l&&rn.call(e,"__wrapped__"),h=f&&rn.call(t,"__wrapped__");if(d||h){var v=d?e.value():e,y=h?t.value():t;return i||(i=new Ge),o(v,y,n,r,i)}}return!!p&&(i||(i=new Ge),function(e,t,n,r,o,i){var a=1&n,u=Dt(e),c=u.length;if(c!=Dt(t).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in t:Nt.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++s<c;){var v=e[l=u[s]],y=t[l];if(r)var m=a?r(y,v,l,t,e,i):r(v,y,l,e,t,i);if(!(void 0===m?v===y||o(v,y,n,r,i):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,r,o,i))}(t,n,r,o,e,i))};function an(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 un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return an(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)?an(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 sn={};function ln(e){var t=(0,r.useMemo)(i.getExtensionsConfigStore,[]),n=function(e,t){var n=cn((0,r.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,i.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,i.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!function(e,t){return on(e,t)}(n.config,o)&&a(n.config)}))}),[e,t,o]),o}(t,e);if(!n&&e){var o="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!sn[o]&&t&&(sn[o]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,i.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),sn[o]}return n||{}}function fn(){var e=(0,r.useContext)(o),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var a=function(e){var t=(0,r.useMemo)((function(){return(0,i.getConfigStore)(e)}),[e]),n=e,o=function(e){var t=cn((0,r.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],o=t[1];return(0,r.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&o(e.config)}))}),[e]),n}(t);if(!o)throw sn[n]||(sn[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),sn[n];return o}(t),u=ln(n),c=(0,r.useMemo)((function(){return function(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){un(e,t,n[t])}))}return e}({},a,u)}),[a,u]);return c}var pn,dn=v(766);function hn(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 vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yn(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){vn(e,t,n[t])}))}return e}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(pn||(pn={}));var mn,gn={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function bn(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function wn(e,t){switch(t.type){case pn.loadPatient:return yn({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case pn.newPatient:return yn({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case pn.loadError:return yn({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}}function _n(e){var t=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return hn(e,2);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)?hn(e,2):void 0}}(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.")}()}((0,r.useReducer)(wn,yn({},gn,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e}))),n=t[0],o=t[1];return(0,r.useEffect)((function(){if(n.isPendingUuid){var e=bn();o(e?{type:pn.loadPatient,patientUuid:e}:{type:pn.newPatient,patient:null})}var t=!0;return n.isLoadingPatient&&n.patientUuid&&(0,dn.fetchCurrentPatient)(n.patientUuid).then((function(e){return t&&o({patient:e.data,type:pn.newPatient})}),(function(e){return t&&o({err:e,type:pn.loadError})})),function(){t=!1}}),[n.isPendingUuid,n.isLoadingPatient,n.patientUuid]),(0,r.useEffect)((function(){var e=function(e){var t=bn();t!=n.patientUuid&&o({type:pn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[n.patientUuid]),{isLoading:n.isPendingUuid||n.isLoadingPatient,patient:n.patient,patientUuid:null!=e?e:n.patientUuid,error:n.err}}function xn(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 Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(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){Sn(e,t,n[t])}))}return e}function On(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return xn(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)?xn(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.")}()}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(mn||(mn={}));var jn={patient:null,isLoadingPatient:!0,err:null};function kn(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function $n(e,t){switch(t.type){case mn.loadPatient:return En({},e,{patient:null,isLoadingPatient:!0,err:null});case mn.newPatient:return En({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case mn.loadError:return En({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}}function Cn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kn(),t=On((0,r.useReducer)($n,jn),2),n=t[0],o=t[1];return(0,r.useEffect)((function(){var t=!0;return e?((0,dn.fetchCurrentPatient)(e).then((function(e){return t&&o({patient:e.data,type:mn.newPatient})}),(function(e){return t&&o({err:e,type:mn.loadError})})),o({type:mn.loadPatient})):o({type:mn.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]}var An=l((0,f.getExtensionInternalStore)());function Pn(e){var t=x(e);return(0,r.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])}var Tn=l((0,f.getExtensionStore)());function In(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 Rn(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return In(e,2);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)?In(e,2):void 0}}(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.")}()}((0,r.useState)(0))[1];return(0,r.useCallback)((function(){e((function(e){return e+1}))}),[])}function Ln(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 Dn(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e}function Nn(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ln(e,2);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)?Ln(e,2):void 0}}(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.")}()}((0,r.useState)(Dn)),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=function(){n(Dn())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),t}var Mn=function(e){return"small-desktop"===e||"large-desktop"===e};function Un(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 Bn(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Un(e,2);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)?Un(e,2):void 0}}(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.")}()}((0,r.useState)([])),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=(0,dn.getLocations)().subscribe((function(e){n(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function Fn(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,r.useRef)(null);return(0,r.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n}function zn(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}var Vn,Hn,Wn=function(e){var t=e.privilege,n=e.fallback,o=e.children,i=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return zn(e,2);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)?zn(e,2):void 0}}(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.")}()}((0,r.useState)(null)),a=i[0],u=i[1];return(0,r.useEffect)((function(){var e=(0,dn.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,dn.userHasAccess)(t,a)?r.default.createElement(r.default.Fragment,null,o):n?r.default.createElement(r.default.Fragment,null,n):null};function Kn(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 qn(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Kn(e,2);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)?Kn(e,2):void 0}}(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.")}()}((0,r.useState)(null)),t=e[0],n=e[1],o=null;if(!t){if(Vn){var i=(0,dn.getSessionStore)().getState();i.loaded&&(o=i.session)}else Vn=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,Hn&&Hn(),Hn=void 0)};t((0,dn.getSessionStore)().getState()),o||(Hn=(0,dn.getSessionStore)().subscribe(t))}));if(!o)throw Vn;n(o)}(0,r.useEffect)((function(){return Hn||(Hn=(0,dn.getSessionStore)().subscribe((function(e){var t=e.loaded,r=e.session;t&&(o=r,n(r))}))),function(){Hn&&Hn(),Hn=void 0}}),[]);var a=t||o;if(!a)throw Vn?(console.warn("useSession is in an unexpected state. Attempting to recover."),Vn):Error("useSession is in an invalid state.");return a}var Gn=v(385);function Zn(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 Yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qn(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){Yn(e,t,n[t])}))}return e}function Jn(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Zn(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)?Zn(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.")}()}function Xn(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}var er=function(e){return e};function tr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:er,n=arguments.length>2?arguments[2]:void 0,o=Jn((0,r.useState)((function(){return t(e.getState())})),2),i=o[0],a=o[1];(0,r.useEffect)((function(){return(0,Gn.subscribeTo)(e,t,a)}),[e,t]);var u={};return n&&(u=(0,r.useMemo)((function(){return Xn(e,n)}),[e,n])),Qn({},i,u)}function nr(e,t){return tr(e,er,t)}function rr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function or(e,t){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=t.call(e,a)}catch(e){i=[6,e],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])}}}var ir,ar=function(){},ur=void 0,cr=Object,sr=function(e){return e===ur},lr=function(e){return"function"==typeof e},fr=function(e,t){return cr.assign({},e,t)},pr="undefined",dr=function(){return typeof window!=pr},hr=new WeakMap,vr=0,yr=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(cr(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=hr.get(e))return t;if(t=++vr+"~",hr.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=yr(e[n])+",";hr.set(e,t)}if(o==cr){t="#";for(var a=cr.keys(e).sort();!sr(n=a.pop());)sr(e[n])||(t+=n+":"+yr(e[n])+",");hr.set(e,t)}}return t},mr=!0,gr=dr(),br=typeof document!=pr,wr=gr&&window.addEventListener?window.addEventListener.bind(window):ar,_r=br?document.addEventListener.bind(document):ar,xr=gr&&window.removeEventListener?window.removeEventListener.bind(window):ar,Sr=br?document.removeEventListener.bind(document):ar,Er={isOnline:function(){return mr},isVisible:function(){var e=br&&document.visibilityState;return sr(e)||"hidden"!==e}},Or={initFocus:function(e){return _r("visibilitychange",e),wr("focus",e),function(){Sr("visibilitychange",e),xr("focus",e)}},initReconnect:function(e){var t=function(){mr=!0,e()},n=function(){mr=!1};return wr("online",t),wr("offline",n),function(){xr("online",t),xr("offline",n)}}},jr=!dr()||"Deno"in window,kr=jr?r.useEffect:r.useLayoutEffect,$r="undefined"!=typeof navigator&&navigator.connection,Cr=!jr&&$r&&(["slow-2g","2g"].includes($r.effectiveType)||$r.saveData),Ar=function(e){if(lr(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?yr(e):"",t,e?"$swr$"+e:""]},Pr=new WeakMap,Tr=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=Pr.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Ir=0,Rr=function(){return++Ir},Lr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return rr(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return or(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!sr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Ar(n),f=l[0],p=l[2],!f)return[2];if(d=Pr.get(t),h=d[2],e.length<3)return[2,Tr(t,f,t.get(f),ur,ur,u,!0)];if(v=r,m=Rr(),h[f]=[m,0],g=!sr(s),b=t.get(f),g&&(t.set(f,s),Tr(t,f,s)),lr(v))try{v=v(t.get(f))}catch(e){y=e}return v&&lr(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(lr(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,fr(t.get(p),{error:y}))),h[f][1]=Rr(),[4,Tr(t,f,v,y,ur,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Dr=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Nr=function(e,t){if(!Pr.has(e)){var n=fr(Or,t),r={},o=Lr.bind(ur,e),i=ar;if(Pr.set(e,[r,{},{},{},o]),!jr){var a=n.initFocus(setTimeout.bind(ur,Dr.bind(ur,r,0))),u=n.initReconnect(setTimeout.bind(ur,Dr.bind(ur,r,1)));i=function(){a&&a(),u&&u(),Pr.delete(e)}}return[e,o,i]}return[e,Pr.get(e)[4]]},Mr=Nr(new Map),Ur=Mr[0],Br=Mr[1],Fr=fr({onLoadingSlow:ar,onSuccess:ar,onError:ar,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!sr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:ar,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Cr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Cr?5e3:3e3,compare:function(e,t){return yr(e)==yr(t)},isPaused:function(){return!1},cache:Ur,mutate:Br,fallback:{}},Er),zr=function(e,t){var n=fr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=fr(o,a))}return n},Vr=(0,r.createContext)({}),Hr=function(e){return lr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Wr=function(){return fr(Fr,(0,r.useContext)(Vr))},Kr=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},qr={dedupe:!0},Gr=(cr.defineProperty((function(e){var t=e.value,n=zr((0,r.useContext)(Vr),t),o=t&&t.provider,i=(0,r.useState)((function(){return o?Nr(o(n.cache||Ur),t):ur}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),kr((function(){return i?i[2]:ur}),[]),(0,r.createElement)(Vr.Provider,fr(e,{value:n}))}),"default",{value:Fr}),ir=function(e,t,n){var o=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Pr.get(o),d=p[0],h=p[1],v=p[2],y=p[3],m=Ar(e),g=m[0],b=m[1],w=m[2],_=(0,r.useRef)(!1),x=(0,r.useRef)(!1),S=(0,r.useRef)(g),E=(0,r.useRef)(t),O=(0,r.useRef)(n),j=function(){return O.current},k=function(){return j().isVisible()&&j().isOnline()},$=function(e){return o.set(w,fr(o.get(w),e))},C=o.get(g),A=sr(a)?n.fallback[g]:a,P=sr(C)?A:C,T=o.get(w)||{},I=T.error,R=!_.current,L=function(){return R&&!sr(c)?c:!j().isPaused()&&(u?!sr(P):sr(P)||n.revalidateIfStale)},D=!(!g||!t)&&(!!T.isValidating||R&&L()),N=function(e,t){var n=(0,r.useState)({})[1],o=(0,r.useRef)(e),i=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(e){var r=!1,a=o.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],i.current[c]&&(r=!0))}r&&!t.current&&n({})}),[]);return kr((function(){o.current=e})),[o,i.current,a]}({data:P,error:I,isValidating:D},x),M=N[0],U=N[1],B=N[2],F=(0,r.useCallback)((function(e){return rr(void 0,void 0,void 0,(function(){var t,r,a,u,c,s,l,f,p,d,h,m,w;return or(this,(function(O){switch(O.label){case 0:if(t=E.current,!g||!t||x.current||j().isPaused())return[2,!1];u=!0,c=e||{},s=!y[g]||!c.dedupe,l=function(){return!x.current&&g===S.current&&_.current},f=function(){var e=y[g];e&&e[1]===a&&delete y[g]},p={isValidating:!1},d=function(){$({isValidating:!1}),l()&&B(p)},$({isValidating:!0}),B({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),s&&(Tr(o,g,M.current.data,M.current.error,!0),n.loadingTimeout&&!o.get(g)&&setTimeout((function(){u&&l()&&j().onLoadingSlow(g,n)}),n.loadingTimeout),y[g]=[t.apply(void 0,b),Rr()]),w=y[g],r=w[0],a=w[1],[4,r];case 2:return r=O.sent(),s&&setTimeout(f,n.dedupingInterval),y[g]&&y[g][1]===a?($({error:ur}),p.error=ur,h=v[g],!sr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),s&&l()&&j().onDiscarded(g),[2,!1]):(i(M.current.data,r)?p.data=M.current.data:p.data=r,i(o.get(g),r)||o.set(g,r),s&&l()&&j().onSuccess(r,g,n),[3,4])):(s&&l()&&j().onDiscarded(g),[2,!1]);case 3:return m=O.sent(),f(),j().isPaused()||($({error:m}),p.error=m,s&&l()&&(j().onError(m,g,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||lr(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&k()&&j().onErrorRetry(m,g,n,F,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,d(),l()&&s&&Tr(o,g,p.data,p.error,!1),[2,!0]}}))}))}),[g]),z=(0,r.useCallback)(Lr.bind(ur,o,(function(){return S.current})),[]);if(kr((function(){E.current=t,O.current=n})),kr((function(){if(g){var e=g!==S.current,t=F.bind(ur,qr),n=0,r=Kr(g,h,(function(e,t,n){B(fr({error:t,isValidating:n},i(M.current.data,e)?ur:{data:e}))})),o=Kr(g,d,(function(e){if(0==e){var r=Date.now();j().revalidateOnFocus&&r>n&&k()&&(n=r+j().focusThrottleInterval,t())}else if(1==e)j().revalidateOnReconnect&&k()&&t();else if(2==e)return F()}));return x.current=!1,S.current=g,_.current=!0,e&&B({data:P,error:I,isValidating:D}),L()&&(sr(P)||jr?t():(a=t,dr()&&typeof window.requestAnimationFrame!=pr?window.requestAnimationFrame(a):setTimeout(a,1))),function(){x.current=!0,r(),o()}}var a}),[g,F]),kr((function(){var e;function t(){var t=lr(s)?s(P):s;t&&-1!==e&&(e=setTimeout(n,t))}function n(){M.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?t():F(qr).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[s,l,f,F]),(0,r.useDebugValue)(P),u&&sr(P)&&g)throw E.current=t,O.current=n,x.current=!1,sr(I)?F(qr):I;return{mutate:z,get data(){return U.data=!0,P},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,D}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Wr(),r=Hr(e),o=r[0],i=r[1],a=r[2],u=zr(n,a),c=ir,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),Zr=v(688),Yr=v(332),Qr=v.n(Yr);function Jr(e){var t,n=Gr(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(dn.defaultVisitCustomRepresentation,"&includeInactive=false"):null,dn.openmrsFetch),o=n.data,i=n.error;return{error:i,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,r.useMemo)((function(){return null!==(t=null==o?void 0:o.data.results.find((function(e){return null===e.stopDatetime&&(0,Zr.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==o?void 0:o.data.results]),isLoading:!o&&!i}}function Xr(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 eo(){var e=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Xr(e,2);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)?Xr(e,2):void 0}}(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.")}()}((0,r.useState)([])),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=(0,dn.getVisitTypes)().subscribe((function(e){n(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function to(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 no(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return to(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)?to(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.")}()}function ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=no((0,r.useState)(1),2),o=n[0],i=n[1],a=(0,r.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),u=(0,r.useMemo)((function(){var n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)}),[e,o,t]);return{results:u,totalPages:a,currentPage:o,paginated:e.length>t,showNextButton:o<a,showPreviousButton:o>1,goTo:function(e){i(Math.max(1,Math.min(a,e)))},goToNext:function(){o<a&&i(o+1)},goToPrevious:function(){o>1&&i(o-1)}}}Zr.default.extend(Qr())})(),y})())}}}))},435:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function e(e,t){for(var n in t)e[n]=t[n];return e}function t(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}}r.r(o),r.d(o,{createAppState:()=>u,createGlobalStore:()=>i,getAppState:()=>c,getGlobalStore:()=>a,subscribeTo:()=>s});var n={};function i(e,r){var o=n[e];if(o)return o.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):o.value.setState(r,!0),o.active=!0,o.value;var i=t(r);return n[e]={value:i,active:!0},i}function a(e,r){var o=n[e];if(!o){var i=t(r);return n[e]={value:i,active:!1},i}return o.value}function u(e){return i("app",e)}function c(){return a("app",{})}function s(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},742:()=>{System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(e,t){var n={},r={},o={},i={},a={},u={};return Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(){},function(){},function(e){o.createGlobalStore=e.createGlobalStore},function(e){i.createContext=e.createContext},function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){u.Subject=e.Subject}],execute:function(){e((()=>{var e={279:(e,t,n)=>{"use strict";var r=n(493);r.createRoot,r.hydrateRoot},584:(e,t,n)=>{var r=n(518).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},518:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},78:()=>{var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=o(e);function a(e,t){return se(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Pe.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Pe.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Pe.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return x(w().getState(),e,t)},x=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(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},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){E(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},j=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||$(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.")}()},k=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(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.")}()},$=function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}},C=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=F(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},A=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=j(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=j(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=j(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),u=a.getState(),c={slots:O({},u.slots,i)};le(u,c)||a.setState(c)},P=function(e,t){var n=function(e,t){var n=Me(he(e.schemas)),r=k(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=j(u.value,2);n=V([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=M(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=O({},r[s.slotName],E({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},I=function(e,t){Be(e,t);var n=Ie.getState();Ie.setState({schemas:O({},n.schemas,E({},e,t))})},R=function(e,t){Be(e,t);var n=Ie.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:O({},n.schemas,E({},e,t))})},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:k(n.providedConfigs).concat([{source:t,config:e}])})},D=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=y(e);n(r.getState());var o=r.subscribe(n)}))},N=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(e,t,n);var o=Ve(e,t,r);return ze(e,o,n),o},M=function(e,t,n,r,o,i){var a,u,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=z(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([z(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=Ve(m,y,o.devDefaultsAreOn);return ze(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return k(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},F=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=z(e,B(t,n));H(r,o,e);var i=Ve(r,o,t.devDefaultsAreOn);return ze(r,i,e),delete i.extensionSlots,i},z=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Ee)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Oe,Boolean:je,ConceptUuid:Ae,Number:ke,Object:Ce,String:$e,UUID:Ae,PersonAttributeTypeUuid:Ae,PatientIdentifierTypeUuid:Ae}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},Z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Y=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Z(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Q=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return De},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return R},getConfig:function(){return D},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Ne},inRange:function(){return We},interpolateString:function(){return Q},interpolateUrl:function(){return Y},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},oneOf:function(){return Ge},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Le},validator:function(){return h},validators:function(){return Ze}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ve=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ye=n((function(e){return!!ve(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),me=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),ge=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),be=ge,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new me(e)),ye(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),xe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),Se=l((function e(t,n,r){return xe((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Ee=r((function(e,t){return Se((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Oe=h((function(e){return Array.isArray(e)}),"must be an array"),je=h((function(e){return"boolean"==typeof e}),"must be a boolean"),ke=h((function(e){return"number"==typeof e}),"must be a number"),$e=h((function(e){return"string"==typeof e}),"must be a string"),Ce=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ae=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Pe=i(685),Te={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Ie=(0,Pe.createGlobalStore)("config-internal",Te),Re=v();Ie.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var Le=(0,Pe.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var De=(0,Pe.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Pe.createGlobalStore)("config-implementer-tools",{config:{}});function Me(e){return e.hasOwnProperty("_default")?O({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=Me(e[n]),t}),{}):{}}function Ue(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!G(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Be(e,c,u);var s=c._elements;if(q(s)&&Be(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(pe).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![pe.Array,pe.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){W(n,e._type,t),G(t)?e._type===pe.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===pe.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),G(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===pe.Object&&e._elements?ze(e._elements,s,l):ze(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)ze(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}C(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return C(e,Le.getState())})),Le.subscribe((function(e){return C(Ie.getState(),e)})),P(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return P(e,Le.getState())})),Le.subscribe((function(e){return P(Ie.getState(),e)})),A(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return A(e,Le.getState())})),Le.subscribe((function(e){return A(Ie.getState(),e)})),T(Ie.getState(),De.getState(),Le.getState()),Ie.subscribe((function(e){T(e,De.getState(),Le.getState())})),De.subscribe((function(e){T(Ie.getState(),e,Le.getState())})),Le.subscribe((function(e){T(Ie.getState(),De.getState(),e)}));var Ve=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===pe.Array&&Array.isArray(a)){var l=a.map((function(e){return Ve(s,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Ve(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(G(u)){var m=r.hasOwnProperty(i)?a:{};G(m)&&(r[i]=Ve(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},He=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),Ge=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke,oneOf:Ge}}(),a}())}}}))},606:(e,t,n)=>{function r(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,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(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){u(e,t,n[t])}))}return e}function l(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||d(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.")}()}function f(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(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.")}()}e=n.nmd(e);var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}}System.register([],(function(r,i){return{execute:function(){r(function(){var r={9672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return c}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?c+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return c})},841:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=void 0===n?"undefined":p(n);if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6618:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(9233),o=n.n(r),i=n(361),a=n.n(i)()(o());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link{background-color:#e0e0e0;outline:none;color:#161616;border-left:.25rem solid var(--brand-01)}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1){height:2.5rem;color:#8d8d8d;border-left:.25rem solid transparent;font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.omrs-breakpoint-gt-tablet .Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div{padding-top:1rem}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1):hover{background-color:#e0e0e0;color:#161616;border-left:var(--brand-01);padding:1.2rem 0 1.2rem 1.2rem}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1):focus{background-color:#e0e0e0;outline:none;color:#161616;border-left:var(--brand-01)}","",{version:3,sources:["webpack://./../esm-styleguide/src/_vars.scss","webpack://./../esm-styleguide/src/left-nav/left-nav.module.scss","webpack://./../../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/themes/generated/_mixins.scss","webpack://./../../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,sBACE,wBC0CQ,CDzCR,YAAA,CACA,aC0CQ,CDzCR,wCAAA,CAGF,gDACE,aAAA,CACA,aCmCQ,CDlCR,oCAAA,CEigBE,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CFlrB1B,4DACE,gBAAA,CAGF,sDACE,wBCwBQ,CDvBR,aCyBQ,CDxBR,2BAAA,CACA,8BAAA,CAGF,sDACE,wBCiBQ,CDhBR,YAAA,CACA,aCiBQ,CDhBR,2BAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1200px;\n$breakpoint-desktop-min: 1201px;\n$breakpoint-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n",'@import "../vars";\n@import "carbon-components/scss/globals/scss/typography.scss";\n@import "~carbon-components/scss/globals/scss/_spacing.scss";\n\n:global(.active-left-nav-link) {\n background-color: $ui-03;\n outline: none;\n color: $ui-05;\n border-left: 0.25rem solid var(--brand-01);\n}\n\n.leftNav > div a:nth-child(1) {\n height: 2.5rem;\n color: $ui-04;\n border-left: 0.25rem solid transparent;\n @include carbon--type-style("productive-heading-01");\n}\n\n:global(.omrs-breakpoint-gt-tablet) .leftNav > div {\n padding-top: 1rem;\n}\n\n.leftNav > div a:nth-child(1):hover {\n background-color: $ui-03;\n color: $ui-05;\n border-left: var(--brand-01);\n padding: 1.2rem 0 1.2rem 1.2rem;\n}\n\n.leftNav > div a:nth-child(1):focus {\n background-color: $ui-03;\n outline: none;\n color: $ui-05;\n border-left: var(--brand-01);\n}\n',"// Code generated by @carbon/themes. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2019\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import './themes';\n\n/// Define theme variables from a map of tokens\n/// @access public\n/// @param {Map} $theme [$carbon--theme] - Map of theme tokens\n/// @param {Bool} $emit-custom-properties [false] - Output CSS Custom Properties for theme tokens\n/// @content Pass in your custom declaration blocks to be used after the token maps set theming variables.\n///\n/// @example scss\n/// // Default usage\n/// @include carbon--theme();\n///\n/// // Alternate styling (not white theme)\n/// @include carbon--theme($carbon--theme--g90) {\n/// // declarations...\n/// }\n///\n/// // Inline styling\n/// @include carbon--theme($carbon--theme--g90) {\n/// .my-dark-theme {\n/// // declarations...\n/// }\n/// }\n///\n/// @group @carbon/themes\n@mixin carbon--theme(\n $theme: $carbon--theme,\n $emit-custom-properties: false,\n $emit-difference: false\n) {\n $parent-carbon-theme: $carbon--theme;\n $carbon--theme: $theme !global;\n $interactive-01: map-get($theme, 'interactive-01') !global;\n $interactive-02: map-get($theme, 'interactive-02') !global;\n $interactive-03: map-get($theme, 'interactive-03') !global;\n $interactive-04: map-get($theme, 'interactive-04') !global;\n $ui-background: map-get($theme, 'ui-background') !global;\n $ui-01: map-get($theme, 'ui-01') !global;\n $ui-02: map-get($theme, 'ui-02') !global;\n $ui-03: map-get($theme, 'ui-03') !global;\n $ui-04: map-get($theme, 'ui-04') !global;\n $ui-05: map-get($theme, 'ui-05') !global;\n $text-01: map-get($theme, 'text-01') !global;\n $text-02: map-get($theme, 'text-02') !global;\n $text-03: map-get($theme, 'text-03') !global;\n $text-04: map-get($theme, 'text-04') !global;\n $text-05: map-get($theme, 'text-05') !global;\n $text-error: map-get($theme, 'text-error') !global;\n $icon-01: map-get($theme, 'icon-01') !global;\n $icon-02: map-get($theme, 'icon-02') !global;\n $icon-03: map-get($theme, 'icon-03') !global;\n $link-01: map-get($theme, 'link-01') !global;\n $link-02: map-get($theme, 'link-02') !global;\n $inverse-link: map-get($theme, 'inverse-link') !global;\n $field-01: map-get($theme, 'field-01') !global;\n $field-02: map-get($theme, 'field-02') !global;\n $inverse-01: map-get($theme, 'inverse-01') !global;\n $inverse-02: map-get($theme, 'inverse-02') !global;\n $support-01: map-get($theme, 'support-01') !global;\n $support-02: map-get($theme, 'support-02') !global;\n $support-03: map-get($theme, 'support-03') !global;\n $support-04: map-get($theme, 'support-04') !global;\n $inverse-support-01: map-get($theme, 'inverse-support-01') !global;\n $inverse-support-02: map-get($theme, 'inverse-support-02') !global;\n $inverse-support-03: map-get($theme, 'inverse-support-03') !global;\n $inverse-support-04: map-get($theme, 'inverse-support-04') !global;\n $overlay-01: map-get($theme, 'overlay-01') !global;\n $danger-01: map-get($theme, 'danger-01') !global;\n $danger-02: map-get($theme, 'danger-02') !global;\n $focus: map-get($theme, 'focus') !global;\n $inverse-focus-ui: map-get($theme, 'inverse-focus-ui') !global;\n $hover-primary: map-get($theme, 'hover-primary') !global;\n $active-primary: map-get($theme, 'active-primary') !global;\n $hover-primary-text: map-get($theme, 'hover-primary-text') !global;\n $hover-secondary: map-get($theme, 'hover-secondary') !global;\n $active-secondary: map-get($theme, 'active-secondary') !global;\n $hover-tertiary: map-get($theme, 'hover-tertiary') !global;\n $active-tertiary: map-get($theme, 'active-tertiary') !global;\n $hover-ui: map-get($theme, 'hover-ui') !global;\n $hover-light-ui: map-get($theme, 'hover-light-ui') !global;\n $hover-selected-ui: map-get($theme, 'hover-selected-ui') !global;\n $active-ui: map-get($theme, 'active-ui') !global;\n $active-light-ui: map-get($theme, 'active-light-ui') !global;\n $selected-ui: map-get($theme, 'selected-ui') !global;\n $selected-light-ui: map-get($theme, 'selected-light-ui') !global;\n $inverse-hover-ui: map-get($theme, 'inverse-hover-ui') !global;\n $hover-danger: map-get($theme, 'hover-danger') !global;\n $active-danger: map-get($theme, 'active-danger') !global;\n $hover-row: map-get($theme, 'hover-row') !global;\n $visited-link: map-get($theme, 'visited-link') !global;\n $disabled-01: map-get($theme, 'disabled-01') !global;\n $disabled-02: map-get($theme, 'disabled-02') !global;\n $disabled-03: map-get($theme, 'disabled-03') !global;\n $highlight: map-get($theme, 'highlight') !global;\n $decorative-01: map-get($theme, 'decorative-01') !global;\n $button-separator: map-get($theme, 'button-separator') !global;\n $skeleton-01: map-get($theme, 'skeleton-01') !global;\n $skeleton-02: map-get($theme, 'skeleton-02') !global;\n $brand-01: map-get($theme, 'brand-01') !global;\n $brand-02: map-get($theme, 'brand-02') !global;\n $brand-03: map-get($theme, 'brand-03') !global;\n $active-01: map-get($theme, 'active-01') !global;\n $hover-field: map-get($theme, 'hover-field') !global;\n $danger: map-get($theme, 'danger') !global;\n $caption-01: map-get($theme, 'caption-01') !global;\n $label-01: map-get($theme, 'label-01') !global;\n $helper-text-01: map-get($theme, 'helper-text-01') !global;\n $body-short-01: map-get($theme, 'body-short-01') !global;\n $body-long-01: map-get($theme, 'body-long-01') !global;\n $body-short-02: map-get($theme, 'body-short-02') !global;\n $body-long-02: map-get($theme, 'body-long-02') !global;\n $code-01: map-get($theme, 'code-01') !global;\n $code-02: map-get($theme, 'code-02') !global;\n $heading-01: map-get($theme, 'heading-01') !global;\n $productive-heading-01: map-get($theme, 'productive-heading-01') !global;\n $heading-02: map-get($theme, 'heading-02') !global;\n $productive-heading-02: map-get($theme, 'productive-heading-02') !global;\n $productive-heading-03: map-get($theme, 'productive-heading-03') !global;\n $productive-heading-04: map-get($theme, 'productive-heading-04') !global;\n $productive-heading-05: map-get($theme, 'productive-heading-05') !global;\n $productive-heading-06: map-get($theme, 'productive-heading-06') !global;\n $productive-heading-07: map-get($theme, 'productive-heading-07') !global;\n $expressive-heading-01: map-get($theme, 'expressive-heading-01') !global;\n $expressive-heading-02: map-get($theme, 'expressive-heading-02') !global;\n $expressive-heading-03: map-get($theme, 'expressive-heading-03') !global;\n $expressive-heading-04: map-get($theme, 'expressive-heading-04') !global;\n $expressive-heading-05: map-get($theme, 'expressive-heading-05') !global;\n $expressive-heading-06: map-get($theme, 'expressive-heading-06') !global;\n $expressive-paragraph-01: map-get($theme, 'expressive-paragraph-01') !global;\n $quotation-01: map-get($theme, 'quotation-01') !global;\n $quotation-02: map-get($theme, 'quotation-02') !global;\n $display-01: map-get($theme, 'display-01') !global;\n $display-02: map-get($theme, 'display-02') !global;\n $display-03: map-get($theme, 'display-03') !global;\n $display-04: map-get($theme, 'display-04') !global;\n $spacing-01: map-get($theme, 'spacing-01') !global;\n $spacing-02: map-get($theme, 'spacing-02') !global;\n $spacing-03: map-get($theme, 'spacing-03') !global;\n $spacing-04: map-get($theme, 'spacing-04') !global;\n $spacing-05: map-get($theme, 'spacing-05') !global;\n $spacing-06: map-get($theme, 'spacing-06') !global;\n $spacing-07: map-get($theme, 'spacing-07') !global;\n $spacing-08: map-get($theme, 'spacing-08') !global;\n $spacing-09: map-get($theme, 'spacing-09') !global;\n $spacing-10: map-get($theme, 'spacing-10') !global;\n $spacing-11: map-get($theme, 'spacing-11') !global;\n $spacing-12: map-get($theme, 'spacing-12') !global;\n $fluid-spacing-01: map-get($theme, 'fluid-spacing-01') !global;\n $fluid-spacing-02: map-get($theme, 'fluid-spacing-02') !global;\n $fluid-spacing-03: map-get($theme, 'fluid-spacing-03') !global;\n $fluid-spacing-04: map-get($theme, 'fluid-spacing-04') !global;\n $layout-01: map-get($theme, 'layout-01') !global;\n $layout-02: map-get($theme, 'layout-02') !global;\n $layout-03: map-get($theme, 'layout-03') !global;\n $layout-04: map-get($theme, 'layout-04') !global;\n $layout-05: map-get($theme, 'layout-05') !global;\n $layout-06: map-get($theme, 'layout-06') !global;\n $layout-07: map-get($theme, 'layout-07') !global;\n $container-01: map-get($theme, 'container-01') !global;\n $container-02: map-get($theme, 'container-02') !global;\n $container-03: map-get($theme, 'container-03') !global;\n $container-04: map-get($theme, 'container-04') !global;\n $container-05: map-get($theme, 'container-05') !global;\n $icon-size-01: map-get($theme, 'icon-size-01') !global;\n $icon-size-02: map-get($theme, 'icon-size-02') !global;\n\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n $interactive-01: var(\n --#{$custom-property-prefix}-interactive-01,\n map-get($theme, 'interactive-01')\n ) !global;\n $interactive-02: var(\n --#{$custom-property-prefix}-interactive-02,\n map-get($theme, 'interactive-02')\n ) !global;\n $interactive-03: var(\n --#{$custom-property-prefix}-interactive-03,\n map-get($theme, 'interactive-03')\n ) !global;\n $interactive-04: var(\n --#{$custom-property-prefix}-interactive-04,\n map-get($theme, 'interactive-04')\n ) !global;\n $ui-background: var(\n --#{$custom-property-prefix}-ui-background,\n map-get($theme, 'ui-background')\n ) !global;\n $ui-01: var(\n --#{$custom-property-prefix}-ui-01,\n map-get($theme, 'ui-01')\n ) !global;\n $ui-02: var(\n --#{$custom-property-prefix}-ui-02,\n map-get($theme, 'ui-02')\n ) !global;\n $ui-03: var(\n --#{$custom-property-prefix}-ui-03,\n map-get($theme, 'ui-03')\n ) !global;\n $ui-04: var(\n --#{$custom-property-prefix}-ui-04,\n map-get($theme, 'ui-04')\n ) !global;\n $ui-05: var(\n --#{$custom-property-prefix}-ui-05,\n map-get($theme, 'ui-05')\n ) !global;\n $text-01: var(\n --#{$custom-property-prefix}-text-01,\n map-get($theme, 'text-01')\n ) !global;\n $text-02: var(\n --#{$custom-property-prefix}-text-02,\n map-get($theme, 'text-02')\n ) !global;\n $text-03: var(\n --#{$custom-property-prefix}-text-03,\n map-get($theme, 'text-03')\n ) !global;\n $text-04: var(\n --#{$custom-property-prefix}-text-04,\n map-get($theme, 'text-04')\n ) !global;\n $text-05: var(\n --#{$custom-property-prefix}-text-05,\n map-get($theme, 'text-05')\n ) !global;\n $text-error: var(\n --#{$custom-property-prefix}-text-error,\n map-get($theme, 'text-error')\n ) !global;\n $icon-01: var(\n --#{$custom-property-prefix}-icon-01,\n map-get($theme, 'icon-01')\n ) !global;\n $icon-02: var(\n --#{$custom-property-prefix}-icon-02,\n map-get($theme, 'icon-02')\n ) !global;\n $icon-03: var(\n --#{$custom-property-prefix}-icon-03,\n map-get($theme, 'icon-03')\n ) !global;\n $link-01: var(\n --#{$custom-property-prefix}-link-01,\n map-get($theme, 'link-01')\n ) !global;\n $link-02: var(\n --#{$custom-property-prefix}-link-02,\n map-get($theme, 'link-02')\n ) !global;\n $inverse-link: var(\n --#{$custom-property-prefix}-inverse-link,\n map-get($theme, 'inverse-link')\n ) !global;\n $field-01: var(\n --#{$custom-property-prefix}-field-01,\n map-get($theme, 'field-01')\n ) !global;\n $field-02: var(\n --#{$custom-property-prefix}-field-02,\n map-get($theme, 'field-02')\n ) !global;\n $inverse-01: var(\n --#{$custom-property-prefix}-inverse-01,\n map-get($theme, 'inverse-01')\n ) !global;\n $inverse-02: var(\n --#{$custom-property-prefix}-inverse-02,\n map-get($theme, 'inverse-02')\n ) !global;\n $support-01: var(\n --#{$custom-property-prefix}-support-01,\n map-get($theme, 'support-01')\n ) !global;\n $support-02: var(\n --#{$custom-property-prefix}-support-02,\n map-get($theme, 'support-02')\n ) !global;\n $support-03: var(\n --#{$custom-property-prefix}-support-03,\n map-get($theme, 'support-03')\n ) !global;\n $support-04: var(\n --#{$custom-property-prefix}-support-04,\n map-get($theme, 'support-04')\n ) !global;\n $inverse-support-01: var(\n --#{$custom-property-prefix}-inverse-support-01,\n map-get($theme, 'inverse-support-01')\n ) !global;\n $inverse-support-02: var(\n --#{$custom-property-prefix}-inverse-support-02,\n map-get($theme, 'inverse-support-02')\n ) !global;\n $inverse-support-03: var(\n --#{$custom-property-prefix}-inverse-support-03,\n map-get($theme, 'inverse-support-03')\n ) !global;\n $inverse-support-04: var(\n --#{$custom-property-prefix}-inverse-support-04,\n map-get($theme, 'inverse-support-04')\n ) !global;\n $overlay-01: var(\n --#{$custom-property-prefix}-overlay-01,\n map-get($theme, 'overlay-01')\n ) !global;\n $danger-01: var(\n --#{$custom-property-prefix}-danger-01,\n map-get($theme, 'danger-01')\n ) !global;\n $danger-02: var(\n --#{$custom-property-prefix}-danger-02,\n map-get($theme, 'danger-02')\n ) !global;\n $focus: var(\n --#{$custom-property-prefix}-focus,\n map-get($theme, 'focus')\n ) !global;\n $inverse-focus-ui: var(\n --#{$custom-property-prefix}-inverse-focus-ui,\n map-get($theme, 'inverse-focus-ui')\n ) !global;\n $hover-primary: var(\n --#{$custom-property-prefix}-hover-primary,\n map-get($theme, 'hover-primary')\n ) !global;\n $active-primary: var(\n --#{$custom-property-prefix}-active-primary,\n map-get($theme, 'active-primary')\n ) !global;\n $hover-primary-text: var(\n --#{$custom-property-prefix}-hover-primary-text,\n map-get($theme, 'hover-primary-text')\n ) !global;\n $hover-secondary: var(\n --#{$custom-property-prefix}-hover-secondary,\n map-get($theme, 'hover-secondary')\n ) !global;\n $active-secondary: var(\n --#{$custom-property-prefix}-active-secondary,\n map-get($theme, 'active-secondary')\n ) !global;\n $hover-tertiary: var(\n --#{$custom-property-prefix}-hover-tertiary,\n map-get($theme, 'hover-tertiary')\n ) !global;\n $active-tertiary: var(\n --#{$custom-property-prefix}-active-tertiary,\n map-get($theme, 'active-tertiary')\n ) !global;\n $hover-ui: var(\n --#{$custom-property-prefix}-hover-ui,\n map-get($theme, 'hover-ui')\n ) !global;\n $hover-light-ui: var(\n --#{$custom-property-prefix}-hover-light-ui,\n map-get($theme, 'hover-light-ui')\n ) !global;\n $hover-selected-ui: var(\n --#{$custom-property-prefix}-hover-selected-ui,\n map-get($theme, 'hover-selected-ui')\n ) !global;\n $active-ui: var(\n --#{$custom-property-prefix}-active-ui,\n map-get($theme, 'active-ui')\n ) !global;\n $active-light-ui: var(\n --#{$custom-property-prefix}-active-light-ui,\n map-get($theme, 'active-light-ui')\n ) !global;\n $selected-ui: var(\n --#{$custom-property-prefix}-selected-ui,\n map-get($theme, 'selected-ui')\n ) !global;\n $selected-light-ui: var(\n --#{$custom-property-prefix}-selected-light-ui,\n map-get($theme, 'selected-light-ui')\n ) !global;\n $inverse-hover-ui: var(\n --#{$custom-property-prefix}-inverse-hover-ui,\n map-get($theme, 'inverse-hover-ui')\n ) !global;\n $hover-danger: var(\n --#{$custom-property-prefix}-hover-danger,\n map-get($theme, 'hover-danger')\n ) !global;\n $active-danger: var(\n --#{$custom-property-prefix}-active-danger,\n map-get($theme, 'active-danger')\n ) !global;\n $hover-row: var(\n --#{$custom-property-prefix}-hover-row,\n map-get($theme, 'hover-row')\n ) !global;\n $visited-link: var(\n --#{$custom-property-prefix}-visited-link,\n map-get($theme, 'visited-link')\n ) !global;\n $disabled-01: var(\n --#{$custom-property-prefix}-disabled-01,\n map-get($theme, 'disabled-01')\n ) !global;\n $disabled-02: var(\n --#{$custom-property-prefix}-disabled-02,\n map-get($theme, 'disabled-02')\n ) !global;\n $disabled-03: var(\n --#{$custom-property-prefix}-disabled-03,\n map-get($theme, 'disabled-03')\n ) !global;\n $highlight: var(\n --#{$custom-property-prefix}-highlight,\n map-get($theme, 'highlight')\n ) !global;\n $decorative-01: var(\n --#{$custom-property-prefix}-decorative-01,\n map-get($theme, 'decorative-01')\n ) !global;\n $button-separator: var(\n --#{$custom-property-prefix}-button-separator,\n map-get($theme, 'button-separator')\n ) !global;\n $skeleton-01: var(\n --#{$custom-property-prefix}-skeleton-01,\n map-get($theme, 'skeleton-01')\n ) !global;\n $skeleton-02: var(\n --#{$custom-property-prefix}-skeleton-02,\n map-get($theme, 'skeleton-02')\n ) !global;\n $brand-01: var(\n --#{$custom-property-prefix}-brand-01,\n map-get($theme, 'brand-01')\n ) !global;\n $brand-02: var(\n --#{$custom-property-prefix}-brand-02,\n map-get($theme, 'brand-02')\n ) !global;\n $brand-03: var(\n --#{$custom-property-prefix}-brand-03,\n map-get($theme, 'brand-03')\n ) !global;\n $active-01: var(\n --#{$custom-property-prefix}-active-01,\n map-get($theme, 'active-01')\n ) !global;\n $hover-field: var(\n --#{$custom-property-prefix}-hover-field,\n map-get($theme, 'hover-field')\n ) !global;\n $danger: var(\n --#{$custom-property-prefix}-danger,\n map-get($theme, 'danger')\n ) !global;\n $spacing-01: var(\n --#{$custom-property-prefix}-spacing-01,\n map-get($theme, 'spacing-01')\n ) !global;\n $spacing-02: var(\n --#{$custom-property-prefix}-spacing-02,\n map-get($theme, 'spacing-02')\n ) !global;\n $spacing-03: var(\n --#{$custom-property-prefix}-spacing-03,\n map-get($theme, 'spacing-03')\n ) !global;\n $spacing-04: var(\n --#{$custom-property-prefix}-spacing-04,\n map-get($theme, 'spacing-04')\n ) !global;\n $spacing-05: var(\n --#{$custom-property-prefix}-spacing-05,\n map-get($theme, 'spacing-05')\n ) !global;\n $spacing-06: var(\n --#{$custom-property-prefix}-spacing-06,\n map-get($theme, 'spacing-06')\n ) !global;\n $spacing-07: var(\n --#{$custom-property-prefix}-spacing-07,\n map-get($theme, 'spacing-07')\n ) !global;\n $spacing-08: var(\n --#{$custom-property-prefix}-spacing-08,\n map-get($theme, 'spacing-08')\n ) !global;\n $spacing-09: var(\n --#{$custom-property-prefix}-spacing-09,\n map-get($theme, 'spacing-09')\n ) !global;\n $spacing-10: var(\n --#{$custom-property-prefix}-spacing-10,\n map-get($theme, 'spacing-10')\n ) !global;\n $spacing-11: var(\n --#{$custom-property-prefix}-spacing-11,\n map-get($theme, 'spacing-11')\n ) !global;\n $spacing-12: var(\n --#{$custom-property-prefix}-spacing-12,\n map-get($theme, 'spacing-12')\n ) !global;\n $fluid-spacing-01: var(\n --#{$custom-property-prefix}-fluid-spacing-01,\n map-get($theme, 'fluid-spacing-01')\n ) !global;\n $fluid-spacing-02: var(\n --#{$custom-property-prefix}-fluid-spacing-02,\n map-get($theme, 'fluid-spacing-02')\n ) !global;\n $fluid-spacing-03: var(\n --#{$custom-property-prefix}-fluid-spacing-03,\n map-get($theme, 'fluid-spacing-03')\n ) !global;\n $fluid-spacing-04: var(\n --#{$custom-property-prefix}-fluid-spacing-04,\n map-get($theme, 'fluid-spacing-04')\n ) !global;\n $layout-01: var(\n --#{$custom-property-prefix}-layout-01,\n map-get($theme, 'layout-01')\n ) !global;\n $layout-02: var(\n --#{$custom-property-prefix}-layout-02,\n map-get($theme, 'layout-02')\n ) !global;\n $layout-03: var(\n --#{$custom-property-prefix}-layout-03,\n map-get($theme, 'layout-03')\n ) !global;\n $layout-04: var(\n --#{$custom-property-prefix}-layout-04,\n map-get($theme, 'layout-04')\n ) !global;\n $layout-05: var(\n --#{$custom-property-prefix}-layout-05,\n map-get($theme, 'layout-05')\n ) !global;\n $layout-06: var(\n --#{$custom-property-prefix}-layout-06,\n map-get($theme, 'layout-06')\n ) !global;\n $layout-07: var(\n --#{$custom-property-prefix}-layout-07,\n map-get($theme, 'layout-07')\n ) !global;\n $container-01: var(\n --#{$custom-property-prefix}-container-01,\n map-get($theme, 'container-01')\n ) !global;\n $container-02: var(\n --#{$custom-property-prefix}-container-02,\n map-get($theme, 'container-02')\n ) !global;\n $container-03: var(\n --#{$custom-property-prefix}-container-03,\n map-get($theme, 'container-03')\n ) !global;\n $container-04: var(\n --#{$custom-property-prefix}-container-04,\n map-get($theme, 'container-04')\n ) !global;\n $container-05: var(\n --#{$custom-property-prefix}-container-05,\n map-get($theme, 'container-05')\n ) !global;\n $icon-size-01: var(\n --#{$custom-property-prefix}-icon-size-01,\n map-get($theme, 'icon-size-01')\n ) !global;\n $icon-size-02: var(\n --#{$custom-property-prefix}-icon-size-02,\n map-get($theme, 'icon-size-02')\n ) !global;\n }\n @if $emit-custom-properties == true {\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-01',\n map-get($theme, 'interactive-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-02',\n map-get($theme, 'interactive-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-03',\n map-get($theme, 'interactive-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-04',\n map-get($theme, 'interactive-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'ui-background',\n $emit-difference\n )\n {\n @include custom-property(\n 'ui-background',\n map-get($theme, 'ui-background')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-01', $emit-difference) {\n @include custom-property('ui-01', map-get($theme, 'ui-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-02', $emit-difference) {\n @include custom-property('ui-02', map-get($theme, 'ui-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-03', $emit-difference) {\n @include custom-property('ui-03', map-get($theme, 'ui-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-04', $emit-difference) {\n @include custom-property('ui-04', map-get($theme, 'ui-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-05', $emit-difference) {\n @include custom-property('ui-05', map-get($theme, 'ui-05'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-01', $emit-difference) {\n @include custom-property('text-01', map-get($theme, 'text-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-02', $emit-difference) {\n @include custom-property('text-02', map-get($theme, 'text-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-03', $emit-difference) {\n @include custom-property('text-03', map-get($theme, 'text-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-04', $emit-difference) {\n @include custom-property('text-04', map-get($theme, 'text-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-05', $emit-difference) {\n @include custom-property('text-05', map-get($theme, 'text-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'text-error',\n $emit-difference\n )\n {\n @include custom-property('text-error', map-get($theme, 'text-error'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-01', $emit-difference) {\n @include custom-property('icon-01', map-get($theme, 'icon-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-02', $emit-difference) {\n @include custom-property('icon-02', map-get($theme, 'icon-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-03', $emit-difference) {\n @include custom-property('icon-03', map-get($theme, 'icon-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'link-01', $emit-difference) {\n @include custom-property('link-01', map-get($theme, 'link-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'link-02', $emit-difference) {\n @include custom-property('link-02', map-get($theme, 'link-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-link',\n $emit-difference\n )\n {\n @include custom-property('inverse-link', map-get($theme, 'inverse-link'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'field-01', $emit-difference)\n {\n @include custom-property('field-01', map-get($theme, 'field-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'field-02', $emit-difference)\n {\n @include custom-property('field-02', map-get($theme, 'field-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-01',\n $emit-difference\n )\n {\n @include custom-property('inverse-01', map-get($theme, 'inverse-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-02',\n $emit-difference\n )\n {\n @include custom-property('inverse-02', map-get($theme, 'inverse-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-01',\n $emit-difference\n )\n {\n @include custom-property('support-01', map-get($theme, 'support-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-02',\n $emit-difference\n )\n {\n @include custom-property('support-02', map-get($theme, 'support-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-03',\n $emit-difference\n )\n {\n @include custom-property('support-03', map-get($theme, 'support-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-04',\n $emit-difference\n )\n {\n @include custom-property('support-04', map-get($theme, 'support-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-01',\n map-get($theme, 'inverse-support-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-02',\n map-get($theme, 'inverse-support-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-03',\n map-get($theme, 'inverse-support-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-04',\n map-get($theme, 'inverse-support-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'overlay-01',\n $emit-difference\n )\n {\n @include custom-property('overlay-01', map-get($theme, 'overlay-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger-01', $emit-difference)\n {\n @include custom-property('danger-01', map-get($theme, 'danger-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger-02', $emit-difference)\n {\n @include custom-property('danger-02', map-get($theme, 'danger-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'focus', $emit-difference) {\n @include custom-property('focus', map-get($theme, 'focus'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-focus-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-focus-ui',\n map-get($theme, 'inverse-focus-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-primary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-primary',\n map-get($theme, 'hover-primary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-primary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-primary',\n map-get($theme, 'active-primary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-primary-text',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-primary-text',\n map-get($theme, 'hover-primary-text')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-secondary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-secondary',\n map-get($theme, 'hover-secondary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-secondary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-secondary',\n map-get($theme, 'active-secondary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-tertiary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-tertiary',\n map-get($theme, 'hover-tertiary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-tertiary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-tertiary',\n map-get($theme, 'active-tertiary')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'hover-ui', $emit-difference)\n {\n @include custom-property('hover-ui', map-get($theme, 'hover-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-light-ui',\n map-get($theme, 'hover-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-selected-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-selected-ui',\n map-get($theme, 'hover-selected-ui')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'active-ui', $emit-difference)\n {\n @include custom-property('active-ui', map-get($theme, 'active-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-light-ui',\n map-get($theme, 'active-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'selected-ui',\n $emit-difference\n )\n {\n @include custom-property('selected-ui', map-get($theme, 'selected-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'selected-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'selected-light-ui',\n map-get($theme, 'selected-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-hover-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-hover-ui',\n map-get($theme, 'inverse-hover-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-danger',\n $emit-difference\n )\n {\n @include custom-property('hover-danger', map-get($theme, 'hover-danger'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-danger',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-danger',\n map-get($theme, 'active-danger')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'hover-row', $emit-difference)\n {\n @include custom-property('hover-row', map-get($theme, 'hover-row'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'visited-link',\n $emit-difference\n )\n {\n @include custom-property('visited-link', map-get($theme, 'visited-link'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-01',\n $emit-difference\n )\n {\n @include custom-property('disabled-01', map-get($theme, 'disabled-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-02',\n $emit-difference\n )\n {\n @include custom-property('disabled-02', map-get($theme, 'disabled-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-03',\n $emit-difference\n )\n {\n @include custom-property('disabled-03', map-get($theme, 'disabled-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'highlight', $emit-difference)\n {\n @include custom-property('highlight', map-get($theme, 'highlight'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'decorative-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'decorative-01',\n map-get($theme, 'decorative-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'button-separator',\n $emit-difference\n )\n {\n @include custom-property(\n 'button-separator',\n map-get($theme, 'button-separator')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'skeleton-01',\n $emit-difference\n )\n {\n @include custom-property('skeleton-01', map-get($theme, 'skeleton-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'skeleton-02',\n $emit-difference\n )\n {\n @include custom-property('skeleton-02', map-get($theme, 'skeleton-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-01', $emit-difference)\n {\n @include custom-property('brand-01', map-get($theme, 'brand-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-02', $emit-difference)\n {\n @include custom-property('brand-02', map-get($theme, 'brand-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-03', $emit-difference)\n {\n @include custom-property('brand-03', map-get($theme, 'brand-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'active-01', $emit-difference)\n {\n @include custom-property('active-01', map-get($theme, 'active-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-field',\n $emit-difference\n )\n {\n @include custom-property('hover-field', map-get($theme, 'hover-field'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger', $emit-difference) {\n @include custom-property('danger', map-get($theme, 'danger'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'caption-01',\n $emit-difference\n )\n {\n @include custom-property('caption-01', map-get($theme, 'caption-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'label-01', $emit-difference)\n {\n @include custom-property('label-01', map-get($theme, 'label-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'helper-text-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'helper-text-01',\n map-get($theme, 'helper-text-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-short-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'body-short-01',\n map-get($theme, 'body-short-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-long-01',\n $emit-difference\n )\n {\n @include custom-property('body-long-01', map-get($theme, 'body-long-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-short-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'body-short-02',\n map-get($theme, 'body-short-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-long-02',\n $emit-difference\n )\n {\n @include custom-property('body-long-02', map-get($theme, 'body-long-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'code-01', $emit-difference) {\n @include custom-property('code-01', map-get($theme, 'code-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'code-02', $emit-difference) {\n @include custom-property('code-02', map-get($theme, 'code-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'heading-01',\n $emit-difference\n )\n {\n @include custom-property('heading-01', map-get($theme, 'heading-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-01',\n map-get($theme, 'productive-heading-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'heading-02',\n $emit-difference\n )\n {\n @include custom-property('heading-02', map-get($theme, 'heading-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-02',\n map-get($theme, 'productive-heading-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-03',\n map-get($theme, 'productive-heading-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-04',\n map-get($theme, 'productive-heading-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-05',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-05',\n map-get($theme, 'productive-heading-05')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-06',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-06',\n map-get($theme, 'productive-heading-06')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-07',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-07',\n map-get($theme, 'productive-heading-07')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-01',\n map-get($theme, 'expressive-heading-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-02',\n map-get($theme, 'expressive-heading-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-03',\n map-get($theme, 'expressive-heading-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-04',\n map-get($theme, 'expressive-heading-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-05',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-05',\n map-get($theme, 'expressive-heading-05')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-06',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-06',\n map-get($theme, 'expressive-heading-06')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-paragraph-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-paragraph-01',\n map-get($theme, 'expressive-paragraph-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'quotation-01',\n $emit-difference\n )\n {\n @include custom-property('quotation-01', map-get($theme, 'quotation-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'quotation-02',\n $emit-difference\n )\n {\n @include custom-property('quotation-02', map-get($theme, 'quotation-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-01',\n $emit-difference\n )\n {\n @include custom-property('display-01', map-get($theme, 'display-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-02',\n $emit-difference\n )\n {\n @include custom-property('display-02', map-get($theme, 'display-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-03',\n $emit-difference\n )\n {\n @include custom-property('display-03', map-get($theme, 'display-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-04',\n $emit-difference\n )\n {\n @include custom-property('display-04', map-get($theme, 'display-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-01',\n $emit-difference\n )\n {\n @include custom-property('spacing-01', map-get($theme, 'spacing-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-02',\n $emit-difference\n )\n {\n @include custom-property('spacing-02', map-get($theme, 'spacing-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-03',\n $emit-difference\n )\n {\n @include custom-property('spacing-03', map-get($theme, 'spacing-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-04',\n $emit-difference\n )\n {\n @include custom-property('spacing-04', map-get($theme, 'spacing-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-05',\n $emit-difference\n )\n {\n @include custom-property('spacing-05', map-get($theme, 'spacing-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-06',\n $emit-difference\n )\n {\n @include custom-property('spacing-06', map-get($theme, 'spacing-06'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-07',\n $emit-difference\n )\n {\n @include custom-property('spacing-07', map-get($theme, 'spacing-07'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-08',\n $emit-difference\n )\n {\n @include custom-property('spacing-08', map-get($theme, 'spacing-08'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-09',\n $emit-difference\n )\n {\n @include custom-property('spacing-09', map-get($theme, 'spacing-09'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-10',\n $emit-difference\n )\n {\n @include custom-property('spacing-10', map-get($theme, 'spacing-10'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-11',\n $emit-difference\n )\n {\n @include custom-property('spacing-11', map-get($theme, 'spacing-11'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-12',\n $emit-difference\n )\n {\n @include custom-property('spacing-12', map-get($theme, 'spacing-12'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-01',\n map-get($theme, 'fluid-spacing-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-02',\n map-get($theme, 'fluid-spacing-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-03',\n map-get($theme, 'fluid-spacing-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-04',\n map-get($theme, 'fluid-spacing-04')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-01', $emit-difference)\n {\n @include custom-property('layout-01', map-get($theme, 'layout-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-02', $emit-difference)\n {\n @include custom-property('layout-02', map-get($theme, 'layout-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-03', $emit-difference)\n {\n @include custom-property('layout-03', map-get($theme, 'layout-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-04', $emit-difference)\n {\n @include custom-property('layout-04', map-get($theme, 'layout-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-05', $emit-difference)\n {\n @include custom-property('layout-05', map-get($theme, 'layout-05'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-06', $emit-difference)\n {\n @include custom-property('layout-06', map-get($theme, 'layout-06'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-07', $emit-difference)\n {\n @include custom-property('layout-07', map-get($theme, 'layout-07'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-01',\n $emit-difference\n )\n {\n @include custom-property('container-01', map-get($theme, 'container-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-02',\n $emit-difference\n )\n {\n @include custom-property('container-02', map-get($theme, 'container-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-03',\n $emit-difference\n )\n {\n @include custom-property('container-03', map-get($theme, 'container-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-04',\n $emit-difference\n )\n {\n @include custom-property('container-04', map-get($theme, 'container-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-05',\n $emit-difference\n )\n {\n @include custom-property('container-05', map-get($theme, 'container-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'icon-size-01',\n $emit-difference\n )\n {\n @include custom-property('icon-size-01', map-get($theme, 'icon-size-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'icon-size-02',\n $emit-difference\n )\n {\n @include custom-property('icon-size-02', map-get($theme, 'icon-size-02'));\n }\n }\n\n @content;\n\n // Reset to default theme after apply in content\n @if $carbon--theme != $parent-carbon-theme {\n $carbon--theme: $parent-carbon-theme !global;\n\n @include carbon--theme();\n }\n}\n","//\n// Copyright IBM Corp. 2018, 2018\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import '../layout/breakpoint';\n@import 'font-family';\n@import 'scale';\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$caption-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$helper-text-01: (\n font-size: carbon--type-scale(1),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: map-merge(\n $heading-01,\n (\n line-height: 1.25,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: map-merge(\n $heading-02,\n (\n line-height: 1.5,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(5),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(8),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n font-weight: carbon--font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: carbon--type-scale(6),\n font-weight: carbon--font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(5),\n ),\n lg: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n label-01: $label-01,\n helper-text-01: $helper-text-01,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n);\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return $value / ($value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map-remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map-get($type-styles, breakpoints) {\n @include carbon--breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: $carbon--grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map-get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map-get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map-get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map-get($type-styles, font-size);\n $min-font-size: map-get($type-styles, font-size);\n @if map-has-key($fluid-breakpoint, font-size) {\n $min-font-size: map-get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map-get($breakpoint, width);\n $min-vw: map-get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: carbon--breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map-get(\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map-get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n$custom-property-prefix: 'cds' !default;\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin carbon--type-style(\n $name,\n $fluid: false,\n $breakpoints: $carbon--grid-breakpoints\n) {\n @if not map-has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map-get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map-has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n @include custom-properties($name, $token);\n } @else {\n // Otherwise, we just include all the property declarations directly on the\n // selector\n @include properties(map-remove($token, 'breakpoints'));\n }\n }\n}\n"],sourceRoot:""}]),a.locals={leftNav:"Y3Q+kOxLLWMt9RIQX8EZ2w=="};var u=a},361:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},9233:function(e){"use strict";var t=function(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};e.exports=function(e){var n,r=function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),4!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,n){if(e){if("string"==typeof e)return t(e,4);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,4):void 0}}(n)||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.")}(),o=r[1],i=r[3];if(!i)return o;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),c="/*# ".concat(u," */"),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(s).concat([c]).join("\n")}return[o].join("\n")}},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",u="week",s="month",l="quarter",f="year",p="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,s),i=n-o<0,a=t.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:s,y:f,w:u,d:a,D:p,h:i,m:o,s:r,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var _=function(e){return c(e,k)},x=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var u=t.name;w[u]=t,o=u}return!r&&o&&(b=o),o||!r&&b},S=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new k(n)},E=g;E.l=x,E.i=_,E.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O,j,k=((j=(O=function(e){this.$L=x(e.locale,null,!0),this.parse(e)}).prototype).parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(c(t,Date))return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},j.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},j.$utils=function(){return E},j.isValid=function(){return!(this.$d.toString()===d)},j.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},j.isAfter=function(e,t){return S(e)<this.startOf(t)},j.isBefore=function(e,t){return this.endOf(t)<S(e)},j.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(e,t){var n=this,c=!!E.u(t)||t,l=E.p(e),d=function(e,t){var r=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},h=function(e,t){return E.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return c?d(1,0):d(31,11);case s:return c?d(1,y):d(0,y+1);case u:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(c?m-w:m+(6-w),y);case a:case p:return h(g+"Hours",0);case i:return h(g+"Minutes",1);case o:return h(g+"Seconds",2);case r:return h(g+"Milliseconds",3);default:return this.clone()}},j.endOf=function(e){return this.startOf(e,!1)},j.$set=function(e,t){var u,c=E.p(e),l="set"+(this.$u?"UTC":""),d=(u={},u[a]=l+"Date",u[p]=l+"Date",u[s]=l+"Month",u[f]=l+"FullYear",u[i]=l+"Hours",u[o]=l+"Minutes",u[r]=l+"Seconds",u[n]=l+"Milliseconds",u)[c],h=c===a?this.$D+(t-this.$W):t;if(c===s||c===f){var v=this.clone().set(p,1);v.$d[d](h),v.init(),this.$d=v.set(p,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},j.set=function(e,t){return this.clone().$set(e,t)},j.get=function(e){return this[E.p(e)]()},j.add=function(n,c){var l,p=this;n=Number(n);var d=E.p(c),h=function(e){var t=S(p);return E.w(t.date(t.date()+Math.round(e*n)),p)};if(d===s)return this.set(s,this.$M+n);if(d===f)return this.set(f,this.$y+n);if(d===a)return h(1);if(d===u)return h(7);var v=(l={},l[o]=e,l[i]=t,l[r]=1e3,l)[d]||1,y=this.$d.getTime()+n*v;return E.w(y,this)},j.subtract=function(e,t){return this.add(-1*e,t)},j.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,a=this.$m,u=this.$M,c=n.weekdays,s=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return E.s(i%12||12,e,"0")},p=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:E.s(u+1,2,"0"),MMM:l(n.monthsShort,u,s,3),MMMM:l(s,u),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:E.s(i,2,"0"),h:f(1),hh:f(2),a:p(i,a,!0),A:p(i,a,!1),m:String(a),mm:E.s(a,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(e,t){return t||h[e]||o.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(n,c,p){var d,h=E.p(c),v=S(n),y=(v.utcOffset()-this.utcOffset())*e,m=this-v,g=E.m(this,v);return g=(d={},d[f]=g/12,d[s]=g,d[l]=g/3,d[u]=(m-y)/6048e5,d[a]=(m-y)/864e5,d[i]=m/t,d[o]=m/e,d[r]=m/1e3,d)[h]||m,p?g:E.a(g)},j.daysInMonth=function(){return this.endOf(s).$D},j.$locale=function(){return w[this.$L]},j.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=x(e,t,!0);return r&&(n.$L=r),n},j.clone=function(){return E.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},O),$=k.prototype;return S.prototype=$,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",s],["$y",f],["$D",p]].forEach((function(e){$[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,k,S),e.$i=!0),S},S.locale=x,S.isDayjs=_,S.unix=function(e){return S(1e3*e)},S.en=w[b],S.Ls=w,S.p={},S}()},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},4525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r,s,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(c===p&&h){var v=h.reference;n[v]||(r=u,s=o,l=h,i.push((function(){var e,o,i,u;e=r,o=s,u=(i=l).reference,t.resolve({bundle:e,resource:o,reference:i}).then((function(e){var t=e.data||e.content;n[u]=t,a()}))})))}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),u=n(856),c=n(7719),s=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),E=i.Http(e,n),O=f.Path,j=O(e.baseUrl),k=j.slash(":type || :resource.resourceType"),$=k.slash("_history"),C=k.slash(":id || :resource.id"),A=C.slash("_history"),P=C.slash(":versionId || :resource.meta.versionId"),T=j.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(j.slash("metadata")).end(E),document:w.and(j.slash("Document")).end(E),profile:b.and(j.slash("Profile").slash(":type")).end(E),transaction:w.and(j).end(E),history:b.and(j.slash("_history")).and(R).end(E),typeHistory:b.and($).and(R).end(E),resourceHistory:b.and(A).and(R).end(E),read:b.and(s.$WithPatient).and(C).end(E),vread:b.and(P).end(E),delete:x.and(C).and(I).end(E),create:w.and(k).and(I).end(E),validate:w.and(k.slash("_validate")).end(E),meta:{add:w.and(T.slash("$meta-add")).end(E),delete:w.and(T.slash("$meta-delete")).end(E),read:b.and(T.slash("$meta")).end(E)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(R).end(E),update:_.and(C).and(I).end(E),conditionalUpdate:_.and(k).and(r.$SearchParams).and(I).end(E),conditionalDelete:x.and(k).and(r.$SearchParams).and(I).end(E),nextPage:b.and(c.$$BundleLinkUrl("next")).end(E),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:S.and(C).and(y("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,c=e.reference,s=e.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(s(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),c[n]&&(i.modifier=c[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),s(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},6058:function(e,t,n){"use strict";var r=function(e){return o.isMemo(e)?u:c[e.$$typeof]||i},o=n(2594),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[o.Memo]=u;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var i=d(n);i&&i!==h&&e(t,i,o)}var u=l(n);f&&(u=u.concat(f(n)));for(var c=r(t),v=r(n),y=0;y<u.length;++y){var m=u[y];if(!(a[m]||o&&o[m]||v&&v[m]||c&&c[m])){var g=p(n,m);try{s(t,m,g)}catch(e){}}}}return t}},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},a=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},s=function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e},l=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},f=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},d=function(e,t){return!(null==e||!e.length)&&x(e,t,0)>-1},h=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},v=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},y=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},m=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},g=function(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n},b=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},w=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r},_=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},x=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):_(e,E,n)},S=function(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1},E=function(e){return e!=e},O=function(e,t){var n=null==e?0:e.length;return n?C(e,t)/n:ee},j=function(e){return function(t){return null==t?o:t[e]}},k=function(e){return function(t){return null==e?o:e[t]}},$=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},C=function(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n},A=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},P=function(e){return e?e.slice(0,K(e)+1).replace(We,""):e},T=function(e){return function(t){return e(t)}},I=function(e,t){return v(t,(function(t){return e[t]}))},R=function(e,t){return e.has(t)},L=function(e,t){for(var n=-1,r=e.length;++n<r&&x(t,e[n],0)>-1;);return n},D=function(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n},N=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},M=function(e){return"\\"+zt[e]},U=function(e){return Dt.test(e)},B=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},F=function(e,t){return function(n){return e(t(n))}},z=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==Z||(e[n]=Z,i[o++]=n)}return i},V=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},H=function(e){return U(e)?function(e){for(var t=Rt.lastIndex=0;Rt.test(e);)++t;return t}(e):an(e)},W=function(e){return U(e)?e.match(Rt)||[]:e.split("")},K=function(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},q="Expected a function",G="__lodash_hash_undefined__",Z="__lodash_placeholder__",Y=32,Q=128,J=1/0,X=9007199254740991,ee=NaN,te=4294967295,ne=[["ary",Q],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],re="[object Arguments]",oe="[object Array]",ie="[object Boolean]",ae="[object Date]",ue="[object Error]",ce="[object Function]",se="[object GeneratorFunction]",le="[object Map]",fe="[object Number]",pe="[object Object]",de="[object Promise]",he="[object RegExp]",ve="[object Set]",ye="[object String]",me="[object Symbol]",ge="[object WeakMap]",be="[object ArrayBuffer]",we="[object DataView]",_e="[object Float32Array]",xe="[object Float64Array]",Se="[object Int8Array]",Ee="[object Int16Array]",Oe="[object Int32Array]",je="[object Uint8Array]",ke="[object Uint8ClampedArray]",$e="[object Uint16Array]",Ce="[object Uint32Array]",Ae=/\b__p \+= '';/g,Pe=/\b(__p \+=) '' \+/g,Te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Re=/[&<>"']/g,Le=RegExp(Ie.source),De=RegExp(Re.source),Ne=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Ue=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fe=/^\w*$/,ze=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),We=/^\s+/,Ke=/\s/,qe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ge=/\{\n\/\* \[wrapped with (.+)\] \*/,Ze=/,? & /,Ye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qe=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\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",dt="["+pt+"]",ht="["+st+"]",vt="\\d+",yt="["+lt+"]",mt="[^\ud800-\udfff"+pt+vt+"\\u2700-\\u27bf"+lt+ft+"]",gt="\ud83c[\udffb-\udfff]",bt="[^\ud800-\udfff]",wt="(?:\ud83c[\udde6-\uddff]){2}",_t="[\ud800-\udbff][\udc00-\udfff]",xt="["+ft+"]",St="(?:"+yt+"|"+mt+")",Et="(?:"+xt+"|"+mt+")",Ot="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",kt="(?:"+ht+"|"+gt+")?",$t="[\\ufe0e\\ufe0f]?",Ct=$t+kt+"(?:\\u200d(?:"+[bt,wt,_t].join("|")+")"+$t+kt+")*",At="(?:"+["[\\u2700-\\u27bf]",wt,_t].join("|")+")"+Ct,Pt="(?:"+[bt+ht+"?",ht,wt,_t,"[\ud800-\udfff]"].join("|")+")",Tt=RegExp("['’]","g"),It=RegExp(ht,"g"),Rt=RegExp(gt+"(?="+gt+")|"+Pt+Ct,"g"),Lt=RegExp([xt+"?"+yt+"+"+Ot+"(?="+[dt,xt,"$"].join("|")+")",Et+"+"+jt+"(?="+[dt,xt+St,"$"].join("|")+")",xt+"?"+St+"+"+Ot,xt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,At].join("|"),"g"),Dt=RegExp("[\\u200d\ud800-\udfff"+st+"\\ufe0e\\ufe0f]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Bt={};Bt[_e]=Bt[xe]=Bt[Se]=Bt[Ee]=Bt[Oe]=Bt[je]=Bt[ke]=Bt[$e]=Bt[Ce]=!0,Bt[re]=Bt[oe]=Bt[be]=Bt[ie]=Bt[we]=Bt[ae]=Bt[ue]=Bt[ce]=Bt[le]=Bt[fe]=Bt[pe]=Bt[he]=Bt[ve]=Bt[ye]=Bt[ge]=!1;var Ft={};Ft[re]=Ft[oe]=Ft[be]=Ft[we]=Ft[ie]=Ft[ae]=Ft[_e]=Ft[xe]=Ft[Se]=Ft[Ee]=Ft[Oe]=Ft[le]=Ft[fe]=Ft[pe]=Ft[he]=Ft[ve]=Ft[ye]=Ft[me]=Ft[je]=Ft[ke]=Ft[$e]=Ft[Ce]=!0,Ft[ue]=Ft[ce]=Ft[ge]=!1;var zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),Gt=t&&!t.nodeType&&t,Zt=Gt&&e&&!e.nodeType&&e,Yt=Zt&&Zt.exports===Gt,Qt=Yt&&Wt.process,Jt=function(){try{return Zt&&Zt.require&&Zt.require("util").types||Qt&&Qt.binding&&Qt.binding("util")}catch(e){}}(),Xt=Jt&&Jt.isArrayBuffer,en=Jt&&Jt.isDate,tn=Jt&&Jt.isMap,nn=Jt&&Jt.isRegExp,rn=Jt&&Jt.isSet,on=Jt&&Jt.isTypedArray,an=j("length"),un=k({À:"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"}),cn=k({"&":"&","<":"<",">":">",'"':""","'":"'"}),sn=k({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,r,k=function(e){if(Ao(e)&&!Au(e)&&!c(e,lt)){if(c(e,st))return e;if(bi.call(e,"__wrapped__"))return no(e)}return new st(e)},Ke=function(){},st=function(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o},lt=function(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]},ft=function(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])}},pt=function(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])}},dt=function(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])}},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},vt=function(e){var t=this.__data__=new pt(e);this.size=t.size},yt=function(e,t){var n=Au(e),r=!n&&Cu(e),o=!n&&!r&&Tu(e),i=!n&&!r&&!o&&Nu(e),a=n||r||o||i,u=a?A(e.length,pi):[],c=u.length;for(var s in e)!t&&!bi.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Br(s,c))||u.push(s);return u},mt=function(e){var t=e.length;return t?e[$n(0,t-1)]:o},gt=function(e,t){return Xr(or(e),kt(t,0,e.length))},bt=function(e){return Xr(or(e))},wt=function(e,t,n){(n!==o&&!xo(e[t],n)||n===o&&!(t in e))&&Ot(e,t,n)},_t=function(e,t,n){var r=e[t];bi.call(e,t)&&xo(r,n)&&(n!==o||t in e)||Ot(e,t,n)},xt=function(e,t){for(var n=e.length;n--;)if(xo(e[n][0],t))return n;return-1},St=function(e,t,n,r){return ga(e,(function(e,o,i){t(r,e,n(e),i)})),r},Et=function(e,t){return e&&ir(t,Ho(t),e)},Ot=function(e,t,n){"__proto__"==t&&Ni?Ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},jt=function(e,t){for(var n=-1,r=t.length,i=ii(r),a=null==e;++n<r;)i[n]=a?o:zo(e,t[n]);return i},kt=function(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e},$t=function(e,t,n){var r=n.length;if(null==e)return!r;for(e=li(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0},Ct=function(e,t,n){if("function"!=typeof e)throw new di(q);return Fa((function(){e.apply(o,n)}),t)},At=function(e,t,n,r){var o=-1,i=d,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=v(t,T(n))),r?(i=h,a=!1):t.length>=200&&(i=R,a=!1,t=new ht(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c},Pt=function(e,t){var n=!0;return ga(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Rt=function(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(c===o?u==u&&!Ro(u):n(u,c)))var c=u,s=a}return s},Dt=function(e,t){var n=[];return ga(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n},zt=function(e,t){return e&&_a(e,t,Ho)},Wt=function(e,t){return e&&xa(e,t,Ho)},Kt=function(e,t){return f(t,(function(t){return jo(e[t])}))},Gt=function(e,t){for(var n=0,r=(t=Yn(t,e)).length;null!=e&&n<r;)e=e[eo(t[n++])];return n&&n==r?e:o},Zt=function(e,t,n){var r=t(e);return Au(e)?r:y(r,n(e))},Qt=function(e){return null==e?e===o?"[object Undefined]":"[object Null]":Di&&Di in li(e)?function(e){var t=bi.call(e,Di),n=e[Di];try{e[Di]=o;var r=!0}catch(e){}var i=xi.call(e);return r&&(t?e[Di]=n:delete e[Di]),i}(e):(t=e,xi.call(t));var t},Jt=function(e,t){return e>t},an=function(e,t){return null!=e&&bi.call(e,t)},fn=function(e,t){return null!=e&&t in li(e)},pn=function(e,t,n){for(var r=n?h:d,i=e[0].length,a=e.length,u=a,c=ii(a),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=v(f,T(t))),s=Zi(f.length,s),c[u]=!n&&(t||i>=120&&f.length>=120)?new ht(u&&f):o}f=e[0];var p=-1,y=c[0];e:for(;++p<i&&l.length<s;){var m=f[p],g=t?t(m):m;if(m=n||0!==m?m:0,!(y?R(y,g):r(l,g,n))){for(u=a;--u;){var b=c[u];if(!(b?R(b,g):r(e[u],g,n)))continue e}y&&y.push(g),l.push(m)}}return l},dn=function(e,t,n){var r=null==(e=Gr(e,t=Yn(t,e)))?e:e[eo(uo(t))];return null==r?o:i(r,e,n)},hn=function(e){return Ao(e)&&Qt(e)==re},vn=function(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=li(e);i--;){var c=n[i];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var s=(c=n[i])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===o&&!(s in e))return!1}else{var p=new vt;if(r)var d=r(l,f,s,e,t,p);if(!(d===o?Sa(f,l,3,r,p):d))return!1}}return!0},yn=function(e){return!(!Co(e)||(t=e,_i&&_i in t))&&(jo(e)?Oi:rt).test(to(e));var t},mn=function(e){return"function"==typeof e?e:null==e?Jo:"object"==typeof e?Au(e)?xn(e[0],e[1]):_n(e):ni(e)},gn=function(e){if(!Hr(e))return qi(e);var t=[];for(var n in li(e))bi.call(e,n)&&"constructor"!=n&&t.push(n);return t},bn=function(e,t){return e<t},wn=function(e,t){var n=-1,r=So(e)?ii(e.length):[];return ga(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},_n=function(e){var t=Lr(e);return 1==t.length&&t[0][2]?Kr(t[0][0],t[0][1]):function(n){return n===e||vn(n,e,t)}},xn=function(e,t){return zr(e)&&Wr(t)?Kr(eo(e),t):function(n){var r=zo(n,e);return r===o&&r===t?Vo(n,e):Sa(t,r,3)}},Sn=function(e,t){var n=e.length;if(n)return Br(t+=t<0?n:0,n)?e[t]:o},En=function(e,t,n){t=t.length?v(t,(function(e){return Au(e)?function(t){return Gt(t,1===e.length?e[0]:e)}:e})):[Jo];var r=-1;return t=v(t,T(Ir())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=tr(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(wn(e,(function(e,n,o){return{criteria:v(t,(function(t){return t(e)})),index:++r,value:e}})))},On=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Gt(e,a);n(u,a)&&In(i,Yn(a,e),u)}return i},jn=function(e,t,n,r){var o=r?S:x,i=-1,a=t.length,u=e;for(e===t&&(t=or(t)),n&&(u=v(e,T(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ii.call(u,c,1),Ii.call(e,c,1);return e},kn=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Br(o)?Ii.call(e,o,1):zn(e,o)}}return e},$n=function(e,t){return e+zi(Ji()*(t-e+1))},Cn=function(e,t){var n="";if(!e||t<1||t>X)return n;do{t%2&&(n+=e),(t=zi(t/2))&&(e+=e)}while(t);return n},An=function(e,t){return za(qr(e,t,Jo),e+"")},Pn=function(e){return mt(qo(e))},Tn=function(e,t){var n=qo(e);return Xr(n,kt(t,0,n.length))},In=function(e,t,n,r){if(!Co(e))return e;for(var i=-1,a=(t=Yn(t,e)).length,u=a-1,c=e;null!=c&&++i<a;){var s=eo(t[i]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=u){var f=c[s];(l=r?r(f,s,c):o)===o&&(l=Co(f)?f:Br(t[i+1])?[]:{})}_t(c,s,l),c=c[s]}return e},Rn=function(e){return Xr(qo(e))},Ln=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ii(o);++r<o;)i[r]=e[r+t];return i},Dn=function(e,t){var n;return ga(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Nn=function(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ro(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Mn(e,t,Jo,n)},Mn=function(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,c=null===t,s=Ro(t),l=t===o;i<a;){var f=zi((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,y=Ro(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?i=f+1:a=f}return Zi(a,4294967294)},Un=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!xo(u,c)){var c=u;i[o++]=0===a?0:a}}return i},Bn=function(e){return"number"==typeof e?e:Ro(e)?ee:+e},Fn=function(e,t,n){var r=-1,o=d,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=h;else if(i>=200){var s=t?null:Pa(e);if(s)return V(s);a=!1,o=R,c=new ht}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u},zn=function(e,t){return null==(e=Gr(e,t=Yn(t,e)))||delete e[eo(uo(t))]},Vn=function(e,t,n,r){return In(e,t,n(Gt(e,t)),r)},Hn=function(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Ln(e,r?0:i,r?i+1:o):Ln(e,r?i+1:0,r?o:i)},Wn=function(e,t){var n=e;return c(n,lt)&&(n=n.value()),m(t,(function(e,t){return t.func.apply(t.thisArg,y([e],t.args))}),n)},Kn=function(e,t,n){var r=e.length;if(r<2)return r?Fn(e[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(i[o]=At(i[o]||a,e[u],t,n));return Fn(wa(i,1),t,n)},qn=function(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var c=r<a?t[r]:o;n(u,e[r],c)}return u},Gn=function(e){return Eo(e)?e:[]},Zn=function(e){return"function"==typeof e?e:Jo},Yn=function(e,t){return Au(e)?e:zr(e,t)?[e]:Va(Fo(e))},Qn=function(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:Ln(e,t,n)},Jn=function(e,t){if(t)return e.slice();var n=e.length,r=Ci?Ci(n):new e.constructor(n);return e.copy(r),r},Xn=function(e){var t=new e.constructor(e.byteLength);return new $i(t).set(new $i(e)),t},er=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tr=function(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=Ro(e),u=t!==o,c=null===t,s=t==t,l=Ro(t);if(!c&&!l&&!a&&e>t||a&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||c&&n&&i||!u&&i||!s)return-1}return 0},nr=function(e,t,n,r){for(var o=-1,i=e.length,a=n.length,u=-1,c=t.length,s=Gi(i-a,0),l=ii(c+s),f=!r;++u<c;)l[u]=t[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;s--;)l[u++]=e[o++];return l},rr=function(e,t,n,r){for(var o=-1,i=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Gi(i-u,0),f=ii(l+s),p=!r;++o<l;)f[o]=e[o];for(var d=o;++c<s;)f[d+c]=t[c];for(;++a<u;)(p||o<i)&&(f[d+n[a]]=e[o++]);return f},or=function(e,t){var n=-1,r=e.length;for(t||(t=ii(r));++n<r;)t[n]=e[n];return t},ir=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],s=r?r(n[c],e[c],c,n,e):o;s===o&&(s=e[c]),i?Ot(n,c,s):_t(n,c,s)}return n},ar=function(e,t){return function(n,r){var o=Au(n)?a:St,i=t?t():{};return o(n,e,Ir(r,2),i)}},ur=function(e){return An((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&Fr(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=li(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))},cr=function(e,t){return function(n,r){if(null==n)return n;if(!So(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=li(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},sr=function(e){return function(t,n,r){for(var o=-1,i=li(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}},lr=function(e){return function(t){var n=U(t=Fo(t))?W(t):o,r=n?n[0]:t.charAt(0),i=n?Qn(n,1).join(""):t.slice(1);return r[e]()+i}},fr=function(e){return function(t){return m(Yo(Zo(t).replace(Tt,"")),e,"")}},pr=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ya(e.prototype),r=e.apply(n,t);return Co(r)?r:n}},dr=function(e){return function(t,n,r){var i=li(t);if(!So(t)){var a=Ir(n,3);t=Ho(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}},hr=function(e){return $r((function(t){var n=t.length,r=n,i=st.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new di(q);if(i&&!u&&"wrapper"==Pr(a))var u=new st([],!0)}for(r=u?r:n;++r<n;){var c=Pr(a=t[r]),s="wrapper"==c?Ia(a):o;u=s&&Vr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Pr(s[0])].apply(u,s[3]):1==a.length&&Vr(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Au(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))},vr=function(e,t){return function(n,r){return o=n,i=e,a=t(r),u={},zt(o,(function(e,t,n){i(u,a(e),t,n)})),u;var o,i,a,u}},yr=function(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ka(n),r=ka(r)):(n=Bn(n),r=Bn(r)),i=e(n,r)}return i}},mr=function(e){return $r((function(t){return t=v(t,T(Ir())),An((function(n){var r=this;return e(t,(function(e){return i(e,r,n)}))}))}))},gr=function(e,t){var n=(t=t===o?" ":ka(t)).length;if(n<2)return n?Cn(t,e):t;var r=Cn(t,Fi(e/H(t)));return U(t)?Qn(W(r),0,e).join(""):r.slice(0,e)},br=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Fr(t,n,r)&&(n=r=o),t=Do(t),n===o?(n=t,t=0):n=Do(n),function(e,t,n,r){for(var o=-1,i=Gi(Fi((t-e)/(n||1)),0),a=ii(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=r===o?t<n?1:-1:Do(r),e)}},wr=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Uo(t),n=Uo(n)),e(t,n)}},_r=function(e,t,n,r,i,a,u,c,s,l){var f=8&t;t|=f?Y:64,4&(t&=~(f?64:Y))||(t&=-4);var p=[e,t,i,f?a:o,f?u:o,f?o:a,f?o:u,c,s,l],d=n.apply(o,p);return Vr(e)&&Ba(d,p),d.placeholder=r,Qr(d,e,t)},xr=function(e){var t=si[e];return function(e,n){if(e=Uo(e),(n=null==n?0:Zi(No(n),292))&&Wi(e)){var r=(Fo(e)+"e").split("e");return+((r=(Fo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}},Sr=function(e){return function(t){var n,r,o=Da(t);return o==le?B(t):o==ve?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):(n=t,r=e(t),v(r,(function(e){return[e,n[e]]})))}},Er=function(e,t,n,r,a,u,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new di(q);var p=r?r.length:0;if(p||(t&=-97,r=a=o),s=s===o?s:Gi(No(s),0),l=l===o?l:No(l),p-=a?a.length:0,64&t){var d=r,h=a;r=a=o}var v,y,m,g,b=f?o:Ia(e),w=[e,t,n,r,a,d,h,u,s,l];if(b&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==Q&&8==n||r==Q&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nr(c,u,t[4]):u,e[4]=c?z(e[3],Z):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rr(c,u,t[6]):u,e[6]=c?z(e[5],Z):t[6]),(u=t[7])&&(e[7]=u),r&Q&&(e[8]=null==e[8]?t[8]:Zi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(w,b),e=w[0],t=w[1],n=w[2],r=w[3],a=w[4],!(l=w[9]=w[9]===o?f?0:e.length:Gi(w[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?(y=t,m=l,g=pr(v=e),function e(){for(var t=arguments.length,n=ii(t),r=t,a=Tr(e);r--;)n[r]=arguments[r];var u=t<3&&n[0]!==a&&n[t-1]!==a?[]:z(n,a);return(t-=u.length)<m?_r(v,y,Aa,e.placeholder,o,n,u,o,o,m-t):i(this&&this!==qt&&c(this,e)?g:v,this,n)}):t!=Y&&33!=t||a.length?Aa.apply(o,w):function(e,t,n,r){var o=1&t,a=pr(e);return function t(){for(var u=-1,s=arguments.length,l=-1,f=r.length,p=ii(f+s),d=this&&this!==qt&&c(this,t)?a:e;++l<f;)p[l]=r[l];for(;s--;)p[l++]=arguments[++u];return i(d,o?n:this,p)}}(e,t,n,r);else var _=function(e,t,n){var r=1&t,o=pr(e);return function t(){return(this&&this!==qt&&c(this,t)?o:e).apply(r?n:this,arguments)}}(e,t,n);return Qr((b?Oa:Ba)(_,w),e,t)},Or=function(e,t,n,r){return e===o||xo(e,yi[n])&&!bi.call(r,n)?t:e},jr=function(e){return To(e)?o:e},kr=function(e,t,n,r,i,a){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new ht:o;for(a.set(e,t),a.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==o){if(m)continue;d=!1;break}if(h){if(!b(t,(function(e,t){if(!R(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!i(v,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d},$r=function(e){return za(qr(e,o,io),e+"")},Cr=function(e){return Zt(e,Ho,Ra)},Ar=function(e){return Zt(e,Wo,La)},Pr=function(e){for(var t=e.name+"",n=ua[t],r=bi.call(ua,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t},Tr=function(e){return(bi.call(k,"placeholder")?k:e).placeholder},Ir=function(){var e=k.iteratee||Xo;return e=e===Xo?mn:e,arguments.length?e(arguments[0],arguments[1]):e},Rr=function(e,t){var n,r,o=e.__data__;return("string"==(r=p(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map},Lr=function(e){for(var t=Ho(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Wr(o)]}return t},Dr=function(e,t){var n,r=null==(n=e)?o:n[t];return yn(r)?r:o},Nr=function(e,t,n){for(var r=-1,o=(t=Yn(t,e)).length,i=!1;++r<o;){var a=eo(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&$o(o)&&Br(a,o)&&(Au(e)||Cu(e))},Mr=function(e){return"function"!=typeof e.constructor||Hr(e)?{}:ya(Ai(e))},Ur=function(e){return Au(e)||Cu(e)||!!(Ri&&e&&e[Ri])},Br=function(e,t){var n=void 0===e?"undefined":p(e);return!!(t=null==t?X:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t},Fr=function(e,t,n){if(!Co(n))return!1;var r=void 0===t?"undefined":p(t);return!!("number"==r?So(n)&&Br(t,n.length):"string"==r&&t in n)&&xo(n[t],e)},zr=function(e,t){if(Au(e))return!1;var n=void 0===e?"undefined":p(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ro(e))||Fe.test(e)||!Be.test(e)||null!=t&&e in li(t)},Vr=function(e){var t=Pr(e),n=k[t];if("function"!=typeof n||!(t in lt.prototype))return!1;if(e===n)return!0;var r=Ia(n);return!!r&&e===r[0]},Hr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yi)},Wr=function(e){return e==e&&!Co(e)},Kr=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in li(n))}},qr=function(e,t,n){return t=Gi(t===o?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Gi(r.length-t,0),u=ii(a);++o<a;)u[o]=r[t+o];o=-1;for(var c=ii(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),i(e,this,c)}},Gr=function(e,t){return t.length<2?e:Gt(e,Ln(t,0,-1))},Zr=function(e,t){for(var n=e.length,r=Zi(t.length,n),i=or(e);r--;){var a=t[r];e[r]=Br(a,n)?i[a]:o}return e},Yr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Qr=function(e,t,n){var r,o,i,a=t+"";return za(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(qe,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=(r=a.match(Ge))?r[1].split(Ze):[],i=n,u(ne,(function(e){var t="_."+e[0];i&e[1]&&!d(o,t)&&o.push(t)})),o.sort())))},Jr=function(e){var t=0,n=0;return function(){var r=Yi(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}},Xr=function(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=$n(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e},eo=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},to=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},no=function(e){if(c(e,lt))return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=or(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},ro=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),_(e,Ir(t,3),o)},oo=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=No(n),i=n<0?Gi(r+i,0):Zi(i,r-1)),_(e,Ir(t,3),i,!0)},io=function(e){return null!=e&&e.length?wa(e,1):[]},ao=function(e){return e&&e.length?e[0]:o},uo=function(e){var t=null==e?0:e.length;return t?e[t-1]:o},co=function(e,t){return e&&e.length&&t&&t.length?jn(e,t):e},so=function(e){return null==e?e:Xi.call(e)},lo=function(e){if(!e||!e.length)return[];var t=0;return e=f(e,(function(e){if(Eo(e))return t=Gi(e.length,t),!0})),A(t,(function(t){return v(e,j(t))}))},fo=function(e,t){if(!e||!e.length)return[];var n=lo(e);return null==t?n:v(n,(function(e){return i(t,o,e)}))},po=function(e){var t=k(e);return t.__chain__=!0,t},ho=function(e,t){return t(e)},vo=function(e,t){return(Au(e)?u:ga)(e,Ir(t,3))},yo=function(e,t){return(Au(e)?s:ba)(e,Ir(t,3))},mo=function(e,t){return(Au(e)?v:wn)(e,Ir(t,3))},go=function(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Er(e,Q,o,o,o,o,t)},bo=function(e,t){var n;if("function"!=typeof t)throw new di(q);return e=No(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}},wo=function(e,t,n){var r,i,a,u,c,s,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new di(q);function h(t){var n=r,a=i;return r=i=o,l=t,u=e.apply(a,n)}function v(e){return l=e,c=Fa(m,t),f?h(e):u}function y(e){var n=e-s;return s===o||n>=t||n<0||p&&e-l>=a}function m(){var e,n,r=yu();if(y(r))return g(r);c=Fa(m,(n=t-((e=r)-s),p?Zi(n,a-(e-l)):n))}function g(e){return c=o,d&&r?h(e):(r=i=o,u)}function b(){var e=yu(),n=y(e);if(r=arguments,i=this,s=e,n){if(c===o)return v(s);if(p)return Ca(c),c=Fa(m,t),h(s)}return c===o&&(c=Fa(m,t)),u}return t=Uo(t)||0,Co(n)&&(f=!!n.leading,a=(p="maxWait"in n)?Gi(Uo(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==o&&Ca(c),l=0,r=s=i=c=o},b.flush=function(){return c===o?u:g(yu())},b},_o=function(e){if("function"!=typeof e)throw new di(q);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},xo=function(e,t){return e===t||e!=e&&t!=t},So=function(e){return null!=e&&$o(e.length)&&!jo(e)},Eo=function(e){return Ao(e)&&So(e)},Oo=function(e){if(!Ao(e))return!1;var t=Qt(e);return t==ue||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!To(e)},jo=function(e){if(!Co(e))return!1;var t=Qt(e);return t==ce||t==se||"[object AsyncFunction]"==t||"[object Proxy]"==t},ko=function(e){return"number"==typeof e&&e==No(e)},$o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=X},Co=function(e){var t=void 0===e?"undefined":p(e);return null!=e&&("object"==t||"function"==t)},Ao=function(e){return null!=e&&"object"==typeof e},Po=function(e){return"number"==typeof e||Ao(e)&&Qt(e)==fe},To=function(e){if(!Ao(e)||Qt(e)!=pe)return!1;var t=Ai(e);if(null===t)return!0;var n=bi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&c(n,n)&&gi.call(n)==Si},Io=function(e){return"string"==typeof e||!Au(e)&&Ao(e)&&Qt(e)==ye},Ro=function(e){return"symbol"==(void 0===e?"undefined":p(e))||Ao(e)&&Qt(e)==me},Lo=function(e){if(!e)return[];if(So(e))return Io(e)?W(e):or(e);if(Li&&e[Li])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Li]());var t=Da(e);return(t==le?B:t==ve?V:qo)(e)},Do=function(e){return e?(e=Uo(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},No=function(e){var t=Do(e),n=t%1;return t==t?n?t-n:t:0},Mo=function(e){return e?kt(No(e),0,te):0},Uo=function(e){if("number"==typeof e)return e;if(Ro(e))return ee;if(Co(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Co(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=P(e);var n=nt.test(e);return n||ot.test(e)?Ht(e.slice(2),n?2:8):tt.test(e)?ee:+e},Bo=function(e){return ir(e,Wo(e))},Fo=function(e){return null==e?"":ka(e)},zo=function(e,t,n){var r=null==e?o:Gt(e,t);return r===o?n:r},Vo=function(e,t){return null!=e&&Nr(e,t,fn)},Ho=function(e){return So(e)?yt(e):gn(e)},Wo=function(e){return So(e)?yt(e,!0):function(e){if(!Co(e))return function(e){var t=[];if(null!=e)for(var n in li(e))t.push(n);return t}(e);var t=Hr(e),n=[];for(var r in e)("constructor"!=r||!t&&bi.call(e,r))&&n.push(r);return n}(e)},Ko=function(e,t){if(null==e)return{};var n=v(Ar(e),(function(e){return[e]}));return t=Ir(t),On(e,n,(function(e,n){return t(e,n[0])}))},qo=function(e){return null==e?[]:I(e,Ho(e))},Go=function(e){return sc(Fo(e).toLowerCase())},Zo=function(e){return(e=Fo(e))&&e.replace(at,un).replace(It,"")},Yo=function(e,t,n){return e=Fo(e),(t=n?o:t)===o?(r=e,Nt.test(r)?function(e){return e.match(Lt)||[]}(e):function(e){return e.match(Ye)||[]}(e)):e.match(t)||[];var r},Qo=function(e){return function(){return e}},Jo=function(e){return e},Xo=function(e){return mn("function"==typeof e?e:ma(e,1))},ei=function(e,t,n){var r=Ho(t),o=Kt(t,r);null!=n||Co(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Kt(t,Ho(t)));var i=!(Co(n)&&"chain"in n&&!n.chain),a=jo(e);return u(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,y([this.value()],arguments))})})),e},ti=function(){},ni=function(e){return zr(e)?j(eo(e)):(t=e,function(e){return Gt(e,t)});var t},ri=function(){return[]},oi=function(){return!1},ii=(t=null==t?qt:ln.defaults(qt.Object(),t,ln.pick(qt,Mt))).Array,ai=t.Date,ui=t.Error,ci=t.Function,si=t.Math,li=t.Object,fi=t.RegExp,pi=t.String,di=t.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,mi=t["__core-js_shared__"],gi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xi=yi.toString,Si=gi.call(li),Ei=qt._,Oi=fi("^"+gi.call(bi).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ji=Yt?t.Buffer:o,ki=t.Symbol,$i=t.Uint8Array,Ci=ji?ji.allocUnsafe:o,Ai=F(li.getPrototypeOf,li),Pi=li.create,Ti=yi.propertyIsEnumerable,Ii=hi.splice,Ri=ki?ki.isConcatSpreadable:o,Li=ki?ki.iterator:o,Di=ki?ki.toStringTag:o,Ni=function(){try{var e=Dr(li,"defineProperty");return e({},"",{}),e}catch(e){}}(),Mi=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,Ui=ai&&ai.now!==qt.Date.now&&ai.now,Bi=t.setTimeout!==qt.setTimeout&&t.setTimeout,Fi=si.ceil,zi=si.floor,Vi=li.getOwnPropertySymbols,Hi=ji?ji.isBuffer:o,Wi=t.isFinite,Ki=hi.join,qi=F(li.keys,li),Gi=si.max,Zi=si.min,Yi=ai.now,Qi=t.parseInt,Ji=si.random,Xi=hi.reverse,ea=Dr(t,"DataView"),ta=Dr(t,"Map"),na=Dr(t,"Promise"),ra=Dr(t,"Set"),oa=Dr(t,"WeakMap"),ia=Dr(li,"create"),aa=oa&&new oa,ua={},ca=to(ea),sa=to(ta),la=to(na),fa=to(ra),pa=to(oa),da=ki?ki.prototype:o,ha=da?da.valueOf:o,va=da?da.toString:o,ya=(r=function(){},function(e){if(!Co(e))return{};if(Pi)return Pi(e);r.prototype=e;var t=new r;return r.prototype=o,t});function ma(e,t,n,r,i,a){var c,s=1&t,l=2&t,f=4&t;if(n&&(c=i?n(e,r,i,a):n(e)),c!==o)return c;if(!Co(e))return e;var p,d,h,v=Au(e);if(v){if(d=(p=e).length,h=new p.constructor(d),d&&"string"==typeof p[0]&&bi.call(p,"index")&&(h.index=p.index,h.input=p.input),c=h,!s)return or(e,c)}else{var y=Da(e),m=y==ce||y==se;if(Tu(e))return Jn(e,s);if(y==pe||y==re||m&&!i){if(c=l||m?{}:Mr(e),!s)return l?function(e,t){return ir(e,La(e),t)}(e,function(e,t){return e&&ir(t,Wo(t),e)}(c,e)):function(e,t){return ir(e,Ra(e),t)}(e,Et(c,e))}else{if(!Ft[y])return i?e:{};c=function(e,t,n){var r,o=e.constructor;switch(t){case be:return Xn(e);case ie:case ae:return new o(+e);case we:return function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _e:case xe:case Se:case Ee:case Oe:case je:case ke:case $e:case Ce:return er(e,n);case le:return new o;case fe:case ye:return new o(e);case he:return function(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ve:return new o;case me:return r=e,ha?li(ha.call(r)):{}}}(e,y,s)}}a||(a=new vt);var g=a.get(e);if(g)return g;a.set(e,c),Du(e)?e.forEach((function(r){c.add(ma(r,t,n,r,e,a))})):Ru(e)&&e.forEach((function(r,o){c.set(o,ma(r,t,n,o,e,a))}));var b=v?o:(f?l?Ar:Cr:l?Wo:Ho)(e);return u(b||e,(function(r,o){b&&(r=e[o=r]),_t(c,o,ma(r,t,n,o,e,a))})),c}k.templateSettings={escape:Ne,evaluate:Me,interpolate:Ue,variable:"",imports:{_:k}},(k.prototype=Ke.prototype).constructor=k,st.prototype=ya(Ke.prototype),st.prototype.constructor=st,lt.prototype=ya(Ke.prototype),lt.prototype.constructor=lt,ft.prototype.clear=function(){this.__data__=ia?ia(null):{},this.size=0},ft.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ft.prototype.get=function(e){var t=this.__data__;if(ia){var n=t[e];return n===G?o:n}return bi.call(t,e)?t[e]:o},ft.prototype.has=function(e){var t=this.__data__;return ia?t[e]!==o:bi.call(t,e)},ft.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ia&&t===o?G:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=xt(t,e);return!(n<0||(n==t.length-1?t.pop():Ii.call(t,n,1),--this.size,0))},pt.prototype.get=function(e){var t=this.__data__,n=xt(t,e);return n<0?o:t[n][1]},pt.prototype.has=function(e){return xt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(ta||pt),string:new ft}},dt.prototype.delete=function(e){var t=Rr(this,e).delete(e);return this.size-=t?1:0,t},dt.prototype.get=function(e){return Rr(this,e).get(e)},dt.prototype.has=function(e){return Rr(this,e).has(e)},dt.prototype.set=function(e,t){var n=Rr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ht.prototype.add=ht.prototype.push=function(e){return this.__data__.set(e,G),this},ht.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.clear=function(){this.__data__=new pt,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(c(n,pt)){var r=n.__data__;if(!ta||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(e,t),this.size=n.size,this};var ga=cr(zt),ba=cr(Wt,!0);function wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ur),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?wa(u,t-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var _a=sr(),xa=sr(!0);function Sa(e,t,n,r,i){return e===t||(null==e||null==t||!Ao(e)&&!Ao(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Au(e),s=Au(t),l=u?oe:Da(e),f=s?oe:Da(t),p=(l=l==re?pe:l)==pe,d=(f=f==re?pe:f)==pe,h=l==f;if(h&&Tu(e)){if(!Tu(t))return!1;u=!0,p=!1}if(h&&!p)return a||(a=new vt),u||Nu(e)?kr(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!i(new $i(e),new $i(t)));case ie:case ae:case fe:return xo(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case he:case ye:return e==t+"";case le:var u=B;case ve:var c=1&r;if(u||(u=V),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=kr(u(e),u(t),r,o,i,a);return a.delete(e),l;case me:if(ha)return ha.call(e)==ha.call(t)}return!1}(e,t,l,n,r,i,a);if(!(1&n)){var v=p&&bi.call(e,"__wrapped__"),y=d&&bi.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return a||(a=new vt),i(m,g,n,r,a)}}return!!h&&(a||(a=new vt),function(e,t,n,r,i,a){var u=1&n,s=Cr(e),l=s.length;if(l!=Cr(t).length&&!u)return!1;for(var f=l;f--;){var p=s[f];if(!(u?p in t:bi.call(t,p)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var y=u;++f<l;){var m=e[p=s[f]],g=t[p];if(r)var b=u?r(g,m,p,t,e,a):r(m,g,p,e,t,a);if(!(b===o?m===g||i(m,g,n,r,a):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&c(w,w)&&"function"==typeof _&&c(_,_)||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,r,i,a))}(e,t,n,r,Sa,i))}function Ea(e,t,n,r,i){e!==t&&_a(t,(function(a,u){if(i||(i=new vt),Co(a))!function(e,t,n,r,i,a,u){var c=Yr(e,n),s=Yr(t,n),l=u.get(s);if(l)wt(e,n,l);else{var f=a?a(c,s,n+"",e,t,u):o,p=f===o;if(p){var d=Au(s),h=!d&&Tu(s),v=!d&&!h&&Nu(s);f=s,d||h||v?Au(c)?f=c:Eo(c)?f=or(c):h?(p=!1,f=Jn(s,!0)):v?(p=!1,f=er(s,!0)):f=[]:To(s)||Cu(s)?(f=c,Cu(c)?f=Bo(c):Co(c)&&!jo(c)||(f=Mr(s))):p=!1}p&&(u.set(s,f),i(f,s,r,a,u),u.delete(s)),wt(e,n,f)}}(e,t,u,n,Ea,r,i);else{var c=r?r(Yr(e,u),a,u+"",e,t,i):o;c===o&&(c=a),wt(e,u,c)}}),Wo)}var Oa=aa?function(e,t){return aa.set(e,t),e}:Jo,ja=Ni?function(e,t){return Ni(e,"toString",{configurable:!0,enumerable:!1,value:Qo(t),writable:!0})}:Jo;function ka(e){if("string"==typeof e)return e;if(Au(e))return v(e,ka)+"";if(Ro(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var $a=An,Ca=Mi||function(e){return qt.clearTimeout(e)};function Aa(e,t,n,r,i,a,u,s,l,f){var p=t&Q,d=1&t,h=2&t,v=24&t,y=512&t,m=h?o:pr(e);return function o(){for(var g=arguments.length,b=ii(g),w=g;w--;)b[w]=arguments[w];if(v)var _=Tr(o),x=N(b,_);if(r&&(b=nr(b,r,i,v)),a&&(b=rr(b,a,u,v)),g-=x,v&&g<f){var S=z(b,_);return _r(e,t,Aa,o.placeholder,n,b,S,s,l,f-g)}var E=d?n:this,O=h?E[e]:e;return g=b.length,s?b=Zr(b,s):y&&g>1&&b.reverse(),p&&l<g&&(b.length=l),this&&this!==qt&&c(this,o)&&(O=m||pr(O)),O.apply(E,b)}}var Pa=ra&&1/V(new ra([,-0]))[1]==J?function(e){return new ra(e)}:ti;function Ta(e,t,n,r,i,a){return Co(e)&&Co(t)&&(a.set(t,e),Ea(e,t,o,Ta,a),a.delete(t)),e}var Ia=aa?function(e){return aa.get(e)}:ti,Ra=Vi?function(e){return null==e?[]:(e=li(e),f(Vi(e),(function(t){return Ti.call(e,t)})))}:ri,La=Vi?function(e){for(var t=[];e;)y(t,Ra(e)),e=Ai(e);return t}:ri,Da=Qt;(ea&&Da(new ea(new ArrayBuffer(1)))!=we||ta&&Da(new ta)!=le||na&&Da(na.resolve())!=de||ra&&Da(new ra)!=ve||oa&&Da(new oa)!=ge)&&(Da=function(e){var t=Qt(e),n=t==pe?e.constructor:o,r=n?to(n):"";if(r)switch(r){case ca:return we;case sa:return le;case la:return de;case fa:return ve;case pa:return ge}return t});var Na,Ma,Ua=mi?jo:oi,Ba=Jr(Oa),Fa=Bi||function(e,t){return qt.setTimeout(e,t)},za=Jr(ja),Va=(Na=_u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ze,(function(e,n,r,o){t.push(r?o.replace(Je,"$1"):n||e)})),t}),(function(e){return 500===Ma.size&&Ma.clear(),e})),Ma=Na.cache,Na),Ha=An((function(e,t){return Eo(e)?At(e,wa(t,1,Eo,!0)):[]})),Wa=An((function(e,t){var n=uo(t);return Eo(n)&&(n=o),Eo(e)?At(e,wa(t,1,Eo,!0),Ir(n,2)):[]})),Ka=An((function(e,t){var n=uo(t);return Eo(n)&&(n=o),Eo(e)?At(e,wa(t,1,Eo,!0),o,n):[]})),qa=An((function(e){var t=v(e,Gn);return t.length&&t[0]===e[0]?pn(t):[]})),Ga=An((function(e){var t=uo(e),n=v(e,Gn);return t===uo(n)?t=o:n.pop(),n.length&&n[0]===e[0]?pn(n,Ir(t,2)):[]})),Za=An((function(e){var t=uo(e),n=v(e,Gn);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?pn(n,o,t):[]})),Ya=An(co),Qa=$r((function(e,t){var n=null==e?0:e.length,r=jt(e,t);return kn(e,v(t,(function(e){return Br(e,n)?+e:e})).sort(tr)),r})),Ja=An((function(e){return Fn(wa(e,1,Eo,!0))})),Xa=An((function(e){var t=uo(e);return Eo(t)&&(t=o),Fn(wa(e,1,Eo,!0),Ir(t,2))})),eu=An((function(e){var t=uo(e);return t="function"==typeof t?t:o,Fn(wa(e,1,Eo,!0),o,t)})),tu=An((function(e,t){return Eo(e)?At(e,t):[]})),nu=An((function(e){return Kn(f(e,Eo))})),ru=An((function(e){var t=uo(e);return Eo(t)&&(t=o),Kn(f(e,Eo),Ir(t,2))})),ou=An((function(e){var t=uo(e);return t="function"==typeof t?t:o,Kn(f(e,Eo),o,t)})),iu=An(lo),au=An((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,fo(e,n)})),uu=$r((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return jt(t,e)};return t>1||this.__actions__.length||!c(r,lt)||!Br(n)?this.thru(i):((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:o}),new st(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e})))})),cu=ar((function(e,t,n){bi.call(e,n)?++e[n]:Ot(e,n,1)})),su=dr(ro),lu=dr(oo),fu=ar((function(e,t,n){bi.call(e,n)?e[n].push(t):Ot(e,n,[t])})),pu=An((function(e,t,n){var r=-1,o="function"==typeof t,a=So(e)?ii(e.length):[];return ga(e,(function(e){a[++r]=o?i(t,e,n):dn(e,t,n)})),a})),du=ar((function(e,t,n){Ot(e,n,t)})),hu=ar((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),vu=An((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Fr(e,t[0],t[1])?t=[]:n>2&&Fr(t[0],t[1],t[2])&&(t=[t[0]]),En(e,wa(t,1),[])})),yu=Ui||function(){return qt.Date.now()},mu=An((function(e,t,n){var r=1;if(n.length){var o=z(n,Tr(mu));r|=Y}return Er(e,r,t,n,o)})),gu=An((function(e,t,n){var r=3;if(n.length){var o=z(n,Tr(gu));r|=Y}return Er(t,r,e,n,o)})),bu=An((function(e,t){return Ct(e,1,t)})),wu=An((function(e,t,n){return Ct(e,Uo(t)||0,n)}));function _u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new di(q);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_u.Cache||dt),n}_u.Cache=dt;var xu,Su=$a((function(e,t){var n=(t=1==t.length&&Au(t[0])?v(t[0],T(Ir())):v(wa(t,1),T(Ir()))).length;return An((function(r){for(var o=-1,a=Zi(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return i(e,this,r)}))})),Eu=An((function(e,t){var n=z(t,Tr(Eu));return Er(e,Y,o,t,n)})),Ou=An((function(e,t){var n=z(t,Tr(Ou));return Er(e,64,o,t,n)})),ju=$r((function(e,t){return Er(e,256,o,o,o,t)})),ku=wr(Jt),$u=wr((function(e,t){return e>=t})),Cu=hn(function(){return arguments}())?hn:function(e){return Ao(e)&&bi.call(e,"callee")&&!Ti.call(e,"callee")},Au=ii.isArray,Pu=Xt?T(Xt):function(e){return Ao(e)&&Qt(e)==be},Tu=Hi||oi,Iu=en?T(en):function(e){return Ao(e)&&Qt(e)==ae},Ru=tn?T(tn):function(e){return Ao(e)&&Da(e)==le},Lu=nn?T(nn):function(e){return Ao(e)&&Qt(e)==he},Du=rn?T(rn):function(e){return Ao(e)&&Da(e)==ve},Nu=on?T(on):function(e){return Ao(e)&&$o(e.length)&&!!Bt[Qt(e)]},Mu=wr(bn),Uu=wr((function(e,t){return e<=t})),Bu=ur((function(e,t){if(Hr(t)||So(t))ir(t,Ho(t),e);else for(var n in t)bi.call(t,n)&&_t(e,n,t[n])})),Fu=ur((function(e,t){ir(t,Wo(t),e)})),zu=ur((function(e,t,n,r){ir(t,Wo(t),e,r)})),Vu=ur((function(e,t,n,r){ir(t,Ho(t),e,r)})),Hu=$r(jt),Wu=An((function(e,t){e=li(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&Fr(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Wo(a),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===o||xo(f,yi[l])&&!bi.call(e,l))&&(e[l]=a[l])}return e})),Ku=An((function(e){return e.push(o,Ta),i(Qu,o,e)})),qu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),e[t]=n}),Qo(Jo)),Gu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),bi.call(e,t)?e[t].push(n):e[t]=[n]}),Ir),Zu=An(dn),Yu=ur((function(e,t,n){Ea(e,t,n)})),Qu=ur((function(e,t,n,r){Ea(e,t,n,r)})),Ju=$r((function(e,t){var n={};if(null==e)return n;var r=!1;t=v(t,(function(t){return t=Yn(t,e),r||(r=t.length>1),t})),ir(e,Ar(e),n),r&&(n=ma(n,7,jr));for(var o=t.length;o--;)zn(n,t[o]);return n})),Xu=$r((function(e,t){return null==e?{}:On(n=e,t,(function(e,t){return Vo(n,t)}));var n})),ec=Sr(Ho),tc=Sr(Wo),nc=fr((function(e,t,n){return t=t.toLowerCase(),e+(n?Go(t):t)})),rc=fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),oc=fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ic=lr("toLowerCase"),ac=fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),uc=fr((function(e,t,n){return e+(n?" ":"")+sc(t)})),cc=fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),sc=lr("toUpperCase"),lc=An((function(e,t){try{return i(e,o,t)}catch(e){return Oo(e)?e:new ui(e)}})),fc=$r((function(e,t){return u(t,(function(t){t=eo(t),Ot(e,t,mu(e[t],e))})),e})),pc=hr(),dc=hr(!0),hc=An((function(e,t){return function(n){return dn(n,e,t)}})),vc=An((function(e,t){return function(n){return dn(e,n,t)}})),yc=mr(v),mc=mr(l),gc=mr(b),bc=br(),wc=br(!0),_c=yr((function(e,t){return e+t}),0),xc=xr("ceil"),Sc=yr((function(e,t){return e/t}),1),Ec=xr("floor"),Oc=yr((function(e,t){return e*t}),1),jc=xr("round"),kc=yr((function(e,t){return e-t}),0);return k.after=function(e,t){if("function"!=typeof t)throw new di(q);return e=No(e),function(){if(--e<1)return t.apply(this,arguments)}},k.ary=go,k.assign=Bu,k.assignIn=Fu,k.assignInWith=zu,k.assignWith=Vu,k.at=Hu,k.before=bo,k.bind=mu,k.bindAll=fc,k.bindKey=gu,k.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Au(e)?e:[e]},k.chain=po,k.chunk=function(e,t,n){t=(n?Fr(e,t,n):t===o)?1:Gi(No(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,u=ii(Fi(r/t));i<r;)u[a++]=Ln(e,i,i+=t);return u},k.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},k.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ii(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return y(Au(n)?or(n):[n],wa(t,1))},k.cond=function(e){var t=null==e?0:e.length,n=Ir();return e=t?v(e,(function(e){if("function"!=typeof e[1])throw new di(q);return[n(e[0]),e[1]]})):[],An((function(n){for(var r=-1;++r<t;){var o=e[r];if(i(o[0],this,n))return i(o[1],this,n)}}))},k.conforms=function(e){return t=ma(e,1),n=Ho(t),function(e){return $t(e,t,n)};var t,n},k.constant=Qo,k.countBy=cu,k.create=function(e,t){var n=ya(e);return null==t?n:Et(n,t)},k.curry=function e(t,n,r){var i=Er(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},k.curryRight=function e(t,n,r){var i=Er(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},k.debounce=wo,k.defaults=Wu,k.defaultsDeep=Ku,k.defer=bu,k.delay=wu,k.difference=Ha,k.differenceBy=Wa,k.differenceWith=Ka,k.drop=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,(t=n||t===o?1:No(t))<0?0:t,r):[]},k.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,0,(t=r-(t=n||t===o?1:No(t)))<0?0:t):[]},k.dropRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0,!0):[]},k.dropWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0):[]},k.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Fr(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=No(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:No(r))<0&&(r+=i),r=n>r?0:Mo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},k.filter=function(e,t){return(Au(e)?f:Dt)(e,Ir(t,3))},k.flatMap=function(e,t){return wa(mo(e,t),1)},k.flatMapDeep=function(e,t){return wa(mo(e,t),J)},k.flatMapDepth=function(e,t,n){return n=n===o?1:No(n),wa(mo(e,t),n)},k.flatten=io,k.flattenDeep=function(e){return null!=e&&e.length?wa(e,J):[]},k.flattenDepth=function(e,t){return null!=e&&e.length?wa(e,t=t===o?1:No(t)):[]},k.flip=function(e){return Er(e,512)},k.flow=pc,k.flowRight=dc,k.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},k.functions=function(e){return null==e?[]:Kt(e,Ho(e))},k.functionsIn=function(e){return null==e?[]:Kt(e,Wo(e))},k.groupBy=fu,k.initial=function(e){return null!=e&&e.length?Ln(e,0,-1):[]},k.intersection=qa,k.intersectionBy=Ga,k.intersectionWith=Za,k.invert=qu,k.invertBy=Gu,k.invokeMap=pu,k.iteratee=Xo,k.keyBy=du,k.keys=Ho,k.keysIn=Wo,k.map=mo,k.mapKeys=function(e,t){var n={};return t=Ir(t,3),zt(e,(function(e,r,o){Ot(n,t(e,r,o),e)})),n},k.mapValues=function(e,t){var n={};return t=Ir(t,3),zt(e,(function(e,r,o){Ot(n,r,t(e,r,o))})),n},k.matches=function(e){return _n(ma(e,1))},k.matchesProperty=function(e,t){return xn(e,ma(t,1))},k.memoize=_u,k.merge=Yu,k.mergeWith=Qu,k.method=hc,k.methodOf=vc,k.mixin=ei,k.negate=_o,k.nthArg=function(e){return e=No(e),An((function(t){return Sn(t,e)}))},k.omit=Ju,k.omitBy=function(e,t){return Ko(e,_o(Ir(t)))},k.once=function(e){return bo(2,e)},k.orderBy=function(e,t,n,r){return null==e?[]:(Au(t)||(t=null==t?[]:[t]),Au(n=r?o:n)||(n=null==n?[]:[n]),En(e,t,n))},k.over=yc,k.overArgs=Su,k.overEvery=mc,k.overSome=gc,k.partial=Eu,k.partialRight=Ou,k.partition=hu,k.pick=Xu,k.pickBy=Ko,k.property=ni,k.propertyOf=function(e){return function(t){return null==e?o:Gt(e,t)}},k.pull=Ya,k.pullAll=co,k.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?jn(e,t,Ir(n,2)):e},k.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?jn(e,t,o,n):e},k.pullAt=Qa,k.range=bc,k.rangeRight=wc,k.rearg=ju,k.reject=function(e,t){return(Au(e)?f:Dt)(e,_o(Ir(t,3)))},k.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ir(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return kn(e,o),n},k.rest=function(e,t){if("function"!=typeof e)throw new di(q);return An(e,t=t===o?t:No(t))},k.reverse=so,k.sampleSize=function(e,t,n){return t=(n?Fr(e,t,n):t===o)?1:No(t),(Au(e)?gt:Tn)(e,t)},k.set=function(e,t,n){return null==e?e:In(e,t,n)},k.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:In(e,t,n,r)},k.shuffle=function(e){return(Au(e)?bt:Rn)(e)},k.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Fr(e,t,n)?(t=0,n=r):(t=null==t?0:No(t),n=n===o?r:No(n)),Ln(e,t,n)):[]},k.sortBy=vu,k.sortedUniq=function(e){return e&&e.length?Un(e):[]},k.sortedUniqBy=function(e,t){return e&&e.length?Un(e,Ir(t,2)):[]},k.split=function(e,t,n){return n&&"number"!=typeof n&&Fr(e,t,n)&&(t=n=o),(n=n===o?te:n>>>0)?(e=Fo(e))&&("string"==typeof t||null!=t&&!Lu(t))&&!(t=ka(t))&&U(e)?Qn(W(e),0,n):e.split(t,n):[]},k.spread=function(e,t){if("function"!=typeof e)throw new di(q);return t=null==t?0:Gi(No(t),0),An((function(n){var r=n[t],o=Qn(n,0,t);return r&&y(o,r),i(e,this,o)}))},k.tail=function(e){var t=null==e?0:e.length;return t?Ln(e,1,t):[]},k.take=function(e,t,n){return e&&e.length?Ln(e,0,(t=n||t===o?1:No(t))<0?0:t):[]},k.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,(t=r-(t=n||t===o?1:No(t)))<0?0:t,r):[]},k.takeRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!1,!0):[]},k.takeWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3)):[]},k.tap=function(e,t){return t(e),e},k.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new di(q);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(e,t,{leading:r,maxWait:t,trailing:o})},k.thru=ho,k.toArray=Lo,k.toPairs=ec,k.toPairsIn=tc,k.toPath=function(e){return Au(e)?v(e,eo):Ro(e)?[e]:or(Va(Fo(e)))},k.toPlainObject=Bo,k.transform=function(e,t,n){var r=Au(e),o=r||Tu(e)||Nu(e);if(t=Ir(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Co(e)&&jo(i)?ya(Ai(e)):{}}return(o?u:zt)(e,(function(e,r,o){return t(n,e,r,o)})),n},k.unary=function(e){return go(e,1)},k.union=Ja,k.unionBy=Xa,k.unionWith=eu,k.uniq=function(e){return e&&e.length?Fn(e):[]},k.uniqBy=function(e,t){return e&&e.length?Fn(e,Ir(t,2)):[]},k.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Fn(e,o,t):[]},k.unset=function(e,t){return null==e||zn(e,t)},k.unzip=lo,k.unzipWith=fo,k.update=function(e,t,n){return null==e?e:Vn(e,t,Zn(n))},k.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Vn(e,t,Zn(n),r)},k.values=qo,k.valuesIn=function(e){return null==e?[]:I(e,Wo(e))},k.without=tu,k.words=Yo,k.wrap=function(e,t){return Eu(Zn(t),e)},k.xor=nu,k.xorBy=ru,k.xorWith=ou,k.zip=iu,k.zipObject=function(e,t){return qn(e||[],t||[],_t)},k.zipObjectDeep=function(e,t){return qn(e||[],t||[],In)},k.zipWith=au,k.entries=ec,k.entriesIn=tc,k.extend=Fu,k.extendWith=zu,ei(k,k),k.add=_c,k.attempt=lc,k.camelCase=nc,k.capitalize=Go,k.ceil=xc,k.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Uo(n))==n?n:0),t!==o&&(t=(t=Uo(t))==t?t:0),kt(Uo(e),t,n)},k.clone=function(e){return ma(e,4)},k.cloneDeep=function(e){return ma(e,5)},k.cloneDeepWith=function(e,t){return ma(e,5,t="function"==typeof t?t:o)},k.cloneWith=function(e,t){return ma(e,4,t="function"==typeof t?t:o)},k.conformsTo=function(e,t){return null==t||$t(e,t,Ho(t))},k.deburr=Zo,k.defaultTo=function(e,t){return null==e||e!=e?t:e},k.divide=Sc,k.endsWith=function(e,t,n){e=Fo(e),t=ka(t);var r=e.length,i=n=n===o?r:kt(No(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},k.eq=xo,k.escape=function(e){return(e=Fo(e))&&De.test(e)?e.replace(Re,cn):e},k.escapeRegExp=function(e){return(e=Fo(e))&&He.test(e)?e.replace(Ve,"\\$&"):e},k.every=function(e,t,n){var r=Au(e)?l:Pt;return n&&Fr(e,t,n)&&(t=o),r(e,Ir(t,3))},k.find=su,k.findIndex=ro,k.findKey=function(e,t){return w(e,Ir(t,3),zt)},k.findLast=lu,k.findLastIndex=oo,k.findLastKey=function(e,t){return w(e,Ir(t,3),Wt)},k.floor=Ec,k.forEach=vo,k.forEachRight=yo,k.forIn=function(e,t){return null==e?e:_a(e,Ir(t,3),Wo)},k.forInRight=function(e,t){return null==e?e:xa(e,Ir(t,3),Wo)},k.forOwn=function(e,t){return e&&zt(e,Ir(t,3))},k.forOwnRight=function(e,t){return e&&Wt(e,Ir(t,3))},k.get=zo,k.gt=ku,k.gte=$u,k.has=function(e,t){return null!=e&&Nr(e,t,an)},k.hasIn=Vo,k.head=ao,k.identity=Jo,k.includes=function(e,t,n,r){e=So(e)?e:qo(e),n=n&&!r?No(n):0;var o=e.length;return n<0&&(n=Gi(o+n,0)),Io(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&x(e,t,n)>-1},k.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),x(e,t,o)},k.inRange=function(e,t,n){return t=Do(t),n===o?(n=t,t=0):n=Do(n),(r=e=Uo(e))>=Zi(i=t,a=n)&&r<Gi(i,a);var r,i,a},k.invoke=Zu,k.isArguments=Cu,k.isArray=Au,k.isArrayBuffer=Pu,k.isArrayLike=So,k.isArrayLikeObject=Eo,k.isBoolean=function(e){return!0===e||!1===e||Ao(e)&&Qt(e)==ie},k.isBuffer=Tu,k.isDate=Iu,k.isElement=function(e){return Ao(e)&&1===e.nodeType&&!To(e)},k.isEmpty=function(e){if(null==e)return!0;if(So(e)&&(Au(e)||"string"==typeof e||"function"==typeof e.splice||Tu(e)||Nu(e)||Cu(e)))return!e.length;var t=Da(e);if(t==le||t==ve)return!e.size;if(Hr(e))return!gn(e).length;for(var n in e)if(bi.call(e,n))return!1;return!0},k.isEqual=function(e,t){return Sa(e,t)},k.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Sa(e,t,o,n):!!r},k.isError=Oo,k.isFinite=function(e){return"number"==typeof e&&Wi(e)},k.isFunction=jo,k.isInteger=ko,k.isLength=$o,k.isMap=Ru,k.isMatch=function(e,t){return e===t||vn(e,t,Lr(t))},k.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,vn(e,t,Lr(t),n)},k.isNaN=function(e){return Po(e)&&e!=+e},k.isNative=function(e){if(Ua(e))throw new ui("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(e)},k.isNil=function(e){return null==e},k.isNull=function(e){return null===e},k.isNumber=Po,k.isObject=Co,k.isObjectLike=Ao,k.isPlainObject=To,k.isRegExp=Lu,k.isSafeInteger=function(e){return ko(e)&&e>=-9007199254740991&&e<=X},k.isSet=Du,k.isString=Io,k.isSymbol=Ro,k.isTypedArray=Nu,k.isUndefined=function(e){return e===o},k.isWeakMap=function(e){return Ao(e)&&Da(e)==ge},k.isWeakSet=function(e){return Ao(e)&&"[object WeakSet]"==Qt(e)},k.join=function(e,t){return null==e?"":Ki.call(e,t)},k.kebabCase=rc,k.last=uo,k.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=No(n))<0?Gi(r+i,0):Zi(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):_(e,E,i,!0)},k.lowerCase=oc,k.lowerFirst=ic,k.lt=Mu,k.lte=Uu,k.max=function(e){return e&&e.length?Rt(e,Jo,Jt):o},k.maxBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),Jt):o},k.mean=function(e){return O(e,Jo)},k.meanBy=function(e,t){return O(e,Ir(t,2))},k.min=function(e){return e&&e.length?Rt(e,Jo,bn):o},k.minBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),bn):o},k.stubArray=ri,k.stubFalse=oi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Oc,k.nth=function(e,t){return e&&e.length?Sn(e,No(t)):o},k.noConflict=function(){return qt._===this&&(qt._=Ei),this},k.noop=ti,k.now=yu,k.pad=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return gr(zi(o),n)+e+gr(Fi(o),n)},k.padEnd=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;return t&&r<t?e+gr(t-r,n):e},k.padStart=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;return t&&r<t?gr(t-r,n)+e:e},k.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Qi(Fo(e).replace(We,""),t||0)},k.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Fr(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=Do(e),t===o?(t=e,e=0):t=Do(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Ji();return Zi(e+i*(t-e+Vt("1e-"+((i+"").length-1))),t)}return $n(e,t)},k.reduce=function(e,t,n){var r=Au(e)?m:$,o=arguments.length<3;return r(e,Ir(t,4),n,o,ga)},k.reduceRight=function(e,t,n){var r=Au(e)?g:$,o=arguments.length<3;return r(e,Ir(t,4),n,o,ba)},k.repeat=function(e,t,n){return t=(n?Fr(e,t,n):t===o)?1:No(t),Cn(Fo(e),t)},k.replace=function(){var e=arguments,t=Fo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},k.result=function(e,t,n){var r=-1,i=(t=Yn(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[eo(t[r])];a===o&&(r=i,a=n),e=jo(a)?a.call(e):a}return e},k.round=jc,k.runInContext=e,k.sample=function(e){return(Au(e)?mt:Pn)(e)},k.size=function(e){if(null==e)return 0;if(So(e))return Io(e)?H(e):e.length;var t=Da(e);return t==le||t==ve?e.size:gn(e).length},k.snakeCase=ac,k.some=function(e,t,n){var r=Au(e)?b:Dn;return n&&Fr(e,t,n)&&(t=o),r(e,Ir(t,3))},k.sortedIndex=function(e,t){return Nn(e,t)},k.sortedIndexBy=function(e,t,n){return Mn(e,t,Ir(n,2))},k.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Nn(e,t);if(r<n&&xo(e[r],t))return r}return-1},k.sortedLastIndex=function(e,t){return Nn(e,t,!0)},k.sortedLastIndexBy=function(e,t,n){return Mn(e,t,Ir(n,2),!0)},k.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Nn(e,t,!0)-1;if(xo(e[n],t))return n}return-1},k.startCase=uc,k.startsWith=function(e,t,n){return e=Fo(e),n=null==n?0:kt(No(n),0,e.length),t=ka(t),e.slice(n,n+t.length)==t},k.subtract=kc,k.sum=function(e){return e&&e.length?C(e,Jo):0},k.sumBy=function(e,t){return e&&e.length?C(e,Ir(t,2)):0},k.template=function(e,t,n){var r=k.templateSettings;n&&Fr(e,t,n)&&(t=o),e=Fo(e),t=zu({},t,r,Or);var i,a,u=zu({},t.imports,r.imports,Or),c=Ho(u),s=I(u,c),l=0,f=t.interpolate||ut,p="__p += '",d=fi((t.escape||ut).source+"|"+f.source+"|"+(f===Ue?Xe:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),h="//# sourceURL="+(bi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";e.replace(d,(function(t,n,r,o,u,c){return r||(r=o),p+=e.slice(l,c).replace(ct,M),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=bi.call(t,"variable")&&t.variable;if(v){if(Qe.test(v))throw new ui("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(Ae,""):p).replace(Pe,"$1").replace(Te,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+p).apply(o,s)}));if(y.source=p,Oo(y))throw y;return y},k.times=function(e,t){if((e=No(e))<1||e>X)return[];var n=te,r=Zi(e,te);t=Ir(t),e-=te;for(var o=A(r,t);++n<e;)t(n);return o},k.toFinite=Do,k.toInteger=No,k.toLength=Mo,k.toLower=function(e){return Fo(e).toLowerCase()},k.toNumber=Uo,k.toSafeInteger=function(e){return e?kt(No(e),-9007199254740991,X):0===e?e:0},k.toString=Fo,k.toUpper=function(e){return Fo(e).toUpperCase()},k.trim=function(e,t,n){if((e=Fo(e))&&(n||t===o))return P(e);if(!e||!(t=ka(t)))return e;var r=W(e),i=W(t);return Qn(r,L(r,i),D(r,i)+1).join("")},k.trimEnd=function(e,t,n){if((e=Fo(e))&&(n||t===o))return e.slice(0,K(e)+1);if(!e||!(t=ka(t)))return e;var r=W(e);return Qn(r,0,D(r,W(t))+1).join("")},k.trimStart=function(e,t,n){if((e=Fo(e))&&(n||t===o))return e.replace(We,"");if(!e||!(t=ka(t)))return e;var r=W(e);return Qn(r,L(r,W(t))).join("")},k.truncate=function(e,t){var n=30,r="...";if(Co(t)){var i="separator"in t?t.separator:i;n="length"in t?No(t.length):n,r="omission"in t?ka(t.omission):r}var a=(e=Fo(e)).length;if(U(e)){var u=W(e);a=u.length}if(n>=a)return e;var c=n-H(r);if(c<1)return r;var s=u?Qn(u,0,c).join(""):e.slice(0,c);if(i===o)return s+r;if(u&&(c+=s.length-c),Lu(i)){if(e.slice(c).search(i)){var l,f=s;for(i.global||(i=fi(i.source,Fo(et.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;s=s.slice(0,p===o?c:p)}}else if(e.indexOf(ka(i),c)!=c){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+r},k.unescape=function(e){return(e=Fo(e))&&Le.test(e)?e.replace(Ie,sn):e},k.uniqueId=function(e){var t=++wi;return Fo(e)+t},k.upperCase=cc,k.upperFirst=sc,k.each=vo,k.eachRight=yo,k.first=ao,ei(k,(xu={},zt(k,(function(e,t){bi.call(k.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),k.VERSION="4.17.21",u(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){k[e].placeholder=k})),u(["drop","take"],(function(e,t){lt.prototype[e]=function(n){n=n===o?1:Gi(No(n),0);var r=this.__filtered__&&!t?new lt(this):this.clone();return r.__filtered__?r.__takeCount__=Zi(n,r.__takeCount__):r.__views__.push({size:Zi(n,te),type:e+(r.__dir__<0?"Right":"")}),r},lt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),u(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;lt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ir(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),u(["head","last"],(function(e,t){var n="take"+(t?"Right":"");lt.prototype[e]=function(){return this[n](1).value()[0]}})),u(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");lt.prototype[e]=function(){return this.__filtered__?new lt(this):this[n](1)}})),lt.prototype.compact=function(){return this.filter(Jo)},lt.prototype.find=function(e){return this.filter(e).head()},lt.prototype.findLast=function(e){return this.reverse().find(e)},lt.prototype.invokeMap=An((function(e,t){return"function"==typeof e?new lt(this):this.map((function(n){return dn(n,e,t)}))})),lt.prototype.reject=function(e){return this.filter(_o(Ir(e)))},lt.prototype.slice=function(e,t){e=No(e);var n=this;return n.__filtered__&&(e>0||t<0)?new lt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=No(t))<0?n.dropRight(-t):n.take(t-e)),n)},lt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},lt.prototype.toArray=function(){return this.take(te)},zt(lt.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=k[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(k.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=c(t,lt),l=u[0],f=s||Au(t),p=function(e){var t=i.apply(k,y([e],u));return r&&d?t[0]:t};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,h=!!this.__actions__.length,v=a&&!d,m=s&&!h;if(!a&&f){t=m?t:new lt(this);var g=e.apply(t,u);return g.__actions__.push({func:ho,args:[p],thisArg:o}),new st(g,d)}return v&&m?e.apply(this,u):(g=this.thru(p),v?r?g.value()[0]:g.value():g)})})),u(["pop","push","shift","sort","splice","unshift"],(function(e){var t=hi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);k.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Au(o)?o:[],e)}return this[n]((function(n){return t.apply(Au(n)?n:[],e)}))}})),zt(lt.prototype,(function(e,t){var n=k[t];if(n){var r=n.name+"";bi.call(ua,r)||(ua[r]=[]),ua[r].push({name:t,func:n})}})),ua[Aa(o,2).name]=[{name:"wrapper",func:o}],lt.prototype.clone=function(){var e=new lt(this.__wrapped__);return e.__actions__=or(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=or(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=or(this.__views__),e},lt.prototype.reverse=function(){if(this.__filtered__){var e=new lt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},lt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Au(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Zi(t,e+a);break;case"takeRight":e=Gi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=Zi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Wn(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},k.prototype.at=uu,k.prototype.chain=function(){return po(this)},k.prototype.commit=function(){return new st(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===o&&(this.__values__=Lo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},k.prototype.plant=function(e){for(var t,n=this;c(n,Ke);){var r=no(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},k.prototype.reverse=function(){var e=this.__wrapped__;if(c(e,lt)){var t=e;return this.__actions__.length&&(t=new lt(this)),(t=t.reverse()).__actions__.push({func:ho,args:[so],thisArg:o}),new st(t,this.__chain__)}return this.thru(so)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Li&&(k.prototype[Li]=function(){return this}),k}();qt._=ln,(r=function(){return ln}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var c=0;c<u;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=e?o.clone(s[l]):s[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:function(e){"use strict";var t=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)},n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,c=t(e),s=1;s<arguments.length;s++){for(var l in a=Object(arguments[s]))r.call(a,l)&&(c[l]=a[l]);if(n){u=n(a);for(var f=0;f<u.length;f++)o.call(a,u[f])&&(c[u[f]]=a[u[f]])}}return c}},459:function(e,t,n){"use strict";var r=function(){},o=function(){},i=n(5704);o.resetWarningCache=r,e.exports=function(){var e=function(e,t,n,r,o,a){if(a!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}},t=function(){return e};e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},216:function(e,t,n){e.exports=n(459)()},5704:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3975:function(e,t,n){"use strict";var r=function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."},o=function(e,t,n,r,o,i,a,u,c){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}},i=function(e,t,n,r,i,a,u,c,s){wo=!1,_o=null,o.apply(Eo,arguments)},a=function(e,t,n){var o=e.type||"unknown-event";e.currentTarget=ko(n),function(e,t,n,o,a,u,c,s,l){if(i.apply(this,arguments),wo){if(!wo)throw Error(r(198));var f=_o;wo=!1,_o=null,xo||(xo=!0,So=f)}}(o,t,void 0,e),e.currentTarget=null},u=function(){if($o)for(var e in Co){var t=Co[e],n=$o.indexOf(e);if(!(-1<n))throw Error(r(96,e));if(!Ao[n]){if(!t.extractEvents)throw Error(r(97,e));for(var o in Ao[n]=t,n=t.eventTypes){var i=void 0,a=n[o],u=t,c=o;if(Po.hasOwnProperty(c))throw Error(r(99,c));Po[c]=a;var l=a.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&s(l[i],u,c);i=!0}else a.registrationName?(s(a.registrationName,u,c),i=!0):i=!1;if(!i)throw Error(r(98,o,e))}}}},s=function(e,t,n){if(To[e])throw Error(r(100,e));To[e]=t,Io[e]=t.eventTypes[n].dependencies},l=function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];if(!Co.hasOwnProperty(t)||Co[t]!==o){if(Co[t])throw Error(r(102,t));Co[t]=o,n=!0}}n&&u()},f=function(e){if(e=jo(e)){if("function"!=typeof Lo)throw Error(r(280));var t=e.stateNode;t&&(t=Oo(t),Lo(e.stateNode,e.type,t))}},d=function(e){Do?No?No.push(e):No=[e]:Do=e},h=function(){if(Do){var e=Do,t=No;if(No=Do=null,f(e),t)for(e=0;e<t.length;e++)f(t[e])}},v=function(e,t){return e(t)},y=function(e,t,n,r,o){return e(t,n,r,o)},m=function(){},g=function(){null===Do&&null===No||(m(),h())},b=function(e,t,n){if(Bo)return e(t,n);Bo=!0;try{return Mo(e,t,n)}finally{Bo=!1,g()}},w=function(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i},_=function(e){return e[1].toUpperCase()},x=function(e,t,n,r){var o,i=Wo.hasOwnProperty(t)?Wo[t]:null;(null!==i?0===i.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(void 0===t?"undefined":p(t)){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?(o=t,(zo.call(Ho,o)||!zo.call(Vo,o)&&(Fo.test(o)?Ho[o]=!0:(Vo[o]=!0,0)))&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n))):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))},S=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=li&&e[li]||e["@@iterator"])?e:null},E=function(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=fi(e.type);n=null,r&&(n=fi(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Go,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t},O=function(e){switch(void 0===e?"undefined":p(e)){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}},j=function(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)},k=function(e){e._valueTracker||(e._valueTracker=function(e){var t=j(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))},$=function(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=j(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)},C=function(e,t){var n=t.checked;return go({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})},A=function(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=O(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}},P=function(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)},T=function(e,t){P(e,t);var n=O(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?R(e,t.type,n):t.hasOwnProperty("defaultValue")&&R(e,t.type,O(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)},I=function(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)},R=function(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))},L=function(e,t){return e=go({children:void 0},t),n=t.children,r="",mo.Children.forEach(n,(function(e){null!=e&&(r+=e)})),(t=r)&&(e.children=t),e;var n,r},D=function(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+O(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}},N=function(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return go({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})},M=function(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:O(n)}},U=function(e,t){var n=O(t.value),r=O(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)},B=function(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)},F=function(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}},z=function(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?F(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e},V=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t},H=function(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n},W=function(e){if(yi[e])return yi[e];if(!vi[e])return e;var t,n=vi[e];for(t in n)if(n.hasOwnProperty(t)&&t in mi)return yi[e]=n[t];return e},K=function(e){var t=ji.get(e);return void 0===t&&(t=new Map,ji.set(e,t)),t},q=function(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null},G=function(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null},Z=function(e){if(q(e)!==e)throw Error(r(188))},Y=function(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=q(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Z(i),e;if(a===o)return Z(i),t;a=a.sibling}throw Error(r(188))}if(n.return!==o.return)n=i,o=a;else{for(var u=!1,c=i.child;c;){if(c===n){u=!0,n=i,o=a;break}if(c===o){u=!0,o=i,n=a;break}c=c.sibling}if(!u){for(c=a.child;c;){if(c===n){u=!0,n=a,o=i;break}if(c===o){u=!0,o=a,n=i;break}c=c.sibling}if(!u)throw Error(r(189))}}if(n.alternate!==o)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null},Q=function(e,t){if(null==t)throw Error(r(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]},J=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)},X=function(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)a(e,t[r],n[r]);else t&&a(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}},ee=function(e){if(null!==e&&(ki=Q(ki,e)),e=ki,ki=null,e){if(J(e,X),ki)throw Error(r(95));if(xo)throw e=So,xo=!1,So=null,e}},te=function(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e},ne=function(e){if(!Ro)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t},re=function(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>$i.length&&$i.push(e)},oe=function(e,t,n,r){if($i.length){var o=$i.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}},ie=function(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Me(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=te(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var u=null,c=0;c<Ao.length;c++){var s=Ao[c];s&&(s=s.extractEvents(r,t,i,o,a))&&(u=Q(u,s))}ee(u)}},ae=function(e,t,n){if(!n.has(e)){switch(e){case"scroll":ge(t,"scroll",!0);break;case"focus":case"blur":ge(t,"focus",!0),ge(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ne(e)&&ge(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Oi.indexOf(e)&&me(e,t)}n.set(e,null)}},ue=function(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}},ce=function(e,t){switch(e){case"focus":case"blur":Pi=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":Ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Li.delete(t.pointerId)}},se=function(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ue(t,n,r,o,i),null!==t&&null!==(t=Ue(t))&&bi(t),e):(e.eventSystemFlags|=r,e)},le=function(e){var t=Me(e.target);if(null!==t){var n=q(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=G(n)))return e.blockedOn=t,void bo.unstable_runWithPriority(e.priority,(function(){wi(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null},fe=function(e){if(null!==e.blockedOn)return!1;var t=xe(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Ue(t);return null!==n&&bi(n),e.blockedOn=t,!1}return!0},pe=function(e,t,n){fe(e)&&n.delete(t)},de=function(){for(Ci=!1;0<Ai.length;){var e=Ai[0];if(null!==e.blockedOn){null!==(e=Ue(e.blockedOn))&&gi(e);break}var t=xe(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:Ai.shift()}null!==Pi&&fe(Pi)&&(Pi=null),null!==Ti&&fe(Ti)&&(Ti=null),null!==Ii&&fe(Ii)&&(Ii=null),Ri.forEach(pe),Li.forEach(pe)},he=function(e,t){e.blockedOn===t&&(e.blockedOn=null,Ci||(Ci=!0,bo.unstable_scheduleCallback(bo.unstable_NormalPriority,de)))},ve=function(e){function t(t){return he(t,e)}if(0<Ai.length){he(Ai[0],e);for(var n=1;n<Ai.length;n++){var r=Ai[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pi&&he(Pi,e),null!==Ti&&he(Ti,e),null!==Ii&&he(Ii,e),Ri.forEach(t),Li.forEach(t),n=0;n<Di.length;n++)(r=Di[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Di.length&&null===(n=Di[0]).blockedOn;)le(n),null===n.blockedOn&&Di.shift()},ye=function(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Fi.set(r,t),Bi.set(r,i),Ui[o]=i}},me=function(e,t){ge(t,e,!1)},ge=function(e,t,n){var r=Fi.get(t);switch(void 0===r?2:r){case 0:r=be.bind(null,t,1,e);break;case 1:r=we.bind(null,t,1,e);break;default:r=_e.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)},be=function(e,t,n,r){Uo||m();var o=_e,i=Uo;Uo=!0;try{y(o,e,t,n,r)}finally{(Uo=i)||g()}},we=function(e,t,n,r){Ki(Wi,_e.bind(null,e,t,n,r))},_e=function(e,t,n,r){if(qi)if(0<Ai.length&&-1<Ni.indexOf(e))e=ue(null,e,t,n,r),Ai.push(e);else{var o=xe(e,t,n,r);if(null===o)ce(e,r);else if(-1<Ni.indexOf(e))e=ue(o,e,t,n,r),Ai.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return Pi=se(Pi,e,t,n,r,o),!0;case"dragenter":return Ti=se(Ti,e,t,n,r,o),!0;case"mouseover":return Ii=se(Ii,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ri.set(i,se(Ri.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Li.set(i,se(Li.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){ce(e,r),e=oe(e,r,null,t);try{b(ie,e)}finally{re(e)}}}},xe=function(e,t,n,r){if(null!==(n=Me(n=te(r)))){var o=q(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=G(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=oe(e,r,n,t);try{b(ie,e)}finally{re(e)}return null},Se=function(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"},Ee=function(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=Se(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}},Oe=function(e,t){if(t){if(Yi[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62,""))}},je=function(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},ke=function(e,t){var n=K(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=Io[t];for(var r=0;r<t.length;r++)ae(t[r],e,n)},$e=function(){},Ce=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},Ae=function(e){for(;e&&e.firstChild;)e=e.firstChild;return e},Pe=function(e,t){var n,r=Ae(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ae(r)}},Te=function(){for(var e=window,t=Ce();c(t,e.HTMLIFrameElement);){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Ce((e=t.contentWindow).document)}return t},Ie=function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)},Re=function(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1},Le=function(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html},De=function(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e},Ne=function(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===ea||n===Xi){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null},Me=function(e){var t=e[aa];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ca]||n[aa]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Ne(e);null!==e;){if(n=e[aa])return n;e=Ne(e)}return t}n=(e=n).parentNode}return null},Ue=function(e){return!(e=e[aa]||e[ca])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e},Be=function(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))},Fe=function(e){return e[ua]||null},ze=function(e){do{e=e.return}while(e&&5!==e.tag);return e||null},Ve=function(e,t){var n=e.stateNode;if(!n)return null;var o=Oo(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,void 0===n?"undefined":p(n)));return n},He=function(e,t,n){(t=Ve(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=Q(n._dispatchListeners,t),n._dispatchInstances=Q(n._dispatchInstances,e))},We=function(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=ze(t);for(t=n.length;0<t--;)He(n[t],"captured",e);for(t=0;t<n.length;t++)He(n[t],"bubbled",e)}},Ke=function(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Ve(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=Q(n._dispatchListeners,t),n._dispatchInstances=Q(n._dispatchInstances,e))},qe=function(e){e&&e.dispatchConfig.registrationName&&Ke(e._targetInst,null,e)},Ge=function(e){J(e,We)},Ze=function(){if(fa)return fa;var e,t,n=la,r=n.length,o="value"in sa?sa.value:sa.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return fa=o.slice(e,1<t?1-t:void 0)},Ye=function(){return!0},Qe=function(){return!1},Je=function(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Ye:Qe,this.isPropagationStopped=Qe,this},Xe=function(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},et=function(e){if(!c(e,this))throw Error(r(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)},tt=function(e){e.eventPool=[],e.getPooled=Xe,e.release=et},nt=function(e,t){switch(e){case"keyup":return-1!==ha.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}},rt=function(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null},ot=function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ea[e.type]:"textarea"===t},it=function(e,t,n){return(e=Je.getPooled(Oa.change,e,t,n)).type="change",d(n),Ge(e),e},at=function(e){ee(e)},ut=function(e){if($(Be(e)))return e},ct=function(e,t){if("change"===e)return t},st=function(){ja&&(ja.detachEvent("onpropertychange",lt),ka=ja=null)},lt=function(e){if("value"===e.propertyName&&ut(ka))if(e=it(ka,e,te(e)),Uo)ee(e);else{Uo=!0;try{v(at,e)}finally{Uo=!1,g()}}},ft=function(e,t,n){"focus"===e?(st(),ka=n,(ja=t).attachEvent("onpropertychange",lt)):"blur"===e&&st()},pt=function(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ut(ka)},dt=function(e,t){if("click"===e)return ut(t)},ht=function(e,t){if("input"===e||"change"===e)return ut(t)},vt=function(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pa[e])&&!!t[e]},yt=function(){return vt},mt=function(e,t){if(Ba(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fa.call(t,n[r])||!Ba(e[n[r]],t[n[r]]))return!1;return!0},gt=function(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qa||null==Ha||Ha!==Ce(n)?null:(n="selectionStart"in(n=Ha)&&Ie(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Ka&&mt(Ka,n)?null:(Ka=n,(e=Je.getPooled(Va.select,Wa,e,t)).type="select",e.target=Ha,Ge(e),e))},bt=function(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0},wt=function(e){0>lu||(e.current=su[lu],su[lu]=null,lu--)},_t=function(e,t){lu++,su[lu]=e.current,e.current=t},xt=function(e,t){var n=e.type.contextTypes;if(!n)return fu;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i},St=function(e){return null!=e.childContextTypes},Et=function(){wt(du),wt(pu)},Ot=function(e,t,n){if(pu.current!==fu)throw Error(r(168));_t(pu,t),_t(du,n)},jt=function(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,"function"!=typeof o.getChildContext)return n;for(var i in o=o.getChildContext())if(!(i in e))throw Error(r(108,fi(t)||"Unknown",i));return go({},n,{},o)},kt=function(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fu,hu=pu.current,_t(pu,e),_t(du,du.current),!0},$t=function(e,t,n){var o=e.stateNode;if(!o)throw Error(r(169));n?(e=jt(e,t,hu),o.__reactInternalMemoizedMergedChildContext=e,wt(du),wt(pu),_t(pu,e)):wt(du),_t(du,n)},Ct=function(){switch(wu()){case _u:return 99;case xu:return 98;case Su:return 97;case Eu:return 96;case Ou:return 95;default:throw Error(r(332))}},At=function(e){switch(e){case 99:return _u;case 98:return xu;case 97:return Su;case 96:return Eu;case 95:return Ou;default:throw Error(r(332))}},Pt=function(e,t){return e=At(e),vu(e,t)},Tt=function(e,t,n){return e=At(e),yu(e,t,n)},It=function(e){return null===Cu?(Cu=[e],Au=yu(_u,Lt)):Cu.push(e),ju},Rt=function(){if(null!==Au){var e=Au;Au=null,mu(e)}Lt()},Lt=function(){if(!Pu&&null!==Cu){Pu=!0;var e=0;try{var t=Cu;Pt(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Cu=null}catch(t){throw null!==Cu&&(Cu=Cu.slice(e+1)),yu(_u,Rt),t}finally{Pu=!1}}},Dt=function(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n},Nt=function(e,t){if(e&&e.defaultProps)for(var n in t=go({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t},Mt=function(){Nu=Du=Lu=null},Ut=function(e){var t=Ru.current;wt(Ru),e.type._context._currentValue=t},Bt=function(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}},Ft=function(e,t){Lu=e,Nu=Du=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(fc=!0),e.firstContext=null)},zt=function(e,t){if(Nu!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Nu=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Du){if(null===Lu)throw Error(r(308));Du=t,Lu.dependencies={expirationTime:0,firstContext:t,responders:null}}else Du=Du.next=t;return e._currentValue},Vt=function(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}},Ht=function(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})},Wt=function(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e},Kt=function(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}},qt=function(e,t){var n=e.alternate;null!==n&&Ht(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)},Gt=function(e,t,n,r){var o=e.updateQueue;Mu=!1;var i=o.baseQueue,a=o.shared.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}i=a,o.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=a)}if(null!==i){u=i.next;var c=o.baseState,s=0,l=null,f=null,p=null;if(null!==u)for(var d=u;;){if((a=d.expirationTime)<r){var h={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(f=p=h,l=c):p=p.next=h,a>s&&(s=a)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),Tr(a,d.suspenseConfig);e:{var v=e,y=d;switch(a=t,h=n,y.tag){case 1:if("function"==typeof(v=y.payload)){c=v.call(h,c,a);break e}c=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(a="function"==typeof(v=y.payload)?v.call(h,c,a):v))break e;c=go({},c,a);break e;case 2:Mu=!0}}null!==d.callback&&(e.effectTag|=32,null===(a=o.effects)?o.effects=[d]:a.push(d))}if(null===(d=d.next)||d===u){if(null===(a=o.shared.pending))break;d=i.next=a.next,a.next=u,o.baseQueue=i=a,o.shared.pending=null}}null===p?l=c:p.next=f,o.baseState=l,o.baseQueue=p,Ir(s),e.expirationTime=s,e.memoizedState=c}},Zt=function(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],i=o.callback;if(null!==i){if(o.callback=null,o=i,i=n,"function"!=typeof o)throw Error(r(191,o));o.call(i)}}},Yt=function(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:go({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)},Qt=function(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&mt(n,r)&&mt(o,i))},Jt=function(e,t,n){var r=!1,o=fu,i=t.contextType;return"object"==typeof i&&null!==i?i=zt(i):(o=St(t)?hu:pu.current,i=(r=null!=(r=t.contextTypes))?xt(e,o):fu),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Fu,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t},Xt=function(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)},en=function(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Bu,Vt(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=zt(i):(i=St(t)?hu:pu.current,o.context=xt(e,i)),Gt(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Yt(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Fu.enqueueReplaceState(o,o.state,null),Gt(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},tn=function(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var o=n.stateNode}if(!o)throw Error(r(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===Bu&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e},nn=function(e,t){if("textarea"!==e.type)throw Error(r(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))},rn=function(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Qr(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=eo(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=tn(e,t,n),r.return=e,r):((r=Jr(n.type,n.key,n.props,null,e.mode,r)).ref=tn(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=to(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Xr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=eo(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Yo:return(n=Jr(t.type,t.key,t.props,null,e.mode,n)).ref=tn(e,null,t),n.return=e,n;case Qo:return(t=to(t,e.mode,n)).return=e,t}if(zu(t)||S(t))return(t=Xr(t,e.mode,n,null)).return=e,t;nn(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Yo:return n.key===o?n.type===Jo?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case Qo:return n.key===o?l(e,t,n,r):null}if(zu(n)||S(n))return null!==o?null:f(e,t,n,r,null);nn(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Yo:return e=e.get(null===r.key?n:r.key)||null,r.type===Jo?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case Qo:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(zu(r)||S(r))return f(t,e=e.get(n)||null,r,o,null);nn(t,r)}return null}return function(c,s,l,f){var v="object"==typeof l&&null!==l&&l.type===Jo&&null===l.key;v&&(l=l.props.children);var y="object"==typeof l&&null!==l;if(y)switch(l.$$typeof){case Yo:e:{for(y=l.key,v=s;null!==v;){if(v.key===y){if(7===v.tag){if(l.type===Jo){n(c,v.sibling),(s=i(v,l.props.children)).return=c,c=s;break e}}else if(v.elementType===l.type){n(c,v.sibling),(s=i(v,l.props)).ref=tn(c,v,l),s.return=c,c=s;break e}n(c,v);break}t(c,v),v=v.sibling}l.type===Jo?((s=Xr(l.props.children,c.mode,f,l.key)).return=c,c=s):((f=Jr(l.type,l.key,l.props,null,c.mode,f)).ref=tn(c,s,l),f.return=c,c=f)}return u(c);case Qo:e:{for(v=l.key;null!==s;){if(s.key===v){if(4===s.tag&&s.stateNode.containerInfo===l.containerInfo&&s.stateNode.implementation===l.implementation){n(c,s.sibling),(s=i(s,l.children||[])).return=c,c=s;break e}n(c,s);break}t(c,s),s=s.sibling}(s=to(l,c.mode,f)).return=c,c=s}return u(c)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==s&&6===s.tag?(n(c,s.sibling),(s=i(s,l)).return=c,c=s):(n(c,s),(s=eo(l,c.mode,f)).return=c,c=s),u(c);if(zu(l))return function(r,i,u,c){for(var s=null,l=null,f=i,v=i=0,y=null;null!==f&&v<u.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var m=d(r,f,u[v],c);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(r,f),i=a(m,i,v),null===l?s=m:l.sibling=m,l=m,f=y}if(v===u.length)return n(r,f),s;if(null===f){for(;v<u.length;v++)null!==(f=p(r,u[v],c))&&(i=a(f,i,v),null===l?s=f:l.sibling=f,l=f);return s}for(f=o(r,f);v<u.length;v++)null!==(y=h(f,r,v,u[v],c))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),i=a(y,i,v),null===l?s=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(r,e)})),s}(c,s,l,f);if(S(l))return function(i,u,c,s){var l=S(c);if("function"!=typeof l)throw Error(r(150));if(null==(c=l.call(c)))throw Error(r(151));for(var f=l=null,v=u,y=u=0,m=null,g=c.next();null!==v&&!g.done;y++,g=c.next()){v.index>y?(m=v,v=null):m=v.sibling;var b=d(i,v,g.value,s);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(i,v),u=a(b,u,y),null===f?l=b:f.sibling=b,f=b,v=m}if(g.done)return n(i,v),l;if(null===v){for(;!g.done;y++,g=c.next())null!==(g=p(i,g.value,s))&&(u=a(g,u,y),null===f?l=g:f.sibling=g,f=g);return l}for(v=o(i,v);!g.done;y++,g=c.next())null!==(g=h(v,i,y,g.value,s))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),u=a(g,u,y),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),l}(c,s,l,f);if(y&&nn(c,l),void 0===l&&!v)switch(c.tag){case 1:case 0:throw c=c.type,Error(r(152,c.displayName||c.name||"Component"))}return n(c,s)}},on=function(e){if(e===Wu)throw Error(r(174));return e},an=function(e,t){switch(_t(Gu,t),_t(qu,e),_t(Ku,Wu),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:z(null,"");break;default:t=z(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}wt(Ku),_t(Ku,t)},un=function(){wt(Ku),wt(qu),wt(Gu)},cn=function(e){on(Gu.current);var t=on(Ku.current),n=z(t,e.type);t!==n&&(_t(qu,e),_t(Ku,n))},sn=function(e){qu.current===e&&(wt(Ku),wt(qu))},ln=function(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===Xi||n.data===ea))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null},fn=function(e,t){return{responder:e,props:t}},pn=function(){throw Error(r(321))},dn=function(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ba(e[n],t[n]))return!1;return!0},hn=function(e,t,n,o,i,a){if(Ju=a,Xu=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Yu.current=null===e||null===e.memoizedState?oc:ic,e=n(o,i),t.expirationTime===Ju){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(r(301));a+=1,tc=ec=null,t.updateQueue=null,Yu.current=ac,e=n(o,i)}while(t.expirationTime===Ju)}if(Yu.current=rc,t=null!==ec&&null!==ec.next,Ju=0,tc=ec=Xu=null,nc=!1,t)throw Error(r(300));return e},vn=function(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===tc?Xu.memoizedState=tc=e:tc=tc.next=e,tc},yn=function(){if(null===ec){var e=Xu.alternate;e=null!==e?e.memoizedState:null}else e=ec.next;var t=null===tc?Xu.memoizedState:tc.next;if(null!==t)tc=t,ec=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ec=e).memoizedState,baseState:ec.baseState,baseQueue:ec.baseQueue,queue:ec.queue,next:null},null===tc?Xu.memoizedState=tc=e:tc=tc.next=e}return tc},mn=function(e,t){return"function"==typeof t?t(e):t},gn=function(e){var t=yn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=ec,i=o.baseQueue,a=n.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}o.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,o=o.baseState;var c=u=a=null,s=i;do{var l=s.expirationTime;if(l<Ju){var f={expirationTime:s.expirationTime,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===c?(u=c=f,a=o):c=c.next=f,l>Xu.expirationTime&&(Xu.expirationTime=l,Ir(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),Tr(l,s.suspenseConfig),o=s.eagerReducer===e?s.eagerState:e(o,s.action);s=s.next}while(null!==s&&s!==i);null===c?a=o:c.next=u,Ba(o,t.memoizedState)||(fc=!0),t.memoizedState=o,t.baseState=a,t.baseQueue=c,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]},bn=function(e){var t=yn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{a=e(a,u.action),u=u.next}while(u!==i);Ba(a,t.memoizedState)||(fc=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]},wn=function(e){var t=vn();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:mn,lastRenderedState:e}).dispatch=Ln.bind(null,Xu,e),[t.memoizedState,e]},_n=function(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Xu.updateQueue)?(t={lastEffect:null},Xu.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e},xn=function(){return yn().memoizedState},Sn=function(e,t,n,r){var o=vn();Xu.effectTag|=e,o.memoizedState=_n(1|t,n,void 0,void 0===r?null:r)},En=function(e,t,n,r){var o=yn();r=void 0===r?null:r;var i=void 0;if(null!==ec){var a=ec.memoizedState;if(i=a.destroy,null!==r&&dn(r,a.deps))return void _n(t,n,i,r)}Xu.effectTag|=e,o.memoizedState=_n(1|t,n,i,r)},On=function(e,t){return Sn(516,4,e,t)},jn=function(e,t){return En(516,4,e,t)},kn=function(e,t){return En(4,2,e,t)},$n=function(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0},Cn=function(e,t,n){return n=null!=n?n.concat([e]):null,En(4,2,$n.bind(null,t,e),n)},An=function(){},Pn=function(e,t){return vn().memoizedState=[e,void 0===t?null:t],e},Tn=function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},In=function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},Rn=function(e,t,n){var r=Ct();Pt(98>r?98:r,(function(){e(!0)})),Pt(97<r?97:r,(function(){var r=Qu.suspense;Qu.suspense=void 0===t?null:t;try{e(!1),n()}finally{Qu.suspense=r}}))},Ln=function(e,t,n){var r=wr(),o=Uu.suspense;o={expirationTime:r=_r(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Xu||null!==i&&i===Xu)nc=!0,o.expirationTime=Ju,Xu.expirationTime=Ju;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=i(a,n);if(o.eagerReducer=i,o.eagerState=u,Ba(u,a))return}catch(e){}xr(e,r)}},Dn=function(e,t){var n=Zr(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n},Nn=function(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}},Mn=function(e){if(sc){var t=cc;if(t){var n=t;if(!Nn(e,t)){if(!(t=De(n.nextSibling))||!Nn(e,t))return e.effectTag=-1025&e.effectTag|2,sc=!1,void(uc=e);Dn(uc,n)}uc=e,cc=De(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,sc=!1,uc=e}},Un=function(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;uc=e},Bn=function(e){if(e!==uc)return!1;if(!sc)return Un(e),sc=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Le(t,e.memoizedProps))for(t=cc;t;)Dn(e,t),t=De(t.nextSibling);if(Un(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){cc=De(e.nextSibling);break e}t--}else"$"!==n&&n!==ea&&n!==Xi||t++}e=e.nextSibling}cc=null}}else cc=uc?De(e.stateNode.nextSibling):null;return!0},Fn=function(){cc=uc=null,sc=!1},zn=function(e,t,n,r){t.child=null===e?Hu(t,null,n,r):Vu(t,e.child,n,r)},Vn=function(e,t,n,r,o){n=n.render;var i=t.ref;return Ft(t,o),r=hn(e,t,n,r,i,o),null===e||fc?(t.effectTag|=1,zn(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tr(e,t,o))},Hn=function(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Yr(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Jr(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Wn(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:mt)(o,r)&&e.ref===t.ref)?tr(e,t,i):(t.effectTag|=1,(e=Qr(a,r)).ref=t.ref,e.return=t,t.child=e)},Wn=function(e,t,n,r,o,i){return null!==e&&mt(e.memoizedProps,r)&&e.ref===t.ref&&(fc=!1,o<i)?(t.expirationTime=e.expirationTime,tr(e,t,i)):qn(e,t,n,r,i)},Kn=function(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)},qn=function(e,t,n,r,o){var i=St(n)?hu:pu.current;return i=xt(t,i),Ft(t,o),n=hn(e,t,n,r,i,o),null===e||fc?(t.effectTag|=1,zn(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tr(e,t,o))},Gn=function(e,t,n,r,o){if(St(n)){var i=!0;kt(t)}else i=!1;if(Ft(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Jt(t,n,r),en(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var c=a.context,s=n.contextType;s="object"==typeof s&&null!==s?zt(s):xt(t,s=St(n)?hu:pu.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&Xt(t,a,r,s),Mu=!1;var p=t.memoizedState;a.state=p,Gt(t,r,a,o),c=t.memoizedState,u!==r||p!==c||du.current||Mu?("function"==typeof l&&(Yt(t,n,l,r),c=t.memoizedState),(u=Mu||Qt(t,n,u,r,p,c,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=s,r=u):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,Ht(e,t),u=t.memoizedProps,a.props=t.type===t.elementType?u:Nt(t.type,u),c=a.context,s="object"==typeof(s=n.contextType)&&null!==s?zt(s):xt(t,s=St(n)?hu:pu.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&Xt(t,a,r,s),Mu=!1,c=t.memoizedState,a.state=c,Gt(t,r,a,o),p=t.memoizedState,u!==r||c!==p||du.current||Mu?("function"==typeof l&&(Yt(t,n,l,r),p=t.memoizedState),(l=Mu||Qt(t,n,u,r,c,p,s))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=s,r=l):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Zn(e,t,n,r,i,o)},Zn=function(e,t,n,r,o,i){Kn(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&$t(t,n,!1),tr(e,t,i);r=t.stateNode,lc.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Vu(t,e.child,null,i),t.child=Vu(t,null,u,i)):zn(e,t,u,i),t.memoizedState=r.state,o&&$t(t,n,!0),t.child},Yn=function(e){var t=e.stateNode;t.pendingContext?Ot(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(0,t.context,!1),an(e,t.containerInfo)},Qn=function(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Zu.current,u=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(u=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),_t(Zu,1&a),null===e){if(void 0!==i.fallback&&Mn(t),u){if(u=i.fallback,(i=Xr(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Xr(u,o,n,null)).return=t,i.sibling=n,t.memoizedState=pc,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Hu(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,u){if(i=i.fallback,(n=Qr(e,e.pendingProps)).return=t,0==(2&t.mode)&&(u=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=u;null!==u;)u.return=n,u=u.sibling;return(o=Qr(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=pc,t.child=n,o}return n=Vu(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,u){if(u=i.fallback,(i=Xr(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Xr(u,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=pc,t.child=i,n}return t.memoizedState=null,t.child=Vu(t,e,i.children,n)},Jn=function(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),Bt(e.return,t)},Xn=function(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)},er=function(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(zn(e,t,r.children,n),0!=(2&(r=Zu.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Jn(e,n);else if(19===e.tag)Jn(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_t(Zu,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ln(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xn(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ln(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xn(t,!0,n,null,i,t.lastEffect);break;case"together":Xn(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child},tr=function(e,t,n){null!==e&&(t.dependencies=e.dependencies);var o=t.expirationTime;if(0!==o&&Ir(o),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Qr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Qr(e,e.pendingProps)).return=t;n.sibling=null}return t.child},nr=function(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}},rr=function(e,t,n){var o=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return St(t.type)&&Et(),null;case 3:return un(),wt(du),wt(pu),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Bn(t)||(t.effectTag|=4),null;case 5:sn(t),n=on(Gu.current);var i=t.type;if(null!==e&&null!=t.stateNode)uu(e,t,i,o,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!o){if(null===t.stateNode)throw Error(r(166));return null}if(e=on(Ku.current),Bn(t)){o=t.stateNode,i=t.type;var a=t.memoizedProps;switch(o[aa]=t,o[ua]=a,i){case"iframe":case"object":case"embed":me("load",o);break;case"video":case"audio":for(e=0;e<Oi.length;e++)me(Oi[e],o);break;case"source":me("error",o);break;case"img":case"image":case"link":me("error",o),me("load",o);break;case"form":me("reset",o),me("submit",o);break;case"details":me("toggle",o);break;case"input":A(o,a),me("invalid",o),ke(n,"onChange");break;case"select":o._wrapperState={wasMultiple:!!a.multiple},me("invalid",o),ke(n,"onChange");break;case"textarea":M(o,a),me("invalid",o),ke(n,"onChange")}for(var u in Oe(i,a),e=null,a)if(a.hasOwnProperty(u)){var c=a[u];"children"===u?"string"==typeof c?o.textContent!==c&&(e=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(e=["children",""+c]):To.hasOwnProperty(u)&&null!=c&&ke(n,u)}switch(i){case"input":k(o),I(o,a,!0);break;case"textarea":k(o),B(o);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(o.onclick=$e)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===Qi&&(e=F(i)),e===Qi?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(i,{is:o.is}):(e=u.createElement(i),"select"===i&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,i),e[aa]=t,e[ua]=o,au(e,t),t.stateNode=e,u=je(i,o),i){case"iframe":case"object":case"embed":me("load",e),c=o;break;case"video":case"audio":for(c=0;c<Oi.length;c++)me(Oi[c],e);c=o;break;case"source":me("error",e),c=o;break;case"img":case"image":case"link":me("error",e),me("load",e),c=o;break;case"form":me("reset",e),me("submit",e),c=o;break;case"details":me("toggle",e),c=o;break;case"input":A(e,o),c=C(e,o),me("invalid",e),ke(n,"onChange");break;case"option":c=L(e,o);break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=go({},o,{value:void 0}),me("invalid",e),ke(n,"onChange");break;case"textarea":M(e,o),c=N(e,o),me("invalid",e),ke(n,"onChange");break;default:c=o}Oe(i,c);var s=c;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?Ee(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&hi(e,l):"children"===a?"string"==typeof l?("textarea"!==i||""!==l)&&V(e,l):"number"==typeof l&&V(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(To.hasOwnProperty(a)?null!=l&&ke(n,a):null!=l&&x(e,a,l,u))}switch(i){case"input":k(e),I(e,o,!1);break;case"textarea":k(e),B(e);break;case"option":null!=o.value&&e.setAttribute("value",""+O(o.value));break;case"select":e.multiple=!!o.multiple,null!=(n=o.value)?D(e,!!o.multiple,n,!1):null!=o.defaultValue&&D(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=$e)}Re(i,o)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)cu(0,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(r(166));n=on(Gu.current),on(Ku.current),Bn(t)?(n=t.stateNode,o=t.memoizedProps,n[aa]=t,n.nodeValue!==o&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(o))[aa]=t,t.stateNode=n)}return null;case 13:return wt(Zu),o=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==o,o=!1,null===e?void 0!==t.memoizedProps.fallback&&Bn(t):(o=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(a=t.firstEffect)?(t.firstEffect=i,i.nextEffect=a):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!o&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Zu.current)?Cc===xc&&(Cc=Sc):(Cc!==xc&&Cc!==Sc||(Cc=Ec),0!==Rc&&null!==jc&&(oo(jc,$c),io(jc,Rc)))),(n||o)&&(t.effectTag|=4),null);case 4:return un(),null;case 10:return Ut(t),null;case 19:if(wt(Zu),null===(o=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(a=o.rendering)){if(i)nr(o,!1);else if(Cc!==xc||null!==e&&0!=(64&e.effectTag))for(a=t.child;null!==a;){if(null!==(e=ln(a))){for(t.effectTag|=64,nr(o,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=t.child;null!==o;)a=n,(i=o).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=a,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,a=e.dependencies,i.dependencies=null===a?null:{expirationTime:a.expirationTime,firstContext:a.firstContext,responders:a.responders}),o=o.sibling;return _t(Zu,1&Zu.current|2),t.child}a=a.sibling}}else{if(!i)if(null!==(e=ln(a))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),nr(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate)return null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null),null}else 2*Iu()-o.renderingStartTime>o.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,nr(o,!1),t.expirationTime=t.childExpirationTime=n-1);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(0===o.tailExpiration&&(o.tailExpiration=Iu()+500),n=o.tail,o.rendering=n,o.tail=n.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=Iu(),n.sibling=null,t=Zu.current,_t(Zu,i?1&t|2:1&t),n):null}throw Error(r(156,t.tag))},or=function(e){switch(e.tag){case 1:St(e.type)&&Et();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(un(),wt(du),wt(pu),0!=(64&(t=e.effectTag)))throw Error(r(285));return e.effectTag=-4097&t|64,e;case 5:return sn(e),null;case 13:return wt(Zu),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return wt(Zu),null;case 4:return un(),null;case 10:return Ut(e),null;default:return null}},ir=function(e,t){return{value:e,source:t,stack:E(t)}},ar=function(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=E(n)),null!==n&&fi(n.type),t=t.value,null!==e&&1===e.tag&&fi(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}},ur=function(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Wr(e,t)}else t.current=null},cr=function(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,o=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Nt(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(r(163))},sr=function(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}},lr=function(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}},fr=function(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void lr(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var o=n.elementType===n.type?t.memoizedProps:Nt(n.type,t.memoizedProps);e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Zt(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}Zt(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&Re(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&ve(n)))))}throw Error(r(163))},pr=function(e,t,n){switch("function"==typeof Yc&&Yc(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Pt(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Wr(o,e)}}e=e.next}while(e!==r)}))}break;case 1:ur(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Wr(e,t)}}(t,n);break;case 5:ur(t);break;case 4:vr(e,t,n)}},dr=function(e){return 5===e.tag||3===e.tag||4===e.tag},hr=function(e){e:{for(var t=e.return;null!==t;){if(dr(t)){var n=t;break e}t=t.return}throw Error(r(160))}switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:case 4:t=t.containerInfo,o=!0;break;default:throw Error(r(161))}16&n.effectTag&&(V(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||dr(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}o?vc(e,n,t):yc(e,n,t)},vr=function(e,t,n){for(var o,i,a=t,u=!1;;){if(!u){u=a.return;e:for(;;){if(null===u)throw Error(r(160));switch(o=u.stateNode,u.tag){case 5:i=!1;break e;case 3:case 4:o=o.containerInfo,i=!0;break e}u=u.return}u=!0}if(5===a.tag||6===a.tag){e:for(var c=e,s=a,l=n,f=s;;)if(pr(c,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===s)break e;for(;null===f.sibling;){if(null===f.return||f.return===s)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(c=o,s=a.stateNode,8===c.nodeType?c.parentNode.removeChild(s):c.removeChild(s)):o.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){o=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(pr(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(u=!1)}a.sibling.return=a.return,a=a.sibling}},yr=function(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void sr(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps,i=null!==e?e.memoizedProps:o;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[ua]=o,"input"===e&&"radio"===o.type&&null!=o.name&&P(n,o),je(e,i),t=je(e,o),i=0;i<a.length;i+=2){var u=a[i],c=a[i+1];"style"===u?Ee(n,c):"dangerouslySetInnerHTML"===u?hi(n,c):"children"===u?V(n,c):x(n,u,c,t)}switch(e){case"input":T(n,o);break;case"textarea":U(n,o);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!o.multiple,null!=(e=o.value)?D(n,!!o.multiple,e,!1):t!==!!o.multiple&&(null!=o.defaultValue?D(n,!!o.multiple,o.defaultValue,!0):D(n,!!o.multiple,o.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(r(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,ve(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?o=!1:(o=!0,n=t.child,Dc=Iu()),null!==n)e:for(e=n;;){if(5===e.tag)a=e.stateNode,o?"function"==typeof(a=a.style).setProperty?a.setProperty("display","none","important"):a.display="none":(a=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,a.style.display=Se("display",i));else if(6===e.tag)e.stateNode.nodeValue=o?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(a=e.child.sibling).return=e,e=a;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void mr(t);case 19:return void mr(t)}throw Error(r(163))},mr=function(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new dc),t.forEach((function(t){var r=qr.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}},gr=function(e,t,n){(n=Wt(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mc||(Mc=!0,Uc=r),ar(e,t)},n},br=function(e,t,n){(n=Wt(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ar(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Bc?Bc=new Set([this]):Bc.add(this),ar(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n},wr=function(){return 0!=(48&Oc)?1073741821-(Iu()/10|0):0!==qc?qc:qc=1073741821-(Iu()/10|0)},_r=function(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var o=Ct();if(0==(4&t))return 99===o?1073741823:1073741822;if(0!=(16&Oc))return $c;if(null!==n)e=Dt(e,0|n.timeoutMs||5e3,250);else switch(o){case 99:e=1073741823;break;case 98:e=Dt(e,150,100);break;case 97:case 96:e=Dt(e,5e3,250);break;case 95:e=2;break;default:throw Error(r(326))}return null!==jc&&e===$c&&--e,e},xr=function(e,t){if(50<Wc)throw Wc=0,Kc=null,Error(r(185));if(null!==(e=Sr(e,t))){var n=Ct();1073741823===t?0!=(8&Oc)&&0==(48&Oc)?jr(e):(Or(e),0===Oc&&Rt()):Or(e),0==(4&Oc)||98!==n&&99!==n||(null===Hc?Hc=new Map([[e,t]]):(void 0===(n=Hc.get(e))||n>t)&&Hc.set(e,t))}},Sr=function(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(jc===o&&(Ir(t),Cc===Ec&&oo(o,$c)),io(o,t)),o},Er=function(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!ro(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e},Or=function(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=It(jr.bind(null,e));else{var t=Er(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=wr();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==ju&&mu(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?It(jr.bind(null,e)):Tt(r,Gc.bind(null,e),{timeout:10*(1073741821-t)-Iu()}),e.callbackNode=t}}},jr=function(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Oc))throw Error(r(327));if(zr(),e===jc&&t===$c||Cr(e,t),null!==kc){var n=Oc;Oc|=16;for(var o=Pr();;)try{Rr();break}catch(t){Ar(e,t)}if(Mt(),Oc=n,wc.current=o,1===Cc)throw n=Ac,Cr(e,t),oo(e,t),Or(e),n;if(null!==kc)throw Error(r(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,jc=null,Ur(e),Or(e)}return null},kr=function(e,t){var n=Oc;Oc|=1;try{return e(t)}finally{0===(Oc=n)&&Rt()}},$r=function(e,t){var n=Oc;Oc&=-2,Oc|=8;try{return e(t)}finally{0===(Oc=n)&&Rt()}},Cr=function(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oa(n)),null!==kc)for(n=kc.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&Et();break;case 3:un(),wt(du),wt(pu);break;case 5:sn(r);break;case 4:un();break;case 13:case 19:wt(Zu);break;case 10:Ut(r)}n=n.return}jc=e,kc=Qr(e.current,null),$c=t,Cc=xc,Ac=null,Tc=Pc=1073741823,Ic=null,Rc=0,Lc=!1},Ar=function(e,t){for(;;){try{if(Mt(),Yu.current=rc,nc)for(var n=Xu.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ju=0,tc=ec=Xu=null,nc=!1,null===kc||null===kc.return)return Cc=1,Ac=t,kc=null;e:{var o=e,i=kc.return,a=kc,u=t;if(t=$c,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u;if(0==(2&a.mode)){var s=a.alternate;s?(a.updateQueue=s.updateQueue,a.memoizedState=s.memoizedState,a.expirationTime=s.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Zu.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var v=f.updateQueue;if(null===v){var y=new Set;y.add(c),f.updateQueue=y}else v.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=Wt(1073741823,null);m.tag=2,Kt(a,m)}a.expirationTime=1073741823;break e}u=void 0,a=t;var g=o.pingCache;if(null===g?(g=o.pingCache=new gc,u=new Set,g.set(c,u)):void 0===(u=g.get(c))&&(u=new Set,g.set(c,u)),!u.has(a)){u.add(a);var b=Kr.bind(null,o,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);u=Error((fi(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+E(a))}5!==Cc&&(Cc=2),u=ir(u,a),f=i;do{switch(f.tag){case 3:c=u,f.effectTag|=4096,f.expirationTime=t,qt(f,gr(f,c,t));break e;case 1:c=u;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===Bc||!Bc.has(_)))){f.effectTag|=4096,f.expirationTime=t,qt(f,br(f,c,t));break e}}f=f.return}while(null!==f)}kc=Nr(kc)}catch(e){t=e;continue}break}},Pr=function(){var e=wc.current;return wc.current=rc,null===e?rc:e},Tr=function(e,t){e<Pc&&2<e&&(Pc=e),null!==t&&e<Tc&&2<e&&(Tc=e,Ic=t)},Ir=function(e){e>Rc&&(Rc=e)},Rr=function(){for(;null!==kc;)kc=Dr(kc)},Lr=function(){for(;null!==kc&&!ku();)kc=Dr(kc)},Dr=function(e){var t=mc(e.alternate,e,$c);return e.memoizedProps=e.pendingProps,null===t&&(t=Nr(e)),_c.current=null,t},Nr=function(e){kc=e;do{var t=kc.alternate;if(e=kc.return,0==(2048&kc.effectTag)){if(t=rr(t,kc,$c),1===$c||1!==kc.childExpirationTime){for(var n=0,r=kc.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}kc.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=kc.firstEffect),null!==kc.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=kc.firstEffect),e.lastEffect=kc.lastEffect),1<kc.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=kc:e.firstEffect=kc,e.lastEffect=kc))}else{if(null!==(t=or(kc)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=kc.sibling))return t;kc=e}while(null!==kc);return Cc===xc&&(Cc=5),null},Mr=function(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e},Ur=function(e){var t=Ct();return Pt(99,Br.bind(null,e,t)),null},Br=function(e,t){do{zr()}while(null!==zc);if(0!=(48&Oc))throw Error(r(327));var n=e.finishedWork,o=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Mr(n);if(e.firstPendingTime=i,o<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:o<=e.firstSuspendedTime&&(e.firstSuspendedTime=o-1),o<=e.lastPingedTime&&(e.lastPingedTime=0),o<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===jc&&(kc=jc=null,$c=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var a=Oc;Oc|=32,_c.current=null,ta=qi;var u=Te();if(Ie(u)){if("selectionStart"in u)var c={start:u.selectionStart,end:u.selectionEnd};else e:{var s=(c=(c=u.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(s&&0!==s.rangeCount){c=s.anchorNode;var l=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{c.nodeType,f.nodeType}catch(e){c=null;break e}var p=0,d=-1,h=-1,v=0,y=0,m=u,g=null;t:for(;;){for(var b;m!==c||0!==l&&3!==m.nodeType||(d=p+l),m!==f||0!==s&&3!==m.nodeType||(h=p+s),3===m.nodeType&&(p+=m.nodeValue.length),null!==(b=m.firstChild);)g=m,m=b;for(;;){if(m===u)break t;if(g===c&&++v===l&&(d=p),g===f&&++y===s&&(h=p),null!==(b=m.nextSibling))break;g=(m=g).parentNode}m=b}c=-1===d||-1===h?null:{start:d,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;na={activeElementDetached:null,focusedElem:u,selectionRange:c},qi=!1,Nc=i;do{try{Fr()}catch(e){if(null===Nc)throw Error(r(330));Wr(Nc,e),Nc=Nc.nextEffect}}while(null!==Nc);Nc=i;do{try{for(u=e,c=t;null!==Nc;){var w=Nc.effectTag;if(16&w&&V(Nc.stateNode,""),128&w){var _=Nc.alternate;if(null!==_){var x=_.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&w){case 2:hr(Nc),Nc.effectTag&=-3;break;case 6:hr(Nc),Nc.effectTag&=-3,yr(Nc.alternate,Nc);break;case 1024:Nc.effectTag&=-1025;break;case 1028:Nc.effectTag&=-1025,yr(Nc.alternate,Nc);break;case 4:yr(Nc.alternate,Nc);break;case 8:vr(u,l=Nc,c),hc(l)}Nc=Nc.nextEffect}}catch(e){if(null===Nc)throw Error(r(330));Wr(Nc,e),Nc=Nc.nextEffect}}while(null!==Nc);if(x=na,_=Te(),w=x.focusedElem,c=x.selectionRange,_!==w&&w&&w.ownerDocument&&Ji(w.ownerDocument.documentElement,w)){null!==c&&Ie(w)&&(_=c.start,void 0===(x=c.end)&&(x=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(x,w.value.length)):(x=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(x=x.getSelection(),l=w.textContent.length,u=Math.min(c.start,l),c=void 0===c.end?u:Math.min(c.end,l),!x.extend&&u>c&&(l=c,c=u,u=l),l=Pe(w,u),f=Pe(w,c),l&&f&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),u>c?(x.addRange(_),x.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),x.addRange(_))))),_=[];for(x=w;x=x.parentNode;)1===x.nodeType&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(x=_[w]).element.scrollLeft=x.left,x.element.scrollTop=x.top}qi=!!ta,na=ta=null,e.current=n,Nc=i;do{try{for(w=e;null!==Nc;){var S=Nc.effectTag;if(36&S&&fr(w,Nc.alternate,Nc),128&S){_=void 0;var E=Nc.ref;if(null!==E){var O=Nc.stateNode;Nc.tag,_=O,"function"==typeof E?E(_):E.current=_}}Nc=Nc.nextEffect}}catch(e){if(null===Nc)throw Error(r(330));Wr(Nc,e),Nc=Nc.nextEffect}}while(null!==Nc);Nc=null,$u(),Oc=a}else e.current=n;if(Fc)Fc=!1,zc=e,Vc=t;else for(Nc=i;null!==Nc;)t=Nc.nextEffect,Nc.nextEffect=null,Nc=t;if(0===(t=e.firstPendingTime)&&(Bc=null),1073741823===t?e===Kc?Wc++:(Wc=0,Kc=e):Wc=0,"function"==typeof Zc&&Zc(n.stateNode,o),Or(e),Mc)throw Mc=!1,e=Uc,Uc=null,e;return 0!=(8&Oc)||Rt(),null},Fr=function(){for(;null!==Nc;){var e=Nc.effectTag;0!=(256&e)&&cr(Nc.alternate,Nc),0==(512&e)||Fc||(Fc=!0,Tt(97,(function(){return zr(),null}))),Nc=Nc.nextEffect}},zr=function(){if(90!==Vc){var e=97<Vc?97:Vc;return Vc=90,Pt(e,Vr)}},Vr=function(){if(null===zc)return!1;var e=zc;if(zc=null,0!=(48&Oc))throw Error(r(331));var t=Oc;for(Oc|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:sr(5,n),lr(5,n)}}catch(t){if(null===e)throw Error(r(330));Wr(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Oc=t,Rt(),!0},Hr=function(e,t,n){Kt(e,t=gr(e,t=ir(n,t),1073741823)),null!==(e=Sr(e,1073741823))&&Or(e)},Wr=function(e,t){if(3===e.tag)Hr(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Hr(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Bc||!Bc.has(r))){Kt(n,e=br(n,e=ir(t,e),1073741823)),null!==(n=Sr(n,1073741823))&&Or(n);break}}n=n.return}},Kr=function(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),jc===e&&$c===n?Cc===Ec||Cc===Sc&&1073741823===Pc&&Iu()-Dc<500?Cr(e,$c):Lc=!0:ro(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Or(e)))},qr=function(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=_r(t=wr(),e,null)),null!==(e=Sr(e,t))&&Or(e)},Gr=function(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null},Zr=function(e,t,n,r){return new Gr(e,t,n,r)},Yr=function(e){return!(!(e=e.prototype)||!e.isReactComponent)},Qr=function(e,t){var n=e.alternate;return null===n?((n=Zr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n},Jr=function(e,t,n,o,i,a){var u=2;if(o=e,"function"==typeof e)Yr(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case Jo:return Xr(n.children,i,a,t);case ri:u=8,i|=7;break;case Xo:u=8,i|=1;break;case ei:return(e=Zr(12,n,t,8|i)).elementType=ei,e.type=ei,e.expirationTime=a,e;case ii:return(e=Zr(13,n,t,i)).type=ii,e.elementType=ii,e.expirationTime=a,e;case ai:return(e=Zr(19,n,t,i)).elementType=ai,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ti:u=10;break e;case ni:u=9;break e;case oi:u=11;break e;case ui:u=14;break e;case ci:u=16,o=null;break e;case si:u=22;break e}throw Error(r(130,null==e?e:void 0===e?"undefined":p(e),""))}return(t=Zr(u,n,t,i)).elementType=e,t.type=o,t.expirationTime=a,t},Xr=function(e,t,n,r){return(e=Zr(7,e,r,t)).expirationTime=n,e},eo=function(e,t,n){return(e=Zr(6,e,null,t)).expirationTime=n,e},to=function(e,t,n){return(t=Zr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t},no=function(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0},ro=function(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t},oo=function(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)},io=function(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))},ao=function(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)},uo=function(e,t,n,o){var i=t.current,a=wr(),u=Uu.suspense;a=_r(a,i,u);e:if(n){t:{if(q(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(r(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(St(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(r(171))}if(1===n.tag){var s=n.type;if(St(s)){n=jt(n,s,c);break e}}n=c}else n=fu;return null===t.context?t.context=n:t.pendingContext=n,(t=Wt(a,u)).payload={element:e},null!==(o=void 0===o?null:o)&&(t.callback=o),Kt(i,t),xr(i,a),a},co=function(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null},so=function(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)},lo=function(e,t){so(e,t),(e=e.alternate)&&so(e,t)},fo=function(e,t,n){var r,o,i=new no(e,t,n=null!=n&&!0===n.hydrate),a=Zr(3,null,null,2===t?7:1===t?3:0);i.current=a,a.stateNode=i,Vt(a),e[ca]=i.current,n&&0!==t&&(r=9===e.nodeType?e:e.ownerDocument,o=K(r),Ni.forEach((function(e){ae(e,r,o)})),Mi.forEach((function(e){ae(e,r,o)}))),this._internalRoot=i},po=function(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))},ho=function(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=co(a);u.call(e)}}uo(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new fo(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var c=o;o=function(){var e=co(a);c.call(e)}}$r((function(){uo(t,a,e,o)}))}return co(a)},vo=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Qo,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},yo=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!po(t))throw Error(r(200));return vo(e,t,null,n)},mo=n(2735),go=n(4516),bo=n(9146);if(!mo)throw Error(r(227));var wo=!1,_o=null,xo=!1,So=null,Eo={onError:function(e){wo=!0,_o=e}},Oo=null,jo=null,ko=null,$o=null,Co={},Ao=[],Po={},To={},Io={},Ro=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Lo=null,Do=null,No=null,Mo=v,Uo=!1,Bo=!1,Fo=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zo=Object.prototype.hasOwnProperty,Vo={},Ho={},Wo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Wo[e]=new w(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Wo[t]=new w(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Wo[e]=new w(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Wo[e]=new w(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Wo[e]=new w(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Wo[e]=new w(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Wo[e]=new w(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Wo[e]=new w(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Wo[e]=new w(e,5,!1,e.toLowerCase(),null,!1)}));var Ko=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Wo[e]=new w(e,1,!1,e.toLowerCase(),null,!1)})),Wo.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Wo[e]=new w(e,1,!1,e.toLowerCase(),null,!0)}));var qo=mo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qo.hasOwnProperty("ReactCurrentDispatcher")||(qo.ReactCurrentDispatcher={current:null}),qo.hasOwnProperty("ReactCurrentBatchConfig")||(qo.ReactCurrentBatchConfig={suspense:null});var Go=/^(.*)[\\\/]/,Zo="function"==typeof Symbol&&Symbol.for,Yo=Zo?Symbol.for("react.element"):60103,Qo=Zo?Symbol.for("react.portal"):60106,Jo=Zo?Symbol.for("react.fragment"):60107,Xo=Zo?Symbol.for("react.strict_mode"):60108,ei=Zo?Symbol.for("react.profiler"):60114,ti=Zo?Symbol.for("react.provider"):60109,ni=Zo?Symbol.for("react.context"):60110,ri=Zo?Symbol.for("react.concurrent_mode"):60111,oi=Zo?Symbol.for("react.forward_ref"):60112,ii=Zo?Symbol.for("react.suspense"):60113,ai=Zo?Symbol.for("react.suspense_list"):60120,ui=Zo?Symbol.for("react.memo"):60115,ci=Zo?Symbol.for("react.lazy"):60116,si=Zo?Symbol.for("react.block"):60121,li="function"==typeof Symbol&&Symbol.iterator;function fi(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Jo:return"Fragment";case Qo:return"Portal";case ei:return"Profiler";case Xo:return"StrictMode";case ii:return"Suspense";case ai:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ni:return"Context.Consumer";case ti:return"Context.Provider";case oi:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case ui:return fi(e.type);case si:return fi(e.render);case ci:if(e=1===e._status?e._result:null)return fi(e)}return null}var pi,di,hi=(di=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pi=pi||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return di(e,t)}))}:di),vi={animationend:H("Animation","AnimationEnd"),animationiteration:H("Animation","AnimationIteration"),animationstart:H("Animation","AnimationStart"),transitionend:H("Transition","TransitionEnd")},yi={},mi={};Ro&&(mi=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);var gi,bi,wi,_i=W("animationend"),xi=W("animationiteration"),Si=W("animationstart"),Ei=W("transitionend"),Oi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ji=new("function"==typeof WeakMap?WeakMap:Map),ki=null,$i=[],Ci=!1,Ai=[],Pi=null,Ti=null,Ii=null,Ri=new Map,Li=new Map,Di=[],Ni="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Mi="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" "),Ui={},Bi=new Map,Fi=new Map,zi=["abort","abort",_i,"animationEnd",xi,"animationIteration",Si,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ei,"transitionEnd","waiting","waiting"];ye("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),ye("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),ye(zi,2);for(var Vi="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Hi=0;Hi<Vi.length;Hi++)Fi.set(Vi[Hi],0);var Wi=bo.unstable_UserBlockingPriority,Ki=bo.unstable_runWithPriority,qi=!0,Gi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zi=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach((function(e){Zi.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]}))}));var Yi=go({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Qi="http://www.w3.org/1999/xhtml";function Ji(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Ji(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var Xi="$?",ea="$!",ta=null,na=null,ra="function"==typeof setTimeout?setTimeout:void 0,oa="function"==typeof clearTimeout?clearTimeout:void 0,ia=Math.random().toString(36).slice(2),aa="__reactInternalInstance$"+ia,ua="__reactEventHandlers$"+ia,ca="__reactContainere$"+ia,sa=null,la=null,fa=null;go(Je.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=p(e.returnValue)&&(e.returnValue=!1),this.isDefaultPrevented=Ye)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=p(e.cancelBubble)&&(e.cancelBubble=!0),this.isPropagationStopped=Ye)},persist:function(){this.isPersistent=Ye},isPersistent:Qe,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Qe,this._dispatchInstances=this._dispatchListeners=null}}),Je.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Je.extend=function(e){var t=function(){},n=function(){return r.apply(this,arguments)},r=this;t.prototype=r.prototype;var o=new t;return go(o,n.prototype),(n.prototype=o).constructor=n,n.Interface=go({},r.Interface,e),n.extend=r.extend,tt(n),n},tt(Je);var pa=Je.extend({data:null}),da=Je.extend({data:null}),ha=[9,13,27,32],va=Ro&&"CompositionEvent"in window,ya=null;Ro&&"documentMode"in document&&(ya=document.documentMode);var ma=Ro&&"TextEvent"in window&&!ya,ga=Ro&&(!va||ya&&8<ya&&11>=ya),ba=String.fromCharCode(32),wa={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},_a=!1,xa=!1,Sa={eventTypes:wa,extractEvents:function(e,t,n,r){var o;if(va)e:{switch(e){case"compositionstart":var i=wa.compositionStart;break e;case"compositionend":i=wa.compositionEnd;break e;case"compositionupdate":i=wa.compositionUpdate;break e}i=void 0}else xa?nt(e,n)&&(i=wa.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=wa.compositionStart);return i?(ga&&"ko"!==n.locale&&(xa||i!==wa.compositionStart?i===wa.compositionEnd&&xa&&(o=Ze()):(la="value"in(sa=r)?sa.value:sa.textContent,xa=!0)),i=pa.getPooled(i,t,n,r),(o||null!==(o=rt(n)))&&(i.data=o),Ge(i),o=i):o=null,(e=ma?function(e,t){switch(e){case"compositionend":return rt(t);case"keypress":return 32!==t.which?null:(_a=!0,ba);case"textInput":return(e=t.data)===ba&&_a?null:e;default:return null}}(e,n):function(e,t){if(xa)return"compositionend"===e||!va&&nt(e,t)?(e=Ze(),fa=la=sa=null,xa=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ga&&"ko"!==t.locale?null:t.data}}(e,n))?((t=da.getPooled(wa.beforeInput,t,n,r)).data=e,Ge(t)):t=null,null===o?t:null===t?o:[o,t]}},Ea={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Oa={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ja=null,ka=null,$a=!1;Ro&&($a=ne("input")&&(!document.documentMode||9<document.documentMode));var Ca={eventTypes:Oa,_isInputEventSupported:$a,extractEvents:function(e,t,n,r){var o=t?Be(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=ct;else if(ot(o))if($a)a=ht;else{a=pt;var u=ft}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=dt);if(a&&(a=a(e,t)))return it(a,n,r);u&&u(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&R(o,"number",o.value)}},Aa=Je.extend({view:null,detail:null}),Pa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Ta=0,Ia=0,Ra=!1,La=!1,Da=Aa.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:yt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Ta;return Ta=e.screenX,Ra?"mousemove"===e.type?e.screenX-t:0:(Ra=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ia;return Ia=e.screenY,La?"mousemove"===e.type?e.screenY-t:0:(La=!0,0)}}),Na=Da.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ma={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ua={eventTypes:Ma,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Me(t):null)&&(t!==q(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var u=Da,c=Ma.mouseLeave,s=Ma.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(u=Na,c=Ma.pointerLeave,s=Ma.pointerEnter,l="pointer");if(e=null==a?i:Be(a),i=null==t?i:Be(t),(c=u.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=i,(n=u.getPooled(s,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(s=l,a=0,e=u=r;e;e=ze(e))a++;for(e=0,t=s;t;t=ze(t))e++;for(;0<a-e;)u=ze(u),a--;for(;0<e-a;)s=ze(s),e--;for(;a--;){if(u===s||u===s.alternate)break e;u=ze(u),s=ze(s)}u=null}else u=null;for(s=u,u=[];r&&r!==s&&(null===(a=r.alternate)||a!==s);)u.push(r),r=ze(r);for(r=[];l&&l!==s&&(null===(a=l.alternate)||a!==s);)r.push(l),l=ze(l);for(l=0;l<u.length;l++)Ke(u[l],"bubbled",c);for(l=r.length;0<l--;)Ke(r[l],"captured",n);return 0==(64&o)?[c]:[c,n]}},Ba="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fa=Object.prototype.hasOwnProperty,za=Ro&&"documentMode"in document&&11>=document.documentMode,Va={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ha=null,Wa=null,Ka=null,qa=!1,Ga={eventTypes:Va,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=K(o),i=Io.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Be(t):window,e){case"focus":(ot(o)||"true"===o.contentEditable)&&(Ha=o,Wa=t,Ka=null);break;case"blur":Ka=Wa=Ha=null;break;case"mousedown":qa=!0;break;case"contextmenu":case"mouseup":case"dragend":return qa=!1,gt(n,r);case"selectionchange":if(za)break;case"keydown":case"keyup":return gt(n,r)}return null}},Za=Je.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Ya=Je.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qa=Aa.extend({relatedTarget:null}),Ja={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xa={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eu=Aa.extend({key:function(e){if(e.key){var t=Ja[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=bt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Xa[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:yt,charCode:function(e){return"keypress"===e.type?bt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?bt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),tu=Da.extend({dataTransfer:null}),nu=Aa.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:yt}),ru=Je.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ou=Da.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),iu={eventTypes:Ui,extractEvents:function(e,t,n,r){var o=Bi.get(e);if(!o)return null;switch(e){case"keypress":if(0===bt(n))return null;case"keydown":case"keyup":e=eu;break;case"blur":case"focus":e=Qa;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Da;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=tu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=nu;break;case _i:case xi:case Si:e=Za;break;case Ei:e=ru;break;case"scroll":e=Aa;break;case"wheel":e=ou;break;case"copy":case"cut":case"paste":e=Ya;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Na;break;default:e=Je}return Ge(t=e.getPooled(o,t,n,r)),t}};if($o)throw Error(r(101));$o=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),u(),Oo=Fe,jo=Ue,ko=Be,l({SimpleEventPlugin:iu,EnterLeaveEventPlugin:Ua,ChangeEventPlugin:Ca,SelectEventPlugin:Ga,BeforeInputEventPlugin:Sa});var au,uu,cu,su=[],lu=-1,fu={},pu={current:fu},du={current:!1},hu=fu,vu=bo.unstable_runWithPriority,yu=bo.unstable_scheduleCallback,mu=bo.unstable_cancelCallback,gu=bo.unstable_requestPaint,bu=bo.unstable_now,wu=bo.unstable_getCurrentPriorityLevel,_u=bo.unstable_ImmediatePriority,xu=bo.unstable_UserBlockingPriority,Su=bo.unstable_NormalPriority,Eu=bo.unstable_LowPriority,Ou=bo.unstable_IdlePriority,ju={},ku=bo.unstable_shouldYield,$u=void 0!==gu?gu:function(){},Cu=null,Au=null,Pu=!1,Tu=bu(),Iu=1e4>Tu?bu:function(){return bu()-Tu},Ru={current:null},Lu=null,Du=null,Nu=null,Mu=!1,Uu=qo.ReactCurrentBatchConfig,Bu=(new mo.Component).refs,Fu={isMounted:function(e){return!!(e=e._reactInternalFiber)&&q(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=wr(),o=Uu.suspense;(o=Wt(r=_r(r,e,o),o)).payload=t,null!=n&&(o.callback=n),Kt(e,o),xr(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=wr(),o=Uu.suspense;(o=Wt(r=_r(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),Kt(e,o),xr(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=wr(),r=Uu.suspense;(r=Wt(n=_r(n,e,r),r)).tag=2,null!=t&&(r.callback=t),Kt(e,r),xr(e,n)}},zu=Array.isArray,Vu=rn(!0),Hu=rn(!1),Wu={},Ku={current:Wu},qu={current:Wu},Gu={current:Wu},Zu={current:0},Yu=qo.ReactCurrentDispatcher,Qu=qo.ReactCurrentBatchConfig,Ju=0,Xu=null,ec=null,tc=null,nc=!1,rc={readContext:zt,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useResponder:pn,useDeferredValue:pn,useTransition:pn},oc={readContext:zt,useCallback:Pn,useContext:zt,useEffect:On,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Sn(4,2,$n.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sn(4,2,e,t)},useMemo:function(e,t){var n=vn();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vn();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ln.bind(null,Xu,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vn().memoizedState=e},useState:wn,useDebugValue:An,useResponder:fn,useDeferredValue:function(e,t){var n=wn(e),r=n[0],o=n[1];return On((function(){var n=Qu.suspense;Qu.suspense=void 0===t?null:t;try{o(e)}finally{Qu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=wn(!1),n=t[0];return t=t[1],[Pn(Rn.bind(null,t,e),[t,e]),n]}},ic={readContext:zt,useCallback:Tn,useContext:zt,useEffect:jn,useImperativeHandle:Cn,useLayoutEffect:kn,useMemo:In,useReducer:gn,useRef:xn,useState:function(){return gn(mn)},useDebugValue:An,useResponder:fn,useDeferredValue:function(e,t){var n=gn(mn),r=n[0],o=n[1];return jn((function(){var n=Qu.suspense;Qu.suspense=void 0===t?null:t;try{o(e)}finally{Qu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=gn(mn),n=t[0];return t=t[1],[Tn(Rn.bind(null,t,e),[t,e]),n]}},ac={readContext:zt,useCallback:Tn,useContext:zt,useEffect:jn,useImperativeHandle:Cn,useLayoutEffect:kn,useMemo:In,useReducer:bn,useRef:xn,useState:function(){return bn(mn)},useDebugValue:An,useResponder:fn,useDeferredValue:function(e,t){var n=bn(mn),r=n[0],o=n[1];return jn((function(){var n=Qu.suspense;Qu.suspense=void 0===t?null:t;try{o(e)}finally{Qu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=bn(mn),n=t[0];return t=t[1],[Tn(Rn.bind(null,t,e),[t,e]),n]}},uc=null,cc=null,sc=!1,lc=qo.ReactCurrentOwner,fc=!1,pc={dehydrated:null,retryTime:0};au=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},uu=function(e,t,n,r,o){var i=e.memoizedProps;if(i!==r){var a,u,c=t.stateNode;switch(on(Ku.current),e=null,n){case"input":i=C(c,i),r=C(c,r),e=[];break;case"option":i=L(c,i),r=L(c,r),e=[];break;case"select":i=go({},i,{value:void 0}),r=go({},r,{value:void 0}),e=[];break;case"textarea":i=N(c,i),r=N(c,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(c.onclick=$e)}for(a in Oe(n,r),n=null,i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&null!=i[a])if("style"===a)for(u in c=i[a])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(To.hasOwnProperty(a)?e||(e=[]):(e=e||[]).push(a,null));for(a in r){var s=r[a];if(c=null!=i?i[a]:void 0,r.hasOwnProperty(a)&&s!==c&&(null!=s||null!=c))if("style"===a)if(c){for(u in c)!c.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in s)s.hasOwnProperty(u)&&c[u]!==s[u]&&(n||(n={}),n[u]=s[u])}else n||(e||(e=[]),e.push(a,n)),n=s;else"dangerouslySetInnerHTML"===a?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(a,s)):"children"===a?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(a,""+s):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(To.hasOwnProperty(a)?(null!=s&&ke(o,a),e||c===s||(e=[])):(e=e||[]).push(a,s))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},cu=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var dc="function"==typeof WeakSet?WeakSet:Set;function hc(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&hc(t)}function vc(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=$e));else if(4!==r&&null!==(e=e.child))for(vc(e,t,n),e=e.sibling;null!==e;)vc(e,t,n),e=e.sibling}function yc(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yc(e,t,n),e=e.sibling;null!==e;)yc(e,t,n),e=e.sibling}var mc,gc="function"==typeof WeakMap?WeakMap:Map,bc=Math.ceil,wc=qo.ReactCurrentDispatcher,_c=qo.ReactCurrentOwner,xc=0,Sc=3,Ec=4,Oc=0,jc=null,kc=null,$c=0,Cc=xc,Ac=null,Pc=1073741823,Tc=1073741823,Ic=null,Rc=0,Lc=!1,Dc=0,Nc=null,Mc=!1,Uc=null,Bc=null,Fc=!1,zc=null,Vc=90,Hc=null,Wc=0,Kc=null,qc=0;function Gc(e,t){if(qc=0,t)return ao(e,t=wr()),Or(e),null;var n=Er(e);if(0!==n){if(t=e.callbackNode,0!=(48&Oc))throw Error(r(327));if(zr(),e===jc&&n===$c||Cr(e,n),null!==kc){var o=Oc;Oc|=16;for(var i=Pr();;)try{Lr();break}catch(t){Ar(e,t)}if(Mt(),Oc=o,wc.current=i,1===Cc)throw t=Ac,Cr(e,n),oo(e,n),Or(e),t;if(null===kc)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,o=Cc,jc=null,o){case xc:case 1:throw Error(r(345));case 2:ao(e,2<n?2:n);break;case Sc:if(oo(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Mr(i)),1073741823===Pc&&10<(i=Dc+500-Iu())){if(Lc){var a=e.lastPingedTime;if(0===a||a>=n){e.lastPingedTime=n,Cr(e,n);break}}if(0!==(a=Er(e))&&a!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}e.timeoutHandle=ra(Ur.bind(null,e),i);break}Ur(e);break;case Ec:if(oo(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Mr(i)),Lc&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,Cr(e,n);break}if(0!==(i=Er(e))&&i!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}if(1073741823!==Tc?o=10*(1073741821-Tc)-Iu():1073741823===Pc?o=0:(o=10*(1073741821-Pc)-5e3,0>(o=(i=Iu())-o)&&(o=0),(n=10*(1073741821-n)-i)<(o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bc(o/1960))-o)&&(o=n)),10<o){e.timeoutHandle=ra(Ur.bind(null,e),o);break}Ur(e);break;case 5:if(1073741823!==Pc&&null!==Ic){a=Pc;var u=Ic;if(0>=(o=0|u.busyMinDurationMs)?o=0:(i=0|u.busyDelayMs,o=(a=Iu()-(10*(1073741821-a)-(0|u.timeoutMs||5e3)))<=i?0:i+o-a),10<o){oo(e,n),e.timeoutHandle=ra(Ur.bind(null,e),o);break}}Ur(e);break;default:throw Error(r(329))}if(Or(e),e.callbackNode===t)return Gc.bind(null,e)}}return null}mc=function(e,t,n){var o=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||du.current)fc=!0;else{if(o<n){switch(fc=!1,t.tag){case 3:Yn(t),Fn();break;case 5:if(cn(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:St(t.type)&&kt(t);break;case 4:an(t,t.stateNode.containerInfo);break;case 10:o=t.memoizedProps.value,i=t.type._context,_t(Ru,i._currentValue),i._currentValue=o;break;case 13:if(null!==t.memoizedState)return 0!==(o=t.child.childExpirationTime)&&o>=n?Qn(e,t,n):(_t(Zu,1&Zu.current),null!==(t=tr(e,t,n))?t.sibling:null);_t(Zu,1&Zu.current);break;case 19:if(o=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(o)return er(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),_t(Zu,Zu.current),!o)return null}return tr(e,t,n)}fc=!1}}else fc=!1;switch(t.expirationTime=0,t.tag){case 2:if(o=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=xt(t,pu.current),Ft(t,n),i=hn(null,t,o,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,St(o)){var a=!0;kt(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Vt(t);var u=o.getDerivedStateFromProps;"function"==typeof u&&Yt(t,o,u,e),i.updater=Fu,t.stateNode=i,i._reactInternalFiber=t,en(t,o,e,n),t=Zn(null,t,o,!0,a,n)}else t.tag=0,zn(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=function(e){if("function"==typeof e)return Yr(e)?1:0;if(null!=e){if((e=e.$$typeof)===oi)return 11;if(e===ui)return 14}return 2}(i),e=Nt(i,e),a){case 0:t=qn(null,t,i,e,n);break e;case 1:t=Gn(null,t,i,e,n);break e;case 11:t=Vn(null,t,i,e,n);break e;case 14:t=Hn(null,t,i,Nt(i.type,e),o,n);break e}throw Error(r(306,i,""))}return t;case 0:return o=t.type,i=t.pendingProps,qn(e,t,o,i=t.elementType===o?i:Nt(o,i),n);case 1:return o=t.type,i=t.pendingProps,Gn(e,t,o,i=t.elementType===o?i:Nt(o,i),n);case 3:if(Yn(t),o=t.updateQueue,null===e||null===o)throw Error(r(282));if(o=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,Ht(e,t),Gt(t,o,null,n),(o=t.memoizedState.element)===i)Fn(),t=tr(e,t,n);else{if((i=t.stateNode.hydrate)&&(cc=De(t.stateNode.containerInfo.firstChild),uc=t,i=sc=!0),i)for(n=Hu(t,null,o,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else zn(e,t,o,n),Fn();t=t.child}return t;case 5:return cn(t),null===e&&Mn(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,u=i.children,Le(o,i)?u=null:null!==a&&Le(o,a)&&(t.effectTag|=16),Kn(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(zn(e,t,u,n),t=t.child),t;case 6:return null===e&&Mn(t),null;case 13:return Qn(e,t,n);case 4:return an(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Vu(t,null,o,n):zn(e,t,o,n),t.child;case 11:return o=t.type,i=t.pendingProps,Vn(e,t,o,i=t.elementType===o?i:Nt(o,i),n);case 7:return zn(e,t,t.pendingProps,n),t.child;case 8:case 12:return zn(e,t,t.pendingProps.children,n),t.child;case 10:e:{o=t.type._context,i=t.pendingProps,u=t.memoizedProps,a=i.value;var c=t.type._context;if(_t(Ru,c._currentValue),c._currentValue=a,null!==u)if(c=u.value,0==(a=Ba(c,a)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(c,a):1073741823))){if(u.children===i.children&&!du.current){t=tr(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var s=c.dependencies;if(null!==s){u=c.child;for(var l=s.firstContext;null!==l;){if(l.context===o&&0!=(l.observedBits&a)){1===c.tag&&((l=Wt(n,null)).tag=2,Kt(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),Bt(c.return,n),s.expirationTime<n&&(s.expirationTime=n);break}l=l.next}}else u=10===c.tag&&c.type===t.type?null:c.child;if(null!==u)u.return=c;else for(u=c;null!==u;){if(u===t){u=null;break}if(null!==(c=u.sibling)){c.return=u.return,u=c;break}u=u.return}c=u}zn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,o=(a=t.pendingProps).children,Ft(t,n),o=o(i=zt(i,a.unstable_observedBits)),t.effectTag|=1,zn(e,t,o,n),t.child;case 14:return a=Nt(i=t.type,t.pendingProps),Hn(e,t,i,a=Nt(i.type,a),o,n);case 15:return Wn(e,t,t.type,t.pendingProps,o,n);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:Nt(o,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,St(o)?(e=!0,kt(t)):e=!1,Ft(t,n),Jt(t,o,i),en(t,o,i,n),Zn(null,t,o,!0,e,n);case 19:return er(e,t,n)}throw Error(r(156,t.tag))};var Zc=null,Yc=null;fo.prototype.render=function(e){uo(e,this._internalRoot,null,null)},fo.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;uo(null,e,null,(function(){t[ca]=null}))},gi=function(e){if(13===e.tag){var t=Dt(wr(),150,100);xr(e,t),lo(e,t)}},bi=function(e){13===e.tag&&(xr(e,3),lo(e,3))},wi=function(e){if(13===e.tag){var t=wr();xr(e,t=_r(t,e,null)),lo(e,t)}},Lo=function(e,t,n){switch(t){case"input":if(T(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=Fe(o);if(!i)throw Error(r(90));$(o),T(o,i)}}}break;case"textarea":U(e,n);break;case"select":null!=(t=n.value)&&D(e,!!n.multiple,t,!1)}},v=kr,y=function(e,t,n,r,o){var i=Oc;Oc|=4;try{return Pt(98,e.bind(null,t,n,r,o))}finally{0===(Oc=i)&&Rt()}},m=function(){0==(49&Oc)&&(function(){if(null!==Hc){var e=Hc;Hc=null,e.forEach((function(e,t){ao(t,e),Or(t)})),Rt()}}(),zr())},Mo=function(e,t){var n=Oc;Oc|=2;try{return e(t)}finally{0===(Oc=n)&&Rt()}};var Qc,Jc,Xc={Events:[Ue,Be,Fe,l,Po,Ge,function(e){J(e,qe)},d,h,_e,ee,zr,{current:!1}]};Jc=(Qc={findFiberByHostInstance:Me,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Zc=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Yc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(go({},Qc,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Y(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Jc?Jc(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xc,t.createPortal=yo,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw Error(r(268,Object.keys(e)))}return null===(e=Y(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Oc))throw Error(r(187));var n=Oc;Oc|=1;try{return Pt(99,e.bind(null,t))}finally{Oc=n,Rt()}},t.hydrate=function(e,t,n){if(!po(t))throw Error(r(200));return ho(null,e,t,!0,n)},t.render=function(e,t,n){if(!po(t))throw Error(r(200));return ho(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!po(e))throw Error(r(40));return!!e._reactRootContainer&&($r((function(){ho(null,null,e,!1,(function(){e._reactRootContainer=null,e[ca]=null}))})),!0)},t.unstable_batchedUpdates=kr,t.unstable_createPortal=function(e,t){return yo(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!po(n))throw Error(r(200));if(null==e||void 0===e._reactInternalFiber)throw Error(r(38));return ho(e,t,n,!1,o)},t.version="16.14.0"},2788:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},6697:function(e,t){"use strict";var n=function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case u:case s:case c:case v:return e;default:switch(e=e&&e.$$typeof){case f:case h:case g:case m:case l:return e;default:return t}}case a:return t}}},r=function(e){return n(e)===d},o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,v=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,g=o?Symbol.for("react.lazy"):60116,b=o?Symbol.for("react.block"):60121,w=o?Symbol.for("react.fundamental"):60117,_=o?Symbol.for("react.responder"):60118,x=o?Symbol.for("react.scope"):60119;t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=f,t.ContextProvider=l,t.Element=i,t.ForwardRef=h,t.Fragment=u,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=c,t.Suspense=v,t.isAsyncMode=function(e){return r(e)||n(e)===p},t.isConcurrentMode=r,t.isContextConsumer=function(e){return n(e)===f},t.isContextProvider=function(e){return n(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return n(e)===h},t.isFragment=function(e){return n(e)===u},t.isLazy=function(e){return n(e)===g},t.isMemo=function(e){return n(e)===m},t.isPortal=function(e){return n(e)===a},t.isProfiler=function(e){return n(e)===s},t.isStrictMode=function(e){return n(e)===c},t.isSuspense=function(e){return n(e)===v},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===d||e===s||e===c||e===v||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===f||e.$$typeof===h||e.$$typeof===w||e.$$typeof===_||e.$$typeof===x||e.$$typeof===b)},t.typeOf=n},2594:function(e,t,n){"use strict";e.exports=n(6697)},9547:function(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2816:function(e,t,n){var r=function(e,t){for(var n,r=[],o=0,i=0,c="",s=t&&t.delimiter||"/";null!=(n=d.exec(e));){var l=n[0],f=n[1],p=n.index;if(c+=e.slice(i,p),i=p+l.length,f)c+=f[1];else{var h=e[i],v=n[2],y=n[3],m=n[4],g=n[5],b=n[6],w=n[7];c&&(r.push(c),c="");var _=null!=v&&null!=h&&h!==v,x="+"===b||"*"===b,S="?"===b||"*"===b,E=n[2]||s,O=m||g;r.push({name:y||o++,prefix:v||"",delimiter:E,optional:S,repeat:x,partial:_,asterisk:!!w,pattern:O?u(O):w?".*":"[^"+a(E)+"]+?"})}}return i<e.length&&(c+=e.substr(i)),c&&r.push(c),r},o=function(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},i=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",l(t)));return function(t,r){for(var i=function(t,r,o,i){var u=e[i];if("string"!=typeof u){var c,s=r[u.name];if(null==s){if(u.optional)return u.partial&&(t+=u.prefix),a=t,"continue";throw new TypeError('Expected "'+u.name+'" to be defined')}if(p(s)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(s)+"`");if(0===s.length){if(u.optional)return a=t,"continue";throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<s.length;l++){if(c=o(s[l]),!n[i].test(c))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(c)+"`");t+=(0===l?u.prefix:u.delimiter)+c}}else{if(c=u.asterisk?encodeURI(s).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):o(s),!n[i].test(c))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+c+'"');t+=u.prefix+c}}else t+=u;a=t},a="",u=t||{},c=(r||{}).pretty?o:encodeURIComponent,s=0;s<e.length;s++)i(a,u,c,s);return a}},a=function(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")},u=function(e){return e.replace(/([=!:$\/()])/g,"\\$1")},s=function(e,t){return e.keys=t,e},l=function(e){return e&&e.sensitive?"":"i"},f=function(e,t,n){p(t)||(n=t||n,t=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",u=0;u<e.length;u++){var c=e[u];if("string"==typeof c)i+=a(c);else{var f=a(c.prefix),d="(?:"+c.pattern+")";t.push(c),c.repeat&&(d+="(?:"+f+d+")*"),i+=d=c.optional?c.partial?f+"("+d+")?":"(?:"+f+"("+d+"))?":f+"("+d+")"}}var h=a(n.delimiter||"/"),v=i.slice(-h.length)===h;return r||(i=(v?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&v?"":"(?="+h+"|$)",s(new RegExp("^"+i,l(n)),t)},p=n(9547);e.exports=function e(t,n,o){return p(n)||(o=n||o,n=[]),o=o||{},c(t,RegExp)?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return s(e,t)}(t,n):p(t)?function(t,n,r){for(var o=[],i=0;i<t.length;i++)o.push(e(t[i],n,r).source);return s(new RegExp("(?:"+o.join("|")+")",l(r)),n)}(t,n,o):(i=n,f(r(t,a=o),i,a));var i,a},e.exports.parse=r,e.exports.compile=function(e,t){return i(r(e,t),t)},e.exports.tokensToFunction=i,e.exports.tokensToRegExp=f;var d=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},8447:function(e,t,n){"use strict";var r=function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."},o=function(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||T},i=function(){},a=function(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||T},u=function(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)D.call(t,r)&&!N.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:w,type:e,key:i,ref:a,props:o,_owner:L.current}},c=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===w},s=function(e,t,n,r){if(U.length){var o=U.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}},l=function(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>U.length&&U.push(e)},f=function(e,t,n){return null==e?0:B(e,"",t,n)},d=function(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r},h=function(e,t){e.func.call(e.context,t,e.count++)},v=function(e,t,n){var r,o,i=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?y(e,i,n,(function(e){return e})):null!=e&&(c(e)&&(r=e,o=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(M,"$&/")+"/")+n,e={$$typeof:w,type:r.type,key:o,ref:r.ref,props:r.props,_owner:r._owner}),i.push(e))},y=function(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(M,"$&/")+"/"),f(e,v,t=s(t,i,r,o)),l(t)},m=function(){var e=F.current;if(null===e)throw Error(r(321));return e},g=n(4516),b="function"==typeof Symbol&&Symbol.for,w=b?Symbol.for("react.element"):60103,_=b?Symbol.for("react.portal"):60106,x=b?Symbol.for("react.fragment"):60107,S=b?Symbol.for("react.strict_mode"):60108,E=b?Symbol.for("react.profiler"):60114,O=b?Symbol.for("react.provider"):60109,j=b?Symbol.for("react.context"):60110,k=b?Symbol.for("react.forward_ref"):60112,$=b?Symbol.for("react.suspense"):60113,C=b?Symbol.for("react.memo"):60115,A=b?Symbol.for("react.lazy"):60116,P="function"==typeof Symbol&&Symbol.iterator,T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I={};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(r(85));this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var R=a.prototype=new i;R.constructor=a,g(R,o.prototype),R.isPureReactComponent=!0;var L={current:null},D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,U=[];function B(e,t,n,o){var i=void 0===e?"undefined":p(e);"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case w:case _:a=!0}}if(a)return n(o,e,""===t?"."+d(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+d(i=e[u],u);a+=B(i,c,n,o)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=P&&e[P]||e["@@iterator"])?c:null))for(e=c.call(e),u=0;!(i=e.next()).done;)a+=B(i=i.value,c=t+d(i,u++),n,o);else if("object"===i)throw n=""+e,Error(r(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}var F={current:null},z={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:L,IsSomeRendererActing:{current:!1},assign:g};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return y(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;f(e,h,t=s(null,null,t,n)),l(t)},count:function(e){return f(e,(function(){return null}),null)},toArray:function(e){var t=[];return y(e,t,null,(function(e){return e})),t},only:function(e){if(!c(e))throw Error(r(143));return e}},t.Component=o,t.Fragment=x,t.Profiler=E,t.PureComponent=a,t.StrictMode=S,t.Suspense=$,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null==e)throw Error(r(267,e));var o=g({},e.props),i=e.key,a=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,u=L.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)D.call(t,s)&&!N.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:w,type:e.type,key:i,ref:a,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:j,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:O,_context:e},e.Consumer=e},t.createElement=u,t.createFactory=function(e){var t=u.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:k,render:e}},t.isValidElement=c,t.lazy=function(e){return{$$typeof:A,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:C,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return m().useCallback(e,t)},t.useContext=function(e,t){return m().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return m().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return m().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return m().useLayoutEffect(e,t)},t.useMemo=function(e,t){return m().useMemo(e,t)},t.useReducer=function(e,t,n){return m().useReducer(e,t,n)},t.useRef=function(e){return m().useRef(e)},t.useState=function(e){return m().useState(e)},t.version="16.14.0"},2735:function(e,t,n){"use strict";e.exports=n(8447)},1602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},r=function(e,t,n,r){var a,u,s,l,f=t&&c(t.prototype,i)?t:i,p=Object.create(f.prototype),h=new d(r||[]);return p._invoke=(a=e,u=n,s=h,l=x,function(e,t){if(l===E)throw new Error("Generator is already running");if(l===O){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=P(n,s);if(r){if(r===j)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===x)throw l=O,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=E;var i=o(a,u,s);if("normal"===i.type){if(l=s.done?O:S,i.arg===j)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=O,s.method="throw",s.arg=i.arg)}}),p},o=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},i=function(){},a=function(){},u=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,i,a,u){var c=o(e[r],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=r;var x="suspendedStart",S="suspendedYield",E="executing",O="completed",j={},k={};n(k,b,(function(){return this}));var $=Object.getPrototypeOf,C=$&&$($(h([])));C&&C!==y&&m.call(C,b)&&(k=C);var A=u.prototype=i.prototype=Object.create(k);function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var i=o(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,j;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,j):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=u,n(A,"constructor",u),n(u,"constructor",a),a.displayName=n(u,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,n(e,_,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var u=new l(r(t,n,o,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(A),n(A,_,"Generator"),n(A,b,(function(){return this})),n(A,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),j}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),j}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},1720:function(e,t,n){"use strict";var r=function(e){return e},o=function(e){return 0===e.length?r:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},i=function(e){if(e||(e=p.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e};n.d(t,{y:function(){return d}});var a,u=n(7811),s=n(9573),l=n(2412),f="function"==typeof Symbol&&Symbol.observable||"@@observable",p=n(5769),d=((a=function(e){this._isScalar=!1,e&&(this._subscribe=e)}).prototype.lift=function(e){var t=new a;return t.source=this,t.operator=e,t},a.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(c(e,u.L))return e;if(e[s.b])return e[s.b]()}return e||t||n?new u.L(e,t,n):new u.L(l.c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||p.v.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),p.v.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},a.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){p.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&c(r,u.L)?r:null}return!0}(e)?e.error(t):console.warn(t)}},a.prototype.forEach=function(e,t){var n=this;return new(t=i(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},a.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},a.prototype[f]=function(){return this},a.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:o(e)(this)},a.prototype.toPromise=function(e){var t=this;return new(e=i(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},a.create=function(e){return new a(e)},a)},2412:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},7860:function(e,t,n){"use strict";n.d(t,{xQ:function(){return d}});var r,o,i=n(7080),a=n(1720),u=n(7811),c=n(6462),s=n(7043),l=(r=c.w,o=function(e,t){var n=r.call(this)||this;return n.subject=e,n.subscriber=t,n.closed=!1,n},i.ZT(o,r),o.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},o),f=n(9573),p=function(e){var t=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return i.ZT(t,e),t}(u.L),d=function(e){var t=function(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t};return i.ZT(t,e),t.prototype[f.b]=function(){return new p(this)},t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new s.N;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new s.N;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new s.N;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new s.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.N;return this.hasError?(e.error(this.thrownError),c.w.EMPTY):this.isStopped?(e.complete(),c.w.EMPTY):(this.observers.push(e),new l(this,e))},t.prototype.asObservable=function(){var e=new a.y;return e.source=this,e},t.create=function(e,t){return new h(e,t)},t}(a.y),h=function(e){var t=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return i.ZT(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):c.w.EMPTY},t}(d)},7811:function(e,t,n){"use strict";n.d(t,{L:function(){return d}});var r,o,i=n(7080),a=n(9147),u=n(2412),s=n(6462),l=n(9573),f=n(5769),p=n(1450),d=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u.c;break;case 1:if(!n){i.destination=u.c;break}if("object"==typeof n){c(n,t)?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new h(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new h(i,n,r,o)}return i}return i.ZT(t,e),t.prototype[l.b]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.w),h=(r=d,o=function(e,t,n,o){var i,c=r.call(this)||this;c._parentSubscriber=e;var s=c;return(0,a.m)(t)?i=t:t&&(i=t.next,n=t.error,o=t.complete,t!==u.c&&(s=Object.create(t),(0,a.m)(s.unsubscribe)&&c.add(s.unsubscribe.bind(s)),s.unsubscribe=c.unsubscribe.bind(c))),c._context=s,c._next=i,c._error=n,c._complete=o,c},i.ZT(o,r),o.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;f.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},o.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=f.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,p.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,p.z)(e)}}},o.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};f.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},o.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),f.v.useDeprecatedSynchronousErrorHandling)throw e;(0,p.z)(e)}},o.prototype.__tryOrSetError=function(e,t,n){if(!f.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return f.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,p.z)(t),!0)}return!1},o.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},o)},6462:function(e,t,n){"use strict";var r=function(e){return e.reduce((function(e,t){return e.concat(c(t,u)?t.errors:t)}),[])};n.d(t,{w:function(){return s}});var o,i=Array.isArray||function(e){return e&&"number"==typeof e.length},a=n(9147),u=((o=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}).prototype=Object.create(Error.prototype),o),s=function(){var e,t=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n,o=this,s=o._parentOrParents,l=o._ctorUnsubscribe,f=o._unsubscribe,p=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c(s,t))s.remove(this);else if(null!==s)for(var d=0;d<s.length;++d)s[d].remove(this);if((0,a.m)(f)){l&&(this._unsubscribe=void 0);try{f.call(this)}catch(t){e=c(t,u)?r(t.errors):[t]}}if(i(p)){d=-1;for(var h=p.length;++d<h;){var v=p[d];if(null!==(n=v)&&"object"==typeof n)try{v.unsubscribe()}catch(t){e=e||[],c(t,u)?e=e.concat(r(t.errors)):e.push(t)}}}if(e)throw new u(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(void 0===e?"undefined":p(e)){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!c(n,t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(c(o,t)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}()},5769:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},9573:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},7043:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var r,o=((r=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}).prototype=Object.create(Error.prototype),r)},1450:function(e,t,n){"use strict";var r=function(e){setTimeout((function(){throw e}),0)};n.d(t,{z:function(){return r}})},9147:function(e,t,n){"use strict";var r=function(e){return"function"==typeof e};n.d(t,{m:function(){return r}})},7080:function(e,t,n){"use strict";var r=function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};n.d(t,{ZT:function(){return r}});var o=function(e,t){return(o=Object.setPrototypeOf||c({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)}},9666:function(e,t){"use strict";var n,r,o,i,a,u=function(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<l(o,t)))break e;e[r]=t,e[n]=o,n=r}},c=function(e){return void 0===(e=e[0])?null:e},s=function(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,c=e[u];if(void 0!==a&&0>l(a,n))void 0!==c&&0>l(c,a)?(e[r]=c,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==c&&0>l(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}return null},l=function(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id},f=function(e){for(var t=c(T);null!==t;){if(null===t.callback)s(T);else{if(!(t.startTime<=e))break;s(T),t.sortIndex=t.expirationTime,u(P,t)}t=c(T)}},p=function(e,n){N=!1,M&&(M=!1,o()),D=!0;var a=L;try{for(f(n),R=c(P);null!==R&&(!(R.expirationTime>n)||e&&!i());){var u=R.callback;if(null!==u){R.callback=null,L=R.priorityLevel;var l=u(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?R.callback=l:R===c(P)&&s(P),f(n)}else s(P);R=c(P)}if(null!==R)var p=!0;else{var d=c(T);null!==d&&r(U,d.startTime-n),p=!1}return p}finally{R=null,L=a,D=!1}},d=function(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}};if("undefined"==typeof window||"function"!=typeof MessageChannel){var h=null,v=null,y=function(){if(null!==h)try{var e=t.unstable_now();h(!0,e),h=null}catch(e){throw setTimeout(y,0),e}},m=Date.now();t.unstable_now=function(){return Date.now()-m},n=function(e){null!==h?setTimeout(n,0,e):(h=e,setTimeout(y,0))},r=function(e,t){v=setTimeout(e,t)},o=function(){clearTimeout(v)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var g=window.performance,b=window.Date,w=window.setTimeout,_=window.clearTimeout;if("undefined"!=typeof console){var x=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof x&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof g&&"function"==typeof g.now)t.unstable_now=function(){return g.now()};else{var S=b.now();t.unstable_now=function(){return b.now()-S}}var E=!1,O=null,j=-1,k=5,$=0;i=function(){return t.unstable_now()>=$},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=0<e?Math.floor(1e3/e):5};var C=new MessageChannel,A=C.port2;C.port1.onmessage=function(){if(null!==O){var e=t.unstable_now();$=e+k;try{O(!0,e)?A.postMessage(null):(E=!1,O=null)}catch(e){throw A.postMessage(null),e}}else E=!1},n=function(e){O=e,E||(E=!0,A.postMessage(null))},r=function(e,n){j=w((function(){e(t.unstable_now())}),n)},o=function(){_(j),j=-1}}var P=[],T=[],I=1,R=null,L=3,D=!1,N=!1,M=!1;function U(e){if(M=!1,f(e),!N)if(null!==c(P))N=!0,n(p);else{var t=c(T);null!==t&&r(U,t.startTime-e)}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||D||(N=!0,n(p))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return c(P)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:d(e)}else a=d(e),l=s;return e={id:I++,callback:i,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,u(T,e),null===c(P)&&e===c(T)&&(M?o():M=!0,r(U,l-s))):(e.sortIndex=a,u(P,e),N||D||(N=!0,n(p))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();f(e);var n=c(P);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<R.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},9146:function(e,t,n){"use strict";e.exports=n(9666)},3710:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e,t,n){var r=s(e,t,n);de.length?de.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},i=function(e){if("function"!=typeof e)throw Error(u(28,!1));de.push(e)},a=function(e){if("function"!=typeof e)throw Error(u(29,!1));var t=!1;return de=de.filter((function(n){var r=n===e;return t=t||r,!r})),t},u=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},s=function(e,t,n){var r,o="".concat(v(t)," '").concat(d(t),"' died in status ").concat(t.status,": ");if(c(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(u(30,!1,t.status,d(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=d(t),t.status=n,r},l=function(e){return e.status===we},f=function(e){try{return e.activeWhen(window.location)}catch(t){return o(t,e,Ee),!1}},d=function(e){return e.name},h=function(e){return Boolean(e.unmountThisParcel)},v=function(e){return h(e)?"parcel":"application"},y=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},m=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},g=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!m(t,(function(e){return"function"!=typeof e}))));var t},b=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=v(e),o=d(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return w(n)?n:Promise.reject(u(15,!1,r,o,t,a))}))}),Promise.resolve())}},w=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},_=function(e,t){return Promise.resolve().then((function(){return e.status!==ye?e:(e.status=me,e.bootstrap?T(e,"bootstrap").then(n).catch((function(n){if(t)throw s(n,e,Ee);return o(n,e,Ee),e})):Promise.resolve().then(n))}));function n(){return e.status=ge,e}},x=function(e,t){return Promise.resolve().then((function(){if(e.status!==we)return e;e.status=xe;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw s(r,e,Ee);o(r,e,Ee)}))})).then((function(){return e}));function r(){return T(e,"unmount").then((function(){e.status=ge})).catch((function(n){if(t)throw s(n,e,Ee);o(n,e,Ee)}))}}))},S=function(e,t){return Promise.resolve().then((function(){return e.status!==ge?e:(Oe||(window.dispatchEvent(new pe("single-spa:before-first-mount")),Oe=!0),T(e,"mount").then((function(){return e.status=we,je||(window.dispatchEvent(new pe("single-spa:first-mount")),je=!0),e})).catch((function(n){return e.status=we,x(e,!0).then(r,r);function r(){if(t)throw s(n,e,Ee);return o(n,e,Ee),e}})))}))},E=function(){return O.apply($e,arguments)},O=function(e,t){var n=this;if(!e||"object"!==se(e)&&"function"!=typeof e)throw Error(u(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(u(3,!1,se(e.name)));if("object"!==se(t))throw Error(u(4,!1,name,se(t)));if(!t.domElement)throw Error(u(5,!1,name));var r,o=ke++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},c={id:o,parcels:{},status:i?ve:ye,customProps:t,parentName:d(n),unmountThisParcel:function(){return v.then((function(){if(c.status!==we)throw Error(u(6,!1,name,c.status));return x(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=Ee,p(e),e}))}};n.parcels[o]=c;var l=a();if(!l||"function"!=typeof l.then)throw Error(u(7,!1));var f,p,h=(l=l.then((function(e){if(!e)throw Error(u(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!g(e.bootstrap))throw Error(u(9,!1,t));if(!g(e.mount))throw Error(u(10,!1,t));if(!g(e.unmount))throw Error(u(11,!1,t));if(e.update&&!g(e.update))throw Error(u(12,!1,t));var n=b(e,"bootstrap"),i=b(e,"mount"),a=b(e,"unmount");c.status=ye,c.name=t,c.bootstrap=n,c.mount=i,c.unmount=a,c.timeouts=I(e.timeouts),e.update&&(c.update=b(e,"update"),r.update=function(e){return c.customProps=e,j((t=c,Promise.resolve().then((function(){if(t.status!==we)throw Error(u(32,!1,d(t)));return t.status=_e,T(t,"update").then((function(){return t.status=we,t})).catch((function(e){throw s(e,t,Ee)}))}))));var t})}))).then((function(){return _(c,!0)})),v=h.then((function(){return S(c,!0)})),y=new Promise((function(e,t){f=e,p=t}));return r={mount:function(){return j(Promise.resolve().then((function(){if(c.status!==ge)throw Error(u(13,!1,name,c.status));return n.parcels[o]=c,S(c)})))},unmount:function(){return j(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:j(l),bootstrapPromise:j(h),mountPromise:j(v),unmountPromise:j(y)}},j=function(e){return e.then((function(){return null}))},k=function(e){var t=d(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==se(n)||null===n||Array.isArray(n))&&(n={},console.warn(u(40,!1),t,n));var r=y({},n,{name:t,mountParcel:O.bind(e),singleSpa:ce});return h(e)&&(r.unmountSelf=e.unmountThisParcel),r},$=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(16,!1));Ce.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},C=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(17,!1));Ce.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},A=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(18,!1));Ce.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},P=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(19,!1));Ce.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},T=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=v(e);return new Promise((function(i,a){var c=!1,s=!1;e[t](k(e)).then((function(e){c=!0,i(e)})).catch((function(e){c=!0,a(e)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),n.millis);var l=u(31,!1,t,o,d(e),n.millis);function f(e){if(!c)if(!0===e)s=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!s){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return f(t+1)}),r)}}}))},I=function(e){var t={};for(var n in Ce)t[n]=y({},Ce[n],e&&e[n]||{});return t},R=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==he&&e.status!==Se?e:(e.status=ve,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(k(e));if(!w(r))throw n=!0,Error(u(33,!1,d(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==se(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!g(t.bootstrap)&&(r=35),g(t.mount)||(r=36),g(t.unmount)||(r=37);var i=v(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(u(r,!1,i,d(e),a),t),o(void 0,e,Ee),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=y({},e.devtools.overlays,t.devtools.overlays)),e.status=ye,e.bootstrap=b(t,"bootstrap"),e.mount=b(t,"mount"),e.unmount=b(t,"unmount"),e.unload=b(t,"unload"),e.timeouts=I(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Ee:(r=Se,e.loadErrorTime=(new Date).getTime()),o(t,e,r),e})));var t,n}))},L=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(u(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=B(window.location.href),r=B(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},D=function(e){var t=this;if(e){var n=e[0].type;Te.indexOf(n)>=0&&Pe[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},N=function(){Fe([],arguments)},M=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return le&&n===o||(ue()?window.dispatchEvent(U(window.history.state,t)):Fe([])),r}},U=function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n},B=function(e){var t=document.createElement("a");return t.href=e,t},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Le){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return z.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return z.call(this,n,window.removeEventListener,e,t,arguments)},Le=!0}},z=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Te.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},V=function(e){return Promise.resolve().then((function(){var t=De[d(e)];if(!t)return e;if(e.status===he)return H(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==ge&&e.status!==Se)return e;var n=e.status===Se?Promise.resolve():T(e,"unload");return e.status="UNLOADING",n.then((function(){return H(e,t),e})).catch((function(n){return i=t,a=n,delete De[d(r=e)],delete r.bootstrap,delete r.mount,delete r.unmount,delete r.unload,o(a,r,Ee),i.reject(a),e;var r,i,a}))}))},H=function(e,t){delete De[d(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=he,t.resolve()},W=function(e,t,n,r){De[d(e)]={app:e,resolve:n,reject:r},Object.defineProperty(De[d(e)],"promise",{get:t})},K=function(e){return De[e]},q=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Ne.forEach((function(i){var a=i.status!==Ee&&f(i);switch(i.status){case Se:a&&o-i.loadErrorTime>=200&&n.push(i);break;case he:case ve:a&&n.push(i);break;case ye:case ge:!a&&K(d(i))?e.push(i):a&&r.push(i);break;case we:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}},G=function(){return Ne.filter(l).map(d)},Z=function(){return Ne.map(d)},Y=function(e){var t=m(Ne,(function(t){return d(t)===e}));return t?t.status:null},Q=function(e,t,n,r){var o=function(e,t,n,r){var o,i,a,c={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===se(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(u(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(u(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(u(20,!1));if("object"!==se(e.app)&&"function"!=typeof e.app)throw Error(u(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(u(24,!1));if(!ne(e.customProps))throw Error(u(22,!1))}(e),c.name=e.name,c.loadApp=e.app,c.activeWhen=e.activeWhen,c.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(u(20,!1));if(!t)throw Error(u(23,!1));if("function"!=typeof n)throw Error(u(24,!1));if(!ne(r))throw Error(u(22,!1))}(e,t,n,r),c.name=e,c.loadApp=t,c.activeWhen=n,c.customProps=r),c.loadApp="function"!=typeof(o=c.loadApp)?function(){return Promise.resolve(o)}:o,c.customProps=c.customProps||{},c.activeWhen=(i=c.activeWhen,a=(a=Array.isArray(i)?i:[i]).map((function(e){return"function"==typeof e?e:re(e)})),function(e){return a.some((function(t){return t(e)}))}),c}(e,t,n,r);if(-1!==Z().indexOf(o.name))throw Error(u(21,!1,o.name));Ne.push(y({loadErrorTime:null,status:he,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Ae&&(F(),Fe())},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Ne.filter((function(t){return t.activeWhen(e)})).map(d)},X=function(e){if(0===Ne.filter((function(t){return d(t)===e})).length)throw Error(u(25,!1,e));return ee(e).then((function(){var t=Ne.map(d).indexOf(e);Ne.splice(t,1)}))},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(u(26,!1));var n=m(Ne,(function(t){return d(t)===e}));if(!n)throw Error(u(27,!1,e));var r,o=K(d(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){W(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,te(n,o.resolve,o.reject)):r=new Promise((function(e,t){W(n,(function(){return r}),e,t),te(n,e,t)})),r},te=function(e,t,n){x(e).then(V).then((function(){t(),setTimeout((function(){Fe()}))})).catch(n)},ne=function(e){return!e||"function"==typeof e||"object"===se(e)&&null!==e&&!Array.isArray(e)},re=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},oe=function(){return Fe()},ie=function(e,t){return f(e)?_(e).then((function(e){return t.then((function(){return f(e)?S(e):e}))})):t.then((function(){return e}))},ae=function(e){var t;ze=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,le=t),Ae&&Fe()},ue=function(){return ze};n.d(t,{BP:function(){return E},UO:function(){return L}});var ce=Object.freeze({__proto__:null,get start(){return ae},get ensureJQuerySupport(){return F},get setBootstrapMaxTime(){return $},get setMountMaxTime(){return C},get setUnmountMaxTime(){return A},get setUnloadMaxTime(){return P},get registerApplication(){return Q},get unregisterApplication(){return X},get getMountedApps(){return G},get getAppStatus(){return Y},get unloadApplication(){return ee},get checkActivityFunctions(){return J},get getAppNames(){return Z},get pathToActiveWhen(){return re},get navigateToUrl(){return L},get triggerAppChange(){return oe},get addErrorHandler(){return i},get removeErrorHandler(){return a},get mountRootParcel(){return E},get NOT_LOADED(){return he},get LOADING_SOURCE_CODE(){return ve},get NOT_BOOTSTRAPPED(){return ye},get BOOTSTRAPPING(){return me},get NOT_MOUNTED(){return ge},get MOUNTING(){return be},get UPDATING(){return _e},get LOAD_ERROR(){return Se},get MOUNTED(){return we},get UNMOUNTING(){return xe},get SKIP_BECAUSE_BROKEN(){return Ee}});function se(e){return(se="function"==typeof Symbol&&"symbol"==p(Symbol.iterator)?function(e){return void 0===e?"undefined":p(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":p(e)})(e)}var le,fe=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,pe=function(){try{var e=new fe("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?fe:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},de=[],he="NOT_LOADED",ve="LOADING_SOURCE_CODE",ye="NOT_BOOTSTRAPPED",me="BOOTSTRAPPING",ge="NOT_MOUNTED",be="MOUNTING",we="MOUNTED",_e="UPDATING",xe="UNMOUNTING",Se="LOAD_ERROR",Ee="SKIP_BECAUSE_BROKEN",Oe=!1,je=!1,ke=0,$e={parcels:{}},Ce={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}},Ae="undefined"!=typeof window,Pe={hashchange:[],popstate:[]},Te=["hashchange","popstate"];if(Ae){window.addEventListener("hashchange",N),window.addEventListener("popstate",N);var Ie=window.addEventListener,Re=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Te.indexOf(e)>=0)||m(Pe[e],(function(e){return e===t})))return Ie.apply(this,arguments);Pe[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Te.indexOf(e)>=0))return Re.apply(this,arguments);Pe[e]=Pe[e].filter((function(e){return e!==t}))},window.history.pushState=M(window.history.pushState,"pushState"),window.history.replaceState=M(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(u(41,!1)):window.singleSpaNavigate=L}var Le=!1,De={},Ne=[],Me=!1,Ue=[],Be=Ae&&window.location.href;function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Me)return new Promise((function(e,n){Ue.push({resolve:e,reject:n,eventArguments:t})}));var n,o=q(),i=o.appsToUnload,a=o.appsToUnmount,u=o.appsToLoad,c=o.appsToMount,s=!1,l=Be,f=Be=window.location.href;return ue()?(Me=!0,n=i.concat(u,a,c),v()):(n=u,h());function p(){s=!0}function h(){return Promise.resolve().then((function(){var e=u.map(R);return Promise.all(e).then(g).then((function(){return[]})).catch((function(e){throw g(),e}))}))}function v(){return Promise.resolve().then((function(){if(window.dispatchEvent(new pe(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",b(!0))),window.dispatchEvent(new pe("single-spa:before-routing-event",b(!0,{cancelNavigation:p}))),s)return window.dispatchEvent(new pe("single-spa:before-mount-routing-event",b(!0))),m(),void L(l);var t=i.map(V),r=a.map(x).map((function(e){return e.then(V)})).concat(t),o=Promise.all(r);o.then((function(){window.dispatchEvent(new pe("single-spa:before-mount-routing-event",b(!0)))}));var f=u.map((function(e){return R(e).then((function(e){return ie(e,o)}))})),d=c.filter((function(e){return u.indexOf(e)<0})).map((function(e){return ie(e,o)}));return o.catch((function(e){throw g(),e})).then((function(){return g(),Promise.all(f.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(m)}))}))}function m(){var t=G();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new pe(r,b())),window.dispatchEvent(new pe("single-spa:routing-event",b()))}catch(e){setTimeout((function(){throw e}))}if(Me=!1,Ue.length>0){var o=Ue;Ue=[],Fe(o)}return t}function g(){e.forEach((function(e){D(e.eventArguments)})),D(t)}function b(){var e,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],p=arguments.length>1?arguments[1]:void 0,h={},v=(r(e={},we,[]),r(e,ge,[]),r(e,he,[]),r(e,Ee,[]),e);o?(u.concat(c).forEach((function(e,t){g(e,we)})),i.forEach((function(e){g(e,he)})),a.forEach((function(e){g(e,ge)}))):n.forEach((function(e){g(e)}));var m={detail:{newAppStatuses:h,appsByNewStatus:v,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:f,navigationIsCanceled:s}};return p&&y(m.detail,p),m;function g(e,t){var n=d(e);t=t||Y(n),h[n]=t,(v[t]=v[t]||[]).push(n)}}}var ze=!1;Ae&&setTimeout((function(){ze||console.warn(u(1,!1))}),5e3);var Ve={getRawAppData:function(){return[].concat(Ne)},reroute:Fe,NOT_LOADED:he,toLoadPromise:R,toBootstrapPromise:_,unregisterApplication:X};Ae&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ve)},487:function(e){"use strict";var t=function(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t},n=function(e,n){for(var i={},a=[],u=0;u<e.length;u++){var c=e[u],s=n.base?c[0]+n.base:c[0],l=i[s]||0,f="".concat(s," ").concat(l);i[s]=l+1;var p=t(f),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)o[p].references++,o[p].updater(d);else{var h=r(d,n);n.byIndex=u,o.splice(u,0,{identifier:f,updater:h,references:1})}a.push(f)}return a},r=function(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}},o=[];e.exports=function(e,r){var i=n(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var u=t(i[a]);o[u].references--}for(var c=n(e,r),s=0;s<i.length;s++){var l=t(i[s]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}i=c}}},2052:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&c(n,window.HTMLIFrameElement))try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1469:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},4010:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},631:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9329:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7641:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):c(e,t)},o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var i={},a={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators},function(e){a.reportError=e.reportError}],execute:function(){e(function(){var e={672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return c}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?c+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return c})},525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n=function(){a.pop()()},i={},a=[function(){o.resolve(e,i)}],u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r,s,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(c===p&&h){var v=h.reference;i[v]||(r=u,s=o,l=h,a.push((function(){!function(e,r,o){var a=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;i[a]=t,n()}))}(r,s,l)})))}}))})),n()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),c=n(719),s=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),E=i.Http(e,n),O=f.Path,j=O(e.baseUrl),k=j.slash(":type || :resource.resourceType"),$=k.slash("_history"),C=k.slash(":id || :resource.id"),A=C.slash("_history"),P=C.slash(":versionId || :resource.meta.versionId"),T=j.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(j.slash("metadata")).end(E),document:w.and(j.slash("Document")).end(E),profile:b.and(j.slash("Profile").slash(":type")).end(E),transaction:w.and(j).end(E),history:b.and(j.slash("_history")).and(R).end(E),typeHistory:b.and($).and(R).end(E),resourceHistory:b.and(A).and(R).end(E),read:b.and(s.$WithPatient).and(C).end(E),vread:b.and(P).end(E),delete:x.and(C).and(I).end(E),create:w.and(k).and(I).end(E),validate:w.and(k.slash("_validate")).end(E),meta:{add:w.and(T.slash("$meta-add")).end(E),delete:w.and(T.slash("$meta-delete")).end(E),read:b.and(T.slash("$meta")).end(E)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(R).end(E),update:_.and(C).and(I).end(E),conditionalUpdate:_.and(k).and(r.$SearchParams).and(I).end(E),conditionalDelete:x.and(k).and(r.$SearchParams).and(I).end(E),nextPage:b.and(c.$$BundleLinkUrl("next")).end(E),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:S.and(C).and(y("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,c=e.reference,s=e.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(s(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),c[n]&&(i.modifier=c[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),s(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var c=0;c<u;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=e?o.clone(s[l]):s[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},o=function(e,t,n,o){var u,c,s,l,f=t&&r(t.prototype,a)?t:a,p=Object.create(f.prototype),h=new d(o||[]);return p._invoke=(u=e,c=n,s=h,l=x,function(e,t){if(l===E)throw new Error("Generator is already running");if(l===O){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=P(n,s);if(r){if(r===j)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===x)throw l=O,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=E;var o=i(u,c,s);if("normal"===o.type){if(l=s.done?O:S,o.arg===j)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=O,s.method="throw",s.arg=o.arg)}}),p},i=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},a=function(){},u=function(){},c=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,o,a,u){var c=i(e[r],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){var i=function(){return new t((function(t,r){n(e,o,t,r)}))};return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=o;var x="suspendedStart",S="suspendedYield",E="executing",O="completed",j={},k={};n(k,b,(function(){return this}));var $=Object.getPrototypeOf,C=$&&$($(h([])));C&&C!==y&&m.call(C,b)&&(k=C);var A=c.prototype=a.prototype=Object.create(k);function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var o=i(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,j):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return u.prototype=c,n(A,"constructor",c),n(c,"constructor",u),u.displayName=n(c,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,n(e,_,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(A),n(A,_,"Generator"),n(A,b,(function(){return this})),n(A,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),j}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),j}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a}},u={};function c(t){var n=u[t];if(void 0!==n)return n.exports;var r=u[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=t,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}();var s={};return(0,c(968).s)(1),function(){"use strict";var e=function(e,t){var n=function(){this.constructor=e};Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return e.reduce((function(e,t){return e.concat(r(t,te)?t.errors:t)}),[])},u=function(e){return e},l=function(e){return 0===e.length?u:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},f=function(e){if(e||(e=J.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,u,"next",e)}function u(e){p(i,r,o,a,u,"throw",e)}a(void 0)}))}},h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},v=function(e,t){return!t||"object"!==$e(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},y=function(e){return window.openmrsBase+e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(e);t.headers||(t.headers={}),Se(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;var r,o=Error();return window.fetch(n,t).then((r=d(Z().mark((function e(t){var r,i;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,Ee.getConfig)("@openmrs/esm-api");case 12:if(i=e.sent.redirectAuthFailure,!(n===y(Ae)&&403===r.status||i.enabled&&i.errors.includes(r.status))){e.next=18;break}return(0,Ee.navigate)({to:i.url}),e.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new Pe(n,r,t,o)}),(function(e){throw new Pe(n,r,null,o)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new ue((function(r){var o=!1;return m(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},b=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},w=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,u,"next",e)}function u(e){b(i,r,o,a,u,"throw",e)}a(void 0)}))}},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(De<Date.now()-6e4||!Le.getState().loaded)&&S(),new ue((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Le.getState()),Le.subscribe(n)}))},x=function(){return(De<Date.now()-6e4||!Le.getState().loaded)&&S(),Le},S=function(){return new Promise((function(e,t){De=Date.now(),m(Ae).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),Le.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Re.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},E=function(){Le.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},O=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},j=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(Le.getState()),e||(t=Le.subscribe(o))}))},k=function(){return new Promise((function(e,t){var n=_().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},$=function(e,t){return Ne.apply(this,arguments)},C=function(){(0,Ee.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Ee.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Ee.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Ee.validators.isUrl]},errors:{_type:Ee.Type.Array,_default:[401],_elements:{_type:Ee.Type.Number,_validators:[Ee.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Ee.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),S()},A=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=function(e,t){return e?Ie.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){A(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},T=function(e){return function(t){return 0===e?Ze:t.lift(new Ye(e))}},I=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Je(e,t))}},R=function(e,t,n){var r=null!=n?n:et;return g("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(T(1)).pipe(I((function(e){return e})))},L=function(e,t){return g("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},D=function(e,t,n){return g("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},N=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},M=function(){return g("/ws/rest/v1/visittype").pipe(I((function(e){return e.data.results.map(N)}))).pipe(T(1))},U=function(e){return{uuid:e.uuid,display:e.display}},B=function(){return g("/ws/rest/v1/location").pipe(I((function(e){return e.data.results.map(U)}))).pipe(T(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Pe},VisitMode:function(){return Me},VisitStatus:function(){return Ue},backendDependencies:function(){return nt},clearCurrentUser:function(){return E},defaultVisitCustomRepresentation:function(){return et},fetchCurrentPatient:function(){return P},fhir:function(){return Ie},fhirBaseUrl:function(){return Te},getCurrentUser:function(){return _},getLocations:function(){return B},getLoggedInUser:function(){return j},getSessionLocation:function(){return k},getSessionStore:function(){return x},getStartedVisit:function(){return tt},getVisitTypes:function(){return M},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return m},openmrsObservableFetch:function(){return g},refetchCurrentUser:function(){return S},saveVisit:function(){return L},sessionEndpoint:function(){return Ae},setSessionLocation:function(){return $},setupApiModule:function(){return C},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return D},userHasAccess:function(){return O}});var F,z,V,H,W,K,q,G=c(602),Z=c.n(G),Y=function(e,t){return(Y=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Q=!1,J={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,Q=e},get useDeprecatedSynchronousErrorHandling(){return Q}},X={closed:!0,next:function(e){},error:function(e){if(J.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},ee=Array.isArray||function(e){return e&&"number"==typeof e.length},te=(F=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this},F.prototype=Object.create(Error.prototype),F),ne=(q=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)},q.prototype.unsubscribe=function(){var e;if(!this.closed){var n,o=this,i=o._parentOrParents,u=o._ctorUnsubscribe,c=o._unsubscribe,s=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,q))i.remove(this);else if(null!==i)for(var l=0;l<i.length;++l)i[l].remove(this);if(t(c)){u&&(this._unsubscribe=void 0);try{c.call(this)}catch(t){e=r(t,te)?a(t.errors):[t]}}if(ee(s)){l=-1;for(var f=s.length;++l<f;){var p=s[l];if(null!==(n=p)&&"object"==typeof n)try{p.unsubscribe()}catch(t){e=e||[],r(t,te)?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new te(e)}},q.prototype.add=function(e){var t=e;if(!e)return q.EMPTY;switch(void 0===e?"undefined":o(e)){case"function":t=new q(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!r(t,q)){var n=t;(t=new q)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(r(i,q)){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[t]:a.push(t),t},q.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},q.EMPTY=((K=new q).closed=!0,K),q),re="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),oe=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=X;break;case 1:if(!e){a.destination=X;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new ie(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new ie(a,e,o,i)}return a}return e(n,t),n.prototype[re]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ne),ie=(V=function(e,n,r,o){var i,a=z.call(this)||this;a._parentSubscriber=e;var u=a;return t(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==X&&(t((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},e(V,z=oe),V.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},V.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=J.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},V.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},V.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),J.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},V.prototype.__tryOrSetError=function(e,t,n){if(!J.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return J.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},V.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},V),ae="function"==typeof Symbol&&Symbol.observable||"@@observable",ue=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this.operator,i=function(e,t,n){if(e){if(r(e,oe))return e;if(e[re])return e[re]()}return e||t||n?new oe(e,t,n):new oe(X)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||J.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),J.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){J.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,oe)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[ae]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:l(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,se="object"==typeof self&&self&&self.Object===Object&&self,le=(ce||se||Function("return this")()).Symbol,fe=Object.prototype,pe=fe.hasOwnProperty,de=fe.toString,he=le?le.toStringTag:void 0,ve=Object.prototype.toString,ye=le?le.toStringTag:void 0,me=(H=Object.getPrototypeOf,W=Object,function(e){return H(W(e))}),ge=Function.prototype,be=Object.prototype,we=ge.toString,_e=be.hasOwnProperty,xe=we.call(Object),Se=function(e){if(null==(o=e)||"object"!=typeof o||"[object Object]"!=(null==(t=e)?void 0===t?"[object Undefined]":"[object Null]":ye&&ye in Object(t)?function(e){var t=pe.call(e,he),n=e[he];try{e[he]=void 0;var r=!0}catch(e){}var o=de.call(e);return r&&(t?e[he]=n:delete e[he]),o}(t):(n=t,ve.call(n))))return!1;var t,n,o,i=me(e);if(null===i)return!0;var a=_e.call(i,"constructor")&&i.constructor;return"function"==typeof a&&r(a,a)&&we.call(a)==xe},Ee=c(824);function Oe(e,t,n){return Oe=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ke(o,n.prototype),o},Oe.apply(null,arguments)}function je(e){return(je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)};function Ce(e){var t="function"==typeof Map?new Map:void 0;return Ce=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Oe(e,arguments,je(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ke(r,e)},Ce(e)}var Ae="/ws/rest/v1/session",Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=je(t);if(n){var o=je(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return v(this,e)});function i(e,t,n,a){var u;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}(Ce(Error)),Te="/ws/fhir2/R4",Ie=c(256)({baseUrl:Te},{http:function(e){return m(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),Re=c(254),Le=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),De=0;function Ne(){return(Ne=w(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Ae,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:S();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Me,Ue,Be,Fe,ze=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Ve=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(ne),He=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(oe),We=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[re]=function(){return new He(this)},n.prototype.lift=function(e){var t=new Ke(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new ze;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new ze;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new ze;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new ze;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new ze;return this.hasError?(e.error(this.thrownError),ne.EMPTY):this.isStopped?(e.complete(),ne.EMPTY):(this.observers.push(e),new Ve(this,e))},n.prototype.asObservable=function(){var e=new ue;return e.source=this,e},n.create=function(e,t){return new Ke(e,t)},n}(ue),Ke=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ne.EMPTY},n}(We),qe=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ze;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(We),Ge=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),Ze=new ue((function(e){return e.complete()})),Ye=function(){var e=function(e){if(this.total=e,this.total<0)throw new Ge};return e.prototype.call=function(e,t){return t.subscribe(new Qe(e,this.total))},e}(),Qe=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(oe),Je=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new Xe(e,this.project,this.thisArg))},e}(),Xe=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(oe),et="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",tt=new qe(null);(Be=Me||(Me={})).NEWVISIT="startVisit",Be.EDITVISIT="editVisit",Be.LOADING="loadingVisit",(Fe=Ue||(Ue={})).NOTSTARTED="notStarted",Fe.ONGOING="ongoing";var nt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},8461:function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},o=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}},i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},a=function(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},u=function(e){return window.openmrsBase+e},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=u(e);t.headers||(t.headers={}),H(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;var r,i=Error();return window.fetch(n,t).then((r=o(R().mark((function e(t){var r,o;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,W.getConfig)("@openmrs/esm-api");case 12:if(o=e.sent.redirectAuthFailure,!(n===u(Q)&&403===r.status||o.enabled&&o.errors.includes(r.status))){e.next=18;break}return(0,W.navigate)({to:o.url}),e.abrupt("return",o.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new J(n,r,t,i)}),(function(e){throw new J(n,r,null,i)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new L.y((function(r){var o=!1;return s(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},f=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)}))}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(re<Date.now()-6e4||!ne.getState().loaded)&&y(),new L.y((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(ne.getState()),ne.subscribe(n)}))},v=function(){return(re<Date.now()-6e4||!ne.getState().loaded)&&y(),ne},y=function(){return new Promise((function(e,t){re=Date.now(),s(Q).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),ne.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,te.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},m=function(){ne.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},g=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},b=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(ne.getState()),e||(t=ne.subscribe(o))}))},w=function(){return new Promise((function(e,t){var n=h().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},_=function(e,t){return oe.apply(this,arguments)},x=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},S=function(e,t){return e?ee.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){x(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},E=function(e){return function(t){return 0===e?ye:t.lift(new me(e))}},O=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new be(e,t))}},j=function(e,t,n){var r=null!=n?n:_e;return l("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(E(1)).pipe(O((function(e){return e})))},k=function(e,t){return l("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},$=function(e,t,n){return l("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},C=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},A=function(){return l("/ws/rest/v1/visittype").pipe(O((function(e){return e.data.results.map(C)}))).pipe(E(1))},P=function(e){return{uuid:e.uuid,display:e.display}},T=function(){return l("/ws/rest/v1/location").pipe(O((function(e){return e.data.results.map(P)}))).pipe(E(1))};n.d(t,{nF:function(){return J},u4:function(){return ce},Rx:function(){return se},Wf:function(){return Se},Ze:function(){return m},I$:function(){return _e},Vy:function(){return S},N$:function(){return ee},DN:function(){return X},ts:function(){return h},JC:function(){return T},r:function(){return b},WK:function(){return w},KJ:function(){return v},$X:function(){return xe},P9:function(){return A},nx:function(){return j},bf:function(){return u},vb:function(){return s},uj:function(){return l},VJ:function(){return y},bX:function(){return k},z$:function(){return Q},jK:function(){return _},Lq:function(){return P},VF:function(){return C},ym:function(){return $},y9:function(){return g}});var I=n(1602),R=n.n(I),L=n(1720),D=n(963),N=(0,n(6899).Z)(Object.getPrototypeOf,Object),M=n(4897),U=Function.prototype,B=Object.prototype,F=U.toString,z=B.hasOwnProperty,V=F.call(Object),H=function(e){if(!(0,M.Z)(e)||"[object Object]"!=(0,D.Z)(e))return!1;var t=N(e);if(null===t)return!0;var n=z.call(t,"constructor")&&t.constructor;return"function"==typeof n&&c(n,n)&&F.call(n)==V},W=n(9714);function K(e,t,n){return(K=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&G(o,n.prototype),o}).apply(null,arguments)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)};function Y(e){var t="function"==typeof Map?new Map:void 0;return Y=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return K(e,arguments,q(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),G(r,e)},Y(e)}var Q="/ws/rest/v1/session",J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=q(t);if(n){var o=q(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return a(this,e)});function o(e,t,n,i){var a;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=t,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(Y(Error)),X="/ws/fhir2/R4",ee=n(1256)({baseUrl:X},{http:function(e){return s(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),te=n(674),ne=(0,n(5385).createGlobalStore)("session",{loaded:!1,session:null}),re=0;function oe(){return(oe=d(R().mark((function e(t,n){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s(Q,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:y();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie,ae,ue,ce,se,le=n(7080),fe=n(7860),pe=n(7043),de=(ae=fe.xQ,ue=function(e){var t=ae.call(this)||this;return t._value=e,t},le.ZT(ue,ae),Object.defineProperty(ue.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),ue.prototype._subscribe=function(e){var t=ae.prototype._subscribe.call(this,e);return t&&!t.closed&&e.next(this._value),t},ue.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new pe.N;return this._value},ue.prototype.next=function(e){ae.prototype.next.call(this,this._value=e)},ue),he=n(7811),ve=((ie=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}).prototype=Object.create(Error.prototype),ie),ye=new L.y((function(e){return e.complete()})),me=function(){var e=function(e){if(this.total=e,this.total<0)throw new ve};return e.prototype.call=function(e,t){return t.subscribe(new ge(e,this.total))},e}(),ge=function(e){var t=function(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r};return le.ZT(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(he.L),be=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new we(e,this.project,this.thisArg))},e}(),we=function(e){var t=function(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return le.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(he.L),_e="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",xe=new de(null);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(ce||(ce={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(se||(se={}));var Se={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},6066:function(){var e=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):c(e,t)};System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){var t={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(e){"use strict";e.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.y=n,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}();var a={};return(0,i(968).s)(1),function(){"use strict";var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=function(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},o=function(e){return function(e){if(Array.isArray(e))return r(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 r(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)?r(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.")}()},u=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?h(t.matcher):h(t.path);var n,r},c=function(e){return s([e])},s=function(e){var t=l(),n=e.map((function(e){return{matcher:u(e),settings:e}})),r=o(t).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(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},p=function(e,t){if(e.length>0){var n=y(e,t);if(n){for(var r=[n],o=y(e,n.settings.parent);void 0!==o;)r.push(o),o=y(e,o.settings.parent);return r.reverse()}}return[]},d=function(e){return p(l(),e)};function h(r,o,i){return e(r,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(e){return h(e,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(a=o,function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+t(o.endsWith||"")+"]|$",h="["+t(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=e;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=t(p(g));else{var b=t(p(g.prefix)),w=t(p(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var x=e[e.length-1],S="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;a||(v+="(?:"+h+"(?="+d+"))?"),S||(v+="(?="+h+"|"+d+")")}return new RegExp(v,n(o))}(function(e,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return u}(r,u=i),a,u));var a,u,c,s,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return p},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return d},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(e,t){if(t)return n=t,(r=e.filter((function(e){return e.matcher.test(n)})),function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return f(e,1);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,1):void 0}}(r)||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.")}())[0]||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=y(e,n.join("/"));if(r)return r}}(e,t);var n,r}}(),a}())}}}))},9714:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=function(e,t){return se(e,t,n.slice(),r.slice())},a=o(e);return!u((function(e,t){return!u(i,t,e)}),o(t),a)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Pe.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Pe.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Pe.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return x(w().getState(),e,t)},x=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(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},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){E(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},j=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||$(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.")}()},k=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(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.")}()},$=function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}},C=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=F(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},A=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=j(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=j(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=j(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),u=a.getState(),c={slots:O({},u.slots,i)};le(u,c)||a.setState(c)},P=function(e,t){var n=function(e,t){var n=Me(he(e.schemas)),r=k(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=j(u.value,2);n=V([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=M(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=O({},r[s.slotName],E({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},I=function(e,t){Be(e,t);var n=Ie.getState();Ie.setState({schemas:O({},n.schemas,E({},e,t))})},R=function(e,t){Be(e,t);var n=Ie.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:O({},n.schemas,E({},e,t))})},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:k(n.providedConfigs).concat([{source:t,config:e}])})},D=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=y(e);n(r.getState());var o=r.subscribe(n)}))},N=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(e,t,n);var o=Ve(e,t,r);return ze(e,o,n),o},M=function(e,t,n,r,o,i){var a,u,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=z(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([z(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=Ve(m,y,o.devDefaultsAreOn);return ze(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return k(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},F=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=z(e,B(t,n));H(r,o,e);var i=Ve(r,o,t.devDefaultsAreOn);return ze(r,i,e),delete i.extensionSlots,i},z=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Ee)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Oe,Boolean:je,ConceptUuid:Ae,Number:ke,Object:Ce,String:$e,UUID:Ae,PersonAttributeTypeUuid:Ae,PatientIdentifierTypeUuid:Ae}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},Z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Y=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Z(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Q=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return De},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return R},getConfig:function(){return D},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Ne},inRange:function(){return We},interpolateString:function(){return Q},interpolateUrl:function(){return Y},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},oneOf:function(){return Ge},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Le},validator:function(){return h},validators:function(){return Ze}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ve=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ye=n((function(e){return!!ve(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),me=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),ge=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),be=ge,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new me(e)),ye(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),xe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),Se=l((function e(t,n,r){return xe((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Ee=r((function(e,t){return Se((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Oe=h((function(e){return Array.isArray(e)}),"must be an array"),je=h((function(e){return"boolean"==typeof e}),"must be a boolean"),ke=h((function(e){return"number"==typeof e}),"must be a number"),$e=h((function(e){return"string"==typeof e}),"must be a string"),Ce=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ae=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Pe=i(685),Te={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Ie=(0,Pe.createGlobalStore)("config-internal",Te),Re=v();Ie.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var Le=(0,Pe.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var De=(0,Pe.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Pe.createGlobalStore)("config-implementer-tools",{config:{}});function Me(e){return e.hasOwnProperty("_default")?O({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=Me(e[n]),t}),{}):{}}function Ue(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!G(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Be(e,c,u);var s=c._elements;if(q(s)&&Be(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(pe).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![pe.Array,pe.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){W(n,e._type,t),G(t)?e._type===pe.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===pe.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),G(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===pe.Object&&e._elements?ze(e._elements,s,l):ze(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)ze(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}C(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return C(e,Le.getState())})),Le.subscribe((function(e){return C(Ie.getState(),e)})),P(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return P(e,Le.getState())})),Le.subscribe((function(e){return P(Ie.getState(),e)})),A(Ie.getState(),Le.getState()),Ie.subscribe((function(e){return A(e,Le.getState())})),Le.subscribe((function(e){return A(Ie.getState(),e)})),T(Ie.getState(),De.getState(),Le.getState()),Ie.subscribe((function(e){T(e,De.getState(),Le.getState())})),De.subscribe((function(e){T(Ie.getState(),e,Le.getState())})),Le.subscribe((function(e){T(Ie.getState(),De.getState(),e)}));var Ve=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===pe.Array&&Array.isArray(a)){var l=a.map((function(e){return Ve(s,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Ve(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(G(u)){var m=r.hasOwnProperty(i)?a:{};G(m)&&(r[i]=Ve(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},He=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),Ge=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke,oneOf:Ge}}(),a}())}}}))},3373:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return i(e,function(e){for(var t=arguments,n=function(n){var o=null!=t[n]?t[n]:{},i=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),i.forEach((function(t){r(e,t,o[t])}))},o=1;o<arguments.length;o++)n(o);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},i=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},a=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),i=o(t,n);i.startsWith(r)?(0,J.UO)(i):window.location.assign(i)},u=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},c=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},s=function(e){return function t(n){return 0===arguments.length||c(n)?t:e.apply(this,arguments)}},l=function(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return c(n)?t:s((function(t){return e(n,t)}));default:return c(n)&&c(r)?t:c(n)?s((function(t){return e(t,r)})):c(r)?s((function(t){return e(n,t)})):e(n,r)}}},f=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},d=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},h=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},v=function(e,t,n,r){var o=f(e);function i(e,t){return he(e,t,n.slice(),r.slice())}return!d((function(e,t){return!d(i,t,e)}),f(t),o)},y=function(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return c(n)?t:l((function(t,r){return e(n,t,r)}));case 2:return c(n)&&c(r)?t:c(n)?l((function(t,n){return e(t,r,n)})):c(r)?l((function(t,r){return e(n,t,r)})):s((function(t){return e(n,r,t)}));default:return c(n)&&c(r)&&c(o)?t:c(n)&&c(r)?l((function(t,n){return e(t,n,o)})):c(n)&&c(o)?l((function(t,n){return e(t,r,n)})):c(r)&&c(o)?l((function(t,r){return e(n,t,r)})):c(n)?s((function(t){return e(t,r,o)})):c(r)?s((function(t){return e(n,t,o)})):c(o)?s((function(t){return e(n,r,t)})):e(n,r,o)}}},m=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},g=function(e,t,n,r){return e["@@transducer/result"](n[r](Se(e["@@transducer/step"],e),t))},b=function(e){return"[object Object]"===Object.prototype.toString.call(e)},w=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},_=function(e){return(0,Le.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},x=function(){return(0,Le.getGlobalStore)("config-extension-slots",{slots:{}})},S=function(){return(0,Le.getGlobalStore)("config-extensions",{configs:{}})},E=function(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},O=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},j=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},k=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||C(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.")}()},$=function(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(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.")}()},C=function(e,t){if(e){if("string"==typeof e)return E(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)?E(e,t):void 0}},A=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=F(u,e,t);_(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=k(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return j({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=x(),u=a.getState(),c={slots:j({},u.slots,i)};ve(u,c)||a.setState(c)},T=function(e,t){var n=function(e,t){var n=ze(ge(e.schemas)),r=$(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=k(u.value,2);n=V([n,Ve(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Fe.setState({config:n})},I=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=M(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}S().setState({configs:r})},R=function(e,t){He(e,t);var n=Ne.getState();Ne.setState({schemas:j({},n.schemas,O({},e,t))})},L=function(e,t){He(e,t);var n=Ne.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ne.setState({schemas:j({},n.schemas,O({},e,t))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ne.getState();Ne.setState({providedConfigs:$(n.providedConfigs).concat([{source:t,config:e}])})},N=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=_(e);n(r.getState());var o=r.subscribe(n)}))},M=function(e,t,n,r,o,i){var a,u,c,s,l=k(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=z(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([z(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=qe(m,y,o.devDefaultsAreOn);return Ke(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return $(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},F=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=z(e,B(t,n));H(r,o,e);var i=qe(r,o,t.devDefaultsAreOn);return Ke(r,i,e),delete i.extensionSlots,i},z=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return Oe($e)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?We(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Ce,Boolean:Ae,ConceptUuid:Re,Number:Pe,Object:Ie,String:Te,UUID:Re,PersonAttributeTypeUuid:Re,PatientIdentifierTypeUuid:Re}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e};n.d(t,{JU:function(){return Q.ConfigStore},Dy:function(){return Z},SH:function(){return R},Tj:function(){return L},iE:function(){return N},pR:function(){return _},Z2:function(){return X},IT:function(){return i},ll:function(){return o},CB:function(){return te},gZ:function(){return ee},c4:function(){return a},kw:function(){return ne},JJ:function(){return D},sC:function(){return u},z2:function(){return re}});var Z,Y,Q={};n.r(Q),n.d(Q,{R2:function(){return Be},hv:function(){return Ne},pR:function(){return _},Gr:function(){return x},_z:function(){return S},HN:function(){return Fe},DK:function(){return Ue}}),(Y=Z||(Z={})).Array="Array",Y.Boolean="Boolean",Y.ConceptUuid="ConceptUuid",Y.Number="Number",Y.Object="Object",Y.String="String",Y.UUID="UUID",Y.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Y.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var J=n(3710),X=function(e,t){return u((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},ee=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return u((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},te=ee([]),ne=function(e){return u((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},re={inRange:X,isUrl:te,isUrlWithTemplateParameters:ee,oneOf:ne},oe="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ie=Object.prototype.toString,ae=function(){return"[object Arguments]"===ie.call(arguments)?function(e){return"[object Arguments]"===ie.call(e)}:function(e){return h("callee",e)}}(),ue=ae,ce=!{toString:null}.propertyIsEnumerable("toString"),se=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],le=function(){return arguments.propertyIsEnumerable("length")}(),fe=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},pe="function"!=typeof Object.keys||le?s((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=le&&ue(e);for(t in e)!h(t,e)||o&&"length"===t||(r[r.length]=t);if(ce)for(n=se.length-1;n>=0;)h(t=se[n],e)&&!fe(r,t)&&(r[r.length]=t),n-=1;return r})):s((function(e){return Object(e)!==e?[]:Object.keys(e)})),de=s((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function he(e,t,n,r){if(oe(e,t))return!0;var o,i,a=de(e);if(a!==de(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":p(e))!=(void 0===t?"undefined":p(t))||!oe(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!oe(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var u=n.length-1;u>=0;){if(n[u]===e)return r[u]===t;u-=1}switch(a){case"Map":return e.size===t.size&&v(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&v(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=pe(e);if(c.length!==pe(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(u=c.length-1;u>=0;){var f=c[u];if(!h(f,t)||!he(t[f],e[f],s,l))return!1;u-=1}return!0}var ve=l((function(e,t){return he(e,t,[],[])}));function ye(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ye(e[u],t,n,!0):e[u];return o};switch(de(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var me,ge=s((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ye(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=s((function(e){return!!be(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),_e=(me=function(e){this.f=e},me.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},me.prototype["@@transducer/result"]=function(e){return e},me.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},me),xe=l((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Se=xe,Ee="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Oe=y((function(e,t,n){if("function"==typeof e&&(e=new _e(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return g(e,t,n,"fantasy-land/reduce");if(null!=n[Ee])return m(e,t,n[Ee]());if("function"==typeof n.next)return m(e,t,n);if("function"==typeof n.reduce)return g(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),je=y((function(e,t,n){var r,o={};for(r in t)h(r,t)&&(o[r]=h(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)h(r,n)&&!h(r,o)&&(o[r]=n[r]);return o})),ke=y((function e(t,n,r){return je((function(n,r,o){return b(r)&&b(o)?e(t,r,o):t(n,r,o)}),n,r)})),$e=l((function(e,t){return ke((function(e,t,n){return n}),e,t)})),Ce=u((function(e){return Array.isArray(e)}),"must be an array"),Ae=u((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=u((function(e){return"number"==typeof e}),"must be a number"),Te=u((function(e){return"string"==typeof e}),"must be a string"),Ie=u((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Re=u((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Le=n(5385),De={providedConfigs:[],schemas:{},devDefaultsAreOn:w()},Ne=(0,Le.createGlobalStore)("config-internal",De),Me=w();Ne.subscribe((function(e){var t;e.devDefaultsAreOn!=Me&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Me=e.devDefaultsAreOn)}));var Ue=(0,Le.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ue.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Be=(0,Le.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Fe=(0,Le.createGlobalStore)("config-implementer-tools",{config:{}});function ze(e){return e.hasOwnProperty("_default")?j({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=ze(e[n]),t}),{}):{}}function Ve(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ve(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!G(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||He(e,c,u);var s=c._elements;if(q(s)&&He(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(Z).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(Z).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![Z.Array,Z.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function We(e,t,n){W(n,e._type,t),G(t)?e._type===Z.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===Z.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)We(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),G(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===Z.Object&&e._elements?Ke(e._elements,s,l):Ke(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Ke(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}A(Ne.getState(),Ue.getState()),Ne.subscribe((function(e){return A(e,Ue.getState())})),Ue.subscribe((function(e){return A(Ne.getState(),e)})),T(Ne.getState(),Ue.getState()),Ne.subscribe((function(e){return T(e,Ue.getState())})),Ue.subscribe((function(e){return T(Ne.getState(),e)})),P(Ne.getState(),Ue.getState()),Ne.subscribe((function(e){return P(e,Ue.getState())})),Ue.subscribe((function(e){return P(Ne.getState(),e)})),I(Ne.getState(),Be.getState(),Ue.getState()),Ne.subscribe((function(e){I(e,Be.getState(),Ue.getState())})),Be.subscribe((function(e){I(Ne.getState(),e,Ue.getState())})),Ue.subscribe((function(e){I(Ne.getState(),Be.getState(),e)}));var qe=function(e,t,n){var r=ge(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===Z.Array&&Array.isArray(a)){var l=a.map((function(e){return qe(s,e,n)}));r[i]=l}else if(u._type===Z.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=qe(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(G(u)){var m=r.hasOwnProperty(i)?a:{};G(m)&&(r[i]=qe(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r}},674:function(){System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(e){"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=function(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.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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){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");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}();var i={};return(0,o(968).s)(1),function(){"use strict";var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):c(o,i)))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return t},reportError:function(){return e}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},225:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):c(e,t)};e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,a){var u={},c={},s={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){c.createGlobalStore=e.createGlobalStore,c.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=u},685:function(e){"use strict";e.exports=c},645:function(e){"use strict";e.exports=s}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,f),n.exports}f.y=a,f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e}();var p={};return(0,f(968).s)(1),function(){"use strict";var i=function(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=function(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])}},u=function(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])}},c=function(e){var t=this.__data__=new W(e);this.size=t.size},s=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])},l=function(e){var t=Lt.getState(),n=e(t);n!==t&&Lt.setState(n)},d=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}Tt(It.configExtensionStore.getState().mountedExtensions,t)||It.configExtensionStore.setState({mountedExtensions:t})},h=function(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},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(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.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(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.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],p=A(l,e,(0,It.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}Tt(Ut.getState().slots,r)||Ut.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},x=function(e){return m(e.split("#"),1)[0]},S=function(e,t){var n=x(t);return e.extensions[n]},E=function(e){return S(Mt.getState(),e)},O=function(e,t){l((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},_(e),{attachedIds:[t]})))})}))},j=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},k=function(e){l((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},$=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return I(n,e.online,e.offline)}))},A=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=Mt.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=$(e,c,null===(n=s[x(e)])||void 0===n?void 0:n.order,i),a=$(t,c,null===(r=s[x(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(p=(v=y.next()).done);p=!0){var m=v.value,b=(0,It.getExtensionConfigFromStore)(r,e,m).config,w=x(m),_=t.extensions[w];_&&f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==y.return||y.return()}finally{if(d)throw h}}return f},P=function(e){return A(e,Mt.getState(),(0,It.getExtensionSlotConfig)(e).config,Ft.getState())},T=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return I(n,e,t)},I=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},R=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},L=function(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},D=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},N=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){D(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},M=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},U=function(e){return function(e){if(Array.isArray(e))return L(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 L(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)?L(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.")}()},B=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=x(r),u=E(r),c=!0,s=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var f=u.load,p=u.online,d=u.offline,h=u.meta,v=u.moduleName;T(p,d)&&(f().then((function(a){var u=a.default,l=M(a,["default"]);c&&(s=(0,Wt.mountRootParcel)(o(null!=u?u:l),N({},R(p,d),i,{_meta:h,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:v},domElement:e})))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return N({},o,{extensions:N({},o.extensions,D({},a,N({},o.extensions[a],{instances:U(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}};f.r(p),f.d(p,{attach:function(){return O},checkStatus:function(){return T},checkStatusFor:function(){return I},detach:function(){return j},detachAll:function(){return k},extensionStore:function(){return Kt},getAssignedExtensions:function(){return P},getConnectedExtensions:function(){return C},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Dt},getExtensionNameFromId:function(){return x},getExtensionRegistration:function(){return E},getExtensionRegistrationFrom:function(){return S},getExtensionStore:function(){return Nt},registerExtension:function(){return zt},registerExtensionSlot:function(){return Vt},renderExtension:function(){return B},reset:function(){return Ht},updateInternalExtensionStore:function(){return l}});var F=function(e,t){return e===t||e!=e&&t!=t},z=function(e,t){for(var n=e.length;n--;)if(F(e[n][0],t))return n;return-1},V=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=z(t,e);return!(n<0||(n==t.length-1?t.pop():V.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=z(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return z(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=z(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var H,W=i,K="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,q="object"==typeof self&&self&&self.Object===Object&&self,G=K||q||Function("return this")(),Z=G.Symbol,Y=Object.prototype,Q=Y.hasOwnProperty,J=Y.toString,X=Z?Z.toStringTag:void 0,ee=Object.prototype.toString,te=Z?Z.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=Q.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=J.call(e);return r&&(t?e[X]=n:delete e[X]),o}(e):(t=e,ee.call(t));var t},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=G["__core-js_shared__"],ae=(H=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",ue=Function.prototype.toString,ce=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},se=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,pe=le.toString,de=fe.hasOwnProperty,he=RegExp("^"+pe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=function(e,t){var n,r,o=null==(n=e)?void 0:n[t];return!re(r=o)||ae&&ae in r||!(oe(r)?he:se).test(ce(r))?void 0:o},ye=ve(G,"Map"),me=ve(Object,"create"),ge=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=me?me(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(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,_e=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ye||W),string:new we}},u.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return _e(this,e).get(e)},u.prototype.has=function(e){return _e(this,e).has(e)},u.prototype.set=function(e,t){var n=_e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var xe=u;c.prototype.clear=function(){this.__data__=new W,this.size=0},c.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},c.prototype.get=function(e){return this.__data__.get(e)},c.prototype.has=function(e){return this.__data__.has(e)},c.prototype.set=function(e,t){var n=this.__data__;if(r(n,W)){var o=n.__data__;if(!ye||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(o)}return n.set(e,t),this.size=n.size,this};var Se=c;s.prototype.add=s.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},s.prototype.has=function(e){return this.__data__.has(e)};var Ee=s,Oe=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},je=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Ee:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Oe(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},ke=G.Uint8Array,$e=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ce=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ae=Z?Z.prototype:void 0,Pe=Ae?Ae.valueOf:void 0,Te=Array.isArray,Ie=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols,Le=Re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Re(e),(function(t){return Ie.call(e,t)})))}:function(){return[]},De=function(e){return null!=e&&"object"==typeof e},Ne=function(e){return De(e)&&"[object Arguments]"==ne(e)},Me=Object.prototype,Ue=Me.hasOwnProperty,Be=Me.propertyIsEnumerable,Fe=Ne(function(){return arguments}())?Ne:function(e){return De(e)&&Ue.call(e,"callee")&&!Be.call(e,"callee")},ze=Fe,Ve=t&&!t.nodeType&&t,He=Ve&&e&&!e.nodeType&&e,We=He&&He.exports===Ve?G.Buffer:void 0,Ke=(We?We.isBuffer:void 0)||function(){return!1},qe=/^(?:0|[1-9]\d*)$/,Ge=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ze={};Ze["[object Float32Array]"]=Ze["[object Float64Array]"]=Ze["[object Int8Array]"]=Ze["[object Int16Array]"]=Ze["[object Int32Array]"]=Ze["[object Uint8Array]"]=Ze["[object Uint8ClampedArray]"]=Ze["[object Uint16Array]"]=Ze["[object Uint32Array]"]=!0,Ze["[object Arguments]"]=Ze["[object Array]"]=Ze["[object ArrayBuffer]"]=Ze["[object Boolean]"]=Ze["[object DataView]"]=Ze["[object Date]"]=Ze["[object Error]"]=Ze["[object Function]"]=Ze["[object Map]"]=Ze["[object Number]"]=Ze["[object Object]"]=Ze["[object RegExp]"]=Ze["[object Set]"]=Ze["[object String]"]=Ze["[object WeakMap]"]=!1;var Ye,Qe,Je,Xe=t&&!t.nodeType&&t,et=Xe&&e&&!e.nodeType&&e,tt=et&&et.exports===Xe&&K.process,nt=function(){try{return et&&et.require&&et.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?(Ye=rt,function(e){return Ye(e)}):function(e){return De(e)&&Ge(e.length)&&!!Ze[ne(e)]},it=Object.prototype.hasOwnProperty,at=Object.prototype,ut=(Qe=Object.keys,Je=Object,function(e){return Qe(Je(e))}),ct=Object.prototype.hasOwnProperty,st=function(e){return i=Le,a=null!=(n=t=r=e)&&Ge(n.length)&&!oe(n)?function(e,t){var n,r,i,a=Te(e),u=!a&&ze(e),c=!a&&!u&&Ke(e),s=!a&&!u&&!c&&ot(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!it.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&qe.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(t):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||at))return ut(e);var t,n,r=[];for(var o in Object(e))ct.call(e,o)&&"constructor"!=o&&r.push(o);return r}(t),Te(r)?a:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(a,i(r));var t,n,r,i,a},lt=Object.prototype.hasOwnProperty,ft=ve(G,"DataView"),pt=ve(G,"Promise"),dt=ve(G,"Set"),ht=ve(G,"WeakMap"),vt="[object Map]",yt="[object Promise]",mt="[object Set]",gt="[object WeakMap]",bt="[object DataView]",wt=ce(ft),_t=ce(ye),xt=ce(pt),St=ce(dt),Et=ce(ht),Ot=ne;(ft&&Ot(new ft(new ArrayBuffer(1)))!=bt||ye&&Ot(new ye)!=vt||pt&&Ot(pt.resolve())!=yt||dt&&Ot(new dt)!=mt||ht&&Ot(new ht)!=gt)&&(Ot=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case wt:return bt;case _t:return vt;case xt:return yt;case St:return mt;case Et:return gt}return t});var jt=Ot,kt="[object Arguments]",$t="[object Array]",Ct="[object Object]",At=Object.prototype.hasOwnProperty,Pt=function e(t,n,o,i,a){return t===n||(null==t||null==n||!De(t)&&!De(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Te(e),c=Te(t),s=u?$t:jt(e),l=c?$t:jt(t),f=(s=s==kt?Ct:s)==Ct,p=(l=l==kt?Ct:l)==Ct,d=s==l;if(d&&Ke(e)){if(!Ke(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Se),u||ot(e)?je(e,t,n,o,i,a):function(e,t,n,r,o,i,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||!i(new ke(e),new ke(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return F(+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=$e;case"[object Set]":var c=1&r;if(u||(u=Ce),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=je(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Pe)return Pe.call(e)==Pe.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&At.call(e,"__wrapped__"),v=p&&At.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Se),i(y,m,n,o,a)}}return!!d&&(a||(a=new Se),function(e,t,n,o,i,a){var u=1&n,c=st(e),s=c.length;if(s!=st(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:lt.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},Tt=function(e,t){return Pt(e,t)},It=f(824),Rt=f(685),Lt=(0,Rt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Dt=function(){return(0,Rt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Nt=function(){return(0,Rt.getGlobalStore)("extensions",{slots:{}})};d(Lt.getState()),Lt.subscribe(d);var Mt=Dt(),Ut=Nt(),Bt=(0,It.getExtensionSlotsConfigStore)(),Ft=(0,It.getExtensionsConfigStore)();Mt.subscribe((function(e){w(e,Bt.getState(),Ft.getState())})),Bt.subscribe((function(e){w(Mt.getState(),e,Ft.getState())})),Ft.subscribe((function(e){w(Mt.getState(),Bt.getState(),e)}));var zt=Mt.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),Vt=Mt.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=_(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})})),Ht=Ut.action((function(){return{slots:{},extensions:{}}})),Wt=f(645),Kt=Dt()}(),p}())}}}))},6856:function(e,t,n){"use strict";var r=function(e){var t=D.getState(),n=e(t);n!==t&&D.setState(n)},o=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}(0,R.Z)(I.configExtensionStore.getState().mountedExtensions,t)||I.configExtensionStore.setState({mountedExtensions:t})},i=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return a(n,e,t)},a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},u=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},c=function(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},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},l=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){s(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},p=function(e){return function(e){if(Array.isArray(e))return c(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 c(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)?c(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.")}()},d=function(e,t,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},d=x(o),h=S(o),v=!0,y=null;if(e){if(!h)throw Error("Couldn't find extension '".concat(d,"' to attach to '").concat(t,"'"));var m=h.load,g=h.online,b=h.offline,w=h.meta,_=h.moduleName;i(g,b)&&(m().then((function(r){var i=r.default,s=f(r,["default"]);v&&(y=(0,U.BP)(a(null!=i?i:s),l({},u(g,b),c,{_meta:w,_extensionContext:{extensionId:o,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:_},domElement:e})))})),r((function(r){var i={domElement:e,id:o,slotName:t,slotModuleName:n};return l({},r,{extensions:l({},r.extensions,s({},d,l({},r.extensions[d],{instances:p(r.extensions[d].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(o," into ").concat(t," but no DOM element was available."));return function(){v=!1,y&&("MOUNTED"!==y.getStatus()?y.mountPromise.then((function(){y&&y.unmount()})):y.unmount())}},h=function(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},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(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.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(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.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],p=C(l,e,(0,I.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}(0,R.Z)(F.getState().slots,r)||F.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},x=function(e){return m(e.split("#"),1)[0]},S=function(e){return t=B.getState(),n=x(e),t.extensions[n];var t,n},E=function(e,t){r((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},_(e),{attachedIds:[t]})))})}))},O=function(e,t){r((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){r((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},k=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return a(n,e.online,e.offline)}))},C=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=B.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=k(e,c,null===(n=s[x(e)])||void 0===n?void 0:n.order,i),a=k(t,c,null===(r=s[x(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(p=(v=y.next()).done);p=!0){var m=v.value,b=(0,I.getExtensionConfigFromStore)(r,e,m).config,w=x(m),_=t.extensions[w];_&&f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==y.return||y.return()}finally{if(d)throw h}}return f},A=function(e){return C(e,B.getState(),(0,I.getExtensionSlotConfig)(e).config,V.getState())};n.d(t,{pv:function(){return P.AssignedExtension},x9:function(){return T.CancelLoading},uP:function(){return P.ConnectedExtension},uu:function(){return P.ExtensionMeta},tj:function(){return P.ExtensionRegistration},u_:function(){return P.ExtensionSlotState},qN:function(){return P.ExtensionStore},ub:function(){return E},og:function(){return O},lW:function(){return j},h6:function(){return A},Kq:function(){return $},EB:function(){return x},yw:function(){return M},ix:function(){return H},Qq:function(){return W},H8:function(){return d}});var P={};n.r(P),n.d(P,{Co:function(){return N},yw:function(){return M},qO:function(){return r}});var T={};n.r(T),n.d(T,{H:function(){return d}});var I=n(9714),R=n(3202),L=n(5385),D=(0,L.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),N=function(){return(0,L.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},M=function(){return(0,L.getGlobalStore)("extensions",{slots:{}})};o(D.getState()),D.subscribe(o);var U=n(3710);N();var B=N(),F=M(),z=(0,I.getExtensionSlotsConfigStore)(),V=(0,I.getExtensionsConfigStore)();B.subscribe((function(e){w(e,z.getState(),V.getState())})),z.subscribe((function(e){w(B.getState(),e,V.getState())})),V.subscribe((function(e){w(B.getState(),z.getState(),e)}));var H=B.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),W=B.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=_(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})}));F.action((function(){return{slots:{},extensions:{}}}))},3103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(p,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:e}))},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},u=function(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l=function(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return s}});var p="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",h="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},2034:function(e,t,n){"use strict";var r=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(s,t),function(){return window.removeEventListener(s,t)}},o=function(e){return e({online:navigator.onLine}),r(e)},i=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(l,t),function(){return window.removeEventListener(l,t)}},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(f,t),function(){return window.removeEventListener(f,t)}},u=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}};n.d(t,{ac:function(){return c.ConnectivityChangedEvent},hM:function(){return c.PrecacheStaticDependenciesEvent},Kj:function(){return c.ShowNotificationEvent},P3:function(){return c.ShowToastEvent},BW:function(){return o},XS:function(){return r},NQ:function(){return a},dY:function(){return i},id:function(){return u}});var c={};n.r(c),n.d(c,{BW:function(){return o},XS:function(){return r},NQ:function(){return a},dY:function(){return i},id:function(){return u}});var s="openmrs:connectivity-changed",l="openmrs:precache-static-dependencies",f="openmrs:notification-shown",p="openmrs:toast-shown"},8082:function(e,t,r){"use strict";var i=function(){return{current:vn,notAvailable:!0,active:!1}},d=function(e,t){return"object"!=typeof t||bn(t).forEach((function(n){e[n]=t[n]})),e},h=function(e,t){return xn.call(e,t)},v=function(e,t){"function"==typeof t&&(t=t(_n(e))),("undefined"==typeof Reflect?bn:Reflect.ownKeys)(t).forEach((function(n){y(e,n,t[n])}))},y=function(e,t,n,r){Sn(e,t,d(n&&h(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},m=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),y(e.prototype,"constructor",e),{extend:v.bind(null,e.prototype)}}}},g=function(e,t,n){return jn.call(e,t,n)},b=function(e,t){return t(e)},w=function(e){if(!e)throw new Error("Assertion Failed")},x=function(e){gn.setImmediate?setImmediate(e):setTimeout(e,0)},S=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},E=function(e){var t={};for(var n in e)h(e,n)&&(t[n]=e[n]);return t},O=function(e){return Cn.apply([],e)},j=function(e){Tn="undefined"!=typeof WeakMap&&new WeakMap;var t=In(e);return Tn=null,t},k=function(e){return Rn.call(e).slice(8,-1)},$=function(e){var t,n,r,o;if(1===arguments.length){if(wn(e))return e.slice();if(this===Nn&&"string"==typeof e)return[e];if(o=Dn(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},C=function(e,t){Un=e,Bn=t},A=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Bn).map((function(e){return"\n"+e})).join("")):""},P=function(e,t){this._e=zn(),this.name=e,this.message=t},T=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},I=function(e,t,n,r){this._e=zn(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=T(e,t)},R=function(e,t){this._e=zn(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=T(e,t)},L=function(){},D=function(e){return e},N=function(e,t){return null==e||e===D?t:function(n){return t(e(n))}},M=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},U=function(e,t){return e===L?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?M(r,this.onsuccess):r),o&&(this.onerror=this.onerror?M(o,this.onerror):o),void 0!==i?i:n}},B=function(e,t){return e===L?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?M(n,this.onsuccess):n),r&&(this.onerror=this.onerror?M(r,this.onerror):r)}},F=function(e,t){return e===L?t:function(n){var r=e.apply(this,arguments);d(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?M(o,this.onsuccess):o),i&&(this.onerror=this.onerror?M(i,this.onerror):i),void 0===r?void 0===a?void 0:a:d(r,a)}},z=function(e,t){return e===L?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},V=function(e,t){return e===L?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},H=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=L,this._lib=!1;var t=this._PSD=vr;if(Un&&(this._stackHolder=zn(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Qn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&K(this,this._value))}this._state=null,this._value=null,++t.ref,wr(this,e)},W=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},K=function(e,t){if(fr.push(t),null===e._state){var n=e._lib&&J();t=dr(t),e._state=!1,e._value=t,Un&&null!==t&&"object"==typeof t&&!t._promise&&function(n,r,o){try{(function(){var n=On(t,"stack");t._promise=e,y(t,"stack",{get:function(){return ir?n&&(n.get?n.get.apply(t):n.value):e.stack}})}).apply(null,void 0)}catch(e){}}(),r=e,lr.some((function(e){return e._value===r._value}))||lr.push(r),q(e),n&&X()}var r},q=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)G(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===mr&&(++mr,ur((function(){0==--mr&&ee()}),[]))},G=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++mr,ur(Z,[n,e,t])}else e._listeners.push(t)},Z=function(e,t,n){try{pr=t;var r,o=t._value;t._state?r=e(o):(fr.length&&(fr=[]),r=e(o),-1===fr.indexOf(o)&&function(e){for(var t=lr.length;t;)if(lr[--t]._value===e._value)return void lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{pr=null,0==--mr&&ee(),--n.psd.ref||n.psd.finalize()}},Y=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},Q=function(){J()&&X()},J=function(){var e=cr;return cr=!1,sr=!1,e},X=function(){var e,t,n;do{for(;yr.length>0;)for(e=yr,yr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(yr.length>0);cr=!0,sr=!0},ee=function(){var e=lr;lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=gr.slice(0),n=t.length;n;)t[--n]()},te=function(e){return new H(Qn,!1,e)},ne=function(e,t){var n=vr;return function(){var r=J(),o=vr;try{return se(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{se(o,!1),r&&X()}}},re=function(e,t,n,r){var o=vr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++kr;var a=hr.env;i.env=or?{Promise:H,PromiseProp:{value:H,configurable:!0,writable:!0},all:H.all,race:H.race,allSettled:H.allSettled,any:H.any,resolve:H.resolve,reject:H.reject,nthen:he(a.nthen,i),gthen:he(a.gthen,i)}:{},t&&d(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=fe(i,e,n,r);return 0===i.ref&&i.finalize(),u},oe=function(){return xr.id||(xr.id=++Sr),++xr.awaits,xr.echoes+=100,xr.id},ie=function(){return!!xr.awaits&&(0==--xr.awaits&&(xr.id=0),xr.echoes=100*xr.awaits,!0)},ae=function(e){return xr.echoes&&e&&e.constructor===rr?(oe(),e.then((function(e){return ie(),e}),(function(e){return ie(),$r(e)}))):e},ue=function(e){++jr,xr.echoes&&0!=--xr.echoes||(xr.echoes=xr.id=0),Er.push(vr),se(e,!0)},ce=function(){var e=Er[Er.length-1];Er.pop(),se(e,!1)},se=function(e,t){var n=vr;if((t?!xr.echoes||Or++&&e===vr:!Or||--Or&&e===vr)||pe(t?ue.bind(null,e):ce),e!==vr&&(vr=e,n===hr&&(hr.env=le()),or)){var r=hr.env.Promise,o=e.env;er.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(gn,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}},le=function(){var e=gn.Promise;return or?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(gn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:er.then,gthen:e.prototype.then}:{}},fe=function(e,t,n,r,o){var i=vr;try{return se(e,!0),t(n,r,o)}finally{se(i,!1)}},pe=function(e){nr.call(Xn,e)},de=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=vr;n&&oe(),se(t,!0);try{return e.apply(this,arguments)}finally{se(o,!1),r&&pe(ie)}}},he=function(e,t){return function(n,r){return e.call(this,de(n,t),de(r,t))}},ve=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(gn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),d(r,o)):gn.CustomEvent&&d(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&gn.dispatchEvent&&(dispatchEvent(r),!gn.PromiseRejectionEvent&&gn.onunhandledrejection))try{gn.onunhandledrejection(r)}catch(e){}Un&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},ye=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},me=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=j(t))[e],t}},ge=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=z),o||(o=L);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){bn(e).forEach((function(t){var n=e[t];if(wn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Gn.InvalidArgument("Invalid event config");var r=i(t,D,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){x((function(){e.apply(null,t)}))}))}))}}))}},be=function(e,t){return m(t).from({prototype:e}),t},we=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},_e=function(e,t){e.filter=ye(e.filter,t)},xe=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return ye(r(),t())}:t,e.justLimit=n&&!r},Se=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Gn.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ee=function(e,t,n){var r=Se(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},Oe=function(e,t,n,r){var o=e.replayFilter?ye(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),h(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),je(Ee(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return je(Ee(e,r,n),ye(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},je=function(e,t,n,r){var o=ne(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=L}),(function(t){e.fail(t),n=L}))||o(e.value,e,(function(e){return n=e})),n()}))}))},ke=function(e){var t=void 0===e?"undefined":p(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=k(e);return"ArrayBuffer"===n?"binary":n},$e=function(e){return c(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ce=function(e,t){return e<t?-1:e===t?0:1},Ae=function(e,t){return e>t?-1:e===t?0:1},Pe=function(e,t,n){var r=c(e,zr)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Te=function(e){return new e.Collection(e,(function(){return De("")})).limit(0)},Ie=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},Re=function(e,t,n,r){var o,i,a,u,c,s,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Pe(e,"String expected.");function p(e){o="next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()},i="next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()},a="next"===e?Ce:Ae;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(function(){return Le(u[0],c[f-1]+r)}));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,c,h))return!0;for(var d=null,v=h;v<f;++v){var y=Ie(o,p,u[v],c[v],a,s);null===y&&null===d?h=v+1:(null===d||a(d,y)>0)&&(d=y)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d},Le=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},De=function(e){return{type:1,lower:e,upper:e}},Ne=function(e){return ne((function(t){return Me(t),e(t.target.error),!1}))},Me=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},Ue=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Be(t)}},Be=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},Fe=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:S(n,(function(e){return[e.name,e]}))}},ze=function(e){return null==e?function(){}:"string"==typeof e?1===(t=e).split(".").length?function(e){return e[t]}:function(e){return kn(e,t)}:function(t){return kn(t,e)};var t},Ve=function(e){return[].slice.call(e)},He=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},We=function(e,t){var n,r,o,i,a,u,f=e._novip,p=t.db,d=(n=f._middlewares,r=p,i=t,u=(o=f._deps).IDBKeyRange,o.indexedDB,a=function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o,i,a,u=(i=n,a=Ve((o=e).objectStoreNames),{schema:{name:o.name,tables:a.map((function(e){return i.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=wn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:ze(t)},indexes:Ve(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:wn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ze(o)};return i[He(o)]=a,a})),getIndexByKeyPath:function(e){return i[He(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[He(t)]=a.primaryKey),a}))},hasGetAll:a.length>0&&"getAll"in i.objectStore(a[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=u.schema,s=u.hasGetAll,f=c.tables.map((function(e){return{name:o=(t=e).name,schema:t,mutate:function(e){var t=e.trans,n=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,c){e=ne(e);var s=t.objectStore(o),f=null==s.keyPath,p="put"===n||"add"===n;if(!p&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var d,h=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],m=0,g=function(e){++m,Me(e)};if("deleteRange"===n){if(4===u.type)return e({numFailures:m,failures:y,results:[],lastResult:void 0});3===u.type?v.push(d=s.clear()):v.push(d=s.delete(r(u)))}else{var b=l(p?f?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(p)for(var x=0;x<h;++x)v.push(d=_&&void 0!==_[x]?s[n](w[x],_[x]):s[n](w[x])),d.onerror=g;else for(var S=0;S<h;++S)v.push(d=s[n](w[S])),d.onerror=g}var E=function(t){var r=t.target.result;v.forEach((function(e,t){return null!=e.error&&(y[t]=e.error)})),e({numFailures:m,failures:y,results:"delete"===n?i:v.map((function(e){return e.result})),lastResult:r})};d.onerror=function(e){g(e),E(e)},d.onsuccess=E}))},getMany:function(e){var t=e.trans,n=e.keys;return new Promise((function(e,r){e=ne(e);for(var i,a=t.objectStore(o),u=n.length,c=new Array(u),s=0,l=0,f=function(t){var n=t.target;c[n._pos]=n.result,++l===s&&e(c)},p=Ne(r),d=0;d<u;++d)null!=n[d]&&((i=a.get(n[d]))._pos=d,i.onsuccess=f,i.onerror=p,++s);0===s&&e(c)}))},get:function(e){var t=e.trans,n=e.key;return new Promise((function(e,r){e=ne(e);var i=t.objectStore(o).get(n);i.onsuccess=function(t){return e(t.target.result)},i.onerror=Ne(r)}))},query:(n=s,function(e){return new Promise((function(t,i){t=ne(t);var a=e.trans,u=e.values,c=e.limit,s=e.query,l=c===1/0?void 0:c,f=s.index,p=s.range,d=a.objectStore(o),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===c)return t({result:[]});if(n){var y=u?h.getAll(v,l):h.getAllKeys(v,l);y.onsuccess=function(e){return t({result:e.target.result})},y.onerror=Ne(i)}else{var m=0,g=u||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),b=[];g.onsuccess=function(e){var n=g.result;return n?(b.push(u?n.value:n.primaryKey),++m===c?t({result:b}):void n.continue()):t({result:b})},g.onerror=Ne(i)}}))}),openCursor:function(e){var t=e.trans,n=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,c){e=ne(e);var s=i.index,l=i.range,f=t.objectStore(o),p=s.isPrimaryKey?f:f.index(s.name),d=a?u?"prevunique":"prev":u?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=Ne(c),h.onsuccess=ne((function(n){var r=h.result;if(r){r.___id=++Kr,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=t,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=ne(c),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=ne(e),h.onerror=Ne(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return h.onsuccess=ne((function(e){h.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),c)}))},count:function(e){var t=e.query,n=e.trans,i=t.index,a=t.range;return new Promise((function(e,t){var u=n.objectStore(o),c=i.isPrimaryKey?u:u.index(i.name),s=r(a),l=s?c.count(s):c.count();l.onsuccess=ne((function(t){return e(t.target.result)})),l.onerror=Ne(t)}))}};var t,n,o})),p={};return f.forEach((function(e){return p[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!p[e])throw new Error("Table '".concat(e,"' not found"));return p[e]},MIN_KEY:-1/0,MAX_KEY:Wr(t),schema:c}}(r,u,i),{dbcore:n.dbcore.reduce((function(e,t){return s({},e,(0,t.create)(e))}),a)});f.core=d.dbcore,f.tables.forEach((function(e){var t=e.name;f.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=f.core.table(t),c(f[t],f.Table)&&(f[t].core=e.core))}))},Ke=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=On(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||c(t,o.Transaction)?y(t,e,{get:function(){return this.table(e)},set:function(t){Sn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},qe=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)c(e[t],n.Table)&&delete e[t]}))},Ge=function(e,t){return e._cfg.version-t._cfg.version},Ze=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ir)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var l=u[s],f=c[s];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},Ye=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return Qe(o,e)})),o},Qe=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},Je=function(e,t,n){var r={};return g(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=Ue(Be(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var c=t.index(t.indexNames[u]);o=c.keyPath;var s=Ue(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=Fe(e,i,a)})),r},Xe=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var l=u.indexNames[s],f=u.index(l).keyPath,p="string"==typeof f?f:"["+g(f).join("+")+"]";if(t[a]){var d=t[a].idxByName[p];d&&(d.name=l,delete t[a].idxByName[p],t[a].idxByName[l]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&gn.WorkerGlobalScope&&c(gn,gn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},et=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ro("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},tt=function(e){return e&&"function"==typeof e.databases},nt=function(e){return re((function(){return vr.letThrough=!0,e()}))},rt=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):wn(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},ot=function(e,t,n){var r=arguments.length;if(r<2)throw new Gn.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=O(o);return[e,i,n]},it=function(e,t,n){for(var r=wn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},at=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Ur(t.keys[o],e[i])&&(r.push(n?j(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},ut=function(e){return!("from"in e)},ct=function(e,t){ut(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;eo(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},st=function(e){var t=ut(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Ur(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Ur(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},lt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=s({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=ft(a)}e.d=ft(e)},ft=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},pt=function(e,t){return bn(t).forEach((function(n){ct(e[n]||(e[n]=new Xr),t[n])})),e},dt=function(e){var t=uo;try{uo=!0,Vr.storagemutated.fire(e)}finally{uo=t}},ht=function(e,t){return!t||"object"!==po(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},vt=function(){return new ho},yt=function(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},mt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},gt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){mt(i,r,o,a,u,"next",e)}function u(e){mt(i,r,o,a,u,"throw",e)}a(void 0)}))}},bt=function(e){return function(e){if(Array.isArray(e))return yt(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 yt(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)?yt(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.")}()},wt=function(){return Object.values(vo)},_t=function(e){vo[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),vo[e.id]=e},xt=function(e){return yo.apply(this,arguments)},St=function(e,t){return mo.apply(this,arguments)},Et=function(e,t){return go.apply(this,arguments)},Ot=function(e,t,n){return bo.apply(this,arguments)},jt=function(e,t){return wo.apply(this,arguments)},kt=function(e,t,n){return _o.apply(this,arguments)},$t=function(e,t){return xo.apply(this,arguments)},Ct=function(e,t,n){return So.apply(this,arguments)},At=function(){return Eo.apply(this,arguments)},Pt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Tt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Pt(i,r,o,a,u,"next",e)}function u(e){Pt(i,r,o,a,u,"throw",e)}a(void 0)}))}},It=function(){return Dt(),Oo},Rt=function(e,t){Dt(),_t({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},Lt=function(e){return jo.apply(this,arguments)},Dt=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")},Nt=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},Mt=function(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},Ut=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},Bt=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},Ft=function(){},zt=function(e,t){if(!t)return e&&e.then?e.then(Ft):Promise.resolve()},Vt=function(){return Promise.resolve(void 0)},Ht=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Wt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ht(i,r,o,a,u,"next",e)}function u(e){Ht(i,r,o,a,u,"throw",e)}a(void 0)}))}},Kt=function(e){return To.apply(this,arguments)},qt=function(){if(!Io&&!(Io="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Io(No)},Gt=function(){return Vo+zo()},Zt=function(e){return e.startsWith(Vo)},Yt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Qt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Yt(i,r,o,a,u,"next",e)}function u(e){Yt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Jt=function(){return Ko.apply(this,arguments)},Xt=function(e,t,n,r){return qo.apply(this,arguments)},en=function(e,t,n){return Go.apply(this,arguments)},tn=function(e,t){return Zo.apply(this,arguments)},nn=function(e,t){return Yo.apply(this,arguments)},rn=function(e){return Qo.apply(this,arguments)},on=function(e){return Jo.apply(this,arguments)},an=function(e){return Xo.apply(this,arguments)},un=function(e){var t;return!!(null===(t=Wo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},cn=function(e){return ei.apply(this,arguments)},sn=function(e){return ti.apply(this,arguments)},ln=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[e]={type:e,dependsOn:t,process:n,options:r}};r.d(t,{iC:function(){return fn.OfflineMode},Vm:function(){return fn.OfflineModeResult},Cg:function(){return pn.QueueItemDescriptor},we:function(){return pn.SyncItem},Ug:function(){return pn.SyncProcessOptions},jp:function(){return cn},Qd:function(){return un},Gy:function(){return sn},sF:function(){return Gt},vm:function(){return i},xA:function(){return xt},H_:function(){return St},Ui:function(){return wt},D2:function(){return on},WB:function(){return nn},aA:function(){return vt},k1:function(){return It},TI:function(){return an},Q2:function(){return rn},z7:function(){return Zt},gp:function(){return Kt},a7:function(){return Vo},Rz:function(){return Do},QI:function(){return Ro},$9:function(){return Lo},cV:function(){return Et},fR:function(){return Ot},X2:function(){return en},dt:function(){return Rt},pO:function(){return jt},ME:function(){return kt},Xc:function(){return _t},Kb:function(){return ln},ps:function(){return $t},mF:function(){return Ct},MO:function(){return Lt}});var fn={};r.r(fn),r.d(fn,{vm:function(){return i}});var pn={};r.r(pn),r.d(pn,{jp:function(){return cn},Qd:function(){return un},Gy:function(){return sn},D2:function(){return on},WB:function(){return nn},TI:function(){return an},Q2:function(){return rn},X2:function(){return en},H_:function(){return ln}});var dn=r(1602),hn=r.n(dn),vn="unavailable",yn=r(5385),mn=r(7641),gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,bn=Object.keys,wn=Array.isArray;"undefined"==typeof Promise||gn.Promise||(gn.Promise=Promise);var _n=Object.getPrototypeOf,xn={}.hasOwnProperty,Sn=Object.defineProperty,En=Object.getOwnPropertyDescriptor;function On(e,t){var n;return En(e,t)||(n=_n(e))&&On(n,t)}var jn=[].slice;function kn(e,t){if(h(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=kn(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:kn(u,t.substr(a+1))}}function $n(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){w("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)$n(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?wn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c||(c=e[a]={}),$n(c,u,n)}}else void 0===n?wn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var Cn=[].concat,An="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(O([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return gn[e]})),Pn=An.map((function(e){return gn[e]}));S(An,(function(e){return[e,!0]}));var Tn=null;function In(e){if(!e||"object"!=typeof e)return e;var t=Tn&&Tn.get(e);if(t)return t;if(wn(e)){t=[],Tn&&Tn.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(In(e[n]))}else if(Pn.indexOf(e.constructor)>=0)t=e;else{var o=_n(e);for(var i in t=o===Object.prototype?{}:Object.create(o),Tn&&Tn.set(e,t),e)h(e,i)&&(t[i]=In(e[i]))}return t}var Rn={}.toString,Ln="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Dn="symbol"==(void 0===Ln?"undefined":p(Ln))?function(e){var t;return null!=e&&(t=e[Ln])&&t.apply(e)}:function(){return null},Nn={},Mn="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},Un="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Bn=function(){return!0},Fn=!new Error("").stack;function zn(){if(Fn)try{throw zn.arguments,new Error}catch(e){return e}return new Error}var Vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Hn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Vn),Wn={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};m(P).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+A(this._e,2))}},toString:function(){return this.name+": "+this.message}}),m(I).from(P),m(R).from(P);var Kn=Hn.reduce((function(e,t){return e[t]=t+"Error",e}),{}),qn=P,Gn=Hn.reduce((function(e,t){var n=function(e,n){this._e=zn(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=Wn[t]||r,this.inner=null)},r=t+"Error";return m(n).from(qn),e[t]=n,e}),{});Gn.Syntax=SyntaxError,Gn.Type=TypeError,Gn.Range=RangeError;var Zn=Vn.reduce((function(e,t){return e[t+"Error"]=Gn[t],e}),{}),Yn=Hn.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Gn[t]),e}),{});Yn.ModifyError=I,Yn.DexieError=P,Yn.BulkError=R;var Qn={},Jn=l("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,_n(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,_n(t),e]}(),3),Xn=Jn[0],er=Jn[1],tr=Jn[2],nr=er&&er.then,rr=Xn&&Xn.constructor,or=!!tr,ir=!1,ar=tr?function(){tr.then(Q)}:gn.setImmediate?setImmediate.bind(null,Q):gn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){Q(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Q,0)},ur=function(e,t){yr.push([e,t]),sr&&(ar(),sr=!1)},cr=!0,sr=!0,lr=[],fr=[],pr=null,dr=D,hr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ve,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{ve(e[0],e[1])}catch(e){}}))}},vr=hr,yr=[],mr=0,gr=[],br={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==vr||n!==jr),a=i&&!ie(),u=new H((function(n,u){G(o,new W(de(e,t,i,a),de(r,t,i,a),n,u,t))}));return Un&&Y(u,this),u},t=vr,n=jr;return e.prototype=Qn,e},set:function(e){y(this,"then",e&&e.prototype===Qn?br:{get:function(){return e},set:br.set})}};function wr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&J();t&&"function"==typeof t.then?wr(e,(function(e,n){c(t,H)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,q(e)),n&&X()}}),K.bind(null,e))}catch(t){K(e,t)}}function _r(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=A(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Un&&((r=A(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&_r(e._prev,t,n)),t}v(H.prototype,{then:br,_then:function(e,t){G(this,new W(null,null,e,t,vr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return c(e,t)?n(e):te(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):te(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),te(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{ir=!0;var e=_r(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{ir=!1}}},timeout:function(e,t){var n=this;return e<1/0?new H((function(r,o){var i=setTimeout((function(){return o(new Gn.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&y(H.prototype,Symbol.toStringTag,"Dexie.Promise"),hr.env=le(),v(H,{all:function(){var e=$.apply(null,arguments).map(ae);return new H((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return H.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(c(e,H))return e;if(e&&"function"==typeof e.then)return new H((function(t,n){e.then(t,n)}));var t=new H(Qn,!0,e);return Y(t,pr),t},reject:te,race:function(){var e=$.apply(null,arguments).map(ae);return new H((function(t,n){e.map((function(e){return H.resolve(e).then(t,n)}))}))},PSD:{get:function(){return vr},set:function(e){return vr=e}},totalEchoes:{get:function(){return jr}},newPSD:re,usePSD:fe,scheduler:{get:function(){return ur},set:function(e){ur=e}},rejectionMapper:{get:function(){return dr},set:function(e){dr=e}},follow:function(e,t){return new H((function(n,r){return re((function(t,n){var r=vr;r.unhandleds=[],r.onunhandled=n,r.finalize=M((function(){var e=this;gr.push((function r(){0===e.unhandleds.length?t():n(e.unhandleds[0]),gr.splice(gr.indexOf(r),1)})),++mr,ur((function(){0==--mr&&ee()}),[])}),r.finalize),e()}),t,n,r)}))}}),rr&&(rr.allSettled&&y(H,"allSettled",(function(){var e=$.apply(null,arguments).map(ae);return new H((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return H.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),rr.any&&"undefined"!=typeof AggregateError&&y(H,"any",(function(){var e=$.apply(null,arguments).map(ae);return new H((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return H.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var xr={awaits:0,echoes:0,id:0},Sr=0,Er=[],Or=0,jr=0,kr=0;-1===(""+nr).indexOf("[native code]")&&(oe=ie=L);var $r=H.reject;function Cr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||vr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Kn.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Cr(e,t,n,r)}))):$r(o)}return o._promise(t,(function(e,t){return re((function(){return vr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return $r(new Gn.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return $r(new Gn.DatabaseClosed);e.open().catch(L)}return e._state.dbReadyPromise.then((function(){return Cr(e,t,n,r)}))}var Ar=String.fromCharCode(65535),Pr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Tr=[],Ir="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Rr=Ir,Lr=Ir,Dr=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Nr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},Mr=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new Gn.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||vr.trans,i=this.name,a=J();try{return o&&o.db===this.db?o===vr.trans?o._promise(e,r,n):re((function(){return o._promise(e,r,n)}),{trans:o,transless:vr.transless||vr}):Cr(this.db,e,[this.name],r)}finally{a&&X()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(wn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=bn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==Ar)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&Un&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=l(n.reduce((function(n,r){var i=l(n,2),a=i[0],u=i[1],c=o[r],s=e[r];return[a||c,a||!c?ye(u,c&&c.multi?function(e){var n=kn(e,r);return wn(n)&&n.some((function(e){return t(s,e)}))}:function(e){return t(s,kn(e,r))}):u]}),[null,null]),2),u=a[0],c=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,wn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(h(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){d(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=me(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{$n(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||wn(e))return this.where(":id").equals(e).modify(t);var n=kn(e,this.schema.primKey.keyPath);if(void 0===n)return $r(new Gn.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?bn(t).forEach((function(n){$n(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=me(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{$n(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Nr})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new Gn.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Gn.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(me(c)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new R("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new Gn.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Gn.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(me(c)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new R("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new R("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function Ur(e,t){try{var n=ke(e),r=ke(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}($e(e),$e(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=Ur(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var Br=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,$r.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,$r.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=ye(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return Oe(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&d(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return Oe(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(we(n,!0))return r.count({trans:e,query:{index:Se(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return Oe(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&we(n,!0)&&n.limit>0){var r=n.valueMapper,o=Se(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return Oe(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,we(t)?xe(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):xe(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),xe(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return _e(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return _e(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=ye(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&we(t,!0)&&t.limit>0)return this._read((function(e){var n=Se(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return _e(this._ctx,(function(e){var t=e.primaryKey.toString(),r=h(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=bn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];kn(t,o)!==u&&($n(t,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,l=c.extractKey,f=t.db._options.modifyChunkSize||200,p=[],d=0,h=[],v=function(e,t){var n=t.failures,r=t.numFailures;d+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,c=bn(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value;p.push(n[s])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var c=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+c),cache:"immutable"}).then((function(p){for(var d=[],h=[],y=s?[]:null,m=[],g=0;g<c;++g){var b=p[g],w={value:j(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):s||0===Ur(l(b),l(w.value))?(h.push(w.value),s&&y.push(t[a+g])):(m.push(t[a+g]),d.push(w.value)))}var _=we(n)&&n.limit===1/0&&("function"!=typeof e||e===Fr)&&{index:n.index,range:n.range};return Promise.resolve(d.length>0&&u.mutate({trans:r,type:"add",values:d}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);v(d.length,e)}))).then((function(){return(h.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:y,values:h,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return v(h.length,e)}))})).then((function(){return(m.length>0||_&&e===Fr)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return v(m.length,e)}))})).then((function(){return t.length>a+c&&i(a+f)}))}))};return i(0).then((function(){if(p.length>0)throw new I("Error modifying one or more objects",p,d,h);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return we(e)&&(e.isPrimKey&&!Lr||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new I("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(Fr)}}]),e}(),Fr=function(e,t){return t.value=null},zr=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Te(this):new this.Collection(this,(function(){return Le(e,t,!n,!r)}))}catch(e){return Pe(this,Pr)}}},{key:"equals",value:function(e){return null==e?Pe(this,Pr):new this.Collection(this,(function(){return De(e)}))}},{key:"above",value:function(e){return null==e?Pe(this,Pr):new this.Collection(this,(function(){return Le(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Pe(this,Pr):new this.Collection(this,(function(){return Le(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Pe(this,Pr):new this.Collection(this,(function(){return Le(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Pe(this,Pr):new this.Collection(this,(function(){return Le(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Pe(this,"String expected."):this.between(e,e+Ar,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):Re(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],Ar)}},{key:"equalsIgnoreCase",value:function(e){return Re(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=$.apply(Nn,arguments);return 0===e.length?Te(this):Re(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=$.apply(Nn,arguments);return 0===e.length?Te(this):Re(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,Ar)}},{key:"anyOf",value:function(){var e=this,t=$.apply(Nn,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Pe(this,Pr)}if(0===t.length)return Te(this);var r=new this.Collection(this,(function(){return Le(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=$.apply(Nn,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Pe(this,Pr)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return p(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,c=this._max;if(0===e.length)return Te(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Pe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Gn.InvalidArgument);var s,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,p=i;try{(s=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=c(i[1],t[1]);break}}return n===r&&e.push(t),e}),[])).sort(r)}catch(e){return Pe(this,Pr)}var d=0,h=f?function(e){return i(e,s[d][1])>0}:function(e){return i(e,s[d][1])>=0},v=l?function(e){return a(e,s[d][0])>0}:function(e){return a(e,s[d][0])>=0},y=h,m=new this.Collection(this,(function(){return Le(s[0][0],s[s.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(y=h,p=i):(y=v,p=a),s.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;y(o);)if(++d===s.length)return t(r),!1;return!((h(a=o)||v(a))&&(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||t((function(){p===i?e.continue(s[d][0]):e.continue(s[d][1])})),1));var a})),m}},{key:"startsWithAnyOf",value:function(){var e=$.apply(Nn,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Te(this):this.inAnyRange(e.map((function(e){return[e,e+Ar]}))):Pe(this,"startsWithAnyOf() only works with strings")}}]),e}(),Vr=ge(null,"storagemutated"),Hr=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return w(!vr.global),++this._reculock,1!==this._reculock||vr.global||(vr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(w(!vr.global),0==--this._reculock)for(vr.global||(vr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{fe(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&vr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(w(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Gn.DatabaseClosed(r);case"MissingAPIError":throw new Gn.MissingAPI(r.message,r);default:throw new Gn.OpenFailed(r)}if(!this.active)throw new Gn.TransactionInactive;return w(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ne((function(n){Me(n),t._reject(e.error)})),e.onabort=ne((function(n){Me(n),t.active&&t._reject(new Gn.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=ne((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Vr.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return $r(new Gn.ReadOnly("Transaction is readonly"));if(!this.active)return $r(new Gn.TransactionInactive);if(this._locked())return new H((function(o,i){var a=r;r._blockedFuncs.push([function(){a._promise(e,t,n).then(o,i)},vr])}));if(n)return re((function(){var e=r,n=new H((function(n,r){e._lock();var o=t(n,r,e);o&&o.then&&o.then(n,r)}));return n.finally((function(){return e._unlock()})),n._lib=!0,n}));var o=new H((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=H.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new H((function(e,r){n.then((function(n){return t._waitingQueue.push(ne(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(ne(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Gn.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(h(t,e))return t[e];var n=this.schema[e];if(!n)throw new Gn.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),Wr=function(e){try{return e.only([[]]),Wr=function(){return[[]]},[[]]}catch(e){return Wr=function(){return Ar},Ar}},Kr=0,qr=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){bn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Ue(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),wn(r),0===t)})),o=r.shift();if(o.multi)throw new Gn.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new Gn.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Gn.Schema("Index must have a name and cannot be an empty string")})),t[n]=Fe(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?d(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){d(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,qe(t,[t._allTables,t,t.Transaction.prototype]),Ke(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],bn(o),o),t._storeNames=bn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=V(this._cfg.contentUpgrade||L,e),this}}]),e}();function Gr(e,t,n,r,o){return H.resolve().then((function(){var i=vr.transless||vr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Kn.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Gr(e,t,n,null,o)}))):$r(r)}var c,s=Mn(o);s&&oe();var l=H.follow((function(){if(c=o.call(a,a))if(s){var e=ie.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=rt(c))}),u);return(c&&"function"==typeof c.then?H.resolve(c).then((function(e){return a.active?e:$r(new Gn.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),$r(e)}))}))}var Zr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return s({},e,{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?s({},t,{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:it(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:it(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=He(e),o=i[r]=i[r]||[],c=null==e?0:"string"==typeof e?1:e.length,l=t>0,f=s({},n,{isVirtual:l,keyTail:t,keyLength:c,extractKey:ze(e),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||a.push(f),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),f}var c=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,p=void 0;try{for(var d,h=o.indexes[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;u(v.keyPath,0,v)}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:a,getIndexByKeyPath:function(e){var t=i[He(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(it(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(it(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(t)}});return y}})}};function Yr(e,t,n,r){return n=n||{},r=r||"",bn(e).forEach((function(o){if(h(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=k(i);u!==k(a)?n[r+o]=t[o]:"Object"===u?Yr(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),bn(t).forEach((function(o){h(e,o)||(n[r+o]=t[o])})),n}var Qr={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return s({},e,{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=s({},n,{mutate:function(e){var o=function(e){var t,o,i=vr.trans,a=e.keys||(t=r,"delete"===(o=e).type?o.keys:o.keys||o.values.map(t.extractKey));if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?s({},e,{keys:a}):s({},e)).type&&(e.values=f(e.values)),e.keys&&(e.keys=f(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,a).then((function(t){var o=a.map((function(n,o){var a=t[o],s={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(s,n,a,i);else if("add"===e.type||void 0===a){var f=c.fire.call(s,n,e.values[o],i);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||$n(e.values[o],r.keyPath,n))}else{var p=Yr(a,e.values[o]),d=l.fire.call(s,p,n,a,i);if(d){var v=e.values[o];Object.keys(d).forEach((function(e){h(v,e)?v[e]=d[e]:$n(v,e,d[e])}))}}return s}));return n.mutate(e).then((function(n){for(var r=n.failures,i=n.results,u=n.numFailures,c=n.lastResult,s=0;s<a.length;++s){var l=i?i[s]:a[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===e.type&&t[s]?e.values[s]:l)}return{failures:r,results:i,numFailures:u,lastResult:c}})).catch((function(e){return o.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=vr.trans,a=i.table(t).hook,u=a.deleting,c=a.creating,l=a.updating;switch(e.type){case"add":if(c.fire===L)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(c.fire===L&&l.fire===L)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===L)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===L)break;return i._promise("readwrite",(function(){return p((t=e).trans,t.range,1e4);var t}),!0)}return n.mutate(e);function p(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:p(e,s({},t,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Jr={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return s({},n,{getMany:function(e){if(!e.cache)return n.getMany(e);var t=at(e.keys,e.trans._cache,"clone"===e.cache);return t?H.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?j(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Xr=function(e,t){if(!this){var n=new Xr;return e&&"d"in e&&d(n,e),n}d(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function eo(e,t,n){var r=Ur(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(ut(e))return d(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(Ur(n,e.from)<0)return o?eo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},lt(e);if(Ur(t,e.to)>0)return i?eo(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},lt(e);Ur(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Ur(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&ct(e,o),i&&a&&ct(e,i)}}v(Xr.prototype,u({add:function(e){return ct(this,e),this},addKey:function(e){return eo(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return eo(t,e,e)})),this}},Ln,(function(){return st(this)})));var to,no={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Xr(e.MIN_KEY,e.MAX_KEY);return s({},e,{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,c=a.outbound,f=s({},o,{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Xr)},s=c(""),f=c(":dels"),p=e.type,d=l("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),h=d[0],v=d[1],y=e.trans._cache;return o.mutate(e).then((function(e){if(wn(h)){"delete"!==p&&(h=e.results),s.addKeys(h);var t=at(h,y);t||"add"===p||f.addKeys(h),(t||v)&&(o=c,a=t,u=v,i.indexes.forEach((function(e){var t=function(t){return null!=t?e.extractKey(t):null},n=o(e.name||""),r=function(t){return e.multiEntry&&wn(t)?t.forEach((function(e){return n.addKey(e)})):n.addKey(t)};(a||u).forEach((function(e,n){var o=a&&t(a[n]),i=u&&t(u[n]);0!==Ur(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(h){var r={from:h.lower,to:h.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(e){return c(e.name).add(n)}));var o,a,u;return e}))}}),p=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Xr(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},d={get:function(e){return[a,new Xr(e.key)]},getMany:function(e){return[a,(new Xr).addKeys(e.keys)]},count:p,query:p,openCursor:p};return bn(d).forEach((function(e){f[e]=function(i){var a=vr.subscr;if(a){var f=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Xr)},p=f(""),h=f(":dels"),v=l(d[e](i),2),y=v[0],m=v[1];if(f(y.name||"").add(m),!y.isPrimaryKey){if("count"!==e){var g="query"===e&&c&&i.values&&o.query(s({},i,{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&i.values)return g.then((function(e){var n=e.result;return p.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?p.addKeys(n):h.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return h.addKey(e),e}},value:{get:function(){return o&&p.addKey(r.primaryKey),r.value}}})}return t}))}h.add(n)}}return o[e].apply(this,arguments)}})),f}})}},ro=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=s({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,c,l,f,p={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:L,dbReadyPromise:null,cancelOpen:L,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};p.dbReadyPromise=new H((function(e){p.dbReadyResolve=e})),p.openCanceller=new H((function(e,t){p.cancelOpen=t})),this._state=p,this.name=t,this.on=ge(this,"populate","blocked","versionchange","close",{ready:[V,L]}),this.on.ready.subscribe=b(this.on.ready.subscribe,(function(t){return function(n,o){var i=r;e.vip((function(){var e=i._state;if(e.openComplete)e.dbOpenError||H.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var r=i;o||t((function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,be(Br.prototype,(function(e,t){this.db=u;var n=Nr,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==D?a:null}}))),this.Table=(f=this,be(Mr.prototype,(function(e,t,n){this.db=f,this._tx=n,this.name=e,this.schema=t,this.hook=f._allTables[e]?f._allTables[e].hook:ge(null,{creating:[U,L],reading:[N,D],updating:[F,L],deleting:[B,L]})}))),this.Transaction=(l=this,be(Hr.prototype,(function(e,t,n,r,o){var i=this;this.db=l,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=ge(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new H((function(e,t){i._resolve=e,i._reject=t})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(e){var t=i.active;return i.active=!1,i.on.error.fire(e),i.parent?i.parent._reject(e):t&&i.idbtrans&&i.idbtrans.abort(),$r(e)}))}))),this.Version=function(e){return be(qr.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,be(zr.prototype,(function(e,t,n){this.db=c,this._ctx={table:e,index:":id"===t?null:t,or:n};var r=c._deps.indexedDB;if(!r)throw new Gn.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(e,t){return r.cmp(t,e)},this._max=function(e,t){return r.cmp(e,t)>0?e:t},this._min=function(e,t){return r.cmp(e,t)<0?e:t},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=Wr(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){var t=r;r.on("blocked").fire(e),Tr.filter((function(e){return e.name===t.name&&e!==t&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Zr),this.use(Qr),this.use(no),this.use(Jr),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new Gn.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Gn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Ge),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||vr.letThrough||this._vip)?e():new H((function(e,n){if(t._state.openComplete)return n(new Gn.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new Gn.DatabaseClosed);t.open().catch(L)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==i)throw new Gn.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?$r(n.dbOpenError):e}));Un&&(n.openCanceller._stackHolder=zn()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o,i=n.openCanceller,a=n.dbReadyResolve,u=null,c=!1;return H.race([i,("undefined"==typeof navigator?H.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var t=function(){return indexedDB.databases().finally(e)};o=setInterval(t,100),t()})).finally((function(){return clearInterval(o)})):Promise.resolve()).then((function(){return new H((function(o,i){if(t(),!r)throw new Gn.MissingAPI;var a=e.name,s=n.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!s)throw new Gn.MissingAPI;s.onerror=Ne(i),s.onblocked=ne(e._fireOnBlocked),s.onupgradeneeded=ne((function(t){if(u=s.transaction,n.autoSchema&&!e._options.allowEmptyDB){s.onerror=Me,u.abort(),s.result.close();var o=r.deleteDatabase(a);o.onsuccess=o.onerror=ne((function(){i(new Gn.NoSuchDatabase("Database ".concat(a," doesnt exist")))}))}else{u.onerror=Ne(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;c=l<1,e._novip.idbdb=s.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=vr.transless||vr;re((function(){var r,c,s,l,f,p,d,h,v;vr.trans=i,vr.transless=u,0===t?(bn(o).forEach((function(e){Ye(n,e,o[e].primKey,o[e].indexes)})),We(e,n),H.follow((function(){return e.on.populate.fire(i)})).catch(a)):(r=e,c=t,s=i,l=n,f=r._novip,p=[],d=f._versions,h=f._dbSchema=Je(0,f.idbdb,l),v=!1,d.filter((function(e){return e._cfg.version>=c})).forEach((function(e){p.push((function(){var t=h,n=e._cfg.dbschema;Xe(f,t,l),Xe(f,n,l),h=f._dbSchema=n;var r=Ze(t,n);r.add.forEach((function(e){Ye(l,e[0],e[1].primKey,e[1].indexes)})),r.change.forEach((function(e){if(e.recreate)throw new Gn.Upgrade("Not yet support for changing primary key");var t=l.objectStore(e.name);e.add.forEach((function(e){return Qe(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),Qe(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var o=e._cfg.contentUpgrade;if(o&&e._cfg.version>c){We(f,l),s._memoizedTables={},v=!0;var i=E(n);r.del.forEach((function(e){i[e]=t[e]})),qe(f,[f.Transaction.prototype]),Ke(f,[f.Transaction.prototype],bn(i),i),s.schema=i;var a,u=Mn(o);u&&oe();var p=H.follow((function(){if((a=o(s))&&u){var e=ie.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?H.resolve(a):p.then((function(){return a}))}})),p.push((function(t){var n,r;v&&Rr||(n=e._cfg.dbschema,r=t,[].slice.call(r.db.objectStoreNames).forEach((function(e){return null==n[e]&&r.db.deleteObjectStore(e)}))),qe(f,[f.Transaction.prototype]),Ke(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function e(){return p.length?H.resolve(p.shift()(s.idbtrans)).then(e):H.resolve()}().then((function(){var e,t;t=l,bn(e=h).forEach((function(n){t.db.objectStoreNames.contains(n)||Ye(t,n,e[n].primKey,e[n].indexes)}))}))).catch(a)}))}(e,l/10,u,i)}}),i),s.onsuccess=ne((function(){u=null;var t,r,i,l,f=e._novip.idbdb=s.result,p=g(f.objectStoreNames);if(p.length>0)try{var d=f.transaction(1===(l=p).length?l[0]:l,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=Je(0,t,n);r._storeNames=g(t.objectStoreNames,0),Ke(r,[r._allTables],bn(o),o)}(e,f,d):(Xe(e,e._dbSchema,d),r=d,!((i=Ze(Je(0,(t=e).idbdb,r),t._dbSchema)).add.length||i.change.some((function(e){return e.add.length||e.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),We(e,d)}catch(e){}Tr.push(e),f.onversionchange=ne((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),f.onclose=ne((function(t){e.on("close").fire(t)})),c&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!tt(n)&&"__dbnames"!==t&&et(n,r).put({name:t}).catch(L)}(e._deps,a),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],H.resolve(nt((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(V,L);return n.onReadyBeingFired=[],H.resolve(nt((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{u&&u.abort()}catch(e){}return i===n.openCanceller&&e._close(),$r(t)})).finally((function(){n.openComplete=!0,a()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=Tr.indexOf(this);if(t>=0&&Tr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new H((function(t){e.dbReadyResolve=t})),e.openCanceller=new H((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Gn.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new H((function(r,o){var i=e,a=function(){var e=i;i.close();var t=i._deps.indexedDB.deleteDatabase(i.name);t.onsuccess=ne((function(){var t,n,o,i;t=e._deps,n=e.name,o=t.indexedDB,i=t.IDBKeyRange,!tt(o)&&"__dbnames"!==n&&et(o,i).delete(n).catch(L),r()})),t.onerror=Ne(o),t.onblocked=i._fireOnBlocked};if(t)throw new Gn.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return bn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=ot.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=vr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{var s=this;if(a=t.map((function(e){var t=c(e,s.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Gn.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new Gn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new Gn.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):$r(e)}var l=Gr.bind(null,this,i,a,o,n);return o?o._promise(i,l,"lock"):vr.trans?fe(vr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(e){if(!h(this._allTables,e))throw new Gn.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),oo="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",io=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:oo,value:function(){return this}}]),e}();try{to={indexedDB:gn.indexedDB||gn.mozIndexedDB||gn.webkitIndexedDB||gn.msIndexedDB,IDBKeyRange:gn.IDBKeyRange||gn.webkitIDBKeyRange}}catch(e){to={indexedDB:null,IDBKeyRange:null}}var ao=ro;v(ao,s({},Yn,{delete:function(e){return new ao(e,{addons:[]}).delete()},exists:function(e){return new ao(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return(t=ao.dependencies,n=t.indexedDB,r=t.IDBKeyRange,tt(n)?Promise.resolve(n.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):et(n,r).toCollection().primaryKeys()).then(e)}catch(e){return $r(new Gn.MissingAPI)}var t,n,r},defineClass:function(){return function(e){d(this,e)}},ignoreTransaction:function(e){return vr.trans?fe(vr.transless,e):e()},vip:nt,async:function(e){return function(){try{var t=rt(e.apply(this,arguments));return t&&"function"==typeof t.then?t:H.resolve(t)}catch(e){return $r(e)}}},spawn:function(e,t,n){try{var r=rt(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:H.resolve(r)}catch(e){return $r(e)}},currentTransaction:{get:function(){return vr.trans||null}},waitFor:function(e,t){var n=H.resolve("function"==typeof e?ao.ignoreTransaction(e):e).timeout(t||6e4);return vr.trans?vr.trans.waitFor(n):n},Promise:H,debug:{get:function(){return Un},set:function(e){C(e,"dexie"===e?function(){return!0}:Dr)}},derive:m,extend:d,props:v,override:b,Events:ge,on:Vr,liveQuery:function(e){return new io((function(t){var n=function(){return bn(a).some((function(e){return i[e]&&function(e,t){var n=st(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=st(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(Ur(u.from,o.to)<=0&&Ur(u.to,o.from)>=0)return!0;Ur(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=Mn(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,Vr.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var c=!1,s=!1,l=function(e){pt(i,e),n()&&f()},f=function(){if(!c&&!o){i={};var p={},d=function(t){r&&oe();var n=function(){return re(e,{subscr:t,trans:null})},o=vr.trans?fe(vr.transless,n):n();return r&&o.then(ie,ie),o}(p);s||(Vr("storagemutated",l),s=!0),c=!0,Promise.resolve(d).then((function(e){c=!1,o||(n()?f():(i={},a=p,t.next&&t.next(e)))}),(function(e){c=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:pt,getByKeyPath:kn,setByKeyPath:$n,delByKeyPath:function(e,t){"string"==typeof t?$n(e,t,void 0):"length"in t&&[].map.call(t,(function(t){$n(e,t,void 0)}))},shallowClone:E,deepClone:j,getObjectDiff:Yr,cmp:Ur,asap:x,minKey:-1/0,addons:[],connections:Tr,errnames:Kn,dependencies:to,semVer:"3.2.1",version:"3.2.1".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),ao.maxKey=Wr(ao.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Vr("storagemutated",(function(e){var t;uo||(Ir?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uo=!0,dispatchEvent(t),uo=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;uo||dt(t)})));var uo=!1;if("undefined"!=typeof BroadcastChannel){var co=new BroadcastChannel("x-storagemutated-1");Vr("storagemutated",(function(e){uo||co.postMessage(e)})),co.onmessage=function(e){e.data&&dt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Vr("storagemutated",(function(e){try{uo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&dt(t.changedParts)}}));var so=self.document&&navigator.serviceWorker;so&&so.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&dt(t.changedParts)}))}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fo(e,t){return(fo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}H.rejectionMapper=function(e,t){if(!e||c(e,P)||c(e,TypeError)||c(e,SyntaxError)||!e.name||!Zn[e.name])return e;var n=new Zn[e.name](t||e.message,e);return"stack"in e&&y(n,"stack",{get:function(){return this.inner.stack}}),n},C(Un,Dr);var po=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)},ho=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fo(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=lo(t);if(n){var o=lo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ht(this,e)});function o(){var e;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return o}(ro),vo={};function yo(){return(yo=gt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,At();case 2:return n=e.sent,e.next=5,St(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mo(){return(mo=gt(hn().mark((function e(t,n){var r,o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,users:t}:{users:t},o=new ho,e.next=4,o.dynamicOfflineData.where(r).toArray().catch(ro.errnames.DatabaseClosed,(function(){return[]}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function go(){return(go=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,At();case 2:return r=e.sent,e.next=5,Ot(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bo(){return(bo=gt(hn().mark((function e(t,n,r){var o,i;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new ho,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(ro.errnames.DatabaseClosed,(function(){}));case 3:if(i=e.sent){e.next=9;break}return e.next=7,o.dynamicOfflineData.add({users:[t],type:n,identifier:r}).catch(ro.errnames.DatabaseClosed);case 7:e.next=12;break;case 9:if(i.users.includes(t)){e.next=12;break}return e.next=12,o.dynamicOfflineData.update(i.id,{users:bt(i.users).concat([t])}).catch(ro.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wo(){return(wo=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,At();case 2:return r=e.sent,e.next=5,kt(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _o(){return(_o=gt(hn().mark((function e(t,n,r){var o,i;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new ho,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:t}).catch(ro.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=e.sent)){e.next=12;break}if(!(i.users.length>1)){e.next=10;break}return e.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(e){return e!==t}))}).catch(ro.errnames.DatabaseClosed);case 8:e.next=12;break;case 10:return e.next=12,o.dynamicOfflineData.delete(i.id).catch(ro.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xo(){return xo=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xt(t);case 2:return r=e.sent,e.next=5,Promise.all(r.map(function(){var e=gt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ct(t.type,t.identifier,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),xo.apply(this,arguments)}function So(){return So=gt(hn().mark((function e(t,n,r){var o,i,a,u,c,s,l,f,p;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Et(t,n);case 2:return o=new ho,e.next=5,At();case 5:return i=e.sent,e.next=8,o.dynamicOfflineData.get({type:t,identifier:n}).catch(ro.errnames.DatabaseClosed,(function(){}));case 8:if(a=e.sent,u=wt().filter((function(e){return e.type===t})),a){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,Promise.all(u.map(function(){var e=gt(hn().mark((function e(t){var o,i,a;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.sync(n,r),e.abrupt("return",{id:t.id,error:void 0});case 5:return e.prev=5,e.t0=e.catch(0),a=null!==(i=null===(o=e.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:e.t0.toString(),e.abrupt("return",{id:t.id,error:a});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 14:if(c=e.sent,s=c.filter((function(e){return!e.error})).map((function(e){return e.id})),l=c.filter((function(e){return e.error})).map((function(e){return e.id})),f=c.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),p={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!a.id){e.next=22;break}return e.next=22,o.dynamicOfflineData.update(a.id,{syncState:p}).catch(ro.errnames.DatabaseClosed);case 22:case"end":return e.stop()}}),e)}))),So.apply(this,arguments)}function Eo(){return(Eo=gt(hn().mark((function e(){var t;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,mn.getLoggedInUser)();case 2:if(t=e.sent.uuid){e.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Oo=(0,yn.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function jo(){return(jo=Tt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Dt(),e.next=3,Ct("patient",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}try{self["workbox:window:6.5.1"]&&_()}catch(e){}try{self["workbox:core:6.5.1"]&&_()}catch(e){}var ko,$o,Co=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Ao=function(e,t){this.type=e,Object.assign(this,t)},Po={type:"SKIP_WAITING"};function To(){return(To=Wt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vt();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){var t,n,r=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new Co,r.en=new Co,r.on=new Co,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Ut(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Ao(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Ao("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new Ao("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return Bt(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Ao("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t,n,r=(void 0===e?{}:e).immediate,o=void 0!==r&&r;try{var i=this;return t=function(){return i.mn=Boolean(navigator.serviceWorker.controller),i.yn=i.pn(),Bt(i.bn(),(function(e){i.fn=e,i.yn&&(i.hn=i.yn,i.en.resolve(i.yn),i.on.resolve(i.yn),i.yn.addEventListener("statechange",i.ln,{once:!0}));var t=i.fn.waiting;return t&&Ut(t.scriptURL,i.sn.toString())&&(i.hn=t,Promise.resolve().then((function(){i.dispatchEvent(new Ao("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.dn),i.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return zt(new Promise((function(e){return window.addEventListener("load",e)})))}())&&n.then?n.then(t):t()}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?zt(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Bt(this.getSW(),(function(t){return Nt(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Nt(this.fn.waiting,Po)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Ut(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(t,n){try{var r=Bt(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(e){return n(e)}return r&&r.then?r.then(void 0,n):r}(0,(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}((ko=function(){this.Pn=new Map},$o=ko.prototype,$o.addEventListener=function(e,t){this.Sn(e).add(t)},$o.removeEventListener=function(e,t){this.Sn(e).delete(t)},$o.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Mt(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},$o.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},ko));for(var Io,Ro="x-omrs-offline-response-body",Lo="x-omrs-offline-response-status",Do="x-omrs-offline-caching-strategy",No=new Uint8Array(16),Mo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Uo=function(e){return"string"==typeof e&&Mo.test(e)},Bo=[],Fo=0;Fo<256;++Fo)Bo.push((Fo+256).toString(16).substr(1));var zo=function(e,t,n){var r=(e=e||{}).random||(e.rng||qt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Bo[e[t+0]]+Bo[e[t+1]]+Bo[e[t+2]]+Bo[e[t+3]]+"-"+Bo[e[t+4]]+Bo[e[t+5]]+"-"+Bo[e[t+6]]+Bo[e[t+7]]+"-"+Bo[e[t+8]]+Bo[e[t+9]]+"-"+Bo[e[t+10]]+Bo[e[t+11]]+Bo[e[t+12]]+Bo[e[t+13]]+Bo[e[t+14]]+Bo[e[t+15]]).toLowerCase();if(!Uo(n))throw TypeError("Stringified UUID is invalid");return n}(r)},Vo="OFFLINE+",Ho=new ho,Wo={};function Ko(){return(Ko=Qt(hn().mark((function e(){var t;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,mn.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qo(){return(qo=Qt(hn().mark((function e(t,n,r,o){var i,a;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=o&&o.id)){e.next=4;break}return e.next=4,Ho.syncQueue.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===i})).delete().catch(ro.errnames.DatabaseClosed);case 4:return e.next=6,Ho.syncQueue.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date}).catch(ro.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Go(){return(Go=Qt(hn().mark((function e(t,n,r){var o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return o=e.sent,e.next=5,Xt(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zo(){return(Zo=Qt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nn(t,n);case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return e.content})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yo(){return(Yo=Qt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,userId:t}:{userId:t},e.next=3,Ho.syncQueue.where(r).toArray().catch(ro.errnames.DatabaseClosed,(function(){return[]}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qo(){return(Qo=Qt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return n=e.sent,e.next=5,tn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jo(){return(Jo=Qt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return n=e.sent,e.next=5,nn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xo(){return(Xo=Qt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ho.syncQueue.get(t).catch(ro.errnames.DatabaseClosed,(function(){}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ei(){return(ei=Qt(hn().mark((function e(t){var n,r,o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,an(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ti(){return(ti=Qt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ho.syncQueue.delete(t).catch(ro.errnames.DatabaseClosed);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,yn.createGlobalStore)("offline-synchronization",{})},4077:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):c(e,t)};e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,a){var u={},c={},s={},l={},f={},p={},d={},h={},v={};return{setters:[function(e){u.createContext=e.createContext,u.createElement=e.createElement,u.default=e.default,u.useCallback=e.useCallback,u.useContext=e.useContext,u.useDebugValue=e.useDebugValue,u.useEffect=e.useEffect,u.useLayoutEffect=e.useLayoutEffect,u.useMemo=e.useMemo,u.useReducer=e.useReducer,u.useRef=e.useRef,u.useState=e.useState},function(e){c.getConfigStore=e.getConfigStore,c.getExtensionConfigFromStore=e.getExtensionConfigFromStore,c.getExtensionsConfigStore=e.getExtensionsConfigStore,c.interpolateUrl=e.interpolateUrl,c.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){l.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){f.default=e.default},function(e){p.default=e.default},function(e){d.I18nextProvider=e.I18nextProvider},function(e){h.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,h.fetchCurrentPatient=e.fetchCurrentPatient,h.getCurrentUser=e.getCurrentUser,h.getLocations=e.getLocations,h.getSessionStore=e.getSessionStore,h.getVisitTypes=e.getVisitTypes,h.openmrsFetch=e.openmrsFetch,h.userHasAccess=e.userHasAccess},function(e){v.default=e.default}],execute:function(){i(function(){var i={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},891:function(e,t,n){var i;e=n.nmd(e),function(){var a,u=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},c=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},s=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},l=function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e},f=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},p=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},d=function(e,t){return!(null==e||!e.length)&&x(e,t,0)>-1},h=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},v=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},y=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},m=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},g=function(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n},b=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},w=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r},_=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},x=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):_(e,E,n)},S=function(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1},E=function(e){return e!=e},O=function(e,t){var n=null==e?0:e.length;return n?C(e,t)/n:ee},j=function(e){return function(t){return null==t?a:t[e]}},k=function(e){return function(t){return null==e?a:e[t]}},$=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},C=function(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);i!==a&&(n=n===a?i:n+i)}return n},A=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},P=function(e){return e?e.slice(0,K(e)+1).replace(We,""):e},T=function(e){return function(t){return e(t)}},I=function(e,t){return v(t,(function(t){return e[t]}))},R=function(e,t){return e.has(t)},L=function(e,t){for(var n=-1,r=e.length;++n<r&&x(t,e[n],0)>-1;);return n},D=function(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n},N=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},M=function(e){return"\\"+zt[e]},U=function(e){return Dt.test(e)},B=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},F=function(e,t){return function(n){return e(t(n))}},z=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==Z||(e[n]=Z,i[o++]=n)}return i},V=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},H=function(e){return U(e)?function(e){for(var t=Rt.lastIndex=0;Rt.test(e);)++t;return t}(e):an(e)},W=function(e){return U(e)?e.match(Rt)||[]:e.split("")},K=function(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},q="Expected a function",G="__lodash_hash_undefined__",Z="__lodash_placeholder__",Y=32,Q=128,J=1/0,X=9007199254740991,ee=NaN,te=4294967295,ne=[["ary",Q],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],re="[object Arguments]",oe="[object Array]",ie="[object Boolean]",ae="[object Date]",ue="[object Error]",ce="[object Function]",se="[object GeneratorFunction]",le="[object Map]",fe="[object Number]",pe="[object Object]",de="[object Promise]",he="[object RegExp]",ve="[object Set]",ye="[object String]",me="[object Symbol]",ge="[object WeakMap]",be="[object ArrayBuffer]",we="[object DataView]",_e="[object Float32Array]",xe="[object Float64Array]",Se="[object Int8Array]",Ee="[object Int16Array]",Oe="[object Int32Array]",je="[object Uint8Array]",ke="[object Uint8ClampedArray]",$e="[object Uint16Array]",Ce="[object Uint32Array]",Ae=/\b__p \+= '';/g,Pe=/\b(__p \+=) '' \+/g,Te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Re=/[&<>"']/g,Le=RegExp(Ie.source),De=RegExp(Re.source),Ne=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Ue=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fe=/^\w*$/,ze=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),We=/^\s+/,Ke=/\s/,qe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ge=/\{\n\/\* \[wrapped with (.+)\] \*/,Ze=/,? & /,Ye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qe=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\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",dt="["+pt+"]",ht="["+st+"]",vt="\\d+",yt="["+lt+"]",mt="[^\ud800-\udfff"+pt+vt+"\\u2700-\\u27bf"+lt+ft+"]",gt="\ud83c[\udffb-\udfff]",bt="[^\ud800-\udfff]",wt="(?:\ud83c[\udde6-\uddff]){2}",_t="[\ud800-\udbff][\udc00-\udfff]",xt="["+ft+"]",St="(?:"+yt+"|"+mt+")",Et="(?:"+xt+"|"+mt+")",Ot="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",kt="(?:"+ht+"|"+gt+")?",$t="[\\ufe0e\\ufe0f]?",Ct=$t+kt+"(?:\\u200d(?:"+[bt,wt,_t].join("|")+")"+$t+kt+")*",At="(?:"+["[\\u2700-\\u27bf]",wt,_t].join("|")+")"+Ct,Pt="(?:"+[bt+ht+"?",ht,wt,_t,"[\ud800-\udfff]"].join("|")+")",Tt=RegExp("['’]","g"),It=RegExp(ht,"g"),Rt=RegExp(gt+"(?="+gt+")|"+Pt+Ct,"g"),Lt=RegExp([xt+"?"+yt+"+"+Ot+"(?="+[dt,xt,"$"].join("|")+")",Et+"+"+jt+"(?="+[dt,xt+St,"$"].join("|")+")",xt+"?"+St+"+"+Ot,xt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,At].join("|"),"g"),Dt=RegExp("[\\u200d\ud800-\udfff"+st+"\\ufe0e\\ufe0f]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Bt={};Bt[_e]=Bt[xe]=Bt[Se]=Bt[Ee]=Bt[Oe]=Bt[je]=Bt[ke]=Bt[$e]=Bt[Ce]=!0,Bt[re]=Bt[oe]=Bt[be]=Bt[ie]=Bt[we]=Bt[ae]=Bt[ue]=Bt[ce]=Bt[le]=Bt[fe]=Bt[pe]=Bt[he]=Bt[ve]=Bt[ye]=Bt[ge]=!1;var Ft={};Ft[re]=Ft[oe]=Ft[be]=Ft[we]=Ft[ie]=Ft[ae]=Ft[_e]=Ft[xe]=Ft[Se]=Ft[Ee]=Ft[Oe]=Ft[le]=Ft[fe]=Ft[pe]=Ft[he]=Ft[ve]=Ft[ye]=Ft[me]=Ft[je]=Ft[ke]=Ft[$e]=Ft[Ce]=!0,Ft[ue]=Ft[ce]=Ft[ge]=!1;var zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),Gt=t&&!t.nodeType&&t,Zt=Gt&&e&&!e.nodeType&&e,Yt=Zt&&Zt.exports===Gt,Qt=Yt&&Wt.process,Jt=function(){try{return Zt&&Zt.require&&Zt.require("util").types||Qt&&Qt.binding&&Qt.binding("util")}catch(e){}}(),Xt=Jt&&Jt.isArrayBuffer,en=Jt&&Jt.isDate,tn=Jt&&Jt.isMap,nn=Jt&&Jt.isRegExp,rn=Jt&&Jt.isSet,on=Jt&&Jt.isTypedArray,an=j("length"),un=k({À:"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"}),cn=k({"&":"&","<":"<",">":">",'"':""","'":"'"}),sn=k({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,i,k=function(e){if(Ao(e)&&!Au(e)&&!r(e,lt)){if(r(e,st))return e;if(bi.call(e,"__wrapped__"))return no(e)}return new st(e)},Ke=function(){},st=function(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a},lt=function(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]},ft=function(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])}},pt=function(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])}},dt=function(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])}},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},vt=function(e){var t=this.__data__=new pt(e);this.size=t.size},yt=function(e,t){var n=Au(e),r=!n&&Cu(e),o=!n&&!r&&Tu(e),i=!n&&!r&&!o&&Nu(e),a=n||r||o||i,u=a?A(e.length,pi):[],c=u.length;for(var s in e)!t&&!bi.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Br(s,c))||u.push(s);return u},mt=function(e){var t=e.length;return t?e[$n(0,t-1)]:a},gt=function(e,t){return Xr(or(e),kt(t,0,e.length))},bt=function(e){return Xr(or(e))},wt=function(e,t,n){(n!==a&&!xo(e[t],n)||n===a&&!(t in e))&&Ot(e,t,n)},_t=function(e,t,n){var r=e[t];bi.call(e,t)&&xo(r,n)&&(n!==a||t in e)||Ot(e,t,n)},xt=function(e,t){for(var n=e.length;n--;)if(xo(e[n][0],t))return n;return-1},St=function(e,t,n,r){return ga(e,(function(e,o,i){t(r,e,n(e),i)})),r},Et=function(e,t){return e&&ir(t,Ho(t),e)},Ot=function(e,t,n){"__proto__"==t&&Ni?Ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},jt=function(e,t){for(var n=-1,r=t.length,o=ii(r),i=null==e;++n<r;)o[n]=i?a:zo(e,t[n]);return o},kt=function(e,t,n){return e==e&&(n!==a&&(e=e<=n?e:n),t!==a&&(e=e>=t?e:t)),e},$t=function(e,t,n){var r=n.length;if(null==e)return!r;for(e=li(e);r--;){var o=n[r],i=t[o],u=e[o];if(u===a&&!(o in e)||!i(u))return!1}return!0},Ct=function(e,t,n){if("function"!=typeof e)throw new di(q);return Fa((function(){e.apply(a,n)}),t)},At=function(e,t,n,r){var o=-1,i=d,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=v(t,T(n))),r?(i=h,a=!1):t.length>=200&&(i=R,a=!1,t=new ht(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c},Pt=function(e,t){var n=!0;return ga(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Rt=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=t(i);if(null!=u&&(c===a?u==u&&!Ro(u):n(u,c)))var c=u,s=i}return s},Dt=function(e,t){var n=[];return ga(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n},zt=function(e,t){return e&&_a(e,t,Ho)},Wt=function(e,t){return e&&xa(e,t,Ho)},Kt=function(e,t){return p(t,(function(t){return jo(e[t])}))},Gt=function(e,t){for(var n=0,r=(t=Yn(t,e)).length;null!=e&&n<r;)e=e[eo(t[n++])];return n&&n==r?e:a},Zt=function(e,t,n){var r=t(e);return Au(e)?r:y(r,n(e))},Qt=function(e){return null==e?e===a?"[object Undefined]":"[object Null]":Di&&Di in li(e)?function(e){var t=bi.call(e,Di),n=e[Di];try{e[Di]=a;var r=!0}catch(e){}var o=xi.call(e);return r&&(t?e[Di]=n:delete e[Di]),o}(e):(t=e,xi.call(t));var t},Jt=function(e,t){return e>t},an=function(e,t){return null!=e&&bi.call(e,t)},fn=function(e,t){return null!=e&&t in li(e)},pn=function(e,t,n){for(var r=n?h:d,o=e[0].length,i=e.length,u=i,c=ii(i),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=v(f,T(t))),s=Zi(f.length,s),c[u]=!n&&(t||o>=120&&f.length>=120)?new ht(u&&f):a}f=e[0];var p=-1,y=c[0];e:for(;++p<o&&l.length<s;){var m=f[p],g=t?t(m):m;if(m=n||0!==m?m:0,!(y?R(y,g):r(l,g,n))){for(u=i;--u;){var b=c[u];if(!(b?R(b,g):r(e[u],g,n)))continue e}y&&y.push(g),l.push(m)}}return l},dn=function(e,t,n){var r=null==(e=Gr(e,t=Yn(t,e)))?e:e[eo(uo(t))];return null==r?a:u(r,e,n)},hn=function(e){return Ao(e)&&Qt(e)==re},vn=function(e,t,n,r){var o=n.length,i=o,u=!r;if(null==e)return!i;for(e=li(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<i;){var s=(c=n[o])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===a&&!(s in e))return!1}else{var p=new vt;if(r)var d=r(l,f,s,e,t,p);if(!(d===a?Sa(f,l,3,r,p):d))return!1}}return!0},yn=function(e){return!(!Co(e)||(t=e,_i&&_i in t))&&(jo(e)?Oi:rt).test(to(e));var t},mn=function(e){return"function"==typeof e?e:null==e?Jo:"object"==typeof e?Au(e)?xn(e[0],e[1]):_n(e):ni(e)},gn=function(e){if(!Hr(e))return qi(e);var t=[];for(var n in li(e))bi.call(e,n)&&"constructor"!=n&&t.push(n);return t},bn=function(e,t){return e<t},wn=function(e,t){var n=-1,r=So(e)?ii(e.length):[];return ga(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},_n=function(e){var t=Lr(e);return 1==t.length&&t[0][2]?Kr(t[0][0],t[0][1]):function(n){return n===e||vn(n,e,t)}},xn=function(e,t){return zr(e)&&Wr(t)?Kr(eo(e),t):function(n){var r=zo(n,e);return r===a&&r===t?Vo(n,e):Sa(t,r,3)}},Sn=function(e,t){var n=e.length;if(n)return Br(t+=t<0?n:0,n)?e[t]:a},En=function(e,t,n){t=t.length?v(t,(function(e){return Au(e)?function(t){return Gt(t,1===e.length?e[0]:e)}:e})):[Jo];var r=-1;return t=v(t,T(Ir())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=tr(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(wn(e,(function(e,n,o){return{criteria:v(t,(function(t){return t(e)})),index:++r,value:e}})))},On=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Gt(e,a);n(u,a)&&In(i,Yn(a,e),u)}return i},jn=function(e,t,n,r){var o=r?S:x,i=-1,a=t.length,u=e;for(e===t&&(t=or(t)),n&&(u=v(e,T(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ii.call(u,c,1),Ii.call(e,c,1);return e},kn=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Br(o)?Ii.call(e,o,1):zn(e,o)}}return e},$n=function(e,t){return e+zi(Ji()*(t-e+1))},Cn=function(e,t){var n="";if(!e||t<1||t>X)return n;do{t%2&&(n+=e),(t=zi(t/2))&&(e+=e)}while(t);return n},An=function(e,t){return za(qr(e,t,Jo),e+"")},Pn=function(e){return mt(qo(e))},Tn=function(e,t){var n=qo(e);return Xr(n,kt(t,0,n.length))},In=function(e,t,n,r){if(!Co(e))return e;for(var o=-1,i=(t=Yn(t,e)).length,u=i-1,c=e;null!=c&&++o<i;){var s=eo(t[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=u){var f=c[s];(l=r?r(f,s,c):a)===a&&(l=Co(f)?f:Br(t[o+1])?[]:{})}_t(c,s,l),c=c[s]}return e},Rn=function(e){return Xr(qo(e))},Ln=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ii(o);++r<o;)i[r]=e[r+t];return i},Dn=function(e,t){var n;return ga(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Nn=function(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ro(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Mn(e,t,Jo,n)},Mn=function(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var u=(t=n(t))!=t,c=null===t,s=Ro(t),l=t===a;o<i;){var f=zi((o+i)/2),p=n(e[f]),d=p!==a,h=null===p,v=p==p,y=Ro(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?o=f+1:i=f}return Zi(i,4294967294)},Un=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!xo(u,c)){var c=u;i[o++]=0===a?0:a}}return i},Bn=function(e){return"number"==typeof e?e:Ro(e)?ee:+e},Fn=function(e,t,n){var r=-1,o=d,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=h;else if(i>=200){var s=t?null:Pa(e);if(s)return V(s);a=!1,o=R,c=new ht}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u},zn=function(e,t){return null==(e=Gr(e,t=Yn(t,e)))||delete e[eo(uo(t))]},Vn=function(e,t,n,r){return In(e,t,n(Gt(e,t)),r)},Hn=function(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Ln(e,r?0:i,r?i+1:o):Ln(e,r?i+1:0,r?o:i)},Wn=function(e,t){var n=e;return r(n,lt)&&(n=n.value()),m(t,(function(e,t){return t.func.apply(t.thisArg,y([e],t.args))}),n)},Kn=function(e,t,n){var r=e.length;if(r<2)return r?Fn(e[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(i[o]=At(i[o]||a,e[u],t,n));return Fn(wa(i,1),t,n)},qn=function(e,t,n){for(var r=-1,o=e.length,i=t.length,u={};++r<o;){var c=r<i?t[r]:a;n(u,e[r],c)}return u},Gn=function(e){return Eo(e)?e:[]},Zn=function(e){return"function"==typeof e?e:Jo},Yn=function(e,t){return Au(e)?e:zr(e,t)?[e]:Va(Fo(e))},Qn=function(e,t,n){var r=e.length;return n=n===a?r:n,!t&&n>=r?e:Ln(e,t,n)},Jn=function(e,t){if(t)return e.slice();var n=e.length,r=Ci?Ci(n):new e.constructor(n);return e.copy(r),r},Xn=function(e){var t=new e.constructor(e.byteLength);return new $i(t).set(new $i(e)),t},er=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tr=function(e,t){if(e!==t){var n=e!==a,r=null===e,o=e==e,i=Ro(e),u=t!==a,c=null===t,s=t==t,l=Ro(t);if(!c&&!l&&!i&&e>t||i&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&e<t||l&&n&&o&&!r&&!i||c&&n&&o||!u&&o||!s)return-1}return 0},nr=function(e,t,n,r){for(var o=-1,i=e.length,a=n.length,u=-1,c=t.length,s=Gi(i-a,0),l=ii(c+s),f=!r;++u<c;)l[u]=t[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;s--;)l[u++]=e[o++];return l},rr=function(e,t,n,r){for(var o=-1,i=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Gi(i-u,0),f=ii(l+s),p=!r;++o<l;)f[o]=e[o];for(var d=o;++c<s;)f[d+c]=t[c];for(;++a<u;)(p||o<i)&&(f[d+n[a]]=e[o++]);return f},or=function(e,t){var n=-1,r=e.length;for(t||(t=ii(r));++n<r;)t[n]=e[n];return t},ir=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,u=t.length;++i<u;){var c=t[i],s=r?r(n[c],e[c],c,n,e):a;s===a&&(s=e[c]),o?Ot(n,c,s):_t(n,c,s)}return n},ar=function(e,t){return function(n,r){var o=Au(n)?c:St,i=t?t():{};return o(n,e,Ir(r,2),i)}},ur=function(e){return An((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:a,u=o>2?n[2]:a;for(i=e.length>3&&"function"==typeof i?(o--,i):a,u&&Fr(n[0],n[1],u)&&(i=o<3?a:i,o=1),t=li(t);++r<o;){var c=n[r];c&&e(t,c,r,i)}return t}))},cr=function(e,t){return function(n,r){if(null==n)return n;if(!So(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=li(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},sr=function(e){return function(t,n,r){for(var o=-1,i=li(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}},lr=function(e){return function(t){var n=U(t=Fo(t))?W(t):a,r=n?n[0]:t.charAt(0),o=n?Qn(n,1).join(""):t.slice(1);return r[e]()+o}},fr=function(e){return function(t){return m(Yo(Zo(t).replace(Tt,"")),e,"")}},pr=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ya(e.prototype),r=e.apply(n,t);return Co(r)?r:n}},dr=function(e){return function(t,n,r){var o=li(t);if(!So(t)){var i=Ir(n,3);t=Ho(t),n=function(e){return i(o[e],e,o)}}var u=e(t,n,r);return u>-1?o[i?t[u]:u]:a}},hr=function(e){return $r((function(t){var n=t.length,r=n,o=st.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new di(q);if(o&&!u&&"wrapper"==Pr(i))var u=new st([],!0)}for(r=u?r:n;++r<n;){var c=Pr(i=t[r]),s="wrapper"==c?Ia(i):a;u=s&&Vr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Pr(s[0])].apply(u,s[3]):1==i.length&&Vr(i)?u[c]():u.thru(i)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Au(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))},vr=function(e,t){return function(n,r){return o=n,i=e,a=t(r),u={},zt(o,(function(e,t,n){i(u,a(e),t,n)})),u;var o,i,a,u}},yr=function(e,t){return function(n,r){var o;if(n===a&&r===a)return t;if(n!==a&&(o=n),r!==a){if(o===a)return r;"string"==typeof n||"string"==typeof r?(n=ka(n),r=ka(r)):(n=Bn(n),r=Bn(r)),o=e(n,r)}return o}},mr=function(e){return $r((function(t){return t=v(t,T(Ir())),An((function(n){var r=this;return e(t,(function(e){return u(e,r,n)}))}))}))},gr=function(e,t){var n=(t=t===a?" ":ka(t)).length;if(n<2)return n?Cn(t,e):t;var r=Cn(t,Fi(e/H(t)));return U(t)?Qn(W(r),0,e).join(""):r.slice(0,e)},br=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Fr(t,n,r)&&(n=r=a),t=Do(t),n===a?(n=t,t=0):n=Do(n),function(e,t,n,r){for(var o=-1,i=Gi(Fi((t-e)/(n||1)),0),a=ii(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=r===a?t<n?1:-1:Do(r),e)}},wr=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Uo(t),n=Uo(n)),e(t,n)}},_r=function(e,t,n,r,o,i,u,c,s,l){var f=8&t;t|=f?Y:64,4&(t&=~(f?64:Y))||(t&=-4);var p=[e,t,o,f?i:a,f?u:a,f?a:i,f?a:u,c,s,l],d=n.apply(a,p);return Vr(e)&&Ba(d,p),d.placeholder=r,Qr(d,e,t)},xr=function(e){var t=si[e];return function(e,n){if(e=Uo(e),(n=null==n?0:Zi(No(n),292))&&Wi(e)){var r=(Fo(e)+"e").split("e");return+((r=(Fo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}},Sr=function(e){return function(t){var n,r,o,i,a,u=Da(t);return u==le?B(t):u==ve?(o=t,i=-1,a=Array(o.size),o.forEach((function(e){a[++i]=[e,e]})),a):(n=t,r=e(t),v(r,(function(e){return[e,n[e]]})))}},Er=function(e,t,n,o,i,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new di(q);var p=o?o.length:0;if(p||(t&=-97,o=i=a),s=s===a?s:Gi(No(s),0),l=l===a?l:No(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=a}var v,y,m,g,b,w,_,x,S=f?a:Ia(e),E=[e,t,n,o,i,d,h,c,s,l];if(S&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==Q&&8==n||r==Q&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nr(c,u,t[4]):u,e[4]=c?z(e[3],Z):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rr(c,u,t[6]):u,e[6]=c?z(e[5],Z):t[6]),(u=t[7])&&(e[7]=u),r&Q&&(e[8]=null==e[8]?t[8]:Zi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(E,S),e=E[0],t=E[1],n=E[2],o=E[3],i=E[4],!(l=E[9]=E[9]===a?f?0:e.length:Gi(E[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)O=8==t||16==t?(y=t,m=l,g=pr(v=e),function e(){for(var t=arguments.length,n=ii(t),o=t,i=Tr(e);o--;)n[o]=arguments[o];var c=t<3&&n[0]!==i&&n[t-1]!==i?[]:z(n,i);return(t-=c.length)<m?_r(v,y,Aa,e.placeholder,a,n,c,a,a,m-t):u(this&&this!==qt&&r(this,e)?g:v,this,n)}):t!=Y&&33!=t||i.length?Aa.apply(a,E):function(e,t,n,o){var i=1&t,a=pr(e);return function t(){for(var c=-1,s=arguments.length,l=-1,f=o.length,p=ii(f+s),d=this&&this!==qt&&r(this,t)?a:e;++l<f;)p[l]=o[l];for(;s--;)p[l++]=arguments[++c];return u(d,i?n:this,p)}}(e,t,n,o);else var O=(w=n,_=1&t,x=pr(b=e),function e(){return(this&&this!==qt&&r(this,e)?x:b).apply(_?w:this,arguments)});return Qr((S?Oa:Ba)(O,E),e,t)},Or=function(e,t,n,r){return e===a||xo(e,yi[n])&&!bi.call(r,n)?t:e},jr=function(e){return To(e)?a:e},kr=function(e,t,n,r,o,i){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new ht:a;for(i.set(e,t),i.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,i):r(v,y,p,e,t,i);if(m!==a){if(m)continue;d=!1;break}if(h){if(!b(t,(function(e,t){if(!R(h,t)&&(v===e||o(v,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},$r=function(e){return za(qr(e,a,io),e+"")},Cr=function(e){return Zt(e,Ho,Ra)},Ar=function(e){return Zt(e,Wo,La)},Pr=function(e){for(var t=e.name+"",n=ua[t],r=bi.call(ua,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t},Tr=function(e){return(bi.call(k,"placeholder")?k:e).placeholder},Ir=function(){var e=k.iteratee||Xo;return e=e===Xo?mn:e,arguments.length?e(arguments[0],arguments[1]):e},Rr=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map},Lr=function(e){for(var t=Ho(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Wr(o)]}return t},Dr=function(e,t){var n,r=null==(n=e)?a:n[t];return yn(r)?r:a},Nr=function(e,t,n){for(var r=-1,o=(t=Yn(t,e)).length,i=!1;++r<o;){var a=eo(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&$o(o)&&Br(a,o)&&(Au(e)||Cu(e))},Mr=function(e){return"function"!=typeof e.constructor||Hr(e)?{}:ya(Ai(e))},Ur=function(e){return Au(e)||Cu(e)||!!(Ri&&e&&e[Ri])},Br=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?X:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t},Fr=function(e,t,n){if(!Co(n))return!1;var r=void 0===t?"undefined":o(t);return!!("number"==r?So(n)&&Br(t,n.length):"string"==r&&t in n)&&xo(n[t],e)},zr=function(e,t){if(Au(e))return!1;var n=void 0===e?"undefined":o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ro(e))||Fe.test(e)||!Be.test(e)||null!=t&&e in li(t)},Vr=function(e){var t=Pr(e),n=k[t];if("function"!=typeof n||!(t in lt.prototype))return!1;if(e===n)return!0;var r=Ia(n);return!!r&&e===r[0]},Hr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yi)},Wr=function(e){return e==e&&!Co(e)},Kr=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==a||e in li(n))}},qr=function(e,t,n){return t=Gi(t===a?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Gi(r.length-t,0),a=ii(i);++o<i;)a[o]=r[t+o];o=-1;for(var c=ii(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),u(e,this,c)}},Gr=function(e,t){return t.length<2?e:Gt(e,Ln(t,0,-1))},Zr=function(e,t){for(var n=e.length,r=Zi(t.length,n),o=or(e);r--;){var i=t[r];e[r]=Br(i,n)?o[i]:a}return e},Yr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Qr=function(e,t,n){var r,o,i,a=t+"";return za(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(qe,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=(r=a.match(Ge))?r[1].split(Ze):[],i=n,s(ne,(function(e){var t="_."+e[0];i&e[1]&&!d(o,t)&&o.push(t)})),o.sort())))},Jr=function(e){var t=0,n=0;return function(){var r=Yi(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}},Xr=function(e,t){var n=-1,r=e.length,o=r-1;for(t=t===a?r:t;++n<t;){var i=$n(n,o),u=e[i];e[i]=e[n],e[n]=u}return e.length=t,e},eo=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},to=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},no=function(e){if(r(e,lt))return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=or(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},ro=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),_(e,Ir(t,3),o)},oo=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==a&&(o=No(n),o=n<0?Gi(r+o,0):Zi(o,r-1)),_(e,Ir(t,3),o,!0)},io=function(e){return null!=e&&e.length?wa(e,1):[]},ao=function(e){return e&&e.length?e[0]:a},uo=function(e){var t=null==e?0:e.length;return t?e[t-1]:a},co=function(e,t){return e&&e.length&&t&&t.length?jn(e,t):e},so=function(e){return null==e?e:Xi.call(e)},lo=function(e){if(!e||!e.length)return[];var t=0;return e=p(e,(function(e){if(Eo(e))return t=Gi(e.length,t),!0})),A(t,(function(t){return v(e,j(t))}))},fo=function(e,t){if(!e||!e.length)return[];var n=lo(e);return null==t?n:v(n,(function(e){return u(t,a,e)}))},po=function(e){var t=k(e);return t.__chain__=!0,t},ho=function(e,t){return t(e)},vo=function(e,t){return(Au(e)?s:ga)(e,Ir(t,3))},yo=function(e,t){return(Au(e)?l:ba)(e,Ir(t,3))},mo=function(e,t){return(Au(e)?v:wn)(e,Ir(t,3))},go=function(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Er(e,Q,a,a,a,a,t)},bo=function(e,t){var n;if("function"!=typeof t)throw new di(q);return e=No(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}},wo=function(e,t,n){var r,o,i,u,c,s,l=function(t){var n=r,i=o;return r=o=a,v=t,u=e.apply(i,n)},f=function(e){return v=e,c=Fa(b,t),y?l(e):u},p=function(e){var n=e-s;return s===a||n>=t||n<0||m&&e-v>=i},d=function(e){return c=a,g&&r?l(e):(r=o=a,u)},h=function(){var e=yu(),n=p(e);if(r=arguments,o=this,s=e,n){if(c===a)return f(s);if(m)return Ca(c),c=Fa(b,t),l(s)}return c===a&&(c=Fa(b,t)),u},v=0,y=!1,m=!1,g=!0;if("function"!=typeof e)throw new di(q);function b(){var e,n,r=yu();if(p(r))return d(r);c=Fa(b,(n=t-((e=r)-s),m?Zi(n,i-(e-v)):n))}return t=Uo(t)||0,Co(n)&&(y=!!n.leading,i=(m="maxWait"in n)?Gi(Uo(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),h.cancel=function(){c!==a&&Ca(c),v=0,r=s=o=c=a},h.flush=function(){return c===a?u:d(yu())},h},_o=function(e){if("function"!=typeof e)throw new di(q);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},xo=function(e,t){return e===t||e!=e&&t!=t},So=function(e){return null!=e&&$o(e.length)&&!jo(e)},Eo=function(e){return Ao(e)&&So(e)},Oo=function(e){if(!Ao(e))return!1;var t=Qt(e);return t==ue||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!To(e)},jo=function(e){if(!Co(e))return!1;var t=Qt(e);return t==ce||t==se||"[object AsyncFunction]"==t||"[object Proxy]"==t},ko=function(e){return"number"==typeof e&&e==No(e)},$o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=X},Co=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Ao=function(e){return null!=e&&"object"==typeof e},Po=function(e){return"number"==typeof e||Ao(e)&&Qt(e)==fe},To=function(e){if(!Ao(e)||Qt(e)!=pe)return!1;var t=Ai(e);if(null===t)return!0;var n=bi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&r(n,n)&&gi.call(n)==Si},Io=function(e){return"string"==typeof e||!Au(e)&&Ao(e)&&Qt(e)==ye},Ro=function(e){return"symbol"==(void 0===e?"undefined":o(e))||Ao(e)&&Qt(e)==me},Lo=function(e){if(!e)return[];if(So(e))return Io(e)?W(e):or(e);if(Li&&e[Li])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Li]());var t=Da(e);return(t==le?B:t==ve?V:qo)(e)},Do=function(e){return e?(e=Uo(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},No=function(e){var t=Do(e),n=t%1;return t==t?n?t-n:t:0},Mo=function(e){return e?kt(No(e),0,te):0},Uo=function(e){if("number"==typeof e)return e;if(Ro(e))return ee;if(Co(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Co(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=P(e);var n=nt.test(e);return n||ot.test(e)?Ht(e.slice(2),n?2:8):tt.test(e)?ee:+e},Bo=function(e){return ir(e,Wo(e))},Fo=function(e){return null==e?"":ka(e)},zo=function(e,t,n){var r=null==e?a:Gt(e,t);return r===a?n:r},Vo=function(e,t){return null!=e&&Nr(e,t,fn)},Ho=function(e){return So(e)?yt(e):gn(e)},Wo=function(e){return So(e)?yt(e,!0):function(e){if(!Co(e))return function(e){var t=[];if(null!=e)for(var n in li(e))t.push(n);return t}(e);var t=Hr(e),n=[];for(var r in e)("constructor"!=r||!t&&bi.call(e,r))&&n.push(r);return n}(e)},Ko=function(e,t){if(null==e)return{};var n=v(Ar(e),(function(e){return[e]}));return t=Ir(t),On(e,n,(function(e,n){return t(e,n[0])}))},qo=function(e){return null==e?[]:I(e,Ho(e))},Go=function(e){return sc(Fo(e).toLowerCase())},Zo=function(e){return(e=Fo(e))&&e.replace(at,un).replace(It,"")},Yo=function(e,t,n){return e=Fo(e),(t=n?a:t)===a?(r=e,Nt.test(r)?e.match(Lt)||[]:e.match(Ye)||[]):e.match(t)||[];var r},Qo=function(e){return function(){return e}},Jo=function(e){return e},Xo=function(e){return mn("function"==typeof e?e:ma(e,1))},ei=function(e,t,n){var r=Ho(t),o=Kt(t,r);null!=n||Co(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Kt(t,Ho(t)));var i=!(Co(n)&&"chain"in n&&!n.chain),a=jo(e);return s(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,y([this.value()],arguments))})})),e},ti=function(){},ni=function(e){return zr(e)?j(eo(e)):(t=e,function(e){return Gt(e,t)});var t},ri=function(){return[]},oi=function(){return!1},ii=(t=null==t?qt:ln.defaults(qt.Object(),t,ln.pick(qt,Mt))).Array,ai=t.Date,ui=t.Error,ci=t.Function,si=t.Math,li=t.Object,fi=t.RegExp,pi=t.String,di=t.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,mi=t["__core-js_shared__"],gi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xi=yi.toString,Si=gi.call(li),Ei=qt._,Oi=fi("^"+gi.call(bi).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ji=Yt?t.Buffer:a,ki=t.Symbol,$i=t.Uint8Array,Ci=ji?ji.allocUnsafe:a,Ai=F(li.getPrototypeOf,li),Pi=li.create,Ti=yi.propertyIsEnumerable,Ii=hi.splice,Ri=ki?ki.isConcatSpreadable:a,Li=ki?ki.iterator:a,Di=ki?ki.toStringTag:a,Ni=function(){try{var e=Dr(li,"defineProperty");return e({},"",{}),e}catch(e){}}(),Mi=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,Ui=ai&&ai.now!==qt.Date.now&&ai.now,Bi=t.setTimeout!==qt.setTimeout&&t.setTimeout,Fi=si.ceil,zi=si.floor,Vi=li.getOwnPropertySymbols,Hi=ji?ji.isBuffer:a,Wi=t.isFinite,Ki=hi.join,qi=F(li.keys,li),Gi=si.max,Zi=si.min,Yi=ai.now,Qi=t.parseInt,Ji=si.random,Xi=hi.reverse,ea=Dr(t,"DataView"),ta=Dr(t,"Map"),na=Dr(t,"Promise"),ra=Dr(t,"Set"),oa=Dr(t,"WeakMap"),ia=Dr(li,"create"),aa=oa&&new oa,ua={},ca=to(ea),sa=to(ta),la=to(na),fa=to(ra),pa=to(oa),da=ki?ki.prototype:a,ha=da?da.valueOf:a,va=da?da.toString:a,ya=(i=function(){},function(e){if(!Co(e))return{};if(Pi)return Pi(e);i.prototype=e;var t=new i;return i.prototype=a,t});function ma(e,t,n,r,o,i){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=o?n(e,r,o,i):n(e)),u!==a)return u;if(!Co(e))return e;var p,d,h,v,y,m=Au(e);if(m){if(d=(p=e).length,h=new p.constructor(d),d&&"string"==typeof p[0]&&bi.call(p,"index")&&(h.index=p.index,h.input=p.input),u=h,!c)return or(e,u)}else{var g=Da(e),b=g==ce||g==se;if(Tu(e))return Jn(e,c);if(g==pe||g==re||b&&!o){if(u=l||b?{}:Mr(e),!c)return l?function(e,t){return ir(e,La(e),t)}(e,(y=e,(v=u)&&ir(y,Wo(y),v))):function(e,t){return ir(e,Ra(e),t)}(e,Et(u,e))}else{if(!Ft[g])return o?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case be:return Xn(e);case ie:case ae:return new o(+e);case we:return function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _e:case xe:case Se:case Ee:case Oe:case je:case ke:case $e:case Ce:return er(e,n);case le:return new o;case fe:case ye:return new o(e);case he:return function(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ve:return new o;case me:return r=e,ha?li(ha.call(r)):{}}}(e,g,c)}}i||(i=new vt);var w=i.get(e);if(w)return w;i.set(e,u),Du(e)?e.forEach((function(r){u.add(ma(r,t,n,r,e,i))})):Ru(e)&&e.forEach((function(r,o){u.set(o,ma(r,t,n,o,e,i))}));var _=m?a:(f?l?Ar:Cr:l?Wo:Ho)(e);return s(_||e,(function(r,o){_&&(r=e[o=r]),_t(u,o,ma(r,t,n,o,e,i))})),u}k.templateSettings={escape:Ne,evaluate:Me,interpolate:Ue,variable:"",imports:{_:k}},(k.prototype=Ke.prototype).constructor=k,st.prototype=ya(Ke.prototype),st.prototype.constructor=st,lt.prototype=ya(Ke.prototype),lt.prototype.constructor=lt,ft.prototype.clear=function(){this.__data__=ia?ia(null):{},this.size=0},ft.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ft.prototype.get=function(e){var t=this.__data__;if(ia){var n=t[e];return n===G?a:n}return bi.call(t,e)?t[e]:a},ft.prototype.has=function(e){var t=this.__data__;return ia?t[e]!==a:bi.call(t,e)},ft.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ia&&t===a?G:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=xt(t,e);return!(n<0||(n==t.length-1?t.pop():Ii.call(t,n,1),--this.size,0))},pt.prototype.get=function(e){var t=this.__data__,n=xt(t,e);return n<0?a:t[n][1]},pt.prototype.has=function(e){return xt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(ta||pt),string:new ft}},dt.prototype.delete=function(e){var t=Rr(this,e).delete(e);return this.size-=t?1:0,t},dt.prototype.get=function(e){return Rr(this,e).get(e)},dt.prototype.has=function(e){return Rr(this,e).has(e)},dt.prototype.set=function(e,t){var n=Rr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ht.prototype.add=ht.prototype.push=function(e){return this.__data__.set(e,G),this},ht.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.clear=function(){this.__data__=new pt,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(r(n,pt)){var o=n.__data__;if(!ta||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(o)}return n.set(e,t),this.size=n.size,this};var ga=cr(zt),ba=cr(Wt,!0);function wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ur),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?wa(u,t-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var _a=sr(),xa=sr(!0);function Sa(e,t,n,o,i){return e===t||(null==e||null==t||!Ao(e)&&!Ao(t)?e!=e&&t!=t:function(e,t,n,o,i,u){var c=Au(e),s=Au(t),l=c?oe:Da(e),f=s?oe:Da(t),p=(l=l==re?pe:l)==pe,d=(f=f==re?pe:f)==pe,h=l==f;if(h&&Tu(e)){if(!Tu(t))return!1;c=!0,p=!1}if(h&&!p)return u||(u=new vt),c||Nu(e)?kr(e,t,n,o,i,u):function(e,t,n,r,o,i,a){switch(n){case we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!i(new $i(e),new $i(t)));case ie:case ae:case fe:return xo(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case he:case ye:return e==t+"";case le:var u=B;case ve:var c=1&r;if(u||(u=V),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=kr(u(e),u(t),r,o,i,a);return a.delete(e),l;case me:if(ha)return ha.call(e)==ha.call(t)}return!1}(e,t,l,n,o,i,u);if(!(1&n)){var v=p&&bi.call(e,"__wrapped__"),y=d&&bi.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return u||(u=new vt),i(m,g,n,o,u)}}return!!h&&(u||(u=new vt),function(e,t,n,o,i,u){var c=1&n,s=Cr(e),l=s.length;if(l!=Cr(t).length&&!c)return!1;for(var f=l;f--;){var p=s[f];if(!(c?p in t:bi.call(t,p)))return!1}var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var v=!0;u.set(e,t),u.set(t,e);for(var y=c;++f<l;){var m=e[p=s[f]],g=t[p];if(o)var b=c?o(g,m,p,t,e,u):o(m,g,p,e,t,u);if(!(b===a?m===g||i(m,g,n,o,u):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return u.delete(e),u.delete(t),v}(e,t,n,o,i,u))}(e,t,n,o,Sa,i))}function Ea(e,t,n,r,o){e!==t&&_a(t,(function(i,u){if(o||(o=new vt),Co(i))!function(e,t,n,r,o,i,u){var c=Yr(e,n),s=Yr(t,n),l=u.get(s);if(l)wt(e,n,l);else{var f=i?i(c,s,n+"",e,t,u):a,p=f===a;if(p){var d=Au(s),h=!d&&Tu(s),v=!d&&!h&&Nu(s);f=s,d||h||v?Au(c)?f=c:Eo(c)?f=or(c):h?(p=!1,f=Jn(s,!0)):v?(p=!1,f=er(s,!0)):f=[]:To(s)||Cu(s)?(f=c,Cu(c)?f=Bo(c):Co(c)&&!jo(c)||(f=Mr(s))):p=!1}p&&(u.set(s,f),o(f,s,r,i,u),u.delete(s)),wt(e,n,f)}}(e,t,u,n,Ea,r,o);else{var c=r?r(Yr(e,u),i,u+"",e,t,o):a;c===a&&(c=i),wt(e,u,c)}}),Wo)}var Oa=aa?function(e,t){return aa.set(e,t),e}:Jo,ja=Ni?function(e,t){return Ni(e,"toString",{configurable:!0,enumerable:!1,value:Qo(t),writable:!0})}:Jo;function ka(e){if("string"==typeof e)return e;if(Au(e))return v(e,ka)+"";if(Ro(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var $a=An,Ca=Mi||function(e){return qt.clearTimeout(e)};function Aa(e,t,n,o,i,u,c,s,l,f){var p=t&Q,d=1&t,h=2&t,v=24&t,y=512&t,m=h?a:pr(e);return function a(){for(var g=arguments.length,b=ii(g),w=g;w--;)b[w]=arguments[w];if(v)var _=Tr(a),x=N(b,_);if(o&&(b=nr(b,o,i,v)),u&&(b=rr(b,u,c,v)),g-=x,v&&g<f){var S=z(b,_);return _r(e,t,Aa,a.placeholder,n,b,S,s,l,f-g)}var E=d?n:this,O=h?E[e]:e;return g=b.length,s?b=Zr(b,s):y&&g>1&&b.reverse(),p&&l<g&&(b.length=l),this&&this!==qt&&r(this,a)&&(O=m||pr(O)),O.apply(E,b)}}var Pa=ra&&1/V(new ra([,-0]))[1]==J?function(e){return new ra(e)}:ti;function Ta(e,t,n,r,o,i){return Co(e)&&Co(t)&&(i.set(t,e),Ea(e,t,a,Ta,i),i.delete(t)),e}var Ia=aa?function(e){return aa.get(e)}:ti,Ra=Vi?function(e){return null==e?[]:(e=li(e),p(Vi(e),(function(t){return Ti.call(e,t)})))}:ri,La=Vi?function(e){for(var t=[];e;)y(t,Ra(e)),e=Ai(e);return t}:ri,Da=Qt;(ea&&Da(new ea(new ArrayBuffer(1)))!=we||ta&&Da(new ta)!=le||na&&Da(na.resolve())!=de||ra&&Da(new ra)!=ve||oa&&Da(new oa)!=ge)&&(Da=function(e){var t=Qt(e),n=t==pe?e.constructor:a,r=n?to(n):"";if(r)switch(r){case ca:return we;case sa:return le;case la:return de;case fa:return ve;case pa:return ge}return t});var Na,Ma,Ua=mi?jo:oi,Ba=Jr(Oa),Fa=Bi||function(e,t){return qt.setTimeout(e,t)},za=Jr(ja),Va=(Na=_u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ze,(function(e,n,r,o){t.push(r?o.replace(Je,"$1"):n||e)})),t}),(function(e){return 500===Ma.size&&Ma.clear(),e})),Ma=Na.cache,Na),Ha=An((function(e,t){return Eo(e)?At(e,wa(t,1,Eo,!0)):[]})),Wa=An((function(e,t){var n=uo(t);return Eo(n)&&(n=a),Eo(e)?At(e,wa(t,1,Eo,!0),Ir(n,2)):[]})),Ka=An((function(e,t){var n=uo(t);return Eo(n)&&(n=a),Eo(e)?At(e,wa(t,1,Eo,!0),a,n):[]})),qa=An((function(e){var t=v(e,Gn);return t.length&&t[0]===e[0]?pn(t):[]})),Ga=An((function(e){var t=uo(e),n=v(e,Gn);return t===uo(n)?t=a:n.pop(),n.length&&n[0]===e[0]?pn(n,Ir(t,2)):[]})),Za=An((function(e){var t=uo(e),n=v(e,Gn);return(t="function"==typeof t?t:a)&&n.pop(),n.length&&n[0]===e[0]?pn(n,a,t):[]})),Ya=An(co),Qa=$r((function(e,t){var n=null==e?0:e.length,r=jt(e,t);return kn(e,v(t,(function(e){return Br(e,n)?+e:e})).sort(tr)),r})),Ja=An((function(e){return Fn(wa(e,1,Eo,!0))})),Xa=An((function(e){var t=uo(e);return Eo(t)&&(t=a),Fn(wa(e,1,Eo,!0),Ir(t,2))})),eu=An((function(e){var t=uo(e);return t="function"==typeof t?t:a,Fn(wa(e,1,Eo,!0),a,t)})),tu=An((function(e,t){return Eo(e)?At(e,t):[]})),nu=An((function(e){return Kn(p(e,Eo))})),ru=An((function(e){var t=uo(e);return Eo(t)&&(t=a),Kn(p(e,Eo),Ir(t,2))})),ou=An((function(e){var t=uo(e);return t="function"==typeof t?t:a,Kn(p(e,Eo),a,t)})),iu=An(lo),au=An((function(e){var t=e.length,n=t>1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,fo(e,n)})),uu=$r((function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return jt(t,e)};return t>1||this.__actions__.length||!r(o,lt)||!Br(n)?this.thru(i):((o=o.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:a}),new st(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e})))})),cu=ar((function(e,t,n){bi.call(e,n)?++e[n]:Ot(e,n,1)})),su=dr(ro),lu=dr(oo),fu=ar((function(e,t,n){bi.call(e,n)?e[n].push(t):Ot(e,n,[t])})),pu=An((function(e,t,n){var r=-1,o="function"==typeof t,i=So(e)?ii(e.length):[];return ga(e,(function(e){i[++r]=o?u(t,e,n):dn(e,t,n)})),i})),du=ar((function(e,t,n){Ot(e,n,t)})),hu=ar((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),vu=An((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Fr(e,t[0],t[1])?t=[]:n>2&&Fr(t[0],t[1],t[2])&&(t=[t[0]]),En(e,wa(t,1),[])})),yu=Ui||function(){return qt.Date.now()},mu=An((function(e,t,n){var r=1;if(n.length){var o=z(n,Tr(mu));r|=Y}return Er(e,r,t,n,o)})),gu=An((function(e,t,n){var r=3;if(n.length){var o=z(n,Tr(gu));r|=Y}return Er(t,r,e,n,o)})),bu=An((function(e,t){return Ct(e,1,t)})),wu=An((function(e,t,n){return Ct(e,Uo(t)||0,n)}));function _u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new di(q);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_u.Cache||dt),n}_u.Cache=dt;var xu,Su=$a((function(e,t){var n=(t=1==t.length&&Au(t[0])?v(t[0],T(Ir())):v(wa(t,1),T(Ir()))).length;return An((function(r){for(var o=-1,i=Zi(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return u(e,this,r)}))})),Eu=An((function(e,t){var n=z(t,Tr(Eu));return Er(e,Y,a,t,n)})),Ou=An((function(e,t){var n=z(t,Tr(Ou));return Er(e,64,a,t,n)})),ju=$r((function(e,t){return Er(e,256,a,a,a,t)})),ku=wr(Jt),$u=wr((function(e,t){return e>=t})),Cu=hn(function(){return arguments}())?hn:function(e){return Ao(e)&&bi.call(e,"callee")&&!Ti.call(e,"callee")},Au=ii.isArray,Pu=Xt?T(Xt):function(e){return Ao(e)&&Qt(e)==be},Tu=Hi||oi,Iu=en?T(en):function(e){return Ao(e)&&Qt(e)==ae},Ru=tn?T(tn):function(e){return Ao(e)&&Da(e)==le},Lu=nn?T(nn):function(e){return Ao(e)&&Qt(e)==he},Du=rn?T(rn):function(e){return Ao(e)&&Da(e)==ve},Nu=on?T(on):function(e){return Ao(e)&&$o(e.length)&&!!Bt[Qt(e)]},Mu=wr(bn),Uu=wr((function(e,t){return e<=t})),Bu=ur((function(e,t){if(Hr(t)||So(t))ir(t,Ho(t),e);else for(var n in t)bi.call(t,n)&&_t(e,n,t[n])})),Fu=ur((function(e,t){ir(t,Wo(t),e)})),zu=ur((function(e,t,n,r){ir(t,Wo(t),e,r)})),Vu=ur((function(e,t,n,r){ir(t,Ho(t),e,r)})),Hu=$r(jt),Wu=An((function(e,t){e=li(e);var n=-1,r=t.length,o=r>2?t[2]:a;for(o&&Fr(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],u=Wo(i),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===a||xo(f,yi[l])&&!bi.call(e,l))&&(e[l]=i[l])}return e})),Ku=An((function(e){return e.push(a,Ta),u(Qu,a,e)})),qu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),e[t]=n}),Qo(Jo)),Gu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),bi.call(e,t)?e[t].push(n):e[t]=[n]}),Ir),Zu=An(dn),Yu=ur((function(e,t,n){Ea(e,t,n)})),Qu=ur((function(e,t,n,r){Ea(e,t,n,r)})),Ju=$r((function(e,t){var n={};if(null==e)return n;var r=!1;t=v(t,(function(t){return t=Yn(t,e),r||(r=t.length>1),t})),ir(e,Ar(e),n),r&&(n=ma(n,7,jr));for(var o=t.length;o--;)zn(n,t[o]);return n})),Xu=$r((function(e,t){return null==e?{}:On(n=e,t,(function(e,t){return Vo(n,t)}));var n})),ec=Sr(Ho),tc=Sr(Wo),nc=fr((function(e,t,n){return t=t.toLowerCase(),e+(n?Go(t):t)})),rc=fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),oc=fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ic=lr("toLowerCase"),ac=fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),uc=fr((function(e,t,n){return e+(n?" ":"")+sc(t)})),cc=fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),sc=lr("toUpperCase"),lc=An((function(e,t){try{return u(e,a,t)}catch(e){return Oo(e)?e:new ui(e)}})),fc=$r((function(e,t){return s(t,(function(t){t=eo(t),Ot(e,t,mu(e[t],e))})),e})),pc=hr(),dc=hr(!0),hc=An((function(e,t){return function(n){return dn(n,e,t)}})),vc=An((function(e,t){return function(n){return dn(e,n,t)}})),yc=mr(v),mc=mr(f),gc=mr(b),bc=br(),wc=br(!0),_c=yr((function(e,t){return e+t}),0),xc=xr("ceil"),Sc=yr((function(e,t){return e/t}),1),Ec=xr("floor"),Oc=yr((function(e,t){return e*t}),1),jc=xr("round"),kc=yr((function(e,t){return e-t}),0);return k.after=function(e,t){if("function"!=typeof t)throw new di(q);return e=No(e),function(){if(--e<1)return t.apply(this,arguments)}},k.ary=go,k.assign=Bu,k.assignIn=Fu,k.assignInWith=zu,k.assignWith=Vu,k.at=Hu,k.before=bo,k.bind=mu,k.bindAll=fc,k.bindKey=gu,k.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Au(e)?e:[e]},k.chain=po,k.chunk=function(e,t,n){t=(n?Fr(e,t,n):t===a)?1:Gi(No(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,u=ii(Fi(r/t));o<r;)u[i++]=Ln(e,o,o+=t);return u},k.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},k.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ii(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return y(Au(n)?or(n):[n],wa(t,1))},k.cond=function(e){var t=null==e?0:e.length,n=Ir();return e=t?v(e,(function(e){if("function"!=typeof e[1])throw new di(q);return[n(e[0]),e[1]]})):[],An((function(n){for(var r=-1;++r<t;){var o=e[r];if(u(o[0],this,n))return u(o[1],this,n)}}))},k.conforms=function(e){return t=ma(e,1),n=Ho(t),function(e){return $t(e,t,n)};var t,n},k.constant=Qo,k.countBy=cu,k.create=function(e,t){var n=ya(e);return null==t?n:Et(n,t)},k.curry=function e(t,n,r){var o=Er(t,8,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},k.curryRight=function e(t,n,r){var o=Er(t,16,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},k.debounce=wo,k.defaults=Wu,k.defaultsDeep=Ku,k.defer=bu,k.delay=wu,k.difference=Ha,k.differenceBy=Wa,k.differenceWith=Ka,k.drop=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,(t=n||t===a?1:No(t))<0?0:t,r):[]},k.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,0,(t=r-(t=n||t===a?1:No(t)))<0?0:t):[]},k.dropRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0,!0):[]},k.dropWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0):[]},k.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Fr(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=No(n))<0&&(n=-n>o?0:o+n),(r=r===a||r>o?o:No(r))<0&&(r+=o),r=n>r?0:Mo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},k.filter=function(e,t){return(Au(e)?p:Dt)(e,Ir(t,3))},k.flatMap=function(e,t){return wa(mo(e,t),1)},k.flatMapDeep=function(e,t){return wa(mo(e,t),J)},k.flatMapDepth=function(e,t,n){return n=n===a?1:No(n),wa(mo(e,t),n)},k.flatten=io,k.flattenDeep=function(e){return null!=e&&e.length?wa(e,J):[]},k.flattenDepth=function(e,t){return null!=e&&e.length?wa(e,t=t===a?1:No(t)):[]},k.flip=function(e){return Er(e,512)},k.flow=pc,k.flowRight=dc,k.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},k.functions=function(e){return null==e?[]:Kt(e,Ho(e))},k.functionsIn=function(e){return null==e?[]:Kt(e,Wo(e))},k.groupBy=fu,k.initial=function(e){return null!=e&&e.length?Ln(e,0,-1):[]},k.intersection=qa,k.intersectionBy=Ga,k.intersectionWith=Za,k.invert=qu,k.invertBy=Gu,k.invokeMap=pu,k.iteratee=Xo,k.keyBy=du,k.keys=Ho,k.keysIn=Wo,k.map=mo,k.mapKeys=function(e,t){var n={};return t=Ir(t,3),zt(e,(function(e,r,o){Ot(n,t(e,r,o),e)})),n},k.mapValues=function(e,t){var n={};return t=Ir(t,3),zt(e,(function(e,r,o){Ot(n,r,t(e,r,o))})),n},k.matches=function(e){return _n(ma(e,1))},k.matchesProperty=function(e,t){return xn(e,ma(t,1))},k.memoize=_u,k.merge=Yu,k.mergeWith=Qu,k.method=hc,k.methodOf=vc,k.mixin=ei,k.negate=_o,k.nthArg=function(e){return e=No(e),An((function(t){return Sn(t,e)}))},k.omit=Ju,k.omitBy=function(e,t){return Ko(e,_o(Ir(t)))},k.once=function(e){return bo(2,e)},k.orderBy=function(e,t,n,r){return null==e?[]:(Au(t)||(t=null==t?[]:[t]),Au(n=r?a:n)||(n=null==n?[]:[n]),En(e,t,n))},k.over=yc,k.overArgs=Su,k.overEvery=mc,k.overSome=gc,k.partial=Eu,k.partialRight=Ou,k.partition=hu,k.pick=Xu,k.pickBy=Ko,k.property=ni,k.propertyOf=function(e){return function(t){return null==e?a:Gt(e,t)}},k.pull=Ya,k.pullAll=co,k.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?jn(e,t,Ir(n,2)):e},k.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?jn(e,t,a,n):e},k.pullAt=Qa,k.range=bc,k.rangeRight=wc,k.rearg=ju,k.reject=function(e,t){return(Au(e)?p:Dt)(e,_o(Ir(t,3)))},k.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ir(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return kn(e,o),n},k.rest=function(e,t){if("function"!=typeof e)throw new di(q);return An(e,t=t===a?t:No(t))},k.reverse=so,k.sampleSize=function(e,t,n){return t=(n?Fr(e,t,n):t===a)?1:No(t),(Au(e)?gt:Tn)(e,t)},k.set=function(e,t,n){return null==e?e:In(e,t,n)},k.setWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:In(e,t,n,r)},k.shuffle=function(e){return(Au(e)?bt:Rn)(e)},k.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Fr(e,t,n)?(t=0,n=r):(t=null==t?0:No(t),n=n===a?r:No(n)),Ln(e,t,n)):[]},k.sortBy=vu,k.sortedUniq=function(e){return e&&e.length?Un(e):[]},k.sortedUniqBy=function(e,t){return e&&e.length?Un(e,Ir(t,2)):[]},k.split=function(e,t,n){return n&&"number"!=typeof n&&Fr(e,t,n)&&(t=n=a),(n=n===a?te:n>>>0)?(e=Fo(e))&&("string"==typeof t||null!=t&&!Lu(t))&&!(t=ka(t))&&U(e)?Qn(W(e),0,n):e.split(t,n):[]},k.spread=function(e,t){if("function"!=typeof e)throw new di(q);return t=null==t?0:Gi(No(t),0),An((function(n){var r=n[t],o=Qn(n,0,t);return r&&y(o,r),u(e,this,o)}))},k.tail=function(e){var t=null==e?0:e.length;return t?Ln(e,1,t):[]},k.take=function(e,t,n){return e&&e.length?Ln(e,0,(t=n||t===a?1:No(t))<0?0:t):[]},k.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Ln(e,(t=r-(t=n||t===a?1:No(t)))<0?0:t,r):[]},k.takeRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!1,!0):[]},k.takeWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3)):[]},k.tap=function(e,t){return t(e),e},k.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new di(q);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(e,t,{leading:r,maxWait:t,trailing:o})},k.thru=ho,k.toArray=Lo,k.toPairs=ec,k.toPairsIn=tc,k.toPath=function(e){return Au(e)?v(e,eo):Ro(e)?[e]:or(Va(Fo(e)))},k.toPlainObject=Bo,k.transform=function(e,t,n){var r=Au(e),o=r||Tu(e)||Nu(e);if(t=Ir(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Co(e)&&jo(i)?ya(Ai(e)):{}}return(o?s:zt)(e,(function(e,r,o){return t(n,e,r,o)})),n},k.unary=function(e){return go(e,1)},k.union=Ja,k.unionBy=Xa,k.unionWith=eu,k.uniq=function(e){return e&&e.length?Fn(e):[]},k.uniqBy=function(e,t){return e&&e.length?Fn(e,Ir(t,2)):[]},k.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?Fn(e,a,t):[]},k.unset=function(e,t){return null==e||zn(e,t)},k.unzip=lo,k.unzipWith=fo,k.update=function(e,t,n){return null==e?e:Vn(e,t,Zn(n))},k.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:Vn(e,t,Zn(n),r)},k.values=qo,k.valuesIn=function(e){return null==e?[]:I(e,Wo(e))},k.without=tu,k.words=Yo,k.wrap=function(e,t){return Eu(Zn(t),e)},k.xor=nu,k.xorBy=ru,k.xorWith=ou,k.zip=iu,k.zipObject=function(e,t){return qn(e||[],t||[],_t)},k.zipObjectDeep=function(e,t){return qn(e||[],t||[],In)},k.zipWith=au,k.entries=ec,k.entriesIn=tc,k.extend=Fu,k.extendWith=zu,ei(k,k),k.add=_c,k.attempt=lc,k.camelCase=nc,k.capitalize=Go,k.ceil=xc,k.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=Uo(n))==n?n:0),t!==a&&(t=(t=Uo(t))==t?t:0),kt(Uo(e),t,n)},k.clone=function(e){return ma(e,4)},k.cloneDeep=function(e){return ma(e,5)},k.cloneDeepWith=function(e,t){return ma(e,5,t="function"==typeof t?t:a)},k.cloneWith=function(e,t){return ma(e,4,t="function"==typeof t?t:a)},k.conformsTo=function(e,t){return null==t||$t(e,t,Ho(t))},k.deburr=Zo,k.defaultTo=function(e,t){return null==e||e!=e?t:e},k.divide=Sc,k.endsWith=function(e,t,n){e=Fo(e),t=ka(t);var r=e.length,o=n=n===a?r:kt(No(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},k.eq=xo,k.escape=function(e){return(e=Fo(e))&&De.test(e)?e.replace(Re,cn):e},k.escapeRegExp=function(e){return(e=Fo(e))&&He.test(e)?e.replace(Ve,"\\$&"):e},k.every=function(e,t,n){var r=Au(e)?f:Pt;return n&&Fr(e,t,n)&&(t=a),r(e,Ir(t,3))},k.find=su,k.findIndex=ro,k.findKey=function(e,t){return w(e,Ir(t,3),zt)},k.findLast=lu,k.findLastIndex=oo,k.findLastKey=function(e,t){return w(e,Ir(t,3),Wt)},k.floor=Ec,k.forEach=vo,k.forEachRight=yo,k.forIn=function(e,t){return null==e?e:_a(e,Ir(t,3),Wo)},k.forInRight=function(e,t){return null==e?e:xa(e,Ir(t,3),Wo)},k.forOwn=function(e,t){return e&&zt(e,Ir(t,3))},k.forOwnRight=function(e,t){return e&&Wt(e,Ir(t,3))},k.get=zo,k.gt=ku,k.gte=$u,k.has=function(e,t){return null!=e&&Nr(e,t,an)},k.hasIn=Vo,k.head=ao,k.identity=Jo,k.includes=function(e,t,n,r){e=So(e)?e:qo(e),n=n&&!r?No(n):0;var o=e.length;return n<0&&(n=Gi(o+n,0)),Io(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&x(e,t,n)>-1},k.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),x(e,t,o)},k.inRange=function(e,t,n){return t=Do(t),n===a?(n=t,t=0):n=Do(n),(r=e=Uo(e))>=Zi(o=t,i=n)&&r<Gi(o,i);var r,o,i},k.invoke=Zu,k.isArguments=Cu,k.isArray=Au,k.isArrayBuffer=Pu,k.isArrayLike=So,k.isArrayLikeObject=Eo,k.isBoolean=function(e){return!0===e||!1===e||Ao(e)&&Qt(e)==ie},k.isBuffer=Tu,k.isDate=Iu,k.isElement=function(e){return Ao(e)&&1===e.nodeType&&!To(e)},k.isEmpty=function(e){if(null==e)return!0;if(So(e)&&(Au(e)||"string"==typeof e||"function"==typeof e.splice||Tu(e)||Nu(e)||Cu(e)))return!e.length;var t=Da(e);if(t==le||t==ve)return!e.size;if(Hr(e))return!gn(e).length;for(var n in e)if(bi.call(e,n))return!1;return!0},k.isEqual=function(e,t){return Sa(e,t)},k.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:a)?n(e,t):a;return r===a?Sa(e,t,a,n):!!r},k.isError=Oo,k.isFinite=function(e){return"number"==typeof e&&Wi(e)},k.isFunction=jo,k.isInteger=ko,k.isLength=$o,k.isMap=Ru,k.isMatch=function(e,t){return e===t||vn(e,t,Lr(t))},k.isMatchWith=function(e,t,n){return n="function"==typeof n?n:a,vn(e,t,Lr(t),n)},k.isNaN=function(e){return Po(e)&&e!=+e},k.isNative=function(e){if(Ua(e))throw new ui("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(e)},k.isNil=function(e){return null==e},k.isNull=function(e){return null===e},k.isNumber=Po,k.isObject=Co,k.isObjectLike=Ao,k.isPlainObject=To,k.isRegExp=Lu,k.isSafeInteger=function(e){return ko(e)&&e>=-9007199254740991&&e<=X},k.isSet=Du,k.isString=Io,k.isSymbol=Ro,k.isTypedArray=Nu,k.isUndefined=function(e){return e===a},k.isWeakMap=function(e){return Ao(e)&&Da(e)==ge},k.isWeakSet=function(e){return Ao(e)&&"[object WeakSet]"==Qt(e)},k.join=function(e,t){return null==e?"":Ki.call(e,t)},k.kebabCase=rc,k.last=uo,k.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==a&&(o=(o=No(n))<0?Gi(r+o,0):Zi(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):_(e,E,o,!0)},k.lowerCase=oc,k.lowerFirst=ic,k.lt=Mu,k.lte=Uu,k.max=function(e){return e&&e.length?Rt(e,Jo,Jt):a},k.maxBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),Jt):a},k.mean=function(e){return O(e,Jo)},k.meanBy=function(e,t){return O(e,Ir(t,2))},k.min=function(e){return e&&e.length?Rt(e,Jo,bn):a},k.minBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),bn):a},k.stubArray=ri,k.stubFalse=oi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Oc,k.nth=function(e,t){return e&&e.length?Sn(e,No(t)):a},k.noConflict=function(){return qt._===this&&(qt._=Ei),this},k.noop=ti,k.now=yu,k.pad=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return gr(zi(o),n)+e+gr(Fi(o),n)},k.padEnd=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;return t&&r<t?e+gr(t-r,n):e},k.padStart=function(e,t,n){e=Fo(e);var r=(t=No(t))?H(e):0;return t&&r<t?gr(t-r,n)+e:e},k.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Qi(Fo(e).replace(We,""),t||0)},k.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Fr(e,t,n)&&(t=n=a),n===a&&("boolean"==typeof t?(n=t,t=a):"boolean"==typeof e&&(n=e,e=a)),e===a&&t===a?(e=0,t=1):(e=Do(e),t===a?(t=e,e=0):t=Do(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Ji();return Zi(e+o*(t-e+Vt("1e-"+((o+"").length-1))),t)}return $n(e,t)},k.reduce=function(e,t,n){var r=Au(e)?m:$,o=arguments.length<3;return r(e,Ir(t,4),n,o,ga)},k.reduceRight=function(e,t,n){var r=Au(e)?g:$,o=arguments.length<3;return r(e,Ir(t,4),n,o,ba)},k.repeat=function(e,t,n){return t=(n?Fr(e,t,n):t===a)?1:No(t),Cn(Fo(e),t)},k.replace=function(){var e=arguments,t=Fo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},k.result=function(e,t,n){var r=-1,o=(t=Yn(t,e)).length;for(o||(o=1,e=a);++r<o;){var i=null==e?a:e[eo(t[r])];i===a&&(r=o,i=n),e=jo(i)?i.call(e):i}return e},k.round=jc,k.runInContext=e,k.sample=function(e){return(Au(e)?mt:Pn)(e)},k.size=function(e){if(null==e)return 0;if(So(e))return Io(e)?H(e):e.length;var t=Da(e);return t==le||t==ve?e.size:gn(e).length},k.snakeCase=ac,k.some=function(e,t,n){var r=Au(e)?b:Dn;return n&&Fr(e,t,n)&&(t=a),r(e,Ir(t,3))},k.sortedIndex=function(e,t){return Nn(e,t)},k.sortedIndexBy=function(e,t,n){return Mn(e,t,Ir(n,2))},k.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Nn(e,t);if(r<n&&xo(e[r],t))return r}return-1},k.sortedLastIndex=function(e,t){return Nn(e,t,!0)},k.sortedLastIndexBy=function(e,t,n){return Mn(e,t,Ir(n,2),!0)},k.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Nn(e,t,!0)-1;if(xo(e[n],t))return n}return-1},k.startCase=uc,k.startsWith=function(e,t,n){return e=Fo(e),n=null==n?0:kt(No(n),0,e.length),t=ka(t),e.slice(n,n+t.length)==t},k.subtract=kc,k.sum=function(e){return e&&e.length?C(e,Jo):0},k.sumBy=function(e,t){return e&&e.length?C(e,Ir(t,2)):0},k.template=function(e,t,n){var r=k.templateSettings;n&&Fr(e,t,n)&&(t=a),e=Fo(e),t=zu({},t,r,Or);var o,i,u=zu({},t.imports,r.imports,Or),c=Ho(u),s=I(u,c),l=0,f=t.interpolate||ut,p="__p += '",d=fi((t.escape||ut).source+"|"+f.source+"|"+(f===Ue?Xe:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),h="//# sourceURL="+(bi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";e.replace(d,(function(t,n,r,a,u,c){return r||(r=a),p+=e.slice(l,c).replace(ct,M),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),u&&(i=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=bi.call(t,"variable")&&t.variable;if(v){if(Qe.test(v))throw new ui("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(i?p.replace(Ae,""):p).replace(Pe,"$1").replace(Te,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+p).apply(a,s)}));if(y.source=p,Oo(y))throw y;return y},k.times=function(e,t){if((e=No(e))<1||e>X)return[];var n=te,r=Zi(e,te);t=Ir(t),e-=te;for(var o=A(r,t);++n<e;)t(n);return o},k.toFinite=Do,k.toInteger=No,k.toLength=Mo,k.toLower=function(e){return Fo(e).toLowerCase()},k.toNumber=Uo,k.toSafeInteger=function(e){return e?kt(No(e),-9007199254740991,X):0===e?e:0},k.toString=Fo,k.toUpper=function(e){return Fo(e).toUpperCase()},k.trim=function(e,t,n){if((e=Fo(e))&&(n||t===a))return P(e);if(!e||!(t=ka(t)))return e;var r=W(e),o=W(t);return Qn(r,L(r,o),D(r,o)+1).join("")},k.trimEnd=function(e,t,n){if((e=Fo(e))&&(n||t===a))return e.slice(0,K(e)+1);if(!e||!(t=ka(t)))return e;var r=W(e);return Qn(r,0,D(r,W(t))+1).join("")},k.trimStart=function(e,t,n){if((e=Fo(e))&&(n||t===a))return e.replace(We,"");if(!e||!(t=ka(t)))return e;var r=W(e);return Qn(r,L(r,W(t))).join("")},k.truncate=function(e,t){var n=30,r="...";if(Co(t)){var o="separator"in t?t.separator:o;n="length"in t?No(t.length):n,r="omission"in t?ka(t.omission):r}var i=(e=Fo(e)).length;if(U(e)){var u=W(e);i=u.length}if(n>=i)return e;var c=n-H(r);if(c<1)return r;var s=u?Qn(u,0,c).join(""):e.slice(0,c);if(o===a)return s+r;if(u&&(c+=s.length-c),Lu(o)){if(e.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,Fo(et.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;s=s.slice(0,p===a?c:p)}}else if(e.indexOf(ka(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+r},k.unescape=function(e){return(e=Fo(e))&&Le.test(e)?e.replace(Ie,sn):e},k.uniqueId=function(e){var t=++wi;return Fo(e)+t},k.upperCase=cc,k.upperFirst=sc,k.each=vo,k.eachRight=yo,k.first=ao,ei(k,(xu={},zt(k,(function(e,t){bi.call(k.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){k[e].placeholder=k})),s(["drop","take"],(function(e,t){lt.prototype[e]=function(n){n=n===a?1:Gi(No(n),0);var r=this.__filtered__&&!t?new lt(this):this.clone();return r.__filtered__?r.__takeCount__=Zi(n,r.__takeCount__):r.__views__.push({size:Zi(n,te),type:e+(r.__dir__<0?"Right":"")}),r},lt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),s(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;lt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ir(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),s(["head","last"],(function(e,t){var n="take"+(t?"Right":"");lt.prototype[e]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");lt.prototype[e]=function(){return this.__filtered__?new lt(this):this[n](1)}})),lt.prototype.compact=function(){return this.filter(Jo)},lt.prototype.find=function(e){return this.filter(e).head()},lt.prototype.findLast=function(e){return this.reverse().find(e)},lt.prototype.invokeMap=An((function(e,t){return"function"==typeof e?new lt(this):this.map((function(n){return dn(n,e,t)}))})),lt.prototype.reject=function(e){return this.filter(_o(Ir(e)))},lt.prototype.slice=function(e,t){e=No(e);var n=this;return n.__filtered__&&(e>0||t<0)?new lt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=No(t))<0?n.dropRight(-t):n.take(t-e)),n)},lt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},lt.prototype.toArray=function(){return this.take(te)},zt(lt.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=k[o?"take"+("last"==t?"Right":""):t],u=o||/^find/.test(t);i&&(k.prototype[t]=function(){var t=this.__wrapped__,c=o?[1]:arguments,s=r(t,lt),l=c[0],f=s||Au(t),p=function(e){var t=i.apply(k,y([e],c));return o&&d?t[0]:t};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,h=!!this.__actions__.length,v=u&&!d,m=s&&!h;if(!u&&f){t=m?t:new lt(this);var g=e.apply(t,c);return g.__actions__.push({func:ho,args:[p],thisArg:a}),new st(g,d)}return v&&m?e.apply(this,c):(g=this.thru(p),v?o?g.value()[0]:g.value():g)})})),s(["pop","push","shift","sort","splice","unshift"],(function(e){var t=hi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);k.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Au(o)?o:[],e)}return this[n]((function(n){return t.apply(Au(n)?n:[],e)}))}})),zt(lt.prototype,(function(e,t){var n=k[t];if(n){var r=n.name+"";bi.call(ua,r)||(ua[r]=[]),ua[r].push({name:t,func:n})}})),ua[Aa(a,2).name]=[{name:"wrapper",func:a}],lt.prototype.clone=function(){var e=new lt(this.__wrapped__);return e.__actions__=or(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=or(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=or(this.__views__),e},lt.prototype.reverse=function(){if(this.__filtered__){var e=new lt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},lt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Au(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Zi(t,e+a);break;case"takeRight":e=Gi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=Zi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Wn(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},k.prototype.at=uu,k.prototype.chain=function(){return po(this)},k.prototype.commit=function(){return new st(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===a&&(this.__values__=Lo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},k.prototype.plant=function(e){for(var t,n=this;r(n,Ke);){var o=no(n);o.__index__=0,o.__values__=a,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},k.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,lt)){var t=e;return this.__actions__.length&&(t=new lt(this)),(t=t.reverse()).__actions__.push({func:ho,args:[so],thisArg:a}),new st(t,this.__chain__)}return this.thru(so)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Li&&(k.prototype[Li]=function(){return this}),k}();qt._=ln,(i=function(){return ln}.call(t,n,t,e))===a||(e.exports=i)}.call(this)},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=h},824:function(e){"use strict";e.exports=c},45:function(e){"use strict";e.exports=s},728:function(e){"use strict";e.exports=l},688:function(e){"use strict";e.exports=v},64:function(e){"use strict";e.exports=p},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=f},281:function(e){"use strict";e.exports=d}},y={};function m(e){var t=y[e];if(void 0!==t)return t.exports;var n=y[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,m),n.loaded=!0,n.exports}m.y=a,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;m.g.importScripts&&(e=m.g.location+"");var t=m.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),m.p=e}();var g={};return(0,m(968).s)(1),function(){"use strict";var i=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Re.default.createElement("a",Ne({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,De.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,De.interpolateUrl)(t,n)},o),r)},a=function(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},u=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Re.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,2);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,2):void 0}}(n)||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.")}(),o=r[0],i=r[1];(0,Re.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var c={};return t&&(c=(0,Re.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){u(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},s=function(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},l=function(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},f=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,2);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)?l(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){return(0,Be.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},p=function(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},d=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return p(e,2);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)?p(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,Fe.isEqual)(a,r)||o(a)};return t((0,Me.getExtensionStore)().getState()),(0,Me.getExtensionStore)().subscribe(t)}),[e,r]),r},h=function(e){var t=f(),n=d(e);return(0,Re.useMemo)((function(){return(0,Me.getConnectedExtensions)(n,t)}),[n,t])},v=function(e){var t=(0,Re.useContext)(Le).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Re.useEffect)((function(){(0,Me.registerExtensionSlot)(t,e)}),[]),{extensions:h(e),extensionSlotName:e,extensionSlotModuleName:t}},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},b=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},w=function(e){return e},_=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},x=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?_(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ke(n)));return function(){var e=n(t);if(!r(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ke(e)));return e}},O=function(e){if("object"!==We(e))throw new Error("single-spa-react requires a configuration object");var t=x(x({},Ge),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!qe&&t.React.createContext&&(qe=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:j.bind(null,t),mount:k.bind(null,t),unmount:$.bind(null,t)};return t.parcelCanUpdate&&(n.update=C.bind(null,t)),n},j=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},k=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=A(e,t,(function(){n(this)})),i=E(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},$=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},C=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=A(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=E(e,t)();e.ReactDOM.render(r,i)}}))},A=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=qe?e.React.createElement(qe.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,x(x({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},P=function(e,t){return!t||"object"!==et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},T=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},nt,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xe(e,t)}(u,n);var o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Je(o);if(i){var n=Je(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function u(e){var n;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=u.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Re.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Re.default.createElement(Le.Provider,{value:this.state.config},Re.default.createElement(Re.default.Suspense,{fallback:null},t.disableTranslations?Re.default.createElement(e,Qe({},this.props)):Re.default.createElement(rt,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Re.default.createElement(Ye.I18nextProvider,{i18n:tt,defaultNS:t.moduleName},Re.default.createElement(e,Qe({},this.props))))));return t.strictMode||!Re.default.StrictMode?r:Re.default.createElement(Re.default.StrictMode,null,r)},u}(Re.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},I=function(e,t){return O({React:Re.default,ReactDOM:He.default,rootComponent:T(t)(e)})},R=function(e,t){return function(){return e().then((function(e){return I(e.default,t)}))}},L=function(e,t){return function(){return Promise.resolve(I(e,t))}},D=function(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},N=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,2);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)?D(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){return(0,Me.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,Fe.isEqual)(a,r)||o(a)}))}),[]),r},M=function(e){(0,Re.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},U=function(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])}},B=function(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=function(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])}},z=function(e){var t=this.__data__=new st(e);this.size=t.size},V=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])},H=function(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},W=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},K=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(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)?H(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.")}()},q=function(){var e=(0,Re.useContext)(Le),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Re.useMemo)((function(){return(0,De.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=K((0,Re.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Re.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw tr[c]||(tr[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),tr[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c,s,l=(0,Re.useMemo)(De.getExtensionsConfigStore,[]),f=(t=l,n=e,i=K((0,Re.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,De.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Re.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,De.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!er(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!f&&e){var p="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!tr[p]&&l&&(tr[p]=(c=l,s=e,new Promise((function(e){var t=c.subscribe((function(n){var r=(0,De.getExtensionConfigFromStore)(n,s.extensionSlotName,s.extensionId);r.loaded&&r.config&&(e(r.config),t())}))})))),tr[p]}return f||{}}(n),i=(0,Re.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){W(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},G=function(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},Z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Z(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Q=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},J=function(e,t){switch(t.type){case Kn.loadPatient:return Y({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Kn.newPatient:return Y({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Kn.loadError:return Y({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},X=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useReducer)(J,Y({},or,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return G(e,2);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)?G(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){if(r.isPendingUuid){var e=Q();o(e?{type:Kn.loadPatient,patientUuid:e}:{type:Kn.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,nr.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Kn.newPatient})}),(function(e){return t&&o({err:e,type:Kn.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Re.useEffect)((function(){var e=function(e){var t=Q();t!=r.patientUuid&&o({type:Kn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ee=function(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},te=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ne=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){te(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},re=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(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.")}()},oe=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},ie=function(e,t){switch(t.type){case rr.loadPatient:return ne({},e,{patient:null,isLoadingPatient:!0,err:null});case rr.newPatient:return ne({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case rr.loadError:return ne({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe(),t=re((0,Re.useReducer)(ie,cr),2),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var t=!0;return e?((0,nr.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:rr.newPatient})}),(function(e){return t&&r({err:e,type:rr.loadError})})),r({type:rr.loadPatient})):r({type:rr.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},ue=function(e){var t=h(e);return(0,Re.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},ce=function(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},se=function(){var e,t=(e=(0,Re.useState)(0),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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ce(e,2);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)?ce(e,2):void 0}}(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.")}())[1];return(0,Re.useCallback)((function(){t((function(e){return e+1}))}),[])},le=function(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},fe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e},pe=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(fe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return le(e,2);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)?le(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=function(){r(fe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},de=function(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},he=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return de(e,2);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)?de(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,nr.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},ve=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Re.useRef)(null);return(0,Re.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},ye=function(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},me=function(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},ge=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,2);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)?me(e,2):void 0}}(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.")}(),n=t[0],r=t[1],o=null;if(!n){if(ir){var i=(0,nr.getSessionStore)().getState();i.loaded&&(o=i.session)}else ir=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,ar&&ar(),ar=void 0)};t((0,nr.getSessionStore)().getState()),o||(ar=(0,nr.getSessionStore)().subscribe(t))}));if(!o)throw ir;r(o)}(0,Re.useEffect)((function(){return ar||(ar=(0,nr.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){ar&&ar(),ar=void 0}}),[]);var a=n||o;if(!a)throw ir?(console.warn("useSession is in an unexpected state. Attempting to recover."),ir):Error("useSession is in an invalid state.");return a},be=function(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},we=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_e=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){we(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},xe=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(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)?be(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.")}()},Se=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr,n=arguments.length>2?arguments[2]:void 0,r=xe((0,Re.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Re.useEffect)((function(){return(0,pr.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Re.useMemo)((function(){return Se(e,n)}),[e,n])),_e({},o,a)},Oe=function(e,t){return Ee(e,dr,t)},je=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){var u=function(e){try{s(o.next(e))}catch(e){a(e)}},c=function(e){try{s(o.throw(e))}catch(e){a(e)}},s=function(e){var t;e.done?i(e.value):(t=e.value,r(t,n)?t:new n((function(e){e(t)}))).then(u,c)};s((o=o.apply(e,t||[])).next())}))},ke=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},$e=function(e){var t,n=no(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(nr.defaultVisitCustomRepresentation,"&includeInactive=false"):null,nr.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Re.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&(0,ro.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ce=function(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},Ae=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ce(e,2);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)?Ce(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,nr.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Pe=function(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},Te=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pe(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)?Pe(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.")}()},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Te((0,Re.useState)(1),2),r=n[0],o=n[1],i=(0,Re.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Re.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};m.r(g),m.d(g,{ComponentContext:function(){return Le},ConfigurableLink:function(){return i},Extension:function(){return Ue},ExtensionSlot:function(){return Ve},UserHasAccess:function(){return fr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return ot},getAsyncLifecycle:function(){return R},getLifecycle:function(){return I},getSyncLifecycle:function(){return L},openmrsComponentDecorator:function(){return T},useAssignedExtensionIds:function(){return N},useAssignedExtensions:function(){return d},useBodyScrollLock:function(){return M},useConfig:function(){return q},useConnectedExtensions:function(){return h},useConnectivity:function(){return f},useCurrentPatient:function(){return ae},useExtensionInternalStore:function(){return sr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return ue},useExtensionStore:function(){return lr},useForceUpdate:function(){return se},useLayoutType:function(){return pe},useLocations:function(){return he},useOnClickOutside:function(){return ve},usePagination:function(){return Ie},usePatient:function(){return X},useSession:function(){return ge},useStore:function(){return Ee},useStoreWithActions:function(){return Oe},useVisit:function(){return $e},useVisitTypes:function(){return Ae}});var Re=m(954),Le=Re.default.createContext({moduleName:""}),De=m(824);function Ne(){return Ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ne.apply(this,arguments)}var Me=m(45),Ue=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return s(e,2);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)?s(e,2):void 0}}(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.")}(),i=o[0],a=o[1],u=(0,Re.useContext)(Le).extension,c=(0,Re.useCallback)((function(e){a(e)}),[]);(0,Re.useEffect)((function(){if(null!=i&&u)return(0,Me.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n)}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]);var l=Re.default.createElement("div",{ref:c,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(l,u):l},Be=m(728),Fe=m(891);function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}var Ve=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?w:n,o=e.children,i=e.state,a=e.style,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),c=(0,Re.useRef)(null),s=v(t),l=s.extensions,f=s.extensionSlotModuleName,p=(0,Re.useRef)(i);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(p.current,i)||(p.current=i);var d=(0,Re.useMemo)((function(){return t&&r(l).map((function(e){return Re.default.createElement(Le.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},null!=o?o:Re.default.createElement(Ue,{state:p.current}))}))}),[r,l,t,p.current]);return Re.default.createElement("div",ze({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:b({},a,{position:"relative"})},u),d)},He=m(493);function We(e){return(We="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}var qe=null;try{qe=n(2735).createContext()}catch(e){}var Ge={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Ze=m(64),Ye=m(281);function Qe(){return Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qe.apply(this,arguments)}function Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var et=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)},tt=Ze.default.default||Ze.default,nt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},rt=function(e){(0,Re.useEffect)((function(){return tt.on("languageChanged",e.forceUpdate),function(){return tt.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Re.useRef)(null);if(t.current)throw t.current;if(!tt.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw tt.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Re.default.createElement(Re.default.Fragment,null,e.children)},ot=R,it=function(e,t){return e===t||e!=e&&t!=t},at=function(e,t){for(var n=e.length;n--;)if(it(e[n][0],t))return n;return-1},ut=Array.prototype.splice;U.prototype.clear=function(){this.__data__=[],this.size=0},U.prototype.delete=function(e){var t=this.__data__,n=at(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),--this.size,0))},U.prototype.get=function(e){var t=this.__data__,n=at(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return at(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ct,st=U,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=lt||ft||Function("return this")(),dt=pt.Symbol,ht=Object.prototype,vt=ht.hasOwnProperty,yt=ht.toString,mt=dt?dt.toStringTag:void 0,gt=Object.prototype.toString,bt=dt?dt.toStringTag:void 0,wt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in Object(e)?function(e){var t=vt.call(e,mt),n=e[mt];try{e[mt]=void 0;var r=!0}catch(e){}var o=yt.call(e);return r&&(t?e[mt]=n:delete e[mt]),o}(e):(t=e,gt.call(t));var t},_t=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!_t(e))return!1;var t=wt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},St=pt["__core-js_shared__"],Et=(ct=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+ct:"",Ot=Function.prototype.toString,jt=function(e){if(null!=e){try{return Ot.call(e)}catch(e){}try{return e+""}catch(e){}}return""},kt=/^\[object .+?Constructor\]$/,$t=Function.prototype,Ct=Object.prototype,At=$t.toString,Pt=Ct.hasOwnProperty,Tt=RegExp("^"+At.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=function(e,t){var n,r,o=null==(n=e)?void 0:n[t];return!_t(r=o)||Et&&Et in r||!(xt(r)?Tt:kt).test(jt(r))?void 0:o},Rt=It(pt,"Map"),Lt=It(Object,"create"),Dt=Object.prototype.hasOwnProperty,Nt=Object.prototype.hasOwnProperty;B.prototype.clear=function(){this.__data__=Lt?Lt(null):{},this.size=0},B.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},B.prototype.get=function(e){var t=this.__data__;if(Lt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Dt.call(t,e)?t[e]:void 0},B.prototype.has=function(e){var t=this.__data__;return Lt?void 0!==t[e]:Nt.call(t,e)},B.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lt&&void 0===t?"__lodash_hash_undefined__":t,this};var Mt=B,Ut=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};F.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(Rt||st),string:new Mt}},F.prototype.delete=function(e){var t=Ut(this,e).delete(e);return this.size-=t?1:0,t},F.prototype.get=function(e){return Ut(this,e).get(e)},F.prototype.has=function(e){return Ut(this,e).has(e)},F.prototype.set=function(e,t){var n=Ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Bt=F;z.prototype.clear=function(){this.__data__=new st,this.size=0},z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},z.prototype.get=function(e){return this.__data__.get(e)},z.prototype.has=function(e){return this.__data__.has(e)},z.prototype.set=function(e,t){var n=this.__data__;if(r(n,st)){var o=n.__data__;if(!Rt||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(o)}return n.set(e,t),this.size=n.size,this};var Ft=z;V.prototype.add=V.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},V.prototype.has=function(e){return this.__data__.has(e)};var zt=V,Vt=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},Ht=function(e,t){return e.has(t)},Wt=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new zt:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Vt(t,(function(e,t){if(!Ht(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Kt=pt.Uint8Array,qt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Gt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Zt=dt?dt.prototype:void 0,Yt=Zt?Zt.valueOf:void 0,Qt=Array.isArray,Jt=Object.prototype.propertyIsEnumerable,Xt=Object.getOwnPropertySymbols,en=Xt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Xt(e),(function(t){return Jt.call(e,t)})))}:function(){return[]},tn=function(e){return null!=e&&"object"==typeof e},nn=function(e){return tn(e)&&"[object Arguments]"==wt(e)},rn=Object.prototype,on=rn.hasOwnProperty,an=rn.propertyIsEnumerable,un=nn(function(){return arguments}())?nn:function(e){return tn(e)&&on.call(e,"callee")&&!an.call(e,"callee")},cn=un,sn=t&&!t.nodeType&&t,ln=sn&&e&&!e.nodeType&&e,fn=ln&&ln.exports===sn?pt.Buffer:void 0,pn=(fn?fn.isBuffer:void 0)||function(){return!1},dn=/^(?:0|[1-9]\d*)$/,hn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,mn,gn,bn=t&&!t.nodeType&&t,wn=bn&&e&&!e.nodeType&&e,_n=wn&&wn.exports===bn&<.process,xn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(e){}}(),Sn=xn&&xn.isTypedArray,En=Sn?(yn=Sn,function(e){return yn(e)}):function(e){return tn(e)&&hn(e.length)&&!!vn[wt(e)]},On=Object.prototype.hasOwnProperty,jn=Object.prototype,kn=(mn=Object.keys,gn=Object,function(e){return mn(gn(e))}),$n=Object.prototype.hasOwnProperty,Cn=function(e){return i=en,a=null!=(n=t=r=e)&&hn(n.length)&&!xt(n)?function(e,t){var n,r,i,a=Qt(e),u=!a&&cn(e),c=!a&&!u&&pn(e),s=!a&&!u&&!c&&En(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!On.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&dn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(t):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||jn))return kn(e);var t,n,r=[];for(var o in Object(e))$n.call(e,o)&&"constructor"!=o&&r.push(o);return r}(t),Qt(r)?a:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(a,i(r));var t,n,r,i,a},An=Object.prototype.hasOwnProperty,Pn=It(pt,"DataView"),Tn=It(pt,"Promise"),In=It(pt,"Set"),Rn=It(pt,"WeakMap"),Ln="[object Map]",Dn="[object Promise]",Nn="[object Set]",Mn="[object WeakMap]",Un="[object DataView]",Bn=jt(Pn),Fn=jt(Rt),zn=jt(Tn),Vn=jt(In),Hn=jt(Rn),Wn=wt;(Pn&&Wn(new Pn(new ArrayBuffer(1)))!=Un||Rt&&Wn(new Rt)!=Ln||Tn&&Wn(Tn.resolve())!=Dn||In&&Wn(new In)!=Nn||Rn&&Wn(new Rn)!=Mn)&&(Wn=function(e){var t=wt(e),n="[object Object]"==t?e.constructor:void 0,r=n?jt(n):"";if(r)switch(r){case Bn:return Un;case Fn:return Ln;case zn:return Dn;case Vn:return Nn;case Hn:return Mn}return t});var Kn,qn,Gn=Wn,Zn="[object Arguments]",Yn="[object Array]",Qn="[object Object]",Jn=Object.prototype.hasOwnProperty,Xn=function e(t,n,o,i,a){return t===n||(null==t||null==n||!tn(t)&&!tn(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Qt(e),c=Qt(t),s=u?Yn:Gn(e),l=c?Yn:Gn(t),f=(s=s==Zn?Qn:s)==Qn,p=(l=l==Zn?Qn:l)==Qn,d=s==l;if(d&&pn(e)){if(!pn(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Ft),u||En(e)?Wt(e,t,n,o,i,a):function(e,t,n,r,o,i,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||!i(new Kt(e),new Kt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return it(+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=qt;case"[object Set]":var c=1&r;if(u||(u=Gt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Wt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Yt)return Yt.call(e)==Yt.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Jn.call(e,"__wrapped__"),v=p&&Jn.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Ft),i(y,m,n,o,a)}}return!!d&&(a||(a=new Ft),function(e,t,n,o,i,a){var u=1&n,c=Cn(e),s=c.length;if(s!=Cn(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:An.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},er=function(e,t){return Xn(e,t)},tr={},nr=m(766);(qn=Kn||(Kn={})).loadPatient="loadPatient",qn.newPatient="newPatient",qn.loadError="patientLoadError";var rr,or={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(rr||(rr={}));var ir,ar,ur,cr={patient:null,isLoadingPatient:!0,err:null},sr=c((0,Me.getExtensionInternalStore)()),lr=c((0,Me.getExtensionStore)()),fr=function(e){var t,n=e.privilege,r=e.children,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ye(e,2);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)?ye(e,2):void 0}}(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.")}(),i=o[0],a=o[1];return(0,Re.useEffect)((function(){var e=(0,nr.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return e.unsubscribe()}}),[]),i&&(0,nr.userHasAccess)(n,i)?Re.default.createElement(Re.default.Fragment,null,r):null},pr=m(385),dr=function(e){return e},hr=function(){},vr=void 0,yr=Object,mr=function(e){return e===vr},gr=function(e){return"function"==typeof e},br=function(e,t){return yr.assign({},e,t)},wr="undefined",_r=function(){return("undefined"==typeof window?"undefined":o(window))!=wr},xr=new WeakMap,Sr=0,Er=function(e){var t,n,r=void 0===e?"undefined":o(e),i=e&&e.constructor,a=i==Date;if(yr(e)!==e||a||i==RegExp)t=a?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=xr.get(e))return t;if(t=++Sr+"~",xr.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=Er(e[n])+",";xr.set(e,t)}if(i==yr){t="#";for(var u=yr.keys(e).sort();!mr(n=u.pop());)mr(e[n])||(t+=n+":"+Er(e[n])+",");xr.set(e,t)}}return t},Or=!0,jr=_r(),kr=("undefined"==typeof document?"undefined":o(document))!=wr,$r=jr&&window.addEventListener?window.addEventListener.bind(window):hr,Cr=kr?document.addEventListener.bind(document):hr,Ar=jr&&window.removeEventListener?window.removeEventListener.bind(window):hr,Pr=kr?document.removeEventListener.bind(document):hr,Tr={isOnline:function(){return Or},isVisible:function(){var e=kr&&document.visibilityState;return mr(e)||"hidden"!==e}},Ir={initFocus:function(e){return Cr("visibilitychange",e),$r("focus",e),function(){Pr("visibilitychange",e),Ar("focus",e)}},initReconnect:function(e){var t=function(){Or=!0,e()},n=function(){Or=!1};return $r("online",t),$r("offline",n),function(){Ar("online",t),Ar("offline",n)}}},Rr=!_r()||"Deno"in window,Lr=Rr?Re.useEffect:Re.useLayoutEffect,Dr="undefined"!=typeof navigator&&navigator.connection,Nr=!Rr&&Dr&&(["slow-2g","2g"].includes(Dr.effectiveType)||Dr.saveData),Mr=function(e){if(gr(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Er(e):"",t,e?"$swr$"+e:""]},Ur=new WeakMap,Br=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=Ur.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Fr=0,zr=function(){return++Fr},Vr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return je(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return ke(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!mr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Mr(n),f=l[0],p=l[2],!f)return[2];if(d=Ur.get(t),h=d[2],e.length<3)return[2,Br(t,f,t.get(f),vr,vr,u,!0)];if(v=r,m=zr(),h[f]=[m,0],g=!mr(s),b=t.get(f),g&&(t.set(f,s),Br(t,f,s)),gr(v))try{v=v(t.get(f))}catch(e){y=e}return v&&gr(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(gr(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,br(t.get(p),{error:y}))),h[f][1]=zr(),[4,Br(t,f,v,y,vr,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Hr=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Wr=function(e,t){if(!Ur.has(e)){var n=br(Ir,t),r={},o=Vr.bind(vr,e),i=hr;if(Ur.set(e,[r,{},{},{},o]),!Rr){var a=n.initFocus(setTimeout.bind(vr,Hr.bind(vr,r,0))),u=n.initReconnect(setTimeout.bind(vr,Hr.bind(vr,r,1)));i=function(){a&&a(),u&&u(),Ur.delete(e)}}return[e,o,i]}return[e,Ur.get(e)[4]]},Kr=Wr(new Map),qr=Kr[0],Gr=Kr[1],Zr=br({onLoadingSlow:hr,onSuccess:hr,onError:hr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!mr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:hr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Nr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Nr?5e3:3e3,compare:function(e,t){return Er(e)==Er(t)},isPaused:function(){return!1},cache:qr,mutate:Gr,fallback:{}},Tr),Yr=function(e,t){var n=br(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=br(o,a))}return n},Qr=(0,Re.createContext)({}),Jr=function(e){return gr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Xr=function(){return br(Zr,(0,Re.useContext)(Qr))},eo=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},to={dedupe:!0},no=(yr.defineProperty((function(e){var t=e.value,n=Yr((0,Re.useContext)(Qr),t),r=t&&t.provider,o=(0,Re.useState)((function(){return r?Wr(r(n.cache||qr),t):vr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Lr((function(){return o?o[2]:vr}),[]),(0,Re.createElement)(Qr.Provider,br(e,{value:n}))}),"default",{value:Zr}),ur=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ur.get(r),d=p[0],h=p[1],v=p[2],y=p[3],m=Mr(e),g=m[0],b=m[1],w=m[2],_=(0,Re.useRef)(!1),x=(0,Re.useRef)(!1),S=(0,Re.useRef)(g),E=(0,Re.useRef)(t),O=(0,Re.useRef)(n),j=function(){return O.current},k=function(){return j().isVisible()&&j().isOnline()},$=function(e){return r.set(w,br(r.get(w),e))},C=r.get(g),A=mr(a)?n.fallback[g]:a,P=mr(C)?A:C,T=r.get(w)||{},I=T.error,R=!_.current,L=function(){return R&&!mr(c)?c:!j().isPaused()&&(u?!mr(P):mr(P)||n.revalidateIfStale)},D=!(!g||!t)&&(!!T.isValidating||R&&L()),N=function(e,t){var n=(0,Re.useState)({})[1],r=(0,Re.useRef)(e),o=(0,Re.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Re.useCallback)((function(e){var i=!1,a=r.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(i=!0))}i&&!t.current&&n({})}),[]);return Lr((function(){r.current=e})),[r,o.current,i]}({data:P,error:I,isValidating:D},x),M=N[0],U=N[1],B=N[2],F=(0,Re.useCallback)((function(e){return je(void 0,void 0,void 0,(function(){var t,o,a,u,c,s,l,f,p,d,h,m,w;return ke(this,(function(O){switch(O.label){case 0:if(t=E.current,!g||!t||x.current||j().isPaused())return[2,!1];u=!0,c=e||{},s=!y[g]||!c.dedupe,l=function(){return!x.current&&g===S.current&&_.current},f=function(){var e=y[g];e&&e[1]===a&&delete y[g]},p={isValidating:!1},d=function(){$({isValidating:!1}),l()&&B(p)},$({isValidating:!0}),B({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),s&&(Br(r,g,M.current.data,M.current.error,!0),n.loadingTimeout&&!r.get(g)&&setTimeout((function(){u&&l()&&j().onLoadingSlow(g,n)}),n.loadingTimeout),y[g]=[t.apply(void 0,b),zr()]),w=y[g],o=w[0],a=w[1],[4,o];case 2:return o=O.sent(),s&&setTimeout(f,n.dedupingInterval),y[g]&&y[g][1]===a?($({error:vr}),p.error=vr,h=v[g],!mr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),s&&l()&&j().onDiscarded(g),[2,!1]):(i(M.current.data,o)?p.data=M.current.data:p.data=o,i(r.get(g),o)||r.set(g,o),s&&l()&&j().onSuccess(o,g,n),[3,4])):(s&&l()&&j().onDiscarded(g),[2,!1]);case 3:return m=O.sent(),f(),j().isPaused()||($({error:m}),p.error=m,s&&l()&&(j().onError(m,g,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&k()&&j().onErrorRetry(m,g,n,F,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,d(),l()&&s&&Br(r,g,p.data,p.error,!1),[2,!0]}}))}))}),[g]),z=(0,Re.useCallback)(Vr.bind(vr,r,(function(){return S.current})),[]);if(Lr((function(){E.current=t,O.current=n})),Lr((function(){if(g){var e=g!==S.current,t=F.bind(vr,to),n=0,r=eo(g,h,(function(e,t,n){B(br({error:t,isValidating:n},i(M.current.data,e)?vr:{data:e}))})),a=eo(g,d,(function(e){if(0==e){var r=Date.now();j().revalidateOnFocus&&r>n&&k()&&(n=r+j().focusThrottleInterval,t())}else if(1==e)j().revalidateOnReconnect&&k()&&t();else if(2==e)return F()}));return x.current=!1,S.current=g,_.current=!0,e&&B({data:P,error:I,isValidating:D}),L()&&(mr(P)||Rr?t():(u=t,_r()&&o(window.requestAnimationFrame)!=wr?window.requestAnimationFrame(u):setTimeout(u,1))),function(){x.current=!0,r(),a()}}var u}),[g,F]),Lr((function(){var e,t=function(){var t=gr(s)?s(P):s;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?t():F(to).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[s,l,f,F]),(0,Re.useDebugValue)(P),u&&mr(P)&&g)throw E.current=t,O.current=n,x.current=!1,mr(I)?F(to):I;return{mutate:z,get data(){return U.data=!0,P},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,D}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xr(),r=Jr(e),o=r[0],i=r[1],a=r[2],u=Yr(n,a),c=ur,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),ro=m(688),oo=m(332),io=m.n(oo);ro.default.extend(io())}(),g}())}}}))},5309:function(e,t,r){"use strict";var o=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Ye.createElement("a",Xe({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Je.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Je.interpolateUrl)(t,n)},o),r)},i=function(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},a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},u=function(e){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Ye.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return i(e,2);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,2):void 0}}(n)||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.")}(),o=r[0],u=r[1];(0,Ye.useEffect)((function(){return e.subscribe((function(e){return u(e)}))}),[]);var c={};return t&&(c=(0,Ye.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){a(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},s=function(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},l=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ye.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,2);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)?s(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Ye.useEffect)((function(){return(0,tt.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},f=function(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},d=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Ye.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return f(e,2);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,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Ye.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,nt.isEqual)(a,r)||o(a)};return t((0,et.getExtensionStore)().getState()),(0,et.getExtensionStore)().subscribe(t)}),[e,r]),r},h=function(e){var t=l(),n=d(e);return(0,Ye.useMemo)((function(){return(0,et.getConnectedExtensions)(n,t)}),[n,t])},v=function(e){var t=(0,Ye.useContext)(Qe).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Ye.useEffect)((function(){(0,et.registerExtensionSlot)(t,e)}),[]),{extensions:h(e),extensionSlotName:e,extensionSlotModuleName:t}},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},m=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},g=function(e){return e},b=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},w=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?b(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},_=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},x=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(ut(n)));return function(){var e=n(t);if(!c(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(ut(e)));return e}},S=function(e){if("object"!==at(e))throw new Error("single-spa-react requires a configuration object");var t=w(w({},st),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!ct&&t.React.createContext&&(ct=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:E.bind(null,t),mount:O.bind(null,t),unmount:j.bind(null,t)};return t.parcelCanUpdate&&(n.update=k.bind(null,t)),n},E=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},O=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=$(e,t,(function(){n(this)})),i=x(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},j=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},k=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=$(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=x(e,t)();e.ReactDOM.render(r,i)}}))},$=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=ct?e.React.createElement(ct.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,w(w({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},C=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},A=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?Object(t[n]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach((function(t){C(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},P=function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")},T=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},I=function(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},R=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},L=function(e,t){if(t&&("object"===lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)},D=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,pt.Z)(e,t)},N=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},M=function(e){return null==e?"":""+e},U=function(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))},B=function(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}},F=function(e,t,n){var r=B(e,t,Object);r.obj[r.k]=n},z=function(e,t){var n=B(e,t),r=n.obj,o=n.k;if(r)return r[o]},V=function(e,t,n){var r=z(e,n);return void 0!==r?r:z(t,n)},H=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},W=function(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return gt[e]})):e},K=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},q=function(){var e={};return Ot.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:jt[t.fc]}}))})),e},G=function(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===lt(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===lt(e[2])||"object"===lt(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}},Z=function(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e},Y=function(){},Q=function(e){var t=e.i18n,n=e.defaultNS,r=e.children,o=(0,Ye.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,Ye.createElement)(Tt.Provider,{value:o},r)},J=function(e,t){return!t||"object"!==Mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},X=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},Bt,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lt(e,t)}(a,n);var r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rt(r);if(o){var n=Rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return J(this,e)});function a(e){var n;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=i.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var u=a.prototype;return u.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},u.render=function(){if(this.state.caughtError)return Ye.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Ye.createElement(Qe.Provider,{value:this.state.config},Ye.createElement(Ye.Suspense,{fallback:null},t.disableTranslations?Ye.createElement(e,It({},this.props)):Ye.createElement(Ft,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Ye.createElement(Q,{i18n:Ut,defaultNS:t.moduleName},Ye.createElement(e,It({},this.props))))));return t.strictMode||!Ye.StrictMode?r:Ye.createElement(Ye.StrictMode,null,r)},a}(Ye.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},ee=function(e,t){return S({React:Ye,ReactDOM:it,rootComponent:X(t)(e)})},te=function(e,t){return function(){return e().then((function(e){return ee(e.default,t)}))}},ne=function(e,t){return function(){return Promise.resolve(ee(e,t))}},re=function(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},oe=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Ye.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return re(e,2);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)?re(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Ye.useEffect)((function(){return(0,et.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,nt.isEqual)(a,r)||o(a)}))}),[]),r},ie=function(e){(0,Ye.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},ae=function(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},ue=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ce=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(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)?ae(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.")}()},se=function(){var e=(0,Ye.useContext)(Qe),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Ye.useMemo)((function(){return(0,Je.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=ce((0,Ye.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Ye.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw Ht[c]||(Ht[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),Ht[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c=(0,Ye.useMemo)(Je.getExtensionsConfigStore,[]),s=(t=c,n=e,i=ce((0,Ye.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,Je.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Ye.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,Je.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!(0,Vt.Z)(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!s&&e){var l="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!Ht[l]&&c&&(Ht[l]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,Je.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,e)),Ht[l]}return s||{}}(n),i=(0,Ye.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){ue(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},le=function(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},fe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},pe=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){fe(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},de=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},he=function(e,t){switch(t.type){case Dt.loadPatient:return pe({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Dt.newPatient:return pe({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Dt.loadError:return pe({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},ve=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Ye.useReducer)(he,pe({},qt,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return le(e,2);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)?le(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Ye.useEffect)((function(){if(r.isPendingUuid){var e=de();o(e?{type:Dt.loadPatient,patientUuid:e}:{type:Dt.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,Wt.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Dt.newPatient})}),(function(e){return t&&o({err:e,type:Dt.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Ye.useEffect)((function(){var e=function(e){var t=de();t!=r.patientUuid&&o({type:Dt.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ye=function(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},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){me(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},be=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(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)?ye(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.")}()},we=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},_e=function(e,t){switch(t.type){case Kt.loadPatient:return ge({},e,{patient:null,isLoadingPatient:!0,err:null});case Kt.newPatient:return ge({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case Kt.loadError:return ge({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we(),t=be((0,Ye.useReducer)(_e,Gt),2),n=t[0],r=t[1];return(0,Ye.useEffect)((function(){var t=!0;return e?((0,Wt.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:Kt.newPatient})}),(function(e){return t&&r({err:e,type:Kt.loadError})})),r({type:Kt.loadPatient})):r({type:Kt.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},Se=function(e){var t=h(e);return(0,Ye.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},Ee=function(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},Oe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e},je=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ye.useState)(Oe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ee(e,2);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)?Ee(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Ye.useEffect)((function(){var e=function(){r(Oe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},ke=function(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},$e=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ye.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ke(e,2);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)?ke(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Ye.useEffect)((function(){var e=(0,Wt.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Ce=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Ye.useRef)(null);return(0,Ye.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},Ae=function(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},Pe=function(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},Te=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ye.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Pe(e,2);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)?Pe(e,2):void 0}}(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.")}(),n=t[0],r=t[1],o=null;if(!n){if(Zt){var i=(0,Wt.getSessionStore)().getState();i.loaded&&(o=i.session)}else Zt=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,Yt&&Yt(),Yt=void 0)};t((0,Wt.getSessionStore)().getState()),o||(Yt=(0,Wt.getSessionStore)().subscribe(t))}));if(!o)throw Zt;r(o)}(0,Ye.useEffect)((function(){return Yt||(Yt=(0,Wt.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){Yt&&Yt(),Yt=void 0}}),[]);var a=n||o;if(!a)throw Zt?(console.warn("useSession is in an unexpected state. Attempting to recover."),Zt):Error("useSession is in an invalid state.");return a},Ie=function(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},Re=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Le=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Re(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},De=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ie(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)?Ie(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.")}()},Ne=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn,n=arguments.length>2?arguments[2]:void 0,r=De((0,Ye.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Ye.useEffect)((function(){return(0,en.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Ye.useMemo)((function(){return Ne(e,n)}),[e,n])),Le({},o,a)},Ue=function(e,t){return Me(e,tn,t)},Be=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,c(t,n)?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Fe=function(e,t){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=t.call(e,a)}catch(e){i=[6,e],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])}}},ze=function(e){var t,n=Wn(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(Wt.defaultVisitCustomRepresentation,"&includeInactive=false"):null,Wt.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Ye.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&qn()(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ve=function(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},He=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ye.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,2);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)?Ve(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Ye.useEffect)((function(){var e=(0,Wt.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},We=function(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},Ke=function(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return We(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)?We(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.")}()},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Ke((0,Ye.useState)(1),2),r=n[0],o=n[1],i=(0,Ye.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Ye.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}},Ge=function(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};r.d(t,{w:function(){return o},hj:function(){return Yn},g:function(){return Ze.ExtensionData},dT:function(){return ot},Vz:function(){return Xt},NV:function(){return u},D$:function(){return zt},Ae:function(){return te},tl:function(){return ee},a$:function(){return ne},YV:function(){return oe},P3:function(){return d},yn:function(){return ie},ZR:function(){return se},BL:function(){return h},Y9:function(){return l},Yq:function(){return xe},p8:function(){return v},qd:function(){return Se},jf:function(){return Jt},mr:function(){return je},Z_:function(){return $e},t$:function(){return Ce},h0:function(){return qe},lm:function(){return ve},kP:function(){return Te},oR:function(){return Me},xQ:function(){return Ue},JF:function(){return ze},NN:function(){return He}});var Ze={};r.r(Ze),r.d(Ze,{s:function(){return Qe}});var Ye=r(2735),Qe=Ye.createContext({moduleName:""}),Je=r(9714);function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}var et=r(225),tt=r(3103),nt=r(2891);function rt(){return rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}var ot=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?g:n,o=e.children,i=e.state,a=e.style,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),c=(0,Ye.useRef)(null),s=v(t),l=s.extensions,f=s.extensionSlotModuleName,p=(0,Ye.useRef)(i);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(p.current,i)||(p.current=i);var d=(0,Ye.useMemo)((function(){return t&&r(l).map((function(e){return Ye.createElement(Qe.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},null!=o?o:Ye.createElement(Yn,{state:p.current}))}))}),[r,l,t,p.current]);return Ye.createElement("div",rt({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:m({},a,{position:"relative"})},u),d)},it=r(2788);function at(e){return(at="function"==typeof Symbol&&"symbol"==p(Symbol.iterator)?function(e){return void 0===e?"undefined":p(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":p(e)})(e)}function ut(e){return(ut="function"==typeof Symbol&&"symbol"==p(Symbol.iterator)?function(e){return void 0===e?"undefined":p(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":p(e)})(e)}var ct=null;try{ct=n(954).createContext()}catch(e){}var st={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function lt(e){return(lt="function"==typeof Symbol&&"symbol"==p(Symbol.iterator)?function(e){return void 0===e?"undefined":p(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":p(e)})(e)}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pt=r(5901),dt={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ht=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};P(this,e),this.init(t,n)}return I(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||dt,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),vt=new ht,yt=function(){function e(){P(this,e),this.observers={}}return I(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function mt(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||c(e[r],String)||"string"==typeof t[r]||c(t[r],String)?n&&(e[r]=t[r]):mt(e[r],t[r],n):e[r]=t[r]);return e}var gt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},bt="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,wt=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return P(this,t),n=L(this,ft(t).call(this)),bt&&yt.call(R(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return D(t,e),I(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),z(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),F(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var u=z(this.data,a)||{};r?mt(u,n,o):u=A({},u,n),F(this.data,a,u),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(yt),_t={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},xt={},St=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P(this,t),n=L(this,ft(t).call(this)),bt&&yt.call(R(n)),U(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,R(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=vt.create("translator"),n}return D(t,e),I(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==lt(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),u=a.key,c=a.namespaces,s=c[c.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return s+p+u}return u}var d=this.resolve(e,n),h=d&&d.res,v=d&&d.usedKey||u,y=d&&d.exactUsedKey||u,m=Object.prototype.toString.apply(h),g=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&g.indexOf(m)<0&&("string"!=typeof b||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(i){var x="[object Array]"===m,S=x?[]:{},E=x?y:v;for(var O in h)if(Object.prototype.hasOwnProperty.call(h,O)){var j="".concat(E).concat(i).concat(O);S[O]=this.translate(j,A({},n,{joinArrays:!1,ns:c})),S[O]===j&&(S[O]=h[O])}h=S}}else if(w&&"string"==typeof b&&"[object Array]"===m)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var k=!1,$=!1,C=void 0!==n.count&&"string"!=typeof n.count,P=t.hasDefaultValue(n),T=C?this.pluralResolver.getSuffix(l,n.count):"",I=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(h)&&P&&(k=!0,h=I),this.isValidLookup(h)||($=!0,h=u);var R=P&&I!==h&&this.options.updateMissing;if($||k||R){if(this.logger.log(R?"updateKey":"missingKey",l,s,u,R?I:h),i){var L=this.resolve(u,A({},n,{keySeparator:!1}));L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&N&&N[0])for(var M=0;M<N.length;M++)D.push(N[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var U=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,s,t,R?r:h,R,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,s,t,R?r:h,R,n),o.emit("missingKey",e,s,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){U([e],u+t,n["defaultValue".concat(t)]||I)}))})):U(D,u,I))}h=this.extendTranslation(h,e,n,d,r),$&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(s,":").concat(u)),$&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(A({},n,{interpolation:A({},this.options.interpolation,n.interpolation)}));var a,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s=A({},this.options.interpolation.defaultVariables,s)),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=_t.handle(p,e,t,this.options&&this.options.postProcessPassResolved?A({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,u),s=c.key;n=s;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,p=void 0!==u.context&&"string"==typeof u.context&&""!==u.context,d=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!xt["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(xt["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,c,l=s,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,s,n,e,u):(f&&(i=a.pluralResolver.getSuffix(n,u.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(u.context)),f&&d.push(l+=i));c=d.pop();)a.isValidLookup(t)||(r=c,t=a.getResource(n,e,c,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(yt),Et=function(){function e(t){P(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vt.create("languageUtils")}return I(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=K(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),Ot=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],jt={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},kt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};P(this,e),this.languageUtils=t,this.options=n,this.logger=vt.create("pluralResolver"),this.rules=q()}return I(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$t=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};P(this,e),this.logger=vt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return I(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:W,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?H(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?H(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?H(t.nestingPrefix):t.nestingPrefixEscaped||H("$t("),this.nestingSuffix=t.nestingSuffix?H(t.nestingSuffix):t.nestingSuffixEscaped||H(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,u=function(e){return e.replace(/\$/g,"$$$$")},c=this,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(c.formatSeparator)<0){var o=V(t,s,e);return c.alwaysFormat?c.format(o,void 0,n):o}var i=e.split(c.formatSeparator),a=i.shift().trim(),u=i.join(c.formatSeparator).trim();return c.format(V(t,s,a),u,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return c.escapeValue?u(c.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}c.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||c.useRawValueToEscape||(i=M(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=c.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=A({},t,u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e},i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=A({},a);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],s=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),c=l,s=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=M(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s&&(r=c.reduce((function(e,t){return i.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),Ct=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return P(this,t),o=L(this,ft(t).call(this)),bt&&yt.call(R(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=vt.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return D(t,e),I(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],u=[],c=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?a.indexOf(u)<0&&a.push(u):(o.state[u]=1,r=!1,a.indexOf(u)<0&&a.push(u),i.indexOf(u)<0&&i.push(u),c.indexOf(t)<0&&c.push(t)))})),r||u.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:u,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,c,s,l;r=n.loaded,u=i,(s=(c=B(r,[o],Object)).obj)[l=c.k]=s[l]||[],s[l].push(u),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(u,c){u&&c&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,A({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(yt),At=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(P(this,t),e=L(this,ft(t).call(this)),bt&&yt.call(R(e)),e.options=Z(n),e.services={},e.logger=vt,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),L(e,R(e));setTimeout((function(){e.init(n,r)}),0)}return e}return D(t,e),I(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=A({},G(),this.options,Z(n)),this.format=this.options.interpolation.format,r||(r=Y),!this.options.isClone){this.modules.logger?vt.init(e(this.modules.logger),this.options):vt.init(null,this.options);var o=new Et(this.options);this.store=new wt(this.options.resources,this.options);var i=this.services;i.logger=vt,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new kt(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new $t(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ct(e(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(i.languageDetector=e(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=e(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new St(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var s=N(),l=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),s.resolve(n),r(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=N();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Y),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&_t.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=N();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){var i,a;i=e,(a=o)?(n.language=a,n.languages=n.services.languageUtils.toResolveHierarchy(a),n.translator.changeLanguage(a),n.isLanguageChangingTo=void 0,n.emit("languageChanged",a),n.logger.log("languageChanged",a)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(i,(function(){return n.t.apply(n,arguments)}))}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==lt(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),u=2;u<i;u++)a[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=A({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=N();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=N();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y,o=A({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=A({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new St(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(yt),Pt=new At,Tt=Ye.createContext();function It(){return It=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Lt(e,t){return(Lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}I((function e(){P(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);var Dt,Nt,Mt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)},Ut=Pt.default||Pt,Bt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},Ft=function(e){(0,Ye.useEffect)((function(){return Ut.on("languageChanged",e.forceUpdate),function(){return Ut.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Ye.useRef)(null);if(t.current)throw t.current;if(!Ut.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw Ut.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Ye.createElement(Ye.Fragment,null,e.children)},zt=te,Vt=r(3202),Ht={},Wt=r(7641);(Nt=Dt||(Dt={})).loadPatient="loadPatient",Nt.newPatient="newPatient",Nt.loadError="patientLoadError";var Kt,qt={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(Kt||(Kt={}));var Gt={patient:null,isLoadingPatient:!0,err:null};u((0,et.getExtensionInternalStore)());var Zt,Yt,Qt,Jt=u((0,et.getExtensionStore)()),Xt=function(e){var t,n=e.privilege,r=e.children,o=function(e){if(Array.isArray(e))return e}(t=(0,Ye.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Ae(e,2);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)?Ae(e,2):void 0}}(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.")}(),i=o[0],a=o[1];return(0,Ye.useEffect)((function(){var e=(0,Wt.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return e.unsubscribe()}}),[]),i&&(0,Wt.userHasAccess)(n,i)?Ye.createElement(Ye.Fragment,null,r):null},en=r(5385),tn=function(e){return e},nn=function(){},rn=void 0,on=Object,an=function(e){return e===rn},un=function(e){return"function"==typeof e},cn=function(e,t){return on.assign({},e,t)},sn="undefined",ln=function(){return("undefined"==typeof window?"undefined":p(window))!=sn},fn=new WeakMap,pn=0,dn=function(e){var t,n,r=void 0===e?"undefined":p(e),o=e&&e.constructor,i=o==Date;if(on(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=fn.get(e))return t;if(t=++pn+"~",fn.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=dn(e[n])+",";fn.set(e,t)}if(o==on){t="#";for(var a=on.keys(e).sort();!an(n=a.pop());)an(e[n])||(t+=n+":"+dn(e[n])+",");fn.set(e,t)}}return t},hn=!0,vn=ln(),yn=("undefined"==typeof document?"undefined":p(document))!=sn,mn=vn&&window.addEventListener?window.addEventListener.bind(window):nn,gn=yn?document.addEventListener.bind(document):nn,bn=vn&&window.removeEventListener?window.removeEventListener.bind(window):nn,wn=yn?document.removeEventListener.bind(document):nn,_n={isOnline:function(){return hn},isVisible:function(){var e=yn&&document.visibilityState;return an(e)||"hidden"!==e}},xn={initFocus:function(e){return gn("visibilitychange",e),mn("focus",e),function(){wn("visibilitychange",e),bn("focus",e)}},initReconnect:function(e){var t=function(){hn=!0,e()},n=function(){hn=!1};return mn("online",t),mn("offline",n),function(){bn("online",t),bn("offline",n)}}},Sn=!ln()||"Deno"in window,En=Sn?Ye.useEffect:Ye.useLayoutEffect,On="undefined"!=typeof navigator&&navigator.connection,jn=!Sn&&On&&(["slow-2g","2g"].includes(On.effectiveType)||On.saveData),kn=function(e){if(un(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?dn(e):"",t,e?"$swr$"+e:""]},$n=new WeakMap,Cn=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=$n.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},An=0,Pn=function(){return++An},Tn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Be(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return Fe(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!an((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=kn(n),f=l[0],p=l[2],!f)return[2];if(d=$n.get(t),h=d[2],e.length<3)return[2,Cn(t,f,t.get(f),rn,rn,u,!0)];if(v=r,m=Pn(),h[f]=[m,0],g=!an(s),b=t.get(f),g&&(t.set(f,s),Cn(t,f,s)),un(v))try{v=v(t.get(f))}catch(e){y=e}return v&&un(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(un(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,cn(t.get(p),{error:y}))),h[f][1]=Pn(),[4,Cn(t,f,v,y,rn,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},In=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Rn=function(e,t){if(!$n.has(e)){var n=cn(xn,t),r={},o=Tn.bind(rn,e),i=nn;if($n.set(e,[r,{},{},{},o]),!Sn){var a=n.initFocus(setTimeout.bind(rn,In.bind(rn,r,0))),u=n.initReconnect(setTimeout.bind(rn,In.bind(rn,r,1)));i=function(){a&&a(),u&&u(),$n.delete(e)}}return[e,o,i]}return[e,$n.get(e)[4]]},Ln=Rn(new Map),Dn=Ln[0],Nn=Ln[1],Mn=cn({onLoadingSlow:nn,onSuccess:nn,onError:nn,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!an(i)&&a>i||setTimeout(r,u,o)},onDiscarded:nn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:jn?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:jn?5e3:3e3,compare:function(e,t){return dn(e)==dn(t)},isPaused:function(){return!1},cache:Dn,mutate:Nn,fallback:{}},_n),Un=function(e,t){var n=cn(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=cn(o,a))}return n},Bn=(0,Ye.createContext)({}),Fn=function(e){return un(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},zn=function(){return cn(Mn,(0,Ye.useContext)(Bn))},Vn=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Hn={dedupe:!0},Wn=(on.defineProperty((function(e){var t=e.value,n=Un((0,Ye.useContext)(Bn),t),r=t&&t.provider,o=(0,Ye.useState)((function(){return r?Rn(r(n.cache||Dn),t):rn}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),En((function(){return o?o[2]:rn}),[]),(0,Ye.createElement)(Bn.Provider,cn(e,{value:n}))}),"default",{value:Mn}),Qt=function(e,t,n){var r,o,i,a,u,c,s=n.cache,l=n.compare,f=n.fallbackData,d=n.suspense,h=n.revalidateOnMount,v=n.refreshInterval,y=n.refreshWhenHidden,m=n.refreshWhenOffline,g=$n.get(s),b=g[0],w=g[1],_=g[2],x=g[3],S=kn(e),E=S[0],O=S[1],j=S[2],k=(0,Ye.useRef)(!1),$=(0,Ye.useRef)(!1),C=(0,Ye.useRef)(E),A=(0,Ye.useRef)(t),P=(0,Ye.useRef)(n),T=function(){return P.current},I=function(){return T().isVisible()&&T().isOnline()},R=function(e){return s.set(j,cn(s.get(j),e))},L=s.get(E),D=an(f)?n.fallback[E]:f,N=an(L)?D:L,M=s.get(j)||{},U=M.error,B=!k.current,F=function(){return B&&!an(h)?h:!T().isPaused()&&(d?!an(N):an(N)||n.revalidateIfStale)},z=!(!E||!t)&&(!!M.isValidating||B&&F()),V=(r={data:N,error:U,isValidating:z},o=$,i=(0,Ye.useState)({})[1],a=(0,Ye.useRef)(r),u=(0,Ye.useRef)({data:!1,error:!1,isValidating:!1}),c=(0,Ye.useCallback)((function(e){var t=!1,n=a.current;for(var r in e){var c=r;n[c]!==e[c]&&(n[c]=e[c],u.current[c]&&(t=!0))}t&&!o.current&&i({})}),[]),En((function(){a.current=r})),[a,u.current,c]),H=V[0],W=V[1],K=V[2],q=(0,Ye.useCallback)((function(e){return Be(void 0,void 0,void 0,(function(){var t,r,o,i,a,u,c,f,p,d,h,v,y;return Fe(this,(function(m){switch(m.label){case 0:if(t=A.current,!E||!t||$.current||T().isPaused())return[2,!1];i=!0,a=e||{},u=!x[E]||!a.dedupe,c=function(){return!$.current&&E===C.current&&k.current},f=function(){var e=x[E];e&&e[1]===o&&delete x[E]},p={isValidating:!1},d=function(){R({isValidating:!1}),c()&&K(p)},R({isValidating:!0}),K({isValidating:!0}),m.label=1;case 1:return m.trys.push([1,3,,4]),u&&(Cn(s,E,H.current.data,H.current.error,!0),n.loadingTimeout&&!s.get(E)&&setTimeout((function(){i&&c()&&T().onLoadingSlow(E,n)}),n.loadingTimeout),x[E]=[t.apply(void 0,O),Pn()]),y=x[E],r=y[0],o=y[1],[4,r];case 2:return r=m.sent(),u&&setTimeout(f,n.dedupingInterval),x[E]&&x[E][1]===o?(R({error:rn}),p.error=rn,h=_[E],!an(h)&&(o<=h[0]||o<=h[1]||0===h[1])?(d(),u&&c()&&T().onDiscarded(E),[2,!1]):(l(H.current.data,r)?p.data=H.current.data:p.data=r,l(s.get(E),r)||s.set(E,r),u&&c()&&T().onSuccess(r,E,n),[3,4])):(u&&c()&&T().onDiscarded(E),[2,!1]);case 3:return v=m.sent(),f(),T().isPaused()||(R({error:v}),p.error=v,u&&c()&&(T().onError(v,E,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||un(n.shouldRetryOnError)&&n.shouldRetryOnError(v))&&I()&&T().onErrorRetry(v,E,n,q,{retryCount:(a.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return i=!1,d(),c()&&u&&Cn(s,E,p.data,p.error,!1),[2,!0]}}))}))}),[E]),G=(0,Ye.useCallback)(Tn.bind(rn,s,(function(){return C.current})),[]);if(En((function(){A.current=t,P.current=n})),En((function(){if(E){var e=E!==C.current,t=q.bind(rn,Hn),n=0,r=Vn(E,w,(function(e,t,n){K(cn({error:t,isValidating:n},l(H.current.data,e)?rn:{data:e}))})),o=Vn(E,b,(function(e){if(0==e){var r=Date.now();T().revalidateOnFocus&&r>n&&I()&&(n=r+T().focusThrottleInterval,t())}else if(1==e)T().revalidateOnReconnect&&I()&&t();else if(2==e)return q()}));return $.current=!1,C.current=E,k.current=!0,e&&K({data:N,error:U,isValidating:z}),F()&&(an(N)||Sn?t():(i=t,ln()&&p(window.requestAnimationFrame)!=sn?window.requestAnimationFrame(i):setTimeout(i,1))),function(){$.current=!0,r(),o()}}var i}),[E,q]),En((function(){var e,t=function(){var t=un(v)?v(N):v;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){H.current.error||!y&&!T().isVisible()||!m&&!T().isOnline()?t():q(Hn).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[v,y,m,q]),(0,Ye.useDebugValue)(N),d&&an(N)&&E)throw A.current=t,P.current=n,$.current=!1,an(U)?q(Hn):U;return{mutate:G,get data(){return W.data=!0,N},get error(){return W.error=!0,U},get isValidating(){return W.isValidating=!0,z}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=zn(),r=Fn(e),o=r[0],i=r[1],a=r[2],u=Un(n,a),c=Qt,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),Kn=r(7530),qn=r.n(Kn),Gn=r(4332),Zn=r.n(Gn);qn().extend(Zn());var Yn=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Ye.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Ge(e,2);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)?Ge(e,2):void 0}}(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.")}(),i=o[0],a=o[1],u=(0,Ye.useContext)(Qe).extension,c=(0,Ye.useCallback)((function(e){a(e)}),[]);(0,Ye.useEffect)((function(){if(null!=i&&u)return(0,et.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n)}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]);var s=Ye.createElement("div",{ref:c,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(s,u):s}},5385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},1645:function(e,t,n){"use strict";var r=function(e,t){for(var n in t)e[n]=t[n];return e},o=function(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function o(n,o,i){e=o?n:r(r({},e),n);for(var a=t,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}},i=function(e,t){var n=l[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=o(t);return l[e]={value:r,active:!0},r},a=function(e,t){var n=l[e];if(!n){var r=o(t);return l[e]={value:r,active:!1},r}return n.value},u=function(){return a("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};n.d(t,{aB:function(){return s.AppState},jk:function(){return i},W5:function(){return u},zJ:function(){return a},se:function(){return c}});var s={};n.r(s),n.d(s,{jk:function(){return i},W5:function(){return u},zJ:function(){return a},se:function(){return c}});var l={}},6353:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!G(t))?setTimeout((function(){Z.next(function(e){for(var t=arguments,n=function(n){var o=null!=t[n]?t[n]:{},i=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),i.forEach((function(t){r(e,t,o[t])}))},o=1;o<arguments.length;o++)n(o);return e}({},e,{id:Y++}))}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")},i=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},a=function(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!G(t))?setTimeout((function(){Q.next(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){i(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},e,{id:J++}))}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")},u=function(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},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},l=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){s(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},f=function(e){var t,n=ee.getState(),r=[e].concat(function(e){if(Array.isArray(e))return u(e)}(t=n.modalStack)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):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.")}());ee.setState(l({},n,{modalStack:r}))},p=function(e){var t=ee.getState(),n=t.modalStack.map((function(t){return t===e?l({},t,{state:"TO_BE_DELETED"}):t}));ee.setState(l({},t,{modalStack:n}))},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=function(){var e=ee.getState().modalStack.find((function(e){return e.onClose===n}));e&&p(e)};return f({state:"NEW",onClose:n,extensionId:e,props:l({extensionId:e,close:r},t)}),r},h=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,te.Z)(e,t)},v=function(e){return"/"===e.charAt(0)},y=function(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()},m=function(e,t){if(!e)throw new Error("Invariant failed")},g=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},b=function(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=ne({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw c(e,URIError)?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&v(e),a=t&&v(t),u=i||a;if(e&&v(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var c=o[o.length-1];n="."===c||".."===c||""===c}else n=!1;for(var s=0,l=o.length;l>=0;l--){var f=o[l];"."===f?y(o,l):".."===f?(y(o,l),s++):s&&(y(o,l),s--)}if(!u)for(;s--;s)o.unshift("..");!u||""===o[0]||o[0]&&v(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},w=function(e,t){t(window.confirm(e))},_=function(){try{return window.history.state||{}}catch(e){return{}}},x=function(e){void 0===e&&(e={}),re||m(!1);var t,n,r=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,u=a.forceRefresh,c=void 0!==u&&u,s=a.getUserConfirmation,l=void 0===s?w:s,f=a.keyLength,p=void 0===f?6:f,d=e.basename?function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}("/"===(n=e.basename).charAt(0)?n:"/"+n):"";function h(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return d&&(i=function(e,t){return r=t,0===(n=e).toLowerCase().indexOf(r.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(r.length))?e.substr(t.length):e;var n,r}(i,d)),b(i,r,n)}function v(){return Math.random().toString(36).substr(2,p)}var y,x,S=(y=null,x=[],{setPrompt:function(e){return y=e,function(){y===e&&(y=null)}},confirmTransitionTo:function(e,t,n,r){if(null!=y){var o="function"==typeof y?y(e,t):y;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(e){var t=!0;function n(){t&&e.apply(void 0,arguments)}return x.push(n),function(){t=!1,x=x.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];x.forEach((function(e){return e.apply(void 0,t)}))}});function E(e){ne(D,e),D.length=r.length,S.notifyListeners(D.location,D.action)}function O(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||$(h(e.state))}function j(){$(h(_()))}var k=!1;function $(e){k?(k=!1,E()):S.confirmTransitionTo(e,"POP",l,(function(t){t?E({action:"POP",location:e}):function(e){var t=D.location,n=A.indexOf(t.key);-1===n&&(n=0);var r=A.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(k=!0,T(o))}(e)}))}var C=h(_()),A=[C.key];function P(e){return d+g(e)}function T(e){r.go(e)}var I=0;function R(e){1===(I+=e)&&1===e?(window.addEventListener(oe,O),i&&window.addEventListener(ie,j)):0===I&&(window.removeEventListener(oe,O),i&&window.removeEventListener(ie,j))}var L=!1,D={length:r.length,action:"POP",location:C,createHref:P,push:function(e,t){var n="PUSH",i=b(e,t,v(),D.location);S.confirmTransitionTo(i,n,l,(function(e){if(e){var t=P(i),a=i.key,u=i.state;if(o)if(r.pushState({key:a,state:u},null,t),c)window.location.href=t;else{var s=A.indexOf(D.location.key),l=A.slice(0,s+1);l.push(i.key),A=l,E({action:n,location:i})}else window.location.href=t}}))},replace:function(e,t){var n="REPLACE",i=b(e,t,v(),D.location);S.confirmTransitionTo(i,n,l,(function(e){if(e){var t=P(i),a=i.key,u=i.state;if(o)if(r.replaceState({key:a,state:u},null,t),c)window.location.replace(t);else{var s=A.indexOf(D.location.key);-1!==s&&(A[s]=i.key),E({action:n,location:i})}else window.location.replace(t)}}))},go:T,goBack:function(){T(-1)},goForward:function(){T(1)},block:function(e){void 0===e&&(e=!1);var t=S.setPrompt(e);return L||(R(1),L=!0),function(){return L&&(L=!1,R(-1)),t()}},listen:function(e){var t=S.appendListener(e);return R(1),function(){R(-1),t()}}};return D},S=function(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}},E=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},O=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},j=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?O(Object(r),!0).forEach((function(t){k(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},k=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},$=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},C=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?$(Object(r),!0).forEach((function(t){A(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},A=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(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.")}()},T=function(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},I=function(e){var t=e.name,n=e.basePath;nt.setState({slotName:t,basePath:n})},R=function(e){nt.getState().slotName==e&&nt.setState({slotName:null})};n.d(t,{iW:function(){return L.InlineNotificationType},cW:function(){return rt},MK:function(){return L.NotificationDescriptor},fU:function(){return D.ToastDescriptor},yQ:function(){return D.ToastNotificationMeta},pC:function(){return D.ToastType},VM:function(){return I},K4:function(){return d},c0:function(){return o},CF:function(){return a},$d:function(){return R}});var L={};n.r(L);var D={};n.r(D);var N=n(2735),M=(n(2788),n(7860)),U=n(9295),B=n(606),F=n(175),z=n(6575),V=n(6905),H=n(7840),W=n(9494),K=n(8396),q=Object.prototype.hasOwnProperty,G=function(e){if(null==e)return!0;if((0,V.Z)(e)&&((0,z.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,H.Z)(e)||(0,K.Z)(e)||(0,F.Z)(e)))return!e.length;var t=(0,B.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,W.Z)(e))return!(0,U.Z)(e).length;for(var n in e)if(q.call(e,n))return!1;return!0},Z=new M.xQ,Y=0,Q=new M.xQ,J=0;n(225);var X=n(5385),ee=(0,X.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});window.getComputedStyle(document.body).overflow;var te=n(5901);function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ne.apply(this,arguments)}var re=!("undefined"==typeof window||!window.document||!window.document.createElement),oe="popstate",ie="hashchange",ae=n(216),ue=n.n(ae),ce=1073741823,se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},le=N.createContext||function(e,t){var n,r,o="__create-react-context-"+(se.__global_unique_id__=(se.__global_unique_id__||0)+1)+"__",i=function(e){var n=function(){var t;return(t=e.apply(this,arguments)||this).emitter=S(t.props.value),t};h(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):ce,0!=(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(N.Component);i.childContextTypes=((n={})[o]=ue().object.isRequired,n);var a=function(t){var n=function(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e};h(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?ce:t},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?ce:e},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(N.Component);return a.contextTypes=((r={})[o]=ue().object,r),{Provider:i,Consumer:a}},fe=le,pe=n(2816),de=n.n(pe);n(2594),n(6058);var he=function(e){var t=fe();return t.displayName=e,t},ve=he("Router-History"),ye=he("Router"),me=function(e){var t=function(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n};h(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return N.createElement(ye.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},N.createElement(ve.Provider,{children:this.props.children||null,value:this.props.history}))},t}(N.Component);N.Component,N.Component;var ge={},be=0;N.Component,N.Component,N.Component,N.useContext;var we,_e,xe=(we=N.Component,_e=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=we.call.apply(we,[this].concat(n))||this).history=x(e.props),e},h(_e,we),_e.prototype.render=function(){return N.createElement(me,{history:this.history,children:this.props.children})},_e);N.Component;var Se=function(e,t){return"function"==typeof e?e(t):e},Ee=function(e,t){return"string"==typeof e?b(e,null,null,t):e},Oe=function(e){return e},je=N.forwardRef;void 0===je&&(je=Oe);var ke=je((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=E(e,["innerRef","navigate","onClick"]),a=i.target,u=ne({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=Oe!==je&&t||n,N.createElement("a",u)})),$e=je((function(e,t){var n=e.component,r=void 0===n?ke:n,o=e.replace,i=e.to,a=e.innerRef,u=E(e,["component","replace","to","innerRef"]);return N.createElement(ye.Consumer,null,(function(e){e||m(!1);var n=e.history,c=Ee(Se(i,e.location),e.location),s=c?n.createHref(c):"",l=ne({},u,{href:s,navigate:function(){var t=Se(i,e.location),r=g(e.location)===g(Ee(t));(o||r?n.replace:n.push)(t)}});return Oe!==je?l.ref=t||a:l.innerRef=a,N.createElement(r,l)}))})),Ce=function(e){return e},Ae=N.forwardRef;void 0===Ae&&(Ae=Ce),Ae((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,o=e.activeClassName,i=void 0===o?"active":o,a=e.activeStyle,u=e.className,c=e.exact,s=e.isActive,l=e.location,f=e.sensitive,p=e.strict,d=e.style,h=e.to,v=e.innerRef,y=E(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return N.createElement(ye.Consumer,null,(function(e){e||m(!1);var n=l||e.location,o=Ee(Se(h,n),n),g=o.pathname,b=g&&g.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?function(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,u=void 0!==a&&a,c=n.sensitive,s=void 0!==c&&c;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=ge[n]||(ge[n]={});if(r[e])return r[e];var o=[],i={regexp:de()(e,o,t),keys:o};return be<1e4&&(r[e]=i,be++),i}(n,{end:i,strict:u,sensitive:s}),o=r.regexp,a=r.keys,c=o.exec(e);if(!c)return null;var l=c[0],f=c.slice(1),p=e===l;return i&&!p?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}(n.pathname,{path:b,exact:c,sensitive:f,strict:p}):null,_=!!(s?s(w,n):w),x="function"==typeof u?u(_):u,S="function"==typeof d?d(_):d;_&&(x=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(x,i),S=ne({},S,a));var E=ne({"aria-current":_&&r||null,className:x,style:S,to:o},y);return Ce!==Ae?E.ref=t||v:E.innerRef=v,N.createElement($e,E)}))}));var Pe,Te=n(4077),Ie=n(841),Re=n.n(Ie),Le=(Pe={"aria-label":ue().string,"aria-labelledby":ue().string},Object.keys(Pe).reduce((function(e,t){return j(j({},e),{},k({},t,(n=Pe[t],function(e,t,r){for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return n.apply(void 0,[e,t,r].concat(i))})));var n}),{}));function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(this,arguments)}var Ne="bx",Me=N.forwardRef((function(e,t){var n,r,o=e.expanded,i=e.defaultExpanded,a=e.isChildOfHeader,u=e["aria-label"],c=e["aria-labelledby"],s=e.children,l=e.onToggle,f=e.className,p=e.isFixedNav,d=e.isRail,h=e.isPersistent,v=e.addFocusListeners,y=e.addMouseListeners,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["expanded","defaultExpanded","isChildOfHeader","aria-label","aria-labelledby","children","onToggle","className","isFixedNav","isRail","isPersistent","addFocusListeners","addMouseListeners"]),g=(0,N.useRef)(void 0!==o).current,b=P((0,N.useState)(i),2),w=b[0],_=b[1],x=P((0,N.useState)(i),2),S=x[0],E=x[1],O=g?o:w,j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!O;g||_(t),l&&l(e,t),(g||d)&&E(t)},k={"aria-label":u,"aria-labelledby":c},$=Re()((A(n={},"".concat(Ne,"--side-nav"),!0),A(n,"".concat(Ne,"--side-nav--expanded"),O||S),A(n,"".concat(Ne,"--side-nav--collapsed"),!O&&p),A(n,"".concat(Ne,"--side-nav--rail"),d),A(n,f,!!f),A(n,"".concat(Ne,"--side-nav--ux"),a),A(n,"".concat(Ne,"--side-nav--hidden"),!h),n)),C=Re()((A(r={},"".concat(Ne,"--side-nav__overlay"),!0),A(r,"".concat(Ne,"--side-nav__overlay-active"),O||S),r)),T=s;d&&(T=N.Children.map(s,(function(e){var t=g&&S||O;return N.cloneElement(e,{isSideNavExpanded:t})})));var I={};return v&&(I.onFocus=function(e){e.currentTarget.contains(e.relatedTarget)||j(e,!0)},I.onBlur=function(e){e.currentTarget.contains(e.relatedTarget)||j(e,!1)}),y&&d&&(I.onMouseEnter=function(){return j(!0,!0)},I.onMouseLeave=function(){return j(!1,!1)}),N.createElement(N.Fragment,null,p?null:N.createElement("div",{className:C}),N.createElement("nav",De({"aria-hidden":!O,ref:t,className:"".concat(Ne,"--side-nav__navigation ").concat($)},k,I,m),T))}));Me.defaultProps={defaultExpanded:!1,isChildOfHeader:!0,isFixedNav:!1,isPersistent:!0,addFocusListeners:!0,addMouseListeners:!0},Me.propTypes=C(C({},Le),{},{addFocusListeners:ue().bool,addMouseListeners:ue().bool,className:ue().string,defaultExpanded:ue().bool,expanded:ue().bool,isChildOfHeader:ue().bool,isFixedNav:ue().bool,isPersistent:ue().bool,isRail:ue().bool,onToggle:ue().func,translateById:ue().func});var Ue=Me,Be=n(487),Fe=n.n(Be),ze=n(631),Ve=n.n(ze),He=n(2052),We=n.n(He),Ke=n(4010),qe=n.n(Ke),Ge=n(1469),Ze=n.n(Ge),Ye=n(9329),Qe=n.n(Ye),Je=n(6618),Xe={};Xe.styleTagTransform=Qe(),Xe.setAttributes=qe(),Xe.insert=We().bind(null,"head"),Xe.domAPI=Ve(),Xe.insertStyleElement=Ze(),Fe()(Je.Z,Xe);var et=Je.Z&&Je.Z.locals?Je.Z.locals:void 0;function tt(){return tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}var nt=(0,X.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),rt=N.forwardRef((function(e,t){var n,r=(0,Te.useStore)(nt),o=r.slotName,i=r.basePath,a=null!==(n=window.location)&&void 0!==n?n:{pathname:""};return N.createElement(xe,null,N.createElement(Ue,tt({ref:t,expanded:!0,"aria-label":"Left navigation",className:et.leftNav},e),N.createElement(Te.ExtensionSlot,{extensionSlotName:"global-nav-menu-slot"}),o?N.createElement(Te.ExtensionSlot,{extensionSlotName:o,state:{basePath:i,currentPath:a}}):null))}))},7968:function(e,t,n){var r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},5901:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return r}})},6763:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(682),o=n(658),i=(0,r.Z)(o.Z,"Map")},7851:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=n(658).Z.Symbol},963:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0,c=Object.prototype.toString,s=r.Z?r.Z.toStringTag:void 0,l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}(e):(t=e,c.call(t));var t}},9295:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9494),o=(0,n(6899).Z)(Object.keys,Object),i=Object.prototype.hasOwnProperty,a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},682:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r,o=n(3200),i=n(658).Z["__core-js_shared__"],a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",u=n(7275),c=n(9441),s=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!(0,u.Z)(e)||(t=e,a&&a in t))&&((0,o.Z)(e)?h:s).test((0,c.Z)(e));var t}(r)?r:void 0}},606:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(682),o=n(658),i=(0,r.Z)(o.Z,"DataView"),a=n(6763),u=(0,r.Z)(o.Z,"Promise"),c=(0,r.Z)(o.Z,"Set"),s=(0,r.Z)(o.Z,"WeakMap"),l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",m=(0,f.Z)(i),g=(0,f.Z)(a.Z),b=(0,f.Z)(u),w=(0,f.Z)(c),_=(0,f.Z)(s),x=l.Z;(i&&x(new i(new ArrayBuffer(1)))!=y||a.Z&&x(new a.Z)!=p||u&&x(u.resolve())!=d||c&&x(new c)!=h||s&&x(new s)!=v)&&(x=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 m:return y;case g:return p;case b:return d;case w:return h;case _:return v}return t});var S=x},9494:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=Object.prototype,o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e,t){return function(n){return e(t(n))}}},658:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.Z||o||Function("return this")()},9441:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=Function.prototype.toString,o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},175:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(963),o=n(4897),i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)},a=Object.prototype,u=a.hasOwnProperty,c=a.propertyIsEnumerable,s=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&u.call(e,"callee")&&!c.call(e,"callee")},l=s},6575:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=Array.isArray},6905:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3200),o=n(3492),i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:function(n,r,o){"use strict";o.d(r,{Z:function(){return s}});var i=o(658),a=t&&!t.nodeType&&t,u=a&&e&&!e.nodeType&&e,c=u&&u.exports===a?i.Z.Buffer:void 0,s=(c?c.isBuffer:void 0)||function(){return!1}},3202:function(e,t,n){"use strict";var r=function(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])}},o=function(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])}},i=function(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=function(e){var t=this.__data__=new d(e);this.size=t.size},u=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new w;++t<n;)this.add(e[t])};n.d(t,{Z:function(){return Q}});var s=function(e,t){return e===t||e!=e&&t!=t},l=function(e,t){for(var n=e.length;n--;)if(s(e[n][0],t))return n;return-1},f=Array.prototype.splice;r.prototype.clear=function(){this.__data__=[],this.size=0},r.prototype.delete=function(e){var t=this.__data__,n=l(t,e);return!(n<0||(n==t.length-1?t.pop():f.call(t,n,1),--this.size,0))},r.prototype.get=function(e){var t=this.__data__,n=l(t,e);return n<0?void 0:t[n][1]},r.prototype.has=function(e){return l(this.__data__,e)>-1},r.prototype.set=function(e,t){var n=this.__data__,r=l(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var d=r,h=n(6763),v=(0,n(682).Z)(Object,"create"),y=Object.prototype.hasOwnProperty,m=Object.prototype.hasOwnProperty;o.prototype.clear=function(){this.__data__=v?v(null):{},this.size=0},o.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},o.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return y.call(t,e)?t[e]:void 0},o.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:m.call(t,e)},o.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this};var g=o,b=function(e,t){var n,r,o=e.__data__;return("string"==(r=p(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};i.prototype.clear=function(){this.size=0,this.__data__={hash:new g,map:new(h.Z||d),string:new g}},i.prototype.delete=function(e){var t=b(this,e).delete(e);return this.size-=t?1:0,t},i.prototype.get=function(e){return b(this,e).get(e)},i.prototype.has=function(e){return b(this,e).has(e)},i.prototype.set=function(e,t){var n=b(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var w=i;a.prototype.clear=function(){this.__data__=new d,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(c(n,d)){var r=n.__data__;if(!h.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new w(r)}return n.set(e,t),this.size=n.size,this};var _=a;u.prototype.add=u.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},u.prototype.has=function(e){return this.__data__.has(e)};var x=u,S=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},E=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new x:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!S(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},O=n(7851),j=n(658).Z.Uint8Array,k=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},$=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},C=O.Z?O.Z.prototype:void 0,A=C?C.valueOf:void 0,P=n(6575),T=Object.prototype.propertyIsEnumerable,I=Object.getOwnPropertySymbols,R=I?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(I(e),(function(t){return T.call(e,t)})))}:function(){return[]},L=n(175),D=n(7840),N=/^(?:0|[1-9]\d*)$/,M=n(8396),U=Object.prototype.hasOwnProperty,B=n(9295),F=n(6905),z=function(e){return r=R,t=n=e,o=(0,F.Z)(t)?function(e,t){var n,r,o,i=(0,P.Z)(e),a=!i&&(0,L.Z)(e),u=!i&&!a&&(0,D.Z)(e),c=!i&&!a&&!u&&(0,M.Z)(e),s=i||a||u||c,l=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],f=l.length;for(var d in e)!U.call(e,d)||s&&("length"==d||u&&("offset"==d||"parent"==d)||c&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=f,o=void 0===(n=d)?"undefined":p(n),(r=null==r?9007199254740991:r)&&("number"==o||"symbol"!=o&&N.test(n))&&n>-1&&n%1==0&&n<r))||l.push(d);return l}(t):(0,B.Z)(t),(0,P.Z)(n)?o:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(o,r(n));var t,n,r,o},V=Object.prototype.hasOwnProperty,H=n(606),W="[object Arguments]",K="[object Array]",q="[object Object]",G=Object.prototype.hasOwnProperty,Z=n(4897),Y=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,Z.Z)(t)&&!(0,Z.Z)(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=(0,P.Z)(e),u=(0,P.Z)(t),l=a?K:(0,H.Z)(e),f=u?K:(0,H.Z)(t),p=(l=l==W?q:l)==q,d=(f=f==W?q:f)==q,h=l==f;if(h&&(0,D.Z)(e)){if(!(0,D.Z)(t))return!1;a=!0,p=!1}if(h&&!p)return i||(i=new _),a||(0,M.Z)(e)?E(e,t,n,r,o,i):function(e,t,n,r,o,i,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||!i(new j(e),new j(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+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=k;case"[object Set]":var c=1&r;if(u||(u=$),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var f=E(u(e),u(t),r,o,i,a);return a.delete(e),f;case"[object Symbol]":if(A)return A.call(e)==A.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var v=p&&G.call(e,"__wrapped__"),y=d&&G.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return i||(i=new _),o(m,g,n,r,i)}}return!!h&&(i||(i=new _),function(e,t,n,r,o,i){var a=1&n,u=z(e),s=u.length;if(s!=z(t).length&&!a)return!1;for(var l=s;l--;){var f=u[l];if(!(a?f in t:V.call(t,f)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var v=a;++l<s;){var y=e[f=u[l]],m=t[f];if(r)var g=a?r(m,y,f,t,e,i):r(y,m,f,e,t,i);if(!(void 0===g?y===m||o(y,m,n,r,i):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&c(b,b)&&"function"==typeof w&&c(w,w)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}(t,n,r,o,e,i))},Q=function(e,t){return Y(e,t)}},3200:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(963),o=n(7275),i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){var t=void 0===e?"undefined":p(e);return null!=e&&("object"==t||"function"==t)}},4897:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){return null!=e&&"object"==typeof e}},8396:function(n,r,o){"use strict";o.d(r,{Z:function(){return y}});var i=o(963),a=o(3492),u=o(4897),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var s,l=o(5852),f=t&&!t.nodeType&&t,p=f&&e&&!e.nodeType&&e,d=p&&p.exports===f&&l.Z.process,h=function(){try{return p&&p.require&&p.require("util").types||d&&d.binding&&d.binding("util")}catch(e){}}(),v=h&&h.isTypedArray,y=v?(s=v,function(e){return s(e)}):function(e){return(0,u.Z)(e)&&(0,a.Z)(e.length)&&!!c[(0,i.Z)(e)]}}},d={};function h(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,h),n.loaded=!0,n.exports}h.y=i,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;h.g.importScripts&&(e=h.g.location+"");var t=h.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=e}();var v={};return(0,h(7968).s)(1),function(){"use strict";var e=function(e){["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","clearCurrentUser","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getSessionStore","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(o[e]=function(){return r[e]})},t=function(e){["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","clearCurrentUser","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getSessionStore","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","oneOf","provide","validator","validators"].indexOf(e)<0&&(o[e]=function(){return u[e]})};h.r(v),h.d(v,{AppState:function(){return d.aB},AssignedExtension:function(){return s.pv},CancelLoading:function(){return s.x9},ConfigStore:function(){return a.JU},ConfigurableLink:function(){return p.w},ConnectedExtension:function(){return s.uP},ConnectivityChangedEvent:function(){return l.ac},Extension:function(){return p.hj},ExtensionData:function(){return p.g},ExtensionMeta:function(){return s.uu},ExtensionRegistration:function(){return s.tj},ExtensionSlot:function(){return p.dT},ExtensionSlotState:function(){return s.u_},ExtensionStore:function(){return s.qN},InlineNotificationType:function(){return y.iW},LeftNavMenu:function(){return y.cW},NotificationDescriptor:function(){return y.MK},OfflineMode:function(){return f.iC},OfflineModeResult:function(){return f.Vm},OpenmrsFetchError:function(){return n.nF},PrecacheStaticDependenciesEvent:function(){return l.hM},QueueItemDescriptor:function(){return f.Cg},ShowNotificationEvent:function(){return l.Kj},ShowToastEvent:function(){return l.P3},SyncItem:function(){return f.we},SyncProcessOptions:function(){return f.Ug},ToastDescriptor:function(){return y.fU},ToastNotificationMeta:function(){return y.yQ},ToastType:function(){return y.pC},Type:function(){return a.Dy},UserHasAccess:function(){return p.Vz},VisitMode:function(){return n.u4},VisitStatus:function(){return n.Rx},attach:function(){return s.ub},backendDependencies:function(){return n.Wf},beginEditSynchronizationItem:function(){return f.jp},canBeginEditSynchronizationItemsOfType:function(){return f.Qd},clearCurrentUser:function(){return n.Ze},createGlobalStore:function(){return d.jk},createUseStore:function(){return p.NV},defaultVisitCustomRepresentation:function(){return n.I$},defineConfigSchema:function(){return a.SH},defineExtensionConfigSchema:function(){return a.Tj},deleteSynchronizationItem:function(){return f.Gy},detach:function(){return s.og},detachAll:function(){return s.lW},fetchCurrentPatient:function(){return n.Vy},fhir:function(){return n.N$},fhirBaseUrl:function(){return n.DN},generateOfflineUuid:function(){return f.sF},getAppState:function(){return d.W5},getAssignedExtensions:function(){return s.h6},getAsyncExtensionLifecycle:function(){return p.D$},getAsyncLifecycle:function(){return p.Ae},getConfig:function(){return a.iE},getConfigStore:function(){return a.pR},getConnectedExtensions:function(){return s.Kq},getCurrentOfflineMode:function(){return f.vm},getCurrentUser:function(){return n.ts},getDynamicOfflineDataEntries:function(){return f.xA},getDynamicOfflineDataEntriesFor:function(){return f.H_},getDynamicOfflineDataHandlers:function(){return f.Ui},getExtensionNameFromId:function(){return s.EB},getExtensionStore:function(){return s.yw},getFullSynchronizationItems:function(){return f.D2},getFullSynchronizationItemsFor:function(){return f.WB},getGlobalStore:function(){return d.zJ},getLifecycle:function(){return p.tl},getLocations:function(){return n.JC},getLoggedInUser:function(){return n.r},getOfflineDb:function(){return f.aA},getOfflinePatientDataStore:function(){return f.k1},getSessionLocation:function(){return n.WK},getSessionStore:function(){return n.KJ},getStartedVisit:function(){return n.$X},getSyncLifecycle:function(){return p.a$},getSynchronizationItem:function(){return f.TI},getSynchronizationItems:function(){return f.Q2},getVisitTypes:function(){return n.P9},getVisitsForPatient:function(){return n.nx},inRange:function(){return a.Z2},interpolateString:function(){return a.IT},interpolateUrl:function(){return a.ll},isOfflineUuid:function(){return f.z7},isUrl:function(){return a.CB},isUrlWithTemplateParameters:function(){return a.gZ},makeUrl:function(){return n.bf},messageOmrsServiceWorker:function(){return f.gp},navigate:function(){return a.c4},offlineUuidPrefix:function(){return f.a7},omrsOfflineCachingStrategyHttpHeaderName:function(){return f.Rz},omrsOfflineResponseBodyHttpHeaderName:function(){return f.QI},omrsOfflineResponseStatusHttpHeaderName:function(){return f.$9},oneOf:function(){return a.kw},openmrsFetch:function(){return n.vb},openmrsObservableFetch:function(){return n.uj},provide:function(){return a.JJ},putDynamicOfflineData:function(){return f.cV},putDynamicOfflineDataFor:function(){return f.fR},queueSynchronizationItem:function(){return f.X2},refetchCurrentUser:function(){return n.VJ},registerExtension:function(){return s.ix},registerExtensionSlot:function(){return s.Qq},registerOfflinePatientHandler:function(){return f.dt},removeDynamicOfflineData:function(){return f.pO},removeDynamicOfflineDataFor:function(){return f.ME},renderExtension:function(){return s.H8},saveVisit:function(){return n.bX},sessionEndpoint:function(){return n.z$},setLeftNav:function(){return y.VM},setSessionLocation:function(){return n.jK},setupDynamicOfflineDataHandler:function(){return f.Xc},setupOfflineSync:function(){return f.Kb},showModal:function(){return y.K4},showNotification:function(){return y.c0},showToast:function(){return y.CF},subscribeConnectivity:function(){return l.BW},subscribeConnectivityChanged:function(){return l.XS},subscribeNotificationShown:function(){return l.NQ},subscribePrecacheStaticDependencies:function(){return l.dY},subscribeTo:function(){return d.se},subscribeToastShown:function(){return l.id},syncAllDynamicOfflineData:function(){return f.ps},syncDynamicOfflineData:function(){return f.mF},syncOfflinePatientData:function(){return f.MO},toLocationObject:function(){return n.Lq},toVisitTypeObject:function(){return n.VF},unsetLeftNav:function(){return y.$d},updateVisit:function(){return n.ym},useAssignedExtensionIds:function(){return p.YV},useAssignedExtensions:function(){return p.P3},useBodyScrollLock:function(){return p.yn},useConfig:function(){return p.ZR},useConnectedExtensions:function(){return p.BL},useConnectivity:function(){return p.Y9},useCurrentPatient:function(){return p.Yq},useExtensionSlot:function(){return p.p8},useExtensionSlotMeta:function(){return p.qd},useExtensionStore:function(){return p.jf},useLayoutType:function(){return p.mr},useLocations:function(){return p.Z_},useOnClickOutside:function(){return p.t$},usePagination:function(){return p.h0},usePatient:function(){return p.lm},useSession:function(){return p.kP},useStore:function(){return p.oR},useStoreWithActions:function(){return p.xQ},useVisit:function(){return p.JF},useVisitTypes:function(){return p.NN},userHasAccess:function(){return n.y9},validator:function(){return a.sC},validators:function(){return a.z2}});var n=h(8461),r=h(6066),o={};for(var i in r)e(i);h.d(v,o);var a=h(3373),u=h(674);for(var c in o={},u)t(c);h.d(v,o);var s=h(6856),l=h(2034),f=h(8082),p=h(5309),d=h(1645),y=h(6353)}(),v}())}}}))},991:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'},662:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'},865:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'},646:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'},509:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'},250:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'},142:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'},451:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'},61:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'},76:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'},600:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'},40:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'},714:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'},752:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>'},862:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'},601:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'},879:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'},739:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'},524:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'},787:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'},592:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'},141:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'},647:e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'},885:e=>{"use strict";e.exports='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n'},575:e=>{"use strict";e.exports='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n'},93:e=>{"use strict";e.exports='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n'},839:e=>{"use strict";e.exports='<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'},45:e=>{"use strict";e.exports=n},740:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=a},792:e=>{"use strict";e.exports=u}},c={};function s(t){var n=c[t];if(void 0!==n)return n.exports;var r=c[t]={id:t,loaded:!1,exports:{}};return e[t](r,r.exports,s),r.loaded=!0,r.exports}s.y=t,s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})();var l={};return(0,s(584).s)(1),(()=>{"use strict";var e=s(885),t=s(93),n=s(575),r=s(839),o=document.createElement("div"),i=function(){document.body.appendChild(o)};function a(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,o.appendChild(n))}o.id="omrs-svgs-container",o.style.display="none","complete"===document.readyState?i():window.addEventListener("load",i);var u=s(141),c=s(739),l=s(787),f=s(865),p=s(509),d=s(646),h=s(250),v=s(76),y=s(600),m=s(40),g=s(61),b=s(592),w=s(862),_=s(714),x=s(601),S=s(142),E=s(991),O=s(662),j=s(524),k=s(451),$=s(647),C=s(879),A=s(752),P=s(78);Number.MAX_SAFE_INTEGER,s(954);var T=s(792),I={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?I.enableCssCustomProperties=!0:I.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?I.enableUseControlledStateWithValue=!0:I.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?I.enableCssGrid=!0:I.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?I.enableV11Release=!0:I.enableV11Release=!1}catch(e){I.enableCssCustomProperties=!1,I.enableUseControlledStateWithValue=!1,I.enableCssGrid=!1,I.enableV11Release=!1}var R=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:I.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:I.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:I.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:I.enableV11Release}];function L(e,t){if(e){if("string"==typeof e)return D(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function D(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}for(var N=function(){function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,(n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e.flags);try{for(r.s();!(t=r.n()).done;){var o=function(e){if(Array.isArray(e))return e}(n=t.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||L(n,2)||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.")}(),i=o[0],a=o[1];this.flags.has(i)||this.flags.set(i,a)}}catch(e){r.e(e)}finally{r.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),M=new N(void 0),U=0;U<R.length;U++){var B=R[U];M.add(B.name,B.enabled)}!function(){M.merge.apply(M,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),s(279),new T.Subject,new T.Subject,s(45);var F,z=s(685);(0,z.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,s(740),(0,z.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),s(606),F=function(e,t){document.documentElement.style.setProperty(e,t)},(0,P.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:P.Type.String},"Brand color #2":{_default:"#004144",_type:P.Type.String},"Brand color #3":{_default:"#007d79",_type:P.Type.String}}),(0,P.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(F("--brand-01",e.config["Brand color #1"]),F("--brand-02",e.config["Brand color #2"]),F("--brand-03",e.config["Brand color #3"]))})),a("omrs-logo-full-color",e),a("omrs-logo-full-mono",e),a("omrs-logo-full-grey",e),a("omrs-logo-partial-color",t),a("omrs-logo-partial-mono",t),a("omrs-logo-partial-grey",t),a("omrs-logo-icon-color",n),a("omrs-logo-icon-mono",n),a("omrs-logo-icon-grey",n),a("omrs-logo-white",r),a("omrs-icon-visibility",u),a("omrs-icon-menu",c),a("omrs-icon-search",l),a("omrs-icon-arrow-back",f),a("omrs-icon-arrow-forward",p),a("omrs-icon-arrow-downward",d),a("omrs-icon-arrow-upward",h),a("omrs-icon-chevron-left",v),a("omrs-icon-chevron-right",y),a("omrs-icon-chevron-up",m),a("omrs-icon-chevron-down",g),a("omrs-icon-supervised-user-circle",b),a("omrs-icon-home",w),a("omrs-icon-close",_),a("omrs-icon-important-notification",x),a("omrs-icon-calendar",S),a("omrs-icon-access-time",E),a("omrs-icon-add",O),a("omrs-icon-remove",j),a("omrs-icon-check-circle",k),a("omrs-icon-zoomoutmap",$),a("omrs-icon-location",C),a("omrs-icon-download",A)})(),(()=>{"use strict";s.r(l)})(),l})())}}}))},540:()=>{System.register(["dayjs","i18next"],(function(e,t){var n={},r={};return{setters:[function(e){n.default=e.default},function(e){r.default=e.default}],execute:function(){e((()=>{var e={4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var s=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?s.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+c,e)).$offset=a,u.$x.$localOffset=c}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=i(e).local();return p.call(r,o,t,n)}}}()},5923:(e,t,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),s=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1,v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(y(e,t)){if(g(e,r),!e[u])return}else n&&(e[d]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const n=t.prev;g(e,t),t=n}},g=(e,t)=>{if(t){const n=t.value;e[s]&&e[s](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[f].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;y(e,o)&&(g(e,n),e[u]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[u]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[s]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[u]=!!e}get allowStale(){return this[u]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[s]&&this[f]&&this[f].length&&this[f].forEach((e=>this[s](e.key,e.value))),this[p]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,u=this[a](t,e);if(this[p].has(e)){if(u>this[o])return g(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[s]&&(this[l]||this[s](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=u-a.length,a.length=u,this.get(e),m(this),!0}const d=new b(e,t,u,r,n);return d.length>this[o]?(this[s]&&this[s](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),m(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!y(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(g(this,e),e.value):null}del(e){g(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>v(this,t,!1)))}}},1602:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new $(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function m(){}function g(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(C([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=g.prototype=y.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,u){var c=l(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function C(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:t,done:!0}}return m.prototype=g,c(x,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(x),c(x,u,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},4074:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}s("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(e){const t=this.options.loose?a[u.COMPARATORLOOSE]:a[u.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(s("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new f(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new f(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),u=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||u||s}}e.exports=o;const i=n(156),{re:a,t:u}=n(887),c=n(2401),s=n(3843),l=n(9405),f=n(4355)},4355:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(i,k(this.options.includePrerelease)),u("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],f),u("comparator trim",e,s[l.COMPARATORTRIM]),e=(e=(e=e.replace(s[l.TILDETRIM],p)).replace(s[l.CARETTRIM],d)).split(/\s+/).join(" ");const c=r?s[l.COMPARATORLOOSE]:s[l.COMPARATOR],v=e.split(" ").map((e=>m(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options))).filter(this.options.loose?e=>!!e.match(c):()=>!0).map((e=>new a(e,this.options))),y=(v.length,new Map);for(const e of v){if(h(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const g=[...y.values()];return o.set(t,g),g}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>y(n,t)&&e.set.some((e=>y(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if($(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),u=n(3843),c=n(9405),{re:s,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=n(887),h=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},m=(e,t)=>(u("comp",e,t),e=_(e,t),u("caret",e),e=b(e,t),u("tildes",e),e=S(e,t),u("xrange",e),e=O(e,t),u("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,o,i)=>{let a;return u("tilde",e,t,n,r,o,i),g(n)?a="":g(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:g(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(u("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,u("tilde return",a),a}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{u("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,a)=>{let c;return u("caret",e,t,n,o,i,a),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(i)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(u("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${i}-${a} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${a} <${+n+1}.0.0-0`):(u("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),u("caret return",c),c}))},S=(e,t)=>(u("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,o,i,a,c)=>{u("xRange",e,n,r,o,i,a,c);const s=g(o),l=s||g(i),f=l||g(a),p=f;return"="===r&&p&&(r=""),c=t.includePrerelease?"-0":"",s?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(c="-0"),n=`${r+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),u("xRange return",n),n}))},O=(e,t)=>(u("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),j=(e,t)=>(u("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),k=e=>(t,n,r,o,i,a,u,c,s,l,f,p,d)=>`${n=g(r)?"":g(o)?`>=${r}.0.0${e?"-0":""}`:g(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=g(s)?"":g(l)?`<${+s+1}.0.0-0`:g(f)?`<${s}.${+l+1}.0-0`:p?`<=${s}.${l}.${f}-${p}`:e?`<${s}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),$=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(u(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9405:(e,t,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:u}=n(887),c=n(156),{compareIdentifiers:s}=n(1630);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[u.LOOSE]:a[u.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return s(n,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return s(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},953:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},2401:(e,t,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),u=n(3433),c=n(4622);e.exports=(e,t,n,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,s);case"!=":return o(e,n,s);case">":return i(e,n,s);case">=":return a(e,n,s);case"<":return u(e,n,s);case"<=":return c(e,n,s);default:throw new TypeError(`Invalid operator: ${t}`)}}},6839:(e,t,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},6218:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},9643:(e,t,n)=>{const r=n(3308);e.exports=(e,t)=>r(e,t,!0)},3308:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},3948:(e,t,n)=>{const r=n(5497),o=n(8896);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return u}}},8896:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0===r(e,t,n)},9261:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>0},6647:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>=0},5791:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},3433:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<0},4622:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<=0},629:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).major},9986:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).minor},8378:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0!==r(e,t,n)},5497:(e,t,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),u=n(156);e.exports=(e,t)=>{if(t=u(t),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},9800:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).patch},4408:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},762:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(t,e,n)},2743:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5312:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},2354:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4512:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},4770:(e,t,n)=>{const r=n(887);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(8202).SEMVER_SPEC_VERSION,SemVer:n(9405),compareIdentifiers:n(1630).compareIdentifiers,rcompareIdentifiers:n(1630).rcompareIdentifiers,parse:n(5497),valid:n(4512),clean:n(953),inc:n(5791),diff:n(3948),major:n(629),minor:n(9986),patch:n(9800),prerelease:n(4408),compare:n(3308),rcompare:n(762),compareLoose:n(9643),compareBuild:n(6218),sort:n(2354),rsort:n(2743),gt:n(9261),lt:n(3433),eq:n(8896),neq:n(8378),gte:n(6647),lte:n(4622),cmp:n(2401),coerce:n(6839),Comparator:n(4074),Range:n(4355),satisfies:n(5312),toComparators:n(9663),maxSatisfying:n(4931),minSatisfying:n(5891),minVersion:n(4925),validRange:n(9965),outside:n(3260),gtr:n(715),ltr:n(6),intersects:n(9560),simplifyRange:n(7795),subset:n(7732)}},8202:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},3843:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1630:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},156:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},887:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={};let c=0;const s=(e,t,n)=>{const r=c++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION",`(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})`),s("MAINVERSIONLOOSE",`(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASEIDENTIFIER",`(?:${a[u.NUMERICIDENTIFIER]}|${a[u.NONNUMERICIDENTIFIER]})`),s("PRERELEASEIDENTIFIERLOOSE",`(?:${a[u.NUMERICIDENTIFIERLOOSE]}|${a[u.NONNUMERICIDENTIFIER]})`),s("PRERELEASE",`(?:-(${a[u.PRERELEASEIDENTIFIER]}(?:\\.${a[u.PRERELEASEIDENTIFIER]})*))`),s("PRERELEASELOOSE",`(?:-?(${a[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[u.PRERELEASEIDENTIFIERLOOSE]})*))`),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD",`(?:\\+(${a[u.BUILDIDENTIFIER]}(?:\\.${a[u.BUILDIDENTIFIER]})*))`),s("FULLPLAIN",`v?${a[u.MAINVERSION]}${a[u.PRERELEASE]}?${a[u.BUILD]}?`),s("FULL",`^${a[u.FULLPLAIN]}$`),s("LOOSEPLAIN",`[v=\\s]*${a[u.MAINVERSIONLOOSE]}${a[u.PRERELEASELOOSE]}?${a[u.BUILD]}?`),s("LOOSE",`^${a[u.LOOSEPLAIN]}$`),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE",`${a[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),s("XRANGEIDENTIFIER",`${a[u.NUMERICIDENTIFIER]}|x|X|\\*`),s("XRANGEPLAIN",`[v=\\s]*(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:${a[u.PRERELEASE]})?${a[u.BUILD]}?)?)?`),s("XRANGEPLAINLOOSE",`[v=\\s]*(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:${a[u.PRERELEASELOOSE]})?${a[u.BUILD]}?)?)?`),s("XRANGE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAIN]}$`),s("XRANGELOOSE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAINLOOSE]}$`),s("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),s("COERCERTL",a[u.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM",`(\\s*)${a[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",s("TILDE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAIN]}$`),s("TILDELOOSE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAINLOOSE]}$`),s("LONECARET","(?:\\^)"),s("CARETTRIM",`(\\s*)${a[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",s("CARET",`^${a[u.LONECARET]}${a[u.XRANGEPLAIN]}$`),s("CARETLOOSE",`^${a[u.LONECARET]}${a[u.XRANGEPLAINLOOSE]}$`),s("COMPARATORLOOSE",`^${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]})$|^$`),s("COMPARATOR",`^${a[u.GTLT]}\\s*(${a[u.FULLPLAIN]})$|^$`),s("COMPARATORTRIM",`(\\s*)${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]}|${a[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE",`^\\s*(${a[u.XRANGEPLAIN]})\\s+-\\s+(${a[u.XRANGEPLAIN]})\\s*$`),s("HYPHENRANGELOOSE",`^\\s*(${a[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[u.XRANGEPLAINLOOSE]})\\s*$`),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,">",n)},9560:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},6:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,"<",n)},4931:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((e=>{u.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5891:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((e=>{u.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},4925:(e,t,n)=>{const r=n(9405),o=n(4355),i=n(9261);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&e.test(n)?n:null}},3260:(e,t,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),u=n(5312),c=n(9261),s=n(3433),l=n(4622),f=n(6647);e.exports=(e,t,n,p)=>{let d,h,v,y,m;switch(e=new r(e,p),t=new a(t,p),n){case">":d=c,h=l,v=s,y=">",m=">=";break;case"<":d=s,h=f,v=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let a=null,u=null;if(r.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,d(e.semver,a.semver,p)?a=e:v(e.semver,u.semver,p)&&(u=e)})),a.operator===y||a.operator===m)return!1;if((!u.operator||u.operator===y)&&h(e,u.semver))return!1;if(u.operator===m&&v(e,u.semver))return!1}return!0}},7795:(e,t,n)=>{const r=n(5312),o=n(3308);e.exports=(e,t,n)=>{const i=[];let a=null,u=null;const c=e.sort(((e,t)=>o(e,t,n)));for(const e of c)r(e,t,n)?(u=e,a||(a=e)):(u&&i.push([a,u]),u=null,a=null);a&&i.push([a,null]);const s=[];for(const[e,t]of i)e===t?s.push(e):t||e!==c[0]?t?e===c[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7732:(e,t,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),u=n(3308),c=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let c,f,p,d,h,v,y;for(const t of e)">"===t.operator||">="===t.operator?c=s(c,t,n):"<"===t.operator||"<="===t.operator?f=l(f,t,n):r.add(t.semver);if(r.size>1)return null;if(c&&f){if(p=u(c.semver,f.semver,n),p>0)return null;if(0===p&&(">="!==c.operator||"<="!==f.operator))return null}for(const e of r){if(c&&!a(e,String(c),n))return null;if(f&&!a(e,String(f),n))return null;for(const r of t)if(!a(e,String(r),n))return!1;return!0}let m=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,g=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver;m&&1===m.prerelease.length&&"<"===f.operator&&0===m.prerelease[0]&&(m=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,c)if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),">"===e.operator||">="===e.operator){if(d=s(c,e,n),d===e&&d!==c)return!1}else if(">="===c.operator&&!a(c.semver,String(e),n))return!1;if(f)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),"<"===e.operator||"<="===e.operator){if(h=l(f,e,n),h===e&&h!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(e),n))return!1;if(!e.operator&&(f||c)&&0!==p)return!1}return!(c&&v&&!f&&0!==p||f&&y&&!c&&0!==p||g||m)},s=(e,t,n)=>{if(!e)return t;const r=u(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=u(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},9663:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9965:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},2138:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var i,u,c,s,l=[];for(r=0;o&&r<t;r++)l.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)i=this,u=o,c=n[r],null===(s=u===i.head?new a(c,null,u,i):new a(c,u,u.next,i)).next&&(i.tail=s),null===s.prev&&(i.head=s),i.length++,o=s;return l},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9961)(r)}catch(e){}},9688:e=>{"use strict";e.exports=n},7064:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}i.y=t,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function e(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3}function t(e,t){var n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){var r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate(),u=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&u--;var c=i>=0?i:i+12;a<0&&c--;var s=c>0?"".concat(c," mo"):"",l=e(r)-e(o);l<0&&(l+=365);var f=Math.floor(l/7),p=l-7*f;return 0===u?t(r,o)?"Today":f<4||0===f?"".concat(l," day"):p>0?"".concat(f," wk ").concat(p," d"):"".concat(f," week"):u<2?"".concat(s," ").concat(u," yr").trim():u<18?"".concat(u," yr ").concat(s).trim():"".concat(u," years")}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>e,formatDate:()=>E,formatDatetime:()=>j,formatTime:()=>O,isOmrsDateStrict:()=>d,isOmrsDateToday:()=>h,isSameDay:()=>t,isVersionSatisfied:()=>R,parseDate:()=>x,retry:()=>U,toDateObjectStrict:()=>v,toOmrsDateFormat:()=>_,toOmrsDayDateFormat:()=>b,toOmrsIsoString:()=>y,toOmrsTimeString:()=>g,toOmrsTimeString24:()=>m,toOmrsYearlessDateFormat:()=>w,translateFrom:()=>A});var r=i(9688),o=i(9014),u=i.n(o),c=i(4332),s=i.n(c);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}r.default.extend(u()),r.default.extend(s());var p="YYYY-MM-DDTHH:mm:ss.SSSZZ";function d(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&"+"===e[23]&&":"!==e[26]&&(0,r.default)(e,p).isValid()}function h(e){return(0,r.default)(e).isToday()}function v(e){return d(e)?(0,r.default)(e,p).toDate():null}function y(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(e);return t&&(n=n.utc()),n.format(p)}function m(e){return(0,r.default)(e).format("HH:mm")}function g(e){return r.default.utc(e).format("HH:mm A")}function b(e){return _(e,"DD - MMM - YYYY")}function w(e){return _(e,"DD-MMM")}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(e).format(t)}function x(e){return(0,r.default)(e).toDate()}var S={mode:"standard",time:"for today",day:!0,year:!0};function E(e,t){var n,o=f({},S,t),i=o.mode,a=o.time,u=o.day,c=o.year,s={year:c?"numeric":void 0,month:"short",day:u?"2-digit":void 0},l=k(),p=(0,r.default)(e).isToday();if(p)n=(n=new Intl.RelativeTimeFormat(l,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(l)+n.slice(1);else if("en"==l&&(l="en-GB"),n=e.toLocaleDateString(l,s),"en-GB"==l&&"standard"==i&&c&&u&&(n=n.replace(/ /g,"-")),"wide"==i&&(n=n.replace(/ /g," — "),/ru.*/.test(l))){var d=n.length;n=n.slice(0,d-5)+n.slice(d-5).replace(" — "," ")}return(!0===a||p&&"for today"===a)&&(n+=", ".concat(O(e))),n}function O(e){return e.toLocaleTimeString(k(),{hour:"2-digit",minute:"2-digit"})}function j(e,t){return E(e,f({},t,{time:!0}))}function k(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e}var $=i(7064);function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e,t,n,r){return($.default.default||$.default).t(t,function(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){C(e,t,n[t])}))}return e}({ns:e,defaultValue:n},r))}var P=i(4770);function T(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 I(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return T(e,3);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)?T(e,3):void 0}}(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.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)}function R(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=I(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return I(e)}(t);return P.satisfies(n,e,{includePrerelease:!0})}var L=i(1602),D=i.n(L);function N(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,u,"next",e)}function u(e){N(i,r,o,a,u,"throw",e)}a(void 0)}))}}function U(e){return B.apply(this,arguments)}function B(){return B=M(D().mark((function e(t){var n,r,o,i,a,u,c=arguments;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.length>1&&void 0!==c[1]?c[1]:{},r=n.shouldRetry,o=n.getDelay,i=n.onError,r=null!=r?r:function(e){return F(e,5)},o=null!=o?o:function(e){return z(e,1e3)},a=0,u=void 0;case 6:return e.prev=6,e.next=9,V(o(a));case 9:return e.next=11,t();case 11:return e.abrupt("return",e.sent);case 14:e.prev=14,e.t0=e.catch(6),null==i||i(e.t0,a),u=e.t0;case 18:if(r(a++)){e.next=6;break}case 19:throw u;case 20:case"end":return e.stop()}}),e,null,[[6,14]])}))),B.apply(this,arguments)}function F(e,t){return e<=t}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?e+1:e;return t*Math.pow(2,r)}function V(e){return H.apply(this,arguments)}function H(){return(H=M(D().mark((function e(t){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t<=0)){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){return setTimeout(e,t)})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}})(),a})())}}}))}}]);
|
|
2
|
+
(self.webpackChunk_openmrs_esm_home_app=self.webpackChunk_openmrs_esm_home_app||[]).push([[858],{560:(e,t,n)=>{System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var r={},o={};return{setters:[function(e){r.Type=e.Type,r.defineConfigSchema=e.defineConfigSchema,r.getConfig=e.getConfig,r.navigate=e.navigate,r.validators=e.validators},function(e){o.reportError=e.reportError}],execute:function(){e((()=>{var e={385:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=c[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return c[e]={value:o,active:!0},o},i=function(e,n){var r=c[e];if(!r){var o=t(n);return c[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},s=function(){return i("app",{})},u=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return s},getGlobalStore:function(){return i},subscribeTo:function(){return u}});var c={}}(),o}())}}}))},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=r},254:e=>{"use strict";e.exports=o}},i={};function a(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={exports:{}};return e[t](r,r.exports,a),r.exports}a.y=t,a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var s={};return(0,a(968).s)(1),(()=>{"use strict";a.r(s),a.d(s,{OpenmrsFetchError:()=>te,VisitMode:()=>He,VisitStatus:()=>Ve,backendDependencies:()=>We,clearCurrentUser:()=>ye,defaultVisitCustomRepresentation:()=>$e,fetchCurrentPatient:()=>_e,fhir:()=>re,fhirBaseUrl:()=>ne,getCurrentUser:()=>pe,getLocations:()=>Ze,getLoggedInUser:()=>me,getSessionLocation:()=>be,getSessionStore:()=>de,getStartedVisit:()=>ze,getVisitTypes:()=>Ge,getVisitsForPatient:()=>Ue,makeUrl:()=>J,openmrsFetch:()=>Q,openmrsObservableFetch:()=>ee,refetchCurrentUser:()=>he,saveVisit:()=>Be,sessionEndpoint:()=>X,setSessionLocation:()=>ge,setupApiModule:()=>Se,toLocationObject:()=>qe,toVisitTypeObject:()=>Ke,updateVisit:()=>Fe,userHasAccess:()=>ve});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function r(e){return"function"==typeof e}var o=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,o=e},get useDeprecatedSynchronousErrorHandling(){return o}};function u(e){setTimeout((function(){throw e}),0)}var c={closed:!0,next:function(e){},error:function(e){if(i.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length},f=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),p=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,a=o._ctorUnsubscribe,s=o._unsubscribe,u=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof e)i.remove(this);else if(null!==i)for(var c=0;c<i.length;++c)i[c].remove(this);if(r(s)){a&&(this._unsubscribe=void 0);try{s.call(this)}catch(e){t=e instanceof f?d(e.errors):[e]}}if(l(u)){c=-1;for(var p=u.length;++c<p;){var h=u[c];if(null!==(n=h)&&"object"==typeof n)try{h.unsubscribe()}catch(e){t=t||[],e instanceof f?t=t.concat(d(e.errors)):t.push(e)}}}if(t)throw new f(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function d(e){return e.reduce((function(e,t){return e.concat(t instanceof f?t.errors:t)}),[])}var h="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),y=function(e){function n(t,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=c;break;case 1:if(!t){i.destination=c;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new v(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new v(i,t,r,o)}return i}return t(n,e),n.prototype[h]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(p),v=function(e){function n(t,n,o,i){var a,s=e.call(this)||this;s._parentSubscriber=t;var u=s;return r(n)?a=n:n&&(a=n.next,o=n.error,i=n.complete,n!==c&&(r((u=Object.create(n)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=i.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},n.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return i.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(y),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function b(e){return e}function g(e){return 0===e.length?b:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var w=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(e instanceof y)return e;if(e[h])return e[h]()}return e||t||n?new y(e,t,n):new y(c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||i.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),i.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){i.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof y?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=S(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[m]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:g(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=S(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function S(e){if(e||(e=i.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var _="object"==typeof self&&self&&self.Object===Object&&self;const E=(O||_||Function("return this")()).Symbol;var x=Object.prototype,j=x.hasOwnProperty,C=x.toString,P=E?E.toStringTag:void 0,A=Object.prototype.toString,I=E?E.toStringTag:void 0;const T=(k=Object.getPrototypeOf,R=Object,function(e){return k(R(e))});var k,R,D=Function.prototype,L=Object.prototype,M=D.toString,N=L.hasOwnProperty,$=M.call(Object);const U=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":I&&I in Object(e)?function(e){var t=j.call(e,P),n=e[P];try{e[P]=void 0;var r=!0}catch(e){}var o=C.call(e);return r&&(t?e[P]=n:delete e[P]),o}(e):function(e){return A.call(e)}(e)}(e))return!1;var t=T(e);if(null===t)return!0;var n=N.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&M.call(n)==$};var B=a(824);function F(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){F(i,r,o,a,s,"next",e)}function s(e){F(i,r,o,a,s,"throw",e)}a(void 0)}))}}function V(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function z(e,t,n){return z=V()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&q(o,n.prototype),o},z.apply(null,arguments)}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function G(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function q(e,t){return q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},q(e,t)}var Z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function W(e){var t="function"==typeof Map?new Map:void 0;return W=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return z(e,arguments,K(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),q(r,e)},W(e)}var Y=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},X="/ws/rest/v1/session";function J(e){return window.openmrsBase+e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=J(e);t.headers||(t.headers={}),U(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true");var r,o=Error();return window.fetch(n,t).then((r=H((function(e){var t,r;return Y(this,(function(i){switch(i.label){case 0:return(t=e).ok?204===t.status?(t.data=null,[2,t]):[2,t.text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))]:[3,1];case 1:return[4,(0,B.getConfig)("@openmrs/esm-api")];case 2:return r=i.sent().redirectAuthFailure,n===J(X)&&403===t.status||r.enabled&&r.errors.includes(t.status)?((0,B.navigate)({to:r.url}),[2,r.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new te(n,t,r,o)}),(function(e){throw new te(n,t,null,o)}))];case 3:return[2]}}))})),function(e){return r.apply(this,arguments)}))}function ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new w((function(r){var o=!1;return Q(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=K(t);if(n){var o=K(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return G(this,e)});function o(e,t,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=t,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(W(Error)),ne="/ws/fhir2/R4",re={read:function(e){var t,n;return Q((n={url:"".concat(ne,"/").concat(e.type,"/").concat(e.patient),method:"GET",headers:null!==(t=e.headers)&&void 0!==t?t:{}}).url,{method:n.method,headers:n.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:n}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:n}}))}},oe=a(254),ie=a(385);const ae=function(e){return void 0===e};function se(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ue(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){se(i,r,o,a,s,"next",e)}function s(e){se(i,r,o,a,s,"throw",e)}a(void 0)}))}}var ce=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},le=(0,ie.createGlobalStore)("session",{loaded:!1,session:null}),fe=0;function pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(fe<Date.now()-6e4||!le.getState().loaded)&&he(),new w((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(le.getState()),le.subscribe(n)}))}function de(){return(fe<Date.now()-6e4||!le.getState().loaded)&&he(),le}function he(){return new Promise((function(e,t){fe=Date.now(),Q(X).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,s;(s=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",s),e(n.data),le.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,oe.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))}function ye(){le.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function ve(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!ae(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!ae(t.privileges.find((function(t){return e===t.display})))})):(ae(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!ae(e.roles.find((function(e){return"System Developer"===e.display})))}(t)}function me(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(le.getState()),e||(t=le.subscribe(o))}))}function be(){return new Promise((function(e,t){pe().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))}function ge(e,t){return we.apply(this,arguments)}function we(){return(we=ue((function(e,t){return ce(this,(function(n){switch(n.label){case 0:return[4,Q(X,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return n.sent(),he(),[2]}}))}))).apply(this,arguments)}function Se(){(0,B.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:B.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:B.Type.String,_default:"${openmrsSpaBase}/login",_validators:[B.validators.isUrl]},errors:{_type:B.Type.Array,_default:[401],_elements:{_type:B.Type.Number,_validators:[B.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:B.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),he()}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){return e?re.read(function(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){Oe(e,t,n[t])}))}return e}({type:"Patient",patient:e},t)):Promise.resolve(null)}var Ee=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),xe=function(e){function n(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return t(n,e),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(p),je=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(y),Ce=function(e){function n(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(n,e),n.prototype[h]=function(){return new je(this)},n.prototype.lift=function(e){var t=new Pe(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Ee;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Ee;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ee;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(t){if(this.closed)throw new Ee;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Ee;return this.hasError?(e.error(this.thrownError),p.EMPTY):this.isStopped?(e.complete(),p.EMPTY):(this.observers.push(e),new xe(this,e))},n.prototype.asObservable=function(){var e=new w;return e.source=this,e},n.create=function(e,t){return new Pe(e,t)},n}(w),Pe=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):p.EMPTY},n}(Ce),Ae=function(e){function n(t){var n=e.call(this)||this;return n._value=t,n}return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ee;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Ce),Ie=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Te=new w((function(e){return e.complete()}));function ke(e){return function(t){return 0===e?Te:t.lift(new Re(e))}}var Re=function(){function e(e){if(this.total=e,this.total<0)throw new Ie}return e.prototype.call=function(e,t){return t.subscribe(new De(e,this.total))},e}(),De=function(e){function n(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return t(n,e),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(y);function Le(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Me(e,t))}}var Me=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ne(e,this.project,this.thisArg))},e}(),Ne=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return t(n,e),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(y),$e="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)";function Ue(e,t,n){var r=null!=n?n:$e;return ee("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(ke(1)).pipe(Le((function(e){return e})))}function Be(e,t){return ee("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Fe(e,t,n){return ee("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}var He,Ve,ze=new Ae(null);function Ke(e){return{uuid:e.uuid,display:e.display,name:e.name}}function Ge(){return ee("/ws/rest/v1/visittype").pipe(Le((function(e){return e.data.results.map(Ke)}))).pipe(ke(1))}function qe(e){return{uuid:e.uuid,display:e.display}}function Ze(){return ee("/ws/rest/v1/location").pipe(Le((function(e){return e.data.results.map(qe)}))).pipe(ke(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(He||(He={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Ve||(Ve={}));var We={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),s})())}}}))},473:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=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.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),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{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");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function n(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",y=u?"^":"",v=0,m=n;v<m.length;v++){var b=m[v];if("string"==typeof b)y+=e(p(b));else{var g=e(p(b.prefix)),w=e(p(b.suffix));if(b.pattern)if(r&&r.push(b),g||w)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";y+="(?:"+g+"((?:"+b.pattern+")(?:"+w+g+"(?:"+b.pattern+"))*)"+w+")"+S}else y+="(?:"+g+"("+b.pattern+")"+w+")"+b.modifier;else y+="("+b.pattern+")"+b.modifier;else y+="(?:"+g+w+")"+b.modifier}}if(l)a||(y+=h+"?"),y+=o.endsWith?"(?="+d+")":"$";else{var O=n[n.length-1],_="string"==typeof O?h.indexOf(O[O.length-1])>-1:void 0===O;a||(y+="(?:"+h+"(?="+d+"))?"),_||(y+="(?="+h+"|"+d+")")}return new RegExp(y,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(s.push(l),l=""),s.push({name:y||u++,prefix:m,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var b=h||f("ESCAPED_CHAR");if(b)l+=b;else if(l&&(s.push(l),l=""),f("OPEN")){m=d();var g=f("NAME")||"",w=f("PATTERN")||"",S=d();p("CLOSE"),s.push({name:g||(w?u++:""),pattern:g&&!w?a:w,prefix:m,suffix:S,modifier:f("MODIFIER")||""})}else p("END")}}return s}(n,o),r,o)}function r(e,o,i){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,o):Array.isArray(e)?function(e,n,o){var i=e.map((function(e){return r(e,n,o).source}));return new RegExp("(?:"+i.join("|")+")",t(o))}(e,o,i):n(e,o,i)}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 s(e){return function(e){if(Array.isArray(e))return a(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 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)||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.")}()}o.r(i),o.d(i,{filterBreadcrumbs:()=>y,getBreadcrumbs:()=>p,getBreadcrumbsFor:()=>v,registerBreadcrumb:()=>l,registerBreadcrumbs:()=>f});var u=(0,o(685).createGlobalStore)("breadcrumbs",[]);function c(e){return t=e.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n)?e.matcher:"string"==typeof e.matcher?r(e.matcher):r(e.path);var t,n}function l(e){return f([e])}function f(e){var t=p(),n=e.map((function(e){return{matcher:c(e),settings:e}})),r=s(t).concat(s(n));u.setState(r,!0)}function p(){return u.getState()}function d(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 h(e,t){if(t)return function(e,t){return(n=e.filter((function(e){return e.matcher.test(t)})),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return d(e,1);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)?d(e,1):void 0}}(n)||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.")}())[0];var n}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=h(e,n.join("/"));if(r)return r}}(e,t)}function y(e,t){if(e.length>0){var n=h(e,t);if(n){for(var r=[n],o=h(e,n.settings.parent);void 0!==o;)r.push(o),o=h(e,o.settings.parent);return r.reverse()}}return[]}function v(e){return y(p(),e)}})(),i})())}}}))},538:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(e,t){var n={},r={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore,n.getGlobalStore=e.getGlobalStore},function(e){r.navigateToUrl=e.navigateToUrl}],execute:function(){e((()=>{"use strict";var e={685:e=>{e.exports=n},645:e=>{e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{function e(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function t(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}}function n(n){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:t((function(e){return n(o,e)}));default:return e(o)&&e(i)?r:e(o)?t((function(e){return n(e,i)})):e(i)?t((function(e){return n(o,e)})):n(o,i)}}}function r(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function s(e,t){return Object.prototype.hasOwnProperty.call(t,e)}o.r(i),o.d(i,{Type:()=>$,configExtensionStore:()=>J,configInternalStore:()=>Z,defineConfigSchema:()=>be,defineExtensionConfigSchema:()=>ge,getConfig:()=>Se,getConfigInternal:()=>Oe,getConfigStore:()=>Q,getExtensionConfig:()=>oe,getExtensionConfigFromStore:()=>ie,getExtensionSlotConfig:()=>te,getExtensionSlotConfigFromStore:()=>ne,getExtensionSlotsConfigStore:()=>ee,getExtensionsConfigStore:()=>re,implementerToolsConfigStore:()=>ae,inRange:()=>qe,interpolateString:()=>Ke,interpolateUrl:()=>ze,isUrl:()=>We,isUrlWithTemplateParameters:()=>Ze,navigate:()=>Ge,oneOf:()=>Ye,processConfig:()=>_e,provide:()=>we,temporaryConfigStore:()=>X,validator:()=>U,validators:()=>Xe});const u="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var c=Object.prototype.toString,l=function(){return"[object Arguments]"===c.call(arguments)?function(e){return"[object Arguments]"===c.call(e)}:function(e){return s("callee",e)}}();const f=l;var p=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),y=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const v="function"!=typeof Object.keys||h?t((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=h&&f(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(p)for(n=d.length-1;n>=0;)s(t=d[n],e)&&!y(r,t)&&(r[r.length]=t),n-=1;return r})):t((function(e){return Object(e)!==e?[]:Object.keys(e)})),m=t((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function b(e,t,n,o){var i=r(e);function s(e,t){return g(e,t,n.slice(),o.slice())}return!a((function(e,t){return!a(s,t,e)}),r(t),i)}function g(e,t,n,r){if(u(e,t))return!0;var o,i,a=m(e);if(a!==m(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!u(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!u(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===e)return r[c]===t;c-=1}switch(a){case"Map":return e.size===t.size&&b(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&b(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=v(e);if(l.length!==v(t).length)return!1;var f=n.concat([e]),p=r.concat([t]);for(c=l.length-1;c>=0;){var d=l[c];if(!s(d,t)||!g(t[d],e[d],f,p))return!1;c-=1}return!0}const w=n((function(e,t){return g(e,t,[],[])}));function S(r){return function o(i,a,s){switch(arguments.length){case 0:return o;case 1:return e(i)?o:n((function(e,t){return r(i,e,t)}));case 2:return e(i)&&e(a)?o:e(i)?n((function(e,t){return r(e,a,t)})):e(a)?n((function(e,t){return r(i,e,t)})):t((function(e){return r(i,a,e)}));default:return e(i)&&e(a)&&e(s)?o:e(i)&&e(a)?n((function(e,t){return r(e,t,s)})):e(i)&&e(s)?n((function(e,t){return r(e,a,t)})):e(a)&&e(s)?n((function(e,t){return r(i,e,t)})):e(i)?t((function(e){return r(e,a,s)})):e(a)?t((function(e){return r(i,e,s)})):e(s)?t((function(e){return r(i,a,e)})):r(i,a,s)}}}function O(e){return"[object Object]"===Object.prototype.toString.call(e)}const _=S((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),E=S((function e(t,n,r){return _((function(n,r,o){return O(r)&&O(o)?e(t,r,o):t(n,r,o)}),n,r)})),x=n((function(e,t){return E((function(e,t,n){return n}),e,t)})),j=n((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function C(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?C(e[s],t,n,!0):e[s];return o};switch(m(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const P=t((function(e){return null!=e&&"function"==typeof e.clone?e.clone():C(e,[],[],!0)})),A=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},I=t((function(e){return!!A(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var T=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),k=n((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const R=k;function D(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function L(e,t,n,r){return e["@@transducer/result"](n[r](R(e["@@transducer/step"],e),t))}var M="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const N=S((function(e,t,n){if("function"==typeof e&&(e=function(e){return new T(e)}(e)),I(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return L(e,t,n,"fantasy-land/reduce");if(null!=n[M])return D(e,t,n[M]());if("function"==typeof n.next)return D(e,t,n);if("function"==typeof n.reduce)return L(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));var $;function U(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}($||($={}));var B=U((function(e){return Array.isArray(e)}),"must be an array"),F=U((function(e){return"boolean"==typeof e}),"must be a boolean"),H=U((function(e){return"number"==typeof e}),"must be a number"),V=U((function(e){return"string"==typeof e}),"must be a string"),z=U((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),K=U((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),G=o(685),q={providedConfigs:[],schemas:{},devDefaultsAreOn:Y()},Z=(0,G.createGlobalStore)("config-internal",q),W=Y();function Y(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}Z.subscribe((function(e){var t;e.devDefaultsAreOn!=W&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),W=e.devDefaultsAreOn)}));var X=(0,G.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});X.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var J=(0,G.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function Q(e){return(0,G.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})}function ee(){return(0,G.getGlobalStore)("config-extension-slots",{slots:{}})}function te(e){return ne(ee().getState(),e)}function ne(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}}function re(){return(0,G.getGlobalStore)("config-extensions",{configs:{}})}function oe(e,t){var n=Object.assign({},ie(re().getState(),e,t));return n.config=j(["Display conditions","Translation overrides"],n.config),n}function ie(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}var ae=(0,G.createGlobalStore)("config-implementer-tools",{config:{}});function se(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 ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(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){ue(e,t,n[t])}))}return e}function le(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function fe(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||de(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.")}()}function pe(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||de(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.")}()}function de(e,t){if(e){if("string"==typeof e)return se(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)?se(e,t):void 0}}function he(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=Ie(s,e,t);Q(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function ye(e,t){var n,r,o=(n=ke(Pe(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=fe(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(u)[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=fe(p.value,2),y=h[0];Ce(h[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return ce({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=fe(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=ee(),s=a.getState(),u={slots:ce({},s.slots,i)};w(s,u)||a.setState(u)}function ve(e,t){var n=function(e,t){var n=xe(P(e.schemas)),r=pe(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=fe(s.value,2);n=ke([n,je(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);ae.setState({config:n})}function me(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=Ee(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=le(ce({},r[c.slotName]),ue({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}re().setState({configs:r})}function be(e,t){Ae(e,t);var n=x(t,Fe),r=Z.getState();Z.setState({schemas:le(ce({},r.schemas),ue({},e,n))})}function ge(e,t){Ae(e,t);var n=x(t,Fe),r=Z.getState();r.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Z.setState({schemas:le(ce({},r.schemas),ue({},e,n))})}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Z.getState();Z.setState({providedConfigs:pe(n.providedConfigs).concat([{source:t,config:e}])})}function Se(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=j(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=Q(e);n(r.getState());var o=r.subscribe(n)}))}function Oe(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=e.config;t(n),o&&o()}},r=Q(e);n(r.getState());var o=r.subscribe(n)}))}function _e(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Re(e,t,n);var o=$e(e,t,r);return Le(e,o,n),o}function Ee(e,t,n,r,o,i){var a,s,u,c,l=function(e){return fe(e.split("#"),1)[0]}(r),f=o.schemas[l],p=f?l:t,d=Pe(o,i),h=Te(e,d),y=null!==(c=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=ke([Te(p,d),y]),m=null!=f?f:o.schemas[t];Re(m,v,p);var b=$e(m,v,o.devDefaultsAreOn);return Le(m,b,p),delete b.extensionSlots,b}function xe(e){return e.hasOwnProperty("_default")?le(ce({},e),{_value:e._default,_source:"default"}):Be(e)?Object.keys(e).reduce((function(t,n){return t[n]=xe(e[n]),t}),{}):{}}function je(e,t){return Be(e)?Object.keys(e).reduce((function(n,r){return n[r]=je(e[r],t),n}),{}):{_value:e,_source:t}}function Ce(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Be(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Pe(e,t){return pe(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Be(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||Ae(e,a,i);var u=a._elements;if(Ue(u)&&Ae(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var p,d=a._validators[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=p.value;"function"!=typeof h&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(h,"."))}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values($).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values($).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![$.Array,$.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ie(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=Te(e,Pe(t,n));Re(r,o,e);var i=$e(r,o,t.devDefaultsAreOn);return Le(r,i,e),delete i.extensionSlots,i}function Te(e,t){return ke(t.map((function(t){return t[e]})).filter((function(e){return!!e})))}function ke(e){return N(x)({},e)}function Re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?De(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}function De(e,t,n){Me(n,e._type,t),Be(t)?e._type===$.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];Re(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Re(e,t,n):e._type===$.Array&&function(e,t,n){if(Ue(e._elements))for(var r=0;r<t.length;r++)De(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;Me("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Ne(n,e._validators,t),Be(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===$.Object&&e._elements?Le(e._elements,c,l):Le(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Le(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}function Me(e,t,n){t&&Ne(e,[{Array:B,Boolean:F,ConceptUuid:K,Number:H,Object:z,String:V,UUID:K,PersonAttributeTypeUuid:K,PatientIdentifierTypeUuid:K}[t]],n)}function Ne(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}}he(Z.getState(),X.getState()),Z.subscribe((function(e){return he(e,X.getState())})),X.subscribe((function(e){return he(Z.getState(),e)})),ve(Z.getState(),X.getState()),Z.subscribe((function(e){return ve(e,X.getState())})),X.subscribe((function(e){return ve(Z.getState(),e)})),ye(Z.getState(),X.getState()),Z.subscribe((function(e){return ye(e,X.getState())})),X.subscribe((function(e){return ye(Z.getState(),e)})),me(Z.getState(),J.getState(),X.getState()),Z.subscribe((function(e){me(e,J.getState(),X.getState())})),J.subscribe((function(e){me(Z.getState(),e,X.getState())})),X.subscribe((function(e){me(Z.getState(),J.getState(),e)}));var $e=function(e,t,n){var r=P(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var s,u=function(){var t=s.value,o=r[t],i=e[t];if(i&&i.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){var a=i._devDefault||i._default;r[t]=n?a:i._default}var u=i._elements;if(o&&Ue(u))if(i._type===$.Array&&Array.isArray(o)){var c=o.map((function(e){return $e(u,e,n)}));r[t]=c}else if(i._type===$.Object){var l=!0,f=!1,p=void 0;try{for(var d,h=Object.keys(o)[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;o[y]=$e(u,o[y],n)}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}}else if(Be(i)){var v=r.hasOwnProperty(t)?o:{};Be(v)&&(r[t]=$e(i,v,n))}},c=Object.keys(e)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r};function Ue(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0}function Be(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var Fe={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:$.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:$.Object,_default:{}}},He=o(645);function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Ke(e,function(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){Ve(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")}function Ke(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)}function Ge(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=ze(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)}var qe=function(e,t){return U((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ze=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return U((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=Ze([]),Ye=function(e){return U((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Xe={inRange:qe,isUrl:We,isUrlWithTemplateParameters:Ze,oneOf:Ye}})(),i})())}}}))},41:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=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.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),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{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");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>t});var e=o(728);function t(e){var t=r(e);setTimeout((function(){throw t}))}function n(){var e=Error();return function(n){r(n).stack+="\nAsync stacktrace:\n".concat(e.stack),t(n)}}function r(e){var t,n,r;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(){return(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},282:(e,t,n)=>{e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","single-spa"],(function(r,o){var i={},a={},s={},u={};return{setters:[function(e){i.configExtensionStore=e.configExtensionStore,i.getExtensionConfigFromStore=e.getExtensionConfigFromStore,i.getExtensionSlotConfig=e.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){a.createGlobalStore=e.createGlobalStore,a.getGlobalStore=e.getGlobalStore},function(e){s.getSessionStore=e.getSessionStore,s.userHasAccess=e.userHasAccess},function(e){u.mountRootParcel=e.mountRootParcel}],execute:function(){r((()=>{var r={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:e=>{"use strict";e.exports=s},824:e=>{"use strict";e.exports=i},685:e=>{"use strict";e.exports=a},645:e=>{"use strict";e.exports=u}},c={};function l(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return r[e](n,n.exports,l),n.exports}l.y=o,l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})();var f={};return(0,l(968).s)(1),(()=>{"use strict";l.r(f),l.d(f,{attach:()=>Pt,checkStatus:()=>Nt,checkStatusFor:()=>$t,detach:()=>At,detachAll:()=>It,extensionStore:()=>Jt,getAssignedExtensions:()=>Dt,getConnectedExtensions:()=>kt,getCustomProps:()=>Ut,getExtensionInternalStore:()=>at,getExtensionNameFromId:()=>Et,getExtensionRegistration:()=>jt,getExtensionRegistrationFrom:()=>xt,getExtensionStore:()=>ut,registerExtension:()=>Ct,registerExtensionSlot:()=>Lt,renderExtension:()=>Yt,reset:()=>Mt,updateInternalExtensionStore:()=>st});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=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=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var c="object"==typeof self&&self&&self.Object===Object&&self;const p=u||c||Function("return this")(),d=p.Symbol;var h=Object.prototype,y=h.hasOwnProperty,v=h.toString,m=d?d.toStringTag:void 0,b=Object.prototype.toString,g=d?d.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":g&&g in Object(e)?function(e){var t=y.call(e,m),n=e[m];try{e[m]=void 0;var r=!0}catch(e){}var o=v.call(e);return r&&(t?e[m]=n:delete e[m]),o}(e):function(e){return b.call(e)}(e)},S=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},O=function(e){if(!S(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},_=p["__core-js_shared__"];var E,x=(E=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",j=Function.prototype.toString;const C=function(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var P=/^\[object .+?Constructor\]$/,A=Function.prototype,I=Object.prototype,T=A.toString,k=I.hasOwnProperty,R=RegExp("^"+T.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const D=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!S(e)||(t=e,x&&x in t))&&(O(e)?R:P).test(C(e));var t}(n)?n:void 0},L=D(p,"Map"),M=D(Object,"create");var N=Object.prototype.hasOwnProperty,$=Object.prototype.hasOwnProperty;function U(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])}}U.prototype.clear=function(){this.__data__=M?M(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return N.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:$.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=M&&void 0===t?"__lodash_hash_undefined__":t,this};const B=U,F=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function H(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])}}H.prototype.clear=function(){this.size=0,this.__data__={hash:new B,map:new(L||s),string:new B}},H.prototype.delete=function(e){var t=F(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return F(this,e).get(e)},H.prototype.has=function(e){return F(this,e).has(e)},H.prototype.set=function(e,t){var n=F(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const V=H;function z(e){var t=this.__data__=new s(e);this.size=t.size}z.prototype.clear=function(){this.__data__=new s,this.size=0},z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},z.prototype.get=function(e){return this.__data__.get(e)},z.prototype.has=function(e){return this.__data__.has(e)},z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!L||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(e,t),this.size=n.size,this};const K=z;function G(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new V;++t<n;)this.add(e[t])}G.prototype.add=G.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},G.prototype.has=function(e){return this.__data__.has(e)};const q=G,Z=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},W=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new q:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],y=t[f];if(r)var v=a?r(y,h,f,t,e,i):r(h,y,f,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!Z(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Y=p.Uint8Array,X=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Q=d?d.prototype:void 0,ee=Q?Q.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var se=Object.prototype,ue=se.hasOwnProperty,ce=se.propertyIsEnumerable,le=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ue.call(e,"callee")&&!ce.call(e,"callee")};const fe=le;var pe=t&&!t.nodeType&&t,de=pe&&e&&!e.nodeType&&e,he=de&&de.exports===pe?p.Buffer:void 0;const ye=(he?he.isBuffer:void 0)||function(){return!1};var ve=/^(?:0|[1-9]\d*)$/;const me=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t},be=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ge={};ge["[object Float32Array]"]=ge["[object Float64Array]"]=ge["[object Int8Array]"]=ge["[object Int16Array]"]=ge["[object Int32Array]"]=ge["[object Uint8Array]"]=ge["[object Uint8ClampedArray]"]=ge["[object Uint16Array]"]=ge["[object Uint32Array]"]=!0,ge["[object Arguments]"]=ge["[object Array]"]=ge["[object ArrayBuffer]"]=ge["[object Boolean]"]=ge["[object DataView]"]=ge["[object Date]"]=ge["[object Error]"]=ge["[object Function]"]=ge["[object Map]"]=ge["[object Number]"]=ge["[object Object]"]=ge["[object RegExp]"]=ge["[object Set]"]=ge["[object String]"]=ge["[object WeakMap]"]=!1;var we=t&&!t.nodeType&&t,Se=we&&e&&!e.nodeType&&e,Oe=Se&&Se.exports===we&&u.process,_e=function(){try{return Se&&Se.require&&Se.require("util").types||Oe&&Oe.binding&&Oe.binding("util")}catch(e){}}(),Ee=_e&&_e.isTypedArray;const xe=Ee?(je=Ee,function(e){return je(e)}):function(e){return ie(e)&&be(e.length)&&!!ge[w(e)]};var je,Ce=Object.prototype.hasOwnProperty,Pe=Object.prototype;const Ae=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ie=Object.prototype.hasOwnProperty;const Te=function(e){return null!=(t=e)&&be(t.length)&&!O(t)?function(e,t){var n=te(e),r=!n&&fe(e),o=!n&&!r&&ye(e),i=!n&&!r&&!o&&xe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!Ce.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||me(c,u))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pe))return Ae(e);var t,n,r=[];for(var o in Object(e))Ie.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},ke=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Te,oe)};var Re=Object.prototype.hasOwnProperty;const De=D(p,"DataView"),Le=D(p,"Promise"),Me=D(p,"Set"),Ne=D(p,"WeakMap");var $e="[object Map]",Ue="[object Promise]",Be="[object Set]",Fe="[object WeakMap]",He="[object DataView]",Ve=C(De),ze=C(L),Ke=C(Le),Ge=C(Me),qe=C(Ne),Ze=w;(De&&Ze(new De(new ArrayBuffer(1)))!=He||L&&Ze(new L)!=$e||Le&&Ze(Le.resolve())!=Ue||Me&&Ze(new Me)!=Be||Ne&&Ze(new Ne)!=Fe)&&(Ze=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?C(n):"";if(r)switch(r){case Ve:return He;case ze:return $e;case Ke:return Ue;case Ge:return Be;case qe:return Fe}return t});const We=Ze;var Ye="[object Arguments]",Xe="[object Array]",Je="[object Object]",Qe=Object.prototype.hasOwnProperty;const et=function(e,t,n,o,i,a){var s=te(e),u=te(t),c=s?Xe:We(e),l=u?Xe:We(t),f=(c=c==Ye?Je:c)==Je,p=(l=l==Ye?Je:l)==Je,d=c==l;if(d&&ye(e)){if(!ye(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new K),s||xe(e)?W(e,t,n,o,i,a):function(e,t,n,o,i,a,s){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||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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=X;case"[object Set]":var c=1&o;if(u||(u=J),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=W(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Qe.call(e,"__wrapped__"),y=p&&Qe.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,m=y?t.value():t;return a||(a=new K),i(v,m,n,o,a)}}return!!d&&(a||(a=new K),function(e,t,n,r,o,i){var a=1&n,s=ke(e),u=s.length;if(u!=ke(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Re.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var y=e[l=s[c]],v=t[l];if(r)var m=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===m?y===v||o(y,v,n,r,i):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var b=e.constructor,g=t.constructor;b==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))},tt=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:et(t,n,r,o,e,i))},nt=function(e,t){return tt(e,t)};var rt=l(824),ot=l(685),it=(0,ot.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),at=function(){return(0,ot.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function st(e){var t=it.getState(),n=e(t);n!==t&&it.setState(n)}var ut=function(){return(0,ot.getGlobalStore)("extensions",{slots:{}})};function ct(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=!0,c=!1,l=void 0;try{for(var f,p=s.instances[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:s.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){c=!0,l=e}finally{try{u||null==p.return||p.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}nt(rt.configExtensionStore.getState().mountedExtensions,t)||rt.configExtensionStore.setState({mountedExtensions:t})}ct(it.getState()),it.subscribe(ct);var lt=l(766);function ft(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 pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dt(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){pt(e,t,n[t])}))}return e}function ht(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function yt(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||mt(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.")}()}function vt(e){return function(e){if(Array.isArray(e))return ft(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mt(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.")}()}function mt(e,t){if(e){if("string"==typeof e)return ft(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)?ft(e,t):void 0}}var bt=at(),gt=ut(),wt=(0,rt.getExtensionSlotsConfigStore)(),St=(0,rt.getExtensionsConfigStore)();function Ot(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=Object.entries(e.slots)[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=yt(s.value,2),l=c[0],f=c[1],p=Rt(l,e,(0,rt.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}nt(gt.getState().slots,r)||gt.setState({slots:r})}function _t(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function Et(e){return yt(e.split("#"),1)[0]}function xt(e,t){var n=Et(t);return e.extensions[n]}function jt(e){return xt(bt.getState(),e)}bt.subscribe((function(e){Ot(e,wt.getState(),St.getState())})),wt.subscribe((function(e){Ot(bt.getState(),e,St.getState())})),St.subscribe((function(e){Ot(bt.getState(),wt.getState(),e)}));var Ct=bt.action((function(e,t){e.extensions[t.name]=ht(dt({},t),{instances:[]})}));function Pt(e,t){st((function(n){var r=n.slots[e];return ht(dt({},n),r?{slots:ht(dt({},n.slots),pt({},e,ht(dt({},r),{attachedIds:vt(r.attachedIds).concat([t])})))}:{slots:ht(dt({},n.slots),pt({},e,ht(dt({},_t(e)),{attachedIds:[t]})))})}))}function At(e,t){st((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?ht(dt({},n),{slots:ht(dt({},n.slots),pt({},e,ht(dt({},r),{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))}function It(e){st((function(t){var n=t.slots[e];return n?ht(dt({},t),{slots:ht(dt({},t.slots),pt({},e,ht(dt({},n),{attachedIds:[]})))}):t}))}function Tt(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1}function kt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return $t(n,e.online,e.offline)}))}function Rt(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=bt.getState().extensions;return vt(t).concat(vt(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,s=Tt(e,o,null===(r=i[Et(e)])||void 0===r?void 0:r.order,t),u=Tt(n,o,null===(a=i[Et(n)])||void 0===a?void 0:a.order,t);return-1===u?-1:-1===s?1:s-u}))}(n,t.slots[e].attachedIds),i=[],a=void 0,s=!0,u=!1,c=void 0;try{for(var l,f=o[Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var p=l.value,d=(0,rt.getExtensionConfigFromStore)(r,e,p).config,h=Et(p),y=t.extensions[h];if(y){var v,m,b=null!==(m=null==d||null===(v=d["Display conditions"])||void 0===v?void 0:v.privileges)&&void 0!==m?m:y.privileges;if(b&&("string"==typeof b||Array.isArray(b)&&b.length>0)){var g;if(void 0===a&&(a=null===(g=(0,lt.getSessionStore)().getState().session)||void 0===g?void 0:g.user),!a)continue;if(!(0,lt.userHasAccess)(b,a))continue}i.push({id:p,name:h,moduleName:y.moduleName,config:d,meta:y.meta,online:y.online,offline:y.offline})}}}catch(e){u=!0,c=e}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}return i}function Dt(e){return Rt(e,bt.getState(),(0,rt.getExtensionSlotConfig)(e).config,St.getState())}var Lt=bt.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return ht(dt({},e),{slots:ht(dt({},e.slots),pt({},n,ht(dt({},e.slots[n]),{moduleName:t})))});var i=_t(n,t);return ht(dt({},e),{slots:ht(dt({},e.slots),pt({},n,i))})})),Mt=gt.action((function(){return{slots:{},extensions:{}}}));function Nt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return $t(n,e,t)}function $t(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function Ut(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}}var Bt=l(645);function Ft(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 Ht(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Vt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ht(i,r,o,a,s,"next",e)}function s(e){Ht(i,r,o,a,s,"throw",e)}a(void 0)}))}}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kt(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){zt(e,t,n[t])}))}return e}function Gt(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function qt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Zt(e){return function(e){if(Array.isArray(e))return Ft(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 Ft(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)?Ft(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 Wt=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function Yt(e,t,n,r){return Xt.apply(this,arguments)}function Xt(){return Xt=Vt((function(e,t,n,r){var o,i,a,s,u,c,l,f,p,d,h,y,v,m=arguments;return Wt(this,(function(b){switch(b.label){case 0:if(o=m.length>4&&void 0!==m[4]?m[4]:function(e){return e},i=m.length>5&&void 0!==m[5]?m[5]:{},a=Et(r),s=jt(r),u=null,!e)return[3,3];if(!s)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));return c=s.load,l=s.online,f=s.offline,p=s.meta,d=s.moduleName,Nt(l,f)?(st((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return Gt(Kt({},o),{extensions:Gt(Kt({},o.extensions),zt({},a,Gt(Kt({},o.extensions[a]),{instances:Zt(o.extensions[a].instances).concat([i])})))})})),[4,c()]):[3,2];case 1:h=b.sent(),y=h.default,v=qt(h,["default"]),u=(0,Bt.mountRootParcel)(o(null!=y?y:v),Gt(Kt({},Ut(l,f),i),{_meta:p,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d},domElement:e})),b.label=2;case 2:return[3,4];case 3:console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available.")),b.label=4;case 4:return[2,u]}}))})),Xt.apply(this,arguments)}var Jt=at()})(),f})())}}}))},858:(e,t,n)=>{"use strict";n.r(t);var r=n(560),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(473);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(538);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var s=n(41);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var u=n(282);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var c=n(875);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var l=n(212);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(211);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var p=n(435);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var d=n(742);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var h=n(540);o={};for(const e in h)"default"!==e&&(o[e]=()=>h[e]);n.d(t,o)},875:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchActionableNotificationShown:()=>d,dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>p,dispatchPrecacheStaticDependencies:()=>s,setupPaths:()=>m,setupUtils:()=>b,subscribeActionableNotificationShown:()=>y,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>h,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>v});var e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){var n=function(e){return t(e.detail)};return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}function i(e){return e({online:navigator.onLine}),n(e)}var a="openmrs:precache-static-dependencies";function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){var t=function(t){return e(t.detail)};return window.addEventListener(a,t),function(){return window.removeEventListener(a,t)}}var c="openmrs:notification-shown",l="openmrs:actionable-notification-shown",f="openmrs:toast-shown";function p(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function h(e){var t=function(t){return e(t.detail)};return window.addEventListener(c,t),function(){return window.removeEventListener(c,t)}}function y(e){var t=function(t){return e(t.detail)};return window.addEventListener(l,t),function(){return window.removeEventListener(l,t)}}function v(e){var t=function(t){return e(t.detail)};return window.addEventListener(f,t),function(){return window.removeEventListener(f,t)}}function m(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}}function b(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}}})(),o})())}}}))},212:(e,t,n)=>{System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},o={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){o.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o}},i={};function a(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={exports:{}};return e[t](r,r.exports,a),r.exports}a.y=t,a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var s={};return(0,a(968).s)(1),(()=>{"use strict";a.r(s),a.d(s,{activateOfflineCapability:()=>F,beginEditSynchronizationItem:()=>_o,canBeginEditSynchronizationItemsOfType:()=>Oo,deleteSynchronizationItem:()=>xo,generateOfflineUuid:()=>Mo,getCurrentOfflineMode:()=>U,getDynamicOfflineDataEntries:()=>Go,getDynamicOfflineDataEntriesFor:()=>Zo,getDynamicOfflineDataHandlers:()=>zo,getFullSynchronizationItems:()=>bo,getFullSynchronizationItemsFor:()=>ho,getOfflineDb:()=>Fr,getOfflinePatientDataStore:()=>hi,getOfflineSynchronizationStore:()=>eo,getOmrsServiceWorker:()=>v,getSynchronizationItem:()=>wo,getSynchronizationItems:()=>vo,getSynchronizationItemsFor:()=>fo,isOfflineUuid:()=>No,messageOmrsServiceWorker:()=>E,offlineUuidPrefix:()=>Lo,omrsOfflineCachingStrategyHttpHeaderName:()=>g,omrsOfflineResponseBodyHttpHeaderName:()=>m,omrsOfflineResponseStatusHttpHeaderName:()=>b,putDynamicOfflineData:()=>Yo,putDynamicOfflineDataFor:()=>Jo,queueSynchronizationItem:()=>co,queueSynchronizationItemFor:()=>so,registerOfflinePatientHandler:()=>yi,registerOmrsServiceWorker:()=>y,removeDynamicOfflineData:()=>ei,removeDynamicOfflineDataFor:()=>ni,runSynchronization:()=>to,setCurrentOfflineMode:()=>B,setupDynamicOfflineDataHandler:()=>Ko,setupOfflineSync:()=>Co,syncAllDynamicOfflineData:()=>oi,syncDynamicOfflineData:()=>ai,syncOfflinePatientData:()=>vi});try{self["workbox:window:6.5.3"]&&_()}catch(e){}function e(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function t(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 r(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:6.5.3"]&&_()}catch(e){}var o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function i(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var u=function(e,t){this.type=e,Object.assign(this,t)};function c(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function l(){}var f={type:"SKIP_WAITING"};function p(e,t){if(!t)return e&&e.then?e.then(l):Promise.resolve()}var d=function(t){var n,r;function a(e,n){var r,a;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new u(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new u("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new u("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(a=function(e){var t=e.data,n=e.ports,o=e.source;return c(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new u("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(a.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var s,l=a.prototype;return l.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return p(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),c(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new u("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},l.update=function(){try{return this.fn?p(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(t){try{return c(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,f)},l.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},l.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return c(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(s=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,s),a}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),h=void 0;function y(e,t){if(void 0!==h)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),h;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new d(e,t);return h=n.register().then((function(){return n.controlling.then((function(){return n}))}))}function v(){return null!=h?h:Promise.resolve(void 0)}var m="x-omrs-offline-response-body",b="x-omrs-offline-response-status",g="x-omrs-offline-caching-strategy";function w(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,s,"next",e)}function s(e){w(i,r,o,a,s,"throw",e)}a(void 0)}))}}var O=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function E(e){return x.apply(this,arguments)}function x(){return(x=S((function(e){var t,n;return O(this,(function(r){switch(r.label){case 0:return[4,v()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))}))).apply(this,arguments)}function j(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,s,"next",e)}function s(e){j(i,r,o,a,s,"throw",e)}a(void 0)}))}}var P=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function A(){return I.apply(this,arguments)}function I(){return I=C((function(){var e;return P(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),I.apply(this,arguments)}function T(){return k.apply(this,arguments)}function k(){return(k=C((function(){return P(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function R(){return D.apply(this,arguments)}function D(){return D=C((function(){return P(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),D.apply(this,arguments)}function L(){return M.apply(this,arguments)}function M(){return(M=C((function(){var e,t;return P(this,(function(n){switch(n.label){case 0:return[4,R()];case 1:return(t=n.sent())?[3,3]:[4,T()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,A()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var N="openmrs3:offline-mode",$="unavailable";function U(){return{current:$,notAvailable:"unavailable"===$,active:"on"===$}}function B(e){"unavailable"!==$&&"unavailable"!==e&&(localStorage.setItem(N,"on"===e?"active":"disabled"),$=e)}function F(){return H.apply(this,arguments)}function H(){return(H=C((function(){return P(this,(function(e){switch(e.label){case 0:return[4,L()];case 1:return e.sent()||($="active"===localStorage.getItem(N)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,z=Object.keys,K=Array.isArray;function G(e,t){return"object"!=typeof t||z(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||V.Promise||(V.Promise=Promise);const q=Object.getPrototypeOf,Z={}.hasOwnProperty;function W(e,t){return Z.call(e,t)}function Y(e,t){"function"==typeof t&&(t=t(q(e))),("undefined"==typeof Reflect?z:Reflect.ownKeys)(t).forEach((n=>{J(e,n,t[n])}))}const X=Object.defineProperty;function J(e,t,n,r){X(e,t,G(n&&W(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Q(e){return{from:function(t){return e.prototype=Object.create(t.prototype),J(e.prototype,"constructor",e),{extend:Y.bind(null,e.prototype)}}}}const ee=Object.getOwnPropertyDescriptor;function te(e,t){let n;return ee(e,t)||(n=q(e))&&te(n,t)}const ne=[].slice;function re(e,t,n){return ne.call(e,t,n)}function oe(e,t){return t(e)}function ie(e){if(!e)throw new Error("Assertion Failed")}function ae(e){V.setImmediate?setImmediate(e):setTimeout(e,0)}function se(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function ue(e,t){if(W(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=ue(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:ue(s,t.substr(a+1))}}function ce(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){ie("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)ce(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?K(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&W(e,a)||(u=e[a]={}),ce(u,s,n)}}else void 0===n?K(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function le(e){var t={};for(var n in e)W(e,n)&&(t[n]=e[n]);return t}const fe=[].concat;function pe(e){return fe.apply([],e)}const de="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(pe([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>V[e])),he=de.map((e=>V[e]));se(de,(e=>[e,!0]));let ye=null;function ve(e){ye="undefined"!=typeof WeakMap&&new WeakMap;const t=me(e);return ye=null,t}function me(e){if(!e||"object"!=typeof e)return e;let t=ye&&ye.get(e);if(t)return t;if(K(e)){t=[],ye&&ye.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(me(e[n]))}else if(he.indexOf(e.constructor)>=0)t=e;else{const n=q(e);for(var o in t=n===Object.prototype?{}:Object.create(n),ye&&ye.set(e,t),e)W(e,o)&&(t[o]=me(e[o]))}return t}const{toString:be}={};function ge(e){return be.call(e).slice(8,-1)}const we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Se="symbol"==typeof we?function(e){var t;return null!=e&&(t=e[we])&&t.apply(e)}:function(){return null},Oe={};function _e(e){var t,n,r,o;if(1===arguments.length){if(K(e))return e.slice();if(this===Oe&&"string"==typeof e)return[e];if(o=Se(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Ee="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var xe="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function je(e,t){xe=e,Ce=t}var Ce=()=>!0;const Pe=!new Error("").stack;function Ae(){if(Pe)try{throw Ae.arguments,new Error}catch(e){return e}return new Error}function Ie(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Ce).map((e=>"\n"+e)).join("")):""}var Te=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ke=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Te),Re={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function De(e,t){this._e=Ae(),this.name=e,this.message=t}function Le(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Me(e,t,n,r){this._e=Ae(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Le(e,t)}function Ne(e,t){this._e=Ae(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Le(e,t)}Q(De).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ie(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Q(Me).from(De),Q(Ne).from(De);var $e=ke.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Ue=De;var Be=ke.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Ae(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Re[t]||n,this.inner=null)}return Q(r).from(Ue),e[t]=r,e}),{});Be.Syntax=SyntaxError,Be.Type=TypeError,Be.Range=RangeError;var Fe=Te.reduce(((e,t)=>(e[t+"Error"]=Be[t],e)),{}),He=ke.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Be[t]),e)),{});function Ve(){}function ze(e){return e}function Ke(e,t){return null==e||e===ze?t:function(n){return t(e(n))}}function Ge(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function qe(e,t){return e===Ve?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Ge(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Ge(o,this.onerror):o),void 0!==i?i:n}}function Ze(e,t){return e===Ve?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Ge(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ge(r,this.onerror):r)}}function We(e,t){return e===Ve?t:function(n){var r=e.apply(this,arguments);G(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Ge(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Ge(i,this.onerror):i),void 0===r?void 0===a?void 0:a:G(r,a)}}function Ye(e,t){return e===Ve?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Xe(e,t){return e===Ve?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}He.ModifyError=Me,He.DexieError=De,He.BulkError=Ne;var Je={};const[Qe,et,tt]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,q(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,q(t),e]})(),nt=et&&et.then,rt=Qe&&Qe.constructor,ot=!!tt;var it=!1,at=tt?()=>{tt.then(At)}:V.setImmediate?setImmediate.bind(null,At):V.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{At(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(At,0)},st=function(e,t){vt.push([e,t]),ct&&(at(),ct=!1)},ut=!0,ct=!0,lt=[],ft=[],pt=null,dt=ze,ht={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Qt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Qt(e[0],e[1])}catch(e){}}))}},yt=ht,vt=[],mt=0,bt=[];function gt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ve,this._lib=!1;var t=this._PSD=yt;if(xe&&(this._stackHolder=Ae(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Je)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&_t(this,this._value))}this._state=null,this._value=null,++t.ref,Ot(this,e)}const wt={get:function(){var e=yt,t=Ut;function n(n,r){var o=!e.global&&(e!==yt||t!==Ut);const i=o&&!Vt();var a=new gt(((t,a)=>{xt(this,new St(Xt(n,e,o,i),Xt(r,e,o,i),t,a,e))}));return xe&&Pt(a,this),a}return n.prototype=Je,n},set:function(e){J(this,"then",e&&e.prototype===Je?wt:{get:function(){return e},set:wt.set})}};function St(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Ot(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&It();t&&"function"==typeof t.then?Ot(e,((e,n)=>{t instanceof gt?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Et(e)),n&&Tt()}}),_t.bind(null,e))}catch(t){_t(e,t)}}function _t(e,t){if(ft.push(t),null===e._state){var n=e._lib&&It();t=dt(t),e._state=!1,e._value=t,xe&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=te(t,"stack");t._promise=e,J(t,"stack",{get:()=>it?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){lt.some((t=>t._value===e._value))||lt.push(e)}(e),Et(e),n&&Tt()}}function Et(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)xt(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===mt&&(++mt,st((()=>{0==--mt&&kt()}),[]))}function xt(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++mt,st(jt,[n,e,t])}else e._listeners.push(t)}function jt(e,t,n){try{pt=t;var r,o=t._value;t._state?r=e(o):(ft.length&&(ft=[]),r=e(o),-1===ft.indexOf(o)&&function(e){for(var t=lt.length;t;)if(lt[--t]._value===e._value)return void lt.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{pt=null,0==--mt&&kt(),--n.psd.ref||n.psd.finalize()}}function Ct(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Ie(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return xe&&((r=Ie(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Ct(e._prev,t,n)),t}function Pt(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function At(){It()&&Tt()}function It(){var e=ut;return ut=!1,ct=!1,e}function Tt(){var e,t,n;do{for(;vt.length>0;)for(e=vt,vt=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(vt.length>0);ut=!0,ct=!0}function kt(){var e=lt;lt=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=bt.slice(0),n=t.length;n;)t[--n]()}function Rt(e){return new gt(Je,!1,e)}function Dt(e,t){var n=yt;return function(){var r=It(),o=yt;try{return qt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{qt(o,!1),r&&Tt()}}}Y(gt.prototype,{then:wt,_then:function(e,t){xt(this,new St(null,null,e,t,yt))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Rt(e))):this.then(null,(e=>e&&e.name===t?n(e):Rt(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Rt(t))))},stack:{get:function(){if(this._stack)return this._stack;try{it=!0;var e=Ct(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{it=!1}}},timeout:function(e,t){return e<1/0?new gt(((n,r)=>{var o=setTimeout((()=>r(new Be.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&J(gt.prototype,Symbol.toStringTag,"Dexie.Promise"),ht.env=Zt(),Y(gt,{all:function(){var e=_e.apply(null,arguments).map(zt);return new gt((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>gt.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof gt)return e;if(e&&"function"==typeof e.then)return new gt(((t,n)=>{e.then(t,n)}));var t=new gt(Je,!0,e);return Pt(t,pt),t},reject:Rt,race:function(){var e=_e.apply(null,arguments).map(zt);return new gt(((t,n)=>{e.map((e=>gt.resolve(e).then(t,n)))}))},PSD:{get:()=>yt,set:e=>yt=e},totalEchoes:{get:()=>Ut},newPSD:Ft,usePSD:Wt,scheduler:{get:()=>st,set:e=>{st=e}},rejectionMapper:{get:()=>dt,set:e=>{dt=e}},follow:(e,t)=>new gt(((n,r)=>Ft(((t,n)=>{var r=yt;r.unhandleds=[],r.onunhandled=n,r.finalize=Ge((function(){!function(e){bt.push((function t(){e(),bt.splice(bt.indexOf(t),1)})),++mt,st((()=>{0==--mt&&kt()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),rt&&(rt.allSettled&&J(gt,"allSettled",(function(){const e=_e.apply(null,arguments).map(zt);return new gt((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>gt.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),rt.any&&"undefined"!=typeof AggregateError&&J(gt,"any",(function(){const e=_e.apply(null,arguments).map(zt);return new gt(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>gt.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const Lt={awaits:0,echoes:0,id:0};var Mt=0,Nt=[],$t=0,Ut=0,Bt=0;function Ft(e,t,n,r){var o=yt,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Bt;var a=ht.env;i.env=ot?{Promise:gt,PromiseProp:{value:gt,configurable:!0,writable:!0},all:gt.all,race:gt.race,allSettled:gt.allSettled,any:gt.any,resolve:gt.resolve,reject:gt.reject,nthen:Jt(a.nthen,i),gthen:Jt(a.gthen,i)}:{},t&&G(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Wt(i,e,n,r);return 0===i.ref&&i.finalize(),s}function Ht(){return Lt.id||(Lt.id=++Mt),++Lt.awaits,Lt.echoes+=100,Lt.id}function Vt(){return!!Lt.awaits&&(0==--Lt.awaits&&(Lt.id=0),Lt.echoes=100*Lt.awaits,!0)}function zt(e){return Lt.echoes&&e&&e.constructor===rt?(Ht(),e.then((e=>(Vt(),e)),(e=>(Vt(),en(e))))):e}function Kt(e){++Ut,Lt.echoes&&0!=--Lt.echoes||(Lt.echoes=Lt.id=0),Nt.push(yt),qt(e,!0)}function Gt(){var e=Nt[Nt.length-1];Nt.pop(),qt(e,!1)}function qt(e,t){var n=yt;if((t?!Lt.echoes||$t++&&e===yt:!$t||--$t&&e===yt)||Yt(t?Kt.bind(null,e):Gt),e!==yt&&(yt=e,n===ht&&(ht.env=Zt()),ot)){var r=ht.env.Promise,o=e.env;et.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(V,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Zt(){var e=V.Promise;return ot?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(V,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:et.then,gthen:e.prototype.then}:{}}function Wt(e,t,n,r,o){var i=yt;try{return qt(e,!0),t(n,r,o)}finally{qt(i,!1)}}function Yt(e){nt.call(Qe,e)}function Xt(e,t,n,r){return"function"!=typeof e?e:function(){var o=yt;n&&Ht(),qt(t,!0);try{return e.apply(this,arguments)}finally{qt(o,!1),r&&Yt(Vt)}}}function Jt(e,t){return function(n,r){return e.call(this,Xt(n,t),Xt(r,t))}}function Qt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(V.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),G(r,o)):V.CustomEvent&&G(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&V.dispatchEvent&&(dispatchEvent(r),!V.PromiseRejectionEvent&&V.onunhandledrejection))try{V.onunhandledrejection(r)}catch(e){}xe&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+nt).indexOf("[native code]")&&(Ht=Vt=Ve);var en=gt.reject;function tn(e,t,n,r){if(e.idbdb&&(e._state.openComplete||yt.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===$e.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>tn(e,t,n,r)))):en(o)}return o._promise(t,((e,t)=>Ft((()=>(yt.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return en(new Be.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return en(new Be.DatabaseClosed);e.open().catch(Ve)}return e._state.dbReadyPromise.then((()=>tn(e,t,n,r)))}const nn=String.fromCharCode(65535),rn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",on=[],an="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),sn=an,un=an,cn=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function ln(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const fn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function pn(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ve(t))[e],t)}class dn{_trans(e,t,n){const r=this._tx||yt.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Be.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=It();try{return r&&r.db===this.db?r===yt.trans?r._promise(e,i,n):Ft((()=>r._promise(e,i,n)),{trans:r,transless:yt.transless||yt}):tn(this.db,e,[this.name],i)}finally{a&&Tt()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(K(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=z(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==nn)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&xe&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?ln(n,a&&a.multi?e=>{const t=ue(e,o);return K(t)&&t.some((e=>i(s,e)))}:e=>i(s,ue(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,K(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(W(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){G(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=pn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?gt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{ce(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||K(e))return this.where(":id").equals(e).modify(t);{const n=ue(e,this.schema.primKey.keyPath);if(void 0===n)return en(new Be.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?z(t).forEach((n=>{ce(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=pn(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?gt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{ce(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?gt.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:fn}))).then((e=>e.numFailures?gt.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Be.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(pn(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Ne(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Be.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(pn(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Ne(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Ne(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function hn(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=Ye),o||(o=Ve);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){z(e).forEach((function(t){var n=e[t];if(K(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Be.InvalidArgument("Invalid event config");var r=i(t,ze,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){ae((function(){e.apply(null,t)}))}))}))}}))}}function yn(e,t){return Q(t).from({prototype:e}),t}function vn(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function mn(e,t){e.filter=ln(e.filter,t)}function bn(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>ln(r(),t()):t,e.justLimit=n&&!r}function gn(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Be.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function wn(e,t,n){const r=gn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Sn(e,t,n,r){const o=e.replayFilter?ln(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),W(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),On(wn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return On(wn(e,r,n),ln(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function On(e,t,n,r){var o=Dt(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=Ve}),(t=>{e.fail(t),n=Ve}))||o(e.value,e,(e=>n=e)),n()}))}))}function _n(e,t){try{const n=En(e),r=En(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(xn(e),xn(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=_n(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function En(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=ge(e);return"ArrayBuffer"===n?"binary":n}function xn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class jn{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,en.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,en.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=ln(t.algorithm,e)}_iterate(e,t){return Sn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&G(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Sn(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(vn(t,!0))return n.count({trans:e,query:{index:gn(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Sn(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&vn(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=gn(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Sn(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,vn(t)?bn(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):bn(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),bn(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return mn(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return mn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=ln(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&vn(t,!0)&&t.limit>0)return this._read((e=>{var n=gn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return mn(this._ctx,(function(e){var t=e.primaryKey.toString(),r=W(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=z(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];ue(t,a)!==s&&(ce(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const p=[],d=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of z(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((p=>{const h=[],y=[],v=s?[]:null,m=[];for(let e=0;e<f;++e){const t=p[e],n={value:ve(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?m.push(o[l+e]):s||0===_n(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(m.push(o[l+e]),h.push(n.value)))}const b=vn(t)&&t.limit===1/0&&("function"!=typeof e||e===Cn)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:n,type:"add",values:h}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);d(h.length,e)}))).then((()=>(y.length>0||b&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:b,changeSpec:"function"!=typeof e&&e}).then((e=>d(y.length,e))))).then((()=>(m.length>0||b&&e===Cn)&&a.mutate({trans:n,type:"delete",keys:m,criteria:b}).then((e=>d(m.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Me("Error modifying one or more objects",l,f,p);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return vn(e)&&(e.isPrimKey&&!un||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Me("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Cn)}}const Cn=(e,t)=>t.value=null;function Pn(e,t){return e<t?-1:e===t?0:1}function An(e,t){return e>t?-1:e===t?0:1}function In(e,t,n){var r=e instanceof Mn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Tn(e){return new e.Collection(e,(()=>Ln(""))).limit(0)}function kn(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Rn(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return In(e,"String expected.");function p(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Pn:An;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>Dn(s[0],u[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,u,h))return!0;for(var d=null,y=h;y<f;++y){var v=kn(o,p,s[y],u[y],a,c);null===v&&null===d?h=y+1:(null===d||a(d,v)>0)&&(d=v)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Dn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ln(e){return{type:1,lower:e,upper:e}}class Mn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Tn(this):new this.Collection(this,(()=>Dn(e,t,!n,!r)))}catch(e){return In(this,rn)}}equals(e){return null==e?In(this,rn):new this.Collection(this,(()=>Ln(e)))}above(e){return null==e?In(this,rn):new this.Collection(this,(()=>Dn(e,void 0,!0)))}aboveOrEqual(e){return null==e?In(this,rn):new this.Collection(this,(()=>Dn(e,void 0,!1)))}below(e){return null==e?In(this,rn):new this.Collection(this,(()=>Dn(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?In(this,rn):new this.Collection(this,(()=>Dn(void 0,e)))}startsWith(e){return"string"!=typeof e?In(this,"String expected."):this.between(e,e+nn,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Rn(this,((e,t)=>0===e.indexOf(t[0])),[e],nn)}equalsIgnoreCase(e){return Rn(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=_e.apply(Oe,arguments);return 0===e.length?Tn(this):Rn(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=_e.apply(Oe,arguments);return 0===e.length?Tn(this):Rn(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,nn)}anyOf(){const e=_e.apply(Oe,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return In(this,rn)}if(0===e.length)return Tn(this);const n=new this.Collection(this,(()=>Dn(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=_e.apply(Oe,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return In(this,rn)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Tn(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return In(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Be.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return In(this,rn)}let p=0;const d=u?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,h=s?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let y=d;const v=new this.Collection(this,(()=>Dn(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=d,l=r):(y=h,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t((()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),v}startsWithAnyOf(){const e=_e.apply(Oe,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Tn(this):this.inAnyRange(e.map((e=>[e,e+nn]))):In(this,"startsWithAnyOf() only works with strings")}}function Nn(e){return Dt((function(t){return $n(t),e(t.target.error),!1}))}function $n(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Un=hn(null,"storagemutated");class Bn{_lock(){return ie(!yt.global),++this._reculock,1!==this._reculock||yt.global||(yt.lockOwnerFor=this),this}_unlock(){if(ie(!yt.global),0==--this._reculock)for(yt.global||(yt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Wt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&yt.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(ie(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Be.DatabaseClosed(n);case"MissingAPIError":throw new Be.MissingAPI(n.message,n);default:throw new Be.OpenFailed(n)}if(!this.active)throw new Be.TransactionInactive;return ie(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Dt((t=>{$n(t),this._reject(e.error)})),e.onabort=Dt((t=>{$n(t),this.active&&this._reject(new Be.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Dt((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Un.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return en(new Be.ReadOnly("Transaction is readonly"));if(!this.active)return en(new Be.TransactionInactive);if(this._locked())return new gt(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},yt])}));if(n)return Ft((()=>{var e=new gt(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new gt(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=gt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new gt(((e,r)=>{n.then((n=>t._waitingQueue.push(Dt(e.bind(null,n)))),(e=>t._waitingQueue.push(Dt(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Be.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(W(t,e))return t[e];const n=this.schema[e];if(!n)throw new Be.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Fn(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Hn(t)}}function Hn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function Vn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:se(n,(e=>[e.name,e]))}}let zn=e=>{try{return e.only([[]]),zn=()=>[[]],[[]]}catch(e){return zn=()=>nn,nn}};function Kn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>ue(t,e)}(e):t=>ue(t,e)}function Gn(e){return[].slice.call(e)}let qn=0;function Zn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Wn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Gn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=K(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:Kn(t)},indexes:Gn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:K(o),keyPath:o,unique:n,multiEntry:r,extractKey:Kn(o)};return i[Zn(o)]=a,a})),getIndexByKeyPath:e=>i[Zn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[Zn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Dt(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],y=[];let v=0;const m=e=>{++v,$n(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?h.push(d=c.clear()):h.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=m;else for(let t=0;t<p;++t)h.push(d=c[n](e[t])),d.onerror=m}const b=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{m(e),b(e)},d.onsuccess=b}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Dt(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},p=Nn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=p,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Dt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Nn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Dt(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:p}=c,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),y=r(p);if(0===u)return o({result:[]});if(e){const e=s?h.getAll(y,l):h.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Nn(i)}else{let e=0;const t=s||!("openKeyCursor"in h)?h.openCursor(y):h.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Nn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Dt(s);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=Nn(u),h.onsuccess=Dt((t=>{const n=h.result;if(!n)return void s(null);n.___id=++qn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Dt(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Dt(e),h.onerror=Nn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(h.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return h.onsuccess=Dt((e=>{h.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Dt((t=>e(t.target.result))),l.onerror=Nn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:zn(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Yn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=te(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?J(t,n,{get(){return this.table(n)},set(e){X(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function Xn({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Jn(e,t){return e._cfg.version-t._cfg.version}function Qn(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!an)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function er(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>tr(o,e))),o}function tr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function nr(e,t,n){const r={};return re(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Fn(Hn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Fn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=Vn(e,i,a)})),r}function rr({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+re(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&V.WorkerGlobalScope&&V instanceof V.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class or{_parseStoresSpec(e,t){z(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Fn(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),K(r),0===t)})),o=r.shift();if(o.multi)throw new Be.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Be.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Be.Schema("Index must have a name and cannot be an empty string")})),t[n]=Vn(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?G(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{G(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,Xn(t,[t._allTables,t,t.Transaction.prototype]),Yn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],z(o),o),t._storeNames=z(o),this}upgrade(e){return this._cfg.contentUpgrade=Xe(this._cfg.contentUpgrade||Ve,e),this}}function ir(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new jr("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function ar(e){return e&&"function"==typeof e.databases}function sr(e){return Ft((function(){return yt.letThrough=!0,e()}))}function ur(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function cr(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):K(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function lr(e,t,n){var r=arguments.length;if(r<2)throw new Be.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=pe(o);return[e,i,n]}function fr(e,t,n,r,o){return gt.resolve().then((()=>{const i=yt.transless||yt,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===$e.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>fr(e,t,n,null,o)))):en(r)}const u=Ee(o);let c;u&&Ht();const l=gt.follow((()=>{if(c=o.call(a,a),c)if(u){var e=Vt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=cr(c))}),s);return(c&&"function"==typeof c.then?gt.resolve(c).then((e=>a.active?e:en(new Be.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),en(e))))}))}function pr(e,t,n){const r=K(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const dr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=Zn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:Kn(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:pr(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:pr(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[Zn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(pr(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(pr(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function hr(e,t,n,r){return n=n||{},r=r||"",z(e).forEach((o=>{if(W(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=ge(i);e!==ge(a)?n[r+o]=t[o]:"Object"===e?hr(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),z(t).forEach((o=>{W(e,o)||(n[r+o]=t[o])})),n}const yr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=yt.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===Ve)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===Ve&&s.fire===Ve)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===Ve)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===Ve)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=yt.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||ce(e.values[o],r.keyPath,n))}else{const r=hr(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{W(t,e)?t[e]=i[e]:ce(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function vr(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===_n(t.keys[o],e[i])&&(r.push(n?ve(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const mr={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=vr(e.keys,e.trans._cache,"clone"===e.cache);return t?gt.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ve(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function br(e){return!("from"in e)}const gr=function(e,t){if(!this){const t=new gr;return e&&"d"in e&&G(t,e),t}G(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function wr(e,t,n){const r=_n(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(br(e))return G(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(_n(n,e.from)<0)return o?wr(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},_r(e);if(_n(t,e.to)>0)return i?wr(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},_r(e);_n(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),_n(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Sr(e,o),i&&a&&Sr(e,i)}function Sr(e,t){br(t)||function e(t,{from:n,to:r,l:o,r:i}){wr(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Or(e){let t=br(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&_n(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||_n(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function _r(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Er(n)}e.d=Er(e)}function Er({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Y(gr.prototype,{add(e){return Sr(this,e),this},addKey(e){return wr(this,e,e),this},addKeys(e){return e.forEach((e=>wr(this,e,e))),this},[we](){return Or(this)}});const xr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new gr(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new gr)},c=u(""),l=u(":dels"),{type:f}=e;let[p,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const h=e.trans._cache;return o.mutate(e).then((e=>{if(K(p)){"delete"!==f&&(p=e.results),c.addKeys(p);const t=vr(p,h);t||"add"===f||l.addKeys(p),(t||d)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&K(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==_n(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,d)}else if(p){const e={from:p.lower,to:p.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new gr(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new gr(e.key)],getMany:e=>[a,(new gr).addKeys(e.keys)],count:l,query:l,openCursor:l};return z(f).forEach((e=>{c[e]=function(i){const{subscr:a}=yt;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new gr)},l=c(""),p=c(":dels"),[d,h]=f[e](i);if(c(d.name||"").add(h),!d.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):p.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(p.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return p.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}p.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class jr{constructor(e,t){this._middlewares={},this.verno=0;const n=jr.dependencies;this._options=t={addons:jr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ve,dbReadyPromise:null,cancelOpen:Ve,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new gt((e=>{o.dbReadyResolve=e})),o.openCanceller=new gt(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=hn(this,"populate","blocked","versionchange","close",{ready:[Xe,Ve]}),this.on.ready.subscribe=oe(this.on.ready.subscribe,(e=>(t,n)=>{jr.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||gt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,yn(jn.prototype,(function(e,t){this.db=i;let n=fn,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==ze?s:null}}))),this.Table=function(e){return yn(dn.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:hn(null,{creating:[qe,Ve],reading:[Ke,ze],updating:[We,Ve],deleting:[Ze,Ve]})}))}(this),this.Transaction=function(e){return yn(Bn.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=hn(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new gt(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),en(e)}))}))}(this),this.Version=function(e){return yn(or.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return yn(Mn.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Be.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=zn(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),on.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(dr),this.use(yr),this.use(xr),this.use(mr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Be.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Be.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Jn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||yt.letThrough||this._vip)?e():new gt(((e,t)=>{if(this._state.openComplete)return t(new Be.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Be.DatabaseClosed);this.open().catch(Ve)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?en(t.dbOpenError):e));xe&&(t.openCanceller._stackHolder=Ae()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Be.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return gt.race([r,("undefined"==typeof navigator?gt.resolve():ur()).then((()=>new gt(((r,i)=>{if(o(),!n)throw new Be.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Be.MissingAPI;c.onerror=Nn(i),c.onblocked=Dt(e._fireOnBlocked),c.onupgradeneeded=Dt((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=$n,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Dt((()=>{i(new Be.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Nn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=yt.transless||yt;Ft((()=>{yt.trans=i,yt.transless=s,0===t?(z(o).forEach((e=>{er(n,e,o[e].primKey,o[e].indexes)})),Wn(e,n),gt.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=nr(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;rr(e,o,r),rr(e,u,r),a=e._dbSchema=u;const c=Qn(o,u);c.add.forEach((e=>{er(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Be.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>tr(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),tr(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){Wn(e,r),n._memoizedTables={},s=!0;let t=le(u);c.del.forEach((e=>{t[e]=o[e]})),Xn(e,[e.Transaction.prototype]),Yn(e,[e.Transaction.prototype],z(t),t),n.schema=t;const i=Ee(l);let a;i&&Ht();const f=gt.follow((()=>{if(a=l(n),a&&i){var e=Vt.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?gt.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&sn||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),Xn(e,[e.Transaction.prototype]),Yn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?gt.resolve(o.shift()(n.idbtrans)).then(e):gt.resolve()}().then((()=>{var e,t;t=r,z(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||er(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),c.onsuccess=Dt((()=>{a=null;const n=e._novip.idbdb=c.result,o=re(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=nr(0,t,n);e._storeNames=re(t.objectStoreNames,0),Yn(e,[e._allTables],z(r),r)}(e,n,r):(rr(e,e._dbSchema,r),function(e,t){const n=Qn(nr(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Wn(e,r)}catch(e){}var i;on.push(e),n.onversionchange=Dt((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Dt((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!ar(e)&&"__dbnames"!==n&&ir(e,t).put({name:n}).catch(Ve)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],gt.resolve(sr((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Xe,Ve);return t.onReadyBeingFired=[],gt.resolve(sr((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),en(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=on.indexOf(this);if(t>=0&&on.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new gt((t=>{e.dbReadyResolve=t})),e.openCanceller=new gt(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Be.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new gt(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Dt((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!ar(e)&&"__dbnames"!==n&&ir(e,t).delete(n).catch(Ve)}(this._deps,this.name),n()})),e.onerror=Nn(r),e.onblocked=this._fireOnBlocked};if(e)throw new Be.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return z(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=lr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=yt.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Be.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Be.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Be.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):en(e)}const s=fr.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):yt.trans?Wt(yt.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!W(this._allTables,e))throw new Be.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Cr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Pr{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Cr](){return this}}function Ar(e,t){return z(t).forEach((n=>{Sr(e[n]||(e[n]=new gr),t[n])})),e}let Ir;try{Ir={indexedDB:V.indexedDB||V.mozIndexedDB||V.webkitIndexedDB||V.msIndexedDB,IDBKeyRange:V.IDBKeyRange||V.webkitIDBKeyRange}}catch(r){Ir={indexedDB:null,IDBKeyRange:null}}const Tr=jr;function kr(e){let t=Rr;try{Rr=!0,Un.storagemutated.fire(e)}finally{Rr=t}}Y(Tr,{...He,delete:e=>new Tr(e,{addons:[]}).delete(),exists:e=>new Tr(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return ar(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):ir(e,t).toCollection().primaryKeys()}(Tr.dependencies).then(e)}catch(e){return en(new Be.MissingAPI)}},defineClass:()=>function(e){G(this,e)},ignoreTransaction:e=>yt.trans?Wt(yt.transless,e):e(),vip:sr,async:function(e){return function(){try{var t=cr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:gt.resolve(t)}catch(e){return en(e)}}},spawn:function(e,t,n){try{var r=cr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:gt.resolve(r)}catch(e){return en(e)}},currentTransaction:{get:()=>yt.trans||null},waitFor:function(e,t){const n=gt.resolve("function"==typeof e?Tr.ignoreTransaction(e):e).timeout(t||6e4);return yt.trans?yt.trans.waitFor(n):n},Promise:gt,debug:{get:()=>xe,set:e=>{je(e,"dexie"===e?()=>!0:cn)}},derive:Q,extend:G,props:Y,override:oe,Events:hn,on:Un,liveQuery:function(e){return new Pr((t=>{const n=Ee(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Un.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return z(i).some((e=>o[e]&&function(e,t){const n=Or(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Or(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(_n(s.from,o.to)<=0&&_n(s.to,o.from)>=0)return!0;_n(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Ar(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const p={},d=function(t){n&&Ht();const r=()=>Ft(e,{subscr:t,trans:null}),o=yt.trans?Wt(yt.transless,r):r();return n&&o.then(Vt,Vt),o}(p);u||(Un("storagemutated",l),u=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(c()?f():(o={},i=p,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Ar,getByKeyPath:ue,setByKeyPath:ce,delByKeyPath:function(e,t){"string"==typeof t?ce(e,t,void 0):"length"in t&&[].map.call(t,(function(t){ce(e,t,void 0)}))},shallowClone:le,deepClone:ve,getObjectDiff:hr,cmp:_n,asap:ae,minKey:-1/0,addons:[],connections:on,errnames:$e,dependencies:Ir,semVer:"3.2.2",version:"3.2.2".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Tr.maxKey=zn(Tr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Un("storagemutated",(e=>{if(!Rr){let t;an?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Rr=!0,dispatchEvent(t),Rr=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Rr||kr(e)})));let Rr=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");Un("storagemutated",(t=>{Rr||e.postMessage(t)})),e.onmessage=e=>{e.data&&kr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Un("storagemutated",(e=>{try{Rr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&kr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&kr(e.changedParts)}))}gt.rejectionMapper=function(e,t){if(!e||e instanceof De||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Fe[e.name])return e;var n=new Fe[e.name](t||e.message,e);return"stack"in e&&J(n,"stack",{get:function(){return this.inner.stack}}),n},je(xe,cn);var Dr=a(766),Lr=a(685);function Mr(e){return Mr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mr(e)}function Nr(e,t){return!t||"object"!==Ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $r(e,t){return $r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$r(e,t)}var Ur=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$r(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Mr(t);if(n){var o=Mr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Nr(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return o}(jr);function Fr(){return new Br}function Hr(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 Vr(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function zr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Vr(i,r,o,a,s,"next",e)}function s(e){Vr(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(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){Kr(e,t,n[t])}))}return e}function qr(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Zr(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hr(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)?Hr(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 Wr,Yr=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Xr=new Br,Jr={},Qr=(0,Lr.createGlobalStore)("offline-synchronization",{});function eo(){return Qr}function to(){return no.apply(this,arguments)}function no(){return no=zr((function(){var e,t,n,r,o,i,a,s,u,c,l,f,p;return Yr(this,(function(d){switch(d.label){case 0:return Qr.getState().synchronization?[2]:[4,Xr.syncQueue.count()];case 1:e=d.sent(),t={},n=Object.entries(Jr),r=n.length,o={},i=new AbortController,a=function(){var e=Qr.getState().synchronization;Qr.setState({synchronization:qr(Gr({},e),{pendingCount:e.pendingCount-1})})},d.label=2;case 2:d.trys.push([2,,10,11]),Qr.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),s=0,d.label=3;case 3:if(!(s<r&&n.length>0))return[3,8];u=n.length,d.label=4;case 4:return u--?(c=Zr(n[u],2),l=c[0],f=c[1],(p=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(p)]):[3,6]):[3,7];case 5:d.sent(),t[l]=ro(f,o,i,a),n.splice(u,1),d.label=6;case 6:return[3,4];case 7:return s++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return d.sent(),[3,11];case 10:return Qr.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),no.apply(this,arguments)}function ro(e,t,n,r){return oo.apply(this,arguments)}function oo(){return oo=zr((function(e,t,n,r){var o,i,a,s,u,c,l,f,p,d,h,y,v,m,b,g,w;return Yr(this,(function(S){switch(S.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,s=[],u=[],[4,io()];case 1:return c=S.sent(),[4,Xr.syncQueue.where({type:o,userId:c}).each((function(e,t){s.push([t.primaryKey,e.content,e.descriptor]),u.push(e.content)}))];case 2:S.sent(),l=0,S.label=3;case 3:if(!(l<s.length))return[3,11];f=Zr(s[l],3),p=f[0],d=f[1],h=f[2],y=h.id,v=h.dependencies,m=void 0===v?[]:v,S.label=4;case 4:return S.trys.push([4,7,9,10]),[4,a(d,{abort:n,index:l,items:u,userId:c,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return b=S.sent(),void 0!==y&&(t[o][y]=b),[4,Xr.syncQueue.delete(p)];case 6:return S.sent(),[3,10];case 7:return g=S.sent(),[4,Xr.syncQueue.update(p,{lastError:{name:null==g?void 0:g.name,message:null!==(w=null==g?void 0:g.message)&&void 0!==w?w:null==g?void 0:g.toString()}})];case 8:return S.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),oo.apply(this,arguments)}function io(){return ao.apply(this,arguments)}function ao(){return(ao=zr((function(){var e;return Yr(this,(function(t){switch(t.label){case 0:return[4,(0,Dr.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function so(e,t,n,r){return uo.apply(this,arguments)}function uo(){return(uo=zr((function(e,t,n,r){var o;return Yr(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Xr.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(jr.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Xr.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(jr.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function co(e,t,n){return lo.apply(this,arguments)}function lo(){return(lo=zr((function(e,t,n){return Yr(this,(function(r){switch(r.label){case 0:return[4,io()];case 1:return[4,so(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function fo(e,t){return po.apply(this,arguments)}function po(){return(po=zr((function(e,t){return Yr(this,(function(n){switch(n.label){case 0:return[4,ho(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function ho(e,t){return yo.apply(this,arguments)}function yo(){return(yo=zr((function(e,t){var n;return Yr(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Xr.syncQueue.where(n).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function vo(e){return mo.apply(this,arguments)}function mo(){return(mo=zr((function(e){return Yr(this,(function(t){switch(t.label){case 0:return[4,io()];case 1:return[4,fo(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function bo(e){return go.apply(this,arguments)}function go(){return(go=zr((function(e){return Yr(this,(function(t){switch(t.label){case 0:return[4,io()];case 1:return[4,ho(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function wo(e){return So.apply(this,arguments)}function So(){return(So=zr((function(e){return Yr(this,(function(t){switch(t.label){case 0:return[4,Xr.syncQueue.get(e).catch(jr.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function Oo(e){var t;return!!(null===(t=Jr[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)}function _o(e){return Eo.apply(this,arguments)}function Eo(){return(Eo=zr((function(e){var t,n,r;return Yr(this,(function(o){switch(o.label){case 0:return[4,wo(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=Jr[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function xo(e){return jo.apply(this,arguments)}function jo(){return(jo=zr((function(e){return Yr(this,(function(t){switch(t.label){case 0:return[4,Xr.syncQueue.delete(e).catch(jr.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function Co(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Jr[e]={type:e,dependsOn:t,process:n,options:r}}var Po=new Uint8Array(16);function Ao(){if(!Wr&&!(Wr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wr(Po)}const Io=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,To=function(e){return"string"==typeof e&&Io.test(e)};for(var ko=[],Ro=0;Ro<256;++Ro)ko.push((Ro+256).toString(16).substr(1));const Do=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ko[e[t+0]]+ko[e[t+1]]+ko[e[t+2]]+ko[e[t+3]]+"-"+ko[e[t+4]]+ko[e[t+5]]+"-"+ko[e[t+6]]+ko[e[t+7]]+"-"+ko[e[t+8]]+ko[e[t+9]]+"-"+ko[e[t+10]]+ko[e[t+11]]+ko[e[t+12]]+ko[e[t+13]]+ko[e[t+14]]+ko[e[t+15]]).toLowerCase();if(!To(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var Lo="OFFLINE+";function Mo(){return Lo+Do()}function No(e){return e.startsWith(Lo)}function $o(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 Uo(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Bo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Uo(i,r,o,a,s,"next",e)}function s(e){Uo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Fo(e){return function(e){if(Array.isArray(e))return $o(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 $o(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)?$o(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 Ho=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Vo={};function zo(){return Object.values(Vo)}function Ko(e){Vo[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),Vo[e.id]=e}function Go(e){return qo.apply(this,arguments)}function qo(){return(qo=Bo((function(e){return Ho(this,(function(t){switch(t.label){case 0:return[4,ui()];case 1:return[4,Zo(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function Zo(e,t){return Wo.apply(this,arguments)}function Wo(){return(Wo=Bo((function(e,t){var n;return Ho(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new Br).dynamicOfflineData.where(n).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Yo(e,t){return Xo.apply(this,arguments)}function Xo(){return(Xo=Bo((function(e,t){return Ho(this,(function(n){switch(n.label){case 0:return[4,ui()];case 1:return[4,Jo(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function Jo(e,t,n){return Qo.apply(this,arguments)}function Qo(){return Qo=Bo((function(e,t,n){var r,o;return Ho(this,(function(i){switch(i.label){case 0:return[4,(r=new Br).dynamicOfflineData.get({type:t,identifier:n}).catch(jr.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(jr.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:Fo(o.users).concat([e])}).catch(jr.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),Qo.apply(this,arguments)}function ei(e,t){return ti.apply(this,arguments)}function ti(){return(ti=Bo((function(e,t){return Ho(this,(function(n){switch(n.label){case 0:return[4,ui()];case 1:return[4,ni(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function ni(e,t,n){return ri.apply(this,arguments)}function ri(){return ri=Bo((function(e,t,n){var r,o;return Ho(this,(function(i){switch(i.label){case 0:return[4,(r=new Br).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(jr.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(jr.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(jr.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),ri.apply(this,arguments)}function oi(e,t){return ii.apply(this,arguments)}function ii(){return ii=Bo((function(e,t){var n;return Ho(this,(function(r){switch(r.label){case 0:return[4,Go(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=Bo((function(e){return Ho(this,(function(n){return[2,ai(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),ii.apply(this,arguments)}function ai(e,t,n){return si.apply(this,arguments)}function si(){return si=Bo((function(e,t,n){var r,o,i,a,s,u,c,l,f;return Ho(this,(function(p){switch(p.label){case 0:return[4,Yo(e,t)];case 1:return p.sent(),r=new Br,[4,ui()];case 2:return o=p.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(jr.errnames.DatabaseClosed,(function(){}))];case 3:return i=p.sent(),a=zo().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((d=Bo((function(e){var r,o,i;return Ho(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return d.apply(this,arguments)})))]:[2];case 4:return s=p.sent(),u=s.filter((function(e){return!e.error})).map((function(e){return e.id})),c=s.filter((function(e){return e.error})).map((function(e){return e.id})),l=s.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:u,erroredHandlers:c,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(jr.errnames.DatabaseClosed)]:[3,6];case 5:p.sent(),p.label=6;case 6:return[2]}var d}))})),si.apply(this,arguments)}function ui(){return ci.apply(this,arguments)}function ci(){return(ci=Bo((function(){var e;return Ho(this,(function(t){switch(t.label){case 0:return[4,(0,Dr.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}function li(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function fi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){li(i,r,o,a,s,"next",e)}function s(e){li(i,r,o,a,s,"throw",e)}a(void 0)}))}}var pi=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},di=(0,Lr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function hi(){return bi(),di}function yi(e,t){bi(),Ko({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})}function vi(e){return mi.apply(this,arguments)}function mi(){return(mi=fi((function(e){return pi(this,(function(t){switch(t.label){case 0:return bi(),[4,ai("patient",e)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function bi(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}})(),s})())}}}))},211:(e,t,n)=>{e=n.nmd(e),System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(r,o){var i={},a={},s={},u={},c={},l={},f={},p={},d={};return Object.defineProperty(c,"__esModule",{value:!0}),{setters:[function(e){i.createContext=e.createContext,i.createElement=e.createElement,i.default=e.default,i.useCallback=e.useCallback,i.useContext=e.useContext,i.useDebugValue=e.useDebugValue,i.useEffect=e.useEffect,i.useLayoutEffect=e.useLayoutEffect,i.useMemo=e.useMemo,i.useReducer=e.useReducer,i.useRef=e.useRef,i.useState=e.useState},function(e){a.getConfigStore=e.getConfigStore,a.getExtensionConfigFromStore=e.getExtensionConfigFromStore,a.getExtensionsConfigStore=e.getExtensionsConfigStore,a.interpolateUrl=e.interpolateUrl,a.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){u.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){Object.keys(e).forEach((function(t){c[t]=e[t]}))},function(e){l.default=e.default},function(e){f.I18nextProvider=e.I18nextProvider},function(e){p.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,p.fetchCurrentPatient=e.fetchCurrentPatient,p.getCurrentUser=e.getCurrentUser,p.getLocations=e.getLocations,p.getSessionStore=e.getSessionStore,p.getVisitTypes=e.getVisitTypes,p.openmrsFetch=e.openmrsFetch,p.userHasAccess=e.userHasAccess},function(e){d.default=e.default}],execute:function(){r((()=>{var r={4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},5549:(e,t,n)=>{var r=n(4457)(n(441),"DataView");e.exports=r},4613:(e,t,n)=>{var r=n(8145),o=n(9096),i=n(5239),a=n(8228),s=n(5920);function u(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])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},131:(e,t,n)=>{var r=n(7168),o=n(6582),i=n(3867),a=n(9557),s=n(2726);function u(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])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},4438:(e,t,n)=>{var r=n(4457)(n(441),"Map");e.exports=r},278:(e,t,n)=>{var r=n(7076),o=n(2530),i=n(4858),a=n(6265),s=n(9909);function u(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])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},385:(e,t,n)=>{var r=n(4457)(n(441),"Promise");e.exports=r},9902:(e,t,n)=>{var r=n(4457)(n(441),"Set");e.exports=r},1124:(e,t,n)=>{var r=n(278),o=n(6718),i=n(6996);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},4281:(e,t,n)=>{var r=n(131),o=n(560),i=n(8282),a=n(6638),s=n(4270),u=n(3229);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},4690:(e,t,n)=>{var r=n(441).Symbol;e.exports=r},5982:(e,t,n)=>{var r=n(441).Uint8Array;e.exports=r},8965:(e,t,n)=>{var r=n(4457)(n(441),"WeakMap");e.exports=r},9037:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},6222:(e,t,n)=>{var r=n(5092),o=n(6981),i=n(7236),a=n(8752),s=n(4363),u=n(4812),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],y=h.length;for(var v in e)!t&&!c.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||h.push(v);return h}},3848:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4793:e=>{e.exports=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}},3833:(e,t,n)=>{var r=n(6530);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9329:(e,t,n)=>{var r=n(3848),o=n(7236);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4318:(e,t,n)=>{var r=n(4690),o=n(7077),i=n(1954),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8520:(e,t,n)=>{var r=n(4318),o=n(3387);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},1071:(e,t,n)=>{var r=n(7229),o=n(3387);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},7229:(e,t,n)=>{var r=n(4281),o=n(2503),i=n(6001),a=n(8784),s=n(6686),u=n(7236),c=n(8752),l=n(4812),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,v,m){var b=u(e),g=u(t),w=b?p:s(e),S=g?p:s(t),O=(w=w==f?d:w)==d,_=(S=S==f?d:S)==d,E=w==S;if(E&&c(e)){if(!c(t))return!1;b=!0,O=!1}if(E&&!O)return m||(m=new r),b||l(e)?o(e,t,n,y,v,m):i(e,t,w,n,y,v,m);if(!(1&n)){var x=O&&h.call(e,"__wrapped__"),j=_&&h.call(t,"__wrapped__");if(x||j){var C=x?e.value():e,P=j?t.value():t;return m||(m=new r),v(C,P,n,y,m)}}return!!E&&(m||(m=new r),a(e,t,n,y,v,m))}},2987:(e,t,n)=>{var r=n(3839),o=n(7275),i=n(5973),a=n(6822),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},3749:(e,t,n)=>{var r=n(4318),o=n(9216),i=n(3387),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,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},8803:(e,t,n)=>{var r=n(5003),o=n(1466),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5092:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},6535:e=>{e.exports=function(e){return function(t){return e(t)}}},555:e=>{e.exports=function(e,t){return e.has(t)}},8507:(e,t,n)=>{var r=n(441)["__core-js_shared__"];e.exports=r},2503:(e,t,n)=>{var r=n(1124),o=n(4793),i=n(555);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e),d=u.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<l;){var m=e[h],b=t[h];if(a)var g=c?a(b,m,h,t,e,u):a(m,b,h,e,t,u);if(void 0!==g){if(g)continue;y=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(m===e||s(m,e,n,a,u)))return v.push(t)}))){y=!1;break}}else if(m!==b&&!s(m,b,n,a,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},6001:(e,t,n)=>{var r=n(4690),o=n(5982),i=n(6530),a=n(2503),s=n(2876),u=n(6350),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){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||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+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 d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var v=a(d(e),d(t),r,c,f,p);return p.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},8784:(e,t,n)=>{var r=n(6094),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:o.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var m=e[p=c[f]],b=t[p];if(i)var g=u?i(b,m,p,t,e,s):i(m,b,p,e,t,s);if(!(void 0===g?m===b||a(m,b,n,i,s):g)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(y=!1)}return s.delete(e),s.delete(t),y}},4414:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},6094:(e,t,n)=>{var r=n(9329),o=n(5904),i=n(2635);e.exports=function(e){return r(e,i,o)}},2907:(e,t,n)=>{var r=n(7620);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},4457:(e,t,n)=>{var r=n(2987),o=n(9741);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},7077:(e,t,n)=>{var r=n(4690),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},5904:(e,t,n)=>{var r=n(9037),o=n(7471),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},6686:(e,t,n)=>{var r=n(5549),o=n(4438),i=n(385),a=n(9902),s=n(8965),u=n(4318),c=n(6822),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=c(r),v=c(o),m=c(i),b=c(a),g=c(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=l||i&&w(i.resolve())!=f||a&&w(new a)!=p||s&&w(new s)!=d)&&(w=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return h;case v:return l;case m:return f;case b:return p;case g:return d}return t}),e.exports=w},9741:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},8145:(e,t,n)=>{var r=n(5148);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9096:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},5239:(e,t,n)=>{var r=n(5148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},8228:(e,t,n)=>{var r=n(5148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},5920:(e,t,n)=>{var r=n(5148);e.exports=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}},4363:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7620:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7275:(e,t,n)=>{var r,o=n(8507),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5003:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7168:e=>{e.exports=function(){this.__data__=[],this.size=0}},6582:(e,t,n)=>{var r=n(3833),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},3867:(e,t,n)=>{var r=n(3833);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},9557:(e,t,n)=>{var r=n(3833);e.exports=function(e){return r(this.__data__,e)>-1}},2726:(e,t,n)=>{var r=n(3833);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},7076:(e,t,n)=>{var r=n(4613),o=n(131),i=n(4438);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},2530:(e,t,n)=>{var r=n(2907);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},4858:(e,t,n)=>{var r=n(2907);e.exports=function(e){return r(this,e).get(e)}},6265:(e,t,n)=>{var r=n(2907);e.exports=function(e){return r(this,e).has(e)}},9909:(e,t,n)=>{var r=n(2907);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},2876:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},5148:(e,t,n)=>{var r=n(4457)(Object,"create");e.exports=r},1466:(e,t,n)=>{var r=n(3717)(Object.keys,Object);e.exports=r},1782:(e,t,n)=>{e=n.nmd(e);var r=n(4414),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},1954:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3717:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},441:(e,t,n)=>{var r=n(4414),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},6718:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},6996:e=>{e.exports=function(e){return this.__data__.has(e)}},6350:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},560:(e,t,n)=>{var r=n(131);e.exports=function(){this.__data__=new r,this.size=0}},8282:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},6638:e=>{e.exports=function(e){return this.__data__.get(e)}},4270:e=>{e.exports=function(e){return this.__data__.has(e)}},3229:(e,t,n)=>{var r=n(131),o=n(4438),i=n(278);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},6822:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},6530:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6981:(e,t,n)=>{var r=n(8520),o=n(3387),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},7236:e=>{var t=Array.isArray;e.exports=t},1580:(e,t,n)=>{var r=n(3839),o=n(9216);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},8752:(e,t,n)=>{e=n.nmd(e);var r=n(441),o=n(7149),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u},9793:(e,t,n)=>{var r=n(1071);e.exports=function(e,t){return r(e,t)}},3839:(e,t,n)=>{var r=n(4318),o=n(5973);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9216:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5973:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3387:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4812:(e,t,n)=>{var r=n(3749),o=n(6535),i=n(1782),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},2635:(e,t,n)=>{var r=n(6222),o=n(8803),i=n(1580);e.exports=function(e){return i(e)?r(e):o(e)}},7471:e=>{e.exports=function(){return[]}},7149:e=>{e.exports=function(){return!1}},4645:(e,t,n)=>{"use strict";var r=n(493);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},5385:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=c[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return c[e]={value:o,active:!0},o},i=function(e,n){var r=c[e];if(!r){var o=t(n);return c[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},s=function(){return i("app",{})},u=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return s},getGlobalStore:function(){return i},subscribeTo:function(){return u}});var c={}}(),o}())}}}))},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:e=>{"use strict";e.exports=p},9824:e=>{"use strict";e.exports=a},45:e=>{"use strict";e.exports=s},5728:e=>{"use strict";e.exports=u},9688:e=>{"use strict";e.exports=d},7064:e=>{"use strict";e.exports=l},5954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=c},8834:e=>{"use strict";e.exports=f}},h={};function y(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,y),n.loaded=!0,n.exports}y.y=o,y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return y.d(t,{a:t}),t},y.d=(e,t)=>{for(var n in t)y.o(t,n)&&!y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),y.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},y.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;y.g.importScripts&&(e=y.g.location+"");var t=y.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),y.p=e})();var v={};return(0,y(7968).s)(1),(()=>{"use strict";y.r(v),y.d(v,{ComponentContext:()=>o,ConfigurableLink:()=>s,Extension:()=>b,ExtensionSlot:()=>k,UserHasAccess:()=>Qn,createUseStore:()=>l,getAsyncExtensionLifecycle:()=>le,getAsyncLifecycle:()=>ue,getLifecycle:()=>se,getSyncLifecycle:()=>ce,isDesktop:()=>Gn,openmrsComponentDecorator:()=>ae,useAssignedExtensionIds:()=>fn,useAssignedExtensions:()=>x,useBodyScrollLock:()=>pn,useConfig:()=>mn,useConnectedExtensions:()=>j,useConnectivity:()=>S,useCurrentPatient:()=>Nn,useExtensionInternalStore:()=>$n,useExtensionSlot:()=>C,useExtensionSlotMeta:()=>Un,useExtensionStore:()=>Bn,useForceUpdate:()=>Hn,useLayoutType:()=>Kn,useLocations:()=>Zn,useOnClickOutside:()=>Wn,usePagination:()=>fo,usePatient:()=>Pn,useSession:()=>tr,useStore:()=>cr,useStoreWithActions:()=>lr,useVisit:()=>ao,useVisitTypes:()=>uo});var r=y(5954),o=r.default.createContext({moduleName:""}),i=y(9824);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function s(e){var t=e.to,n=e.templateParams,o=e.children,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return r.default.createElement("a",a({onClick:function(e){return function(e,t,n){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,i.navigate)({to:t,templateParams:n}))}(e,t,n)},href:(0,i.interpolateUrl)(t,n)},s),o)}function u(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 c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(t){var n=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,2);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)?u(e,2):void 0}}(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.")}()}((0,r.useState)(e.getState())),o=n[0],i=n[1];(0,r.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var a={};return t&&(a=(0,r.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(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){c(e,t,n[t])}))}return e}({},o,a)}}var f=y(45);function p(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,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function m(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){d(e,t,n[t])}))}return e}var b=function(e){var t=e.state,n=e.children,i=e.wrap,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["state","children","wrap"]),s=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,2);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)?p(e,2):void 0}}(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.")}()}((0,r.useState)()),u=s[0],c=s[1],l=(0,r.useContext)(o).extension,d=(0,r.useRef)(null),y=(0,r.useRef)(null);(0,r.useEffect)((function(){i&&console.warn("'wrap' prop of Extension is being used ".concat((null==l?void 0:l.extensionId)?"by ".concat(l.extensionId," in ").concat(l.extensionSlotName):"",". This will be removed in a future release."))}),[]);var v=(0,r.useCallback)((function(e){c(e)}),[c]);(0,r.useEffect)((function(){if(null!=u&&l&&!d.current)return(0,f.renderExtension)(u,l.extensionSlotName,l.extensionSlotModuleName,l.extensionId,void 0,t).then((function(e){d.current=e})),function(){if(d&&d.current)switch(d.current.getStatus()){case"MOUNTING":d.current.mountPromise.then(d.current.unmount);break;case"MOUNTED":d.current.unmount();break;case"UPDATING":y.current&&y.current.then((function(){d.current&&"MOUNTED"===d.current.getStatus()&&d.current.unmount()}))}}}),[null==l?void 0:l.extensionSlotName,null==l?void 0:l.extensionId,null==l?void 0:l.extensionSlotModuleName,u]),(0,r.useEffect)((function(){return d.current&&d.current.update&&("MOUNTED"===d.current.getStatus()?d.current.update(m({},t)):"MOUNTING"===d.current.getStatus()&&d.current.mountPromise.then((function(){d.current&&d.current.update&&(y.current=d.current.update(m({},t)))}))),function(){y.current=null}}),[d.current,t]);var b=r.default.createElement("div",h({ref:v,"data-extension-id":null==l?void 0:l.extensionId,style:{position:"relative"}},a));return"function"!=typeof n||r.default.isValidElement(n)?l&&i?i(b,l):b:r.default.createElement(r.default.Fragment,null,n(b))},g=y(5728);function w(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 S(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,2);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)?w(e,2):void 0}}(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.")}()}((0,r.useState)(window.navigator.onLine)),t=e[0],n=e[1];return(0,r.useEffect)((function(){return(0,g.subscribeConnectivityChanged)((function(e){var t=e.online;return n(t)}))}),[]),t}var O=y(9793),_=y.n(O);function E(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 x(e){var t=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return E(e,2);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)?E(e,2):void 0}}(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.")}()}((0,r.useState)([])),n=t[0],o=t[1];return(0,r.useEffect)((function(){var t=function(t){var r,i,a=null!==(i=null===(r=t.slots[e])||void 0===r?void 0:r.assignedExtensions)&&void 0!==i?i:[];_()(a,n)||o(a)};return t((0,f.getExtensionStore)().getState()),(0,f.getExtensionStore)().subscribe(t)}),[e,n]),n}function j(e){var t=S(),n=x(e);return(0,r.useMemo)((function(){return(0,f.getConnectedExtensions)(n,t)}),[n,t])}function C(e){var t=(0,r.useContext)(o).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)((function(){(0,f.registerExtensionSlot)(t,e)}),[]),{extensions:j(e),extensionSlotName:e,extensionSlotModuleName:t}}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}function I(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){P(e,t,n[t])}))}return e}function T(e){return e}function k(e){var t=e.name,n=e.extensionSlotName,i=e.select,a=void 0===i?T:i,s=e.children,u=e.state,c=e.style,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["name","extensionSlotName","select","children","state","style"]);if(s&&u)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var f,p,d,h,y=null!=t?t:n,v=(0,r.useRef)(null),m=C(y),g=m.extensions,w=m.extensionSlotModuleName,S=(0,r.useMemo)((function(){return a(g)}),[a,g]),O=(0,r.useMemo)((function(){if("function"==typeof s&&!r.default.isValidElement(s))return S.map((function(e){return s(e)}))}),[s,S]);return r.default.createElement("div",A({ref:v,"data-extension-slot-name":y,"data-extension-slot-module-name":w,style:(d=I({},c),h={position:"relative"},h=null!=h?h:{},Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(h)).forEach((function(e){Object.defineProperty(d,e,Object.getOwnPropertyDescriptor(h,e))})),d)},l),y&&S.map((function(e,t){return r.default.createElement(o.Provider,{key:e.id,value:{moduleName:w,extension:{extensionId:e.id,extensionSlotName:y,extensionSlotModuleName:w}}},null!==(p=null!==(f=null==O?void 0:O[t])&&void 0!==f?f:"function"!=typeof s?s:null)&&void 0!==p?p:r.default.createElement(b,{state:u}))})))}var R=y(4645);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat($(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat($(e)));return e}}var B=null;try{B=n(268).createContext()}catch(D){}var F={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,renderType:"createRoot",errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function H(e){if("object"!==M(e))throw new Error("single-spa-react requires a configuration object");var t=L(L({},F),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM&&!t.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!B&&t.React.createContext&&(B=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:V.bind(null,t),mount:z.bind(null,t),unmount:K.bind(null,t)};return t.parcelCanUpdate&&(n.update=G.bind(null,t)),n}function V(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function z(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=W(e,t,(function(){n(this)})),i=U(e,t)(),a=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:q(e),renderType:Z(e)});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function K(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():q(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function G(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=W(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=U(e,t)();q(e).render(r,i)}}))}function q(e){return e.ReactDOMClient||e.ReactDOM}function Z(e){return"function"==typeof e.renderType?e.renderType():e.renderType}function W(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=B?e.React.createElement(B.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,L(L({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)}var Y=y(7064),X=y(8834);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function ee(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function te(e,t){return te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},te(e,t)}var ne=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},re=Y.default.default||Y.default,oe={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},ie=function(e){(0,r.useEffect)((function(){return re.on("languageChanged",e.forceUpdate),function(){return re.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,r.useRef)(null);if(t.current)throw t.current;if(!re.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw re.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return r.default.createElement(r.default.Fragment,null,e.children)};function ae(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},oe,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(u,n);var i,a,s=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(i);if(a){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ee(this,e)});function u(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=s.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=u.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){var n=this;if(this.state.caughtError)return r.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var i=r.default.createElement(o.Provider,{value:this.state.config},r.default.createElement(r.default.Suspense,{fallback:null},t.disableTranslations?r.default.createElement(e,J({},this.props)):r.default.createElement(ie,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},r.default.createElement(X.I18nextProvider,{i18n:re,defaultNS:t.moduleName},r.default.createElement(e,J({},this.props))))));return t.strictMode||!r.default.StrictMode?i:r.default.createElement(r.default.StrictMode,null,i)},u}(r.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}}function se(e,t){return H({React:r.default,ReactDOMClient:R,rootComponent:ae(t)(e)})}function ue(e,t){return function(){return e().then((function(e){return se(e.default,t)}))}}function ce(e,t){return function(){return Promise.resolve(se(e,t))}}var le=ue;const fe=function(e,t){return e===t||e!=e&&t!=t},pe=function(e,t){for(var n=e.length;n--;)if(fe(e[n][0],t))return n;return-1};var de=Array.prototype.splice;function he(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])}}he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(e){var t=this.__data__,n=pe(t,e);return!(n<0||(n==t.length-1?t.pop():de.call(t,n,1),--this.size,0))},he.prototype.get=function(e){var t=this.__data__,n=pe(t,e);return n<0?void 0:t[n][1]},he.prototype.has=function(e){return pe(this.__data__,e)>-1},he.prototype.set=function(e,t){var n=this.__data__,r=pe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const ye=he,ve="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var me="object"==typeof self&&self&&self.Object===Object&&self;const be=ve||me||Function("return this")(),ge=be.Symbol;var we=Object.prototype,Se=we.hasOwnProperty,Oe=we.toString,_e=ge?ge.toStringTag:void 0,Ee=Object.prototype.toString,xe=ge?ge.toStringTag:void 0;const je=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":xe&&xe in Object(e)?function(e){var t=Se.call(e,_e),n=e[_e];try{e[_e]=void 0;var r=!0}catch(e){}var o=Oe.call(e);return r&&(t?e[_e]=n:delete e[_e]),o}(e):function(e){return Ee.call(e)}(e)},Ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Pe=function(e){if(!Ce(e))return!1;var t=je(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ae=be["__core-js_shared__"];var Ie,Te=(Ie=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||""))?"Symbol(src)_1."+Ie:"",ke=Function.prototype.toString;const Re=function(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var De=/^\[object .+?Constructor\]$/,Le=Function.prototype,Me=Object.prototype,Ne=Le.toString,$e=Me.hasOwnProperty,Ue=RegExp("^"+Ne.call($e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Be=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ce(e)||(t=e,Te&&Te in t))&&(Pe(e)?Ue:De).test(Re(e));var t}(n)?n:void 0},Fe=Be(be,"Map"),He=Be(Object,"create");var Ve=Object.prototype.hasOwnProperty,ze=Object.prototype.hasOwnProperty;function Ke(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])}}Ke.prototype.clear=function(){this.__data__=He?He(null):{},this.size=0},Ke.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ke.prototype.get=function(e){var t=this.__data__;if(He){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ve.call(t,e)?t[e]:void 0},Ke.prototype.has=function(e){var t=this.__data__;return He?void 0!==t[e]:ze.call(t,e)},Ke.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=He&&void 0===t?"__lodash_hash_undefined__":t,this};const Ge=Ke,qe=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function Ze(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])}}Ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Ge,map:new(Fe||ye),string:new Ge}},Ze.prototype.delete=function(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t},Ze.prototype.get=function(e){return qe(this,e).get(e)},Ze.prototype.has=function(e){return qe(this,e).has(e)},Ze.prototype.set=function(e,t){var n=qe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const We=Ze;function Ye(e){var t=this.__data__=new ye(e);this.size=t.size}Ye.prototype.clear=function(){this.__data__=new ye,this.size=0},Ye.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ye.prototype.get=function(e){return this.__data__.get(e)},Ye.prototype.has=function(e){return this.__data__.has(e)},Ye.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!Fe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new We(r)}return n.set(e,t),this.size=n.size,this};const Xe=Ye;function Je(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new We;++t<n;)this.add(e[t])}Je.prototype.add=Je.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Je.prototype.has=function(e){return this.__data__.has(e)};const Qe=Je,et=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},tt=function(e,t){return e.has(t)},nt=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new Qe:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],y=t[f];if(r)var v=a?r(y,h,f,t,e,i):r(h,y,f,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!et(t,(function(e,t){if(!tt(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},rt=be.Uint8Array,ot=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},it=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var at=ge?ge.prototype:void 0,st=at?at.valueOf:void 0;const ut=Array.isArray;var ct=Object.prototype.propertyIsEnumerable,lt=Object.getOwnPropertySymbols;const ft=lt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(lt(e),(function(t){return ct.call(e,t)})))}:function(){return[]},pt=function(e){return null!=e&&"object"==typeof e},dt=function(e){return pt(e)&&"[object Arguments]"==je(e)};var ht=Object.prototype,yt=ht.hasOwnProperty,vt=ht.propertyIsEnumerable,mt=dt(function(){return arguments}())?dt:function(e){return pt(e)&&yt.call(e,"callee")&&!vt.call(e,"callee")};const bt=mt;var gt=t&&!t.nodeType&&t,wt=gt&&e&&!e.nodeType&&e,St=wt&&wt.exports===gt?be.Buffer:void 0;const Ot=(St?St.isBuffer:void 0)||function(){return!1};var _t=/^(?:0|[1-9]\d*)$/;const Et=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_t.test(e))&&e>-1&&e%1==0&&e<t},xt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var jt={};jt["[object Float32Array]"]=jt["[object Float64Array]"]=jt["[object Int8Array]"]=jt["[object Int16Array]"]=jt["[object Int32Array]"]=jt["[object Uint8Array]"]=jt["[object Uint8ClampedArray]"]=jt["[object Uint16Array]"]=jt["[object Uint32Array]"]=!0,jt["[object Arguments]"]=jt["[object Array]"]=jt["[object ArrayBuffer]"]=jt["[object Boolean]"]=jt["[object DataView]"]=jt["[object Date]"]=jt["[object Error]"]=jt["[object Function]"]=jt["[object Map]"]=jt["[object Number]"]=jt["[object Object]"]=jt["[object RegExp]"]=jt["[object Set]"]=jt["[object String]"]=jt["[object WeakMap]"]=!1;var Ct=t&&!t.nodeType&&t,Pt=Ct&&e&&!e.nodeType&&e,At=Pt&&Pt.exports===Ct&&ve.process,It=function(){try{return Pt&&Pt.require&&Pt.require("util").types||At&&At.binding&&At.binding("util")}catch(e){}}(),Tt=It&&It.isTypedArray;const kt=Tt?(Rt=Tt,function(e){return Rt(e)}):function(e){return pt(e)&&xt(e.length)&&!!jt[je(e)]};var Rt,Dt=Object.prototype.hasOwnProperty,Lt=Object.prototype;const Mt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Nt=Object.prototype.hasOwnProperty;const $t=function(e){return null!=(t=e)&&xt(t.length)&&!Pe(t)?function(e,t){var n=ut(e),r=!n&&bt(e),o=!n&&!r&&Ot(e),i=!n&&!r&&!o&&kt(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!Dt.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Et(c,u))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Lt))return Mt(e);var t,n,r=[];for(var o in Object(e))Nt.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ut=function(e){return function(e,t,n){var r=t(e);return ut(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,$t,ft)};var Bt=Object.prototype.hasOwnProperty;const Ft=Be(be,"DataView"),Ht=Be(be,"Promise"),Vt=Be(be,"Set"),zt=Be(be,"WeakMap");var Kt="[object Map]",Gt="[object Promise]",qt="[object Set]",Zt="[object WeakMap]",Wt="[object DataView]",Yt=Re(Ft),Xt=Re(Fe),Jt=Re(Ht),Qt=Re(Vt),en=Re(zt),tn=je;(Ft&&tn(new Ft(new ArrayBuffer(1)))!=Wt||Fe&&tn(new Fe)!=Kt||Ht&&tn(Ht.resolve())!=Gt||Vt&&tn(new Vt)!=qt||zt&&tn(new zt)!=Zt)&&(tn=function(e){var t=je(e),n="[object Object]"==t?e.constructor:void 0,r=n?Re(n):"";if(r)switch(r){case Yt:return Wt;case Xt:return Kt;case Jt:return Gt;case Qt:return qt;case en:return Zt}return t});const nn=tn;var rn="[object Arguments]",on="[object Array]",an="[object Object]",sn=Object.prototype.hasOwnProperty;const un=function e(t,n,r,o,i){return t===n||(null==t||null==n||!pt(t)&&!pt(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=ut(e),s=ut(t),u=a?on:nn(e),c=s?on:nn(t),l=(u=u==rn?an:u)==an,f=(c=c==rn?an:c)==an,p=u==c;if(p&&Ot(e)){if(!Ot(t))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new Xe),a||kt(e)?nt(e,t,n,r,o,i):function(e,t,n,r,o,i,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||!i(new rt(e),new rt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return fe(+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 s=ot;case"[object Set]":var u=1&r;if(s||(s=it),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=nt(s(e),s(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(st)return st.call(e)==st.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var d=l&&sn.call(e,"__wrapped__"),h=f&&sn.call(t,"__wrapped__");if(d||h){var y=d?e.value():e,v=h?t.value():t;return i||(i=new Xe),o(y,v,n,r,i)}}return!!p&&(i||(i=new Xe),function(e,t,n,r,o,i){var a=1&n,s=Ut(e),u=s.length;if(u!=Ut(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Bt.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var y=e[l=s[c]],v=t[l];if(r)var m=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===m?y===v||o(y,v,n,r,i):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var b=e.constructor,g=t.constructor;b==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,r,o,i))}(t,n,r,o,e,i))},cn=function(e,t){return un(e,t)};function ln(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 fn(e){var t=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ln(e,2);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)?ln(e,2):void 0}}(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.")}()}((0,r.useState)([])),n=t[0],o=t[1];return(0,r.useEffect)((function(){return(0,f.getExtensionStore)().subscribe((function(t){var r,i,a=null!==(i=null===(r=t.slots[e])||void 0===r?void 0:r.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];cn(a,n)||o(a)}))}),[]),n}function pn(e){(0,r.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])}function dn(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 hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yn(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dn(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)?dn(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 vn={};function mn(){var e=(0,r.useContext)(o),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var a=function(e){var t=(0,r.useMemo)((function(){return(0,i.getConfigStore)(e)}),[e]),n=e,o=function(e){var t=yn((0,r.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],o=t[1];return(0,r.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&o(e.config)}))}),[e]),n}(t);if(!o)throw vn[n]||(vn[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),vn[n];return o}(t),s=function(e){var t=(0,r.useMemo)(i.getExtensionsConfigStore,[]),n=function(e,t){var n=yn((0,r.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,i.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,i.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!cn(n.config,o)&&a(n.config)}))}),[e,t,o]),o}(t,e);if(!n&&e){var o="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!vn[o]&&t&&(vn[o]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,i.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),vn[o]}return n||{}}(n),u=(0,r.useMemo)((function(){return function(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){hn(e,t,n[t])}))}return e}({},a,s)}),[a,s]);return u}var bn,gn=y(766);function wn(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 Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(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){Sn(e,t,n[t])}))}return e}function _n(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(bn||(bn={}));var En,xn={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function jn(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Cn(e,t){switch(t.type){case bn.loadPatient:return _n(On({},e),{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case bn.newPatient:return _n(On({},e),{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case bn.loadError:return _n(On({},e),{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}}function Pn(e){var t=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return wn(e,2);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)?wn(e,2):void 0}}(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.")}()}((0,r.useReducer)(Cn,_n(On({},xn),{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e}))),n=t[0],o=t[1];return(0,r.useEffect)((function(){if(n.isPendingUuid){var e=jn();o(e?{type:bn.loadPatient,patientUuid:e}:{type:bn.newPatient,patient:null})}var t=!0;return n.isLoadingPatient&&n.patientUuid&&(0,gn.fetchCurrentPatient)(n.patientUuid).then((function(e){return t&&o({patient:e.data,type:bn.newPatient})}),(function(e){return t&&o({err:e,type:bn.loadError})})),function(){t=!1}}),[n.isPendingUuid,n.isLoadingPatient,n.patientUuid]),(0,r.useEffect)((function(){var e=function(e){var t=jn();t!=n.patientUuid&&o({type:bn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[n.patientUuid]),{isLoading:n.isPendingUuid||n.isLoadingPatient,patient:n.patient,patientUuid:null!=e?e:n.patientUuid,error:n.err}}function An(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 In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(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){In(e,t,n[t])}))}return e}function kn(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Rn(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return An(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)?An(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.")}()}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(En||(En={}));var Dn={patient:null,isLoadingPatient:!0,err:null};function Ln(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Mn(e,t){switch(t.type){case En.loadPatient:return kn(Tn({},e),{patient:null,isLoadingPatient:!0,err:null});case En.newPatient:return kn(Tn({},e),{patient:t.patient,isLoadingPatient:!1,err:null});case En.loadError:return kn(Tn({},e),{patient:null,isLoadingPatient:!1,err:t.err});default:return e}}function Nn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ln(),t=Rn((0,r.useReducer)(Mn,Dn),2),n=t[0],o=t[1];return(0,r.useEffect)((function(){var t=!0;return e?((0,gn.fetchCurrentPatient)(e).then((function(e){return t&&o({patient:e.data,type:En.newPatient})}),(function(e){return t&&o({err:e,type:En.loadError})})),o({type:En.loadPatient})):o({type:En.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]}var $n=l((0,f.getExtensionInternalStore)());function Un(e){var t=j(e);return(0,r.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])}var Bn=l((0,f.getExtensionStore)());function Fn(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 Hn(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Fn(e,2);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)?Fn(e,2):void 0}}(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.")}()}((0,r.useState)(0))[1];return(0,r.useCallback)((function(){e((function(e){return e+1}))}),[])}function Vn(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 zn(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e}function Kn(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Vn(e,2);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)?Vn(e,2):void 0}}(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.")}()}((0,r.useState)(zn)),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=function(){n(zn())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),t}var Gn=function(e){return"small-desktop"===e||"large-desktop"===e};function qn(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 Zn(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return qn(e,2);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)?qn(e,2):void 0}}(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.")}()}((0,r.useState)([])),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=(0,gn.getLocations)().subscribe((function(e){n(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function Wn(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,r.useRef)(null);return(0,r.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n}function Yn(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}var Xn,Jn,Qn=function(e){var t=e.privilege,n=e.fallback,o=e.children,i=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Yn(e,2);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)?Yn(e,2):void 0}}(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.")}()}((0,r.useState)(null)),a=i[0],s=i[1];return(0,r.useEffect)((function(){var e=(0,gn.getCurrentUser)({includeAuthStatus:!1}).subscribe(s);return function(){return e.unsubscribe()}}),[]),a&&(0,gn.userHasAccess)(t,a)?r.default.createElement(r.default.Fragment,null,o):n?r.default.createElement(r.default.Fragment,null,n):null};function er(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 tr(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return er(e,2);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)?er(e,2):void 0}}(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.")}()}((0,r.useState)(null)),t=e[0],n=e[1],o=null;if(!t){if(Xn){var i=(0,gn.getSessionStore)().getState();i.loaded&&(o=i.session)}else Xn=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,Jn&&Jn(),Jn=void 0)};t((0,gn.getSessionStore)().getState()),o||(Jn=(0,gn.getSessionStore)().subscribe(t))}));if(!o)throw Xn;n(o)}(0,r.useEffect)((function(){return Jn||(Jn=(0,gn.getSessionStore)().subscribe((function(e){var t=e.loaded,r=e.session;t&&(o=r,n(r))}))),function(){Jn&&Jn(),Jn=void 0}}),[]);var a=t||o;if(!a)throw Xn?(console.warn("useSession is in an unexpected state. Attempting to recover."),Xn):Error("useSession is in an invalid state.");return a}var nr=y(5385);function rr(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 or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ir(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){or(e,t,n[t])}))}return e}function ar(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rr(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)?rr(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.")}()}function sr(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}var ur=function(e){return e};function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ur,n=arguments.length>2?arguments[2]:void 0,o=ar((0,r.useState)((function(){return t(e.getState())})),2),i=o[0],a=o[1];(0,r.useEffect)((function(){return(0,nr.subscribeTo)(e,t,a)}),[e,t]);var s={};return n&&(s=(0,r.useMemo)((function(){return sr(e,n)}),[e,n])),ir({},i,s)}function lr(e,t){return cr(e,ur,t)}function fr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function pr(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var dr,hr=function(){},yr=void 0,vr=Object,mr=function(e){return e===yr},br=function(e){return"function"==typeof e},gr=function(e,t){return vr.assign({},e,t)},wr="undefined",Sr=function(){return typeof window!=wr},Or=new WeakMap,_r=0,Er=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(vr(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Or.get(e))return t;if(t=++_r+"~",Or.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=Er(e[n])+",";Or.set(e,t)}if(o==vr){t="#";for(var a=vr.keys(e).sort();!mr(n=a.pop());)mr(e[n])||(t+=n+":"+Er(e[n])+",");Or.set(e,t)}}return t},xr=!0,jr=Sr(),Cr=typeof document!=wr,Pr=jr&&window.addEventListener?window.addEventListener.bind(window):hr,Ar=Cr?document.addEventListener.bind(document):hr,Ir=jr&&window.removeEventListener?window.removeEventListener.bind(window):hr,Tr=Cr?document.removeEventListener.bind(document):hr,kr={isOnline:function(){return xr},isVisible:function(){var e=Cr&&document.visibilityState;return mr(e)||"hidden"!==e}},Rr={initFocus:function(e){return Ar("visibilitychange",e),Pr("focus",e),function(){Tr("visibilitychange",e),Ir("focus",e)}},initReconnect:function(e){var t=function(){xr=!0,e()},n=function(){xr=!1};return Pr("online",t),Pr("offline",n),function(){Ir("online",t),Ir("offline",n)}}},Dr=!Sr()||"Deno"in window,Lr=Dr?r.useEffect:r.useLayoutEffect,Mr="undefined"!=typeof navigator&&navigator.connection,Nr=!Dr&&Mr&&(["slow-2g","2g"].includes(Mr.effectiveType)||Mr.saveData),$r=function(e){if(br(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Er(e):"",t,e?"$swr$"+e:""]},Ur=new WeakMap,Br=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var s=Ur.get(e),u=s[0],c=s[1],l=s[3],f=u[t],p=c[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Fr=0,Hr=function(){return++Fr},Vr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fr(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f,p,d,h,y,v,m,b,g,w,S;return pr(this,(function(O){switch(O.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!mr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,s=!1!==i.revalidate,u=!1!==i.rollbackOnError,c=i.optimisticData,l=$r(n),f=l[0],p=l[2],!f)return[2];if(d=Ur.get(t),h=d[2],e.length<3)return[2,Br(t,f,t.get(f),yr,yr,s,!0)];if(y=r,m=Hr(),h[f]=[m,0],b=!mr(c),g=t.get(f),b&&(w=br(c)?c(g):c,t.set(f,w),Br(t,f,w)),br(y))try{y=y(t.get(f))}catch(e){v=e}return y&&br(y.then)?[4,y.catch((function(e){v=e}))]:[3,2];case 1:if(y=O.sent(),m!==h[f][0]){if(v)throw v;return[2,y]}v&&b&&u&&(a=!0,y=g,t.set(f,g)),O.label=2;case 2:return a&&(v||(br(a)&&(y=a(y,g)),t.set(f,y)),t.set(p,gr(t.get(p),{error:v}))),h[f][1]=Hr(),[4,Br(t,f,y,v,yr,s,!!a)];case 3:if(S=O.sent(),v)throw v;return[2,a?S:y]}}))}))},zr=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Kr=function(e,t){if(!Ur.has(e)){var n=gr(Rr,t),r={},o=Vr.bind(yr,e),i=hr;if(Ur.set(e,[r,{},{},{},o]),!Dr){var a=n.initFocus(setTimeout.bind(yr,zr.bind(yr,r,0))),s=n.initReconnect(setTimeout.bind(yr,zr.bind(yr,r,1)));i=function(){a&&a(),s&&s(),Ur.delete(e)}}return[e,o,i]}return[e,Ur.get(e)[4]]},Gr=Kr(new Map),qr=Gr[0],Zr=Gr[1],Wr=gr({onLoadingSlow:hr,onSuccess:hr,onError:hr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!mr(i)&&a>i||setTimeout(r,s,o)},onDiscarded:hr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Nr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Nr?5e3:3e3,compare:function(e,t){return Er(e)==Er(t)},isPaused:function(){return!1},cache:qr,mutate:Zr,fallback:{}},kr),Yr=function(e,t){var n=gr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=gr(o,a))}return n},Xr=(0,r.createContext)({}),Jr=function(e){return br(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Qr=function(){return gr(Wr,(0,r.useContext)(Xr))},eo=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},to={dedupe:!0},no=(vr.defineProperty((function(e){var t=e.value,n=Yr((0,r.useContext)(Xr),t),o=t&&t.provider,i=(0,r.useState)((function(){return o?Kr(o(n.cache||qr),t):yr}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),Lr((function(){return i?i[2]:yr}),[]),(0,r.createElement)(Xr.Provider,gr(e,{value:n}))}),"default",{value:Wr}),dr=function(e,t,n){var o=n.cache,i=n.compare,a=n.fallbackData,s=n.suspense,u=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ur.get(o),d=p[0],h=p[1],y=p[2],v=p[3],m=$r(e),b=m[0],g=m[1],w=m[2],S=(0,r.useRef)(!1),O=(0,r.useRef)(!1),_=(0,r.useRef)(b),E=(0,r.useRef)(t),x=(0,r.useRef)(n),j=function(){return x.current},C=function(){return j().isVisible()&&j().isOnline()},P=function(e){return o.set(w,gr(o.get(w),e))},A=o.get(b),I=mr(a)?n.fallback[b]:a,T=mr(A)?I:A,k=o.get(w)||{},R=k.error,D=!S.current,L=function(){return D&&!mr(u)?u:!j().isPaused()&&(s?!mr(T)&&n.revalidateIfStale:mr(T)||n.revalidateIfStale)},M=!(!b||!t)&&(!!k.isValidating||D&&L()),N=function(e,t){var n=(0,r.useState)({})[1],o=(0,r.useRef)(e),i=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(e){var r=!1,a=o.current;for(var s in e){var u=s;a[u]!==e[u]&&(a[u]=e[u],i.current[u]&&(r=!0))}r&&!t.current&&n({})}),[]);return Lr((function(){o.current=e})),[o,i.current,a]}({data:T,error:R,isValidating:M},O),$=N[0],U=N[1],B=N[2],F=(0,r.useCallback)((function(e){return fr(void 0,void 0,void 0,(function(){var t,r,a,s,u,c,l,f,p,d,h,m,w;return pr(this,(function(x){switch(x.label){case 0:if(t=E.current,!b||!t||O.current||j().isPaused())return[2,!1];s=!0,u=e||{},c=!v[b]||!u.dedupe,l=function(){return!O.current&&b===_.current&&S.current},f=function(){var e=v[b];e&&e[1]===a&&delete v[b]},p={isValidating:!1},d=function(){P({isValidating:!1}),l()&&B(p)},P({isValidating:!0}),B({isValidating:!0}),x.label=1;case 1:return x.trys.push([1,3,,4]),c&&(Br(o,b,$.current.data,$.current.error,!0),n.loadingTimeout&&!o.get(b)&&setTimeout((function(){s&&l()&&j().onLoadingSlow(b,n)}),n.loadingTimeout),v[b]=[t.apply(void 0,g),Hr()]),w=v[b],r=w[0],a=w[1],[4,r];case 2:return r=x.sent(),c&&setTimeout(f,n.dedupingInterval),v[b]&&v[b][1]===a?(P({error:yr}),p.error=yr,h=y[b],!mr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),c&&l()&&j().onDiscarded(b),[2,!1]):(i($.current.data,r)?p.data=$.current.data:p.data=r,i(o.get(b),r)||o.set(b,r),c&&l()&&j().onSuccess(r,b,n),[3,4])):(c&&l()&&j().onDiscarded(b),[2,!1]);case 3:return m=x.sent(),f(),j().isPaused()||(P({error:m}),p.error=m,c&&l()&&(j().onError(m,b,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||br(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&C()&&j().onErrorRetry(m,b,n,F,{retryCount:(u.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,d(),l()&&c&&Br(o,b,p.data,p.error,!1),[2,!0]}}))}))}),[b]),H=(0,r.useCallback)(Vr.bind(yr,o,(function(){return _.current})),[]);if(Lr((function(){E.current=t,x.current=n})),Lr((function(){if(b){var e=b!==_.current,t=F.bind(yr,to),n=0,r=eo(b,h,(function(e,t,n){B(gr({error:t,isValidating:n},i($.current.data,e)?yr:{data:e}))})),o=eo(b,d,(function(e){if(0==e){var r=Date.now();j().revalidateOnFocus&&r>n&&C()&&(n=r+j().focusThrottleInterval,t())}else if(1==e)j().revalidateOnReconnect&&C()&&t();else if(2==e)return F()}));return O.current=!1,_.current=b,S.current=!0,e&&B({data:T,error:R,isValidating:M}),L()&&(mr(T)||Dr?t():function(e){Sr()&&typeof window.requestAnimationFrame!=wr?window.requestAnimationFrame(e):setTimeout(e,1)}(t)),function(){O.current=!0,r(),o()}}}),[b,F]),Lr((function(){var e;function t(){var t=br(c)?c(T):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){$.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?t():F(to).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,l,f,F]),(0,r.useDebugValue)(T),s&&mr(T)&&b)throw E.current=t,x.current=n,O.current=!1,mr(R)?F(to):R;return{mutate:H,get data(){return U.data=!0,T},get error(){return U.error=!0,R},get isValidating(){return U.isValidating=!0,M}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Qr(),r=Jr(e),o=r[0],i=r[1],a=r[2],s=Yr(n,a),u=dr,c=s.use;if(c)for(var l=c.length;l-- >0;)u=c[l](u);return u(o,i||s.fetcher,s)}),ro=y(9688),oo=y(4332),io=y.n(oo);function ao(e){var t,n=no(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(gn.defaultVisitCustomRepresentation,"&includeInactive=false"):null,gn.openmrsFetch),o=n.data,i=n.error;return{error:i,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,r.useMemo)((function(){return null!==(t=null==o?void 0:o.data.results.find((function(e){return null===e.stopDatetime&&(0,ro.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==o?void 0:o.data.results]),isLoading:!o&&!i}}function so(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 uo(){var e=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return so(e,2);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)?so(e,2):void 0}}(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.")}()}((0,r.useState)([])),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=(0,gn.getVisitTypes)().subscribe((function(e){n(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function co(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 lo(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return co(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)?co(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.")}()}function fo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=lo((0,r.useState)(1),2),o=n[0],i=n[1],a=(0,r.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),s=(0,r.useMemo)((function(){var n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)}),[e,o,t]);return{results:s,totalPages:a,currentPage:o,paginated:e.length>t,showNextButton:o<a,showPreviousButton:o>1,goTo:function(e){i(Math.max(1,Math.min(a,e)))},goToNext:function(){o<a&&i(o+1)},goToPrevious:function(){o>1&&i(o-1)}}}ro.default.extend(io())})(),v})())}}}))},435:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function e(e,t){for(var n in t)e[n]=t[n];return e}function t(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}}r.r(o),r.d(o,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>c});var n={};function i(e,r){var o=n[e];if(o)return o.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):o.value.setState(r,!0),o.active=!0,o.value;var i=t(r);return n[e]={value:i,active:!0},i}function a(e,r){var o=n[e];if(!o){var i=t(r);return n[e]={value:i,active:!1},i}return o.value}function s(e){return i("app",e)}function u(){return a("app",{})}function c(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},742:()=>{System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(e,t){var n={},r={},o={},i={},a={},s={};return Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(){},function(){},function(e){o.createGlobalStore=e.createGlobalStore},function(){},function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){s.Subject=e.Subject}],execute:function(){e((()=>{var e={279:(e,t,n)=>{"use strict";var r=n(493);r.createRoot,r.hydrateRoot},584:(e,t,n)=>{var r=n(518).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},518:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},714:()=>{var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},s=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},u=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return fe(e,t,n.slice(),r.slice())}return!s((function(e,t){return!s(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,s){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(s)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,s)})):t(i)&&t(s)?r((function(t,n){return e(t,a,n)})):t(a)&&t(s)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,s)})):t(a)?n((function(t){return e(i,t,s)})):t(s)?n((function(t){return e(i,a,t)})):e(i,a,s)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},p=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},d=function(e,t,n,r){return e["@@transducer/result"](n[r](Ee(e["@@transducer/step"],e),t))},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},v=function(e){return(0,Re.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Re.getGlobalStore)("config-extension-slots",{slots:{}})},b=function(e){return g(m().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Re.getGlobalStore)("config-extensions",{configs:{}})},S=function(e,t){var n=Object.assign({},O(w().getState(),e,t));return n.config=ve(["Display conditions","Translation overrides"],n.config),n},O=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},_=function(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},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},x=function(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){E(e,t,n[t])}))}return e},j=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},C=function(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||A(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.")}()},P=function(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(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.")}()},A=function(e,t){if(e){if("string"==typeof e)return _(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)?_(e,t):void 0}},I=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=V(s,e,t);v(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},T=function(e,t){var n,r,o=(n=K(H(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=C(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(u)[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=C(p.value,2),y=h[0];F(h[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return x({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=C(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),s=a.getState(),u={slots:x({},s.slots,i)};pe(s,u)||a.setState(u)},k=function(e,t){var n=function(e,t){var n=Be(ge(e.schemas)),r=P(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=C(s.value,2);n=K([n,Fe(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);Ue.setState({config:n})},R=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=B(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=j(x({},r[c.slotName]),E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}w().setState({configs:r})},D=function(e,t){He(e,t);var n=ye(t,Ge),r=Le.getState();Le.setState({schemas:j(x({},r.schemas),E({},e,n))})},L=function(e,t){He(e,t);var n=ye(t,Ge),r=Le.getState();r.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Le.setState({schemas:j(x({},r.schemas),E({},e,n))})},M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Le.getState();Le.setState({providedConfigs:P(n.providedConfigs).concat([{source:t,config:e}])})},N=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=ve(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},$=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=e.config;t(n),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];G(e,t,n);var o=Ke(e,t,r);return ze(e,o,n),o},B=function(e,t,n,r,o,i){var a,s,u,c,l=function(e){return C(e.split("#"),1)[0]}(r),f=o.schemas[l],p=f?l:t,d=H(o,i),h=z(e,d),y=null!==(c=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=K([z(p,d),y]),m=null!=f?f:o.schemas[t];G(m,v,p);var b=Ke(m,v,o.devDefaultsAreOn);return ze(m,b,p),delete b.extensionSlots,b},F=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Y(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},H=function(e,t){return P(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},V=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=z(e,H(t,n));G(r,o,e);var i=Ke(r,o,t.devDefaultsAreOn);return ze(r,i,e),delete i.extensionSlots,i},z=function(e,t){return K(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},K=function(e){return je(ye)({},e)},G=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?Ve(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}},q=function(e,t,n){t&&Z(e,[{Array:Ce,Boolean:Pe,ConceptUuid:ke,Number:Ae,Object:Te,String:Ie,UUID:ke,PersonAttributeTypeUuid:ke,PatientIdentifierTypeUuid:ke}[t]],n)},Z=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},W=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Y=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},X=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},J=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,function(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){X(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Q=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},ee=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(t,n);o.startsWith(r)?(0,qe.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return be},configExtensionStore:function(){return $e},configInternalStore:function(){return Le},defineConfigSchema:function(){return D},defineExtensionConfigSchema:function(){return L},getConfig:function(){return N},getConfigInternal:function(){return $},getConfigStore:function(){return v},getExtensionConfig:function(){return S},getExtensionConfigFromStore:function(){return O},getExtensionSlotConfig:function(){return b},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Ue},inRange:function(){return Ze},interpolateString:function(){return Q},interpolateUrl:function(){return J},isUrl:function(){return Ye},isUrlWithTemplateParameters:function(){return We},navigate:function(){return ee},oneOf:function(){return Xe},processConfig:function(){return U},provide:function(){return M},temporaryConfigStore:function(){return Ne},validator:function(){return h},validators:function(){return Je}});var te="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ne=Object.prototype.toString,re=function(){return"[object Arguments]"===ne.call(arguments)?function(e){return"[object Arguments]"===ne.call(e)}:function(e){return u("callee",e)}}(),oe=re,ie=!{toString:null}.propertyIsEnumerable("toString"),ae=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=function(){return arguments.propertyIsEnumerable("length")}(),ue=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ce="function"!=typeof Object.keys||se?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=se&&oe(e);for(t in e)!u(t,e)||o&&"length"===t||(r[r.length]=t);if(ie)for(n=ae.length-1;n>=0;)u(t=ae[n],e)&&!ue(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),le=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function fe(t,n,r,o){if(te(t,n))return!0;var i,a,s=le(t);if(s!==le(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!te(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!te(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(s){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ce(t);if(f.length!==ce(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!u(h,n)||!fe(n[h],t[h],p,d))return!1;l-=1}return!0}var pe=r((function(e,t){return fe(e,t,[],[])})),de=l((function(e,t,n){var r,o={};for(r in t)u(r,t)&&(o[r]=u(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),he=l((function e(t,n,r){return de((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),ye=r((function(e,t){return he((function(e,t,n){return n}),e,t)})),ve=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function me(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?me(e[s],t,n,!0):e[s];return o};switch(le(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var be,ge=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():me(e,[],[],!0)})),we=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Se=n((function(e){return!!we(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Oe=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),_e=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Ee=_e,xe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",je=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Oe(e)}(e)),Se(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return d(e,t,n,"fantasy-land/reduce");if(null!=n[xe])return p(e,t,n[xe]());if("function"==typeof n.next)return p(e,t,n);if("function"==typeof n.reduce)return d(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(be||(be={}));var Ce=h((function(e){return Array.isArray(e)}),"must be an array"),Pe=h((function(e){return"boolean"==typeof e}),"must be a boolean"),Ae=h((function(e){return"number"==typeof e}),"must be a number"),Ie=h((function(e){return"string"==typeof e}),"must be a string"),Te=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ke=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Re=i(685),De={providedConfigs:[],schemas:{},devDefaultsAreOn:y()},Le=(0,Re.createGlobalStore)("config-internal",De),Me=y();Le.subscribe((function(e){var t;e.devDefaultsAreOn!=Me&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Me=e.devDefaultsAreOn)}));var Ne=(0,Re.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ne.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var $e=(0,Re.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ue=(0,Re.createGlobalStore)("config-implementer-tools",{config:{}});function Be(e){return e.hasOwnProperty("_default")?j(x({},e),{_value:e._default,_source:"default"}):Y(e)?Object.keys(e).reduce((function(t,n){return t[n]=Be(e[n]),t}),{}):{}}function Fe(e,t){return Y(e)?Object.keys(e).reduce((function(n,r){return n[r]=Fe(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Y(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||He(e,a,i);var u=a._elements;if(W(u)&&He(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var p,d=a._validators[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=p.value;"function"!=typeof h&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(h,"."))}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(be).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(be).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![be.Array,be.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){q(n,e._type,t),Y(t)?e._type===be.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];G(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||G(e,t,n):e._type===be.Array&&function(e,t,n){if(W(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Z(n,e._validators,t),Y(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===be.Object&&e._elements?ze(e._elements,c,l):ze(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)ze(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}I(Le.getState(),Ne.getState()),Le.subscribe((function(e){return I(e,Ne.getState())})),Ne.subscribe((function(e){return I(Le.getState(),e)})),k(Le.getState(),Ne.getState()),Le.subscribe((function(e){return k(e,Ne.getState())})),Ne.subscribe((function(e){return k(Le.getState(),e)})),T(Le.getState(),Ne.getState()),Le.subscribe((function(e){return T(e,Ne.getState())})),Ne.subscribe((function(e){return T(Le.getState(),e)})),R(Le.getState(),$e.getState(),Ne.getState()),Le.subscribe((function(e){R(e,$e.getState(),Ne.getState())})),$e.subscribe((function(e){R(Le.getState(),e,Ne.getState())})),Ne.subscribe((function(e){R(Le.getState(),$e.getState(),e)}));var Ke=function(e,t,n){var r=ge(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var s,u=function(){var t=s.value,o=r[t],i=e[t];if(i&&i.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){var a=i._devDefault||i._default;r[t]=n?a:i._default}var u=i._elements;if(o&&W(u))if(i._type===be.Array&&Array.isArray(o)){var c=o.map((function(e){return Ke(u,e,n)}));r[t]=c}else if(i._type===be.Object){var l=!0,f=!1,p=void 0;try{for(var d,h=Object.keys(o)[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;o[y]=Ke(u,o[y],n)}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}}else if(Y(i)){var v=r.hasOwnProperty(t)?o:{};Y(v)&&(r[t]=Ke(i,v,n))}},c=Object.keys(e)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r},Ge={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:be.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:be.Object,_default:{}}},qe=i(645),Ze=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},We=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},Ye=We([]),Xe=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Je={inRange:Ze,isUrl:Ye,isUrlWithTemplateParameters:We,oneOf:Xe}}(),a}())}}}))},45:e=>{"use strict";e.exports=n},740:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=a},792:e=>{"use strict";e.exports=s}},u={};function c(t){var n=u[t];if(void 0!==n)return n.exports;var r=u[t]={exports:{}};return e[t](r,r.exports,c),r.exports}c.y=t,c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})();var l={};return(0,c(584).s)(1),(()=>{"use strict";const e='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',t='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n',n='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n';var r=document.createElement("div"),o=function(){document.body.appendChild(r)};function i(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,r.appendChild(n))}r.id="omrs-svgs-container",r.style.display="none","complete"===document.readyState?o():window.addEventListener("load",o);var a=c(714);Number.MAX_SAFE_INTEGER,c(954);var s=c(792),u={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?u.enableCssCustomProperties=!0:u.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?u.enableUseControlledStateWithValue=!0:u.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?u.enableCssGrid=!0:u.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?u.enableV11Release=!0:u.enableV11Release=!1}catch(e){u.enableCssCustomProperties=!1,u.enableUseControlledStateWithValue=!1,u.enableCssGrid=!1,u.enableV11Release=!1}var l=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:u.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:u.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:u.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:u.enableV11Release}];function f(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,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||p(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.")}()}function p(e,t){if(e){if("string"==typeof e)return d(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(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}for(var h=function(){function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=f(t.value,2),o=r[0],i=r[1];this.flags.has(o)||this.flags.set(o,i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),y=new h(void 0),v=0;v<l.length;v++){var m=l[v];y.add(m.name,m.enabled)}!function(){y.merge.apply(y,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),c(279),new s.Subject,new s.Subject,new s.Subject,c(45);var b,g=c(685);(0,g.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,c(740),(0,g.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),b=function(e,t){document.documentElement.style.setProperty(e,t)},(0,a.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:a.Type.String},"Brand color #2":{_default:"#004144",_type:a.Type.String},"Brand color #3":{_default:"#007d79",_type:a.Type.String}}),(0,a.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(b("--brand-01",e.config["Brand color #1"]),b("--brand-02",e.config["Brand color #2"]),b("--brand-03",e.config["Brand color #3"]))})),i("omrs-logo-full-color",e),i("omrs-logo-full-mono",e),i("omrs-logo-full-grey",e),i("omrs-logo-partial-color",t),i("omrs-logo-partial-mono",t),i("omrs-logo-partial-grey",t),i("omrs-logo-icon-color",n),i("omrs-logo-icon-mono",n),i("omrs-logo-icon-grey",n),i("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),i("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),i("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),i("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),i("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),i("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),i("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),i("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),i("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),i("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),i("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),i("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),i("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),i("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),i("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),i("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),i("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),i("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),i("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),i("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),i("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),i("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),i("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),i("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')})(),(()=>{"use strict";c.r(l)})(),l})())}}}))},540:()=>{System.register(["dayjs","i18next"],(function(e,t){var n={},r={};return{setters:[function(e){n.default=e.default},function(e){r.default=e.default}],execute:function(){e((()=>{var e={4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=i(e).local();return p.call(r,o,t,n)}}}()},4074:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new c(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return s(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),u=s(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=s(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||u||c}}e.exports=o;const{re:i,t:a}=n(887),s=n(2401),u=n(3843),c=n(9405),l=n(4355)},4355:(e,t,n)=>{class r{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=this.options.loose;e=e.trim();const n=t?s[u.HYPHENRANGELOOSE]:s[u.HYPHENRANGE];e=e.replace(n,_(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[u.COMPARATORTRIM],c),i("comparator trim",e,s[u.COMPARATORTRIM]),e=(e=(e=e.replace(s[u.TILDETRIM],l)).replace(s[u.CARETTRIM],f)).split(/\s+/).join(" ");const r=t?s[u.COMPARATORLOOSE]:s[u.COMPARATOR];return e.split(" ").map((e=>d(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options))).filter(this.options.loose?e=>!!e.match(r):()=>!0).map((e=>new o(e,this.options)))}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>p(n,t)&&e.set.some((e=>p(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(E(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=n(4074),i=n(3843),a=n(9405),{re:s,t:u,comparatorTrimReplace:c,tildeTrimReplace:l,caretTrimReplace:f}=n(887),p=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},d=(e,t)=>(i("comp",e,t),e=m(e,t),i("caret",e),e=y(e,t),i("tildes",e),e=g(e,t),i("xrange",e),e=S(e,t),i("stars",e),e),h=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const n=t.loose?s[u.TILDELOOSE]:s[u.TILDE];return e.replace(n,((t,n,r,o,a)=>{let s;return i("tilde",e,t,n,r,o,a),h(n)?s="":h(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:h(o)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(i("replaceTilde pr",a),s=`>=${n}.${r}.${o}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,i("tilde return",s),s}))},m=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{i("caret",e,t);const n=t.loose?s[u.CARETLOOSE]:s[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,a,s)=>{let u;return i("caret",e,t,n,o,a,s),h(n)?u="":h(o)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:h(a)?u="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:s?(i("replaceCaret pr",s),u="0"===n?"0"===o?`>=${n}.${o}.${a}-${s} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a}-${s} <${+n+1}.0.0-0`):(i("no pr"),u="0"===n?"0"===o?`>=${n}.${o}.${a}${r} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a} <${+n+1}.0.0-0`),i("caret return",u),u}))},g=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>w(e,t))).join(" ")),w=(e,t)=>{e=e.trim();const n=t.loose?s[u.XRANGELOOSE]:s[u.XRANGE];return e.replace(n,((n,r,o,a,s,u)=>{i("xRange",e,n,r,o,a,s,u);const c=h(o),l=c||h(a),f=l||h(s),p=f;return"="===r&&p&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(a=0),s=0,">"===r?(r=">=",l?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",l?o=+o+1:a=+a+1),"<"===r&&(u="-0"),n=`${r+o}.${a}.${s}${u}`):l?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${a}.0${u} <${o}.${+a+1}.0-0`),i("xRange return",n),n}))},S=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[u.STAR],"")),O=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),_=e=>(t,n,r,o,i,a,s,u,c,l,f,p,d)=>`${n=h(r)?"":h(o)?`>=${r}.0.0${e?"-0":""}`:h(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${u=h(c)?"":h(l)?`<${+c+1}.0.0-0`:h(f)?`<${c}.${+l+1}.0-0`:p?`<=${c}.${l}.${f}-${p}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),E=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9405:(e,t,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:s}=n(887),{compareIdentifiers:u}=n(1630);class c{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return u(n,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return u(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=c},953:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},2401:(e,t,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),s=n(3433),u=n(4622);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return s(e,n,c);case"<=":return u(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6839:(e,t,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},6218:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},9643:(e,t,n)=>{const r=n(3308);e.exports=(e,t)=>r(e,t,!0)},3308:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},3948:(e,t,n)=>{const r=n(5497),o=n(8896);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",s=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return s}}},8896:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0===r(e,t,n)},9261:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>0},6647:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>=0},5791:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},3433:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<0},4622:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<=0},629:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).major},9986:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).minor},8378:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0!==r(e,t,n)},5497:(e,t,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},9800:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).patch},4408:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},762:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(t,e,n)},2743:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5312:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},2354:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4512:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},4770:(e,t,n)=>{const r=n(887);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(8202).SEMVER_SPEC_VERSION,SemVer:n(9405),compareIdentifiers:n(1630).compareIdentifiers,rcompareIdentifiers:n(1630).rcompareIdentifiers,parse:n(5497),valid:n(4512),clean:n(953),inc:n(5791),diff:n(3948),major:n(629),minor:n(9986),patch:n(9800),prerelease:n(4408),compare:n(3308),rcompare:n(762),compareLoose:n(9643),compareBuild:n(6218),sort:n(2354),rsort:n(2743),gt:n(9261),lt:n(3433),eq:n(8896),neq:n(8378),gte:n(6647),lte:n(4622),cmp:n(2401),coerce:n(6839),Comparator:n(4074),Range:n(4355),satisfies:n(5312),toComparators:n(9663),maxSatisfying:n(4931),minSatisfying:n(5891),minVersion:n(4925),validRange:n(9965),outside:n(3260),gtr:n(715),ltr:n(6),intersects:n(9560),simplifyRange:n(7795),subset:n(7732)}},8202:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},3843:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1630:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},887:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let u=0;const c=(e,t,n)=>{const r=u++;o(r,t),s[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),c("FULL",`^${a[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),c("LOOSE",`^${a[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),c("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,">",n)},9560:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},6:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,"<",n)},4931:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5891:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},4925:(e,t,n)=>{const r=n(9405),o=n(4355),i=n(9261);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t)e.set[t].forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));return n&&e.test(n)?n:null}},3260:(e,t,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),s=n(5312),u=n(9261),c=n(3433),l=n(4622),f=n(6647);e.exports=(e,t,n,p)=>{let d,h,y,v,m;switch(e=new r(e,p),t=new a(t,p),n){case">":d=u,h=l,y=c,v=">",m=">=";break;case"<":d=c,h=f,y=u,v="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let a=null,s=null;if(r.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,p)?a=e:y(e.semver,s.semver,p)&&(s=e)})),a.operator===v||a.operator===m)return!1;if((!s.operator||s.operator===v)&&h(e,s.semver))return!1;if(s.operator===m&&y(e,s.semver))return!1}return!0}},7795:(e,t,n)=>{const r=n(5312),o=n(3308);e.exports=(e,t,n)=>{const i=[];let a=null,s=null;const u=e.sort(((e,t)=>o(e,t,n)));for(const e of u)r(e,t,n)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7732:(e,t,n)=>{const r=n(4355),{ANY:o}=n(4074),i=n(5312),a=n(3308),s=(e,t,n)=>{if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;const r=new Set;let s,l,f,p,d,h,y;for(const t of e)">"===t.operator||">="===t.operator?s=u(s,t,n):"<"===t.operator||"<="===t.operator?l=c(l,t,n):r.add(t.semver);if(r.size>1)return null;if(s&&l){if(f=a(s.semver,l.semver,n),f>0)return null;if(0===f&&(">="!==s.operator||"<="!==l.operator))return null}for(const e of r){if(s&&!i(e,String(s),n))return null;if(l&&!i(e,String(l),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}for(const e of t){if(y=y||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,s)if(">"===e.operator||">="===e.operator){if(p=u(s,e,n),p===e)return!1}else if(">="===s.operator&&!i(s.semver,String(e),n))return!1;if(l)if("<"===e.operator||"<="===e.operator){if(d=c(l,e,n),d===e)return!1}else if("<="===l.operator&&!i(l.semver,String(e),n))return!1;if(!e.operator&&(l||s)&&0!==f)return!1}return!(s&&h&&!l&&0!==f||l&&y&&!s&&0!==f)},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n)=>{e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=s(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},9663:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9965:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9688:e=>{"use strict";e.exports=n},7064:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}i.y=t,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function e(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3}function t(e,t){var n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){var r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate(),s=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&s--;var u=i>=0?i:i+12;a<0&&u--;var c=u>0?"".concat(u," mo"):"",l=e(r)-e(o);l<0&&(l+=365);var f=Math.floor(l/7),p=l-7*f;return 0===s?t(r,o)?"Today":f<4||0===f?"".concat(l," day"):p>0?"".concat(f," wk ").concat(p," d"):"".concat(f," week"):s<2?"".concat(c," ").concat(s," yr").trim():s<18?"".concat(s," yr ").concat(c).trim():"".concat(s," years")}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>e,formatDate:()=>E,formatDatetime:()=>j,formatTime:()=>x,isOmrsDateStrict:()=>d,isOmrsDateToday:()=>h,isSameDay:()=>t,isVersionSatisfied:()=>D,parseDate:()=>O,retry:()=>$,toDateObjectStrict:()=>y,toOmrsDateFormat:()=>S,toOmrsDayDateFormat:()=>g,toOmrsIsoString:()=>v,toOmrsTimeString:()=>b,toOmrsTimeString24:()=>m,toOmrsYearlessDateFormat:()=>w,translateFrom:()=>I});var r=i(9688),o=i(9014),s=i.n(o),u=i(4332),c=i.n(u);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}r.default.extend(s()),r.default.extend(c());var p="YYYY-MM-DDTHH:mm:ss.SSSZZ";function d(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&"+"===e[23]&&":"!==e[26]&&(0,r.default)(e,p).isValid()}function h(e){return(0,r.default)(e).isToday()}function y(e){return d(e)?(0,r.default)(e,p).toDate():null}function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(e);return t&&(n=n.utc()),n.format(p)}function m(e){return(0,r.default)(e).format("HH:mm")}function b(e){return r.default.utc(e).format("HH:mm A")}function g(e){return S(e,"DD - MMM - YYYY")}function w(e){return S(e,"DD-MMM")}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(e).format(t)}function O(e){return(0,r.default)(e).toDate()}var _={mode:"standard",time:"for today",day:!0,year:!0};function E(e,t){var n,o=f({},_,t),i=o.mode,a=o.time,s=o.day,u=o.year,c={year:u?"numeric":void 0,month:"short",day:s?"2-digit":void 0},l=C(),p=(0,r.default)(e).isToday();if(p)n=(n=new Intl.RelativeTimeFormat(l,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(l)+n.slice(1);else if("en"==l&&(l="en-GB"),n=e.toLocaleDateString(l,c),"en-GB"==l&&"standard"==i&&u&&s&&(n=n.replace(/ /g,"-")),"wide"==i&&(n=n.replace(/ /g," — "),/ru.*/.test(l))){var d=n.length;n=n.slice(0,d-5)+n.slice(d-5).replace(" — "," ")}return(!0===a||p&&"for today"===a)&&(n+=", ".concat(x(e))),n}function x(e){return e.toLocaleTimeString(C(),{hour:"2-digit",minute:"2-digit"})}function j(e,t){return E(e,(n=f({},t),r=null!=(r={time:!0})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r}function C(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e}var P=i(7064);function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t,n,r){return(P.default.default||P.default).t(t,function(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){A(e,t,n[t])}))}return e}({ns:e,defaultValue:n},r))}var T=i(4770);function k(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 R(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return k(e,3);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)?k(e,3):void 0}}(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.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)}function D(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=R(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return R(e)}(t);return T.satisfies(n,e,{includePrerelease:!0})}function L(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){L(i,r,o,a,s,"next",e)}function s(e){L(i,r,o,a,s,"throw",e)}a(void 0)}))}}var N=function(e,t){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function $(e){return U.apply(this,arguments)}function U(){return U=M((function(e){var t,n,r,o,i,a,s,u=arguments;return N(this,(function(c){switch(c.label){case 0:t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return B(e,5)},r=null!=r?r:function(e){return F(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,H(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),U.apply(this,arguments)}function B(e,t){return e<=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?e+1:e;return t*Math.pow(2,r)}function H(e){return V.apply(this,arguments)}function V(){return(V=M((function(e){return N(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}})(),a})())}}}))}}]);
|