@openmrs/esm-primary-navigation-app 3.4.1-pre.120 → 3.4.1-pre.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/889.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 889.js.LICENSE.txt */
2
- (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[889],{159:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={672:function(t,e){var n,r,o;r=e,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(t){this.message=t}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(t){for(var e,r,i=String(t),u=0,a=o,c="";i.charAt(0|u)||(a="=",u%1);c+=a.charAt(63&e>>8-u%1*8)){if((r=i.charCodeAt(u+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|r}return c}),r.atob||(r.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,u=0,a=0,c="";i=e.charAt(a++);~i&&(r=u%4?64*r+i:i,u++%4)?c+=String.fromCharCode(255&r>>(-2*u&6)):0)i=o.indexOf(i);return c})},525:function(t){(function(){var e,n,r=function(t,r,o,i){n.defer(),e.search(t).then((function(t){u(t,r).then((function(){o()}),(function(t){i(t)}))}),(function(t){i(t)}))},o=function(t){var e=n.defer(),o=[];return r(t,(function(t){t.forEach((function(t){o.push(t)}))}),(function(){e.resolve(o)}),(function(t){e.reject(t)})),e.promise},i=function(t,r){var o=n.defer();return e.search(t).then((function(t){var n={},i=[function(){o.resolve(t,n)}];function u(){i.pop()()}var a=t.data;a.entry&&a.entry.forEach((function(t){var o=t.resource,c=o.resourceType;r&&r.forEach((function(t){var r,s,l,f=t.split("."),h=f[0],d=f[1],p=o[d];if(c===h&&p){var v=p.reference;n[v]||(r=a,s=o,l=p,i.push((function(){!function(t,r,o){var i=o.reference;e.resolve({bundle:t,resource:r,reference:o}).then((function(t){var e=t.data||t.content;n[i]=e,u()}))}(r,s,l)})))}}))})),u()}),(function(){o.reject("Could not fetch search results")})),o.promise};function u(t,r){var o,i=t.data.entry||[],a=[];for(o=0;o<i.length;o++)a.push(i[o].resource);r(a);var c=n.defer();return e.nextPage({bundle:t.data}).then((function(t){u(t,r).then((function(t){c.resolve()}))}),(function(t){c.resolve()})),c.promise}t.exports=function(t,u){return e=t,n=u,t.drain=r,t.fetchAll=o,t.fetchAllWithReferences=i,t}}).call(this)},256:function(t,e,n){(function(){n(454);var e=n(801),r=n(921),o=n(294),i=n(821),u=n(442),a=n(856),c=n(719),s=n(29),l=n(723),f=n(249),h=n(525);t.exports=function(t,n){var d=e.Middleware,p=e.$$Attr,v=function(t){return p("method",t)},y=function(t,e){return p("headers."+t,e)},g=d(u),m=d(a(t,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",t.headers&&t.headers.Accept?t.headers.Accept:"application/json")).and(y("Content-Type",t.headers&&t.headers["Content-Type"]?t.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),S=m.and(v("DELETE")),x=m.and(v("PATCH")),O=i.Http(t,n),j=f.Path,E=j(t.baseUrl),k=E.slash(":type || :resource.resourceType"),A=k.slash("_history"),C=k.slash(":id || :resource.id"),P=C.slash("_history"),T=C.slash(":versionId || :resource.meta.versionId"),I=E.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),R=y("Prefer","return=representation"),D=d(r.$Paging);return h({conformance:b.and(E.slash("metadata")).end(O),document:w.and(E.slash("Document")).end(O),profile:b.and(E.slash("Profile").slash(":type")).end(O),transaction:w.and(E).end(O),history:b.and(E.slash("_history")).and(D).end(O),typeHistory:b.and(A).and(D).end(O),resourceHistory:b.and(P).and(D).end(O),read:b.and(s.$WithPatient).and(C).end(O),vread:b.and(T).end(O),delete:S.and(C).and(R).end(O),create:w.and(k).and(R).end(O),validate:w.and(k.slash("_validate")).end(O),meta:{add:w.and(I.slash("$meta-add")).end(O),delete:w.and(I.slash("$meta-delete")).end(O),read:b.and(I.slash("$meta")).end(O)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(D).end(O),update:_.and(C).and(R).end(O),conditionalUpdate:_.and(k).and(r.$SearchParams).and(R).end(O),conditionalDelete:S.and(k).and(r.$SearchParams).and(R).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(j(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:x.and(C).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},294:function(t,e,n){(function(){var t,r=n(801),o=n(672).btoa;e.$Basic=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.user&&t.auth.pass)return"Basic "+o(t.auth.user+":"+t.auth.pass)})),e.$Bearer=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.bearer)return"Bearer "+t.auth.bearer})),e.$Credentials=r.Middleware(r.$$Attr("credentials",(function(e){return t=e.credentials,""}))).and(r.$$Attr("credentials",(function(e){if(["same-origin","include"].indexOf(t)>-1)return t})))}).call(this)},719:function(t,e){e.$$BundleLinkUrl=function(t){return function(e){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(e){return e.relation&&e.relation===t}))[0];return r&&r.url&&(n.url=r.url,n.data=null),e(n)}}}},856:function(t){(function(){var e=function(t,e,n){var r=t[n];return r&&!e[n]&&(e[n]=r),t};t.exports=function(t,n){return function(r){return function(o){return e(t,o,"baseUrl"),e(t,o,"cache"),e(t,o,"auth"),e(t,o,"patient"),e(t,o,"debug"),e(t,o,"credentials"),e(t,o,"headers"),e(t,o,"agentOptions"),e(n,o,"defer"),e(n,o,"http"),r(o)}}}}).call(this)},801:function(t,e,n){(function(){var t=n(454),r=function(t){return t.and=function(e){return r((n=t,o=e,function(t){return n(o(t))}));var n,o},t.end=function(e){return t(e)},t};e.$$Simple=function(t){return function(e){return function(n){return e(t(n))}}},e.$$Attr=function(e,n){return r((function(r){return function(o){var i;return i="function"==t.type(n)?n(o):n,r(null==i&&null==i?o:function(t,e,n){for(var r=e.split("."),o=t,i=0;i<r.length-1;i++){var u=r[i];(o=t[u])||(o={},t[u]=o)}return o[r[r.length-1]]=n,t}(o,e,i))}}))};var o=function(t,e){return r((function(n){return function(r){return r[t]=e(r),n(r)}}))};e.Middleware=r,e.Attribute=o,e.Method=function(t){return o("method",(e=t,function(){return e}));var e}}).call(this)},442:function(t){t.exports=function(t){return function(e){try{return t(e)}catch(t){if(e.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack)),!e.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack),new Error("I need adapter.defer");var n=e.defer();return n.reject(t),n.promise}}}},821:function(t,e,n){(function(){var t=n(454);e.Http=function(t,e){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||e.http||t.http)(n);return n.debug&&r&&r.then&&r.then((function(t){console.log("\nDEBUG: (responce)",t)})),r}},e.$JsonData=function(e){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==t.type(r)||"array"==t.type(r)?JSON.stringify(r):r)),e(n)}}}).call(this)},29:function(t,e,n){(function(){var t=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"];e.$WithPatient=t.$$Simple((function(t){var e=t.type;return t.patient&&("Patient"===e?(t.query=t.query||{},t.query._id=t.patient,t.id=t.patient):r.indexOf(e)>=0&&(t.query=t.query||{},t.query.patient=t.patient)),t}))}).call(this)},723:function(t,e,n){(function(){var e=n(454),r=/^#(.*)/,o=function(t){var n,o,i,u,a=t.cache,c=t.reference,s=t.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=t.resource,i=n.match(r)[1],(u=(o.contained||[]).filter((function(t){return(t.id||t._id)==i}))[0])&&{content:u}||null;var f=e.absoluteUrl(t.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(t){return t.id===f}))[0]||(null!=a?a[f]:void 0)||null};t.exports.sync=o,t.exports.resolve=function(t){return function(n){var i=o(n),u=n.reference,a=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return a.resolve(i),a.promise}if(!u)throw new Error("No reference found");if(u&&u.reference.match(r))throw new Error("Contained resource not found");return n.url=e.absoluteUrl(n.baseUrl,u.reference),n.data=null,t(n)}}}).call(this)},921:function(t,e,n){(function(){var t=n(454),r=t.type,o=t.assertArray,i=(t.assertObject,t.reduceMap),u=t.identity,a={$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(t,e){if("$sort"===t)return function(t){var e,n,i,u;for(o(t),i=[],e=0,n=t.length;e<n;e++)switch(u=t[e],r(u)){case"array":i.push({param:"_sort",value:u[0],modifier:":"+u[1]});break;case"string":i.push({param:"_sort",value:u});break;default:i.push(void 0)}return i}(e);if("$has"===t)return i(e,(function(t,e){var n,o;return n=e[0],o=e[1],t.concat(function(){switch(r(o)){case"array":return o.map((function(t){return{param:"_has",value:n+"="+t}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===t||"$revInclude"===t)return n=t,i(e,(function(t,e){var o,i;return o=e[0],i=e[1],t.concat(function(){switch(r(i)){case"array":return i.map((function(t){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+t}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,u,l;switch(r(e)){case"object":return u=t,i(l=e,(function(t,e){var n,i,f,h;return n=e[0],h=e[1],t.concat("$and"===n?o(h).reduce((function(t,e){return t.concat(s(u,e))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:u},"$or"===n?i.value=h:(a[n]&&(i.operator=a[n]),c[n]&&(i.modifier=c[n]),"object"===r(h)&&h.$or?i.value=h.$or:i.value=[h]),[i]):(l.$type&&(f=":"+l.$type),s(""+u+(f||"")+"."+n,h)))}));case"string":case"number":return[{param:t,value:[e]}];case"array":return[{param:t,value:[e.join("|")]}];default:throw"could not linearizeParams "+r(e)}},l=function(t){return i(t,(function(t,e){var n,r;return n=e[0],r=e[1],t.concat(s(n,r))}))},f=function(t){var e,n,r=["_include","_revinclude","_has"];return function(){var o,i,a,c;for(c=[],o=0,i=(a=l(t)).length;o<i;o++)e=a[o],n=-1===r.indexOf(e.param)?encodeURIComponent(e.value):e.value,c.push([e.param,e.modifier,"_has"==e.param?":":"=",e.operator,n].filter(u).join(""));return c}().join("&")};e._query=l,e.query=f;var h=n(801);e.$SearchParams=h.$$Attr("url",(function(t){var e=t.url;return t.query?e+"?"+f(t.query):e})),e.$Paging=function(t){return function(e){var n=e.params||{};return e.since&&(n._since=e.since),e.count&&(n._count=e.count),e.params=n,t(e)}}}).call(this)},249:function(t,e,n){(function(){n(454);var t=n(801),r=function(e,n){var o=function(t){return n&&e.includes("target.versionId")&&!t.target.versionId?n(t):(n&&n(t)+"/"||"")+function(t,e){var n,r,o=(r=e,0==(n=t.trim()).indexOf(":")?function(t,e){for(var n,r=t.split("||").map((function(t){return t.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=e,r[o].split(".").reduce((function(t,e){return"versionId"===e&&t[e]?"_history/"+t[e]:null==t||null==t?null:t[e]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==t.includes("target.versionId"))throw new Error("Parameter "+t+" is required: "+JSON.stringify(e));return o}(e,t)},i=t.Attribute("url",o);return i.slash=function(t){return r(t,o)},i};e.Path=r}).call(this)},454:function(t,e,n){(function(){var t=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;e.trim=function(t){return t?t.toString().replace(r,""):""};var o=function(t){return null==t&&void 0===t?String(t):{"[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(t)]};e.type=o,e.assertArray=function(t){if("array"!==o(t))throw"not array";return t};var i=function(t){if("object"!==o(t))throw"not object";return t};e.assertObject=i;var u=function(t,e,n){var r,o;return n||(n=[]),i(t),function(){var e;for(r in e=[],t)o=t[r],e.push([r,o]);return e}().reduce(e,n)};e.reduceMap=u,e.identity=function(t){return t};var a=function(){return Array.prototype.slice.call(arguments)};e.argsArray=a,e.mergeLists=function(){var e;return e=function(e,n){var r,o,i;for(r in o=t(!0,e),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},a.apply(null,arguments).reduce(e,{})},e.absoluteUrl=function(t,e){return e.match(/https?:\/\/./)?e:t+"/"+e},e.relativeUrl=function(t,e){return e.slice(e,t.length+1)===t+"/"?e.slice(t.length+1):e},e.resourceIdToUrl=function(t,e,n){return e=e.replace(/\/$/,""),(t=t.replace(/^\//,"")).indexOf("/")<0?e+"/"+n+"/"+t:0!==t.indexOf(e)?e+"/"+t:t};var c=function(t,e,n,r){var i;switch(o(n)){case"array":return e(n.map((function(e){return t(e,[n,r])})),r);case"object":return i=function(e,o){var i,u;return i=o[0],u=o[1],e[i]=t(u,[n].concat(r)),e},e(u(n,i,{}),r);default:return e(n,r)}};e.walk=c;var s=function(t,e,n){return e?c(s(t),t,e,n):function(e,n){return s(t,e,n)}};e.postwalk=s}).call(this)},651:function(t,e,n){!function(e){var n=function(t,e,n){var u=n[0],a=n.length;(t||"object"!==r(u))&&(u={});for(var c=0;c<a;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=t?o.clone(s[l]):s[l];u[l]=e?i(u[l],f):f}}return u},r=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},o=function(t){return n(!0===t,!1,arguments)};function i(t,e){if("object"!==r(t))return e;for(var n in e)"object"===r(t[n])&&"object"===r(e[n])?t[n]=i(t[n],e[n]):t[n]=e[n];return t}o.recursive=function(t){return n(!0===t,!0,arguments)},o.clone=function(t){var e,n,i=t,u=r(t);if("array"===u)for(i=[],n=t.length,e=0;e<n;++e)i[e]=o.clone(t[e]);else if("object"===u)for(e in i={},t)i[e]=o.clone(t[e]);return i},e?t.exports=o:window.merge=o}((t=n.nmd(t))&&"object"==typeof t.exports&&t.exports)},602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),p=new d(o||[]);return h._invoke=(a=t,c=n,s=p,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?j:x,o.arg===E)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=j,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},d=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},p=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(p([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,E;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,E):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=p,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:p(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),E}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,X)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=J.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},d=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},p=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(t){return!1}},v=function(t,e){return!e||"object"!==Et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),_t(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=d(W().mark((function t(e){var r,i;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,St.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(At)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,St.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Ct(n,r,e,o)}),(function(t){throw new Ct(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new it((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Dt<Date.now()-6e4||!Rt.getState().loaded)&&x(),new it((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Rt.getState()),Rt.subscribe(n)}))},S=function(){return(Dt<Date.now()-6e4||!Rt.getState().loaded)&&x(),Rt},x=function(){return new Promise((function(t,e){Dt=Date.now(),g(At).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Rt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,It.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Rt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},j=function(t,e){return n=t,e.privileges.find((function(t){return n===t.display}))||e.roles.find((function(t){return"System Developer"===t.display}));var n},E=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Rt.getState()),t||(e=Rt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Mt.apply(this,arguments)},C=function(){(0,St.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:St.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:St.Type.String,_default:"${openmrsSpaBase}/login",_validators:[St.validators.isUrl]},errors:{_type:St.Type.Array,_default:[401],_elements:{_type:St.Type.Number,_validators:[St.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:St.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Tt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?qt:e.lift(new Wt(t))}},R=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Zt(t,e))}},D=function(t,e,n){var r=null!=n?n:Yt;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(R((function(t){return t})))},M=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},L=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},B=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},N=function(){return m("/ws/rest/v1/visittype").pipe(R((function(t){return t.data.results.map(B)}))).pipe(I(1))},$=function(t){return{uuid:t.uuid,display:t.display}},U=function(){return m("/ws/rest/v1/location").pipe(R((function(t){return t.data.results.map($)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Ct},VisitMode:function(){return Lt},VisitStatus:function(){return Bt},backendDependencies:function(){return Xt},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Yt},fetchCurrentPatient:function(){return T},fhir:function(){return Tt},fhirBaseUrl:function(){return Pt},getCurrentUser:function(){return _},getLocations:function(){return U},getLoggedInUser:function(){return E},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return Qt},getVisitTypes:function(){return N},getVisitsForPatient:function(){return D},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return M},sessionEndpoint:function(){return At},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return $},toVisitTypeObject:function(){return B},updateVisit:function(){return L},userHasAccess:function(){return j}});var F,K,z,H,V,q=c(602),W=c.n(q),G=function(t,e){return(G=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},Z=!1,J={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,Z=t},get useDeprecatedSynchronousErrorHandling(){return Z}},Y={closed:!0,next:function(t){},error:function(t){if(J.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},Q=Array.isArray||function(t){return t&&"number"==typeof t.length},X=(F=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},F.prototype=Object.create(Error.prototype),F),tt=function(){var t,n=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)};return n.prototype.unsubscribe=function(){var t;if(!this.closed){var o,i=this,a=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(a,n))a.remove(this);else if(null!==a)for(var f=0;f<a.length;++f)a[f].remove(this);if(e(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(e){t=r(e,X)?u(e.errors):[e]}}if(Q(l)){f=-1;for(var h=l.length;++f<h;){var d=l[f];if(null!==(o=d)&&"object"==typeof o)try{d.unsubscribe()}catch(e){t=t||[],r(e,X)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new X(t)}},n.prototype.add=function(t){var e=t;if(!t)return n.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new n(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,n)){var i=e;(e=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var u=e._parentOrParents;if(null===u)e._parentOrParents=this;else if(r(u,n)){if(u===this)return e;e._parentOrParents=[u,this]}else{if(-1!==u.indexOf(this))return e;u.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[e]:a.push(e),e},n.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},n.EMPTY=((t=new n).closed=!0,t),n}(),et="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),nt=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=Y;break;case 1:if(!t){u.destination=Y;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new rt(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new rt(u,t,o,i)}return u}return t(n,e),n.prototype[et]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(tt),rt=(z=function(t,n,r,o){var i,u=K.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==Y&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,K=nt),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;J.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=J.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};J.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),J.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!J.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return J.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ot="function"==typeof Symbol&&Symbol.observable||"@@observable",it=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,nt))return t;if(t[et])return t[et]()}return t||e||n?new nt(t,e,n):new nt(Y)}(t,e,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},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){J.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,nt)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,at="object"==typeof self&&self&&self.Object===Object&&self,ct=(ut||at||Function("return this")()).Symbol,st=Object.prototype,lt=st.hasOwnProperty,ft=st.toString,ht=ct?ct.toStringTag:void 0,dt=Object.prototype.toString,pt=ct?ct.toStringTag:void 0,vt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),yt=Function.prototype,gt=Object.prototype,mt=yt.toString,bt=gt.hasOwnProperty,wt=mt.call(Object),_t=function(t){if(null==(e=t)||"object"!=typeof e||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":pt&&pt in Object(t)?function(t){var e=lt.call(t,ht),n=t[ht];try{t[ht]=void 0;var r=!0}catch(t){}var o=ft.call(t);return r&&(e?t[ht]=n:delete t[ht]),o}(t):(e=t,dt.call(e));var e}(t))return!1;var e,n=vt(t);if(null===n)return!0;var o=bt.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&mt.call(o)==wt},St=c(824);function xt(t,e,n){return xt=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&jt(o,n.prototype),o},xt.apply(null,arguments)}function Ot(t){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jt(t,e){return(jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Et=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function kt(t){var e="function"==typeof Map?new Map:void 0;return kt=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xt(t,arguments,Ot(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),jt(r,t)},kt(t)}var At="/ws/rest/v1/session",Ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jt(t,e)}(i,t);var e,n,o=(e=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(t){return!1}}(),function(){var t,r=Ot(e);if(n){var o=Ot(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(kt(Error)),Pt="/ws/fhir2/R4",Tt=c(256)({baseUrl:Pt},{http:function(t){return g(t.url,{method:t.method,headers:t.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:t}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:t}}))}}),It=c(254),Rt=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Dt=0;function Mt(){return(Mt=w(W().mark((function t(e,n){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(At,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Lt,Bt,Nt,$t=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),Ut=function(e){var n=function(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 t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(tt),Ft=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(nt),Kt=function(e){var n=function(){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[et]=function(){return new Ft(this)},n.prototype.lift=function(t){var e=new zt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new $t;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new $t;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new $t;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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 $t;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new $t;return this.hasError?(t.error(this.thrownError),tt.EMPTY):this.isStopped?(t.complete(),tt.EMPTY):(this.observers.push(t),new Ut(this,t))},n.prototype.asObservable=function(){var t=new it;return t.source=this,t},n.create=function(t,e){return new zt(t,e)},n}(it),zt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):tt.EMPTY},n}(Kt),Ht=function(e){var n=function(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 $t;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Kt),Vt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),qt=new it((function(t){return t.complete()})),Wt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Vt};return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.total))},t}(),Gt=function(e){var n=function(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(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(nt),Zt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.project,this.thisArg))},t}(),Jt=function(e){var n=function(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(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(nt),Yt="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)",Qt=new Ht(null);(Nt=Lt||(Lt={})).NEWVISIT="startVisit",Nt.EDITVISIT="editVisit",Nt.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Bt||(Bt={}));var Xt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},9810:()=>{function t(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.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](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?p(e.matcher):p(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},d=function(t){return h(l(),t)};function p(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return p(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,d="["+e(o.endsWith||"")+"]|$",p="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=p+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var S=t[t.length-1],x="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+p+"(?="+d+"))?"),x||(v+="(?="+p+"|"+d+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},d=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var p=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=p||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=p||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},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(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,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(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},6347:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=o(t);function u(t,e){return st(t,e,n.slice(),r.slice())}return!a((function(t,e){return!a(u,e,t)}),o(e),i)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},h=function(t,e,n,r){return t["@@transducer/result"](n[r](bt(t["@@transducer/step"],t),e))},d=function(t){return"[object Object]"===Object.prototype.toString.call(t)},p=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Tt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Tt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Tt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},j=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},E=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=F(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(U(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=E(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,d=Object.entries(c)[Symbol.iterator]();!(s=(h=d.next()).done);s=!0){var p=E(h.value,2),v=p[0];$(p[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return j({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=E(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:j({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Nt(pt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=E(a.value,2);n=z([n,$t(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Bt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},R=function(t,e){Ut(t,e);var n=Rt.getState();Rt.setState({schemas:j({},n.schemas,O({},t,e))})},D=function(t,e){Ut(t,e);var n=Rt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Rt.setState({schemas:j({},n.schemas,O({},t,e))})},M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Rt.getState();Rt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},L=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},B=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=zt(t,e,r);return Kt(t,o,n),o},N=function(t,e,n,r,o,i){var u,a,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,d=U(o,i),p=K(t,d),v=null!==(s=null==p||null===(u=p.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([K(h,d),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=zt(g,y,o.devDefaultsAreOn);return Kt(g,m,h),delete m.extensionSlots,m},$=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},U=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=K(t,U(e,n));H(r,o,t);var i=zt(r,o,e.devDefaultsAreOn);return Kt(r,i,t),delete i.extensionSlots,i},K=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return _t(Ot)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Ft(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:jt,Boolean:Et,ConceptUuid:Pt,Number:kt,Object:Ct,String:At,UUID:Pt,PersonAttributeTypeUuid:Pt,PatientIdentifierTypeUuid:Pt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},J=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},Y=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(e,n);o.startsWith(r)?(0,Ht.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return ht},configExtensionStore:function(){return Lt},configInternalStore:function(){return Rt},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return D},getConfig:function(){return L},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Bt},inRange:function(){return Vt},interpolateString:function(){return Y},interpolateUrl:function(){return J},isUrl:function(){return Wt},isUrlWithTemplateParameters:function(){return qt},navigate:function(){return Q},oneOf:function(){return Gt},processConfig:function(){return B},provide:function(){return M},temporaryConfigStore:function(){return Mt},validator:function(){return p},validators:function(){return Zt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),d=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!c(p,n)||!st(n[p],e[p],h,d))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])}));function ft(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?ft(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ht,dt,pt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():ft(t,[],[],!0)})),vt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},yt=n((function(t){return!!vt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),gt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),mt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),bt=mt,wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t=l((function(t,e,n){if("function"==typeof t&&(t=new gt(t)),yt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return h(t,e,n,"fantasy-land/reduce");if(null!=n[wt])return f(t,e,n[wt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return h(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),St=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),xt=l((function t(e,n,r){return St((function(n,r,o){return d(r)&&d(o)?t(e,r,o):e(n,r,o)}),n,r)})),Ot=r((function(t,e){return xt((function(t,e,n){return n}),t,e)}));(dt=ht||(ht={})).Array="Array",dt.Boolean="Boolean",dt.ConceptUuid="ConceptUuid",dt.Number="Number",dt.Object="Object",dt.String="String",dt.UUID="UUID",dt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",dt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var jt=p((function(t){return Array.isArray(t)}),"must be an array"),Et=p((function(t){return"boolean"==typeof t}),"must be a boolean"),kt=p((function(t){return"number"==typeof t}),"must be a number"),At=p((function(t){return"string"==typeof t}),"must be a string"),Ct=p((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Pt=p((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Tt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Rt=(0,Tt.createGlobalStore)("config-internal",It),Dt=v();Rt.subscribe((function(t){var e;t.devDefaultsAreOn!=Dt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Dt=t.devDefaultsAreOn)}));var Mt=(0,Tt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Mt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Lt=(0,Tt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Bt=(0,Tt.createGlobalStore)("config-implementer-tools",{config:{}});function Nt(t){return t.hasOwnProperty("_default")?j({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Nt(t[n]),e}),{}):{}}function $t(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=$t(t[r],e),n}),{}):{_value:t,_source:e}}function Ut(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ut(t,c,a);var s=c._elements;if(W(s)&&Ut(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var d,p=c._validators[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(ht).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ht).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ht.Array,ht.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Ft(t,e,n){V(n,t._type,e),G(e)?t._type===ht.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===ht.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Ft(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Kt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ht.Object&&t._elements?Kt(t._elements,s,l):Kt(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Kt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return C(t,Mt.getState())})),Mt.subscribe((function(t){return C(Rt.getState(),t)})),T(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return T(t,Mt.getState())})),Mt.subscribe((function(t){return T(Rt.getState(),t)})),P(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return P(t,Mt.getState())})),Mt.subscribe((function(t){return P(Rt.getState(),t)})),I(Rt.getState(),Lt.getState(),Mt.getState()),Rt.subscribe((function(t){I(t,Lt.getState(),Mt.getState())})),Lt.subscribe((function(t){I(Rt.getState(),t,Mt.getState())})),Mt.subscribe((function(t){I(Rt.getState(),Lt.getState(),t)}));var zt=function(t,e,n){var r=pt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ht.Array&&Array.isArray(u)){var l=u.map((function(t){return zt(s,t,n)}));r[i]=l}else if(a._type===ht.Object){var f=!0,h=!1,d=void 0;try{for(var p,v=Object.keys(u)[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){var y=p.value;u[y]=zt(s,u[y],n)}}catch(t){h=!0,d=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw d}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=zt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Ht=i(645),Vt=function(t,e){return p((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},qt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return p((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Wt=qt([]),Gt=function(t){return p((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:Vt,isUrl:Wt,isUrlWithTemplateParameters:qt,oneOf:Gt}}(),u}())}}}))},7708:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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):o instanceof i))return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});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}())}}}))},547:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,u){var a={},c={},s={};return{setters:[function(t){a.configExtensionStore=t.configExtensionStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionSlotConfig=t.getExtensionSlotConfig,a.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,a.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){c.createGlobalStore=t.createGlobalStore,c.getGlobalStore=t.getGlobalStore},function(t){s.mountRootParcel=t.mountRootParcel}],execute:function(){i(function(){var i={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=a},685:function(t){"use strict";t.exports=c},645:function(t){"use strict";t.exports=s}},l={};function f(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={exports:{}};return i[t](n,n.exports,f),n.exports}f.y=u,f.d=function(t,e){for(var n in e)f.o(e,n)&&!f.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;f.g.importScripts&&(t=f.g.location+"");var e=f.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=t}();var h={};return(0,f(968).s)(1),function(){"use strict";var i=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},u=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},a=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},c=function(t){var e=this.__data__=new V(t);this.size=e.size},s=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new St;++e<n;)this.add(t[e])},l=function(t){var e=Me.getState(),n=t(e);n!==e&&Me.setState(n)},d=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var d=f.value;e.push({slotModuleName:d.slotModuleName,extensionModuleName:a.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}Ie(Re.configExtensionStore.getState().mountedExtensions,e)||Re.configExtensionStore.setState({mountedExtensions:e})},p=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},v=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){v(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},g=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||b(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},m=function(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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.")}()},b=function(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}},w=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=g(a.value,2),l=s[0],f=s[1],h=P(l,t,(0,Re.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}Ie($e.getState().slots,r)||$e.setState({slots:r})},_=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}},S=function(t){return g(t.split("#"),1)[0]},x=function(t,e){var n=S(e);return t.extensions[n]},O=function(t){return x(Ne.getState(),t)},j=function(t,e){l((function(n){var r=n.slots[t];return y({},n,r?{slots:y({},n.slots,v({},t,y({},r,{attachedIds:m(r.attachedIds).concat([e])})))}:{slots:y({},n.slots,v({},t,y({},_(t),{attachedIds:[e]})))})}))},E=function(t,e){l((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?y({},n,{slots:y({},n.slots,v({},t,y({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))},k=function(t){l((function(e){var n=e.slots[t];return n?y({},e,{slots:y({},e.slots,v({},t,y({},n,{attachedIds:[]})))}):e}))},A=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return R(n,t.online,t.offline)}))},P=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Ne.getState().extensions,m(i).concat(m(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=A(t,c,null===(n=s[S(t)])||void 0===n?void 0:n.order,i),u=A(e,c,null===(r=s[S(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=!0,d=!1,p=void 0;try{for(var v,y=l[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var g=v.value,b=(0,Re.getExtensionConfigFromStore)(r,t,g).config,w=S(g),_=e.extensions[w];_&&f.push({id:g,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(t){d=!0,p=t}finally{try{h||null==y.return||y.return()}finally{if(d)throw p}}return f},T=function(t){return P(t,Ne.getState(),(0,Re.getExtensionSlotConfig)(t).config,Fe.getState())},I=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return R(n,t,e)},R=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)},D=function(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}},M=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},L=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},B=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){L(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},N=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o},$=function(t){return function(t){if(Array.isArray(t))return M(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return M(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},U=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=S(r),a=O(r),c=!0,s=null;if(t){if(!a)throw Error("Couldn't find extension '".concat(u,"' to attach to '").concat(e,"'"));var f=a.load,h=a.online,d=a.offline,p=a.meta,v=a.moduleName;I(h,d)&&(f().then((function(u){var a=u.default,l=N(u,["default"]);c&&(s=(0,Ve.mountRootParcel)(o(null!=a?a:l),B({},D(h,d),i,{_meta:p,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:v},domElement:t})))})),l((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return B({},o,{extensions:B({},o.extensions,L({},u,B({},o.extensions[u],{instances:$(o.extensions[u].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," 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(h),f.d(h,{attach:function(){return j},checkStatus:function(){return I},checkStatusFor:function(){return R},detach:function(){return E},detachAll:function(){return k},extensionStore:function(){return qe},getAssignedExtensions:function(){return T},getConnectedExtensions:function(){return C},getCustomProps:function(){return D},getExtensionInternalStore:function(){return Le},getExtensionNameFromId:function(){return S},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Be},registerExtension:function(){return Ke},registerExtensionSlot:function(){return ze},renderExtension:function(){return U},reset:function(){return He},updateInternalExtensionStore:function(){return l}});var F=function(t,e){return t===e||t!=t&&e!=e},K=function(t,e){for(var n=t.length;n--;)if(F(t[n][0],e))return n;return-1},z=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=K(e,t);return!(n<0||(n==e.length-1?e.pop():z.call(e,n,1),--this.size,0))},i.prototype.get=function(t){var e=this.__data__,n=K(e,t);return n<0?void 0:e[n][1]},i.prototype.has=function(t){return K(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=K(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var H,V=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,G=q||W||Function("return this")(),Z=G.Symbol,J=Object.prototype,Y=J.hasOwnProperty,Q=J.toString,X=Z?Z.toStringTag:void 0,tt=Object.prototype.toString,et=Z?Z.toStringTag:void 0,nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?function(t){var e=Y.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var o=Q.call(t);return r&&(e?t[X]=n:delete t[X]),o}(t):(e=t,tt.call(e));var e},rt=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},ot=function(t){if(!rt(t))return!1;var e=nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},it=G["__core-js_shared__"],ut=(H=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",at=Function.prototype.toString,ct=function(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""},st=/^\[object .+?Constructor\]$/,lt=Function.prototype,ft=Object.prototype,ht=lt.toString,dt=ft.hasOwnProperty,pt=RegExp("^"+ht.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!rt(t)||(e=t,ut&&ut in e))&&(ot(t)?pt:st).test(ct(t));var e}(r)?r:void 0},yt=vt(G,"Map"),gt=vt(Object,"create"),mt=Object.prototype.hasOwnProperty,bt=Object.prototype.hasOwnProperty;u.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},u.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},u.prototype.get=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},u.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:bt.call(e,t)},u.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};var wt=u,_t=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};a.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(yt||V),string:new wt}},a.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},a.prototype.get=function(t){return _t(this,t).get(t)},a.prototype.has=function(t){return _t(this,t).has(t)},a.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var St=a;c.prototype.clear=function(){this.__data__=new V,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(r(n,V)){var o=n.__data__;if(!yt||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new St(o)}return n.set(t,e),this.size=n.size,this};var xt=c;s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},s.prototype.has=function(t){return this.__data__.has(t)};var Ot=s,jt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Et=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,d=2&n?new Ot:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var p=t[f],v=e[f];if(r)var y=u?r(v,p,f,e,t,i):r(p,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(d){if(!jt(e,(function(t,e){if(u=e,!d.has(u)&&(p===t||o(p,t,n,r,i)))return d.push(e);var u}))){h=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},kt=G.Uint8Array,At=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ct=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Pt=Z?Z.prototype:void 0,Tt=Pt?Pt.valueOf:void 0,It=Array.isArray,Rt=Object.prototype.propertyIsEnumerable,Dt=Object.getOwnPropertySymbols,Mt=Dt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Dt(t),(function(e){return Rt.call(t,e)})))}:function(){return[]},Lt=function(t){return null!=t&&"object"==typeof t},Bt=function(t){return Lt(t)&&"[object Arguments]"==nt(t)},Nt=Object.prototype,$t=Nt.hasOwnProperty,Ut=Nt.propertyIsEnumerable,Ft=Bt(function(){return arguments}())?Bt:function(t){return Lt(t)&&$t.call(t,"callee")&&!Ut.call(t,"callee")},Kt=Ft,zt=e&&!e.nodeType&&e,Ht=zt&&t&&!t.nodeType&&t,Vt=Ht&&Ht.exports===zt?G.Buffer:void 0,qt=(Vt?Vt.isBuffer:void 0)||function(){return!1},Wt=/^(?:0|[1-9]\d*)$/,Gt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var Jt,Yt,Qt,Xt=e&&!e.nodeType&&e,te=Xt&&t&&!t.nodeType&&t,ee=te&&te.exports===Xt&&q.process,ne=function(){try{return te&&te.require&&te.require("util").types||ee&&ee.binding&&ee.binding("util")}catch(t){}}(),re=ne&&ne.isTypedArray,oe=re?(Jt=re,function(t){return Jt(t)}):function(t){return Lt(t)&&Gt(t.length)&&!!Zt[nt(t)]},ie=Object.prototype.hasOwnProperty,ue=Object.prototype,ae=(Yt=Object.keys,Qt=Object,function(t){return Yt(Qt(t))}),ce=Object.prototype.hasOwnProperty,se=function(t){return n=Mt,r=function(t){return null!=(e=t)&&Gt(e.length)&&!ot(e)?function(t,e){var n,r,i,u=It(t),a=!u&&Kt(t),c=!u&&!a&&qt(t),s=!u&&!a&&!c&&oe(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var d in t)!ie.call(t,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=h,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&Wt.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||ue))return ae(t);var e,n,r=[];for(var o in Object(t))ce.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),It(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},le=Object.prototype.hasOwnProperty,fe=vt(G,"DataView"),he=vt(G,"Promise"),de=vt(G,"Set"),pe=vt(G,"WeakMap"),ve="[object Map]",ye="[object Promise]",ge="[object Set]",me="[object WeakMap]",be="[object DataView]",we=ct(fe),_e=ct(yt),Se=ct(he),xe=ct(de),Oe=ct(pe),je=nt;(fe&&je(new fe(new ArrayBuffer(1)))!=be||yt&&je(new yt)!=ve||he&&je(he.resolve())!=ye||de&&je(new de)!=ge||pe&&je(new pe)!=me)&&(je=function(t){var e=nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case we:return be;case _e:return ve;case Se:return ye;case xe:return ge;case Oe:return me}return e});var Ee=je,ke="[object Arguments]",Ae="[object Array]",Ce="[object Object]",Pe=Object.prototype.hasOwnProperty,Te=function t(e,n,o,i,u){return e===n||(null==e||null==n||!Lt(e)&&!Lt(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=It(t),c=It(e),s=a?Ae:Ee(t),l=c?Ae:Ee(e),f=(s=s==ke?Ce:s)==Ce,h=(l=l==ke?Ce:l)==Ce,d=s==l;if(d&&qt(t)){if(!qt(e))return!1;a=!0,f=!1}if(d&&!f)return u||(u=new xt),a||oe(t)?Et(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new kt(t),new kt(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return F(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=At;case"[object Set]":var c=1&r;if(a||(a=Ct),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Et(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Tt)return Tt.call(t)==Tt.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var p=f&&Pe.call(t,"__wrapped__"),v=h&&Pe.call(e,"__wrapped__");if(p||v){var y=p?t.value():t,g=v?e.value():e;return u||(u=new xt),i(y,g,n,o,u)}}return!!d&&(u||(u=new xt),function(t,e,n,o,i,u){var a=1&n,c=se(t),s=c.length;if(s!=se(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:le.call(e,f)))return!1}var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var p=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(p=!1)}return u.delete(t),u.delete(e),p}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Ie=function(t,e){return Te(t,e)},Re=f(824),De=f(685),Me=(0,De.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Le=function(){return(0,De.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Be=function(){return(0,De.getGlobalStore)("extensions",{slots:{}})};d(Me.getState()),Me.subscribe(d);var Ne=Le(),$e=Be(),Ue=(0,Re.getExtensionSlotsConfigStore)(),Fe=(0,Re.getExtensionsConfigStore)();Ne.subscribe((function(t){w(t,Ue.getState(),Fe.getState())})),Ue.subscribe((function(t){w(Ne.getState(),t,Fe.getState())})),Fe.subscribe((function(t){w(Ne.getState(),Ue.getState(),t)}));var Ke=Ne.action((function(t,e){t.extensions[e.name]=y({},e,{instances:[]})})),ze=Ne.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)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,".")),t;if(o&&o==e)return t;if(t.slots[n])return y({},t,{slots:y({},t.slots,v({},n,y({},t.slots[n],{moduleName:e})))});var i=_(n,e);return y({},t,{slots:y({},t.slots,v({},n,i))})})),He=$e.action((function(){return{slots:{},extensions:{}}})),Ve=f(645),qe=Le()}(),h}())}}}))},4889:(t,e,n)=>{"use strict";n.r(e);var r=n(159),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(9810);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var u=n(6347);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var a=n(7708);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var c=n(547);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var s=n(9473);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var l=n(2630);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(9336);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var h=n(1493);o={};for(const t in h)"default"!==t&&(o[t]=()=>h[t]);n.d(e,o);var d=n(2390);o={};for(const t in d)"default"!==t&&(o[t]=()=>d[t]);n.d(e,o)},9473:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},a=function(t){window.dispatchEvent(new CustomEvent(p,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",p="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},2630:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function d(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},i={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){i.createGlobalStore=t.createGlobalStore}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var u,a,s,l,f=e&&c(e.prototype,i)?e:i,h=Object.create(f.prototype),p=new d(r||[]);return h._invoke=(u=t,a=n,s=p,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(u,a,s);if("normal"===i.type){if(l=s.done?j:x,i.arg===E)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=j,s.method="throw",s.arg=i.arg)}}),h},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},d=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},p=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var S="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(p([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=a.prototype=i.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,E;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,E):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return u.prototype=a,n(P,"constructor",a),n(a,"constructor",u),u.displayName=n(a,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=p,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:p(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),E}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=r},685:function(t){"use strict";t.exports=i}},d={};function p(e){var n=d[e];if(void 0!==n)return n.exports;var r=d[e]={exports:{}};return t[e](r,r.exports,p),r.exports}p.y=e,p.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return p.d(e,{a:e}),e},p.d=function(t,e){for(var n in e)p.o(e,n)&&!p.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;p.g.importScripts&&(t=p.g.location+"");var e=p.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),p.p=t}();var v={};return(0,p(968).s)(1),function(){"use strict";var t=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},e=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},r=function(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(r)},i=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},d=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},y=function(){},g=function(t,e){if(!e)return t&&t.then?t.then(y):Promise.resolve()},m=function(t,e){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Tn(t,e);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=In?In:Promise.resolve(void 0)},w=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},S=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){w(i,r,o,u,a,"next",t)}function a(t){w(i,r,o,u,a,"throw",t)}u(void 0)}))}},x=function(t){return Nn.apply(this,arguments)},O=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},j=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){O(i,r,o,u,a,"next",t)}function a(t){O(i,r,o,u,a,"throw",t)}u(void 0)}))}},E=function(){return $n.apply(this,arguments)},k=function(){return Un.apply(this,arguments)},A=function(){return Fn.apply(this,arguments)},C=function(){return Kn.apply(this,arguments)},P=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},T=function(t){"unavailable"!==Hn&&"unavailable"!==t&&(localStorage.setItem(zn,"on"===t?"active":"disabled"),Hn=t)},I=function(){return Vn.apply(this,arguments)},R=function(t,e){return"object"!=typeof e||Wn(e).forEach((function(n){t[n]=e[n]})),t},D=function(t,e){return Jn.call(t,e)},M=function(t,e){"function"==typeof e&&(e=e(Zn(t))),("undefined"==typeof Reflect?Wn:Reflect.ownKeys)(e).forEach((function(n){L(t,n,e[n])}))},L=function(t,e,n,r){Yn(t,e,R(n&&D(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},B=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),L(t.prototype,"constructor",t),{extend:M.bind(null,t.prototype)}}}},N=function(t,e,n){return tr.call(t,e,n)},$=function(t,e){return e(t)},U=function(t){if(!t)throw new Error("Assertion Failed")},F=function(t){qn.setImmediate?setImmediate(t):setTimeout(t,0)},K=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},z=function(t){var e={};for(var n in t)D(t,n)&&(e[n]=t[n]);return e},H=function(t){return rr.apply([],t)},V=function(t){ur="undefined"!=typeof WeakMap&&new WeakMap;var e=ar(t);return ur=null,e},q=function(t){return cr.call(t).slice(8,-1)},W=function(t){var e,n,r,o;if(1===arguments.length){if(Gn(t))return t.slice();if(this===fr&&"string"==typeof t)return[t];if(o=lr(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},G=function(t,e){dr=t,pr=e},Z=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(pr).map((function(t){return"\n"+t})).join("")):""},J=function(t,e){this._e=yr(),this.name=t,this.message=e},Y=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Q=function(t,e,n,r){this._e=yr(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Y(t,e)},X=function(t,e){this._e=yr(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=Y(t,e)},tt=function(){},et=function(t){return t},nt=function(t,e){return null==t||t===et?e:function(n){return e(t(n))}},rt=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},ot=function(t,e){return t===tt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rt(o,this.onerror):o),void 0!==i?i:n}},it=function(t,e){return t===tt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rt(r,this.onerror):r)}},ut=function(t,e){return t===tt?e:function(n){var r=t.apply(this,arguments);R(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rt(i,this.onerror):i),void 0===r?void 0===u?void 0:u:R(r,u)}},at=function(t,e){return t===tt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},ct=function(t,e){return t===tt?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},st=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=tt,this._lib=!1;var e=this._PSD=zr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==jr)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ft(this,this._value))}this._state=null,this._value=null,++e.ref,Gr(this,t)},lt=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},ft=function(t,e){if($r.push(e),null===t._state){var n=t._lib&&gt();e=Fr(e),t._state=!1,t._value=e,dr&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=Xn(e,"stack");e._promise=t,L(e,"stack",{get:function(){return Rr?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,Nr.some((function(t){return t._value===r._value}))||Nr.push(r),ht(t),n&&mt()}var r},ht=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)dt(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Vr&&(++Vr,Mr((function(){0==--Vr&&bt()}),[]))},dt=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Vr,Mr(pt,[n,t,e])}else t._listeners.push(e)},pt=function(t,e,n){try{Ur=e;var r,o=e._value;e._state?r=t(o):($r.length&&($r=[]),r=t(o),-1===$r.indexOf(o)&&function(t){for(var e=Nr.length;e;)if(Nr[--e]._value===t._value)return void Nr.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Ur=null,0==--Vr&&bt(),--n.psd.ref||n.psd.finalize()}},vt=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},yt=function(){gt()&&mt()},gt=function(){var t=Lr;return Lr=!1,Br=!1,t},mt=function(){var t,e,n;do{for(;Hr.length>0;)for(t=Hr,Hr=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Hr.length>0);Lr=!0,Br=!0},bt=function(){var t=Nr;Nr=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=qr.slice(0),n=e.length;n;)e[--n]()},wt=function(t){return new st(jr,!1,t)},_t=function(t,e){var n=zr;return function(){var r=gt(),o=zr;try{return At(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{At(o,!1),r&&mt()}}},St=function(t,e,n,r){var o=zr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var u=Kr.env;i.env=Ir?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject,nthen:Rt(u.nthen,i),gthen:Rt(u.gthen,i)}:{},e&&R(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Pt(i,t,n,r);return 0===i.ref&&i.finalize(),a},xt=function(){return Jr.id||(Jr.id=++Yr),++Jr.awaits,Jr.echoes+=100,Jr.id},Ot=function(){return!!Jr.awaits&&(0==--Jr.awaits&&(Jr.id=0),Jr.echoes=100*Jr.awaits,!0)},jt=function(t){return Jr.echoes&&t&&t.constructor===Tr?(xt(),t.then((function(t){return Ot(),t}),(function(t){return Ot(),no(t)}))):t},Et=function(t){++to,Jr.echoes&&0!=--Jr.echoes||(Jr.echoes=Jr.id=0),Qr.push(zr),At(t,!0)},kt=function(){var t=Qr[Qr.length-1];Qr.pop(),At(t,!1)},At=function(t,e){var n=zr;if((e?!Jr.echoes||Xr++&&t===zr:!Xr||--Xr&&t===zr)||Tt(e?Et.bind(null,t):kt),t!==zr&&(zr=t,n===Kr&&(Kr.env=Ct()),Ir)){var r=Kr.env.Promise,o=t.env;Ar.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(qn,"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))}},Ct=function(){var t=qn.Promise;return Ir?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(qn,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Ar.then,gthen:t.prototype.then}:{}},Pt=function(t,e,n,r,o){var i=zr;try{return At(t,!0),e(n,r,o)}finally{At(i,!1)}},Tt=function(t){Pr.call(kr,t)},It=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=zr;n&&xt(),At(e,!0);try{return t.apply(this,arguments)}finally{At(o,!1),r&&Tt(Ot)}}},Rt=function(t,e){return function(n,r){return t.call(this,It(n,e),It(r,e))}},Dt=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(qn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),R(r,o)):qn.CustomEvent&&R(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&qn.dispatchEvent&&(dispatchEvent(r),!qn.PromiseRejectionEvent&&qn.onunhandledrejection))try{qn.onunhandledrejection(r)}catch(t){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},Mt=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},Lt=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=V(e))[t],e}},Bt=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=at),o||(o=tt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){Wn(t).forEach((function(e){var n=t[e];if(Gn(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Sr.InvalidArgument("Invalid event config");var r=i(e,et,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){F((function(){t.apply(null,e)}))}))}))}}))}},Nt=function(t,e){return B(e).from({prototype:t}),e},$t=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},Ut=function(t,e){t.filter=Mt(t.filter,e)},Ft=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Mt(r(),e())}:e,t.justLimit=n&&!r},Kt=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Sr.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},zt=function(t,e,n){var r=Kt(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},Ht=function(t,e,n,r){var o=t.replayFilter?Mt(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),D(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Vt(zt(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Vt(zt(t,r,n),Mt(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Vt=function(t,e,n,r){var o=_t(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=tt}),(function(e){t.fail(e),n=tt}))||o(t.value,t,(function(t){return n=t})),n()}))}))},qt=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=q(t);return"ArrayBuffer"===n?"binary":n},Wt=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Gt=function(t,e){return t<e?-1:t===e?0:1},Zt=function(t,e){return t>e?-1:t===e?0:1},Jt=function(t,e,n){var r=c(t,go)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Yt=function(t){return new t.Collection(t,(function(){return ee("")})).limit(0)},Qt=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Xt=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Jt(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?Gt:Zt;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var d=new t.Collection(t,(function(){return te(a[0],c[f-1]+r)}));d._ondirectionchange=function(t){h(t)};var p=0;return d._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,p))return!0;for(var d=null,v=p;v<f;++v){var y=Qt(o,h,a[v],c[v],u,s);null===y&&null===d?p=v+1:(null===d||u(d,y)>0)&&(d=y)}return n(null!==d?function(){t.continue(d+l)}:r),!1})),d},te=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},ee=function(t){return{type:1,lower:t,upper:t}},ne=function(t){return _t((function(e){return re(e),t(e.target.error),!1}))},re=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},oe=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+ie(e)}},ie=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},ue=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:K(n,(function(t){return[t.name,t]}))}},ae=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return er(t,e)}:function(e){return er(e,t)};var e},ce=function(t){return[].slice.call(t)},se=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},le=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,d=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=ce((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=Gn(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:ae(e)},indexes:ce(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:Gn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ae(o)};return i[se(o)]=u,u})),getIndexByKeyPath:function(t){return i[se(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[se(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=_t(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var d,p=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,re(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(d=s.clear()):v.push(d=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<p;++S)v.push(d=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),d.onerror=m;else for(var x=0;x<p;++x)v.push(d=s[n](w[x])),d.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};d.onerror=function(t){m(t),O(t)},d.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=_t(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=ne(r),d=0;d<a;++d)null!=n[d]&&((i=u.get(n[d]))._pos=d,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=_t(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=ne(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=_t(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,d=u.objectStore(o),p=f.isPrimaryKey?d:d.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?p.getAll(v,l):p.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=ne(i)}else{var g=0,m=a||!("openKeyCursor"in p)?p.openCursor(v):p.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=ne(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=_t(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),d=u?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in h)?h.openCursor(r(l),d):h.openKeyCursor(r(l),d);p.onerror=ne(c),p.onsuccess=_t((function(n){var r=p.result;if(r){r.___id=++_o,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=_t(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=_t(t),p.onerror=ne(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(p.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=_t((function(t){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=_t((function(e){return t(e.target.result)})),l.onerror=ne(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:wo(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=d.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},fe=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=Xn(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?L(e,t,{get:function(){return this.table(t)},set:function(e){Yn(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},he=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},de=function(t,e){return t._cfg.version-e._cfg.version},pe=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},ve=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return ye(o,t)})),o},ye=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},ge=function(t,e,n){var r={};return N(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=oe(ie(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=oe(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=ue(t,i,u)})),r},me=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+N(f).join("+")+"]";if(e[u]){var d=e[u].idxByName[h];d&&(d.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&qn.WorkerGlobalScope&&c(qn,qn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},be=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Io("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},we=function(t){return t&&"function"==typeof t.databases},_e=function(t){return St((function(){return zr.letThrough=!0,t()}))},Se=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},xe=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Gn(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},Oe=function(t,e,n){var r=arguments.length;if(r<2)throw new Sr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=H(o);return[t,i,n]},je=function(t,e,n){for(var r=Gn(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},Ee=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===po(e.keys[o],t[i])&&(r.push(n?V(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},ke=function(t){return!("from"in t)},Ae=function(t,e){ke(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Co(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},Ce=function(t){var e=ke(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&po(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||po(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},Pe=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=Te(u)}t.d=Te(t)},Te=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},Ie=function(t,e){return Wn(e).forEach((function(n){Ae(t[n]||(t[n]=new Ao),e[n])})),t},Re=function(t){var e=Lo;try{Lo=!0,mo.storagemutated.fire(t)}finally{Lo=e}},De=function(t,e){return!e||"object"!==Ho(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},Me=function(){return new Vo},Le=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Be=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},Ne=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Be(i,r,o,u,a,"next",t)}function a(t){Be(i,r,o,u,a,"throw",t)}u(void 0)}))}},$e=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Ue=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){$e(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Fe=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Le(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Le(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ke=function(){return Go},ze=function(){return Zo.apply(this,arguments)},He=function(t,e,n,r){return Jo.apply(this,arguments)},Ve=function(){return Yo.apply(this,arguments)},qe=function(t,e,n,r){return Qo.apply(this,arguments)},We=function(t,e,n){return Xo.apply(this,arguments)},Ge=function(t,e){return ti.apply(this,arguments)},Ze=function(t,e){return ei.apply(this,arguments)},Je=function(t){return ni.apply(this,arguments)},Ye=function(t){return ri.apply(this,arguments)},Qe=function(t){return oi.apply(this,arguments)},Xe=function(t){var e;return!!(null===(e=Wo[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)},tn=function(t){return ii.apply(this,arguments)},en=function(t){return ui.apply(this,arguments)},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[t]={type:t,dependsOn:e,process:n,options:r}},rn=function(){if(!zo&&!(zo="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 zo(ai)},on=function(){return di+hi()},un=function(t){return t.startsWith(di)},an=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},cn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},sn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){cn(i,r,o,u,a,"next",t)}function a(t){cn(i,r,o,u,a,"throw",t)}u(void 0)}))}},ln=function(t){return function(t){if(Array.isArray(t))return an(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return an(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fn=function(){return Object.values(pi)},hn=function(t){pi[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.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.')),pi[t.id]=t},dn=function(t){return vi.apply(this,arguments)},pn=function(t,e){return yi.apply(this,arguments)},vn=function(t,e){return gi.apply(this,arguments)},yn=function(t,e,n){return mi.apply(this,arguments)},gn=function(t,e){return bi.apply(this,arguments)},mn=function(t,e,n){return wi.apply(this,arguments)},bn=function(t,e){return _i.apply(this,arguments)},wn=function(t,e,n){return Si.apply(this,arguments)},_n=function(){return xi.apply(this,arguments)},Sn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},xn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Sn(i,r,o,u,a,"next",t)}function a(t){Sn(i,r,o,u,a,"throw",t)}u(void 0)}))}},On=function(){return kn(),Oi},jn=function(t,e){kn(),hn({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})},En=function(t){return ji.apply(this,arguments)},kn=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.")};p.r(v),p.d(v,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return tn},canBeginEditSynchronizationItemsOfType:function(){return Xe},deleteSynchronizationItem:function(){return en},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return dn},getDynamicOfflineDataEntriesFor:function(){return pn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Ye},getFullSynchronizationItemsFor:function(){return Ze},getOfflineDb:function(){return Me},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return Ke},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Qe},getSynchronizationItems:function(){return Je},getSynchronizationItemsFor:function(){return Ge},isOfflineUuid:function(){return un},messageOmrsServiceWorker:function(){return x},offlineUuidPrefix:function(){return di},omrsOfflineCachingStrategyHttpHeaderName:function(){return Mn},omrsOfflineResponseBodyHttpHeaderName:function(){return Rn},omrsOfflineResponseStatusHttpHeaderName:function(){return Dn},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return We},queueSynchronizationItemFor:function(){return qe},registerOfflinePatientHandler:function(){return jn},registerOmrsServiceWorker:function(){return m},removeDynamicOfflineData:function(){return gn},removeDynamicOfflineDataFor:function(){return mn},runSynchronization:function(){return ze},setCurrentOfflineMode:function(){return T},setupDynamicOfflineDataHandler:function(){return hn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return En}});try{self["workbox:window:6.5.1"]&&_()}catch(t){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var An=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Cn=function(t,e){this.type=t,Object.assign(this,e)},Pn={type:"SKIP_WAITING"},Tn=function(e){var n,r,o=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new An,r.en=new An,r.on=new An,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new Cn(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Cn("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Cn("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return d(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Cn("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,a=o.prototype;return a.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var u=this;return e=function(){return u.mn=Boolean(navigator.serviceWorker.controller),u.yn=u.pn(),d(u.bn(),(function(t){u.fn=t,u.yn&&(u.hn=u.yn,u.en.resolve(u.yn),u.on.resolve(u.yn),u.yn.addEventListener("statechange",u.ln,{once:!0}));var e=u.fn.waiting;return e&&i(e.scriptURL,u.sn.toString())&&(u.hn=e,Promise.resolve().then((function(){u.dispatchEvent(new Cn("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})).then((function(){}))),u.hn&&(u.rn.resolve(u.hn),u.an.add(u.hn)),u.fn.addEventListener("updatefound",u.cn),navigator.serviceWorker.addEventListener("controllerchange",u.dn),u.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return g(new Promise((function(t){return window.addEventListener("load",t)})))}())&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},a.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},a.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(e){try{return d(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,Pn)},a.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},a.bn=function(){try{var t=this;return function(e,n){try{var r=d(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(o.prototype,u),o}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),In=void 0,Rn="x-omrs-offline-response-body",Dn="x-omrs-offline-response-status",Mn="x-omrs-offline-caching-strategy",Ln=p(602),Bn=p.n(Ln);function Nn(){return(Nn=S(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.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 t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $n(){return($n=j(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function Un(){return(Un=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fn(){return Fn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),Fn.apply(this,arguments)}function Kn(){return(Kn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,k();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,E();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var zn="openmrs3:offline-mode",Hn="unavailable";function Vn(){return(Vn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,C();case 2:t.sent||(Hn="active"===localStorage.getItem(zn)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Wn=Object.keys,Gn=Array.isArray;"undefined"==typeof Promise||qn.Promise||(qn.Promise=Promise);var Zn=Object.getPrototypeOf,Jn={}.hasOwnProperty,Yn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(t,e){var n;return Qn(t,e)||(n=Zn(t))&&Xn(n,e)}var tr=[].slice;function er(t,e){if(D(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=er(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:er(a,e.substr(u+1))}}function nr(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){U("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)nr(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?Gn(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),nr(c,a,n)}}else void 0===n?Gn(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return qn[t]})),ir=or.map((function(t){return qn[t]}));K(or,(function(t){return[t,!0]}));var ur=null;function ar(t){if(!t||"object"!=typeof t)return t;var e=ur&&ur.get(t);if(e)return e;if(Gn(t)){e=[],ur&&ur.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(ar(t[n]))}else if(ir.indexOf(t.constructor)>=0)e=t;else{var o=Zn(t);for(var i in e=o===Object.prototype?{}:Object.create(o),ur&&ur.set(t,e),t)D(t,i)&&(e[i]=ar(t[i]))}return e}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":h(sr))?function(t){var e;return null!=t&&(e=t[sr])&&e.apply(t)}:function(){return null},fr={},hr="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),pr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(t){return t}return new Error}var gr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(gr),br={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"};B(J).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),B(Q).from(J),B(X).from(J);var wr=mr.reduce((function(t,e){return t[e]=e+"Error",t}),{}),_r=J,Sr=mr.reduce((function(t,e){var n=function(t,n){this._e=yr(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=br[e]||r,this.inner=null)},r=e+"Error";return B(n).from(_r),t[e]=n,t}),{});Sr.Syntax=SyntaxError,Sr.Type=TypeError,Sr.Range=RangeError;var xr=gr.reduce((function(t,e){return t[e+"Error"]=Sr[e],t}),{}),Or=mr.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Sr[e]),t}),{});Or.ModifyError=Q,Or.DexieError=J,Or.BulkError=X;var jr={},Er=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,Zn(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Zn(e),t]}(),3),kr=Er[0],Ar=Er[1],Cr=Er[2],Pr=Ar&&Ar.then,Tr=kr&&kr.constructor,Ir=!!Cr,Rr=!1,Dr=Cr?function(){Cr.then(yt)}:qn.setImmediate?setImmediate.bind(null,yt):qn.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){yt(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(yt,0)},Mr=function(t,e){Hr.push([t,e]),Br&&(Dr(),Br=!1)},Lr=!0,Br=!0,Nr=[],$r=[],Ur=null,Fr=et,Kr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Dt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Dt(t[0],t[1])}catch(t){}}))}},zr=Kr,Hr=[],Vr=0,qr=[],Wr={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==zr||n!==to),u=i&&!Ot(),a=new st((function(n,a){dt(o,new lt(It(t,e,i,u),It(r,e,i,u),n,a,e))}));return dr&&vt(a,this),a},e=zr,n=to;return t.prototype=jr,t},set:function(t){L(this,"then",t&&t.prototype===jr?Wr:{get:function(){return t},set:Wr.set})}};function Gr(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&gt();e&&"function"==typeof e.then?Gr(t,(function(t,n){c(e,st)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,ht(t)),n&&mt()}}),ft.bind(null,t))}catch(e){ft(t,e)}}function Zr(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Z(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return dr&&((r=Z(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Zr(t._prev,e,n)),e}M(st.prototype,{then:Wr,_then:function(t,e){dt(this,new lt(null,null,t,e,zr))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):wt(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):wt(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),wt(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Rr=!0;var t=Zr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Rr=!1}}},timeout:function(t,e){var n=this;return t<1/0?new st((function(r,o){var i=setTimeout((function(){return o(new Sr.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(st.prototype,Symbol.toStringTag,"Dexie.Promise"),Kr.env=Ct(),M(st,{all:function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return st.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,st))return t;if(t&&"function"==typeof t.then)return new st((function(e,n){t.then(e,n)}));var e=new st(jr,!0,t);return vt(e,Ur),e},reject:wt,race:function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){t.map((function(t){return st.resolve(t).then(e,n)}))}))},PSD:{get:function(){return zr},set:function(t){return zr=t}},totalEchoes:{get:function(){return to}},newPSD:St,usePSD:Pt,scheduler:{get:function(){return Mr},set:function(t){Mr=t}},rejectionMapper:{get:function(){return Fr},set:function(t){Fr=t}},follow:function(t,e){return new st((function(n,r){return St((function(e,n){var r=zr;r.unhandleds=[],r.onunhandled=n,r.finalize=rt((function(){var t=this;qr.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),qr.splice(qr.indexOf(r),1)})),++Vr,Mr((function(){0==--Vr&&bt()}),[])}),r.finalize),t()}),e,n,r)}))}}),Tr&&(Tr.allSettled&&L(st,"allSettled",(function(){var t=W.apply(null,arguments).map(jt);return new st((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return st.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Tr.any&&"undefined"!=typeof AggregateError&&L(st,"any",(function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return st.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var Jr={awaits:0,echoes:0,id:0},Yr=0,Qr=[],Xr=0,to=0,eo=0;-1===(""+Pr).indexOf("[native code]")&&(xt=Ot=tt);var no=st.reject;function ro(t,e,n,r){if(t.idbdb&&(t._state.openComplete||zr.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return ro(t,e,n,r)}))):no(o)}return o._promise(e,(function(t,e){return St((function(){return zr.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return no(new Sr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return no(new Sr.DatabaseClosed);t.open().catch(tt)}return t._state.dbReadyPromise.then((function(){return ro(t,e,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",uo=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=ao,so=ao,lo=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},ho=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Sr.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||zr.trans,i=this.name,u=gt();try{return o&&o.db===this.db?o===zr.trans?o._promise(t,r,n):St((function(){return o._promise(t,r,n)}),{trans:o,transless:zr.transless||zr}):ro(this.db,t,[this.name],r)}finally{u&&mt()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(Gn(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=Wn(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&dr&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?Mt(a,c&&c.multi?function(t){var n=er(t,r);return Gn(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,er(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,Gn(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(D(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){R(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Lt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||Gn(t))return this.where(":id").equals(t).modify(e);var n=er(t,this.schema.primKey.keyPath);if(void 0===n)return no(new Sr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?Wn(e).forEach((function(n){nr(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Lt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:fo})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Lt(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Lt(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new X("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function po(t,e){try{var n=qt(t),r=qt(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Wt(t),Wt(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=po(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var vo=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,no.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=Mt(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return Ht(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&R(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return Ht(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if($t(n,!0))return r.count({trans:t,query:{index:Kt(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return Ht(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&$t(n,!0)&&n.limit>0){var r=n.valueMapper,o=Kt(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return Ht(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,$t(e)?Ft(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):Ft(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Ft(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return Ut(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return Ut(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=Mt(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&$t(e,!0)&&e.limit>0)return this._read((function(t){var n=Kt(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ut(this._ctx,(function(t){var e=t.primaryKey.toString(),r=D(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=Wn(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];er(e,o)!==a&&(nr(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],d=0,p=[],v=function(t,e){var n=e.failures,r=e.numFailures;d+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=Wn(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var d=[],p=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:V(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===po(l(b),l(w.value))?(p.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),d.push(w.value)))}var _=$t(n)&&n.limit===1/0&&("function"!=typeof t||t===yo)&&{index:n.index,range:n.range};return Promise.resolve(d.length>0&&a.mutate({trans:r,type:"add",values:d}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(d.length,t)}))).then((function(){return(p.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:p,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(p.length,t)}))})).then((function(){return(g.length>0||_&&t===yo)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new Q("Error modifying one or more objects",h,d,p);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return $t(t)&&(t.isPrimKey&&!so||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(yo)}}]),t}(),yo=function(t,e){return e.value=null},go=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Yt(this):new this.Collection(this,(function(){return te(t,e,!n,!r)}))}catch(t){return Jt(this,io)}}},{key:"equals",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return ee(t)}))}},{key:"above",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Jt(this,"String expected."):this.between(t,t+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Xt(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],oo)}},{key:"equalsIgnoreCase",value:function(t){return Xt(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Yt(this):Xt(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Yt(this):Xt(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,oo)}},{key:"anyOf",value:function(){var t=this,e=W.apply(fr,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Jt(this,io)}if(0===e.length)return Yt(this);var r=new this.Collection(this,(function(){return te(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=W.apply(fr,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Jt(this,io)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Yt(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Jt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Sr.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{(s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[])).sort(r)}catch(t){return Jt(this,io)}var d=0,p=f?function(t){return i(t,s[d][1])>0}:function(t){return i(t,s[d][1])>=0},v=l?function(t){return u(t,s[d][0])>0}:function(t){return u(t,s[d][0])>=0},y=p,g=new this.Collection(this,(function(){return te(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=p,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++d===s.length)return e(r),!1;return!((p(u=o)||v(u))&&(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||e((function(){h===i?t.continue(s[d][0]):t.continue(s[d][1])})),1));var u})),g}},{key:"startsWithAnyOf",value:function(){var t=W.apply(fr,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Yt(this):this.inAnyRange(t.map((function(t){return[t,t+oo]}))):Jt(this,"startsWithAnyOf() only works with strings")}}]),t}(),mo=Bt(null,"storagemutated"),bo=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return U(!zr.global),++this._reculock,1!==this._reculock||zr.global||(zr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(U(!zr.global),0==--this._reculock)for(zr.global||(zr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Pt(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&zr.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(U(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Sr.DatabaseClosed(r);case"MissingAPIError":throw new Sr.MissingAPI(r.message,r);default:throw new Sr.OpenFailed(r)}if(!this.active)throw new Sr.TransactionInactive;return U(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=_t((function(n){re(n),e._reject(t.error)})),t.onabort=_t((function(n){re(n),e.active&&e._reject(new Sr.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=_t((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&mo.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return no(new Sr.ReadOnly("Transaction is readonly"));if(!this.active)return no(new Sr.TransactionInactive);if(this._locked())return new st((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},zr])}));if(n)return St((function(){var t=r,n=new st((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new st((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=st.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new st((function(t,r){n.then((function(n){return e._waitingQueue.push(_t(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(_t(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Sr.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(D(e,t))return e[t];var n=this.schema[t];if(!n)throw new Sr.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),wo=function(t){try{return t.only([[]]),wo=function(){return[[]]},[[]]}catch(t){return wo=function(){return oo},oo}},_o=0,So=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){Wn(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return oe(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),Gn(r),0===e)})),o=r.shift();if(o.multi)throw new Sr.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Sr.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Sr.Schema("Index must have a name and cannot be an empty string")})),e[n]=ue(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?R(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){R(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,he(e,[e._allTables,e,e.Transaction.prototype]),fe(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],Wn(o),o),e._storeNames=Wn(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=ct(this._cfg.contentUpgrade||tt,t),this}}]),t}();function xo(t,e,n,r,o){return st.resolve().then((function(){var i=zr.transless||zr,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return xo(t,e,n,null,o)}))):no(r)}var c,s=hr(o);s&&xt();var l=st.follow((function(){if(c=o.call(u,u))if(s){var t=Ot.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xe(c))}),a);return(c&&"function"==typeof c.then?st.resolve(c).then((function(t){return u.active?t:no(new Sr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),no(t)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:je(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:je(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=se(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:ae(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var d,p=o.indexes[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[se(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(je(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(je(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function jo(t,e,n,r){return n=n||{},r=r||"",Wn(t).forEach((function(o){if(D(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=q(i);a!==q(u)?n[r+o]=e[o]:"Object"===a?jo(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),Wn(e).forEach((function(o){D(t,o)||(n[r+o]=e[o])})),n}var Eo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e,o,i=zr.trans,u=t.keys||(e=r,"delete"===(o=t).type?o.keys:o.keys||o.values.map(e.extractKey));if(!u)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:u}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,u).then((function(e){var o=u.map((function(n,o){var u=e[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,i);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],i);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||nr(t.values[o],r.keyPath,n))}else{var h=jo(u,t.values[o]),d=l.fire.call(s,h,n,u,i);if(d){var p=t.values[o];Object.keys(d).forEach((function(t){D(p,t)?p[t]=d[t]:nr(p,t,d[t])}))}}return s}));return n.mutate(t).then((function(n){for(var r=n.failures,i=n.results,a=n.numFailures,c=n.lastResult,s=0;s<u.length;++s){var l=i?i[s]:u[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===t.type&&e[s]?t.values[s]:l)}return{failures:r,results:i,numFailures:a,lastResult:c}})).catch((function(t){return o.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=zr.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===tt&&l.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===tt)break;return i._promise("readwrite",(function(){return h((e=t).trans,e.range,1e4);var e}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},ko={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=Ee(t.keys,t.trans._cache,"clone"===t.cache);return e?st.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?V(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Ao=function(t,e){if(!this){var n=new Ao;return t&&"d"in t&&R(n,t),n}R(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Co(t,e,n){var r=po(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(ke(t))return R(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(po(n,t.from)<0)return o?Co(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},Pe(t);if(po(e,t.to)>0)return i?Co(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},Pe(t);po(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),po(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&Ae(t,o),i&&u&&Ae(t,i)}}M(Ao.prototype,a({add:function(t){return Ae(this,t),this},addKey:function(t){return Co(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Co(e,t,t)})),this}},sr,(function(){return Ce(this)})));var Po,To={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Ao(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Ao)},s=c(""),f=c(":dels"),h=t.type,d=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),p=d[0],v=d[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(Gn(p)){"delete"!==h&&(p=t.results),s.addKeys(p);var e=Ee(p,y);e||"add"===h||f.addKeys(p),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&Gn(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==po(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(p){var r={from:p.lower,to:p.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Ao(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},d={get:function(t){return[u,new Ao(t.key)]},getMany:function(t){return[u,(new Ao).addKeys(t.keys)]},count:h,query:h,openCursor:h};return Wn(d).forEach((function(t){f[t]=function(i){var u=zr.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Ao)},h=f(""),p=f(":dels"),v=l(d[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):p.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return p.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return p.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}p.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Io=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f,h={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:tt,dbReadyPromise:null,cancelOpen:tt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};h.dbReadyPromise=new st((function(t){h.dbReadyResolve=t})),h.openCanceller=new st((function(t,e){h.cancelOpen=e})),this._state=h,this.name=e,this.on=Bt(this,"populate","blocked","versionchange","close",{ready:[ct,tt]}),this.on.ready.subscribe=$(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||st.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Nt(vo.prototype,(function(t,e){this.db=a;var n=fo,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=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:u!==et?u:null}}))),this.Table=(f=this,Nt(ho.prototype,(function(t,e,n){this.db=f,this._tx=n,this.name=t,this.schema=e,this.hook=f._allTables[t]?f._allTables[t].hook:Bt(null,{creating:[ot,tt],reading:[nt,et],updating:[ut,tt],deleting:[it,tt]})}))),this.Transaction=(l=this,Nt(bo.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Bt(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 st((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),no(t)}))}))),this.Version=function(t){return Nt(So.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Nt(go.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Sr.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.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(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),uo.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Oo),this.use(Eo),this.use(To),this.use(ko),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Sr.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Sr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(de),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||zr.letThrough||this._vip)?t():new st((function(t,n){if(e._state.openComplete)return n(new Sr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Sr.DatabaseClosed);e.open().catch(tt)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Sr.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):t}));dr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return st.race([o,("undefined"==typeof navigator?st.resolve():Se()).then((function(){return new st((function(o,i){if(e(),!r)throw new Sr.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Sr.MissingAPI;s.onerror=ne(i),s.onblocked=_t(t._fireOnBlocked),s.onupgradeneeded=_t((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=re,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=_t((function(){i(new Sr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=ne(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=zr.transless||zr;St((function(){var r,c,s,l,f,h,d,p,v;zr.trans=i,zr.transless=a,0===e?(Wn(o).forEach((function(t){ve(n,t,o[t].primKey,o[t].indexes)})),le(t,n),st.follow((function(){return t.on.populate.fire(i)})).catch(u)):(r=t,c=e,s=i,l=n,f=r._novip,h=[],d=f._versions,p=f._dbSchema=ge(0,f.idbdb,l),v=!1,d.filter((function(t){return t._cfg.version>=c})).forEach((function(t){h.push((function(){var e=p,n=t._cfg.dbschema;me(f,e,l),me(f,n,l),p=f._dbSchema=n;var r=pe(e,n);r.add.forEach((function(t){ve(l,t[0],t[1].primKey,t[1].indexes)})),r.change.forEach((function(t){if(t.recreate)throw new Sr.Upgrade("Not yet support for changing primary key");var e=l.objectStore(t.name);t.add.forEach((function(t){return ye(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),ye(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var o=t._cfg.contentUpgrade;if(o&&t._cfg.version>c){le(f,l),s._memoizedTables={},v=!0;var i=z(n);r.del.forEach((function(t){i[t]=e[t]})),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],Wn(i),i),s.schema=i;var u,a=hr(o);a&&xt();var h=st.follow((function(){if((u=o(s))&&a){var t=Ot.bind(null,null);u.then(t,t)}}));return u&&"function"==typeof u.then?st.resolve(u):h.then((function(){return u}))}})),h.push((function(e){var n,r;v&&co||(n=t._cfg.dbschema,r=e,[].slice.call(r.db.objectStoreNames).forEach((function(t){return null==n[t]&&r.db.deleteObjectStore(t)}))),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function t(){return h.length?st.resolve(h.shift()(s.idbtrans)).then(t):st.resolve()}().then((function(){var t,e;e=l,Wn(t=p).forEach((function(n){e.db.objectStoreNames.contains(n)||ve(e,n,t[n].primKey,t[n].indexes)}))}))).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=_t((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=N(f.objectStoreNames);if(h.length>0)try{var d=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=ge(0,e,n);r._storeNames=N(e.objectStoreNames,0),fe(r,[r._allTables],Wn(o),o)}(t,f,d):(me(t,t._dbSchema,d),r=d,!((i=pe(ge(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),le(t,d)}catch(t){}uo.push(t),f.onversionchange=_t((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=_t((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).put({name:e}).catch(tt)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],st.resolve(_e((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ct,tt);return n.onReadyBeingFired=[],st.resolve(_e((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),no(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=uo.indexOf(this);if(e>=0&&uo.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new st((function(e){t.dbReadyResolve=e})),t.openCanceller=new st((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Sr.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new st((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=_t((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).delete(e).catch(tt)}(t._deps,t.name),r()})),e.onerror=ne(o),e.onblocked=i._fireOnBlocked};if(e)throw new Sr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return Wn(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=Oe.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=zr.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Sr.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Sr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Sr.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):no(t)}var l=xo.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):zr.trans?Pt(zr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!D(this._allTables,t))throw new Sr.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Ro="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Do=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Ro,value:function(){return this}}]),t}();try{Po={indexedDB:qn.indexedDB||qn.mozIndexedDB||qn.webkitIndexedDB||qn.msIndexedDB,IDBKeyRange:qn.IDBKeyRange||qn.webkitIDBKeyRange}}catch(t){Po={indexedDB:null,IDBKeyRange:null}}var Mo=Io;M(Mo,s({},Or,{delete:function(t){return new Mo(t,{addons:[]}).delete()},exists:function(t){return new Mo(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return we(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):be(e,n).toCollection().primaryKeys()}(Mo.dependencies).then(t)}catch(t){return no(new Sr.MissingAPI)}},defineClass:function(){return function(t){R(this,t)}},ignoreTransaction:function(t){return zr.trans?Pt(zr.transless,t):t()},vip:_e,async:function(t){return function(){try{var e=xe(t.apply(this,arguments));return e&&"function"==typeof e.then?e:st.resolve(e)}catch(t){return no(t)}}},spawn:function(t,e,n){try{var r=xe(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:st.resolve(r)}catch(t){return no(t)}},currentTransaction:{get:function(){return zr.trans||null}},waitFor:function(t,e){var n=st.resolve("function"==typeof t?Mo.ignoreTransaction(t):t).timeout(e||6e4);return zr.trans?zr.trans.waitFor(n):n},Promise:st,debug:{get:function(){return dr},set:function(t){G(t,"dexie"===t?function(){return!0}:lo)}},derive:B,extend:R,props:M,override:$,Events:Bt,on:mo,liveQuery:function(t){return new Do((function(e){var n=function(){return Wn(u).some((function(t){return i[t]&&function(t,e){var n=Ce(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=Ce(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(po(a.from,o.to)<=0&&po(a.to,o.from)>=0)return!0;po(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=hr(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){Ie(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},d=function(e){r&&xt();var n=function(){return St(t,{subscr:e,trans:null})},o=zr.trans?Pt(zr.transless,n):n();return r&&o.then(Ot,Ot),o}(h);s||(mo("storagemutated",l),s=!0),c=!0,Promise.resolve(d).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:Ie,getByKeyPath:er,setByKeyPath:nr,delByKeyPath:function(t,e){"string"==typeof e?nr(t,e,void 0):"length"in e&&[].map.call(e,(function(e){nr(t,e,void 0)}))},shallowClone:z,deepClone:V,getObjectDiff:jo,cmp:po,asap:F,minKey:-1/0,addons:[],connections:uo,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),Mo.maxKey=wo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(t){var e;Lo||(ao?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),Lo=!0,dispatchEvent(e),Lo=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;Lo||Re(e)})));var Lo=!1;if("undefined"!=typeof BroadcastChannel){var Bo=new BroadcastChannel("x-storagemutated-1");mo("storagemutated",(function(t){Lo||Bo.postMessage(t)})),Bo.onmessage=function(t){t.data&&Re(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(t){try{Lo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&Re(e.changedParts)}}));var No=self.document&&navigator.serviceWorker;No&&No.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&Re(e.changedParts)}))}st.rejectionMapper=function(t,e){if(!t||c(t,J)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!xr[t.name])return t;var n=new xr[t.name](e||t.message,t);return"stack"in t&&L(n,"stack",{get:function(){return this.inner.stack}}),n},G(dr,lo);var $o=p(766),Uo=p(685);function Fo(t){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ko(t,e){return(Ko=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var zo,Ho=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ko(t,e)}(o,t);var e,n,r=(e=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(t){return!1}}(),function(){var t,r=Fo(e);if(n){var o=Fo(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return De(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Io),qo=new Vo,Wo={},Go=(0,Uo.createGlobalStore)("offline-synchronization",{});function Zo(){return Zo=Ne(Bn().mark((function t(){var e,n,r,o,i,u,a,c,s,l,f,h,d;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Go.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,qo.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Wo),o=r.length,i={},u=new AbortController,a=function(){var t=Go.getState().synchronization;Go.setState({synchronization:Ue({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Go.setState({synchronization:{totalCount:e,pendingCount:e,abortController:u}}),c=0;case 14:if(!(c<o&&r.length>0)){t.next=30;break}s=r.length;case 16:if(!s--){t.next=27;break}if(l=Fe(r[s],2),f=l[0],h=l[1],!(d=h.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(d);case 23:n[f]=He(h,i,u,a),r.splice(s,1);case 25:t.next=16;break;case 27:c++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Go.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),Zo.apply(this,arguments)}function Jo(){return Jo=Ne(Bn().mark((function t(e,n,r,o){var i,u,a,c,s,l,f,h,d,p,v,y,g,m,b,w;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,u=e.dependsOn,a=e.process,c=[],s=[],t.next=5,Ve();case 5:return l=t.sent,t.next=8,qo.syncQueue.where({type:i,userId:l}).each((function(t,e){c.push([e.primaryKey,t.content,t.descriptor]),s.push(t.content)}));case 8:f=0;case 9:if(!(f<c.length)){t.next=31;break}return h=Fe(c[f],3),d=h[0],p=h[1],v=h[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,a(p,{abort:r,index:f,items:s,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return u.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,qo.syncQueue.delete(d);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,qo.syncQueue.update(d,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),Jo.apply(this,arguments)}function Yo(){return(Yo=Ne(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,$o.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(){return(Qo=Ne(Bn().mark((function t(e,n,r,o){var i,u;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,qo.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(Io.errnames.DatabaseClosed);case 4:return t.next=6,qo.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(Io.errnames.DatabaseClosed,(function(){return-1}));case 6:return u=t.sent,t.abrupt("return",u);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xo(){return(Xo=Ne(Bn().mark((function t(e,n,r){var o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return o=t.sent,t.next=5,qe(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ti(){return(ti=Ne(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ze(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(){return(ei=Ne(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,qo.syncQueue.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ni(){return(ni=Ne(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ge(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ri(){return(ri=Ne(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ze(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oi(){return(oi=Ne(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.get(e).catch(Io.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ii(){return(ii=Ne(Bn().mark((function t(e){var n,r,o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Qe(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}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(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(){return(ui=Ne(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.delete(e).catch(Io.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}for(var ai=new Uint8Array(16),ci=/^(?:[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,si=function(t){return"string"==typeof t&&ci.test(t)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var hi=function(t,e,n){var r=(t=t||{}).random||(t.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[t[e+0]]+li[t[e+1]]+li[t[e+2]]+li[t[e+3]]+"-"+li[t[e+4]]+li[t[e+5]]+"-"+li[t[e+6]]+li[t[e+7]]+"-"+li[t[e+8]]+li[t[e+9]]+"-"+li[t[e+10]]+li[t[e+11]]+li[t[e+12]]+li[t[e+13]]+li[t[e+14]]+li[t[e+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},di="OFFLINE+",pi={};function vi(){return(vi=sn(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return n=t.sent,t.next=5,pn(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yi(){return(yi=sn(Bn().mark((function t(e,n){var r,o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Vo,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gi(){return(gi=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,yn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mi(){return(mi=sn(Bn().mark((function t(e,n,r){var o,i;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(Io.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([e])}).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bi(){return(bi=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,mn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wi(){return(wi=sn(Bn().mark((function t(e,n,r){var o,i;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(Io.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _i(){return _i=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dn(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=sn(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",wn(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),_i.apply(this,arguments)}function Si(){return Si=sn(Bn().mark((function t(e,n,r){var o,i,u,a,c,s,l,f,h;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vn(e,n);case 2:return o=new Vo,t.next=5,_n();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(Io.errnames.DatabaseClosed,(function(){}));case 8:if(u=t.sent,a=fn().filter((function(t){return t.type===e})),u){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(a.map(function(){var t=sn(Bn().mark((function t(e){var o,i,u;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),u=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:u});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(c=t.sent,s=c.filter((function(t){return!t.error})).map((function(t){return t.id})),l=c.filter((function(t){return t.error})).map((function(t){return t.id})),f=c.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),h={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!u.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(u.id,{syncState:h}).catch(Io.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),Si.apply(this,arguments)}function xi(){return(xi=sn(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,$o.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oi=(0,Uo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ji(){return(ji=xn(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return kn(),t.next=3,wn("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}(),v}())}}}))},9336:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,u){var a={},c={},s={},l={},f={},h={},d={},p={},v={};return{setters:[function(t){a.createContext=t.createContext,a.createElement=t.createElement,a.default=t.default,a.useCallback=t.useCallback,a.useContext=t.useContext,a.useDebugValue=t.useDebugValue,a.useEffect=t.useEffect,a.useLayoutEffect=t.useLayoutEffect,a.useMemo=t.useMemo,a.useReducer=t.useReducer,a.useRef=t.useRef,a.useState=t.useState},function(t){c.getConfigStore=t.getConfigStore,c.getExtensionConfigFromStore=t.getExtensionConfigFromStore,c.getExtensionsConfigStore=t.getExtensionsConfigStore,c.interpolateUrl=t.interpolateUrl,c.navigate=t.navigate},function(t){s.getConnectedExtensions=t.getConnectedExtensions,s.getExtensionInternalStore=t.getExtensionInternalStore,s.getExtensionStore=t.getExtensionStore,s.registerExtensionSlot=t.registerExtensionSlot,s.renderExtension=t.renderExtension},function(t){l.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){f.default=t.default},function(t){h.default=t.default},function(t){d.I18nextProvider=t.I18nextProvider},function(t){p.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,p.fetchCurrentPatient=t.fetchCurrentPatient,p.getCurrentUser=t.getCurrentUser,p.getLocations=t.getLocations,p.getSessionStore=t.getSessionStore,p.getVisitTypes=t.getVisitTypes,p.openmrsFetch=t.openmrsFetch,p.userHasAccess=t.userHasAccess},function(t){v.default=t.default}],execute:function(){i(function(){var i={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var i;t=n.nmd(t),function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},d=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},p=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},j=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:tt},E=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,q(t)+1).replace(Vt,""):t},I=function(t){return function(e){return t(e)}},R=function(t,e){return v(e,(function(e){return t[e]}))},D=function(t,e){return t.has(e)},M=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},L=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},B=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},N=function(t){return"\\"+Ke[t]},$=function(t){return Le.test(t)},U=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},F=function(t,e){return function(n){return t(e(n))}},K=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Z||(t[n]=Z,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t){return $(t)?function(t){for(var e=De.lastIndex=0;De.test(t);)++e;return e}(t):un(t)},V=function(t){return $(t)?t.match(De)||[]:t.split("")},q=function(t){for(var e=t.length;e--&&qt.test(t.charAt(e)););return e},W="Expected a function",G="__lodash_hash_undefined__",Z="__lodash_placeholder__",J=32,Y=128,Q=1/0,X=9007199254740991,tt=NaN,et=4294967295,nt=[["ary",Y],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",J],["partialRight",64],["rearg",256]],rt="[object Arguments]",ot="[object Array]",it="[object Boolean]",ut="[object Date]",at="[object Error]",ct="[object Function]",st="[object GeneratorFunction]",lt="[object Map]",ft="[object Number]",ht="[object Object]",dt="[object Promise]",pt="[object RegExp]",vt="[object Set]",yt="[object String]",gt="[object Symbol]",mt="[object WeakMap]",bt="[object ArrayBuffer]",wt="[object DataView]",_t="[object Float32Array]",St="[object Float64Array]",xt="[object Int8Array]",Ot="[object Int16Array]",jt="[object Int32Array]",Et="[object Uint8Array]",kt="[object Uint8ClampedArray]",At="[object Uint16Array]",Ct="[object Uint32Array]",Pt=/\b__p \+= '';/g,Tt=/\b(__p \+=) '' \+/g,It=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rt=/&(?:amp|lt|gt|quot|#39);/g,Dt=/[&<>"']/g,Mt=RegExp(Rt.source),Lt=RegExp(Dt.source),Bt=/<%-([\s\S]+?)%>/g,Nt=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,Ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(zt.source),Vt=/^\s+/,qt=/\s/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Zt=/,? & /,Jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yt=/[()=,{}\[\]\/\s]/,Qt=/\\(\\)?/g,Xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ie=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ae=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",le="a-z\\xdf-\\xf6\\xf8-\\xff",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\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",de="["+he+"]",pe="["+se+"]",ve="\\d+",ye="["+le+"]",ge="[^\ud800-\udfff"+he+ve+"\\u2700-\\u27bf"+le+fe+"]",me="\ud83c[\udffb-\udfff]",be="[^\ud800-\udfff]",we="(?:\ud83c[\udde6-\uddff]){2}",_e="[\ud800-\udbff][\udc00-\udfff]",Se="["+fe+"]",xe="(?:"+ye+"|"+ge+")",Oe="(?:"+Se+"|"+ge+")",je="(?:['’](?:d|ll|m|re|s|t|ve))?",Ee="(?:['’](?:D|LL|M|RE|S|T|VE))?",ke="(?:"+pe+"|"+me+")?",Ae="[\\ufe0e\\ufe0f]?",Ce=Ae+ke+"(?:\\u200d(?:"+[be,we,_e].join("|")+")"+Ae+ke+")*",Pe="(?:"+["[\\u2700-\\u27bf]",we,_e].join("|")+")"+Ce,Te="(?:"+[be+pe+"?",pe,we,_e,"[\ud800-\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),Re=RegExp(pe,"g"),De=RegExp(me+"(?="+me+")|"+Te+Ce,"g"),Me=RegExp([Se+"?"+ye+"+"+je+"(?="+[de,Se,"$"].join("|")+")",Oe+"+"+Ee+"(?="+[de,Se+xe,"$"].join("|")+")",Se+"?"+xe+"+"+je,Se+"+"+Ee,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Pe].join("|"),"g"),Le=RegExp("[\\u200d\ud800-\udfff"+se+"\\ufe0e\\ufe0f]"),Be=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["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"],$e=-1,Ue={};Ue[_t]=Ue[St]=Ue[xt]=Ue[Ot]=Ue[jt]=Ue[Et]=Ue[kt]=Ue[At]=Ue[Ct]=!0,Ue[rt]=Ue[ot]=Ue[bt]=Ue[it]=Ue[wt]=Ue[ut]=Ue[at]=Ue[ct]=Ue[lt]=Ue[ft]=Ue[ht]=Ue[pt]=Ue[vt]=Ue[yt]=Ue[mt]=!1;var Fe={};Fe[rt]=Fe[ot]=Fe[bt]=Fe[wt]=Fe[it]=Fe[ut]=Fe[_t]=Fe[St]=Fe[xt]=Fe[Ot]=Fe[jt]=Fe[lt]=Fe[ft]=Fe[ht]=Fe[pt]=Fe[vt]=Fe[yt]=Fe[gt]=Fe[Et]=Fe[kt]=Fe[At]=Fe[Ct]=!0,Fe[at]=Fe[ct]=Fe[mt]=!1;var Ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,He=parseInt,Ve="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,qe="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||qe||Function("return this")(),Ge=e&&!e.nodeType&&e,Ze=Ge&&t&&!t.nodeType&&t,Je=Ze&&Ze.exports===Ge,Ye=Je&&Ve.process,Qe=function(){try{return Ze&&Ze.require&&Ze.require("util").types||Ye&&Ye.binding&&Ye.binding("util")}catch(t){}}(),Xe=Qe&&Qe.isArrayBuffer,tn=Qe&&Qe.isDate,en=Qe&&Qe.isMap,nn=Qe&&Qe.isRegExp,rn=Qe&&Qe.isSet,on=Qe&&Qe.isTypedArray,un=E("length"),an=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({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function t(e){var n,i,k=function(t){if(Po(t)&&!Pa(t)&&!r(t,le)){if(r(t,se))return t;if(bi.call(t,"__wrapped__"))return no(t)}return new se(t)},qt=function(){},se=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},le=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]},fe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new de;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Pa(t),r=!n&&Ca(t),o=!n&&!r&&Ia(t),i=!n&&!r&&!o&&Ba(t),u=n||r||o||i,a=u?P(t.length,hi):[],c=a.length;for(var s in t)!e&&!bi.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ur(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return Xr(or(t),ke(e,0,t.length))},be=function(t){return Xr(or(t))},we=function(t,e,n){(n!==u&&!So(t[e],n)||n===u&&!(e in t))&&je(t,e,n)},_e=function(t,e,n){var r=t[e];bi.call(t,e)&&So(r,n)&&(n!==u||e in t)||je(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(So(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return mu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ir(e,Ho(e),t)},je=function(t,e,n){"__proto__"==e&&Bi?Bi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Ee=function(t,e){for(var n=-1,r=e.length,o=ii(r),i=null==t;++n<r;)o[n]=i?u:Ko(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=li(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new di(W);return Fu((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=d,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=p,u=!1):e.length>=200&&(i=D,u=!1,e=new pe(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return mu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},De=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Do(a):n(a,c)))var c=a,s=i}return s},Le=function(t,e){var n=[];return mu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Ke=function(t,e){return t&&_u(t,e,Ho)},Ve=function(t,e){return t&&Su(t,e,Ho)},qe=function(t,e){return h(e,(function(e){return Eo(t[e])}))},Ge=function(t,e){for(var n=0,r=(e=Jn(e,t)).length;null!=t&&n<r;)t=t[to(e[n++])];return n&&n==r?t:u},Ze=function(t,e,n){var r=e(t);return Pa(t)?r:y(r,n(t))},Ye=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":Li&&Li in li(t)?function(t){var e=bi.call(t,Li),n=t[Li];try{t[Li]=u;var r=!0}catch(t){}var o=Si.call(t);return r&&(e?t[Li]=n:delete t[Li]),o}(t):(e=t,Si.call(e));var e},Qe=function(t,e){return t>e},un=function(t,e){return null!=t&&bi.call(t,e)},fn=function(t,e){return null!=t&&e in li(t)},hn=function(t,e,n){for(var r=n?p:d,o=t[0].length,i=t.length,a=i,c=ii(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=Zi(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new pe(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?D(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?D(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},dn=function(t,e,n){var r=null==(t=Gr(t,e=Jn(e,t)))?t:t[to(ao(e))];return null==r?u:a(r,t,n)},pn=function(t){return Po(t)&&Ye(t)==rt},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=li(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var d=r(l,f,s,t,e,h);if(!(d===u?xu(f,l,3,r,h):d))return!1}}return!0},yn=function(t){return!(!Co(t)||(e=t,_i&&_i in e))&&(Eo(t)?ji:re).test(eo(t));var e},gn=function(t){return"function"==typeof t?t:null==t?Qo:"object"==typeof t?Pa(t)?Sn(t[0],t[1]):_n(t):ni(t)},mn=function(t){if(!Hr(t))return Wi(t);var e=[];for(var n in li(t))bi.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=xo(t)?ii(t.length):[];return mu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Mr(t);return 1==e.length&&e[0][2]?qr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Kr(t)&&Vr(e)?qr(to(t),e):function(n){var r=Ko(n,t);return r===u&&r===e?zo(n,t):xu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Ur(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Pa(t)?function(e){return Ge(e,1===t.length?t[0]:t)}:t})):[Qo];var r=-1;return e=v(e,I(Rr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},jn=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=Ge(t,u);n(a,u)&&Rn(i,Jn(u,t),a)}return i},En=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Ri.call(a,c,1),Ri.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Ur(o)?Ri.call(t,o,1):Kn(t,o)}}return t},An=function(t,e){return t+Ki(Qi()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>X)return n;do{e%2&&(n+=t),(e=Ki(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return Ku(Wr(t,e,Qo),t+"")},Tn=function(t){return ge(Wo(t))},In=function(t,e){var n=Wo(t);return Xr(n,ke(e,0,n.length))},Rn=function(t,e,n,r){if(!Co(t))return t;for(var o=-1,i=(e=Jn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=to(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Co(f)?f:Ur(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Dn=function(t){return Xr(Wo(t))},Mn=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=ii(o);++r<o;)i[r]=t[r+e];return i},Ln=function(t,e){var n;return mu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Bn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Do(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Nn(t,e,Qo,n)},Nn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Do(e),l=e===u;o<i;){var f=Ki((o+i)/2),h=n(t[f]),d=h!==u,p=null===h,v=h==h,y=Do(h);if(a)var g=r||v;else g=l?v&&(r||d):c?v&&d&&(r||!p):s?v&&d&&!p&&(r||!y):!p&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return Zi(i,4294967294)},$n=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!So(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Un=function(t){return"number"==typeof t?t:Do(t)?tt:+t},Fn=function(t,e,n){var r=-1,o=d,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=p;else if(i>=200){var s=e?null:Tu(t);if(s)return z(s);u=!1,o=D,c=new pe}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},Kn=function(t,e){return null==(t=Gr(t,e=Jn(e,t)))||delete t[to(ao(e))]},zn=function(t,e,n,r){return Rn(t,e,n(Ge(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Mn(t,r?0:i,r?i+1:o):Mn(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return r(n,le)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Fn(t[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Fn(wu(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return Oo(t)?t:[]},Zn=function(t){return"function"==typeof t?t:Qo},Jn=function(t,e){return Pa(t)?t:Kr(t,e)?[t]:zu(Fo(t))},Yn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Mn(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Ci?Ci(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Ai(e).set(new Ai(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Do(t),a=e!==u,c=null===e,s=e==e,l=Do(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=Gi(i-u,0),l=ii(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=Gi(i-a,0),f=ii(l+s),h=!r;++o<l;)f[o]=t[o];for(var d=o;++c<s;)f[d+c]=e[c];for(;++u<a;)(h||o<i)&&(f[d+n[u]]=t[o++]);return f},or=function(t,e){var n=-1,r=t.length;for(e||(e=ii(r));++n<r;)e[n]=t[n];return e},ir=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?je(n,c,s):_e(n,c,s)}return n},ur=function(t,e){return function(n,r){var o=Pa(n)?c:xe,i=e?e():{};return o(n,t,Rr(r,2),i)}},ar=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&Fr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=li(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},cr=function(t,e){return function(n,r){if(null==n)return n;if(!xo(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=li(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},sr=function(t){return function(e,n,r){for(var o=-1,i=li(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},lr=function(t){return function(e){var n=$(e=Fo(e))?V(e):u,r=n?n[0]:e.charAt(0),o=n?Yn(n,1).join(""):e.slice(1);return r[t]()+o}},fr=function(t){return function(e){return g(Jo(Zo(e).replace(Ie,"")),t,"")}},hr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=yu(t.prototype),r=t.apply(n,e);return Co(r)?r:n}},dr=function(t){return function(e,n,r){var o=li(e);if(!xo(e)){var i=Rr(n,3);e=Ho(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},pr=function(t){return Ar((function(e){var n=e.length,r=n,o=se.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new di(W);if(o&&!a&&"wrapper"==Tr(i))var a=new se([],!0)}for(r=a?r:n;++r<n;){var c=Tr(i=e[r]),s="wrapper"==c?Ru(i):u;a=s&&zr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Tr(s[0])].apply(a,s[3]):1==i.length&&zr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Pa(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},vr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},Ke(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},yr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=ku(n),r=ku(r)):(n=Un(n),r=Un(r)),o=t(n,r)}return o}},gr=function(t){return Ar((function(e){return e=v(e,I(Rr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},mr=function(t,e){var n=(e=e===u?" ":ku(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Fi(t/H(e)));return $(e)?Yn(V(r),0,t).join(""):r.slice(0,t)},br=function(t){return function(e,n,r){return r&&"number"!=typeof r&&Fr(e,n,r)&&(n=r=u),e=Lo(e),n===u?(n=e,e=0):n=Lo(n),function(t,e,n,r){for(var o=-1,i=Gi(Fi((e-t)/(n||1)),0),u=ii(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:Lo(r),t)}},wr=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=$o(e),n=$o(n)),t(e,n)}},_r=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?J:64,4&(e&=~(f?64:J))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],d=n.apply(u,h);return zr(t)&&Uu(d,h),d.placeholder=r,Yr(d,t,e)},Sr=function(t){var e=si[t];return function(t,n){if(t=$o(t),(n=null==n?0:Zi(Bo(n),292))&&Vi(t)){var r=(Fo(t)+"e").split("e");return+((r=(Fo(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},xr=function(t){return function(e){var n,r,o=Lu(e);return o==lt?U(e):o==vt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Or=function(t,e,n,o,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new di(W);var h=o?o.length:0;if(h||(e&=-97,o=i=u),s=s===u?s:Gi(Bo(s),0),l=l===u?l:Bo(l),h-=i?i.length:0,64&e){var d=o,p=i;o=i=u}var v,y,g,m,b=f?u:Ru(t),w=[t,e,n,o,i,d,p,c,s,l];if(b&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==Y&&8==n||r==Y&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?nr(c,a,e[4]):a,t[4]=c?K(t[3],Z):e[4]}(a=e[5])&&(c=t[5],t[5]=c?rr(c,a,e[6]):a,t[6]=c?K(t[5],Z):e[6]),(a=e[7])&&(t[7]=a),r&Y&&(t[8]=null==t[8]?e[8]:Zi(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(w,b),t=w[0],e=w[1],n=w[2],o=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:Gi(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=hr(v=t),function t(){for(var e=arguments.length,n=ii(e),o=e,i=Ir(t);o--;)n[o]=arguments[o];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:K(n,i);return(e-=c.length)<g?_r(v,y,Pu,t.placeholder,u,n,c,u,u,g-e):a(this&&this!==We&&r(this,t)?m:v,this,n)}):e!=J&&33!=e||i.length?Pu.apply(u,w):function(t,e,n,o){var i=1&e,u=hr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=o.length,h=ii(f+s),d=this&&this!==We&&r(this,e)?u:t;++l<f;)h[l]=o[l];for(;s--;)h[l++]=arguments[++c];return a(d,i?n:this,h)}}(t,e,n,o);else var _=function(t,e,n){var o=1&e,i=hr(t);return function e(){return(this&&this!==We&&r(this,e)?i:t).apply(o?n:this,arguments)}}(t,e,n);return Yr((b?ju:Uu)(_,w),t,e)},jr=function(t,e,n,r){return t===u||So(t,yi[n])&&!bi.call(r,n)?e:t},Er=function(t){return Io(t)?u:t},kr=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new pe:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;d=!1;break}if(p){if(!b(e,(function(t,e){if(!D(p,e)&&(v===t||o(v,t,n,r,i)))return p.push(e)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Ar=function(t){return Ku(Wr(t,u,io),t+"")},Cr=function(t){return Ze(t,Ho,Du)},Pr=function(t){return Ze(t,Vo,Mu)},Tr=function(t){for(var e=t.name+"",n=au[e],r=bi.call(au,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Ir=function(t){return(bi.call(k,"placeholder")?k:t).placeholder},Rr=function(){var t=k.iteratee||Xo;return t=t===Xo?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Dr=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map},Mr=function(t){for(var e=Ho(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Vr(o)]}return e},Lr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Br=function(t,e,n){for(var r=-1,o=(e=Jn(e,t)).length,i=!1;++r<o;){var u=to(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ao(o)&&Ur(u,o)&&(Pa(t)||Ca(t))},Nr=function(t){return"function"!=typeof t.constructor||Hr(t)?{}:yu(Pi(t))},$r=function(t){return Pa(t)||Ca(t)||!!(Di&&t&&t[Di])},Ur=function(t,e){var n=void 0===t?"undefined":o(t);return!!(e=null==e?X:e)&&("number"==n||"symbol"!=n&&ie.test(t))&&t>-1&&t%1==0&&t<e},Fr=function(t,e,n){if(!Co(n))return!1;var r=void 0===e?"undefined":o(e);return!!("number"==r?xo(n)&&Ur(e,n.length):"string"==r&&e in n)&&So(n[e],t)},Kr=function(t,e){if(Pa(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Do(t))||Ft.test(t)||!Ut.test(t)||null!=e&&t in li(e)},zr=function(t){var e=Tr(t),n=k[e];if("function"!=typeof n||!(e in le.prototype))return!1;if(t===n)return!0;var r=Ru(n);return!!r&&t===r[0]},Hr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yi)},Vr=function(t){return t==t&&!Co(t)},qr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in li(n))}},Wr=function(t,e,n){return e=Gi(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Gi(r.length-e,0),u=ii(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=ii(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},Gr=function(t,e){return e.length<2?t:Ge(t,Mn(e,0,-1))},Zr=function(t,e){for(var n=t.length,r=Zi(e.length,n),o=or(t);r--;){var i=e[r];t[r]=Ur(i,n)?o[i]:u}return t},Jr=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Yr=function(t,e,n){var r,o,i,u=e+"";return Ku(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Wt,"{\n/* [wrapped with "+e+"] */\n")}(u,(o=(r=u.match(Gt))?r[1].split(Zt):[],i=n,s(nt,(function(t){var e="_."+t[0];i&t[1]&&!d(o,e)&&o.push(e)})),o.sort())))},Qr=function(t){var e=0,n=0;return function(){var r=Ji(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},Xr=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},to=function(t){if("string"==typeof t||Do(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},eo=function(t){if(null!=t){try{return mi.call(t)}catch(t){}try{return t+""}catch(t){}}return""},no=function(t){if(r(t,le))return t.clone();var e=new se(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},ro=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Bo(n);return o<0&&(o=Gi(r+o,0)),_(t,Rr(e,3),o)},oo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=Bo(n),o=n<0?Gi(r+o,0):Zi(o,r-1)),_(t,Rr(e,3),o,!0)},io=function(t){return null!=t&&t.length?wu(t,1):[]},uo=function(t){return t&&t.length?t[0]:u},ao=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},co=function(t,e){return t&&t.length&&e&&e.length?En(t,e):t},so=function(t){return null==t?t:Xi.call(t)},lo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(Oo(t))return e=Gi(t.length,e),!0})),P(e,(function(e){return v(t,E(e))}))},fo=function(t,e){if(!t||!t.length)return[];var n=lo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},ho=function(t){var e=k(t);return e.__chain__=!0,e},po=function(t,e){return e(t)},vo=function(t,e){return(Pa(t)?s:mu)(t,Rr(e,3))},yo=function(t,e){return(Pa(t)?l:bu)(t,Rr(e,3))},go=function(t,e){return(Pa(t)?v:wn)(t,Rr(e,3))},mo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Or(t,Y,u,u,u,u,e)},bo=function(t,e){var n;if("function"!=typeof e)throw new di(W);return t=Bo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},wo=function(t,e,n){var r,o,i,a,c,s,l=0,f=!1,h=!1,d=!0;if("function"!=typeof t)throw new di(W);function p(e){var n=r,i=o;return r=o=u,l=e,a=t.apply(i,n)}function v(t){return l=t,c=Fu(g,e),f?p(t):a}function y(t){var n=t-s;return s===u||n>=e||n<0||h&&t-l>=i}function g(){var t,n,r=ya();if(y(r))return m(r);c=Fu(g,(n=e-((t=r)-s),h?Zi(n,i-(t-l)):n))}function m(t){return c=u,d&&r?p(t):(r=o=u,a)}function b(){var t=ya(),n=y(t);if(r=arguments,o=this,s=t,n){if(c===u)return v(s);if(h)return Cu(c),c=Fu(g,e),p(s)}return c===u&&(c=Fu(g,e)),a}return e=$o(e)||0,Co(n)&&(f=!!n.leading,i=(h="maxWait"in n)?Gi($o(n.maxWait)||0,e):i,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==u&&Cu(c),l=0,r=s=o=c=u},b.flush=function(){return c===u?a:m(ya())},b},_o=function(t){if("function"!=typeof t)throw new di(W);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},So=function(t,e){return t===e||t!=t&&e!=e},xo=function(t){return null!=t&&Ao(t.length)&&!Eo(t)},Oo=function(t){return Po(t)&&xo(t)},jo=function(t){if(!Po(t))return!1;var e=Ye(t);return e==at||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Io(t)},Eo=function(t){if(!Co(t))return!1;var e=Ye(t);return e==ct||e==st||"[object AsyncFunction]"==e||"[object Proxy]"==e},ko=function(t){return"number"==typeof t&&t==Bo(t)},Ao=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=X},Co=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Po=function(t){return null!=t&&"object"==typeof t},To=function(t){return"number"==typeof t||Po(t)&&Ye(t)==ft},Io=function(t){if(!Po(t)||Ye(t)!=ht)return!1;var e=Pi(t);if(null===e)return!0;var n=bi.call(e,"constructor")&&e.constructor;return"function"==typeof n&&r(n,n)&&mi.call(n)==xi},Ro=function(t){return"string"==typeof t||!Pa(t)&&Po(t)&&Ye(t)==yt},Do=function(t){return"symbol"==(void 0===t?"undefined":o(t))||Po(t)&&Ye(t)==gt},Mo=function(t){if(!t)return[];if(xo(t))return Ro(t)?V(t):or(t);if(Mi&&t[Mi])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Mi]());var e=Lu(t);return(e==lt?U:e==vt?z:Wo)(t)},Lo=function(t){return t?(t=$o(t))===Q||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Bo=function(t){var e=Lo(t),n=e%1;return e==e?n?e-n:e:0},No=function(t){return t?ke(Bo(t),0,et):0},$o=function(t){if("number"==typeof t)return t;if(Do(t))return tt;if(Co(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Co(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ne.test(t);return n||oe.test(t)?He(t.slice(2),n?2:8):ee.test(t)?tt:+t},Uo=function(t){return ir(t,Vo(t))},Fo=function(t){return null==t?"":ku(t)},Ko=function(t,e,n){var r=null==t?u:Ge(t,e);return r===u?n:r},zo=function(t,e){return null!=t&&Br(t,e,fn)},Ho=function(t){return xo(t)?ye(t):mn(t)},Vo=function(t){return xo(t)?ye(t,!0):function(t){if(!Co(t))return function(t){var e=[];if(null!=t)for(var n in li(t))e.push(n);return e}(t);var e=Hr(t),n=[];for(var r in t)("constructor"!=r||!e&&bi.call(t,r))&&n.push(r);return n}(t)},qo=function(t,e){if(null==t)return{};var n=v(Pr(t),(function(t){return[t]}));return e=Rr(e),jn(t,n,(function(t,n){return e(t,n[0])}))},Wo=function(t){return null==t?[]:R(t,Ho(t))},Go=function(t){return sc(Fo(t).toLowerCase())},Zo=function(t){return(t=Fo(t))&&t.replace(ue,an).replace(Re,"")},Jo=function(t,e,n){return t=Fo(t),(e=n?u:e)===u?(r=t,Be.test(r)?function(t){return t.match(Me)||[]}(t):function(t){return t.match(Jt)||[]}(t)):t.match(e)||[];var r},Yo=function(t){return function(){return t}},Qo=function(t){return t},Xo=function(t){return gn("function"==typeof t?t:gu(t,1))},ti=function(t,e,n){var r=Ho(e),o=qe(e,r);null!=n||Co(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=qe(e,Ho(e)));var i=!(Co(n)&&"chain"in n&&!n.chain),u=Eo(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ei=function(){},ni=function(t){return Kr(t)?E(to(t)):(e=t,function(t){return Ge(t,e)});var e},ri=function(){return[]},oi=function(){return!1},ii=(e=null==e?We:ln.defaults(We.Object(),e,ln.pick(We,Ne))).Array,ui=e.Date,ai=e.Error,ci=e.Function,si=e.Math,li=e.Object,fi=e.RegExp,hi=e.String,di=e.TypeError,pi=ii.prototype,vi=ci.prototype,yi=li.prototype,gi=e["__core-js_shared__"],mi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Si=yi.toString,xi=mi.call(li),Oi=We._,ji=fi("^"+mi.call(bi).replace(zt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ei=Je?e.Buffer:u,ki=e.Symbol,Ai=e.Uint8Array,Ci=Ei?Ei.allocUnsafe:u,Pi=F(li.getPrototypeOf,li),Ti=li.create,Ii=yi.propertyIsEnumerable,Ri=pi.splice,Di=ki?ki.isConcatSpreadable:u,Mi=ki?ki.iterator:u,Li=ki?ki.toStringTag:u,Bi=function(){try{var t=Lr(li,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ni=e.clearTimeout!==We.clearTimeout&&e.clearTimeout,$i=ui&&ui.now!==We.Date.now&&ui.now,Ui=e.setTimeout!==We.setTimeout&&e.setTimeout,Fi=si.ceil,Ki=si.floor,zi=li.getOwnPropertySymbols,Hi=Ei?Ei.isBuffer:u,Vi=e.isFinite,qi=pi.join,Wi=F(li.keys,li),Gi=si.max,Zi=si.min,Ji=ui.now,Yi=e.parseInt,Qi=si.random,Xi=pi.reverse,tu=Lr(e,"DataView"),eu=Lr(e,"Map"),nu=Lr(e,"Promise"),ru=Lr(e,"Set"),ou=Lr(e,"WeakMap"),iu=Lr(li,"create"),uu=ou&&new ou,au={},cu=eo(tu),su=eo(eu),lu=eo(nu),fu=eo(ru),hu=eo(ou),du=ki?ki.prototype:u,pu=du?du.valueOf:u,vu=du?du.toString:u,yu=(i=function(){},function(t){if(!Co(t))return{};if(Ti)return Ti(t);i.prototype=t;var e=new i;return i.prototype=u,e});function gu(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Co(t))return t;var h,d,p,v=Pa(t);if(v){if(d=(h=t).length,p=new h.constructor(d),d&&"string"==typeof h[0]&&bi.call(h,"index")&&(p.index=h.index,p.input=h.input),a=p,!c)return or(t,a)}else{var y=Lu(t),g=y==ct||y==st;if(Ia(t))return Qn(t,c);if(y==ht||y==rt||g&&!o){if(a=l||g?{}:Nr(t),!c)return l?function(t,e){return ir(t,Mu(t),e)}(t,function(t,e){return t&&ir(e,Vo(e),t)}(a,t)):function(t,e){return ir(t,Du(t),e)}(t,Oe(a,t))}else{if(!Fe[y])return o?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case bt:return Xn(t);case it:case ut:return new o(+t);case wt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case _t:case St:case xt:case Ot:case jt:case Et:case kt:case At:case Ct:return tr(t,n);case lt:return new o;case ft:case yt:return new o(t);case pt:return function(t){var e=new t.constructor(t.source,te.exec(t));return e.lastIndex=t.lastIndex,e}(t);case vt:return new o;case gt:return r=t,pu?li(pu.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),La(t)?t.forEach((function(r){a.add(gu(r,e,n,r,t,i))})):Da(t)&&t.forEach((function(r,o){a.set(o,gu(r,e,n,o,t,i))}));var b=v?u:(f?l?Pr:Cr:l?Vo:Ho)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,gu(r,e,n,o,t,i))})),a}k.templateSettings={escape:Bt,evaluate:Nt,interpolate:$t,variable:"",imports:{_:k}},(k.prototype=qt.prototype).constructor=k,se.prototype=yu(qt.prototype),se.prototype.constructor=se,le.prototype=yu(qt.prototype),le.prototype.constructor=le,fe.prototype.clear=function(){this.__data__=iu?iu(null):{},this.size=0},fe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fe.prototype.get=function(t){var e=this.__data__;if(iu){var n=e[t];return n===G?u:n}return bi.call(e,t)?e[t]:u},fe.prototype.has=function(t){var e=this.__data__;return iu?e[t]!==u:bi.call(e,t)},fe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=iu&&e===u?G:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Ri.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},de.prototype.clear=function(){this.size=0,this.__data__={hash:new fe,map:new(eu||he),string:new fe}},de.prototype.delete=function(t){var e=Dr(this,t).delete(t);return this.size-=e?1:0,e},de.prototype.get=function(t){return Dr(this,t).get(t)},de.prototype.has=function(t){return Dr(this,t).has(t)},de.prototype.set=function(t,e){var n=Dr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},pe.prototype.add=pe.prototype.push=function(t){return this.__data__.set(t,G),this},pe.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(r(n,he)){var o=n.__data__;if(!eu||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new de(o)}return n.set(t,e),this.size=n.size,this};var mu=cr(Ke),bu=cr(Ve,!0);function wu(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=$r),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?wu(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var _u=sr(),Su=sr(!0);function xu(t,e,n,o,i){return t===e||(null==t||null==e||!Po(t)&&!Po(e)?t!=t&&e!=e:function(t,e,n,o,i,a){var c=Pa(t),s=Pa(e),l=c?ot:Lu(t),f=s?ot:Lu(e),h=(l=l==rt?ht:l)==ht,d=(f=f==rt?ht:f)==ht,p=l==f;if(p&&Ia(t)){if(!Ia(e))return!1;c=!0,h=!1}if(p&&!h)return a||(a=new ve),c||Ba(t)?kr(t,e,n,o,i,a):function(t,e,n,r,o,i,u){switch(n){case wt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case bt:return!(t.byteLength!=e.byteLength||!i(new Ai(t),new Ai(e)));case it:case ut:case ft:return So(+t,+e);case at:return t.name==e.name&&t.message==e.message;case pt:case yt:return t==e+"";case lt:var a=U;case vt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=kr(a(t),a(e),r,o,i,u);return u.delete(t),l;case gt:if(pu)return pu.call(t)==pu.call(e)}return!1}(t,e,l,n,o,i,a);if(!(1&n)){var v=h&&bi.call(t,"__wrapped__"),y=d&&bi.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,o,a)}}return!!p&&(a||(a=new ve),function(t,e,n,o,i,a){var c=1&n,s=Cr(t),l=s.length;if(l!=Cr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:bi.call(e,h)))return!1}var d=a.get(t),p=a.get(e);if(d&&p)return d==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(o)var b=c?o(m,g,h,e,t,a):o(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,o,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,o,i,a))}(t,e,n,o,xu,i))}function Ou(t,e,n,r,o){t!==e&&_u(e,(function(i,a){if(o||(o=new ve),Co(i))!function(t,e,n,r,o,i,a){var c=Jr(t,n),s=Jr(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var d=Pa(s),p=!d&&Ia(s),v=!d&&!p&&Ba(s);f=s,d||p||v?Pa(c)?f=c:Oo(c)?f=or(c):p?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:Io(s)||Ca(s)?(f=c,Ca(c)?f=Uo(c):Co(c)&&!Eo(c)||(f=Nr(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Ou,r,o);else{var c=r?r(Jr(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Vo)}var ju=uu?function(t,e){return uu.set(t,e),t}:Qo,Eu=Bi?function(t,e){return Bi(t,"toString",{configurable:!0,enumerable:!1,value:Yo(e),writable:!0})}:Qo;function ku(t){if("string"==typeof t)return t;if(Pa(t))return v(t,ku)+"";if(Do(t))return vu?vu.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Au=Pn,Cu=Ni||function(t){return We.clearTimeout(t)};function Pu(t,e,n,o,i,a,c,s,l,f){var h=e&Y,d=1&e,p=2&e,v=24&e,y=512&e,g=p?u:hr(t);return function u(){for(var m=arguments.length,b=ii(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Ir(u),S=B(b,_);if(o&&(b=nr(b,o,i,v)),a&&(b=rr(b,a,c,v)),m-=S,v&&m<f){var x=K(b,_);return _r(t,e,Pu,u.placeholder,n,b,x,s,l,f-m)}var O=d?n:this,j=p?O[t]:t;return m=b.length,s?b=Zr(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==We&&r(this,u)&&(j=g||hr(j)),j.apply(O,b)}}var Tu=ru&&1/z(new ru([,-0]))[1]==Q?function(t){return new ru(t)}:ei;function Iu(t,e,n,r,o,i){return Co(t)&&Co(e)&&(i.set(e,t),Ou(t,e,u,Iu,i),i.delete(e)),t}var Ru=uu?function(t){return uu.get(t)}:ei,Du=zi?function(t){return null==t?[]:(t=li(t),h(zi(t),(function(e){return Ii.call(t,e)})))}:ri,Mu=zi?function(t){for(var e=[];t;)y(e,Du(t)),t=Pi(t);return e}:ri,Lu=Ye;(tu&&Lu(new tu(new ArrayBuffer(1)))!=wt||eu&&Lu(new eu)!=lt||nu&&Lu(nu.resolve())!=dt||ru&&Lu(new ru)!=vt||ou&&Lu(new ou)!=mt)&&(Lu=function(t){var e=Ye(t),n=e==ht?t.constructor:u,r=n?eo(n):"";if(r)switch(r){case cu:return wt;case su:return lt;case lu:return dt;case fu:return vt;case hu:return mt}return e});var Bu,Nu,$u=gi?Eo:oi,Uu=Qr(ju),Fu=Ui||function(t,e){return We.setTimeout(t,e)},Ku=Qr(Eu),zu=(Bu=_a((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Kt,(function(t,n,r,o){e.push(r?o.replace(Qt,"$1"):n||t)})),e}),(function(t){return 500===Nu.size&&Nu.clear(),t})),Nu=Bu.cache,Bu),Hu=Pn((function(t,e){return Oo(t)?Pe(t,wu(e,1,Oo,!0)):[]})),Vu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),Rr(n,2)):[]})),qu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),u,n):[]})),Wu=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?hn(e):[]})),Gu=Pn((function(t){var e=ao(t),n=v(t,Gn);return e===ao(n)?e=u:n.pop(),n.length&&n[0]===t[0]?hn(n,Rr(e,2)):[]})),Zu=Pn((function(t){var e=ao(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?hn(n,u,e):[]})),Ju=Pn(co),Yu=Ar((function(t,e){var n=null==t?0:t.length,r=Ee(t,e);return kn(t,v(e,(function(t){return Ur(t,n)?+t:t})).sort(er)),r})),Qu=Pn((function(t){return Fn(wu(t,1,Oo,!0))})),Xu=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),Fn(wu(t,1,Oo,!0),Rr(e,2))})),ta=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,Fn(wu(t,1,Oo,!0),u,e)})),ea=Pn((function(t,e){return Oo(t)?Pe(t,e):[]})),na=Pn((function(t){return qn(h(t,Oo))})),ra=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),qn(h(t,Oo),Rr(e,2))})),oa=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,qn(h(t,Oo),u,e)})),ia=Pn(lo),ua=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,fo(t,n)})),aa=Ar((function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return Ee(e,t)};return e>1||this.__actions__.length||!r(o,le)||!Ur(n)?this.thru(i):((o=o.slice(n,+n+(e?1:0))).__actions__.push({func:po,args:[i],thisArg:u}),new se(o,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ca=ur((function(t,e,n){bi.call(t,n)?++t[n]:je(t,n,1)})),sa=dr(ro),la=dr(oo),fa=ur((function(t,e,n){bi.call(t,n)?t[n].push(e):je(t,n,[e])})),ha=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=xo(t)?ii(t.length):[];return mu(t,(function(t){i[++r]=o?a(e,t,n):dn(t,e,n)})),i})),da=ur((function(t,e,n){je(t,n,e)})),pa=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),va=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Fr(t,e[0],e[1])?e=[]:n>2&&Fr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,wu(e,1),[])})),ya=$i||function(){return We.Date.now()},ga=Pn((function(t,e,n){var r=1;if(n.length){var o=K(n,Ir(ga));r|=J}return Or(t,r,e,n,o)})),ma=Pn((function(t,e,n){var r=3;if(n.length){var o=K(n,Ir(ma));r|=J}return Or(e,r,t,n,o)})),ba=Pn((function(t,e){return Ce(t,1,e)})),wa=Pn((function(t,e,n){return Ce(t,$o(e)||0,n)}));function _a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new di(W);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(_a.Cache||de),n}_a.Cache=de;var Sa,xa=Au((function(t,e){var n=(e=1==e.length&&Pa(e[0])?v(e[0],I(Rr())):v(wu(e,1),I(Rr()))).length;return Pn((function(r){for(var o=-1,i=Zi(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Oa=Pn((function(t,e){var n=K(e,Ir(Oa));return Or(t,J,u,e,n)})),ja=Pn((function(t,e){var n=K(e,Ir(ja));return Or(t,64,u,e,n)})),Ea=Ar((function(t,e){return Or(t,256,u,u,u,e)})),ka=wr(Qe),Aa=wr((function(t,e){return t>=e})),Ca=pn(function(){return arguments}())?pn:function(t){return Po(t)&&bi.call(t,"callee")&&!Ii.call(t,"callee")},Pa=ii.isArray,Ta=Xe?I(Xe):function(t){return Po(t)&&Ye(t)==bt},Ia=Hi||oi,Ra=tn?I(tn):function(t){return Po(t)&&Ye(t)==ut},Da=en?I(en):function(t){return Po(t)&&Lu(t)==lt},Ma=nn?I(nn):function(t){return Po(t)&&Ye(t)==pt},La=rn?I(rn):function(t){return Po(t)&&Lu(t)==vt},Ba=on?I(on):function(t){return Po(t)&&Ao(t.length)&&!!Ue[Ye(t)]},Na=wr(bn),$a=wr((function(t,e){return t<=e})),Ua=ar((function(t,e){if(Hr(e)||xo(e))ir(e,Ho(e),t);else for(var n in e)bi.call(e,n)&&_e(t,n,e[n])})),Fa=ar((function(t,e){ir(e,Vo(e),t)})),Ka=ar((function(t,e,n,r){ir(e,Vo(e),t,r)})),za=ar((function(t,e,n,r){ir(e,Ho(e),t,r)})),Ha=Ar(Ee),Va=Pn((function(t,e){t=li(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&Fr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Vo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||So(f,yi[l])&&!bi.call(t,l))&&(t[l]=i[l])}return t})),qa=Pn((function(t){return t.push(u,Iu),a(Ya,u,t)})),Wa=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),t[e]=n}),Yo(Qo)),Ga=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),bi.call(t,e)?t[e].push(n):t[e]=[n]}),Rr),Za=Pn(dn),Ja=ar((function(t,e,n){Ou(t,e,n)})),Ya=ar((function(t,e,n,r){Ou(t,e,n,r)})),Qa=Ar((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Jn(e,t),r||(r=e.length>1),e})),ir(t,Pr(t),n),r&&(n=gu(n,7,Er));for(var o=e.length;o--;)Kn(n,e[o]);return n})),Xa=Ar((function(t,e){return null==t?{}:jn(n=t,e,(function(t,e){return zo(n,e)}));var n})),tc=xr(Ho),ec=xr(Vo),nc=fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Go(e):e)})),rc=fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),oc=fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ic=lr("toLowerCase"),uc=fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ac=fr((function(t,e,n){return t+(n?" ":"")+sc(e)})),cc=fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return jo(t)?t:new ai(t)}})),fc=Ar((function(t,e){return s(e,(function(e){e=to(e),je(t,e,ga(t[e],t))})),t})),hc=pr(),dc=pr(!0),pc=Pn((function(t,e){return function(n){return dn(n,t,e)}})),vc=Pn((function(t,e){return function(n){return dn(t,n,e)}})),yc=gr(v),gc=gr(f),mc=gr(b),bc=br(),wc=br(!0),_c=yr((function(t,e){return t+e}),0),Sc=Sr("ceil"),xc=yr((function(t,e){return t/e}),1),Oc=Sr("floor"),jc=yr((function(t,e){return t*e}),1),Ec=Sr("round"),kc=yr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new di(W);return t=Bo(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=mo,k.assign=Ua,k.assignIn=Fa,k.assignInWith=Ka,k.assignWith=za,k.at=Ha,k.before=bo,k.bind=ga,k.bindAll=fc,k.bindKey=ma,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Pa(t)?t:[t]},k.chain=ho,k.chunk=function(t,e,n){e=(n?Fr(t,e,n):e===u)?1:Gi(Bo(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=ii(Fi(r/e));o<r;)a[i++]=Mn(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ii(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Pa(n)?or(n):[n],wu(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Rr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new di(W);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=gu(t,1),n=Ho(e),function(t){return Ae(t,e,n)};var e,n},k.constant=Yo,k.countBy=ca,k.create=function(t,e){var n=yu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=Or(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=Or(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=wo,k.defaults=Va,k.defaultsDeep=qa,k.defer=ba,k.delay=wa,k.difference=Hu,k.differenceBy=Vu,k.differenceWith=qu,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,(e=n||e===u?1:Bo(e))<0?0:e,r):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,0,(e=r-(e=n||e===u?1:Bo(e)))<0?0:e):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Fr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Bo(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:Bo(r))<0&&(r+=o),r=n>r?0:No(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Pa(t)?h:Le)(t,Rr(e,3))},k.flatMap=function(t,e){return wu(go(t,e),1)},k.flatMapDeep=function(t,e){return wu(go(t,e),Q)},k.flatMapDepth=function(t,e,n){return n=n===u?1:Bo(n),wu(go(t,e),n)},k.flatten=io,k.flattenDeep=function(t){return null!=t&&t.length?wu(t,Q):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?wu(t,e=e===u?1:Bo(e)):[]},k.flip=function(t){return Or(t,512)},k.flow=hc,k.flowRight=dc,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:qe(t,Ho(t))},k.functionsIn=function(t){return null==t?[]:qe(t,Vo(t))},k.groupBy=fa,k.initial=function(t){return null!=t&&t.length?Mn(t,0,-1):[]},k.intersection=Wu,k.intersectionBy=Gu,k.intersectionWith=Zu,k.invert=Wa,k.invertBy=Ga,k.invokeMap=ha,k.iteratee=Xo,k.keyBy=da,k.keys=Ho,k.keysIn=Vo,k.map=go,k.mapKeys=function(t,e){var n={};return e=Rr(e,3),Ke(t,(function(t,r,o){je(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Rr(e,3),Ke(t,(function(t,r,o){je(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(gu(t,1))},k.matchesProperty=function(t,e){return Sn(t,gu(e,1))},k.memoize=_a,k.merge=Ja,k.mergeWith=Ya,k.method=pc,k.methodOf=vc,k.mixin=ti,k.negate=_o,k.nthArg=function(t){return t=Bo(t),Pn((function(e){return xn(e,t)}))},k.omit=Qa,k.omitBy=function(t,e){return qo(t,_o(Rr(e)))},k.once=function(t){return bo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Pa(e)||(e=null==e?[]:[e]),Pa(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=yc,k.overArgs=xa,k.overEvery=gc,k.overSome=mc,k.partial=Oa,k.partialRight=ja,k.partition=pa,k.pick=Xa,k.pickBy=qo,k.property=ni,k.propertyOf=function(t){return function(e){return null==t?u:Ge(t,e)}},k.pull=Ju,k.pullAll=co,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,Rr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,u,n):t},k.pullAt=Yu,k.range=bc,k.rangeRight=wc,k.rearg=Ea,k.reject=function(t,e){return(Pa(t)?h:Le)(t,_o(Rr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Rr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new di(W);return Pn(t,e=e===u?e:Bo(e))},k.reverse=so,k.sampleSize=function(t,e,n){return e=(n?Fr(t,e,n):e===u)?1:Bo(e),(Pa(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Rn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Rn(t,e,n,r)},k.shuffle=function(t){return(Pa(t)?be:Dn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Fr(t,e,n)?(e=0,n=r):(e=null==e?0:Bo(e),n=n===u?r:Bo(n)),Mn(t,e,n)):[]},k.sortBy=va,k.sortedUniq=function(t){return t&&t.length?$n(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?$n(t,Rr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&Fr(t,e,n)&&(e=n=u),(n=n===u?et:n>>>0)?(t=Fo(t))&&("string"==typeof e||null!=e&&!Ma(e))&&!(e=ku(e))&&$(t)?Yn(V(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new di(W);return e=null==e?0:Gi(Bo(e),0),Pn((function(n){var r=n[e],o=Yn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Mn(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?Mn(t,0,(e=n||e===u?1:Bo(e))<0?0:e):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,(e=r-(e=n||e===u?1:Bo(e)))<0?0:e,r):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new di(W);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=po,k.toArray=Mo,k.toPairs=tc,k.toPairsIn=ec,k.toPath=function(t){return Pa(t)?v(t,to):Do(t)?[t]:or(zu(Fo(t)))},k.toPlainObject=Uo,k.transform=function(t,e,n){var r=Pa(t),o=r||Ia(t)||Ba(t);if(e=Rr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Co(t)&&Eo(i)?yu(Pi(t)):{}}return(o?s:Ke)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return mo(t,1)},k.union=Qu,k.unionBy=Xu,k.unionWith=ta,k.uniq=function(t){return t&&t.length?Fn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Fn(t,Rr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Fn(t,u,e):[]},k.unset=function(t,e){return null==t||Kn(t,e)},k.unzip=lo,k.unzipWith=fo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=Wo,k.valuesIn=function(t){return null==t?[]:R(t,Vo(t))},k.without=ea,k.words=Jo,k.wrap=function(t,e){return Oa(Zn(e),t)},k.xor=na,k.xorBy=ra,k.xorWith=oa,k.zip=ia,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Rn)},k.zipWith=ua,k.entries=tc,k.entriesIn=ec,k.extend=Fa,k.extendWith=Ka,ti(k,k),k.add=_c,k.attempt=lc,k.camelCase=nc,k.capitalize=Go,k.ceil=Sc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=$o(n))==n?n:0),e!==u&&(e=(e=$o(e))==e?e:0),ke($o(t),e,n)},k.clone=function(t){return gu(t,4)},k.cloneDeep=function(t){return gu(t,5)},k.cloneDeepWith=function(t,e){return gu(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return gu(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Ho(e))},k.deburr=Zo,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=xc,k.endsWith=function(t,e,n){t=Fo(t),e=ku(e);var r=t.length,o=n=n===u?r:ke(Bo(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=So,k.escape=function(t){return(t=Fo(t))&&Lt.test(t)?t.replace(Dt,cn):t},k.escapeRegExp=function(t){return(t=Fo(t))&&Ht.test(t)?t.replace(zt,"\\$&"):t},k.every=function(t,e,n){var r=Pa(t)?f:Te;return n&&Fr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.find=sa,k.findIndex=ro,k.findKey=function(t,e){return w(t,Rr(e,3),Ke)},k.findLast=la,k.findLastIndex=oo,k.findLastKey=function(t,e){return w(t,Rr(e,3),Ve)},k.floor=Oc,k.forEach=vo,k.forEachRight=yo,k.forIn=function(t,e){return null==t?t:_u(t,Rr(e,3),Vo)},k.forInRight=function(t,e){return null==t?t:Su(t,Rr(e,3),Vo)},k.forOwn=function(t,e){return t&&Ke(t,Rr(e,3))},k.forOwnRight=function(t,e){return t&&Ve(t,Rr(e,3))},k.get=Ko,k.gt=ka,k.gte=Aa,k.has=function(t,e){return null!=t&&Br(t,e,un)},k.hasIn=zo,k.head=uo,k.identity=Qo,k.includes=function(t,e,n,r){t=xo(t)?t:Wo(t),n=n&&!r?Bo(n):0;var o=t.length;return n<0&&(n=Gi(o+n,0)),Ro(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Bo(n);return o<0&&(o=Gi(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=Lo(e),n===u?(n=e,e=0):n=Lo(n),(r=t=$o(t))>=Zi(o=e,i=n)&&r<Gi(o,i);var r,o,i},k.invoke=Za,k.isArguments=Ca,k.isArray=Pa,k.isArrayBuffer=Ta,k.isArrayLike=xo,k.isArrayLikeObject=Oo,k.isBoolean=function(t){return!0===t||!1===t||Po(t)&&Ye(t)==it},k.isBuffer=Ia,k.isDate=Ra,k.isElement=function(t){return Po(t)&&1===t.nodeType&&!Io(t)},k.isEmpty=function(t){if(null==t)return!0;if(xo(t)&&(Pa(t)||"string"==typeof t||"function"==typeof t.splice||Ia(t)||Ba(t)||Ca(t)))return!t.length;var e=Lu(t);if(e==lt||e==vt)return!t.size;if(Hr(t))return!mn(t).length;for(var n in t)if(bi.call(t,n))return!1;return!0},k.isEqual=function(t,e){return xu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?xu(t,e,u,n):!!r},k.isError=jo,k.isFinite=function(t){return"number"==typeof t&&Vi(t)},k.isFunction=Eo,k.isInteger=ko,k.isLength=Ao,k.isMap=Da,k.isMatch=function(t,e){return t===e||vn(t,e,Mr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Mr(e),n)},k.isNaN=function(t){return To(t)&&t!=+t},k.isNative=function(t){if($u(t))throw new ai("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=To,k.isObject=Co,k.isObjectLike=Po,k.isPlainObject=Io,k.isRegExp=Ma,k.isSafeInteger=function(t){return ko(t)&&t>=-9007199254740991&&t<=X},k.isSet=La,k.isString=Ro,k.isSymbol=Do,k.isTypedArray=Ba,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return Po(t)&&Lu(t)==mt},k.isWeakSet=function(t){return Po(t)&&"[object WeakSet]"==Ye(t)},k.join=function(t,e){return null==t?"":qi.call(t,e)},k.kebabCase=rc,k.last=ao,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=Bo(n))<0?Gi(r+o,0):Zi(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=oc,k.lowerFirst=ic,k.lt=Na,k.lte=$a,k.max=function(t){return t&&t.length?De(t,Qo,Qe):u},k.maxBy=function(t,e){return t&&t.length?De(t,Rr(e,2),Qe):u},k.mean=function(t){return j(t,Qo)},k.meanBy=function(t,e){return j(t,Rr(e,2))},k.min=function(t){return t&&t.length?De(t,Qo,bn):u},k.minBy=function(t,e){return t&&t.length?De(t,Rr(e,2),bn):u},k.stubArray=ri,k.stubFalse=oi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=jc,k.nth=function(t,e){return t&&t.length?xn(t,Bo(e)):u},k.noConflict=function(){return We._===this&&(We._=Oi),this},k.noop=ei,k.now=ya,k.pad=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?H(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return mr(Ki(o),n)+t+mr(Fi(o),n)},k.padEnd=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?H(t):0;return e&&r<e?t+mr(e-r,n):t},k.padStart=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?H(t):0;return e&&r<e?mr(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Yi(Fo(t).replace(Vt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Fr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=Lo(t),e===u?(e=t,t=0):e=Lo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Qi();return Zi(t+o*(e-t+ze("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Pa(t)?g:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,mu)},k.reduceRight=function(t,e,n){var r=Pa(t)?m:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,bu)},k.repeat=function(t,e,n){return e=(n?Fr(t,e,n):e===u)?1:Bo(e),Cn(Fo(t),e)},k.replace=function(){var t=arguments,e=Fo(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Jn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[to(e[r])];i===u&&(r=o,i=n),t=Eo(i)?i.call(t):i}return t},k.round=Ec,k.runInContext=t,k.sample=function(t){return(Pa(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(xo(t))return Ro(t)?H(t):t.length;var e=Lu(t);return e==lt||e==vt?t.size:mn(t).length},k.snakeCase=uc,k.some=function(t,e,n){var r=Pa(t)?b:Ln;return n&&Fr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.sortedIndex=function(t,e){return Bn(t,e)},k.sortedIndexBy=function(t,e,n){return Nn(t,e,Rr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Bn(t,e);if(r<n&&So(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Bn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Nn(t,e,Rr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Bn(t,e,!0)-1;if(So(t[n],e))return n}return-1},k.startCase=ac,k.startsWith=function(t,e,n){return t=Fo(t),n=null==n?0:ke(Bo(n),0,t.length),e=ku(e),t.slice(n,n+e.length)==e},k.subtract=kc,k.sum=function(t){return t&&t.length?C(t,Qo):0},k.sumBy=function(t,e){return t&&t.length?C(t,Rr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&Fr(t,e,n)&&(e=u),t=Fo(t),e=Ka({},e,r,jr);var o,i,a=Ka({},e.imports,r.imports,jr),c=Ho(a),s=R(a,c),l=0,f=e.interpolate||ae,h="__p += '",d=fi((e.escape||ae).source+"|"+f.source+"|"+(f===$t?Xt:ae).source+"|"+(e.evaluate||ae).source+"|$","g"),p="//# sourceURL="+(bi.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$e+"]")+"\n";t.replace(d,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(ce,N),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=bi.call(e,"variable")&&e.variable;if(v){if(Yt.test(v))throw new ai("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Pt,""):h).replace(Tt,"$1").replace(It,"$1;"),h="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")+h+"return __p\n}";var y=lc((function(){return ci(c,p+"return "+h).apply(u,s)}));if(y.source=h,jo(y))throw y;return y},k.times=function(t,e){if((t=Bo(t))<1||t>X)return[];var n=et,r=Zi(t,et);e=Rr(e),t-=et;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=Lo,k.toInteger=Bo,k.toLength=No,k.toLower=function(t){return Fo(t).toLowerCase()},k.toNumber=$o,k.toSafeInteger=function(t){return t?ke(Bo(t),-9007199254740991,X):0===t?t:0},k.toString=Fo,k.toUpper=function(t){return Fo(t).toUpperCase()},k.trim=function(t,e,n){if((t=Fo(t))&&(n||e===u))return T(t);if(!t||!(e=ku(e)))return t;var r=V(t),o=V(e);return Yn(r,M(r,o),L(r,o)+1).join("")},k.trimEnd=function(t,e,n){if((t=Fo(t))&&(n||e===u))return t.slice(0,q(t)+1);if(!t||!(e=ku(e)))return t;var r=V(t);return Yn(r,0,L(r,V(e))+1).join("")},k.trimStart=function(t,e,n){if((t=Fo(t))&&(n||e===u))return t.replace(Vt,"");if(!t||!(e=ku(e)))return t;var r=V(t);return Yn(r,M(r,V(e))).join("")},k.truncate=function(t,e){var n=30,r="...";if(Co(e)){var o="separator"in e?e.separator:o;n="length"in e?Bo(e.length):n,r="omission"in e?ku(e.omission):r}var i=(t=Fo(t)).length;if($(t)){var a=V(t);i=a.length}if(n>=i)return t;var c=n-H(r);if(c<1)return r;var s=a?Yn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),Ma(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,Fo(te.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(ku(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+r},k.unescape=function(t){return(t=Fo(t))&&Mt.test(t)?t.replace(Rt,sn):t},k.uniqueId=function(t){var e=++wi;return Fo(t)+e},k.upperCase=cc,k.upperFirst=sc,k.each=vo,k.eachRight=yo,k.first=uo,ti(k,(Sa={},Ke(k,(function(t,e){bi.call(k.prototype,e)||(Sa[e]=t)})),Sa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){le.prototype[t]=function(n){n=n===u?1:Gi(Bo(n),0);var r=this.__filtered__&&!e?new le(this):this.clone();return r.__filtered__?r.__takeCount__=Zi(n,r.__takeCount__):r.__views__.push({size:Zi(n,et),type:t+(r.__dir__<0?"Right":"")}),r},le.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;le.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Rr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");le.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");le.prototype[t]=function(){return this.__filtered__?new le(this):this[n](1)}})),le.prototype.compact=function(){return this.filter(Qo)},le.prototype.find=function(t){return this.filter(t).head()},le.prototype.findLast=function(t){return this.reverse().find(t)},le.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new le(this):this.map((function(n){return dn(n,t,e)}))})),le.prototype.reject=function(t){return this.filter(_o(Rr(t)))},le.prototype.slice=function(t,e){t=Bo(t);var n=this;return n.__filtered__&&(t>0||e<0)?new le(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=Bo(e))<0?n.dropRight(-e):n.take(e-t)),n)},le.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},le.prototype.toArray=function(){return this.take(et)},Ke(le.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),i=k[o?"take"+("last"==e?"Right":""):e],a=o||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,s=r(e,le),l=c[0],f=s||Pa(e),h=function(t){var e=i.apply(k,y([t],c));return o&&d?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,p=!!this.__actions__.length,v=a&&!d,g=s&&!p;if(!a&&f){e=g?e:new le(this);var m=t.apply(e,c);return m.__actions__.push({func:po,args:[h],thisArg:u}),new se(m,d)}return v&&g?t.apply(this,c):(m=this.thru(h),v?o?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=pi[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Pa(o)?o:[],t)}return this[n]((function(n){return e.apply(Pa(n)?n:[],t)}))}})),Ke(le.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";bi.call(au,r)||(au[r]=[]),au[r].push({name:e,func:n})}})),au[Pu(u,2).name]=[{name:"wrapper",func:u}],le.prototype.clone=function(){var t=new le(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},le.prototype.reverse=function(){if(this.__filtered__){var t=new le(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},le.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pa(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Zi(e,t+u);break;case"takeRight":t=Gi(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,d=Zi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Vn(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}p[h++]=y}return p},k.prototype.at=aa,k.prototype.chain=function(){return ho(this)},k.prototype.commit=function(){return new se(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=Mo(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;r(n,qt);){var o=no(n);o.__index__=0,o.__values__=u,e?i.__wrapped__=o:e=o;var i=o;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(r(t,le)){var e=t;return this.__actions__.length&&(e=new le(this)),(e=e.reverse()).__actions__.push({func:po,args:[so],thisArg:u}),new se(e,this.__chain__)}return this.thru(so)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Mi&&(k.prototype[Mi]=function(){return this}),k}();We._=ln,(i=function(){return ln}.call(e,n,e,t))===u||(t.exports=i)}.call(this)},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=p},824:function(t){"use strict";t.exports=c},45:function(t){"use strict";t.exports=s},728:function(t){"use strict";t.exports=l},688:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=h},954:function(t){"use strict";t.exports=a},493:function(t){"use strict";t.exports=f},281:function(t){"use strict";t.exports=d}},y={};function g(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,g),n.loaded=!0,n.exports}g.y=u,g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,{a:e}),e},g.d=function(t,e){for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;g.g.importScripts&&(t=g.g.location+"");var e=g.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=t}();var m={};return(0,g(968).s)(1),function(){"use strict";var i=function(t){var e=t.to,n=t.templateParams,r=t.children,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","templateParams","children"]);return Dt.default.createElement("a",Bt({onClick:function(t){return o=e,i=n,void((r=t).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Lt.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Lt.interpolateUrl)(e,n)},o),r)},u=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},c=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,Dt.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return u(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,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,Dt.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var c={};return e&&(c=(0,Dt.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){a(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,c)}},s=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},l=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},f=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Dt.useState)(window.navigator.onLine))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,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.")}(),n=e[0],r=e[1];return(0,Dt.useEffect)((function(){return(0,Ut.subscribeConnectivityChanged)((function(t){var e=t.online;return r(e)}))}),[]),n},h=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},d=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Dt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return h(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,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.")}(),r=n[0],o=n[1];return(0,Dt.useEffect)((function(){var e=function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,Ft.isEqual)(u,r)||o(u)};return e((0,Nt.getExtensionStore)().getState()),(0,Nt.getExtensionStore)().subscribe(e)}),[t,r]),r},p=function(t){var e=f(),n=d(t);return(0,Dt.useMemo)((function(){return(0,Nt.getConnectedExtensions)(n,e)}),[n,e])},v=function(t){var e=(0,Dt.useContext)(Mt).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Dt.useEffect)((function(){(0,Nt.registerExtensionSlot)(e,t)}),[]),{extensions:p(t),extensionSlotName:t,extensionSlotModuleName:e}},y=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},b=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){y(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},w=function(t){return t},_=function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n},S=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{};n%2?_(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))},r=1;r<arguments.length;r++)n(r);return t},x=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=function(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)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(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(qt(n)));return function(){var t=n(e);if(!r(t,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(qt(t)));return t}},j=function(t){if("object"!==Vt(t))throw new Error("single-spa-react requires a configuration object");var e=S(S({},Gt),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Wt&&e.React.createContext&&(Wt=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:E.bind(null,e),mount:k.bind(null,e),unmount:A.bind(null,e)};return e.parcelCanUpdate&&(n.update=C.bind(null,e)),n},E=function(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))},k=function(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=P(t,e,(function(){n(this)})),i=O(t,e)(),u=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=u}))},A=function(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))},C=function(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=P(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=O(t,e)();t.ReactDOM.render(r,i)}}))},P=function(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=Wt?t.React.createElement(Wt.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,S(S({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)},T=function(t,e){return!e||"object"!==te(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},I=function(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},ne,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xt(t,e)}(a,n);var o,i,u=(o=a,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(t){return!1}}(),function(){var t,e=Qt(o);if(i){var n=Qt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return T(this,t)});function a(t){var n;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=a.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Dt.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Dt.default.createElement(Mt.Provider,{value:this.state.config},Dt.default.createElement(Dt.default.Suspense,{fallback:null},e.disableTranslations?Dt.default.createElement(t,Yt({},this.props)):Dt.default.createElement(re,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},Dt.default.createElement(Jt.I18nextProvider,{i18n:ee,defaultNS:e.moduleName},Dt.default.createElement(t,Yt({},this.props))))));return e.strictMode||!Dt.default.StrictMode?r:Dt.default.createElement(Dt.default.StrictMode,null,r)},a}(Dt.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}},R=function(t,e){return j({React:Dt.default,ReactDOM:Ht.default,rootComponent:I(e)(t)})},D=function(t,e){return function(){return t().then((function(t){return R(t.default,e)}))}},M=function(t,e){return function(){return Promise.resolve(R(t,e))}},L=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},B=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Dt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return L(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,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.")}(),r=n[0],o=n[1];return(0,Dt.useEffect)((function(){return(0,Nt.getExtensionStore)().subscribe((function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,Ft.isEqual)(u,r)||o(u)}))}),[]),r},N=function(t){(0,Dt.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])},$=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},U=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},F=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},K=function(t){var e=this.__data__=new se(t);this.size=e.size},z=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ue;++e<n;)this.add(t[e])},H=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},V=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},q=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},W=function(){var t=(0,Dt.useContext)(Mt),e=t.moduleName,n=t.extension;if(!e&&!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(t){var e,n,r,o,i,u,a=(0,Dt.useMemo)((function(){return(0,Lt.getConfigStore)(t)}),[t]),c=t,s=(e=a,o=(r=q((0,Dt.useState)((n=e,function(){var t=n.getState();return t.loaded&&t.config?t.config:null})),2))[0],i=r[1],(0,Dt.useEffect)((function(){return null==e?void 0:e.subscribe((function(t){t.loaded&&t.config&&i(t.config)}))}),[e]),o);if(!s)throw tr[c]||(tr[c]=(u=a,new Promise((function(t){var e=u.subscribe((function(n){n.loaded&&n.config&&(t(n.config),e())}))})))),tr[c];return s}(e),o=function(t){var e,n,r,o,i,u,a,c=(0,Dt.useMemo)(Lt.getExtensionsConfigStore,[]),s=(e=c,n=t,i=q((0,Dt.useState)((r=e,(o=n)?function(){var t=r.getState(),e=(0,Lt.getExtensionConfigFromStore)(t,o.extensionSlotName,o.extensionId);if(e.loaded&&e.config)return e.config}:null)),2),u=i[0],a=i[1],(0,Dt.useEffect)((function(){if(n)return e.subscribe((function(t){var e=(0,Lt.getExtensionConfigFromStore)(t,n.extensionSlotName,n.extensionId);e.loaded&&e.config&&!Xn(e.config,u)&&a(e.config)}))}),[e,n,u]),u);if(!s&&t){var l="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!tr[l]&&c&&(tr[l]=function(t,e){return new Promise((function(n){var r=t.subscribe((function(t){var o=(0,Lt.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,t)),tr[l]}return s||{}}(n),i=(0,Dt.useMemo)((function(){return function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){V(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},r,o)}),[r,o]);return i},G=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},J=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Y=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},Q=function(t,e){switch(e.type){case qn.loadPatient:return J({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case qn.newPatient:return J({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case qn.loadError:return J({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}},X=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Dt.useReducer)(Q,J({},rr,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t})))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return G(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,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.")}(),r=n[0],o=n[1];return(0,Dt.useEffect)((function(){if(r.isPendingUuid){var t=Y();o(t?{type:qn.loadPatient,patientUuid:t}:{type:qn.newPatient,patient:null})}var e=!0;return r.isLoadingPatient&&r.patientUuid&&(0,er.fetchCurrentPatient)(r.patientUuid).then((function(t){return e&&o({patient:t.data,type:qn.newPatient})}),(function(t){return e&&o({err:t,type:qn.loadError})})),function(){e=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Dt.useEffect)((function(){var t=function(t){var e=Y();e!=r.patientUuid&&o({type:qn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=t?t:r.patientUuid,error:r.err}},tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},et=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},nt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){et(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},rt=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},ot=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},it=function(t,e){switch(e.type){case nr.loadPatient:return nt({},t,{patient:null,isLoadingPatient:!0,err:null});case nr.newPatient:return nt({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case nr.loadError:return nt({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}},ut=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot(),e=rt((0,Dt.useReducer)(it,ar),2),n=e[0],r=e[1];return(0,Dt.useEffect)((function(){var e=!0;return t?((0,er.fetchCurrentPatient)(t).then((function(t){return e&&r({patient:t.data,type:nr.newPatient})}),(function(t){return e&&r({err:t,type:nr.loadError})})),r({type:nr.loadPatient})):r({type:nr.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]},at=function(t){var e=p(t);return(0,Dt.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])},ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},st=function(){var t,e=(t=(0,Dt.useState)(0),function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(t,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.")}())[1];return(0,Dt.useCallback)((function(){e((function(t){return t+1}))}),[])},lt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ft=function(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t},ht=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Dt.useState)(ft))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return lt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,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.")}(),n=e[0],r=e[1];return(0,Dt.useEffect)((function(){var t=function(){r(ft())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),n},dt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},pt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Dt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return dt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dt(t,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.")}(),n=e[0],r=e[1];return(0,Dt.useEffect)((function(){var t=(0,er.getLocations)().subscribe((function(t){r(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},vt=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Dt.useRef)(null);return(0,Dt.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n},yt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},gt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},mt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Dt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return gt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(t,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.")}(),n=e[0],r=e[1],o=null;if(!n){if(or){var i=(0,er.getSessionStore)().getState();i.loaded&&(o=i.session)}else or=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,ir&&ir(),ir=void 0)};e((0,er.getSessionStore)().getState()),o||(ir=(0,er.getSessionStore)().subscribe(e))}));if(!o)throw or;r(o)}(0,Dt.useEffect)((function(){return ir||(ir=(0,er.getSessionStore)().subscribe((function(t){var e=t.loaded,n=t.session;e&&(o=n,r(n))}))),function(){ir&&ir(),ir=void 0}}),[]);var u=n||o;if(!u)throw or?(console.warn("useSession is in an unexpected state. Attempting to recover."),or):Error("useSession is in an invalid state.");return u},bt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},wt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},_t=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){wt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},St=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},xt=function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n},Ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr,n=arguments.length>2?arguments[2]:void 0,r=St((0,Dt.useState)((function(){return e(t.getState())})),2),o=r[0],i=r[1];(0,Dt.useEffect)((function(){return(0,fr.subscribeTo)(t,e,i)}),[t,e]);var u={};return n&&(u=(0,Dt.useMemo)((function(){return xt(t,n)}),[t,n])),_t({},o,u)},jt=function(t,e){return Ot(t,hr,e)},Et=function(t,e,n,o){return new(n||(n=Promise))((function(i,u){function a(t){try{s(o.next(t))}catch(t){u(t)}}function c(t){try{s(o.throw(t))}catch(t){u(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,r(e,n)?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))},kt=function(t,e){var n,r,o,i,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;function a(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=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},At=function(t){var e,n=eo(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(er.defaultVisitCustomRepresentation,"&includeInactive=false"):null,er.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Dt.useMemo)((function(){return null!==(e=null==r?void 0:r.data.results.find((function(t){return null===t.stopDatetime&&(0,no.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Pt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Dt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,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.")}(),n=e[0],r=e[1];return(0,Dt.useEffect)((function(){var t=(0,er.getVisitTypes)().subscribe((function(t){r(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},Tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},It=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Rt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=It((0,Dt.useState)(1),2),r=n[0],o=n[1],i=(0,Dt.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,Dt.useMemo)((function(){var n=(r-1)*e,o=(r+0)*e;return t.slice(n,o)}),[t,r,e]);return{results:u,totalPages:i,currentPage:r,paginated:t.length>e,showNextButton:r<i,showPreviousButton:r>1,goTo:function(t){o(Math.max(1,Math.min(i,t)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};g.r(m),g.d(m,{ComponentContext:function(){return Mt},ConfigurableLink:function(){return i},Extension:function(){return $t},ExtensionSlot:function(){return zt},UserHasAccess:function(){return lr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return oe},getAsyncLifecycle:function(){return D},getLifecycle:function(){return R},getSyncLifecycle:function(){return M},openmrsComponentDecorator:function(){return I},useAssignedExtensionIds:function(){return B},useAssignedExtensions:function(){return d},useBodyScrollLock:function(){return N},useConfig:function(){return W},useConnectedExtensions:function(){return p},useConnectivity:function(){return f},useCurrentPatient:function(){return ut},useExtensionInternalStore:function(){return cr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return at},useExtensionStore:function(){return sr},useForceUpdate:function(){return st},useLayoutType:function(){return ht},useLocations:function(){return pt},useOnClickOutside:function(){return vt},usePagination:function(){return Rt},usePatient:function(){return X},useSession:function(){return mt},useStore:function(){return Ot},useStoreWithActions:function(){return jt},useVisit:function(){return At},useVisitTypes:function(){return Pt}});var Dt=g(954),Mt=Dt.default.createContext({moduleName:""}),Lt=g(824);function Bt(){return Bt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Bt.apply(this,arguments)}var Nt=g(45),$t=function(t){var e,n=t.state,r=t.wrap,o=function(t){if(Array.isArray(t))return t}(e=(0,Dt.useState)())||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,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.")}(),i=o[0],u=o[1],a=(0,Dt.useContext)(Mt).extension,c=(0,Dt.useCallback)((function(t){u(t)}),[]);(0,Dt.useEffect)((function(){if(null!=i&&a)return(0,Nt.renderExtension)(i,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,n)}),[null==a?void 0:a.extensionSlotName,null==a?void 0:a.extensionId,null==a?void 0:a.extensionSlotModuleName,n,i]);var l=Dt.default.createElement("div",{ref:c,"data-extension-id":null==a?void 0:a.extensionId,style:{position:"relative"}});return a&&r?r(l,a):l},Ut=g(728),Ft=g(891);function Kt(){return Kt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kt.apply(this,arguments)}var zt=function(t){var e=t.extensionSlotName,n=t.select,r=void 0===n?w:n,o=t.children,i=t.state,u=t.style,a=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["extensionSlotName","select","children","state","style"]),c=(0,Dt.useRef)(null),s=v(e),l=s.extensions,f=s.extensionSlotModuleName,h=(0,Dt.useRef)(i);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(h.current,i)||(h.current=i);var d=(0,Dt.useMemo)((function(){return e&&r(l).map((function(t){return Dt.default.createElement(Mt.Provider,{key:t.id,value:{moduleName:f,extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:f}}},null!=o?o:Dt.default.createElement($t,{state:h.current}))}))}),[r,l,e,h.current]);return Dt.default.createElement("div",Kt({ref:c,"data-extension-slot-name":e,"data-extension-slot-module-name":f,style:b({},u,{position:"relative"})},a),d)},Ht=g(493);function Vt(t){return(Vt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}function qt(t){return(qt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}var Wt=null;try{Wt=n(6983).createContext()}catch(t){}var Gt={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Zt=g(64),Jt=g(281);function Yt(){return Yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yt.apply(this,arguments)}function Qt(t){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var te=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)},ee=Zt.default.default||Zt.default,ne={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},re=function(t){(0,Dt.useEffect)((function(){return ee.on("languageChanged",t.forceUpdate),function(){return ee.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,Dt.useRef)(null);if(e.current)throw e.current;if(!ee.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.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 ee.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return Dt.default.createElement(Dt.default.Fragment,null,t.children)},oe=D,ie=function(t,e){return t===e||t!=t&&e!=e},ue=function(t,e){for(var n=t.length;n--;)if(ie(t[n][0],e))return n;return-1},ae=Array.prototype.splice;$.prototype.clear=function(){this.__data__=[],this.size=0},$.prototype.delete=function(t){var e=this.__data__,n=ue(e,t);return!(n<0||(n==e.length-1?e.pop():ae.call(e,n,1),--this.size,0))},$.prototype.get=function(t){var e=this.__data__,n=ue(e,t);return n<0?void 0:e[n][1]},$.prototype.has=function(t){return ue(this.__data__,t)>-1},$.prototype.set=function(t,e){var n=this.__data__,r=ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ce,se=$,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fe="object"==typeof self&&self&&self.Object===Object&&self,he=le||fe||Function("return this")(),de=he.Symbol,pe=Object.prototype,ve=pe.hasOwnProperty,ye=pe.toString,ge=de?de.toStringTag:void 0,me=Object.prototype.toString,be=de?de.toStringTag:void 0,we=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":be&&be in Object(t)?function(t){var e=ve.call(t,ge),n=t[ge];try{t[ge]=void 0;var r=!0}catch(t){}var o=ye.call(t);return r&&(e?t[ge]=n:delete t[ge]),o}(t):(e=t,me.call(e));var e},_e=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Se=function(t){if(!_e(t))return!1;var e=we(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},xe=he["__core-js_shared__"],Oe=(ce=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"",je=Function.prototype.toString,Ee=function(t){if(null!=t){try{return je.call(t)}catch(t){}try{return t+""}catch(t){}}return""},ke=/^\[object .+?Constructor\]$/,Ae=Function.prototype,Ce=Object.prototype,Pe=Ae.toString,Te=Ce.hasOwnProperty,Ie=RegExp("^"+Pe.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!_e(t)||(e=t,Oe&&Oe in e))&&(Se(t)?Ie:ke).test(Ee(t));var e}(r)?r:void 0},De=Re(he,"Map"),Me=Re(Object,"create"),Le=Object.prototype.hasOwnProperty,Be=Object.prototype.hasOwnProperty;U.prototype.clear=function(){this.__data__=Me?Me(null):{},this.size=0},U.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},U.prototype.get=function(t){var e=this.__data__;if(Me){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Le.call(e,t)?e[t]:void 0},U.prototype.has=function(t){var e=this.__data__;return Me?void 0!==e[t]:Be.call(e,t)},U.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Me&&void 0===e?"__lodash_hash_undefined__":e,this};var Ne=U,$e=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};F.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(De||se),string:new Ne}},F.prototype.delete=function(t){var e=$e(this,t).delete(t);return this.size-=e?1:0,e},F.prototype.get=function(t){return $e(this,t).get(t)},F.prototype.has=function(t){return $e(this,t).has(t)},F.prototype.set=function(t,e){var n=$e(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Ue=F;K.prototype.clear=function(){this.__data__=new se,this.size=0},K.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},K.prototype.get=function(t){return this.__data__.get(t)},K.prototype.has=function(t){return this.__data__.has(t)},K.prototype.set=function(t,e){var n=this.__data__;if(r(n,se)){var o=n.__data__;if(!De||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ue(o)}return n.set(t,e),this.size=n.size,this};var Fe=K;z.prototype.add=z.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},z.prototype.has=function(t){return this.__data__.has(t)};var Ke=z,ze=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},He=function(t,e){return t.has(e)},Ve=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,d=2&n?new Ke:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var p=t[f],v=e[f];if(r)var y=u?r(v,p,f,e,t,i):r(p,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(d){if(!ze(e,(function(t,e){if(!He(d,e)&&(p===t||o(p,t,n,r,i)))return d.push(e)}))){h=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},qe=he.Uint8Array,We=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ge=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Ze=de?de.prototype:void 0,Je=Ze?Ze.valueOf:void 0,Ye=Array.isArray,Qe=Object.prototype.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,tn=Xe?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Xe(t),(function(e){return Qe.call(t,e)})))}:function(){return[]},en=function(t){return null!=t&&"object"==typeof t},nn=function(t){return en(t)&&"[object Arguments]"==we(t)},rn=Object.prototype,on=rn.hasOwnProperty,un=rn.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(t){return en(t)&&on.call(t,"callee")&&!un.call(t,"callee")},cn=an,sn=e&&!e.nodeType&&e,ln=sn&&t&&!t.nodeType&&t,fn=ln&&ln.exports===sn?he.Buffer:void 0,hn=(fn?fn.isBuffer:void 0)||function(){return!1},dn=/^(?:0|[1-9]\d*)$/,pn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=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,gn,mn,bn=e&&!e.nodeType&&e,wn=bn&&t&&!t.nodeType&&t,_n=wn&&wn.exports===bn&&le.process,Sn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),xn=Sn&&Sn.isTypedArray,On=xn?(yn=xn,function(t){return yn(t)}):function(t){return en(t)&&pn(t.length)&&!!vn[we(t)]},jn=Object.prototype.hasOwnProperty,En=Object.prototype,kn=(gn=Object.keys,mn=Object,function(t){return gn(mn(t))}),An=Object.prototype.hasOwnProperty,Cn=function(t){return n=tn,r=function(t){return null!=(e=t)&&pn(e.length)&&!Se(e)?function(t,e){var n,r,i,u=Ye(t),a=!u&&cn(t),c=!u&&!a&&hn(t),s=!u&&!a&&!c&&On(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var d in t)!jn.call(t,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=h,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(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||En))return kn(t);var e,n,r=[];for(var o in Object(t))An.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Ye(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Pn=Object.prototype.hasOwnProperty,Tn=Re(he,"DataView"),In=Re(he,"Promise"),Rn=Re(he,"Set"),Dn=Re(he,"WeakMap"),Mn="[object Map]",Ln="[object Promise]",Bn="[object Set]",Nn="[object WeakMap]",$n="[object DataView]",Un=Ee(Tn),Fn=Ee(De),Kn=Ee(In),zn=Ee(Rn),Hn=Ee(Dn),Vn=we;(Tn&&Vn(new Tn(new ArrayBuffer(1)))!=$n||De&&Vn(new De)!=Mn||In&&Vn(In.resolve())!=Ln||Rn&&Vn(new Rn)!=Bn||Dn&&Vn(new Dn)!=Nn)&&(Vn=function(t){var e=we(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ee(n):"";if(r)switch(r){case Un:return $n;case Fn:return Mn;case Kn:return Ln;case zn:return Bn;case Hn:return Nn}return e});var qn,Wn=Vn,Gn="[object Arguments]",Zn="[object Array]",Jn="[object Object]",Yn=Object.prototype.hasOwnProperty,Qn=function t(e,n,o,i,u){return e===n||(null==e||null==n||!en(e)&&!en(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=Ye(t),c=Ye(e),s=a?Zn:Wn(t),l=c?Zn:Wn(e),f=(s=s==Gn?Jn:s)==Jn,h=(l=l==Gn?Jn:l)==Jn,d=s==l;if(d&&hn(t)){if(!hn(e))return!1;a=!0,f=!1}if(d&&!f)return u||(u=new Fe),a||On(t)?Ve(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new qe(t),new qe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=We;case"[object Set]":var c=1&r;if(a||(a=Ge),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ve(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Je)return Je.call(t)==Je.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var p=f&&Yn.call(t,"__wrapped__"),v=h&&Yn.call(e,"__wrapped__");if(p||v){var y=p?t.value():t,g=v?e.value():e;return u||(u=new Fe),i(y,g,n,o,u)}}return!!d&&(u||(u=new Fe),function(t,e,n,o,i,u){var a=1&n,c=Cn(t),s=c.length;if(s!=Cn(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:Pn.call(e,f)))return!1}var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var p=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(p=!1)}return u.delete(t),u.delete(e),p}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Xn=function(t,e){return Qn(t,e)},tr={},er=g(766);!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(qn||(qn={}));var nr,rr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(nr||(nr={}));var or,ir,ur,ar={patient:null,isLoadingPatient:!0,err:null},cr=c((0,Nt.getExtensionInternalStore)()),sr=c((0,Nt.getExtensionStore)()),lr=function(t){var e,n=t.privilege,r=t.children,o=function(t){if(Array.isArray(t))return t}(e=(0,Dt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return yt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(t,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.")}(),i=o[0],u=o[1];return(0,Dt.useEffect)((function(){var t=(0,er.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return t.unsubscribe()}}),[]),i&&(0,er.userHasAccess)(n,i)?Dt.default.createElement(Dt.default.Fragment,null,r):null},fr=g(385),hr=function(t){return t},dr=function(){},pr=void 0,vr=Object,yr=function(t){return t===pr},gr=function(t){return"function"==typeof t},mr=function(t,e){return vr.assign({},t,e)},br="undefined",wr=function(){return("undefined"==typeof window?"undefined":o(window))!=br},_r=new WeakMap,Sr=0,xr=function(t){var e,n,r=void 0===t?"undefined":o(t),i=t&&t.constructor,u=i==Date;if(vr(t)!==t||u||i==RegExp)e=u?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=_r.get(t))return e;if(e=++Sr+"~",_r.set(t,e),i==Array){for(e="@",n=0;n<t.length;n++)e+=xr(t[n])+",";_r.set(t,e)}if(i==vr){e="#";for(var a=vr.keys(t).sort();!yr(n=a.pop());)yr(t[n])||(e+=n+":"+xr(t[n])+",");_r.set(t,e)}}return e},Or=!0,jr=wr(),Er=("undefined"==typeof document?"undefined":o(document))!=br,kr=jr&&window.addEventListener?window.addEventListener.bind(window):dr,Ar=Er?document.addEventListener.bind(document):dr,Cr=jr&&window.removeEventListener?window.removeEventListener.bind(window):dr,Pr=Er?document.removeEventListener.bind(document):dr,Tr={isOnline:function(){return Or},isVisible:function(){var t=Er&&document.visibilityState;return yr(t)||"hidden"!==t}},Ir={initFocus:function(t){return Ar("visibilitychange",t),kr("focus",t),function(){Pr("visibilitychange",t),Cr("focus",t)}},initReconnect:function(t){var e=function(){Or=!0,t()},n=function(){Or=!1};return kr("online",e),kr("offline",n),function(){Cr("online",e),Cr("offline",n)}}},Rr=!wr()||"Deno"in window,Dr=Rr?Dt.useEffect:Dt.useLayoutEffect,Mr="undefined"!=typeof navigator&&navigator.connection,Lr=!Rr&&Mr&&(["slow-2g","2g"].includes(Mr.effectiveType)||Mr.saveData),Br=function(t){if(gr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?xr(t):"",e,t?"$swr$"+t:""]},Nr=new WeakMap,$r=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Nr.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var d=0;d<h.length;++d)h[d](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Ur=0,Fr=function(){return++Ur},Kr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Et(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,d,p,v,y,g,m,b,w;return kt(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!yr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Br(n),f=l[0],h=l[2],!f)return[2];if(d=Nr.get(e),p=d[2],t.length<3)return[2,$r(e,f,e.get(f),pr,pr,a,!0)];if(v=r,g=Fr(),p[f]=[g,0],m=!yr(s),b=e.get(f),m&&(e.set(f,s),$r(e,f,s)),gr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&gr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==p[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(gr(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,mr(e.get(h),{error:y}))),p[f][1]=Fr(),[4,$r(e,f,v,y,pr,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},zr=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Hr=function(t,e){if(!Nr.has(t)){var n=mr(Ir,e),r={},o=Kr.bind(pr,t),i=dr;if(Nr.set(t,[r,{},{},{},o]),!Rr){var u=n.initFocus(setTimeout.bind(pr,zr.bind(pr,r,0))),a=n.initReconnect(setTimeout.bind(pr,zr.bind(pr,r,1)));i=function(){u&&u(),a&&a(),Nr.delete(t)}}return[t,o,i]}return[t,Nr.get(t)[4]]},Vr=Hr(new Map),qr=Vr[0],Wr=Vr[1],Gr=mr({onLoadingSlow:dr,onSuccess:dr,onError:dr,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!yr(i)&&u>i||setTimeout(r,a,o)},onDiscarded:dr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Lr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Lr?5e3:3e3,compare:function(t,e){return xr(t)==xr(e)},isPaused:function(){return!1},cache:qr,mutate:Wr,fallback:{}},Tr),Zr=function(t,e){var n=mr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=mr(o,u))}return n},Jr=(0,Dt.createContext)({}),Yr=function(t){return gr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},Qr=function(){return mr(Gr,(0,Dt.useContext)(Jr))},Xr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},to={dedupe:!0},eo=(vr.defineProperty((function(t){var e=t.value,n=Zr((0,Dt.useContext)(Jr),e),r=e&&e.provider,o=(0,Dt.useState)((function(){return r?Hr(r(n.cache||qr),e):pr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Dr((function(){return o?o[2]:pr}),[]),(0,Dt.createElement)(Jr.Provider,mr(t,{value:n}))}),"default",{value:Gr}),ur=function(t,e,n){var r=n.cache,i=n.compare,u=n.fallbackData,a=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,h=Nr.get(r),d=h[0],p=h[1],v=h[2],y=h[3],g=Br(t),m=g[0],b=g[1],w=g[2],_=(0,Dt.useRef)(!1),S=(0,Dt.useRef)(!1),x=(0,Dt.useRef)(m),O=(0,Dt.useRef)(e),j=(0,Dt.useRef)(n),E=function(){return j.current},k=function(){return E().isVisible()&&E().isOnline()},A=function(t){return r.set(w,mr(r.get(w),t))},C=r.get(m),P=yr(u)?n.fallback[m]:u,T=yr(C)?P:C,I=r.get(w)||{},R=I.error,D=!_.current,M=function(){return D&&!yr(c)?c:!E().isPaused()&&(a?!yr(T):yr(T)||n.revalidateIfStale)},L=!(!m||!e)&&(!!I.isValidating||D&&M()),B=function(t,e){var n=(0,Dt.useState)({})[1],r=(0,Dt.useRef)(t),o=(0,Dt.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Dt.useCallback)((function(t){var i=!1,u=r.current;for(var a in t){var c=a;u[c]!==t[c]&&(u[c]=t[c],o.current[c]&&(i=!0))}i&&!e.current&&n({})}),[]);return Dr((function(){r.current=t})),[r,o.current,i]}({data:T,error:R,isValidating:L},S),N=B[0],$=B[1],U=B[2],F=(0,Dt.useCallback)((function(t){return Et(void 0,void 0,void 0,(function(){var e,o,u,a,c,s,l,f,h,d,p,g,w;return kt(this,(function(j){switch(j.label){case 0:if(e=O.current,!m||!e||S.current||E().isPaused())return[2,!1];a=!0,c=t||{},s=!y[m]||!c.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var t=y[m];t&&t[1]===u&&delete y[m]},h={isValidating:!1},d=function(){A({isValidating:!1}),l()&&U(h)},A({isValidating:!0}),U({isValidating:!0}),j.label=1;case 1:return j.trys.push([1,3,,4]),s&&($r(r,m,N.current.data,N.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){a&&l()&&E().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Fr()]),w=y[m],o=w[0],u=w[1],[4,o];case 2:return o=j.sent(),s&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===u?(A({error:pr}),h.error=pr,p=v[m],!yr(p)&&(u<=p[0]||u<=p[1]||0===p[1])?(d(),s&&l()&&E().onDiscarded(m),[2,!1]):(i(N.current.data,o)?h.data=N.current.data:h.data=o,i(r.get(m),o)||r.set(m,o),s&&l()&&E().onSuccess(o,m,n),[3,4])):(s&&l()&&E().onDiscarded(m),[2,!1]);case 3:return g=j.sent(),f(),E().isPaused()||(A({error:g}),h.error=g,s&&l()&&(E().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&k()&&E().onErrorRetry(g,m,n,F,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return a=!1,d(),l()&&s&&$r(r,m,h.data,h.error,!1),[2,!0]}}))}))}),[m]),K=(0,Dt.useCallback)(Kr.bind(pr,r,(function(){return x.current})),[]);if(Dr((function(){O.current=e,j.current=n})),Dr((function(){if(m){var t=m!==x.current,e=F.bind(pr,to),n=0,r=Xr(m,p,(function(t,e,n){U(mr({error:e,isValidating:n},i(N.current.data,t)?pr:{data:t}))})),u=Xr(m,d,(function(t){if(0==t){var r=Date.now();E().revalidateOnFocus&&r>n&&k()&&(n=r+E().focusThrottleInterval,e())}else if(1==t)E().revalidateOnReconnect&&k()&&e();else if(2==t)return F()}));return S.current=!1,x.current=m,_.current=!0,t&&U({data:T,error:R,isValidating:L}),M()&&(yr(T)||Rr?e():(a=e,wr()&&o(window.requestAnimationFrame)!=br?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),u()}}var a}),[m,F]),Dr((function(){var t,e=function(){var e=gr(s)?s(T):s;e&&-1!==t&&(t=setTimeout(n,e))},n=function(){N.current.error||!l&&!E().isVisible()||!f&&!E().isOnline()?e():F(to).then(e)};return e(),function(){t&&(clearTimeout(t),t=-1)}}),[s,l,f,F]),(0,Dt.useDebugValue)(T),a&&yr(T)&&m)throw O.current=e,j.current=n,S.current=!1,yr(R)?F(to):R;return{mutate:K,get data(){return $.data=!0,T},get error(){return $.error=!0,R},get isValidating(){return $.isValidating=!0,L}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr(),r=Yr(t),o=r[0],i=r[1],u=r[2],a=Zr(n,u),c=ur,s=a.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||a.fetcher,a)}),no=g(688),ro=g(332),oo=g.n(ro);no.default.extend(oo())}(),m}())}}}))},1493:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var u=n,a=0;a<u.length;a++)u[a](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 u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},2390:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(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.")}()}t=n.nmd(t);var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function d(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","i18next","react","react-dom","react-i18next","rxjs"],(function(r,i){var d={},p={},v={},y={},g={},m={},b={},w={};return{setters:[function(t){d.getExtensionInternalStore=t.getExtensionInternalStore,d.getExtensionStore=t.getExtensionStore},function(){},function(t){v.createGlobalStore=t.createGlobalStore,v.getGlobalStore=t.getGlobalStore},function(t){y.default=t.default},function(t){g.createContext=t.createContext,g.createElement=t.createElement,g.default=t.default,g.useCallback=t.useCallback,g.useContext=t.useContext,g.useDebugValue=t.useDebugValue,g.useEffect=t.useEffect,g.useLayoutEffect=t.useLayoutEffect,g.useMemo=t.useMemo,g.useRef=t.useRef,g.useState=t.useState},function(){},function(){},function(t){w.BehaviorSubject=t.BehaviorSubject,w.Subject=t.Subject}],execute:function(){r(function(){var r={8942:function(t,e){var n,r,o;r=e,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(t){this.message=t}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(t){for(var e,r,i=String(t),u=0,a=o,c="";i.charAt(0|u)||(a="=",u%1);c+=a.charAt(63&e>>8-u%1*8)){if((r=i.charCodeAt(u+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|r}return c}),r.atob||(r.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,u=0,a=0,c="";i=e.charAt(a++);~i&&(r=u%4?64*r+i:i,u++%4)?c+=String.fromCharCode(255&r>>(-2*u&6)):0)i=o.indexOf(i);return c})},3023:function(t){var e=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t.exports=function(){"use strict";var t=6e4,n=36e5,r="millisecond",o="second",i="minute",u="hour",a="day",c="week",s="month",l="quarter",f="year",h="date",d="Invalid Date",p=/^(\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("_")},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},m={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,s),i=n-o<0,u=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-u:u-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:f,w:c,d:a,D:h,h:u,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=y;var _=function(t){return e(t,k)},S=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var u=e.split("-");if(!o&&u.length>1)return t(u[0])}else{var a=e.name;w[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},x=function(t,e){if(_(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},O=m;O.l=S,O.i=_,O.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var j,E,k=((E=(j=function(t){this.$L=S(t.locale,null,!0),this.parse(t)}).prototype).parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(O.u(n))return new Date;if(e(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(p);if(o){var i=o[2]-1||0,u=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,u)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,u)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},E.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},E.$utils=function(){return O},E.isValid=function(){return!(this.$d.toString()===d)},E.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},E.isAfter=function(t,e){return x(t)<this.startOf(e)},E.isBefore=function(t,e){return this.endOf(e)<x(t)},E.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(t,e){var n=this,r=!!O.u(e)||e,l=O.p(t),d=function(t,e){var o=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},p=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,y=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?d(1,0):d(31,11);case s:return r?d(1,y):d(0,y+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(r?g-w:g+(6-w),y);case a:case h:return p(m+"Hours",0);case u:return p(m+"Minutes",1);case i:return p(m+"Seconds",2);case o:return p(m+"Milliseconds",3);default:return this.clone()}},E.endOf=function(t){return this.startOf(t,!1)},E.$set=function(t,e){var n,c=O.p(t),l="set"+(this.$u?"UTC":""),d=(n={},n[a]=l+"Date",n[h]=l+"Date",n[s]=l+"Month",n[f]=l+"FullYear",n[u]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],p=c===a?this.$D+(e-this.$W):e;if(c===s||c===f){var v=this.clone().set(h,1);v.$d[d](p),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},E.set=function(t,e){return this.clone().$set(t,e)},E.get=function(t){return this[O.p(t)]()},E.add=function(e,r){var l,h=this;e=Number(e);var d=O.p(r),p=function(t){var n=x(h);return O.w(n.date(n.date()+Math.round(t*e)),h)};if(d===s)return this.set(s,this.$M+e);if(d===f)return this.set(f,this.$y+e);if(d===a)return p(1);if(d===c)return p(7);var v=(l={},l[i]=t,l[u]=n,l[o]=1e3,l)[d]||1,y=this.$d.getTime()+e*v;return O.w(y,this)},E.subtract=function(t,e){return this.add(-1*t,e)},E.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),i=this.$H,u=this.$m,a=this.$M,c=n.weekdays,s=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].substr(0,i)},f=function(t){return O.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:l(n.monthsShort,a,s,3),MMMM:l(s,a),D:this.$D,DD:O.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:O.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,u,!0),A:h(i,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(t,e){return e||p[t]||o.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(e,r,h){var d,p=O.p(r),v=x(e),y=(v.utcOffset()-this.utcOffset())*t,g=this-v,m=O.m(this,v);return m=(d={},d[f]=m/12,d[s]=m,d[l]=m/3,d[c]=(g-y)/6048e5,d[a]=(g-y)/864e5,d[u]=g/n,d[i]=g/t,d[o]=g/1e3,d)[p]||g,h?m:O.a(m)},E.daysInMonth=function(){return this.endOf(s).$D},E.$locale=function(){return w[this.$L]},E.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},E.clone=function(){return O.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},j),A=k.prototype;return x.prototype=A,[["$ms",r],["$s",o],["$m",i],["$H",u],["$W",a],["$M",s],["$y",f],["$D",h]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,k,x),t.$i=!0),x},x.locale=S,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}()},1701:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},627:function(t){(function(){var e,n,r=function(t,r,o,i){n.defer(),e.search(t).then((function(t){u(t,r).then((function(){o()}),(function(t){i(t)}))}),(function(t){i(t)}))},o=function(t){var e=n.defer(),o=[];return r(t,(function(t){t.forEach((function(t){o.push(t)}))}),(function(){e.resolve(o)}),(function(t){e.reject(t)})),e.promise},i=function(t,r){var o=n.defer();return e.search(t).then((function(t){var n=function(){u.pop()()},i={},u=[function(){o.resolve(t,i)}],a=t.data;a.entry&&a.entry.forEach((function(t){var o=t.resource,c=o.resourceType;r&&r.forEach((function(t){var r,s,l,f=t.split("."),h=f[0],d=f[1],p=o[d];if(c===h&&p){var v=p.reference;i[v]||(r=a,s=o,l=p,u.push((function(){var t,o,u,a;t=r,o=s,a=(u=l).reference,e.resolve({bundle:t,resource:o,reference:u}).then((function(t){var e=t.data||t.content;i[a]=e,n()}))})))}}))})),n()}),(function(){o.reject("Could not fetch search results")})),o.promise};function u(t,r){var o,i=t.data.entry||[],a=[];for(o=0;o<i.length;o++)a.push(i[o].resource);r(a);var c=n.defer();return e.nextPage({bundle:t.data}).then((function(t){u(t,r).then((function(t){c.resolve()}))}),(function(t){c.resolve()})),c.promise}t.exports=function(t,u){return e=t,n=u,t.drain=r,t.fetchAll=o,t.fetchAllWithReferences=i,t}}).call(this)},245:function(t,e,n){(function(){n(9181);var e=n(300),r=n(9999),o=n(9508),i=n(2633),u=n(3018),a=n(4137),c=n(6514),s=n(4963),l=n(2941),f=n(3575),h=n(627);t.exports=function(t,n){var d=e.Middleware,p=e.$$Attr,v=function(t){return p("method",t)},y=function(t,e){return p("headers."+t,e)},g=d(u),m=d(a(t,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",t.headers&&t.headers.Accept?t.headers.Accept:"application/json")).and(y("Content-Type",t.headers&&t.headers["Content-Type"]?t.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),S=m.and(v("DELETE")),x=m.and(v("PATCH")),O=i.Http(t,n),j=f.Path,E=j(t.baseUrl),k=E.slash(":type || :resource.resourceType"),A=k.slash("_history"),C=k.slash(":id || :resource.id"),P=C.slash("_history"),T=C.slash(":versionId || :resource.meta.versionId"),I=E.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),R=y("Prefer","return=representation"),D=d(r.$Paging);return h({conformance:b.and(E.slash("metadata")).end(O),document:w.and(E.slash("Document")).end(O),profile:b.and(E.slash("Profile").slash(":type")).end(O),transaction:w.and(E).end(O),history:b.and(E.slash("_history")).and(D).end(O),typeHistory:b.and(A).and(D).end(O),resourceHistory:b.and(P).and(D).end(O),read:b.and(s.$WithPatient).and(C).end(O),vread:b.and(T).end(O),delete:S.and(C).and(R).end(O),create:w.and(k).and(R).end(O),validate:w.and(k.slash("_validate")).end(O),meta:{add:w.and(I.slash("$meta-add")).end(O),delete:w.and(I.slash("$meta-delete")).end(O),read:b.and(I.slash("$meta")).end(O)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(D).end(O),update:_.and(C).and(R).end(O),conditionalUpdate:_.and(k).and(r.$SearchParams).and(R).end(O),conditionalDelete:S.and(k).and(r.$SearchParams).and(R).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(j(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:x.and(C).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},9508:function(t,e,n){(function(){var t,r=n(300),o=n(8942).btoa;e.$Basic=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.user&&t.auth.pass)return"Basic "+o(t.auth.user+":"+t.auth.pass)})),e.$Bearer=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.bearer)return"Bearer "+t.auth.bearer})),e.$Credentials=r.Middleware(r.$$Attr("credentials",(function(e){return t=e.credentials,""}))).and(r.$$Attr("credentials",(function(e){if(["same-origin","include"].indexOf(t)>-1)return t})))}).call(this)},6514:function(t,e){e.$$BundleLinkUrl=function(t){return function(e){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(e){return e.relation&&e.relation===t}))[0];return r&&r.url&&(n.url=r.url,n.data=null),e(n)}}}},4137:function(t){(function(){var e=function(t,e,n){var r=t[n];return r&&!e[n]&&(e[n]=r),t};t.exports=function(t,n){return function(r){return function(o){return e(t,o,"baseUrl"),e(t,o,"cache"),e(t,o,"auth"),e(t,o,"patient"),e(t,o,"debug"),e(t,o,"credentials"),e(t,o,"headers"),e(t,o,"agentOptions"),e(n,o,"defer"),e(n,o,"http"),r(o)}}}}).call(this)},300:function(t,e,n){(function(){var t=n(9181),r=function(t){return t.and=function(e){return r((n=t,o=e,function(t){return n(o(t))}));var n,o},t.end=function(e){return t(e)},t};e.$$Simple=function(t){return function(e){return function(n){return e(t(n))}}},e.$$Attr=function(e,n){return r((function(r){return function(o){var i;return i="function"==t.type(n)?n(o):n,r(null==i&&null==i?o:function(t,e,n){for(var r=e.split("."),o=t,i=0;i<r.length-1;i++){var u=r[i];(o=t[u])||(o={},t[u]=o)}return o[r[r.length-1]]=n,t}(o,e,i))}}))};var o=function(t,e){return r((function(n){return function(r){return r[t]=e(r),n(r)}}))};e.Middleware=r,e.Attribute=o,e.Method=function(t){return o("method",(e=t,function(){return e}));var e}}).call(this)},3018:function(t){t.exports=function(t){return function(e){try{return t(e)}catch(t){if(e.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack)),!e.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack),new Error("I need adapter.defer");var n=e.defer();return n.reject(t),n.promise}}}},2633:function(t,e,n){(function(){var t=n(9181);e.Http=function(t,e){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||e.http||t.http)(n);return n.debug&&r&&r.then&&r.then((function(t){console.log("\nDEBUG: (responce)",t)})),r}},e.$JsonData=function(e){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==t.type(r)||"array"==t.type(r)?JSON.stringify(r):r)),e(n)}}}).call(this)},4963:function(t,e,n){(function(){var t=n(300),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"];e.$WithPatient=t.$$Simple((function(t){var e=t.type;return t.patient&&("Patient"===e?(t.query=t.query||{},t.query._id=t.patient,t.id=t.patient):r.indexOf(e)>=0&&(t.query=t.query||{},t.query.patient=t.patient)),t}))}).call(this)},2941:function(t,e,n){(function(){var e=n(9181),r=/^#(.*)/,o=function(t){var n,o,i,u,a=t.cache,c=t.reference,s=t.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=t.resource,i=n.match(r)[1],(u=(o.contained||[]).filter((function(t){return(t.id||t._id)==i}))[0])&&{content:u}||null;var f=e.absoluteUrl(t.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(t){return t.id===f}))[0]||(null!=a?a[f]:void 0)||null};t.exports.sync=o,t.exports.resolve=function(t){return function(n){var i=o(n),u=n.reference,a=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return a.resolve(i),a.promise}if(!u)throw new Error("No reference found");if(u&&u.reference.match(r))throw new Error("Contained resource not found");return n.url=e.absoluteUrl(n.baseUrl,u.reference),n.data=null,t(n)}}}).call(this)},9999:function(t,e,n){(function(){var t=n(9181),r=t.type,o=t.assertArray,i=(t.assertObject,t.reduceMap),u=t.identity,a={$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(t,e){if("$sort"===t)return function(t){var e,n,i,u;for(o(t),i=[],e=0,n=t.length;e<n;e++)switch(u=t[e],r(u)){case"array":i.push({param:"_sort",value:u[0],modifier:":"+u[1]});break;case"string":i.push({param:"_sort",value:u});break;default:i.push(void 0)}return i}(e);if("$has"===t)return i(e,(function(t,e){var n,o;return n=e[0],o=e[1],t.concat(function(){switch(r(o)){case"array":return o.map((function(t){return{param:"_has",value:n+"="+t}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===t||"$revInclude"===t)return n=t,i(e,(function(t,e){var o,i;return o=e[0],i=e[1],t.concat(function(){switch(r(i)){case"array":return i.map((function(t){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+t}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,u,l;switch(r(e)){case"object":return u=t,i(l=e,(function(t,e){var n,i,f,h;return n=e[0],h=e[1],t.concat("$and"===n?o(h).reduce((function(t,e){return t.concat(s(u,e))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:u},"$or"===n?i.value=h:(a[n]&&(i.operator=a[n]),c[n]&&(i.modifier=c[n]),"object"===r(h)&&h.$or?i.value=h.$or:i.value=[h]),[i]):(l.$type&&(f=":"+l.$type),s(""+u+(f||"")+"."+n,h)))}));case"string":case"number":return[{param:t,value:[e]}];case"array":return[{param:t,value:[e.join("|")]}];default:throw"could not linearizeParams "+r(e)}},l=function(t){return i(t,(function(t,e){var n,r;return n=e[0],r=e[1],t.concat(s(n,r))}))},f=function(t){var e,n,r=["_include","_revinclude","_has"];return function(){var o,i,a,c;for(c=[],o=0,i=(a=l(t)).length;o<i;o++)e=a[o],n=-1===r.indexOf(e.param)?encodeURIComponent(e.value):e.value,c.push([e.param,e.modifier,"_has"==e.param?":":"=",e.operator,n].filter(u).join(""));return c}().join("&")};e._query=l,e.query=f;var h=n(300);e.$SearchParams=h.$$Attr("url",(function(t){var e=t.url;return t.query?e+"?"+f(t.query):e})),e.$Paging=function(t){return function(e){var n=e.params||{};return e.since&&(n._since=e.since),e.count&&(n._count=e.count),e.params=n,t(e)}}}).call(this)},3575:function(t,e,n){(function(){n(9181);var t=n(300),r=function(e,n){var o=function(t){return n&&e.includes("target.versionId")&&!t.target.versionId?n(t):(n&&n(t)+"/"||"")+function(t,e){var n,r,o=(r=e,0==(n=t.trim()).indexOf(":")?function(t,e){for(var n,r=t.split("||").map((function(t){return t.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=e,r[o].split(".").reduce((function(t,e){return"versionId"===e&&t[e]?"_history/"+t[e]:null==t||null==t?null:t[e]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==t.includes("target.versionId"))throw new Error("Parameter "+t+" is required: "+JSON.stringify(e));return o}(e,t)},i=t.Attribute("url",o);return i.slash=function(t){return r(t,o)},i};e.Path=r}).call(this)},9181:function(t,e,n){(function(){var t=n(7202),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;e.trim=function(t){return t?t.toString().replace(r,""):""};var o=function(t){return null==t&&void 0===t?String(t):{"[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(t)]};e.type=o,e.assertArray=function(t){if("array"!==o(t))throw"not array";return t};var i=function(t){if("object"!==o(t))throw"not object";return t};e.assertObject=i;var u=function(t,e,n){var r,o;return n||(n=[]),i(t),function(){var e;for(r in e=[],t)o=t[r],e.push([r,o]);return e}().reduce(e,n)};e.reduceMap=u,e.identity=function(t){return t};var a=function(){return Array.prototype.slice.call(arguments)};e.argsArray=a,e.mergeLists=function(){var e;return e=function(e,n){var r,o,i;for(r in o=t(!0,e),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},a.apply(null,arguments).reduce(e,{})},e.absoluteUrl=function(t,e){return e.match(/https?:\/\/./)?e:t+"/"+e},e.relativeUrl=function(t,e){return e.slice(e,t.length+1)===t+"/"?e.slice(t.length+1):e},e.resourceIdToUrl=function(t,e,n){return e=e.replace(/\/$/,""),(t=t.replace(/^\//,"")).indexOf("/")<0?e+"/"+n+"/"+t:0!==t.indexOf(e)?e+"/"+t:t};var c=function(t,e,n,r){var i;switch(o(n)){case"array":return e(n.map((function(e){return t(e,[n,r])})),r);case"object":return i=function(e,o){var i,u;return i=o[0],u=o[1],e[i]=t(u,[n].concat(r)),e},e(u(n,i,{}),r);default:return e(n,r)}};e.walk=c;var s=function(t,e,n){return e?c(s(t),t,e,n):function(e,n){return s(t,e,n)}};e.postwalk=s}).call(this)},7435:function(t,e,n){var r,o=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t=n.nmd(t);var i=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};(function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},d=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},p=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?H(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},j=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:rt},E=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,W(t)+1).replace(Gt,""):t},I=function(t){return function(e){return t(e)}},R=function(t,e){return v(e,(function(e){return t[e]}))},D=function(t,e){return t.has(e)},M=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},L=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},B=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},N=function(t){return"\\"+He[t]},$=function(t){return Ne.test(t)},U=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},F=function(t,e){return function(n){return t(e(n))}},K=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Q||(t[n]=Q,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1},V=function(t){return $(t)?G(t):cn(t)},q=function(t){return $(t)?Z(t):t.split("")},W=function(t){for(var e=t.length;e--&&Zt.test(t.charAt(e)););return e},G=function(t){for(var e=Le.lastIndex=0;Le.test(t);)++e;return e},Z=function(t){return t.match(Le)||[]},J="Expected a function",Y="__lodash_hash_undefined__",Q="__lodash_placeholder__",X=32,tt=128,et=1/0,nt=9007199254740991,rt=NaN,ot=4294967295,it=[["ary",tt],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",X],["partialRight",64],["rearg",256]],ut="[object Arguments]",at="[object Array]",ct="[object Boolean]",st="[object Date]",lt="[object Error]",ft="[object Function]",ht="[object GeneratorFunction]",dt="[object Map]",pt="[object Number]",vt="[object Object]",yt="[object Promise]",gt="[object RegExp]",mt="[object Set]",bt="[object String]",wt="[object Symbol]",_t="[object WeakMap]",St="[object ArrayBuffer]",xt="[object DataView]",Ot="[object Float32Array]",jt="[object Float64Array]",Et="[object Int8Array]",kt="[object Int16Array]",At="[object Int32Array]",Ct="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Tt="[object Uint16Array]",It="[object Uint32Array]",Rt=/\b__p \+= '';/g,Dt=/\b(__p \+=) '' \+/g,Mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lt=/&(?:amp|lt|gt|quot|#39);/g,Bt=/[&<>"']/g,Nt=RegExp(Lt.source),$t=RegExp(Bt.source),Ut=/<%-([\s\S]+?)%>/g,Ft=/<%([\s\S]+?)%>/g,Kt=/<%=([\s\S]+?)%>/g,zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ht=/^\w*$/,Vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(qt.source),Gt=/^\s+/,Zt=/\s/,Jt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Yt=/\{\n\/\* \[wrapped with (.+)\] \*/,Qt=/,? & /,Xt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ue=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="a-z\\xdf-\\xf6\\xf8-\\xff",pe="A-Z\\xc0-\\xd6\\xd8-\\xde",ve="\\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",ye="["+ve+"]",ge="["+he+"]",me="\\d+",be="["+de+"]",we="[^\ud800-\udfff"+ve+me+"\\u2700-\\u27bf"+de+pe+"]",_e="[^\ud800-\udfff]",Se="(?:\ud83c[\udde6-\uddff]){2}",xe="[\ud800-\udbff][\udc00-\udfff]",Oe="["+pe+"]",je="(?:"+be+"|"+we+")",Ee="(?:"+Oe+"|"+we+")",ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ae="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ce="(?:"+ge+"|\ud83c[\udffb-\udfff])?",Pe="[\\ufe0e\\ufe0f]?",Te=Pe+Ce+"(?:\\u200d(?:"+[_e,Se,xe].join("|")+")"+Pe+Ce+")*",Ie="(?:"+["[\\u2700-\\u27bf]",Se,xe].join("|")+")"+Te,Re="(?:"+[_e+ge+"?",ge,Se,xe,"[\ud800-\udfff]"].join("|")+")",De=RegExp("['’]","g"),Me=RegExp(ge,"g"),Le=RegExp("\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|"+Re+Te,"g"),Be=RegExp([Oe+"?"+be+"+"+ke+"(?="+[ye,Oe,"$"].join("|")+")",Ee+"+"+Ae+"(?="+[ye,Oe+je,"$"].join("|")+")",Oe+"?"+je+"+"+ke,Oe+"+"+Ae,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ie].join("|"),"g"),Ne=RegExp("[\\u200d\ud800-\udfff"+he+"\\ufe0e\\ufe0f]"),$e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ue=["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"],Fe=-1,Ke={};Ke[Ot]=Ke[jt]=Ke[Et]=Ke[kt]=Ke[At]=Ke[Ct]=Ke[Pt]=Ke[Tt]=Ke[It]=!0,Ke[ut]=Ke[at]=Ke[St]=Ke[ct]=Ke[xt]=Ke[st]=Ke[lt]=Ke[ft]=Ke[dt]=Ke[pt]=Ke[vt]=Ke[gt]=Ke[mt]=Ke[bt]=Ke[_t]=!1;var ze={};ze[ut]=ze[at]=ze[St]=ze[xt]=ze[ct]=ze[st]=ze[Ot]=ze[jt]=ze[Et]=ze[kt]=ze[At]=ze[dt]=ze[pt]=ze[vt]=ze[gt]=ze[mt]=ze[bt]=ze[wt]=ze[Ct]=ze[Pt]=ze[Tt]=ze[It]=!0,ze[lt]=ze[ft]=ze[_t]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,qe=parseInt,We="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ze=We||Ge||Function("return this")(),Je=e&&!e.nodeType&&e,Ye=Je&&t&&!t.nodeType&&t,Qe=Ye&&Ye.exports===Je,Xe=Qe&&We.process,tn=function(){try{return Ye&&Ye.require&&Ye.require("util").types||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),en=tn&&tn.isArrayBuffer,nn=tn&&tn.isDate,rn=tn&&tn.isMap,on=tn&&tn.isRegExp,un=tn&&tn.isSet,an=tn&&tn.isTypedArray,cn=E("length"),sn=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"}),ln=k({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),fn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hn=function t(e){var n,r,k=function(t){if(Bo(t)&&!Na(t)&&!o(t,Z)){if(o(t,G))return t;if(Ei.call(t,"__wrapped__"))return so(t)}return new G(t)},H=function(){},G=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},Z=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]},Zt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new de;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Na(t),r=!n&&Ba(t),o=!n&&!r&&Ua(t),i=!n&&!r&&!o&&Va(t),u=n||r||o||i,a=u?P(t.length,bi):[],c=a.length;for(var s in t)!e&&!Ei.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Kr(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return io(ir(t),ke(e,0,t.length))},be=function(t){return io(ir(t))},we=function(t,e,n){(n!==u&&!Co(t[e],n)||n===u&&!(e in t))&&je(t,e,n)},_e=function(t,e,n){var r=t[e];Ei.call(t,e)&&Co(r,n)&&(n!==u||e in t)||je(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(Co(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return ju(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ur(e,Yo(e),t)},je=function(t,e,n){"__proto__"==e&&Hi?Hi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Ee=function(t,e){for(var n=-1,r=e.length,o=hi(r),i=null==t;++n<r;)o[n]=i?u:Zo(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=gi(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new wi(J);return Zu((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=d,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=p,u=!1):e.length>=200&&(i=D,u=!1,e=new pe(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return ju(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Ie=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Fo(a):n(a,c)))var c=a,s=i}return s},Re=function(t,e){var n=[];return ju(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Le=function(t,e){return t&&Au(t,e,Yo)},Ne=function(t,e){return t&&Cu(t,e,Yo)},He=function(t,e){return h(e,(function(e){return Ro(t[e])}))},We=function(t,e){for(var n=0,r=(e=Jn(e,t)).length;null!=t&&n<r;)t=t[uo(e[n++])];return n&&n==r?t:u},Ge=function(t,e,n){var r=e(t);return Na(t)?r:y(r,n(t))},Je=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":zi&&zi in gi(t)?Nr(t):Qr(t)},Ye=function(t,e){return t>e},Xe=function(t,e){return null!=t&&Ei.call(t,e)},tn=function(t,e){return null!=t&&e in gi(t)},cn=function(t,e,n){for(var r=n?p:d,o=t[0].length,i=t.length,a=i,c=hi(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=nu(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new pe(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?D(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?D(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},dn=function(t,e,n){e=Jn(e,t);var r=null==(t=to(t,e))?t:t[uo(vo(e))];return null==r?u:a(r,t,n)},pn=function(t){return Bo(t)&&Je(t)==ut},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=gi(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var d=r(l,f,s,t,e,h);if(!(d===u?Pu(f,l,3,r,h):d))return!1}}return!0},yn=function(t){return!(!Lo(t)||Wr(t))&&(Ro(t)?Ii:ue).test(ao(t))},gn=function(t){return"function"==typeof t?t:null==t?ii:"object"==typeof t?Na(t)?Sn(t[0],t[1]):_n(t):si(t)},mn=function(t){if(!Gr(t))return tu(t);var e=[];for(var n in gi(t))Ei.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=Po(t)?hi(t.length):[];return ju(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Lr(t);return 1==e.length&&e[0][2]?Jr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Hr(t)&&Zr(e)?Jr(uo(t),e):function(n){var r=Zo(n,t);return r===u&&r===e?Jo(n,t):Pu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Kr(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Na(t)?function(e){return We(e,1===t.length?t[0]:t)}:t})):[ii];var r=-1;return e=v(e,I(Dr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return nr(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},jn=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=We(t,u);n(a,u)&&Rn(i,Jn(u,t),a)}return i},En=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=ir(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Ui.call(a,c,1),Ui.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Kr(o)?Ui.call(t,o,1):Kn(t,o)}}return t},An=function(t,e){return t+Zi(iu()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>nt)return n;do{e%2&&(n+=t),(e=Zi(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return Ju(Xr(t,e,ii),t+"")},Tn=function(t){return ge(ti(t))},In=function(t,e){var n=ti(t);return io(n,ke(e,0,n.length))},Rn=function(t,e,n,r){if(!Lo(t))return t;for(var o=-1,i=(e=Jn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=uo(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Lo(f)?f:Kr(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Dn=function(t){return io(ti(t))},Mn=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=hi(o);++r<o;)i[r]=t[r+e];return i},Ln=function(t,e){var n;return ju(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Bn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Fo(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Nn(t,e,ii,n)},Nn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Fo(e),l=e===u;o<i;){var f=Zi((o+i)/2),h=n(t[f]),d=h!==u,p=null===h,v=h==h,y=Fo(h);if(a)var g=r||v;else g=l?v&&(r||d):c?v&&d&&(r||!p):s?v&&d&&!p&&(r||!y):!p&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return nu(i,4294967294)},$n=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Co(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Un=function(t){return"number"==typeof t?t:Fo(t)?rt:+t},Fn=function(t,e,n){var r=-1,o=d,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=p;else if(i>=200){var s=e?null:Nu(t);if(s)return z(s);u=!1,o=D,c=new pe}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},Kn=function(t,e){return e=Jn(e,t),null==(t=to(t,e))||delete t[uo(vo(e))]},zn=function(t,e,n,r){return Rn(t,e,n(We(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Mn(t,r?0:i,r?i+1:o):Mn(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return o(n,Z)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Fn(t[0]):[];for(var o=-1,i=hi(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Fn(ku(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return To(t)?t:[]},Zn=function(t){return"function"==typeof t?t:ii},Jn=function(t,e){return Na(t)?t:Hr(t,e)?[t]:Yu(Go(t))},Yn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Mn(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Li?Li(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Mi(e).set(new Mi(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Fo(t),a=e!==u,c=null===e,s=e==e,l=Fo(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=eu(i-u,0),l=hi(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},or=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=eu(i-a,0),f=hi(l+s),h=!r;++o<l;)f[o]=t[o];for(var d=o;++c<s;)f[d+c]=e[c];for(;++u<a;)(h||o<i)&&(f[d+n[u]]=t[o++]);return f},ir=function(t,e){var n=-1,r=t.length;for(e||(e=hi(r));++n<r;)e[n]=t[n];return e},ur=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?je(n,c,s):_e(n,c,s)}return n},ar=function(t,e){return function(n,r){var o=Na(n)?c:xe,i=e?e():{};return o(n,t,Dr(r,2),i)}},cr=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&zr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=gi(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},sr=function(t,e){return function(n,r){if(null==n)return n;if(!Po(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=gi(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},lr=function(t){return function(e,n,r){for(var o=-1,i=gi(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},fr=function(t){return function(e){e=Go(e);var n=$(e)?q(e):u,r=n?n[0]:e.charAt(0),o=n?Yn(n,1).join(""):e.slice(1);return r[t]()+o}},hr=function(t){return function(e){return g(ri(ni(e).replace(De,"")),t,"")}},dr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=xu(t.prototype),r=t.apply(n,e);return Lo(r)?r:n}},pr=function(t){return function(e,n,r){var o=gi(e);if(!Po(e)){var i=Dr(n,3);e=Yo(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},vr=function(t){return Cr((function(e){var n=e.length,r=n,o=G.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new wi(J);if(o&&!a&&"wrapper"==Ir(i))var a=new G([],!0)}for(r=a?r:n;++r<n;){i=e[r];var c=Ir(i),s="wrapper"==c?Uu(i):u;a=s&&qr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Ir(s[0])].apply(a,s[3]):1==i.length&&qr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Na(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},yr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},Le(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},gr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=Du(n),r=Du(r)):(n=Un(n),r=Un(r)),o=t(n,r)}return o}},mr=function(t){return Cr((function(e){return e=v(e,I(Dr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},br=function(t,e){var n=(e=e===u?" ":Du(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Gi(t/V(e)));return $(e)?Yn(q(r),0,t).join(""):r.slice(0,t)},wr=function(t){return function(e,n,r){return r&&"number"!=typeof r&&zr(e,n,r)&&(n=r=u),e=zo(e),n===u?(n=e,e=0):n=zo(n),function(t,e,n,r){for(var o=-1,i=eu(Gi((e-t)/(n||1)),0),u=hi(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:zo(r),t)}},_r=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=qo(e),n=qo(n)),t(e,n)}},Sr=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?X:64,4&(e&=~(f?64:X))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],d=n.apply(u,h);return qr(t)&&Gu(d,h),d.placeholder=r,ro(d,t,e)},xr=function(t){var e=yi[t];return function(t,n){if(t=qo(t),(n=null==n?0:nu(Ho(n),292))&&Qi(t)){var r=(Go(t)+"e").split("e"),o=e(r[0]+"e"+(+r[1]+n));return+((r=(Go(o)+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},Or=function(t){return function(e){var n,r,o=zu(e);return o==dt?U(e):o==mt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},jr=function(t,e,n,r,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new wi(J);var h=r?r.length:0;if(h||(e&=-97,r=i=u),s=s===u?s:eu(Ho(s),0),l=l===u?l:Ho(l),h-=i?i.length:0,64&e){var d=r,p=i;r=i=u}var v,y,g,m,b=f?u:Uu(t),w=[t,e,n,r,i,d,p,c,s,l];if(b&&Yr(w,b),t=w[0],e=w[1],n=w[2],r=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:eu(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=dr(v=t),function t(){for(var e=arguments.length,n=hi(e),r=e,i=Rr(t);r--;)n[r]=arguments[r];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:K(n,i);if((e-=c.length)<g)return Sr(v,y,Bu,t.placeholder,u,n,c,u,u,g-e);var s=this&&this!==Ze&&o(this,t)?m:v;return a(s,this,n)}):e!=X&&33!=e||i.length?Bu.apply(u,w):function(t,e,n,r){var i=1&e,u=dr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=r.length,h=hi(f+s),d=this&&this!==Ze&&o(this,e)?u:t;++l<f;)h[l]=r[l];for(;s--;)h[l++]=arguments[++c];return a(d,i?n:this,h)}}(t,e,n,r);else var _=function(t,e,n){var r=1&e,i=dr(t);return function e(){return(this&&this!==Ze&&o(this,e)?i:t).apply(r?n:this,arguments)}}(t,e,n);return ro((b?Iu:Gu)(_,w),t,e)},Er=function(t,e,n,r){return t===u||Co(t,xi[n])&&!Ei.call(r,n)?e:t},kr=function(t){return $o(t)?u:t},Ar=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new pe:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;d=!1;break}if(p){if(!b(e,(function(t,e){if(!D(p,e)&&(v===t||o(v,t,n,r,i)))return p.push(e)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Cr=function(t){return Ju(Xr(t,u,ho),t+"")},Pr=function(t){return Ge(t,Yo,Fu)},Tr=function(t){return Ge(t,Qo,Ku)},Ir=function(t){for(var e=t.name+"",n=pu[e],r=Ei.call(pu,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Rr=function(t){return(Ei.call(k,"placeholder")?k:t).placeholder},Dr=function(){var t=k.iteratee||ui;return t=t===ui?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Mr=function(t,e){var n=t.__data__;return Vr(e)?n["string"==typeof e?"string":"hash"]:n.map},Lr=function(t){for(var e=Yo(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zr(o)]}return e},Br=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Nr=function(t){var e=Ei.call(t,zi),n=t[zi];try{t[zi]=u;var r=!0}catch(t){}var o=Ci.call(t);return r&&(e?t[zi]=n:delete t[zi]),o},$r=function(t,e,n){for(var r=-1,o=(e=Jn(e,t)).length,i=!1;++r<o;){var u=uo(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Mo(o)&&Kr(u,o)&&(Na(t)||Ba(t))},Ur=function(t){return"function"!=typeof t.constructor||Gr(t)?{}:xu(Bi(t))},Fr=function(t){return Na(t)||Ba(t)||!!(Fi&&t&&t[Fi])},Kr=function(t,e){var n=void 0===t?"undefined":i(t);return!!(e=null==e?nt:e)&&("number"==n||"symbol"!=n&&ce.test(t))&&t>-1&&t%1==0&&t<e},zr=function(t,e,n){if(!Lo(n))return!1;var r=void 0===e?"undefined":i(e);return!!("number"==r?Po(n)&&Kr(e,n.length):"string"==r&&e in n)&&Co(n[e],t)},Hr=function(t,e){if(Na(t))return!1;var n=void 0===t?"undefined":i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Fo(t))||Ht.test(t)||!zt.test(t)||null!=e&&t in gi(e)},Vr=function(t){var e=void 0===t?"undefined":i(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},qr=function(t){var e=Ir(t),n=k[e];if("function"!=typeof n||!(e in Z.prototype))return!1;if(t===n)return!0;var r=Uu(n);return!!r&&t===r[0]},Wr=function(t){return!!Ai&&Ai in t},Gr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xi)},Zr=function(t){return t==t&&!Lo(t)},Jr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in gi(n))}},Yr=function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==tt&&8==n||r==tt&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?rr(c,a,e[4]):a,t[4]=c?K(t[3],Q):e[4]}return(a=e[5])&&(c=t[5],t[5]=c?or(c,a,e[6]):a,t[6]=c?K(t[5],Q):e[6]),(a=e[7])&&(t[7]=a),r&tt&&(t[8]=null==t[8]?e[8]:nu(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t},Qr=function(t){return Ci.call(t)},Xr=function(t,e,n){return e=eu(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=eu(r.length-e,0),u=hi(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=hi(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},to=function(t,e){return e.length<2?t:We(t,Mn(e,0,-1))},eo=function(t,e){for(var n=t.length,r=nu(e.length,n),o=ir(t);r--;){var i=e[r];t[r]=Kr(i,n)?o[i]:u}return t},no=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},ro=function(t,e,n){var r,o=e+"";return Ju(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Jt,"{\n/* [wrapped with "+e+"] */\n")}(o,co((r=o.match(Yt))?r[1].split(Qt):[],n)))},oo=function(t){var e=0,n=0;return function(){var r=ru(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},io=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},uo=function(t){if("string"==typeof t||Fo(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},ao=function(t){if(null!=t){try{return ji.call(t)}catch(t){}try{return t+""}catch(t){}}return""},co=function(t,e){return s(it,(function(n){var r="_."+n[0];e&n[1]&&!d(t,r)&&t.push(r)})),t.sort()},so=function(t){if(o(t,Z))return t.clone();var e=new G(t.__wrapped__,t.__chain__);return e.__actions__=ir(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},lo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),_(t,Dr(e,3),o)},fo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=Ho(n),o=n<0?eu(r+o,0):nu(o,r-1)),_(t,Dr(e,3),o,!0)},ho=function(t){return null!=t&&t.length?ku(t,1):[]},po=function(t){return t&&t.length?t[0]:u},vo=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},yo=function(t,e){return t&&t.length&&e&&e.length?En(t,e):t},go=function(t){return null==t?t:uu.call(t)},mo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(To(t))return e=eu(t.length,e),!0})),P(e,(function(e){return v(t,E(e))}))},bo=function(t,e){if(!t||!t.length)return[];var n=mo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},wo=function(t){var e=k(t);return e.__chain__=!0,e},_o=function(t,e){return e(t)},So=function(t,e){return(Na(t)?s:ju)(t,Dr(e,3))},xo=function(t,e){return(Na(t)?l:Eu)(t,Dr(e,3))},Oo=function(t,e){return(Na(t)?v:wn)(t,Dr(e,3))},jo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,jr(t,tt,u,u,u,u,e)},Eo=function(t,e){var n;if("function"!=typeof e)throw new wi(J);return t=Ho(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},ko=function(t,e,n){var r,o,i,a,c,s,l=function(e){var n=r,i=o;return r=o=u,v=e,a=t.apply(i,n)},f=function(t){return v=t,c=Zu(b,e),y?l(t):a},h=function(t){var n=t-s;return s===u||n>=e||n<0||g&&t-v>=i},d=function(t){return c=u,m&&r?l(t):(r=o=u,a)},p=function(){var t=Oa(),n=h(t);if(r=arguments,o=this,s=t,n){if(c===u)return f(s);if(g)return Lu(c),c=Zu(b,e),l(s)}return c===u&&(c=Zu(b,e)),a},v=0,y=!1,g=!1,m=!0;if("function"!=typeof t)throw new wi(J);function b(){var t,n,r=Oa();if(h(r))return d(r);c=Zu(b,(n=e-((t=r)-s),g?nu(n,i-(t-v)):n))}return e=qo(e)||0,Lo(n)&&(y=!!n.leading,i=(g="maxWait"in n)?eu(qo(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m),p.cancel=function(){c!==u&&Lu(c),v=0,r=s=o=c=u},p.flush=function(){return c===u?a:d(Oa())},p},Ao=function(t){if("function"!=typeof t)throw new wi(J);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},Co=function(t,e){return t===e||t!=t&&e!=e},Po=function(t){return null!=t&&Mo(t.length)&&!Ro(t)},To=function(t){return Bo(t)&&Po(t)},Io=function(t){if(!Bo(t))return!1;var e=Je(t);return e==lt||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!$o(t)},Ro=function(t){if(!Lo(t))return!1;var e=Je(t);return e==ft||e==ht||"[object AsyncFunction]"==e||"[object Proxy]"==e},Do=function(t){return"number"==typeof t&&t==Ho(t)},Mo=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=nt},Lo=function(t){var e=void 0===t?"undefined":i(t);return null!=t&&("object"==e||"function"==e)},Bo=function(t){return null!=t&&"object"==typeof t},No=function(t){return"number"==typeof t||Bo(t)&&Je(t)==pt},$o=function(t){if(!Bo(t)||Je(t)!=vt)return!1;var e=Bi(t);if(null===e)return!0;var n=Ei.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o(n,n)&&ji.call(n)==Pi},Uo=function(t){return"string"==typeof t||!Na(t)&&Bo(t)&&Je(t)==bt},Fo=function(t){return"symbol"==(void 0===t?"undefined":i(t))||Bo(t)&&Je(t)==wt},Ko=function(t){if(!t)return[];if(Po(t))return Uo(t)?q(t):ir(t);if(Ki&&t[Ki])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ki]());var e=zu(t);return(e==dt?U:e==mt?z:ti)(t)},zo=function(t){return t?(t=qo(t))===et||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Ho=function(t){var e=zo(t),n=e%1;return e==e?n?e-n:e:0},Vo=function(t){return t?ke(Ho(t),0,ot):0},qo=function(t){if("number"==typeof t)return t;if(Fo(t))return rt;if(Lo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Lo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ie.test(t);return n||ae.test(t)?qe(t.slice(2),n?2:8):oe.test(t)?rt:+t},Wo=function(t){return ur(t,Qo(t))},Go=function(t){return null==t?"":Du(t)},Zo=function(t,e,n){var r=null==t?u:We(t,e);return r===u?n:r},Jo=function(t,e){return null!=t&&$r(t,e,tn)},Yo=function(t){return Po(t)?ye(t):mn(t)},Qo=function(t){return Po(t)?ye(t,!0):function(t){if(!Lo(t))return function(t){var e=[];if(null!=t)for(var n in gi(t))e.push(n);return e}(t);var e=Gr(t),n=[];for(var r in t)("constructor"!=r||!e&&Ei.call(t,r))&&n.push(r);return n}(t)},Xo=function(t,e){if(null==t)return{};var n=v(Tr(t),(function(t){return[t]}));return e=Dr(e),jn(t,n,(function(t,n){return e(t,n[0])}))},ti=function(t){return null==t?[]:R(t,Yo(t))},ei=function(t){return gc(Go(t).toLowerCase())},ni=function(t){return(t=Go(t))&&t.replace(se,sn).replace(Me,"")},ri=function(t,e,n){return t=Go(t),(e=n?u:e)===u?(r=t,$e.test(r)?function(t){return t.match(Be)||[]}(t):function(t){return t.match(Xt)||[]}(t)):t.match(e)||[];var r},oi=function(t){return function(){return t}},ii=function(t){return t},ui=function(t){return gn("function"==typeof t?t:Ou(t,1))},ai=function(t,e,n){var r=Yo(e),o=He(e,r);null!=n||Lo(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=He(e,Yo(e)));var i=!(Lo(n)&&"chain"in n&&!n.chain),u=Ro(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=ir(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ci=function(){},si=function(t){return Hr(t)?E(uo(t)):(e=t,function(t){return We(t,e)});var e},li=function(){return[]},fi=function(){return!1},hi=(e=null==e?Ze:hn.defaults(Ze.Object(),e,hn.pick(Ze,Ue))).Array,di=e.Date,pi=e.Error,vi=e.Function,yi=e.Math,gi=e.Object,mi=e.RegExp,bi=e.String,wi=e.TypeError,_i=hi.prototype,Si=vi.prototype,xi=gi.prototype,Oi=e["__core-js_shared__"],ji=Si.toString,Ei=xi.hasOwnProperty,ki=0,Ai=(n=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ci=xi.toString,Pi=ji.call(gi),Ti=Ze._,Ii=mi("^"+ji.call(Ei).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Qe?e.Buffer:u,Di=e.Symbol,Mi=e.Uint8Array,Li=Ri?Ri.allocUnsafe:u,Bi=F(gi.getPrototypeOf,gi),Ni=gi.create,$i=xi.propertyIsEnumerable,Ui=_i.splice,Fi=Di?Di.isConcatSpreadable:u,Ki=Di?Di.iterator:u,zi=Di?Di.toStringTag:u,Hi=function(){try{var t=Br(gi,"defineProperty");return t({},"",{}),t}catch(t){}}(),Vi=e.clearTimeout!==Ze.clearTimeout&&e.clearTimeout,qi=di&&di.now!==Ze.Date.now&&di.now,Wi=e.setTimeout!==Ze.setTimeout&&e.setTimeout,Gi=yi.ceil,Zi=yi.floor,Ji=gi.getOwnPropertySymbols,Yi=Ri?Ri.isBuffer:u,Qi=e.isFinite,Xi=_i.join,tu=F(gi.keys,gi),eu=yi.max,nu=yi.min,ru=di.now,ou=e.parseInt,iu=yi.random,uu=_i.reverse,au=Br(e,"DataView"),cu=Br(e,"Map"),su=Br(e,"Promise"),lu=Br(e,"Set"),fu=Br(e,"WeakMap"),hu=Br(gi,"create"),du=fu&&new fu,pu={},vu=ao(au),yu=ao(cu),gu=ao(su),mu=ao(lu),bu=ao(fu),wu=Di?Di.prototype:u,_u=wu?wu.valueOf:u,Su=wu?wu.toString:u,xu=(r=function(){},function(t){if(!Lo(t))return{};if(Ni)return Ni(t);r.prototype=t;var e=new r;return r.prototype=u,e});function Ou(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Lo(t))return t;var h,d,p,v=Na(t);if(v){if(d=(h=t).length,p=new h.constructor(d),d&&"string"==typeof h[0]&&Ei.call(h,"index")&&(p.index=h.index,p.input=h.input),a=p,!c)return ir(t,a)}else{var y=zu(t),g=y==ft||y==ht;if(Ua(t))return Qn(t,c);if(y==vt||y==ut||g&&!o){if(a=l||g?{}:Ur(t),!c)return l?function(t,e){return ur(t,Ku(t),e)}(t,function(t,e){return t&&ur(e,Qo(e),t)}(a,t)):function(t,e){return ur(t,Fu(t),e)}(t,Oe(a,t))}else{if(!ze[y])return o?t:{};a=function(t,e,n){var r,o,i,u=t.constructor;switch(e){case St:return Xn(t);case ct:case st:return new u(+t);case xt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case Ot:case jt:case Et:case kt:case At:case Ct:case Pt:case Tt:case It:return tr(t,n);case dt:return new u;case pt:case bt:return new u(t);case gt:return(i=new(o=t).constructor(o.source,re.exec(o))).lastIndex=o.lastIndex,i;case mt:return new u;case wt:return r=t,_u?gi(_u.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Ha(t)?t.forEach((function(r){a.add(Ou(r,e,n,r,t,i))})):Ka(t)&&t.forEach((function(r,o){a.set(o,Ou(r,e,n,o,t,i))}));var b=v?u:(f?l?Tr:Pr:l?Qo:Yo)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,Ou(r,e,n,o,t,i))})),a}k.templateSettings={escape:Ut,evaluate:Ft,interpolate:Kt,variable:"",imports:{_:k}},(k.prototype=H.prototype).constructor=k,G.prototype=xu(H.prototype),G.prototype.constructor=G,Z.prototype=xu(H.prototype),Z.prototype.constructor=Z,Zt.prototype.clear=function(){this.__data__=hu?hu(null):{},this.size=0},Zt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Zt.prototype.get=function(t){var e=this.__data__;if(hu){var n=e[t];return n===Y?u:n}return Ei.call(e,t)?e[t]:u},Zt.prototype.has=function(t){var e=this.__data__;return hu?e[t]!==u:Ei.call(e,t)},Zt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hu&&e===u?Y:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Ui.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},de.prototype.clear=function(){this.size=0,this.__data__={hash:new Zt,map:new(cu||he),string:new Zt}},de.prototype.delete=function(t){var e=Mr(this,t).delete(t);return this.size-=e?1:0,e},de.prototype.get=function(t){return Mr(this,t).get(t)},de.prototype.has=function(t){return Mr(this,t).has(t)},de.prototype.set=function(t,e){var n=Mr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},pe.prototype.add=pe.prototype.push=function(t){return this.__data__.set(t,Y),this},pe.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(o(n,he)){var r=n.__data__;if(!cu||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new de(r)}return n.set(t,e),this.size=n.size,this};var ju=sr(Le),Eu=sr(Ne,!0);function ku(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Fr),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?ku(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var Au=lr(),Cu=lr(!0);function Pu(t,e,n,r,i){return t===e||(null==t||null==e||!Bo(t)&&!Bo(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var c=Na(t),s=Na(e),l=c?at:zu(t),f=s?at:zu(e),h=(l=l==ut?vt:l)==vt,d=(f=f==ut?vt:f)==vt,p=l==f;if(p&&Ua(t)){if(!Ua(e))return!1;c=!0,h=!1}if(p&&!h)return a||(a=new ve),c||Va(t)?Ar(t,e,n,r,i,a):function(t,e,n,r,o,i,u){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case St:return!(t.byteLength!=e.byteLength||!i(new Mi(t),new Mi(e)));case ct:case st:case pt:return Co(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case gt:case bt:return t==e+"";case dt:var a=U;case mt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ar(a(t),a(e),r,o,i,u);return u.delete(t),l;case wt:if(_u)return _u.call(t)==_u.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var v=h&&Ei.call(t,"__wrapped__"),y=d&&Ei.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,r,a)}}return!!p&&(a||(a=new ve),function(t,e,n,r,i,a){var c=1&n,s=Pr(t),l=s.length;if(l!=Pr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:Ei.call(e,h)))return!1}var d=a.get(t),p=a.get(e);if(d&&p)return d==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(r)var b=c?r(m,g,h,e,t,a):r(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,r,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&o(w,w)&&"function"==typeof _&&o(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,i,a))}(t,e,n,r,Pu,i))}function Tu(t,e,n,r,o){t!==e&&Au(e,(function(i,a){if(o||(o=new ve),Lo(i))!function(t,e,n,r,o,i,a){var c=no(t,n),s=no(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var d=Na(s),p=!d&&Ua(s),v=!d&&!p&&Va(s);f=s,d||p||v?Na(c)?f=c:To(c)?f=ir(c):p?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:$o(s)||Ba(s)?(f=c,Ba(c)?f=Wo(c):Lo(c)&&!Ro(c)||(f=Ur(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Tu,r,o);else{var c=r?r(no(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Qo)}var Iu=du?function(t,e){return du.set(t,e),t}:ii,Ru=Hi?function(t,e){return Hi(t,"toString",{configurable:!0,enumerable:!1,value:oi(e),writable:!0})}:ii;function Du(t){if("string"==typeof t)return t;if(Na(t))return v(t,Du)+"";if(Fo(t))return Su?Su.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Mu=Pn,Lu=Vi||function(t){return Ze.clearTimeout(t)};function Bu(t,e,n,r,i,a,c,s,l,f){var h=e&tt,d=1&e,p=2&e,v=24&e,y=512&e,g=p?u:dr(t);return function u(){for(var m=arguments.length,b=hi(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Rr(u),S=B(b,_);if(r&&(b=rr(b,r,i,v)),a&&(b=or(b,a,c,v)),m-=S,v&&m<f){var x=K(b,_);return Sr(t,e,Bu,u.placeholder,n,b,x,s,l,f-m)}var O=d?n:this,j=p?O[t]:t;return m=b.length,s?b=eo(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==Ze&&o(this,u)&&(j=g||dr(j)),j.apply(O,b)}}var Nu=lu&&1/z(new lu([,-0]))[1]==et?function(t){return new lu(t)}:ci;function $u(t,e,n,r,o,i){return Lo(t)&&Lo(e)&&(i.set(e,t),Tu(t,e,u,$u,i),i.delete(e)),t}var Uu=du?function(t){return du.get(t)}:ci,Fu=Ji?function(t){return null==t?[]:(t=gi(t),h(Ji(t),(function(e){return $i.call(t,e)})))}:li,Ku=Ji?function(t){for(var e=[];t;)y(e,Fu(t)),t=Bi(t);return e}:li,zu=Je;(au&&zu(new au(new ArrayBuffer(1)))!=xt||cu&&zu(new cu)!=dt||su&&zu(su.resolve())!=yt||lu&&zu(new lu)!=mt||fu&&zu(new fu)!=_t)&&(zu=function(t){var e=Je(t),n=e==vt?t.constructor:u,r=n?ao(n):"";if(r)switch(r){case vu:return xt;case yu:return dt;case gu:return yt;case mu:return mt;case bu:return _t}return e});var Hu,Vu,qu,Wu=Oi?Ro:fi,Gu=oo(Iu),Zu=Wi||function(t,e){return Ze.setTimeout(t,e)},Ju=oo(Ru),Yu=(Hu=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Vt,(function(t,n,r,o){e.push(r?o.replace(ee,"$1"):n||t)})),e},Vu=Ca(Hu,(function(t){return 500===qu.size&&qu.clear(),t})),qu=Vu.cache,Vu),Qu=Pn((function(t,e){return To(t)?Pe(t,ku(e,1,To,!0)):[]})),Xu=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),Dr(n,2)):[]})),ta=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),u,n):[]})),ea=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?cn(e):[]})),na=Pn((function(t){var e=vo(t),n=v(t,Gn);return e===vo(n)?e=u:n.pop(),n.length&&n[0]===t[0]?cn(n,Dr(e,2)):[]})),ra=Pn((function(t){var e=vo(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?cn(n,u,e):[]})),oa=Pn(yo),ia=Cr((function(t,e){var n=null==t?0:t.length,r=Ee(t,e);return kn(t,v(e,(function(t){return Kr(t,n)?+t:t})).sort(er)),r})),ua=Pn((function(t){return Fn(ku(t,1,To,!0))})),aa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),Fn(ku(t,1,To,!0),Dr(e,2))})),ca=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,Fn(ku(t,1,To,!0),u,e)})),sa=Pn((function(t,e){return To(t)?Pe(t,e):[]})),la=Pn((function(t){return qn(h(t,To))})),fa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),qn(h(t,To),Dr(e,2))})),ha=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,qn(h(t,To),u,e)})),da=Pn(mo),pa=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,bo(t,n)})),va=Cr((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ee(e,t)};return e>1||this.__actions__.length||!o(r,Z)||!Kr(n)?this.thru(i):((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:_o,args:[i],thisArg:u}),new G(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ya=ar((function(t,e,n){Ei.call(t,n)?++t[n]:je(t,n,1)})),ga=pr(lo),ma=pr(fo),ba=ar((function(t,e,n){Ei.call(t,n)?t[n].push(e):je(t,n,[e])})),wa=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=Po(t)?hi(t.length):[];return ju(t,(function(t){i[++r]=o?a(e,t,n):dn(t,e,n)})),i})),_a=ar((function(t,e,n){je(t,n,e)})),Sa=ar((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),xa=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&zr(t,e[0],e[1])?e=[]:n>2&&zr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,ku(e,1),[])})),Oa=qi||function(){return Ze.Date.now()},ja=Pn((function(t,e,n){var r=1;if(n.length){var o=K(n,Rr(ja));r|=X}return jr(t,r,e,n,o)})),Ea=Pn((function(t,e,n){var r=3;if(n.length){var o=K(n,Rr(Ea));r|=X}return jr(e,r,t,n,o)})),ka=Pn((function(t,e){return Ce(t,1,e)})),Aa=Pn((function(t,e,n){return Ce(t,qo(e)||0,n)}));function Ca(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new wi(J);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Ca.Cache||de),n}Ca.Cache=de;var Pa,Ta=Mu((function(t,e){var n=(e=1==e.length&&Na(e[0])?v(e[0],I(Dr())):v(ku(e,1),I(Dr()))).length;return Pn((function(r){for(var o=-1,i=nu(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Ia=Pn((function(t,e){var n=K(e,Rr(Ia));return jr(t,X,u,e,n)})),Ra=Pn((function(t,e){var n=K(e,Rr(Ra));return jr(t,64,u,e,n)})),Da=Cr((function(t,e){return jr(t,256,u,u,u,e)})),Ma=_r(Ye),La=_r((function(t,e){return t>=e})),Ba=pn(function(){return arguments}())?pn:function(t){return Bo(t)&&Ei.call(t,"callee")&&!$i.call(t,"callee")},Na=hi.isArray,$a=en?I(en):function(t){return Bo(t)&&Je(t)==St},Ua=Yi||fi,Fa=nn?I(nn):function(t){return Bo(t)&&Je(t)==st},Ka=rn?I(rn):function(t){return Bo(t)&&zu(t)==dt},za=on?I(on):function(t){return Bo(t)&&Je(t)==gt},Ha=un?I(un):function(t){return Bo(t)&&zu(t)==mt},Va=an?I(an):function(t){return Bo(t)&&Mo(t.length)&&!!Ke[Je(t)]},qa=_r(bn),Wa=_r((function(t,e){return t<=e})),Ga=cr((function(t,e){if(Gr(e)||Po(e))ur(e,Yo(e),t);else for(var n in e)Ei.call(e,n)&&_e(t,n,e[n])})),Za=cr((function(t,e){ur(e,Qo(e),t)})),Ja=cr((function(t,e,n,r){ur(e,Qo(e),t,r)})),Ya=cr((function(t,e,n,r){ur(e,Yo(e),t,r)})),Qa=Cr(Ee),Xa=Pn((function(t,e){t=gi(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&zr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Qo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||Co(f,xi[l])&&!Ei.call(t,l))&&(t[l]=i[l])}return t})),tc=Pn((function(t){return t.push(u,$u),a(ic,u,t)})),ec=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),t[e]=n}),oi(ii)),nc=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),Ei.call(t,e)?t[e].push(n):t[e]=[n]}),Dr),rc=Pn(dn),oc=cr((function(t,e,n){Tu(t,e,n)})),ic=cr((function(t,e,n,r){Tu(t,e,n,r)})),uc=Cr((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Jn(e,t),r||(r=e.length>1),e})),ur(t,Tr(t),n),r&&(n=Ou(n,7,kr));for(var o=e.length;o--;)Kn(n,e[o]);return n})),ac=Cr((function(t,e){return null==t?{}:jn(n=t,e,(function(t,e){return Jo(n,e)}));var n})),cc=Or(Yo),sc=Or(Qo),lc=hr((function(t,e,n){return e=e.toLowerCase(),t+(n?ei(e):e)})),fc=hr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),hc=hr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),dc=fr("toLowerCase"),pc=hr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),vc=hr((function(t,e,n){return t+(n?" ":"")+gc(e)})),yc=hr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),gc=fr("toUpperCase"),mc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return Io(t)?t:new pi(t)}})),bc=Cr((function(t,e){return s(e,(function(e){e=uo(e),je(t,e,ja(t[e],t))})),t})),wc=vr(),_c=vr(!0),Sc=Pn((function(t,e){return function(n){return dn(n,t,e)}})),xc=Pn((function(t,e){return function(n){return dn(t,n,e)}})),Oc=mr(v),jc=mr(f),Ec=mr(b),kc=wr(),Ac=wr(!0),Cc=gr((function(t,e){return t+e}),0),Pc=xr("ceil"),Tc=gr((function(t,e){return t/e}),1),Ic=xr("floor"),Rc=gr((function(t,e){return t*e}),1),Dc=xr("round"),Mc=gr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new wi(J);return t=Ho(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=jo,k.assign=Ga,k.assignIn=Za,k.assignInWith=Ja,k.assignWith=Ya,k.at=Qa,k.before=Eo,k.bind=ja,k.bindAll=bc,k.bindKey=Ea,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Na(t)?t:[t]},k.chain=wo,k.chunk=function(t,e,n){e=(n?zr(t,e,n):e===u)?1:eu(Ho(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=hi(Gi(r/e));o<r;)a[i++]=Mn(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=hi(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Na(n)?ir(n):[n],ku(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Dr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new wi(J);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=Ou(t,1),n=Yo(e),function(t){return Ae(t,e,n)};var e,n},k.constant=oi,k.countBy=ya,k.create=function(t,e){var n=xu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=jr(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=jr(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=ko,k.defaults=Xa,k.defaultsDeep=tc,k.defer=ka,k.delay=Aa,k.difference=Qu,k.differenceBy=Xu,k.differenceWith=ta,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Mn(t,e<0?0:e,r)):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Mn(t,0,(e=r-e)<0?0:e)):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&zr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Ho(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:Ho(r))<0&&(r+=o),r=n>r?0:Vo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Na(t)?h:Re)(t,Dr(e,3))},k.flatMap=function(t,e){return ku(Oo(t,e),1)},k.flatMapDeep=function(t,e){return ku(Oo(t,e),et)},k.flatMapDepth=function(t,e,n){return n=n===u?1:Ho(n),ku(Oo(t,e),n)},k.flatten=ho,k.flattenDeep=function(t){return null!=t&&t.length?ku(t,et):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?ku(t,e=e===u?1:Ho(e)):[]},k.flip=function(t){return jr(t,512)},k.flow=wc,k.flowRight=_c,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:He(t,Yo(t))},k.functionsIn=function(t){return null==t?[]:He(t,Qo(t))},k.groupBy=ba,k.initial=function(t){return null!=t&&t.length?Mn(t,0,-1):[]},k.intersection=ea,k.intersectionBy=na,k.intersectionWith=ra,k.invert=ec,k.invertBy=nc,k.invokeMap=wa,k.iteratee=ui,k.keyBy=_a,k.keys=Yo,k.keysIn=Qo,k.map=Oo,k.mapKeys=function(t,e){var n={};return e=Dr(e,3),Le(t,(function(t,r,o){je(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Dr(e,3),Le(t,(function(t,r,o){je(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(Ou(t,1))},k.matchesProperty=function(t,e){return Sn(t,Ou(e,1))},k.memoize=Ca,k.merge=oc,k.mergeWith=ic,k.method=Sc,k.methodOf=xc,k.mixin=ai,k.negate=Ao,k.nthArg=function(t){return t=Ho(t),Pn((function(e){return xn(e,t)}))},k.omit=uc,k.omitBy=function(t,e){return Xo(t,Ao(Dr(e)))},k.once=function(t){return Eo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Na(e)||(e=null==e?[]:[e]),Na(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=Oc,k.overArgs=Ta,k.overEvery=jc,k.overSome=Ec,k.partial=Ia,k.partialRight=Ra,k.partition=Sa,k.pick=ac,k.pickBy=Xo,k.property=si,k.propertyOf=function(t){return function(e){return null==t?u:We(t,e)}},k.pull=oa,k.pullAll=yo,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,Dr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,u,n):t},k.pullAt=ia,k.range=kc,k.rangeRight=Ac,k.rearg=Da,k.reject=function(t,e){return(Na(t)?h:Re)(t,Ao(Dr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Dr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new wi(J);return e=e===u?e:Ho(e),Pn(t,e)},k.reverse=go,k.sampleSize=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),(Na(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Rn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Rn(t,e,n,r)},k.shuffle=function(t){return(Na(t)?be:Dn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&zr(t,e,n)?(e=0,n=r):(e=null==e?0:Ho(e),n=n===u?r:Ho(n)),Mn(t,e,n)):[]},k.sortBy=xa,k.sortedUniq=function(t){return t&&t.length?$n(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?$n(t,Dr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&zr(t,e,n)&&(e=n=u),(n=n===u?ot:n>>>0)?(t=Go(t))&&("string"==typeof e||null!=e&&!za(e))&&!(e=Du(e))&&$(t)?Yn(q(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new wi(J);return e=null==e?0:eu(Ho(e),0),Pn((function(n){var r=n[e],o=Yn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Mn(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?(e=n||e===u?1:Ho(e),Mn(t,0,e<0?0:e)):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Mn(t,(e=r-e)<0?0:e,r)):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new wi(J);return Lo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ko(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=_o,k.toArray=Ko,k.toPairs=cc,k.toPairsIn=sc,k.toPath=function(t){return Na(t)?v(t,uo):Fo(t)?[t]:ir(Yu(Go(t)))},k.toPlainObject=Wo,k.transform=function(t,e,n){var r=Na(t),o=r||Ua(t)||Va(t);if(e=Dr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Lo(t)&&Ro(i)?xu(Bi(t)):{}}return(o?s:Le)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return jo(t,1)},k.union=ua,k.unionBy=aa,k.unionWith=ca,k.uniq=function(t){return t&&t.length?Fn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Fn(t,Dr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Fn(t,u,e):[]},k.unset=function(t,e){return null==t||Kn(t,e)},k.unzip=mo,k.unzipWith=bo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=ti,k.valuesIn=function(t){return null==t?[]:R(t,Qo(t))},k.without=sa,k.words=ri,k.wrap=function(t,e){return Ia(Zn(e),t)},k.xor=la,k.xorBy=fa,k.xorWith=ha,k.zip=da,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Rn)},k.zipWith=pa,k.entries=cc,k.entriesIn=sc,k.extend=Za,k.extendWith=Ja,ai(k,k),k.add=Cc,k.attempt=mc,k.camelCase=lc,k.capitalize=ei,k.ceil=Pc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=qo(n))==n?n:0),e!==u&&(e=(e=qo(e))==e?e:0),ke(qo(t),e,n)},k.clone=function(t){return Ou(t,4)},k.cloneDeep=function(t){return Ou(t,5)},k.cloneDeepWith=function(t,e){return Ou(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return Ou(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Yo(e))},k.deburr=ni,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=Tc,k.endsWith=function(t,e,n){t=Go(t),e=Du(e);var r=t.length,o=n=n===u?r:ke(Ho(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=Co,k.escape=function(t){return(t=Go(t))&&$t.test(t)?t.replace(Bt,ln):t},k.escapeRegExp=function(t){return(t=Go(t))&&Wt.test(t)?t.replace(qt,"\\$&"):t},k.every=function(t,e,n){var r=Na(t)?f:Te;return n&&zr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.find=ga,k.findIndex=lo,k.findKey=function(t,e){return w(t,Dr(e,3),Le)},k.findLast=ma,k.findLastIndex=fo,k.findLastKey=function(t,e){return w(t,Dr(e,3),Ne)},k.floor=Ic,k.forEach=So,k.forEachRight=xo,k.forIn=function(t,e){return null==t?t:Au(t,Dr(e,3),Qo)},k.forInRight=function(t,e){return null==t?t:Cu(t,Dr(e,3),Qo)},k.forOwn=function(t,e){return t&&Le(t,Dr(e,3))},k.forOwnRight=function(t,e){return t&&Ne(t,Dr(e,3))},k.get=Zo,k.gt=Ma,k.gte=La,k.has=function(t,e){return null!=t&&$r(t,e,Xe)},k.hasIn=Jo,k.head=po,k.identity=ii,k.includes=function(t,e,n,r){t=Po(t)?t:ti(t),n=n&&!r?Ho(n):0;var o=t.length;return n<0&&(n=eu(o+n,0)),Uo(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=zo(e),n===u?(n=e,e=0):n=zo(n),(r=t=qo(t))>=nu(o=e,i=n)&&r<eu(o,i);var r,o,i},k.invoke=rc,k.isArguments=Ba,k.isArray=Na,k.isArrayBuffer=$a,k.isArrayLike=Po,k.isArrayLikeObject=To,k.isBoolean=function(t){return!0===t||!1===t||Bo(t)&&Je(t)==ct},k.isBuffer=Ua,k.isDate=Fa,k.isElement=function(t){return Bo(t)&&1===t.nodeType&&!$o(t)},k.isEmpty=function(t){if(null==t)return!0;if(Po(t)&&(Na(t)||"string"==typeof t||"function"==typeof t.splice||Ua(t)||Va(t)||Ba(t)))return!t.length;var e=zu(t);if(e==dt||e==mt)return!t.size;if(Gr(t))return!mn(t).length;for(var n in t)if(Ei.call(t,n))return!1;return!0},k.isEqual=function(t,e){return Pu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?Pu(t,e,u,n):!!r},k.isError=Io,k.isFinite=function(t){return"number"==typeof t&&Qi(t)},k.isFunction=Ro,k.isInteger=Do,k.isLength=Mo,k.isMap=Ka,k.isMatch=function(t,e){return t===e||vn(t,e,Lr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Lr(e),n)},k.isNaN=function(t){return No(t)&&t!=+t},k.isNative=function(t){if(Wu(t))throw new pi("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=No,k.isObject=Lo,k.isObjectLike=Bo,k.isPlainObject=$o,k.isRegExp=za,k.isSafeInteger=function(t){return Do(t)&&t>=-9007199254740991&&t<=nt},k.isSet=Ha,k.isString=Uo,k.isSymbol=Fo,k.isTypedArray=Va,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return Bo(t)&&zu(t)==_t},k.isWeakSet=function(t){return Bo(t)&&"[object WeakSet]"==Je(t)},k.join=function(t,e){return null==t?"":Xi.call(t,e)},k.kebabCase=fc,k.last=vo,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=Ho(n))<0?eu(r+o,0):nu(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=hc,k.lowerFirst=dc,k.lt=qa,k.lte=Wa,k.max=function(t){return t&&t.length?Ie(t,ii,Ye):u},k.maxBy=function(t,e){return t&&t.length?Ie(t,Dr(e,2),Ye):u},k.mean=function(t){return j(t,ii)},k.meanBy=function(t,e){return j(t,Dr(e,2))},k.min=function(t){return t&&t.length?Ie(t,ii,bn):u},k.minBy=function(t,e){return t&&t.length?Ie(t,Dr(e,2),bn):u},k.stubArray=li,k.stubFalse=fi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Rc,k.nth=function(t,e){return t&&t.length?xn(t,Ho(e)):u},k.noConflict=function(){return Ze._===this&&(Ze._=Ti),this},k.noop=ci,k.now=Oa,k.pad=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return br(Zi(o),n)+t+br(Gi(o),n)},k.padEnd=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?t+br(e-r,n):t},k.padStart=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?br(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ou(Go(t).replace(Gt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&zr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=zo(t),e===u?(e=t,t=0):e=zo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=iu();return nu(t+o*(e-t+Ve("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Na(t)?g:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,ju)},k.reduceRight=function(t,e,n){var r=Na(t)?m:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,Eu)},k.repeat=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),Cn(Go(t),e)},k.replace=function(){var t=arguments,e=Go(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Jn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[uo(e[r])];i===u&&(r=o,i=n),t=Ro(i)?i.call(t):i}return t},k.round=Dc,k.runInContext=t,k.sample=function(t){return(Na(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(Po(t))return Uo(t)?V(t):t.length;var e=zu(t);return e==dt||e==mt?t.size:mn(t).length},k.snakeCase=pc,k.some=function(t,e,n){var r=Na(t)?b:Ln;return n&&zr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.sortedIndex=function(t,e){return Bn(t,e)},k.sortedIndexBy=function(t,e,n){return Nn(t,e,Dr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Bn(t,e);if(r<n&&Co(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Bn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Nn(t,e,Dr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Bn(t,e,!0)-1;if(Co(t[n],e))return n}return-1},k.startCase=vc,k.startsWith=function(t,e,n){return t=Go(t),n=null==n?0:ke(Ho(n),0,t.length),e=Du(e),t.slice(n,n+e.length)==e},k.subtract=Mc,k.sum=function(t){return t&&t.length?C(t,ii):0},k.sumBy=function(t,e){return t&&t.length?C(t,Dr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&zr(t,e,n)&&(e=u),t=Go(t),e=Ja({},e,r,Er);var o,i,a=Ja({},e.imports,r.imports,Er),c=Yo(a),s=R(a,c),l=0,f=e.interpolate||le,h="__p += '",d=mi((e.escape||le).source+"|"+f.source+"|"+(f===Kt?ne:le).source+"|"+(e.evaluate||le).source+"|$","g"),p="//# sourceURL="+(Ei.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fe+"]")+"\n";t.replace(d,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(fe,N),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=Ei.call(e,"variable")&&e.variable;if(v){if(te.test(v))throw new pi("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Rt,""):h).replace(Dt,"$1").replace(Mt,"$1;"),h="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")+h+"return __p\n}";var y=mc((function(){return vi(c,p+"return "+h).apply(u,s)}));if(y.source=h,Io(y))throw y;return y},k.times=function(t,e){if((t=Ho(t))<1||t>nt)return[];var n=ot,r=nu(t,ot);e=Dr(e),t-=ot;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=zo,k.toInteger=Ho,k.toLength=Vo,k.toLower=function(t){return Go(t).toLowerCase()},k.toNumber=qo,k.toSafeInteger=function(t){return t?ke(Ho(t),-9007199254740991,nt):0===t?t:0},k.toString=Go,k.toUpper=function(t){return Go(t).toUpperCase()},k.trim=function(t,e,n){if((t=Go(t))&&(n||e===u))return T(t);if(!t||!(e=Du(e)))return t;var r=q(t),o=q(e),i=M(r,o),a=L(r,o)+1;return Yn(r,i,a).join("")},k.trimEnd=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.slice(0,W(t)+1);if(!t||!(e=Du(e)))return t;var r=q(t),o=L(r,q(e))+1;return Yn(r,0,o).join("")},k.trimStart=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.replace(Gt,"");if(!t||!(e=Du(e)))return t;var r=q(t),o=M(r,q(e));return Yn(r,o).join("")},k.truncate=function(t,e){var n=30,r="...";if(Lo(e)){var o="separator"in e?e.separator:o;n="length"in e?Ho(e.length):n,r="omission"in e?Du(e.omission):r}var i=(t=Go(t)).length;if($(t)){var a=q(t);i=a.length}if(n>=i)return t;var c=n-V(r);if(c<1)return r;var s=a?Yn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),za(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=mi(o.source,Go(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(Du(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+r},k.unescape=function(t){return(t=Go(t))&&Nt.test(t)?t.replace(Lt,fn):t},k.uniqueId=function(t){var e=++ki;return Go(t)+e},k.upperCase=yc,k.upperFirst=gc,k.each=So,k.eachRight=xo,k.first=po,ai(k,(Pa={},Le(k,(function(t,e){Ei.call(k.prototype,e)||(Pa[e]=t)})),Pa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){Z.prototype[t]=function(n){n=n===u?1:eu(Ho(n),0);var r=this.__filtered__&&!e?new Z(this):this.clone();return r.__filtered__?r.__takeCount__=nu(n,r.__takeCount__):r.__views__.push({size:nu(n,ot),type:t+(r.__dir__<0?"Right":"")}),r},Z.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Z.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Dr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Z.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Z.prototype[t]=function(){return this.__filtered__?new Z(this):this[n](1)}})),Z.prototype.compact=function(){return this.filter(ii)},Z.prototype.find=function(t){return this.filter(t).head()},Z.prototype.findLast=function(t){return this.reverse().find(t)},Z.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new Z(this):this.map((function(n){return dn(n,t,e)}))})),Z.prototype.reject=function(t){return this.filter(Ao(Dr(t)))},Z.prototype.slice=function(t,e){t=Ho(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Z(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=Ho(e))<0?n.dropRight(-e):n.take(e-t)),n)},Z.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Z.prototype.toArray=function(){return this.take(ot)},Le(Z.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=k[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=r?[1]:arguments,s=o(e,Z),l=c[0],f=s||Na(e),h=function(t){var e=i.apply(k,y([t],c));return r&&d?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,p=!!this.__actions__.length,v=a&&!d,g=s&&!p;if(!a&&f){e=g?e:new Z(this);var m=t.apply(e,c);return m.__actions__.push({func:_o,args:[h],thisArg:u}),new G(m,d)}return v&&g?t.apply(this,c):(m=this.thru(h),v?r?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_i[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Na(o)?o:[],t)}return this[n]((function(n){return e.apply(Na(n)?n:[],t)}))}})),Le(Z.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";Ei.call(pu,r)||(pu[r]=[]),pu[r].push({name:e,func:n})}})),pu[Bu(u,2).name]=[{name:"wrapper",func:u}],Z.prototype.clone=function(){var t=new Z(this.__wrapped__);return t.__actions__=ir(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ir(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ir(this.__views__),t},Z.prototype.reverse=function(){if(this.__filtered__){var t=new Z(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Z.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Na(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=nu(e,t+u);break;case"takeRight":t=eu(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,d=nu(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Vn(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}p[h++]=y}return p},k.prototype.at=va,k.prototype.chain=function(){return wo(this)},k.prototype.commit=function(){return new G(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=Ko(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;o(n,H);){var r=so(n);r.__index__=0,r.__values__=u,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(o(t,Z)){var e=t;return this.__actions__.length&&(e=new Z(this)),(e=e.reverse()).__actions__.push({func:_o,args:[go],thisArg:u}),new G(e,this.__chain__)}return this.thru(go)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Ki&&(k.prototype[Ki]=function(){return this}),k}();Ze._=hn,(r=function(){return hn}.call(e,n,e,t))===u||(t.exports=r)}).call(this)},7202:function(t,e,n){!function(e){var n=function(t,e,n){var u=n[0],a=n.length;(t||"object"!==r(u))&&(u={});for(var c=0;c<a;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=t?o.clone(s[l]):s[l];u[l]=e?i(u[l],f):f}}return u},r=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},o=function(t){return n(!0===t,!1,arguments)};function i(t,e){if("object"!==r(t))return e;for(var n in e)"object"===r(t[n])&&"object"===r(e[n])?t[n]=i(t[n],e[n]):t[n]=e[n];return t}o.recursive=function(t){return n(!0===t,!0,arguments)},o.clone=function(t){var e,n,i=t,u=r(t);if("array"===u)for(i=[],n=t.length,e=0;e<n;++e)i[e]=o.clone(t[e]);else if("object"===u)for(e in i={},t)i[e]=o.clone(t[e]);return i},e?t.exports=o:window.merge=o}((t=n.nmd(t))&&"object"==typeof t.exports&&t.exports)},2980:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var o,u,a=e&&(o=e.prototype,null!=(u=i)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](o):c(o,u))?e:i,s=Object.create(a.prototype),l=new p(r||[]);return s._invoke=f(t,n,l),s},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t,e,n){var r=x;return function(i,u){if(r===j)throw new Error("Generator is already running");if(r===E){if("throw"===i)throw u;return y()}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=I(a,n);if(c){if(c===k)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===x)throw r=E,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=j;var s=o(t,e,n);if("normal"===s.type){if(r=n.done?E:O,s.arg===k)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=E,n.method="throw",n.arg=s.arg)}}},h=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},d=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)},v=function(t){if(t){var n=t[w];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(m.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:y}},y=function(){return{value:e,done:!0}},g=Object.prototype,m=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",_=b.asyncIterator||"@@asyncIterator",S=b.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var x="suspendedStart",O="suspendedYield",j="executing",E="completed",k={},A={};n(A,w,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(v([])));P&&P!==g&&m.call(P,w)&&(A=P);var T=a.prototype=i.prototype=Object.create(A);function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,k;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,k):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=a,n(T,"constructor",a),n(a,"constructor",u),u.displayName=n(a,S,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,S,"GeneratorFunction")),t.prototype=Object.create(T),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,_,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(T),n(T,S,"Generator"),n(T,w,(function(){return this})),n(T,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=v,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(d),!t)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),k},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),d(n),k}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:v(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),k}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},2584:function(t,e,n){var r=n(8518).R;e.s=function(t){if(t||(t=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,t)}},8518:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},7641:function(t,e,n){var r=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={672:function(t,e){var n,r,o;r=e,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(t){this.message=t}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(t){for(var e,r,i=String(t),u=0,a=o,c="";i.charAt(0|u)||(a="=",u%1);c+=a.charAt(63&e>>8-u%1*8)){if((r=i.charCodeAt(u+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|r}return c}),r.atob||(r.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,u=0,a=0,c="";i=e.charAt(a++);~i&&(r=u%4?64*r+i:i,u++%4)?c+=String.fromCharCode(255&r>>(-2*u&6)):0)i=o.indexOf(i);return c})},525:function(t){(function(){var e,n,r=function(t,r,o,i){n.defer(),e.search(t).then((function(t){u(t,r).then((function(){o()}),(function(t){i(t)}))}),(function(t){i(t)}))},o=function(t){var e=n.defer(),o=[];return r(t,(function(t){t.forEach((function(t){o.push(t)}))}),(function(){e.resolve(o)}),(function(t){e.reject(t)})),e.promise},i=function(t,r){var o=n.defer();return e.search(t).then((function(t){var n=function(){u.pop()()},i={},u=[function(){o.resolve(t,i)}],a=t.data;a.entry&&a.entry.forEach((function(t){var o=t.resource,c=o.resourceType;r&&r.forEach((function(t){var r,s,l,f=t.split("."),h=f[0],d=f[1],p=o[d];if(c===h&&p){var v=p.reference;i[v]||(r=a,s=o,l=p,u.push((function(){!function(t,r,o){var u=o.reference;e.resolve({bundle:t,resource:r,reference:o}).then((function(t){var e=t.data||t.content;i[u]=e,n()}))}(r,s,l)})))}}))})),n()}),(function(){o.reject("Could not fetch search results")})),o.promise};function u(t,r){var o,i=t.data.entry||[],a=[];for(o=0;o<i.length;o++)a.push(i[o].resource);r(a);var c=n.defer();return e.nextPage({bundle:t.data}).then((function(t){u(t,r).then((function(t){c.resolve()}))}),(function(t){c.resolve()})),c.promise}t.exports=function(t,u){return e=t,n=u,t.drain=r,t.fetchAll=o,t.fetchAllWithReferences=i,t}}).call(this)},256:function(t,e,n){(function(){n(454);var e=n(801),r=n(921),o=n(294),i=n(821),u=n(442),a=n(856),c=n(719),s=n(29),l=n(723),f=n(249),h=n(525);t.exports=function(t,n){var d=e.Middleware,p=e.$$Attr,v=function(t){return p("method",t)},y=function(t,e){return p("headers."+t,e)},g=d(u),m=d(a(t,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",t.headers&&t.headers.Accept?t.headers.Accept:"application/json")).and(y("Content-Type",t.headers&&t.headers["Content-Type"]?t.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),S=m.and(v("DELETE")),x=m.and(v("PATCH")),O=i.Http(t,n),j=f.Path,E=j(t.baseUrl),k=E.slash(":type || :resource.resourceType"),A=k.slash("_history"),C=k.slash(":id || :resource.id"),P=C.slash("_history"),T=C.slash(":versionId || :resource.meta.versionId"),I=E.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),R=y("Prefer","return=representation"),D=d(r.$Paging);return h({conformance:b.and(E.slash("metadata")).end(O),document:w.and(E.slash("Document")).end(O),profile:b.and(E.slash("Profile").slash(":type")).end(O),transaction:w.and(E).end(O),history:b.and(E.slash("_history")).and(D).end(O),typeHistory:b.and(A).and(D).end(O),resourceHistory:b.and(P).and(D).end(O),read:b.and(s.$WithPatient).and(C).end(O),vread:b.and(T).end(O),delete:S.and(C).and(R).end(O),create:w.and(k).and(R).end(O),validate:w.and(k.slash("_validate")).end(O),meta:{add:w.and(I.slash("$meta-add")).end(O),delete:w.and(I.slash("$meta-delete")).end(O),read:b.and(I.slash("$meta")).end(O)},search:b.and(k).and(s.$WithPatient).and(r.$SearchParams).and(D).end(O),update:_.and(C).and(R).end(O),conditionalUpdate:_.and(k).and(r.$SearchParams).and(R).end(O),conditionalDelete:S.and(k).and(r.$SearchParams).and(R).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(j(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:x.and(C).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},294:function(t,e,n){(function(){var t,r=n(801),o=n(672).btoa;e.$Basic=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.user&&t.auth.pass)return"Basic "+o(t.auth.user+":"+t.auth.pass)})),e.$Bearer=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.bearer)return"Bearer "+t.auth.bearer})),e.$Credentials=r.Middleware(r.$$Attr("credentials",(function(e){return t=e.credentials,""}))).and(r.$$Attr("credentials",(function(e){if(["same-origin","include"].indexOf(t)>-1)return t})))}).call(this)},719:function(t,e){e.$$BundleLinkUrl=function(t){return function(e){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(e){return e.relation&&e.relation===t}))[0];return r&&r.url&&(n.url=r.url,n.data=null),e(n)}}}},856:function(t){(function(){var e=function(t,e,n){var r=t[n];return r&&!e[n]&&(e[n]=r),t};t.exports=function(t,n){return function(r){return function(o){return e(t,o,"baseUrl"),e(t,o,"cache"),e(t,o,"auth"),e(t,o,"patient"),e(t,o,"debug"),e(t,o,"credentials"),e(t,o,"headers"),e(t,o,"agentOptions"),e(n,o,"defer"),e(n,o,"http"),r(o)}}}}).call(this)},801:function(t,e,n){(function(){var t=n(454),r=function(t){return t.and=function(e){return r((n=t,o=e,function(t){return n(o(t))}));var n,o},t.end=function(e){return t(e)},t};e.$$Simple=function(t){return function(e){return function(n){return e(t(n))}}},e.$$Attr=function(e,n){return r((function(r){return function(o){var i;return i="function"==t.type(n)?n(o):n,r(null==i&&null==i?o:function(t,e,n){for(var r=e.split("."),o=t,i=0;i<r.length-1;i++){var u=r[i];(o=t[u])||(o={},t[u]=o)}return o[r[r.length-1]]=n,t}(o,e,i))}}))};var o=function(t,e){return r((function(n){return function(r){return r[t]=e(r),n(r)}}))};e.Middleware=r,e.Attribute=o,e.Method=function(t){return o("method",(e=t,function(){return e}));var e}}).call(this)},442:function(t){t.exports=function(t){return function(e){try{return t(e)}catch(t){if(e.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack)),!e.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack),new Error("I need adapter.defer");var n=e.defer();return n.reject(t),n.promise}}}},821:function(t,e,n){(function(){var t=n(454);e.Http=function(t,e){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||e.http||t.http)(n);return n.debug&&r&&r.then&&r.then((function(t){console.log("\nDEBUG: (responce)",t)})),r}},e.$JsonData=function(e){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==t.type(r)||"array"==t.type(r)?JSON.stringify(r):r)),e(n)}}}).call(this)},29:function(t,e,n){(function(){var t=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"];e.$WithPatient=t.$$Simple((function(t){var e=t.type;return t.patient&&("Patient"===e?(t.query=t.query||{},t.query._id=t.patient,t.id=t.patient):r.indexOf(e)>=0&&(t.query=t.query||{},t.query.patient=t.patient)),t}))}).call(this)},723:function(t,e,n){(function(){var e=n(454),r=/^#(.*)/,o=function(t){var n,o,i,u,a=t.cache,c=t.reference,s=t.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=t.resource,i=n.match(r)[1],(u=(o.contained||[]).filter((function(t){return(t.id||t._id)==i}))[0])&&{content:u}||null;var f=e.absoluteUrl(t.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(t){return t.id===f}))[0]||(null!=a?a[f]:void 0)||null};t.exports.sync=o,t.exports.resolve=function(t){return function(n){var i=o(n),u=n.reference,a=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return a.resolve(i),a.promise}if(!u)throw new Error("No reference found");if(u&&u.reference.match(r))throw new Error("Contained resource not found");return n.url=e.absoluteUrl(n.baseUrl,u.reference),n.data=null,t(n)}}}).call(this)},921:function(t,e,n){(function(){var t=n(454),r=t.type,o=t.assertArray,i=(t.assertObject,t.reduceMap),u=t.identity,a={$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(t,e){if("$sort"===t)return function(t){var e,n,i,u;for(o(t),i=[],e=0,n=t.length;e<n;e++)switch(u=t[e],r(u)){case"array":i.push({param:"_sort",value:u[0],modifier:":"+u[1]});break;case"string":i.push({param:"_sort",value:u});break;default:i.push(void 0)}return i}(e);if("$has"===t)return i(e,(function(t,e){var n,o;return n=e[0],o=e[1],t.concat(function(){switch(r(o)){case"array":return o.map((function(t){return{param:"_has",value:n+"="+t}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===t||"$revInclude"===t)return n=t,i(e,(function(t,e){var o,i;return o=e[0],i=e[1],t.concat(function(){switch(r(i)){case"array":return i.map((function(t){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+t}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,u,l;switch(r(e)){case"object":return u=t,i(l=e,(function(t,e){var n,i,f,h;return n=e[0],h=e[1],t.concat("$and"===n?o(h).reduce((function(t,e){return t.concat(s(u,e))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:u},"$or"===n?i.value=h:(a[n]&&(i.operator=a[n]),c[n]&&(i.modifier=c[n]),"object"===r(h)&&h.$or?i.value=h.$or:i.value=[h]),[i]):(l.$type&&(f=":"+l.$type),s(""+u+(f||"")+"."+n,h)))}));case"string":case"number":return[{param:t,value:[e]}];case"array":return[{param:t,value:[e.join("|")]}];default:throw"could not linearizeParams "+r(e)}},l=function(t){return i(t,(function(t,e){var n,r;return n=e[0],r=e[1],t.concat(s(n,r))}))},f=function(t){var e,n,r=["_include","_revinclude","_has"];return function(){var o,i,a,c;for(c=[],o=0,i=(a=l(t)).length;o<i;o++)e=a[o],n=-1===r.indexOf(e.param)?encodeURIComponent(e.value):e.value,c.push([e.param,e.modifier,"_has"==e.param?":":"=",e.operator,n].filter(u).join(""));return c}().join("&")};e._query=l,e.query=f;var h=n(801);e.$SearchParams=h.$$Attr("url",(function(t){var e=t.url;return t.query?e+"?"+f(t.query):e})),e.$Paging=function(t){return function(e){var n=e.params||{};return e.since&&(n._since=e.since),e.count&&(n._count=e.count),e.params=n,t(e)}}}).call(this)},249:function(t,e,n){(function(){n(454);var t=n(801),r=function(e,n){var o=function(t){return n&&e.includes("target.versionId")&&!t.target.versionId?n(t):(n&&n(t)+"/"||"")+function(t,e){var n,r,o=(r=e,0==(n=t.trim()).indexOf(":")?function(t,e){for(var n,r=t.split("||").map((function(t){return t.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=e,r[o].split(".").reduce((function(t,e){return"versionId"===e&&t[e]?"_history/"+t[e]:null==t||null==t?null:t[e]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==t.includes("target.versionId"))throw new Error("Parameter "+t+" is required: "+JSON.stringify(e));return o}(e,t)},i=t.Attribute("url",o);return i.slash=function(t){return r(t,o)},i};e.Path=r}).call(this)},454:function(t,e,n){(function(){var t=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;e.trim=function(t){return t?t.toString().replace(r,""):""};var o=function(t){return null==t&&void 0===t?String(t):{"[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(t)]};e.type=o,e.assertArray=function(t){if("array"!==o(t))throw"not array";return t};var i=function(t){if("object"!==o(t))throw"not object";return t};e.assertObject=i;var u=function(t,e,n){var r,o;return n||(n=[]),i(t),function(){var e;for(r in e=[],t)o=t[r],e.push([r,o]);return e}().reduce(e,n)};e.reduceMap=u,e.identity=function(t){return t};var a=function(){return Array.prototype.slice.call(arguments)};e.argsArray=a,e.mergeLists=function(){var e;return e=function(e,n){var r,o,i;for(r in o=t(!0,e),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},a.apply(null,arguments).reduce(e,{})},e.absoluteUrl=function(t,e){return e.match(/https?:\/\/./)?e:t+"/"+e},e.relativeUrl=function(t,e){return e.slice(e,t.length+1)===t+"/"?e.slice(t.length+1):e},e.resourceIdToUrl=function(t,e,n){return e=e.replace(/\/$/,""),(t=t.replace(/^\//,"")).indexOf("/")<0?e+"/"+n+"/"+t:0!==t.indexOf(e)?e+"/"+t:t};var c=function(t,e,n,r){var i;switch(o(n)){case"array":return e(n.map((function(e){return t(e,[n,r])})),r);case"object":return i=function(e,o){var i,u;return i=o[0],u=o[1],e[i]=t(u,[n].concat(r)),e},e(u(n,i,{}),r);default:return e(n,r)}};e.walk=c;var s=function(t,e,n){return e?c(s(t),t,e,n):function(e,n){return s(t,e,n)}};e.postwalk=s}).call(this)},651:function(t,e,n){!function(e){var n=function(t,e,n){var u=n[0],a=n.length;(t||"object"!==r(u))&&(u={});for(var c=0;c<a;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=t?o.clone(s[l]):s[l];u[l]=e?i(u[l],f):f}}return u},r=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},o=function(t){return n(!0===t,!1,arguments)};function i(t,e){if("object"!==r(t))return e;for(var n in e)"object"===r(t[n])&&"object"===r(e[n])?t[n]=i(t[n],e[n]):t[n]=e[n];return t}o.recursive=function(t){return n(!0===t,!0,arguments)},o.clone=function(t){var e,n,i=t,u=r(t);if("array"===u)for(i=[],n=t.length,e=0;e<n;++e)i[e]=o.clone(t[e]);else if("object"===u)for(e in i={},t)i[e]=o.clone(t[e]);return i},e?t.exports=o:window.merge=o}((t=n.nmd(t))&&"object"==typeof t.exports&&t.exports)},602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),p=new d(o||[]);return h._invoke=(a=t,c=n,s=p,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?j:x,o.arg===E)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=j,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},d=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},p=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(p([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,E;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,E):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=p,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:p(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),E}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){var n=function(){this.constructor=t};J(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,et)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Q.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},d=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},p=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(t){return!1}},v=function(t,e){return!e||"object"!==At(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),xt(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=d(Z().mark((function t(e){var r,i;return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,Ot.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(Pt)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,Ot.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Tt(n,r,e,o)}),(function(t){throw new Tt(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new at((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Lt<Date.now()-6e4||!Mt.getState().loaded)&&x(),new at((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Mt.getState()),Mt.subscribe(n)}))},S=function(){return(Lt<Date.now()-6e4||!Mt.getState().loaded)&&x(),Mt},x=function(){return new Promise((function(t,e){Lt=Date.now(),g(Pt).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Mt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,Dt.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Mt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},j=function(t,e){return n=t,e.privileges.find((function(t){return n===t.display}))||e.roles.find((function(t){return"System Developer"===t.display}));var n},E=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Mt.getState()),t||(e=Mt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Bt.apply(this,arguments)},C=function(){(0,Ot.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Ot.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Ot.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Ot.validators.isUrl]},errors:{_type:Ot.Type.Array,_default:[401],_elements:{_type:Ot.Type.Number,_validators:[Ot.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Ot.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Rt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?Zt:e.lift(new Jt(t))}},R=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Qt(t,e))}},D=function(t,e,n){var r=null!=n?n:te;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(R((function(t){return t})))},M=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},L=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},B=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},N=function(){return m("/ws/rest/v1/visittype").pipe(R((function(t){return t.data.results.map(B)}))).pipe(I(1))},$=function(t){return{uuid:t.uuid,display:t.display}},U=function(){return m("/ws/rest/v1/location").pipe(R((function(t){return t.data.results.map($)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Tt},VisitMode:function(){return Nt},VisitStatus:function(){return $t},backendDependencies:function(){return ne},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return te},fetchCurrentPatient:function(){return T},fhir:function(){return Rt},fhirBaseUrl:function(){return It},getCurrentUser:function(){return _},getLocations:function(){return U},getLoggedInUser:function(){return E},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return ee},getVisitTypes:function(){return N},getVisitsForPatient:function(){return D},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return M},sessionEndpoint:function(){return Pt},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return $},toVisitTypeObject:function(){return B},updateVisit:function(){return L},userHasAccess:function(){return j}});var F,K,z,H,V,q,W,G=c(602),Z=c.n(G),J=function(t,e){return(J=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},Y=!1,Q={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,Y=t},get useDeprecatedSynchronousErrorHandling(){return Y}},X={closed:!0,next:function(t){},error:function(t){if(Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},tt=Array.isArray||function(t){return t&&"number"==typeof t.length},et=(F=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},F.prototype=Object.create(Error.prototype),F),nt=(W=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)},W.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,a=o._ctorUnsubscribe,c=o._unsubscribe,s=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,W))i.remove(this);else if(null!==i)for(var l=0;l<i.length;++l)i[l].remove(this);if(e(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){t=r(e,et)?u(e.errors):[e]}}if(tt(s)){l=-1;for(var f=s.length;++l<f;){var h=s[l];if(null!==(n=h)&&"object"==typeof n)try{h.unsubscribe()}catch(e){t=t||[],r(e,et)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new et(t)}},W.prototype.add=function(t){var e=t;if(!t)return W.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new W(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,W)){var n=e;(e=new W)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=e._parentOrParents;if(null===i)e._parentOrParents=this;else if(r(i,W)){if(i===this)return e;e._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return e;i.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[e]:u.push(e),e},W.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},W.EMPTY=((q=new W).closed=!0,q),W),rt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ot=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=X;break;case 1:if(!t){u.destination=X;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new it(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new it(u,t,o,i)}return u}return t(n,e),n.prototype[rt]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(nt),it=(z=function(t,n,r,o){var i,u=K.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==X&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,K=ot),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Q.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!Q.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Q.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ut="function"==typeof Symbol&&Symbol.observable||"@@observable",at=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,ot))return t;if(t[rt])return t[rt]()}return t||e||n?new ot(t,e,n):new ot(X)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Q.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Q.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Q.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,ot)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ut]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,st="object"==typeof self&&self&&self.Object===Object&&self,lt=(ct||st||Function("return this")()).Symbol,ft=Object.prototype,ht=ft.hasOwnProperty,dt=ft.toString,pt=lt?lt.toStringTag:void 0,vt=Object.prototype.toString,yt=lt?lt.toStringTag:void 0,gt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),mt=Function.prototype,bt=Object.prototype,wt=mt.toString,_t=bt.hasOwnProperty,St=wt.call(Object),xt=function(t){if(null==(o=t)||"object"!=typeof o||"[object Object]"!=(null==(e=t)?void 0===e?"[object Undefined]":"[object Null]":yt&&yt in Object(e)?function(t){var e=ht.call(t,pt),n=t[pt];try{t[pt]=void 0;var r=!0}catch(t){}var o=dt.call(t);return r&&(e?t[pt]=n:delete t[pt]),o}(e):(n=e,vt.call(n))))return!1;var e,n,o,i=gt(t);if(null===i)return!0;var u=_t.call(i,"constructor")&&i.constructor;return"function"==typeof u&&r(u,u)&&wt.call(u)==St},Ot=c(824);function jt(t,e,n){return jt=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&kt(o,n.prototype),o},jt.apply(null,arguments)}function Et(t){return(Et=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kt(t,e){return(kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var At=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function Ct(t){var e="function"==typeof Map?new Map:void 0;return Ct=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return jt(t,arguments,Et(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),kt(r,t)},Ct(t)}var Pt="/ws/rest/v1/session",Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}(i,t);var e,n,o=(e=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(t){return!1}}(),function(){var t,r=Et(e);if(n){var o=Et(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(Ct(Error)),It="/ws/fhir2/R4",Rt=c(256)({baseUrl:It},{http:function(t){return g(t.url,{method:t.method,headers:t.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:t}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:t}}))}}),Dt=c(254),Mt=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Lt=0;function Bt(){return(Bt=w(Z().mark((function t(e,n){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(Pt,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Nt,$t,Ut,Ft,Kt=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),zt=function(e){var n=function(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 t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(nt),Ht=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(ot),Vt=function(e){var n=function(){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[rt]=function(){return new Ht(this)},n.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Kt;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Kt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Kt;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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 Kt;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Kt;return this.hasError?(t.error(this.thrownError),nt.EMPTY):this.isStopped?(t.complete(),nt.EMPTY):(this.observers.push(t),new zt(this,t))},n.prototype.asObservable=function(){var t=new at;return t.source=this,t},n.create=function(t,e){return new qt(t,e)},n}(at),qt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):nt.EMPTY},n}(Vt),Wt=function(e){var n=function(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 Kt;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Vt),Gt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),Zt=new at((function(t){return t.complete()})),Jt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Gt};return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.total))},t}(),Yt=function(e){var n=function(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(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(ot),Qt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.project,this.thisArg))},t}(),Xt=function(e){var n=function(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(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(ot),te="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)",ee=new Wt(null);(Ut=Nt||(Nt={})).NEWVISIT="startVisit",Ut.EDITVISIT="editVisit",Ut.LOADING="loadingVisit",(Ft=$t||($t={})).NOTSTARTED="notStarted",Ft.ONGOING="ongoing";var ne={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},6066:function(){var t=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.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](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?p(e.matcher):p(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},d=function(t){return h(l(),t)};function p(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return p(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,d="["+e(o.endsWith||"")+"]|$",p="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=p+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var S=t[t.length-1],x="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+p+"(?="+d+"))?"),x||(v+="(?="+p+"|"+d+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},d=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var p=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=p||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=p||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},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(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,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(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},9714:function(){var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=function(t,e){return st(t,e,n.slice(),r.slice())},u=o(t);return!a((function(t,e){return!a(i,e,t)}),o(e),u)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},h=function(t,e,n,r){return t["@@transducer/result"](n[r](bt(t["@@transducer/step"],t),e))},d=function(t){return"[object Object]"===Object.prototype.toString.call(t)},p=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Tt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Tt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Tt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},j=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},E=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=F(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(U(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=E(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,d=Object.entries(c)[Symbol.iterator]();!(s=(h=d.next()).done);s=!0){var p=E(h.value,2),v=p[0];$(p[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return j({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=E(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:j({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Nt(pt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=E(a.value,2);n=z([n,$t(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Bt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},R=function(t,e){Ut(t,e);var n=Rt.getState();Rt.setState({schemas:j({},n.schemas,O({},t,e))})},D=function(t,e){Ut(t,e);var n=Rt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Rt.setState({schemas:j({},n.schemas,O({},t,e))})},M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Rt.getState();Rt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},L=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},B=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=zt(t,e,r);return Kt(t,o,n),o},N=function(t,e,n,r,o,i){var u,a,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,d=U(o,i),p=K(t,d),v=null!==(s=null==p||null===(u=p.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([K(h,d),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=zt(g,y,o.devDefaultsAreOn);return Kt(g,m,h),delete m.extensionSlots,m},$=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},U=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=K(t,U(e,n));H(r,o,t);var i=zt(r,o,e.devDefaultsAreOn);return Kt(r,i,t),delete i.extensionSlots,i},K=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return _t(Ot)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Ft(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:jt,Boolean:Et,ConceptUuid:Pt,Number:kt,Object:Ct,String:At,UUID:Pt,PersonAttributeTypeUuid:Pt,PatientIdentifierTypeUuid:Pt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},J=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},Y=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(e,n);o.startsWith(r)?(0,Ht.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return ht},configExtensionStore:function(){return Lt},configInternalStore:function(){return Rt},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return D},getConfig:function(){return L},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Bt},inRange:function(){return Vt},interpolateString:function(){return Y},interpolateUrl:function(){return J},isUrl:function(){return Wt},isUrlWithTemplateParameters:function(){return qt},navigate:function(){return Q},oneOf:function(){return Gt},processConfig:function(){return B},provide:function(){return M},temporaryConfigStore:function(){return Mt},validator:function(){return p},validators:function(){return Zt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),d=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!c(p,n)||!st(n[p],e[p],h,d))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])}));function ft(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?ft(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ht,dt,pt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():ft(t,[],[],!0)})),vt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},yt=n((function(t){return!!vt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),gt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),mt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),bt=mt,wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t=l((function(t,e,n){if("function"==typeof t&&(t=new gt(t)),yt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return h(t,e,n,"fantasy-land/reduce");if(null!=n[wt])return f(t,e,n[wt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return h(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),St=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),xt=l((function t(e,n,r){return St((function(n,r,o){return d(r)&&d(o)?t(e,r,o):e(n,r,o)}),n,r)})),Ot=r((function(t,e){return xt((function(t,e,n){return n}),t,e)}));(dt=ht||(ht={})).Array="Array",dt.Boolean="Boolean",dt.ConceptUuid="ConceptUuid",dt.Number="Number",dt.Object="Object",dt.String="String",dt.UUID="UUID",dt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",dt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var jt=p((function(t){return Array.isArray(t)}),"must be an array"),Et=p((function(t){return"boolean"==typeof t}),"must be a boolean"),kt=p((function(t){return"number"==typeof t}),"must be a number"),At=p((function(t){return"string"==typeof t}),"must be a string"),Ct=p((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Pt=p((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Tt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Rt=(0,Tt.createGlobalStore)("config-internal",It),Dt=v();Rt.subscribe((function(t){var e;t.devDefaultsAreOn!=Dt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Dt=t.devDefaultsAreOn)}));var Mt=(0,Tt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Mt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Lt=(0,Tt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Bt=(0,Tt.createGlobalStore)("config-implementer-tools",{config:{}});function Nt(t){return t.hasOwnProperty("_default")?j({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Nt(t[n]),e}),{}):{}}function $t(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=$t(t[r],e),n}),{}):{_value:t,_source:e}}function Ut(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ut(t,c,a);var s=c._elements;if(W(s)&&Ut(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var d,p=c._validators[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(ht).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ht).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ht.Array,ht.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Ft(t,e,n){V(n,t._type,e),G(e)?t._type===ht.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===ht.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Ft(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Kt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ht.Object&&t._elements?Kt(t._elements,s,l):Kt(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Kt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return C(t,Mt.getState())})),Mt.subscribe((function(t){return C(Rt.getState(),t)})),T(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return T(t,Mt.getState())})),Mt.subscribe((function(t){return T(Rt.getState(),t)})),P(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return P(t,Mt.getState())})),Mt.subscribe((function(t){return P(Rt.getState(),t)})),I(Rt.getState(),Lt.getState(),Mt.getState()),Rt.subscribe((function(t){I(t,Lt.getState(),Mt.getState())})),Lt.subscribe((function(t){I(Rt.getState(),t,Mt.getState())})),Mt.subscribe((function(t){I(Rt.getState(),Lt.getState(),t)}));var zt=function(t,e,n){var r=pt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ht.Array&&Array.isArray(u)){var l=u.map((function(t){return zt(s,t,n)}));r[i]=l}else if(a._type===ht.Object){var f=!0,h=!1,d=void 0;try{for(var p,v=Object.keys(u)[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){var y=p.value;u[y]=zt(s,u[y],n)}}catch(t){h=!0,d=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw d}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=zt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Ht=i(645),Vt=function(t,e){return p((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},qt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return p((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Wt=qt([]),Gt=function(t){return p((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:Vt,isUrl:Wt,isUrlWithTemplateParameters:qt,oneOf:Gt}}(),u}())}}}))},674:function(){System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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 t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});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}())}}}))},3103:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},a=function(t){window.dispatchEvent(new CustomEvent(p,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",p="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},2991:function(t){"use strict";t.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>'},1662:function(t){"use strict";t.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'},2865:function(t){"use strict";t.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'},7646:function(t){"use strict";t.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'},8509:function(t){"use strict";t.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:function(t){"use strict";t.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'},8142:function(t){"use strict";t.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>'},4451:function(t){"use strict";t.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'},6061:function(t){"use strict";t.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'},6076:function(t){"use strict";t.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'},6600:function(t){"use strict";t.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:function(t){"use strict";t.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'},6714:function(t){"use strict";t.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>'},6752:function(t){"use strict";t.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>'},1862:function(t){"use strict";t.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:function(t){"use strict";t.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'},7879:function(t){"use strict";t.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>'},6739:function(t){"use strict";t.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'},2524:function(t){"use strict";t.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'},2787:function(t){"use strict";t.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'},8592:function(t){"use strict";t.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'},8141:function(t){"use strict";t.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:function(t){"use strict";t.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>'},8885:function(t){"use strict";t.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'},1575:function(t){"use strict";t.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'},7093:function(t){"use strict";t.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'},7839:function(t){"use strict";t.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:function(t){"use strict";t.exports=d},9740:function(t){"use strict";t.exports=p},8685:function(t){"use strict";t.exports=v},7064:function(t){"use strict";t.exports=y},5954:function(t){"use strict";t.exports=g},493:function(t){"use strict";t.exports=m},4281:function(t){"use strict";t.exports=b},1792:function(t){"use strict";t.exports=w}},S={};function x(t){var e=S[t];if(void 0!==e)return e.exports;var n=S[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,x),n.loaded=!0,n.exports}x.y=i,x.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return x.d(e,{a:e}),e},x.d=function(t,e){for(var n in e)x.o(e,n)&&!x.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),x.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},x.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},x.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;x.g.importScripts&&(t=x.g.location+"");var e=x.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=t}();var O={};return(0,x(2584).s)(1),function(){"use strict";var r=function(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,Nr.appendChild(n))},i=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},d=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var u=t.apply(e,n);function a(t){i(u,r,o,a,c,"next",t)}function c(t){i(u,r,o,a,c,"throw",t)}a(void 0)}))}},p=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(t){return!1}},v=function(t,e){return!e||"object"!==Uo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},m=function(t,e,n){var r=O(t,e,n);ei.length?ei.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))},b=function(t){if("function"!=typeof t)throw Error(S(28,!1));ei.push(t)},w=function(t){if("function"!=typeof t)throw Error(S(29,!1));var e=!1;return ei=ei.filter((function(n){var r=n===t;return e=e||r,!r})),e},S=function(t,e){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(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},O=function(t,e,n){var r,o,i,u="".concat(C(e)," '").concat(k(e),"' died in status ").concat(e.status,": ");if(o=t,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):c(o,i)){try{t.message=u+t.message}catch(t){}r=t}else{console.warn(S(30,!1,e.status,k(e)));try{r=Error(u+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=k(e),e.status=n,r},j=function(t){return t.status===ci},E=function(t){try{return t.activeWhen(window.location)}catch(e){return m(e,t,hi),!1}},k=function(t){return t.name},A=function(t){return Boolean(t.unmountThisParcel)},C=function(t){return A(t)?"parcel":"application"},P=function(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]},T=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},I=function(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!T(e,(function(t){return"function"!=typeof t}))));var e},R=function(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=C(t),o=k(t);return function(t){return n.reduce((function(n,i,u){return n.then((function(){var n=i(t);return D(n)?n:Promise.reject(S(15,!1,r,o,e,u))}))}),Promise.resolve())}},D=function(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch},M=function(t,e){var n=function(){return t.status=ui,t};return Promise.resolve().then((function(){return t.status!==oi?t:(t.status=ii,t.bootstrap?q(t,"bootstrap").then(n).catch((function(n){if(e)throw O(n,t,hi);return m(n,t,hi),t})):Promise.resolve().then(n))}))},L=function(t,e){return Promise.resolve().then((function(){var n=function(){return q(t,"unmount").then((function(){t.status=ui})).catch((function(n){if(e)throw O(n,t,hi);m(n,t,hi)}))};if(t.status!==ci)return t;t.status=li;var r=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(e)throw O(n,t,hi);m(n,t,hi)}))})).then((function(){return t}))}))},B=function(t,e){return Promise.resolve().then((function(){return t.status!==ui?t:(di||(window.dispatchEvent(new ti("single-spa:before-first-mount")),di=!0),q(t,"mount").then((function(){return t.status=ci,pi||(window.dispatchEvent(new ti("single-spa:first-mount")),pi=!0),t})).catch((function(n){var r=function(){if(e)throw O(n,t,hi);return m(n,t,hi),t};return t.status=ci,L(t,!0).then(r,r)})))}))},N=function(){return $.apply(yi,arguments)},$=function(t,e){var n=this;if(!t||"object"!==Yo(t)&&"function"!=typeof t)throw Error(S(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(S(3,!1,Yo(t.name)));if("object"!==Yo(e))throw Error(S(4,!1,name,Yo(e)));if(!e.domElement)throw Error(S(5,!1,name));var r,o=vi++,i="function"==typeof t,u=i?t:function(){return Promise.resolve(t)},a={id:o,parcels:{},status:i?ri:oi,customProps:e,parentName:k(n),unmountThisParcel:function(){return h.then((function(){if(a.status!==ci)throw Error(S(6,!1,name,a.status));return L(a,!0)})).then((function(t){return a.parentName&&delete n.parcels[a.id],t})).then((function(t){return s(t),t})).catch((function(t){throw a.status=hi,l(t),t}))}};n.parcels[o]=a;var c=u();if(!c||"function"!=typeof c.then)throw Error(S(7,!1));var s,l,f=(c=c.then((function(t){if(!t)throw Error(S(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!I(t.bootstrap))throw Error(S(9,!1,e));if(!I(t.mount))throw Error(S(10,!1,e));if(!I(t.unmount))throw Error(S(11,!1,e));if(t.update&&!I(t.update))throw Error(S(12,!1,e));var n=R(t,"bootstrap"),i=R(t,"mount"),u=R(t,"unmount");a.status=oi,a.name=e,a.bootstrap=n,a.mount=i,a.unmount=u,a.timeouts=W(t.timeouts),t.update&&(a.update=R(t,"update"),r.update=function(t){return a.customProps=t,U((e=a,Promise.resolve().then((function(){if(e.status!==ci)throw Error(S(32,!1,k(e)));return e.status=si,q(e,"update").then((function(){return e.status=ci,e})).catch((function(t){throw O(t,e,hi)}))}))));var e})}))).then((function(){return M(a,!0)})),h=f.then((function(){return B(a,!0)})),d=new Promise((function(t,e){s=t,l=e}));return r={mount:function(){return U(Promise.resolve().then((function(){if(a.status!==ui)throw Error(S(13,!1,name,a.status));return n.parcels[o]=a,B(a)})))},unmount:function(){return U(a.unmountThisParcel())},getStatus:function(){return a.status},loadPromise:U(c),bootstrapPromise:U(f),mountPromise:U(h),unmountPromise:U(d)}},U=function(t){return t.then((function(){return null}))},F=function(t){var e=k(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==Yo(n)||null===n||Array.isArray(n))&&(n={},console.warn(S(40,!1),e,n));var r=P({},n,{name:e,mountParcel:$.bind(t),singleSpa:Jo});return A(t)&&(r.unmountSelf=t.unmountThisParcel),r},K=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(S(16,!1));gi.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},z=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(S(17,!1));gi.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},H=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(S(18,!1));gi.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},V=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(S(19,!1));gi.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},q=function(t,e){var n=t.timeouts[e],r=n.warningMillis,o=C(t);return new Promise((function(i,u){var a=!1,c=!1;t[e](F(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var s=S(31,!1,e,o,k(t),n.millis);function l(t){if(!a)if(!0===t)c=!0,n.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var e=t,o=e*r;console.warn(s),o+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))},W=function(t){var e={};for(var n in gi)e[n]=P({},gi[n],t&&t[n]||{});return e},G=function(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==ni&&t.status!==fi?t:(t.status=ri,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(F(t));if(!D(r))throw n=!0,Error(S(33,!1,k(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==Yo(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!I(e.bootstrap)&&(r=35),I(e.mount)||(r=36),I(e.unmount)||(r=37);var o=C(e);if(r){var i;try{i=JSON.stringify(e)}catch(t){}return console.error(S(r,!1,o,k(t),i),e),m(void 0,t,hi),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=P({},t.devtools.overlays,e.devtools.overlays)),t.status=oi,t.bootstrap=R(e,"bootstrap"),t.mount=R(e,"mount"),t.unmount=R(e,"unmount"),t.unload=R(e,"unload"),t.timeouts=W(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=hi:(r=fi,t.loadErrorTime=(new Date).getTime()),m(e,t,r),t})));var e,n}))},Z=function(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(S(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=tt(window.location.href),r=tt(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)},J=function(t){var e=this;if(t){var n=t[0].type;wi.indexOf(n)>=0&&bi[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}},Y=function(){Ci([],arguments)},Q=function(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Qo&&n===o||(_t()?window.dispatchEvent(X(window.history.state,e)):Ci([])),r}},X=function(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n},tt=function(t){var e=document.createElement("a");return e.href=t,e},et=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!xi){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return nt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return nt.call(this,n,window.removeEventListener,t,e,arguments)},xi=!0}},nt=function(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){wi.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))},rt=function(t){return Promise.resolve().then((function(){var e=Oi[k(t)];if(!e)return t;if(t.status===ni)return ot(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==ui&&t.status!==fi)return t;var n=t.status===fi?Promise.resolve():q(t,"unload");return t.status="UNLOADING",n.then((function(){return ot(t,e),t})).catch((function(n){return o=e,i=n,delete Oi[k(r=t)],delete r.bootstrap,delete r.mount,delete r.unmount,delete r.unload,m(i,r,hi),o.reject(i),t;var r,o,i}))}))},ot=function(t,e){delete Oi[k(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=ni,e.resolve()},it=function(t,e,n,r){Oi[k(t)]={app:t,resolve:n,reject:r},Object.defineProperty(Oi[k(t)],"promise",{get:e})},ut=function(t){return Oi[t]},at=function(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return ji.forEach((function(i){var u=i.status!==hi&&E(i);switch(i.status){case fi:u&&o-i.loadErrorTime>=200&&n.push(i);break;case ni:case ri:u&&n.push(i);break;case oi:case ui:!u&&ut(k(i))?t.push(i):u&&r.push(i);break;case ci:u||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}},ct=function(){return ji.filter(j).map(k)},st=function(){return ji.map(k)},lt=function(t){var e=T(ji,(function(e){return k(e)===t}));return e?e.status:null},ft=function(t,e,n,r){var o=function(t,e,n,r){var o,i,u,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Yo(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(S(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(S(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(S(20,!1));if("object"!==Yo(t.app)&&"function"!=typeof t.app)throw Error(S(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(S(24,!1));if(!yt(t.customProps))throw Error(S(22,!1))}(t),a.name=t.name,a.loadApp=t.app,a.activeWhen=t.activeWhen,a.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(S(20,!1));if(!e)throw Error(S(23,!1));if("function"!=typeof n)throw Error(S(24,!1));if(!yt(r))throw Error(S(22,!1))}(t,e,n,r),a.name=t,a.loadApp=e,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?function(){return Promise.resolve(o)}:o,a.customProps=a.customProps||{},a.activeWhen=(i=a.activeWhen,u=(u=Array.isArray(i)?i:[i]).map((function(t){return"function"==typeof t?t:gt(t)})),function(t){return u.some((function(e){return e(t)}))}),a}(t,e,n,r);if(-1!==st().indexOf(o.name))throw Error(S(21,!1,o.name));ji.push(P({loadErrorTime:null,status:ni,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),mi&&(et(),Ci())},ht=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return ji.filter((function(e){return e.activeWhen(t)})).map(k)},dt=function(t){if(0===ji.filter((function(e){return k(e)===t})).length)throw Error(S(25,!1,t));return pt(t).then((function(){var e=ji.map(k).indexOf(t);ji.splice(e,1)}))},pt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(S(26,!1));var n=T(ji,(function(e){return k(e)===t}));if(!n)throw Error(S(27,!1,t));var r,o=ut(k(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){it(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,vt(n,o.resolve,o.reject)):r=new Promise((function(t,e){it(n,(function(){return r}),t,e),vt(n,t,e)})),r},vt=function(t,e,n){L(t).then(rt).then((function(){e(),setTimeout((function(){Ci()}))})).catch(n)},yt=function(t){return!t||"function"==typeof t||"object"===Yo(t)&&null!==t&&!Array.isArray(t)},gt=function(t,e){var n=function(t,e){var n=function(n){var u=t.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":u,n===t.length)if(o)e&&(i+="$");else{var a=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(a,"$"):"".concat(i,"(/").concat(a,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var u=0;u<t.length;u++){var a=t[u];(!o&&":"===a||o&&"/"===a)&&n(u)}return n(t.length),new RegExp(i,"i")}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}},mt=function(){return Ci()},bt=function(t,e){return E(t)?M(t).then((function(t){return e.then((function(){return E(t)?B(t):t}))})):e.then((function(){return t}))},wt=function(t){var e;Pi=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,Qo=e),mi&&Ci()},_t=function(){return Pi},St=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},xt=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},Ot=function(t){return function e(n){return 0===arguments.length||xt(n)?e:t.apply(this,arguments)}},jt=function(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return xt(n)?e:Ot((function(e){return t(n,e)}));default:return xt(n)&&xt(r)?e:xt(n)?Ot((function(e){return t(e,r)})):xt(r)?Ot((function(e){return t(n,e)})):t(n,r)}}},Et=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},kt=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},At=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},Ct=function(t,e,n,r){var o=function(t,e){return Hi(t,e,n.slice(),r.slice())},i=Et(t);return!kt((function(t,e){return!kt(o,e,t)}),Et(e),i)},Pt=function(t){return function e(n,r,o){switch(arguments.length){case 0:return e;case 1:return xt(n)?e:jt((function(e,r){return t(n,e,r)}));case 2:return xt(n)&&xt(r)?e:xt(n)?jt((function(e,n){return t(e,r,n)})):xt(r)?jt((function(e,r){return t(n,e,r)})):Ot((function(e){return t(n,r,e)}));default:return xt(n)&&xt(r)&&xt(o)?e:xt(n)&&xt(r)?jt((function(e,n){return t(e,n,o)})):xt(n)&&xt(o)?jt((function(e,n){return t(e,r,n)})):xt(r)&&xt(o)?jt((function(e,r){return t(n,e,r)})):xt(n)?Ot((function(e){return t(e,r,o)})):xt(r)?Ot((function(e){return t(n,e,o)})):xt(o)?Ot((function(e){return t(n,r,e)})):t(n,r,o)}}},Tt=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},It=function(t,e,n,r){return t["@@transducer/result"](n[r](eu(t["@@transducer/step"],t),e))},Rt=function(t){return"[object Object]"===Object.prototype.toString.call(t)},Dt=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},Mt=function(t){return(0,po.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},Lt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Bt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Nt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Bt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},$t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||Ft(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ut=function(t){return function(t){if(Array.isArray(t))return Lt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ft(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.")}()},Ft=function(t,e){if(t){if("string"==typeof t)return Lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}},Kt=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=Zt(a,t,e);Mt(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},zt=function(t,e){var n,r,o=(n=Yt(Gt(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=$t(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,d=Object.entries(c)[Symbol.iterator]();!(s=(h=d.next()).done);s=!0){var p=$t(h.value,2),v=p[0];Wt(p[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return Nt({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=$t(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=(0,po.getGlobalStore)("config-extension-slots",{slots:{}}),a=u.getState(),c={slots:Nt({},a.slots,i)};qi(a,c)||u.setState(c)},Ht=function(t,e){var n=function(t,e){var n=_u(Zi(t.schemas)),r=Ut(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=$t(a.value,2);n=Yt([n,Su(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);wu.setState({config:n})},Vt=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=qt(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=Nt({},r[s.slotName],Bt({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}(0,po.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})},qt=function(t,e,n,r,o,i){var u,a,c,s,l=$t(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,d=Gt(o,i),p=Jt(t,d),v=null!==(s=null==p||null===(u=p.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=Yt([Jt(h,d),v]),g=null!=f?f:o.schemas[e];Qt(g,y,h);var m=ju(g,y,o.devDefaultsAreOn);return Ou(g,m,h),delete m.extensionSlots,m},Wt=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(ne(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},Gt=function(t,e){return Ut(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},Zt=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=Jt(t,Gt(e,n));Qt(r,o,t);var i=ju(r,o,e.devDefaultsAreOn);return Ou(r,i,t),delete i.extensionSlots,i},Jt=function(t,e){var n=e.map((function(e){return e[t]})).filter((function(t){return!!t}));return Yt(n)},Yt=function(t){return ru(cu)({},t)},Qt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?xu(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},Xt=function(t,e,n){e&&te(t,[{Array:su,Boolean:lu,ConceptUuid:pu,Number:fu,Object:du,String:hu,UUID:pu,PersonAttributeTypeUuid:pu,PatientIdentifierTypeUuid:pu}[e]],n)},te=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},ee=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},ne=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},re=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},oe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ie=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ue=function(t){var e=this.__data__=new Pu(t);this.size=e.size},ae=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ju;++e<n;)this.add(t[e])},ce=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},se=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var d=f.value;e.push({slotModuleName:d.slotModuleName,extensionModuleName:a.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}ic(so.configExtensionStore.getState().mountedExtensions,e)||so.configExtensionStore.setState({mountedExtensions:e})},le=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},fe=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},he=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){fe(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},de=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||ve(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},pe=function(t){return function(t){if(Array.isArray(t))return le(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ve(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.")}()},ve=function(t,e){if(t){if("string"==typeof t)return le(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(t,e):void 0}},ye=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=de(a.value,2),l=s[0],f=s[1],h=be(l,t,(0,so.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}ic(sc.getState().slots,r)||sc.setState({slots:r})},ge=function(t){return de(t.split("#"),1)[0]},me=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},be=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=cc.getState().extensions,pe(i).concat(pe(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=me(t,c,null===(n=s[ge(t)])||void 0===n?void 0:n.order,i),u=me(e,c,null===(r=s[ge(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=!0,d=!1,p=void 0;try{for(var v,y=l[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var g=v.value,m=(0,so.getExtensionConfigFromStore)(r,t,g).config,b=ge(g),w=e.extensions[b];w&&f.push({id:g,name:b,moduleName:w.moduleName,config:m,meta:w.meta,online:w.online,offline:w.offline})}}catch(t){d=!0,p=t}finally{try{h||null==y.return||y.return()}finally{if(d)throw p}}return f},we=function(t,e){return"object"!=typeof e||dc(e).forEach((function(n){t[n]=e[n]})),t},_e=function(t,e){return yc.call(t,e)},Se=function(t,e){"function"==typeof e&&(e=e(vc(t))),("undefined"==typeof Reflect?dc:Reflect.ownKeys)(e).forEach((function(n){xe(t,n,e[n])}))},xe=function(t,e,n,r){gc(t,e,we(n&&_e(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},Oe=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),xe(t.prototype,"constructor",t),{extend:Se.bind(null,t.prototype)}}}},je=function(t,e,n){return wc.call(t,e,n)},Ee=function(t,e){return e(t)},ke=function(t){if(!t)throw new Error("Assertion Failed")},Ae=function(t){hc.setImmediate?setImmediate(t):setTimeout(t,0)},Ce=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},Pe=function(t){var e={};for(var n in t)_e(t,n)&&(e[n]=t[n]);return e},Te=function(t){return xc.apply([],t)},Ie=function(t){Ec="undefined"!=typeof WeakMap&&new WeakMap;var e=kc(t);return Ec=null,e},Re=function(t){return Ac.call(t).slice(8,-1)},De=function(t){var e,n,r,o;if(1===arguments.length){if(pc(t))return t.slice();if(this===Tc&&"string"==typeof t)return[t];if(o=Pc(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},Me=function(t,e){Rc=t,Dc=e},Le=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(Dc).map((function(t){return"\n"+t})).join("")):""},Be=function(t,e){this._e=Lc(),this.name=t,this.message=e},Ne=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},$e=function(t,e,n,r){this._e=Lc(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Ne(t,e)},Ue=function(t,e){this._e=Lc(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=Ne(t,e)},Fe=function(){},Ke=function(t){return t},ze=function(t,e){return null==t||t===Ke?e:function(n){return e(t(n))}},He=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},Ve=function(t,e){return t===Fe?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?He(r,this.onsuccess):r),o&&(this.onerror=this.onerror?He(o,this.onerror):o),void 0!==i?i:n}},qe=function(t,e){return t===Fe?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?He(n,this.onsuccess):n),r&&(this.onerror=this.onerror?He(r,this.onerror):r)}},We=function(t,e){return t===Fe?e:function(n){var r=t.apply(this,arguments);we(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?He(o,this.onsuccess):o),i&&(this.onerror=this.onerror?He(i,this.onerror):i),void 0===r?void 0===u?void 0:u:we(r,u)}},Ge=function(t,e){return t===Fe?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},Ze=function(t,e){return t===Fe?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},Je=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Fe,this._lib=!1;var e=this._PSD=ss;if(Rc&&(this._stackHolder=Lc(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Vc)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Qe(this,this._value))}this._state=null,this._value=null,++e.ref,ps(this,t)},Ye=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},Qe=function(t,e){if(is.push(e),null===t._state){var n=t._lib&&on();e=as(e),t._state=!1,t._value=e,Rc&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=bc(e,"stack");e._promise=t,xe(e,"stack",{get:function(){return Xc?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,os.some((function(t){return t._value===r._value}))||os.push(r),Xe(t),n&&un()}var r},Xe=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)tn(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===fs&&(++fs,es((function(){0==--fs&&an()}),[]))},tn=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++fs,es(en,[n,t,e])}else t._listeners.push(e)},en=function(t,e,n){try{us=e;var r,o=e._value;e._state?r=t(o):(is.length&&(is=[]),r=t(o),-1===is.indexOf(o)&&function(t){for(var e=os.length;e;)if(os[--e]._value===t._value)return void os.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{us=null,0==--fs&&an(),--n.psd.ref||n.psd.finalize()}},nn=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},rn=function(){on()&&un()},on=function(){var t=ns;return ns=!1,rs=!1,t},un=function(){var t,e,n;do{for(;ls.length>0;)for(t=ls,ls=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(ls.length>0);ns=!0,rs=!0},an=function(){var t=os;os=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=hs.slice(0),n=e.length;n;)e[--n]()},cn=function(t){return new Je(Vc,!1,t)},sn=function(t,e){var n=ss;return function(){var r=on(),o=ss;try{return yn(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{yn(o,!1),r&&un()}}},ln=function(t,e,n,r){var o=ss,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++_s;var u=cs.env;i.env=Qc?{Promise:Je,PromiseProp:{value:Je,configurable:!0,writable:!0},all:Je.all,race:Je.race,allSettled:Je.allSettled,any:Je.any,resolve:Je.resolve,reject:Je.reject,nthen:_n(u.nthen,i),gthen:_n(u.gthen,i)}:{},e&&we(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=mn(i,t,n,r);return 0===i.ref&&i.finalize(),a},fn=function(){return ys.id||(ys.id=++gs),++ys.awaits,ys.echoes+=100,ys.id},hn=function(){return!!ys.awaits&&(0==--ys.awaits&&(ys.id=0),ys.echoes=100*ys.awaits,!0)},dn=function(t){return ys.echoes&&t&&t.constructor===Yc?(fn(),t.then((function(t){return hn(),t}),(function(t){return hn(),Ss(t)}))):t},pn=function(t){++ws,ys.echoes&&0!=--ys.echoes||(ys.echoes=ys.id=0),ms.push(ss),yn(t,!0)},vn=function(){var t=ms[ms.length-1];ms.pop(),yn(t,!1)},yn=function(t,e){var n=ss;if((e?!ys.echoes||bs++&&t===ss:!bs||--bs&&t===ss)||bn(e?pn.bind(null,t):vn),t!==ss&&(ss=t,n===cs&&(cs.env=gn()),Qc)){var r=cs.env.Promise,o=t.env;Gc.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(hc,"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))}},gn=function(){var t=hc.Promise;return Qc?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(hc,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Gc.then,gthen:t.prototype.then}:{}},mn=function(t,e,n,r,o){var i=ss;try{return yn(t,!0),e(n,r,o)}finally{yn(i,!1)}},bn=function(t){Jc.call(Wc,t)},wn=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=ss;n&&fn(),yn(e,!0);try{return t.apply(this,arguments)}finally{yn(o,!1),r&&bn(hn)}}},_n=function(t,e){return function(n,r){return t.call(this,wn(n,e),wn(r,e))}},Sn=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(hc.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),we(r,o)):hc.CustomEvent&&we(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&hc.dispatchEvent&&(dispatchEvent(r),!hc.PromiseRejectionEvent&&hc.onunhandledrejection))try{hc.onunhandledrejection(r)}catch(t){}Rc&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},xn=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},On=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=Ie(e))[t],e}},jn=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=Ge),o||(o=Fe);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){dc(t).forEach((function(e){var n=t[e];if(pc(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Kc.InvalidArgument("Invalid event config");var r=i(e,Ke,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){Ae((function(){t.apply(null,e)}))}))}))}}))}},En=function(t,e){return Oe(e).from({prototype:t}),e},kn=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},An=function(t,e){t.filter=xn(t.filter,e)},Cn=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return xn(r(),e())}:e,t.justLimit=n&&!r},Pn=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Kc.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},Tn=function(t,e,n){var r=Pn(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},In=function(t,e,n,r){var o=t.replayFilter?xn(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),_e(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Rn(Tn(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Rn(Tn(t,r,n),xn(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Rn=function(t,e,n,r){var o=sn(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=Fe}),(function(e){t.fail(e),n=Fe}))||o(t.value,t,(function(t){return n=t})),n()}))}))},Dn=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=Re(t);return"ArrayBuffer"===n?"binary":n},Mn=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Ln=function(t,e){return t<e?-1:t===e?0:1},Bn=function(t,e){return t>e?-1:t===e?0:1},Nn=function(t,e,n){var r=c(t,Ls)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},$n=function(t){return new t.Collection(t,(function(){return zn("")})).limit(0)},Un=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Fn=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Nn(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?Ln:Bn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var d=new t.Collection(t,(function(){return Kn(a[0],c[f-1]+r)}));d._ondirectionchange=function(t){h(t)};var p=0;return d._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,p))return!0;for(var d=null,v=p;v<f;++v){var y=Un(o,h,a[v],c[v],u,s);null===y&&null===d?p=v+1:(null===d||u(d,y)>0)&&(d=y)}return n(null!==d?function(){t.continue(d+l)}:r),!1})),d},Kn=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},zn=function(t){return{type:1,lower:t,upper:t}},Hn=function(t){return sn((function(e){return Vn(e),t(e.target.error),!1}))},Vn=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},qn=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+Wn(e)}},Wn=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},Gn=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:Ce(n,(function(t){return[t.name,t]}))}},Zn=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return _c(t,e)}:function(e){return _c(e,t)};var e},Jn=function(t){return[].slice.call(t)},Yn=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},Qn=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,d=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=Jn((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=pc(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:Zn(e)},indexes:Jn(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:pc(o),keyPath:o,unique:n,multiEntry:r,extractKey:Zn(o)};return i[Yn(o)]=u,u})),getIndexByKeyPath:function(t){return i[Yn(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[Yn(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=sn(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var d,p=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,Vn(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(d=s.clear()):v.push(d=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<p;++S)v.push(d=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),d.onerror=m;else for(var x=0;x<p;++x)v.push(d=s[n](w[x])),d.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};d.onerror=function(t){m(t),O(t)},d.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=sn(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=Hn(r),d=0;d<a;++d)null!=n[d]&&((i=u.get(n[d]))._pos=d,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=sn(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=Hn(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=sn(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,d=u.objectStore(o),p=f.isPrimaryKey?d:d.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?p.getAll(v,l):p.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=Hn(i)}else{var g=0,m=a||!("openKeyCursor"in p)?p.openCursor(v):p.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=Hn(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=sn(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),d=u?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in h)?h.openCursor(r(l),d):h.openKeyCursor(r(l),d);p.onerror=Hn(c),p.onsuccess=sn((function(n){var r=p.result;if(r){r.___id=++Us,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=sn(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=sn(t),p.onerror=Hn(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(p.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=sn((function(t){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=sn((function(e){return t(e.target.result)})),l.onerror=Hn(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:$s(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=d.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},Xn=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=bc(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?xe(e,t,{get:function(){return this.table(t)},set:function(e){gc(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},tr=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},er=function(t,e){return t._cfg.version-e._cfg.version},nr=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ks)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},rr=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return or(o,t)})),o},or=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},ir=function(t,e,n){var r={};return je(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=qn(Wn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=qn(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=Gn(t,i,u)})),r},ur=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+je(f).join("+")+"]";if(e[u]){var d=e[u].idxByName[h];d&&(d.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&hc.WorkerGlobalScope&&c(hc,hc.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},ar=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Ys("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},cr=function(t){return t&&"function"==typeof t.databases},sr=function(t){return ln((function(){return ss.letThrough=!0,t()}))},lr=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},fr=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):pc(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},hr=function(t,e,n){var r=arguments.length;if(r<2)throw new Kc.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=Te(o);return[t,i,n]},dr=function(t,e,n){for(var r=pc(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},pr=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===Rs(e.keys[o],t[i])&&(r.push(n?Ie(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},vr=function(t){return!("from"in t)},yr=function(t,e){vr(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Gs(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},gr=function(t){var e=vr(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&Rs(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||Rs(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},mr=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=br(u)}t.d=br(t)},br=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},wr=function(t,e){return dc(e).forEach((function(n){yr(t[n]||(t[n]=new Ws),e[n])})),t},_r=function(t){var e=el;try{el=!0,Bs.storagemutated.fire(t)}finally{el=e}},Sr=function(t,e){return!e||"object"!==ul(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},xr=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},Or=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},jr=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},Er=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},kr=function(){},Ar=function(t,e){if(!e)return t&&t.then?t.then(kr):Promise.resolve()},Cr=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Pr=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Tr=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,lo.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return Cr(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cr(t,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,lo.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var u={};return e&&(u=(0,lo.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Pr(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,u)}},Ir=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,c(e,n)?e:new n((function(t){t(e)}))).then(u,a)}s((r=r.apply(t,e||[])).next())}))},Rr=function(t,e){var n,r,o,i,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;function a(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=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Dr=x(8885),Mr=x(7093),Lr=x(1575),Br=x(7839),Nr=document.createElement("div"),$r=function(){document.body.appendChild(Nr)};Nr.id="omrs-svgs-container",Nr.style.display="none","complete"===document.readyState?$r():window.addEventListener("load",$r);var Ur=x(8141),Fr=x(6739),Kr=x(2787),zr=x(2865),Hr=x(8509),Vr=x(7646),qr=x(250),Wr=x(6076),Gr=x(6600),Zr=x(40),Jr=x(6061),Yr=x(8592),Qr=x(1862),Xr=x(6714),to=x(601),eo=x(8142),no=x(2991),ro=x(1662),oo=x(2524),io=x(4451),uo=x(647),ao=x(7879),co=x(6752),so=x(9714),lo=x(5954),fo=(x(493),x(1792));new fo.Subject,new fo.Subject;var ho=x(45),po=x(8685);(0,po.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,x(9740),(0,po.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),x(4281);var vo=x(2980),yo=x.n(vo),go="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,mo="object"==typeof self&&self&&self.Object===Object&&self,bo=go||mo||Function("return this")(),wo=bo.Symbol,_o=Object.prototype,So=_o.hasOwnProperty,xo=_o.toString,Oo=wo?wo.toStringTag:void 0,jo=Object.prototype.toString,Eo=wo?wo.toStringTag:void 0,ko=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Eo&&Eo in Object(t)?function(t){var e=So.call(t,Oo),n=t[Oo];try{t[Oo]=void 0;var r=!0}catch(t){}var o=xo.call(t);return r&&(e?t[Oo]=n:delete t[Oo]),o}(t):(e=t,jo.call(e));var e},Ao=function(t,e){return function(n){return t(e(n))}},Co=Ao(Object.getPrototypeOf,Object),Po=function(t){return null!=t&&"object"==typeof t},To=Function.prototype,Io=Object.prototype,Ro=To.toString,Do=Io.hasOwnProperty,Mo=Ro.call(Object),Lo=function(t){if(!Po(t)||"[object Object]"!=ko(t))return!1;var e=Co(t);if(null===e)return!0;var n,r,o=Do.call(e,"constructor")&&e.constructor;return"function"==typeof o&&(n=o,null!=(r=o)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):c(n,r))&&Ro.call(o)==Mo};function Bo(t,e,n){return(Bo=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&$o(o,n.prototype),o}).apply(null,arguments)}function No(t){return(No=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $o(t,e){return($o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Uo=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};function Fo(t){var e="function"==typeof Map?new Map:void 0;return Fo=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Bo(t,arguments,No(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$o(r,t)},Fo(t)}var Ko,zo,Ho,Vo,qo,Wo="/ws/rest/v1/session",Go=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$o(t,e)}(o,t);var e,n,r=(e=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(t){return!1}}(),function(){var t,r=No(e);if(n){var o=No(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function o(t,e,n,i){var u;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(u=r.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),i.message=u.message,u.responseBody=n,u.response=e,u.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(Fo(Error));x(245)({baseUrl:"/ws/fhir2/R4"},{http:function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),Lo(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=d(yo().mark((function t(e){var r,i;return yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,so.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(Wo)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,so.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Go(n,r,e,o)}),(function(t){throw new Go(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))}(t.url,{method:t.method,headers:t.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:t}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:t}}))}}),x(674),(0,po.createGlobalStore)("session",{loaded:!1,session:null}),new fo.BehaviorSubject(null),(qo=Ko||(Ko={})).NEWVISIT="startVisit",qo.EDITVISIT="editVisit",qo.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(zo||(zo={})),x(6066),(Vo=Ho||(Ho={})).Array="Array",Vo.Boolean="Boolean",Vo.ConceptUuid="ConceptUuid",Vo.Number="Number",Vo.Object="Object",Vo.String="String",Vo.UUID="UUID",Vo.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Vo.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Zo=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Jo=Object.freeze({__proto__:null,get start(){return wt},get ensureJQuerySupport(){return et},get setBootstrapMaxTime(){return K},get setMountMaxTime(){return z},get setUnmountMaxTime(){return H},get setUnloadMaxTime(){return V},get registerApplication(){return ft},get unregisterApplication(){return dt},get getMountedApps(){return ct},get getAppStatus(){return lt},get unloadApplication(){return pt},get checkActivityFunctions(){return ht},get getAppNames(){return st},get pathToActiveWhen(){return gt},get navigateToUrl(){return Z},get triggerAppChange(){return mt},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return N},get NOT_LOADED(){return ni},get LOADING_SOURCE_CODE(){return ri},get NOT_BOOTSTRAPPED(){return oi},get BOOTSTRAPPING(){return ii},get NOT_MOUNTED(){return ui},get MOUNTING(){return ai},get UPDATING(){return si},get LOAD_ERROR(){return fi},get MOUNTED(){return ci},get UNMOUNTING(){return li},get SKIP_BECAUSE_BROKEN(){return hi}});function Yo(t){return(Yo="function"==typeof Symbol&&"symbol"==Zo(Symbol.iterator)?function(t){return void 0===t?"undefined":Zo(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":Zo(t)})(t)}var Qo,Xo=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==x.g?x.g:"undefined"!=typeof self?self:{}).CustomEvent,ti=function(){try{var t=new Xo("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?Xo:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},ei=[],ni="NOT_LOADED",ri="LOADING_SOURCE_CODE",oi="NOT_BOOTSTRAPPED",ii="BOOTSTRAPPING",ui="NOT_MOUNTED",ai="MOUNTING",ci="MOUNTED",si="UPDATING",li="UNMOUNTING",fi="LOAD_ERROR",hi="SKIP_BECAUSE_BROKEN",di=!1,pi=!1,vi=0,yi={parcels:{}},gi={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}},mi="undefined"!=typeof window,bi={hashchange:[],popstate:[]},wi=["hashchange","popstate"];if(mi){window.addEventListener("hashchange",Y),window.addEventListener("popstate",Y);var _i=window.addEventListener,Si=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&wi.indexOf(t)>=0)||T(bi[t],(function(t){return t===e})))return _i.apply(this,arguments);bi[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&wi.indexOf(t)>=0))return Si.apply(this,arguments);bi[t]=bi[t].filter((function(t){return t!==e}))},window.history.pushState=Q(window.history.pushState,"pushState"),window.history.replaceState=Q(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(S(41,!1)):window.singleSpaNavigate=Z}var xi=!1,Oi={},ji=[],Ei=!1,ki=[],Ai=mi&&window.location.href;function Ci(){var t=function(){p=!0},e=function(){return Promise.resolve().then((function(){var t=h.map(G);return Promise.all(t).then(o).then((function(){return[]})).catch((function(t){throw o(),t}))}))},n=function(){return Promise.resolve().then((function(){if(window.dispatchEvent(new ti(0===c.length?"single-spa:before-no-app-change":"single-spa:before-app-change",i(!0))),window.dispatchEvent(new ti("single-spa:before-routing-event",i(!0,{cancelNavigation:t}))),p)return window.dispatchEvent(new ti("single-spa:before-mount-routing-event",i(!0))),r(),void Z(v);var e=l.map(rt),n=f.map(L).map((function(t){return t.then(rt)})).concat(e),a=Promise.all(n);a.then((function(){window.dispatchEvent(new ti("single-spa:before-mount-routing-event",i(!0)))}));var s=h.map((function(t){return G(t).then((function(t){return bt(t,a)}))})),y=d.filter((function(t){return h.indexOf(t)<0})).map((function(t){return bt(t,a)}));return a.catch((function(t){throw o(),t})).then((function(){return o(),Promise.all(s.concat(y)).catch((function(t){throw u.forEach((function(e){return e.reject(t)})),t})).then(r)}))}))},r=function(){var t=ct();u.forEach((function(e){return e.resolve(t)}));try{var e=0===c.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new ti(e,i())),window.dispatchEvent(new ti("single-spa:routing-event",i()))}catch(t){setTimeout((function(){throw t}))}if(Ei=!1,ki.length>0){var n=ki;ki=[],Ci(n)}return t},o=function(){u.forEach((function(t){J(t.eventArguments)})),J(a)},i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(g(t={},ci,[]),g(t,ui,[]),g(t,ni,[]),g(t,hi,[]),t);e?(h.concat(d).forEach((function(t,e){u(t,ci)})),l.forEach((function(t){u(t,ni)})),f.forEach((function(t){u(t,ui)}))):c.forEach((function(t){u(t)}));var i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:c.length,originalEvent:null==a?void 0:a[0],oldUrl:v,newUrl:y,navigationIsCanceled:p}};return n&&P(i.detail,n),i;function u(t,e){var n=k(t);e=e||lt(n),r[n]=e,(o[e]=o[e]||[]).push(n)}},u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;if(Ei)return new Promise((function(t,e){ki.push({resolve:t,reject:e,eventArguments:a})}));var c,s=at(),l=s.appsToUnload,f=s.appsToUnmount,h=s.appsToLoad,d=s.appsToMount,p=!1,v=Ai,y=Ai=window.location.href;return _t()?(Ei=!0,c=l.concat(h,f,d),n()):(c=h,e())}var Pi=!1;mi&&setTimeout((function(){Pi||console.warn(S(1,!1))}),5e3);var Ti,Ii={getRawAppData:function(){return[].concat(ji)},reroute:Ci,NOT_LOADED:ni,toLoadPromise:G,toBootstrapPromise:M,unregisterApplication:dt};mi&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ii),St((function(t){if(!t||"string"!=typeof t)return!1;for(var e=/\${(.*?)}/g,n=e.exec(t);n;){if(!Ti.includes(n[1]))return!1;n=e.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+(Ti=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(t){return"${"+t+"}"})).join(", "));var Ri="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},Di=Object.prototype.toString,Mi=function(){return"[object Arguments]"===Di.call(arguments)?function(t){return"[object Arguments]"===Di.call(t)}:function(t){return At("callee",t)}}(),Li=Mi,Bi=!{toString:null}.propertyIsEnumerable("toString"),Ni=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],$i=function(){return arguments.propertyIsEnumerable("length")}(),Ui=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},Fi="function"!=typeof Object.keys||$i?Ot((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=$i&&Li(t);for(e in t)!At(e,t)||o&&"length"===e||(r[r.length]=e);if(Bi)for(n=Ni.length-1;n>=0;)At(e=Ni[n],t)&&!Ui(r,e)&&(r[r.length]=e),n-=1;return r})):Ot((function(t){return Object(t)!==t?[]:Object.keys(t)})),Ki=Ot((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)})),zi=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};function Hi(t,e,n,r){if(Ri(t,e))return!0;var o=Ki(t);if(o!==Ki(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":zi(t))!==(void 0===e?"undefined":zi(e))||!Ri(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!Ri(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===t)return r[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&Ct(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&Ct(t.values(),e.values(),n.concat([t]),r.concat([e]));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 u=Fi(t);if(u.length!==Fi(e).length)return!1;var a=n.concat([t]),c=r.concat([e]);for(i=u.length-1;i>=0;){var s=u[i];if(!At(s,e)||!Hi(e[s],t[s],a,c))return!1;i-=1}return!0}var Vi=jt((function(t,e){return Hi(t,e,[],[])})),qi=Vi;function Wi(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?Wi(t[a],e,n,!0):t[a];return o};switch(Ki(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var Gi,Zi=Ot((function(t){return null!=t&&"function"==typeof t.clone?t.clone():Wi(t,[],[],!0)})),Ji=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},Yi=Ot((function(t){return!!Ji(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),Qi=Yi,Xi=(Gi=function(t){this.f=t},Gi.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},Gi.prototype["@@transducer/result"]=function(t){return t},Gi.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},Gi),tu=jt((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),eu=tu,nu="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",ru=Pt((function(t,e,n){if("function"==typeof t&&(t=new Xi(t)),Qi(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return It(t,e,n,"fantasy-land/reduce");if(null!=n[nu])return Tt(t,e,n[nu]());if("function"==typeof n.next)return Tt(t,e,n);if("function"==typeof n.reduce)return It(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),ou=Pt((function(t,e,n){var r,o={};for(r in e)At(r,e)&&(o[r]=At(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)At(r,n)&&!At(r,o)&&(o[r]=n[r]);return o})),iu=ou,uu=Pt((function t(e,n,r){return iu((function(n,r,o){return Rt(r)&&Rt(o)?t(e,r,o):e(n,r,o)}),n,r)})),au=uu,cu=jt((function(t,e){return au((function(t,e,n){return n}),t,e)})),su=St((function(t){return Array.isArray(t)}),"must be an array"),lu=St((function(t){return"boolean"==typeof t}),"must be a boolean"),fu=St((function(t){return"number"==typeof t}),"must be a number"),hu=St((function(t){return"string"==typeof t}),"must be a string"),du=St((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),pu=St((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),vu={providedConfigs:[],schemas:{},devDefaultsAreOn:Dt()},yu=(0,po.createGlobalStore)("config-internal",vu),gu=Dt();yu.subscribe((function(t){var e;t.devDefaultsAreOn!=gu&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),gu=t.devDefaultsAreOn)}));var mu=(0,po.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});mu.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var bu=(0,po.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),wu=(0,po.createGlobalStore)("config-implementer-tools",{config:{}});function _u(t){return t.hasOwnProperty("_default")?Nt({},t,{_value:t._default,_source:"default"}):ne(t)?Object.keys(t).reduce((function(e,n){return e[n]=_u(t[n]),e}),{}):{}}function Su(t,e){return ne(t)?Object.keys(t).reduce((function(n,r){return n[r]=Su(t[r],e),n}),{}):{_value:t,_source:e}}function xu(t,e,n){Xt(n,t._type,e),ne(e)?t._type===Ho.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];Qt(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||Qt(t,e,n):t._type===Ho.Array&&function(t,e,n){if(ee(t._elements))for(var r=0;r<e.length;r++)xu(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;Xt("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Ou(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&te(n,t._validators,e),ne(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===Ho.Object&&t._elements?Ou(t._elements,s,l):Ou(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Ou(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}Kt(yu.getState(),mu.getState()),yu.subscribe((function(t){return Kt(t,mu.getState())})),mu.subscribe((function(t){return Kt(yu.getState(),t)})),Ht(yu.getState(),mu.getState()),yu.subscribe((function(t){return Ht(t,mu.getState())})),mu.subscribe((function(t){return Ht(yu.getState(),t)})),zt(yu.getState(),mu.getState()),yu.subscribe((function(t){return zt(t,mu.getState())})),mu.subscribe((function(t){return zt(yu.getState(),t)})),Vt(yu.getState(),bu.getState(),mu.getState()),yu.subscribe((function(t){Vt(t,bu.getState(),mu.getState())})),bu.subscribe((function(t){Vt(yu.getState(),t,mu.getState())})),mu.subscribe((function(t){Vt(yu.getState(),bu.getState(),t)}));var ju=function(t,e,n){var r=Zi(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&ee(s))if(a._type===Ho.Array&&Array.isArray(u)){var l=u.map((function(t){return ju(s,t,n)}));r[i]=l}else if(a._type===Ho.Object){var f=!0,h=!1,d=void 0;try{for(var p,v=Object.keys(u)[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){var y=p.value;u[y]=ju(s,u[y],n)}}catch(t){h=!0,d=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw d}}}}else if(ne(a)){var g=r.hasOwnProperty(i)?u:{};ne(g)&&(r[i]=ju(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Eu=function(t,e){return t===e||t!=t&&e!=e},ku=function(t,e){for(var n=t.length;n--;)if(Eu(t[n][0],e))return n;return-1},Au=Array.prototype.splice;re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(t){var e=this.__data__,n=ku(e,t);return!(n<0||(n==e.length-1?e.pop():Au.call(e,n,1),--this.size,0))},re.prototype.get=function(t){var e=this.__data__,n=ku(e,t);return n<0?void 0:e[n][1]},re.prototype.has=function(t){return ku(this.__data__,t)>-1},re.prototype.set=function(t,e){var n=this.__data__,r=ku(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Cu,Pu=re,Tu=function(t){var e,n=void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":h(e);return null!=t&&("object"==n||"function"==n)},Iu=function(t){if(!Tu(t))return!1;var e=ko(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ru=bo["__core-js_shared__"],Du=(Cu=/[^.]+$/.exec(Ru&&Ru.keys&&Ru.keys.IE_PROTO||""))?"Symbol(src)_1."+Cu:"",Mu=Function.prototype.toString,Lu=function(t){if(null!=t){try{return Mu.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Bu=/^\[object .+?Constructor\]$/,Nu=Function.prototype,$u=Object.prototype,Uu=Nu.toString,Fu=$u.hasOwnProperty,Ku=RegExp("^"+Uu.call(Fu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zu=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Tu(t)||(e=t,Du&&Du in e))&&(Iu(t)?Ku:Bu).test(Lu(t));var e}(n)?n:void 0},Hu=zu(bo,"Map"),Vu=zu(Object,"create"),qu=Object.prototype.hasOwnProperty,Wu=Object.prototype.hasOwnProperty;oe.prototype.clear=function(){this.__data__=Vu?Vu(null):{},this.size=0},oe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},oe.prototype.get=function(t){var e=this.__data__;if(Vu){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return qu.call(e,t)?e[t]:void 0},oe.prototype.has=function(t){var e=this.__data__;return Vu?void 0!==e[t]:Wu.call(e,t)},oe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Vu&&void 0===e?"__lodash_hash_undefined__":e,this};var Gu=oe,Zu=function(t,e){var n,r,o,i=t.__data__;return("string"==(o=void 0===(n=e)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":void 0===r?"undefined":h(r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Gu,map:new(Hu||Pu),string:new Gu}},ie.prototype.delete=function(t){var e=Zu(this,t).delete(t);return this.size-=e?1:0,e},ie.prototype.get=function(t){return Zu(this,t).get(t)},ie.prototype.has=function(t){return Zu(this,t).has(t)},ie.prototype.set=function(t,e){var n=Zu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Ju=ie;ue.prototype.clear=function(){this.__data__=new Pu,this.size=0},ue.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ue.prototype.get=function(t){return this.__data__.get(t)},ue.prototype.has=function(t){return this.__data__.has(t)},ue.prototype.set=function(t,e){var n,r,o=this.__data__;if(n=o,null!=(r=Pu)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):c(n,r)){var i=o.__data__;if(!Hu||i.length<199)return i.push([t,e]),this.size=++o.size,this;o=this.__data__=new Ju(i)}return o.set(t,e),this.size=o.size,this};var Yu=ue;ae.prototype.add=ae.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ae.prototype.has=function(t){return this.__data__.has(t)};var Qu=ae,Xu=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},ta=function(t,e){return t.has(e)},ea=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,d=2&n?new Qu:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var p=t[f],v=e[f];if(r)var y=u?r(v,p,f,e,t,i):r(p,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(d){if(!Xu(e,(function(t,e){if(!ta(d,e)&&(p===t||o(p,t,n,r,i)))return d.push(e)}))){h=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},na=bo.Uint8Array,ra=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},oa=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},ia=wo?wo.prototype:void 0,ua=ia?ia.valueOf:void 0,aa=Array.isArray,ca=Object.prototype.propertyIsEnumerable,sa=Object.getOwnPropertySymbols,la=sa?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(sa(t),(function(e){return ca.call(t,e)})))}:function(){return[]},fa=function(t){return Po(t)&&"[object Arguments]"==ko(t)},ha=Object.prototype,da=ha.hasOwnProperty,pa=ha.propertyIsEnumerable,va=fa(function(){return arguments}())?fa:function(t){return Po(t)&&da.call(t,"callee")&&!pa.call(t,"callee")},ya=va,ga=e&&!e.nodeType&&e,ma=ga&&t&&!t.nodeType&&t,ba=ma&&ma.exports===ga?bo.Buffer:void 0,wa=(ba?ba.isBuffer:void 0)||function(){return!1},_a=/^(?:0|[1-9]\d*)$/,Sa=function(t,e){var n,r=void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":h(n);return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&_a.test(t))&&t>-1&&t%1==0&&t<e},xa=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Oa={};Oa["[object Float32Array]"]=Oa["[object Float64Array]"]=Oa["[object Int8Array]"]=Oa["[object Int16Array]"]=Oa["[object Int32Array]"]=Oa["[object Uint8Array]"]=Oa["[object Uint8ClampedArray]"]=Oa["[object Uint16Array]"]=Oa["[object Uint32Array]"]=!0,Oa["[object Arguments]"]=Oa["[object Array]"]=Oa["[object ArrayBuffer]"]=Oa["[object Boolean]"]=Oa["[object DataView]"]=Oa["[object Date]"]=Oa["[object Error]"]=Oa["[object Function]"]=Oa["[object Map]"]=Oa["[object Number]"]=Oa["[object Object]"]=Oa["[object RegExp]"]=Oa["[object Set]"]=Oa["[object String]"]=Oa["[object WeakMap]"]=!1;var ja,Ea=e&&!e.nodeType&&e,ka=Ea&&t&&!t.nodeType&&t,Aa=ka&&ka.exports===Ea&&go.process,Ca=function(){try{return ka&&ka.require&&ka.require("util").types||Aa&&Aa.binding&&Aa.binding("util")}catch(t){}}(),Pa=Ca&&Ca.isTypedArray,Ta=Pa?(ja=Pa,function(t){return ja(t)}):function(t){return Po(t)&&xa(t.length)&&!!Oa[ko(t)]},Ia=Object.prototype.hasOwnProperty,Ra=Object.prototype,Da=Ao(Object.keys,Object),Ma=Object.prototype.hasOwnProperty,La=function(t){return n=la,r=function(t){return null!=(e=t)&&xa(e.length)&&!Iu(e)?function(t,e){var n=aa(t),r=!n&&ya(t),o=!n&&!r&&wa(t),i=!n&&!r&&!o&&Ta(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!Ia.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Sa(s,c))||a.push(s);return a}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Ra))return Da(t);var e,n,r=[];for(var o in Object(t))Ma.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),aa(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Ba=Object.prototype.hasOwnProperty,Na=zu(bo,"DataView"),$a=zu(bo,"Promise"),Ua=zu(bo,"Set"),Fa=zu(bo,"WeakMap"),Ka="[object Map]",za="[object Promise]",Ha="[object Set]",Va="[object WeakMap]",qa="[object DataView]",Wa=Lu(Na),Ga=Lu(Hu),Za=Lu($a),Ja=Lu(Ua),Ya=Lu(Fa),Qa=ko;(Na&&Qa(new Na(new ArrayBuffer(1)))!=qa||Hu&&Qa(new Hu)!=Ka||$a&&Qa($a.resolve())!=za||Ua&&Qa(new Ua)!=Ha||Fa&&Qa(new Fa)!=Va)&&(Qa=function(t){var e=ko(t),n="[object Object]"==e?t.constructor:void 0,r=n?Lu(n):"";if(r)switch(r){case Wa:return qa;case Ga:return Ka;case Za:return za;case Ja:return Ha;case Ya:return Va}return e});var Xa=Qa,tc="[object Arguments]",ec="[object Array]",nc="[object Object]",rc=Object.prototype.hasOwnProperty,oc=function t(e,n,r,o,i){return e===n||(null==e||null==n||!Po(e)&&!Po(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var u=aa(t),a=aa(e),c=u?ec:Xa(t),s=a?ec:Xa(e),l=(c=c==tc?nc:c)==nc,f=(s=s==tc?nc:s)==nc,h=c==s;if(h&&wa(t)){if(!wa(e))return!1;u=!0,l=!1}if(h&&!l)return i||(i=new Yu),u||Ta(t)?ea(t,e,n,r,o,i):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new na(t),new na(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Eu(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=ra;case"[object Set]":var c=1&r;if(a||(a=oa),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=ea(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(ua)return ua.call(t)==ua.call(e)}return!1}(t,e,c,n,r,o,i);if(!(1&n)){var d=l&&rc.call(t,"__wrapped__"),p=f&&rc.call(e,"__wrapped__");if(d||p){var v=d?t.value():t,y=p?e.value():e;return i||(i=new Yu),o(v,y,n,r,i)}}return!!h&&(i||(i=new Yu),function(t,e,n,r,o,i){var u=1&n,a=La(t),c=a.length;if(c!=La(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:Ba.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var d=!0;i.set(t,e),i.set(e,t);for(var p=u;++s<c;){var v=t[l=a[s]],y=e[l];if(r)var g=u?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&ce(m,m)&&"function"==typeof b&&ce(b,b)||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,n,r,o,i))}(e,n,r,o,t,i))},ic=function(t,e){return oc(t,e)},uc=(0,po.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),ac=function(){return(0,po.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};se(uc.getState()),uc.subscribe(se),ac();var cc=ac(),sc=(0,po.getGlobalStore)("extensions",{slots:{}}),lc=(0,so.getExtensionSlotsConfigStore)(),fc=(0,so.getExtensionsConfigStore)();cc.subscribe((function(t){ye(t,lc.getState(),fc.getState())})),lc.subscribe((function(t){ye(cc.getState(),t,fc.getState())})),fc.subscribe((function(t){ye(cc.getState(),lc.getState(),t)})),cc.action((function(t,e){t.extensions[e.name]=he({},e,{instances:[]})})),cc.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)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,".")),t;if(o&&o==e)return t;if(t.slots[n])return he({},t,{slots:he({},t.slots,fe({},n,he({},t.slots[n],{moduleName:e})))});var i=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}(n,e);return he({},t,{slots:he({},t.slots,fe({},n,i))})})),sc.action((function(){return{slots:{},extensions:{}}})),x(7641);var hc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,dc=Object.keys,pc=Array.isArray;"undefined"==typeof Promise||hc.Promise||(hc.Promise=Promise);var vc=Object.getPrototypeOf,yc={}.hasOwnProperty,gc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor;function bc(t,e){var n;return mc(t,e)||(n=vc(t))&&bc(n,e)}var wc=[].slice;function _c(t,e){if(_e(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=_c(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:_c(a,e.substr(u+1))}}function Sc(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){ke("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)Sc(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?pc(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),Sc(c,a,n)}}else void 0===n?pc(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var xc=[].concat,Oc="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Te([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return hc[t]})),jc=Oc.map((function(t){return hc[t]}));Ce(Oc,(function(t){return[t,!0]}));var Ec=null;function kc(t){if(!t||"object"!=typeof t)return t;var e=Ec&&Ec.get(t);if(e)return e;if(pc(t)){e=[],Ec&&Ec.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(kc(t[n]))}else if(jc.indexOf(t.constructor)>=0)e=t;else{var o=vc(t);for(var i in e=o===Object.prototype?{}:Object.create(o),Ec&&Ec.set(t,e),t)_e(t,i)&&(e[i]=kc(t[i]))}return e}var Ac={}.toString,Cc="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Pc="symbol"==(void 0===Cc?"undefined":h(Cc))?function(t){var e;return null!=t&&(e=t[Cc])&&e.apply(t)}:function(){return null},Tc={},Ic="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},Rc="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Dc=function(){return!0},Mc=!new Error("").stack;function Lc(){if(Mc)try{throw Lc.arguments,new Error}catch(t){return t}return new Error}var Bc=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Nc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Bc),$c={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"};Oe(Be).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Le(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Oe($e).from(Be),Oe(Ue).from(Be);var Uc=Nc.reduce((function(t,e){return t[e]=e+"Error",t}),{}),Fc=Be,Kc=Nc.reduce((function(t,e){var n=function(t,n){this._e=Lc(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=$c[e]||r,this.inner=null)},r=e+"Error";return Oe(n).from(Fc),t[e]=n,t}),{});Kc.Syntax=SyntaxError,Kc.Type=TypeError,Kc.Range=RangeError;var zc=Bc.reduce((function(t,e){return t[e+"Error"]=Kc[e],t}),{}),Hc=Nc.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Kc[e]),t}),{});Hc.ModifyError=$e,Hc.DexieError=Be,Hc.BulkError=Ue;var Vc={},qc=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,vc(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,vc(e),t]}(),3),Wc=qc[0],Gc=qc[1],Zc=qc[2],Jc=Gc&&Gc.then,Yc=Wc&&Wc.constructor,Qc=!!Zc,Xc=!1,ts=Zc?function(){Zc.then(rn)}:hc.setImmediate?setImmediate.bind(null,rn):hc.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){rn(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(rn,0)},es=function(t,e){ls.push([t,e]),rs&&(ts(),rs=!1)},ns=!0,rs=!0,os=[],is=[],us=null,as=Ke,cs={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Sn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Sn(t[0],t[1])}catch(t){}}))}},ss=cs,ls=[],fs=0,hs=[],ds={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==ss||n!==ws),u=i&&!hn(),a=new Je((function(n,a){tn(o,new Ye(wn(t,e,i,u),wn(r,e,i,u),n,a,e))}));return Rc&&nn(a,this),a},e=ss,n=ws;return t.prototype=Vc,t},set:function(t){xe(this,"then",t&&t.prototype===Vc?ds:{get:function(){return t},set:ds.set})}};function ps(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&on();e&&"function"==typeof e.then?ps(t,(function(t,n){c(e,Je)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,Xe(t)),n&&un()}}),Qe.bind(null,t))}catch(e){Qe(t,e)}}function vs(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Le(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return Rc&&((r=Le(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&vs(t._prev,e,n)),e}Se(Je.prototype,{then:ds,_then:function(t,e){tn(this,new Ye(null,null,t,e,ss))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):cn(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):cn(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),cn(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Xc=!0;var t=vs(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Xc=!1}}},timeout:function(t,e){var n=this;return t<1/0?new Je((function(r,o){var i=setTimeout((function(){return o(new Kc.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&xe(Je.prototype,Symbol.toStringTag,"Dexie.Promise"),cs.env=gn(),Se(Je,{all:function(){var t=De.apply(null,arguments).map(dn);return new Je((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return Je.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,Je))return t;if(t&&"function"==typeof t.then)return new Je((function(e,n){t.then(e,n)}));var e=new Je(Vc,!0,t);return nn(e,us),e},reject:cn,race:function(){var t=De.apply(null,arguments).map(dn);return new Je((function(e,n){t.map((function(t){return Je.resolve(t).then(e,n)}))}))},PSD:{get:function(){return ss},set:function(t){return ss=t}},totalEchoes:{get:function(){return ws}},newPSD:ln,usePSD:mn,scheduler:{get:function(){return es},set:function(t){es=t}},rejectionMapper:{get:function(){return as},set:function(t){as=t}},follow:function(t,e){return new Je((function(n,r){return ln((function(e,n){var r=ss;r.unhandleds=[],r.onunhandled=n,r.finalize=He((function(){var t=this;hs.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),hs.splice(hs.indexOf(r),1)})),++fs,es((function(){0==--fs&&an()}),[])}),r.finalize),t()}),e,n,r)}))}}),Yc&&(Yc.allSettled&&xe(Je,"allSettled",(function(){var t=De.apply(null,arguments).map(dn);return new Je((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return Je.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Yc.any&&"undefined"!=typeof AggregateError&&xe(Je,"any",(function(){var t=De.apply(null,arguments).map(dn);return new Je((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return Je.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var ys={awaits:0,echoes:0,id:0},gs=0,ms=[],bs=0,ws=0,_s=0;-1===(""+Jc).indexOf("[native code]")&&(fn=hn=Fe);var Ss=Je.reject;function xs(t,e,n,r){if(t.idbdb&&(t._state.openComplete||ss.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===Uc.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return xs(t,e,n,r)}))):Ss(o)}return o._promise(e,(function(t,e){return ln((function(){return ss.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return Ss(new Kc.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return Ss(new Kc.DatabaseClosed);t.open().catch(Fe)}return t._state.dbReadyPromise.then((function(){return xs(t,e,n,r)}))}var Os=String.fromCharCode(65535),js="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Es=[],ks="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),As=ks,Cs=ks,Ps=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},Ts={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},Is=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Kc.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||ss.trans,i=this.name,u=on();try{return o&&o.db===this.db?o===ss.trans?o._promise(t,r,n):ln((function(){return o._promise(t,r,n)}),{trans:o,transless:ss.transless||ss}):xs(this.db,t,[this.name],r)}finally{u&&un()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(pc(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=dc(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==Os)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&Rc&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?xn(a,c&&c.multi?function(t){var n=_c(t,r);return pc(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,_c(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,pc(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(_e(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){we(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=On(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?Je.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{Sc(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||pc(t))return this.where(":id").equals(t).modify(e);var n=_c(t,this.schema.primKey.keyPath);if(void 0===n)return Ss(new Kc.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?dc(e).forEach((function(n){Sc(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=On(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?Je.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{Sc(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?Je.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:Ts})})).then((function(t){return t.numFailures?Je.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Kc.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Kc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(On(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Ue("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Kc.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Kc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(On(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Ue("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new Ue("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function Rs(t,e){try{var n=Dn(t),r=Dn(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Mn(t),Mn(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=Rs(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var Ds=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,Ss.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,Ss.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=xn(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return In(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&we(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return In(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(kn(n,!0))return r.count({trans:t,query:{index:Pn(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return In(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&kn(n,!0)&&n.limit>0){var r=n.valueMapper,o=Pn(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return In(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,kn(e)?Cn(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):Cn(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Cn(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return An(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return An(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=xn(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&kn(e,!0)&&e.limit>0)return this._read((function(t){var n=Pn(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return An(this._ctx,(function(t){var e=t.primaryKey.toString(),r=_e(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=dc(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];_c(e,o)!==a&&(Sc(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],d=0,p=[],v=function(t,e){var n=e.failures,r=e.numFailures;d+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=dc(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var d=[],p=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:Ie(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===Rs(l(b),l(w.value))?(p.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),d.push(w.value)))}var _=kn(n)&&n.limit===1/0&&("function"!=typeof t||t===Ms)&&{index:n.index,range:n.range};return Promise.resolve(d.length>0&&a.mutate({trans:r,type:"add",values:d}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(d.length,t)}))).then((function(){return(p.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:p,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(p.length,t)}))})).then((function(){return(g.length>0||_&&t===Ms)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new $e("Error modifying one or more objects",h,d,p);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return kn(t)&&(t.isPrimKey&&!Cs||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new $e("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(Ms)}}]),t}(),Ms=function(t,e){return e.value=null},Ls=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?$n(this):new this.Collection(this,(function(){return Kn(t,e,!n,!r)}))}catch(t){return Nn(this,js)}}},{key:"equals",value:function(t){return null==t?Nn(this,js):new this.Collection(this,(function(){return zn(t)}))}},{key:"above",value:function(t){return null==t?Nn(this,js):new this.Collection(this,(function(){return Kn(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Nn(this,js):new this.Collection(this,(function(){return Kn(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Nn(this,js):new this.Collection(this,(function(){return Kn(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Nn(this,js):new this.Collection(this,(function(){return Kn(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Nn(this,"String expected."):this.between(t,t+Os,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Fn(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],Os)}},{key:"equalsIgnoreCase",value:function(t){return Fn(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=De.apply(Tc,arguments);return 0===t.length?$n(this):Fn(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=De.apply(Tc,arguments);return 0===t.length?$n(this):Fn(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,Os)}},{key:"anyOf",value:function(){var t=this,e=De.apply(Tc,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Nn(this,js)}if(0===e.length)return $n(this);var r=new this.Collection(this,(function(){return Kn(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=De.apply(Tc,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Nn(this,js)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return $n(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Nn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Kc.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[]),s.sort(r)}catch(t){return Nn(this,js)}var d=0,p=f?function(t){return i(t,s[d][1])>0}:function(t){return i(t,s[d][1])>=0},v=l?function(t){return u(t,s[d][0])>0}:function(t){return u(t,s[d][0])>=0},y=p,g=new this.Collection(this,(function(){return Kn(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=p,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++d===s.length)return e(r),!1;return!!function(t){return!p(t)&&!v(t)}(o)||(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||e((function(){h===i?t.continue(s[d][0]):t.continue(s[d][1])})),!1)})),g}},{key:"startsWithAnyOf",value:function(){var t=De.apply(Tc,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?$n(this):this.inAnyRange(t.map((function(t){return[t,t+Os]}))):Nn(this,"startsWithAnyOf() only works with strings")}}]),t}(),Bs=jn(null,"storagemutated"),Ns=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return ke(!ss.global),++this._reculock,1!==this._reculock||ss.global||(ss.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(ke(!ss.global),0==--this._reculock)for(ss.global||(ss.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{mn(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&ss.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(ke(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Kc.DatabaseClosed(r);case"MissingAPIError":throw new Kc.MissingAPI(r.message,r);default:throw new Kc.OpenFailed(r)}if(!this.active)throw new Kc.TransactionInactive;return ke(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sn((function(n){Vn(n),e._reject(t.error)})),t.onabort=sn((function(n){Vn(n),e.active&&e._reject(new Kc.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=sn((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&Bs.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return Ss(new Kc.ReadOnly("Transaction is readonly"));if(!this.active)return Ss(new Kc.TransactionInactive);if(this._locked())return new Je((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},ss])}));if(n)return ln((function(){var t=r,n=new Je((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new Je((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=Je.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new Je((function(t,r){n.then((function(n){return e._waitingQueue.push(sn(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(sn(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Kc.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(_e(e,t))return e[t];var n=this.schema[t];if(!n)throw new Kc.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),$s=function(t){try{return t.only([[]]),$s=function(){return[[]]},[[]]}catch(t){return $s=function(){return Os},Os}},Us=0,Fs=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){dc(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return qn(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),pc(r),0===e)})),o=r.shift();if(o.multi)throw new Kc.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Kc.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Kc.Schema("Index must have a name and cannot be an empty string")})),e[n]=Gn(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?we(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){we(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,tr(e,[e._allTables,e,e.Transaction.prototype]),Xn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],dc(o),o),e._storeNames=dc(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=Ze(this._cfg.contentUpgrade||Fe,t),this}}]),t}();function Ks(t,e,n,r,o){return Je.resolve().then((function(){var i=ss.transless||ss,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===Uc.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return Ks(t,e,n,null,o)}))):Ss(r)}var c,s=Ic(o);s&&fn();var l=Je.follow((function(){if(c=o.call(u,u))if(s){var t=hn.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=fr(c))}),a);return(c&&"function"==typeof c.then?Je.resolve(c).then((function(t){return u.active?t:Ss(new Kc.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),Ss(t)}))}))}var zs={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:dr(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:dr(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=Yn(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:Zn(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var d,p=o.indexes[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[Yn(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(dr(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(dr(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function Hs(t,e,n,r){return n=n||{},r=r||"",dc(t).forEach((function(o){if(_e(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=Re(i);a!==Re(u)?n[r+o]=e[o]:"Object"===a?Hs(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),dc(e).forEach((function(o){_e(t,o)||(n[r+o]=e[o])})),n}var Vs={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e=ss.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:o}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((function(i){var u=o.map((function(n,o){var u=i[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,e);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],e);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||Sc(t.values[o],r.keyPath,n))}else{var h=Hs(u,t.values[o]),d=l.fire.call(s,h,n,u,e);if(d){var p=t.values[o];Object.keys(d).forEach((function(t){_e(p,t)?p[t]=d[t]:Sc(p,t,d[t])}))}}return s}));return n.mutate(t).then((function(e){for(var n=e.failures,r=e.results,a=e.numFailures,c=e.lastResult,s=0;s<o.length;++s){var l=r?r[s]:o[s],f=u[s];null==l?f.onerror&&f.onerror(n[s]):f.onsuccess&&f.onsuccess("put"===t.type&&i[s]?t.values[s]:l)}return{failures:n,results:r,numFailures:a,lastResult:c}})).catch((function(t){return u.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=ss.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===Fe)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===Fe&&l.fire===Fe)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===Fe)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===Fe)break;return i._promise("readwrite",(function(){return function(t){return h(t.trans,t.range,1e4)}(t)}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},qs={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=pr(t.keys,t.trans._cache,"clone"===t.cache);return e?Je.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?Ie(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Ws=function(t,e){if(!this){var n=new Ws;return t&&"d"in t&&we(n,t),n}we(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Gs(t,e,n){var r=Rs(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(vr(t))return we(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(Rs(n,t.from)<0)return o?Gs(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},mr(t);if(Rs(e,t.to)>0)return i?Gs(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},mr(t);Rs(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),Rs(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&yr(t,o),i&&u&&yr(t,i)}}Se(Ws.prototype,a({add:function(t){return yr(this,t),this},addKey:function(t){return Gs(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Gs(e,t,t)})),this}},Cc,(function(){return gr(this)})));var Zs,Js={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Ws(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Ws)},s=c(""),f=c(":dels"),h=t.type,d=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),p=d[0],v=d[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(pc(p)){"delete"!==h&&(p=t.results),s.addKeys(p);var e=pr(p,y);e||"add"===h||f.addKeys(p),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&pc(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==Rs(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(p){var r={from:p.lower,to:p.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Ws(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},d={get:function(t){return[u,new Ws(t.key)]},getMany:function(t){return[u,(new Ws).addKeys(t.keys)]},count:h,query:h,openCursor:h};return dc(d).forEach((function(t){f[t]=function(i){var u=ss.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Ws)},h=f(""),p=f(":dels"),v=l(d[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):p.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return p.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return p.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}p.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Ys=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Fe,dbReadyPromise:null,cancelOpen:Fe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};f.dbReadyPromise=new Je((function(t){f.dbReadyResolve=t})),f.openCanceller=new Je((function(t,e){f.cancelOpen=e})),this._state=f,this.name=e,this.on=jn(this,"populate","blocked","versionchange","close",{ready:[Ze,Fe]}),this.on.ready.subscribe=Ee(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||Je.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,En(Ds.prototype,(function(t,e){this.db=a;var n=Ts,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=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:u!==Ke?u:null}}))),this.Table=function(t){return En(Is.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:jn(null,{creating:[Ve,Fe],reading:[ze,Ke],updating:[We,Fe],deleting:[qe,Fe]})}))}(this),this.Transaction=(l=this,En(Ns.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=jn(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 Je((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),Ss(t)}))}))),this.Version=function(t){return En(Fs.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,En(Ls.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Kc.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.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(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=$s(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),Es.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(zs),this.use(Vs),this.use(Js),this.use(qs),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Kc.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Kc.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(er),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||ss.letThrough||this._vip)?t():new Je((function(t,n){if(e._state.openComplete)return n(new Kc.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Kc.DatabaseClosed);e.open().catch(Fe)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Kc.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?Ss(n.dbOpenError):t}));Rc&&(n.openCanceller._stackHolder=Lc()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return Je.race([o,("undefined"==typeof navigator?Je.resolve():lr()).then((function(){return new Je((function(o,i){if(e(),!r)throw new Kc.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Kc.MissingAPI;s.onerror=Hn(i),s.onblocked=sn(t._fireOnBlocked),s.onupgradeneeded=sn((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=Vn,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=sn((function(){i(new Kc.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=Hn(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=ss.transless||ss;ln((function(){ss.trans=i,ss.transless=a,0===e?(dc(o).forEach((function(t){rr(n,t,o[t].primKey,o[t].indexes)})),Qn(t,n),Je.follow((function(){return t.on.populate.fire(i)})).catch(u)):function(t,e,n,r){var o=t._novip,i=[],u=o._versions,a=o._dbSchema=ir(0,o.idbdb,r),c=!1;return u.filter((function(t){return t._cfg.version>=e})).forEach((function(t){i.push((function(){var i=a,u=t._cfg.dbschema;ur(o,i,r),ur(o,u,r),a=o._dbSchema=u;var s=nr(i,u);s.add.forEach((function(t){rr(r,t[0],t[1].primKey,t[1].indexes)})),s.change.forEach((function(t){if(t.recreate)throw new Kc.Upgrade("Not yet support for changing primary key");var e=r.objectStore(t.name);t.add.forEach((function(t){return or(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),or(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var l=t._cfg.contentUpgrade;if(l&&t._cfg.version>e){Qn(o,r),n._memoizedTables={},c=!0;var f=Pe(u);s.del.forEach((function(t){f[t]=i[t]})),tr(o,[o.Transaction.prototype]),Xn(o,[o.Transaction.prototype],dc(f),f),n.schema=f;var h,d=Ic(l);d&&fn();var p=Je.follow((function(){if((h=l(n))&&d){var t=hn.bind(null,null);h.then(t,t)}}));return h&&"function"==typeof h.then?Je.resolve(h):p.then((function(){return h}))}})),i.push((function(e){c&&As||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((function(n){return null==t[n]&&e.db.deleteObjectStore(n)}))}(t._cfg.dbschema,e),tr(o,[o.Transaction.prototype]),Xn(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function t(){return i.length?Je.resolve(i.shift()(n.idbtrans)).then(t):Je.resolve()}().then((function(){var t,e;e=r,dc(t=a).forEach((function(n){e.db.objectStoreNames.contains(n)||rr(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=sn((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=je(f.objectStoreNames);if(h.length>0)try{var d=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=ir(0,e,n);r._storeNames=je(e.objectStoreNames,0),Xn(r,[r._allTables],dc(o),o)}(t,f,d):(ur(t,t._dbSchema,d),r=d,!((i=nr(ir(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Qn(t,d)}catch(t){}Es.push(t),f.onversionchange=sn((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=sn((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!cr(n)&&"__dbnames"!==e&&ar(n,r).put({name:e}).catch(Fe)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],Je.resolve(sr((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(Ze,Fe);return n.onReadyBeingFired=[],Je.resolve(sr((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),Ss(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=Es.indexOf(this);if(e>=0&&Es.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new Je((function(e){t.dbReadyResolve=e})),t.openCanceller=new Je((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Kc.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new Je((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=sn((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!cr(n)&&"__dbnames"!==e&&ar(n,r).delete(e).catch(Fe)}(t._deps,t.name),r()})),e.onerror=Hn(o),e.onblocked=i._fireOnBlocked};if(e)throw new Kc.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return dc(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=hr.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=ss.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Kc.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Kc.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Kc.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):Ss(t)}var l=Ks.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):ss.trans?mn(ss.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!_e(this._allTables,t))throw new Kc.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Qs="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Xs=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Qs,value:function(){return this}}]),t}();try{Zs={indexedDB:hc.indexedDB||hc.mozIndexedDB||hc.webkitIndexedDB||hc.msIndexedDB,IDBKeyRange:hc.IDBKeyRange||hc.webkitIDBKeyRange}}catch(t){Zs={indexedDB:null,IDBKeyRange:null}}var tl=Ys;Se(tl,s({},Hc,{delete:function(t){return new tl(t,{addons:[]}).delete()},exists:function(t){return new tl(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return cr(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):ar(e,n).toCollection().primaryKeys()}(tl.dependencies).then(t)}catch(t){return Ss(new Kc.MissingAPI)}},defineClass:function(){return function(t){we(this,t)}},ignoreTransaction:function(t){return ss.trans?mn(ss.transless,t):t()},vip:sr,async:function(t){return function(){try{var e=fr(t.apply(this,arguments));return e&&"function"==typeof e.then?e:Je.resolve(e)}catch(t){return Ss(t)}}},spawn:function(t,e,n){try{var r=fr(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:Je.resolve(r)}catch(t){return Ss(t)}},currentTransaction:{get:function(){return ss.trans||null}},waitFor:function(t,e){var n=Je.resolve("function"==typeof t?tl.ignoreTransaction(t):t).timeout(e||6e4);return ss.trans?ss.trans.waitFor(n):n},Promise:Je,debug:{get:function(){return Rc},set:function(t){Me(t,"dexie"===t?function(){return!0}:Ps)}},derive:Oe,extend:we,props:Se,override:Ee,Events:jn,on:Bs,liveQuery:function(t){return new Xs((function(e){var n=function(){return dc(u).some((function(t){return i[t]&&function(t,e){var n=gr(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=gr(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(Rs(a.from,o.to)<=0&&Rs(a.to,o.from)>=0)return!0;Rs(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=Ic(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,Bs.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){wr(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},d=function(e){r&&fn();var n=function(){return ln(t,{subscr:e,trans:null})},o=ss.trans?mn(ss.transless,n):n();return r&&o.then(hn,hn),o}(h);s||(Bs("storagemutated",l),s=!0),c=!0,Promise.resolve(d).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:wr,getByKeyPath:_c,setByKeyPath:Sc,delByKeyPath:function(t,e){"string"==typeof e?Sc(t,e,void 0):"length"in e&&[].map.call(e,(function(e){Sc(t,e,void 0)}))},shallowClone:Pe,deepClone:Ie,getObjectDiff:Hs,cmp:Rs,asap:Ae,minKey:-1/0,addons:[],connections:Es,errnames:Uc,dependencies:Zs,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),tl.maxKey=$s(tl.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Bs("storagemutated",(function(t){var e;el||(ks?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),el=!0,dispatchEvent(e),el=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;el||_r(e)})));var el=!1;if("undefined"!=typeof BroadcastChannel){var nl=new BroadcastChannel("x-storagemutated-1");Bs("storagemutated",(function(t){el||nl.postMessage(t)})),nl.onmessage=function(t){t.data&&_r(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Bs("storagemutated",(function(t){try{el||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&_r(e.changedParts)}}));var rl=self.document&&navigator.serviceWorker;rl&&rl.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&_r(e.changedParts)}))}function ol(t){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ol(t)}function il(t,e){return il=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},il(t,e)}Je.rejectionMapper=function(t,e){if(!t||c(t,Be)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!zc[t.name])return t;var n=new zc[t.name](e||t.message,t);return"stack"in t&&xe(n,"stack",{get:function(){return this.inner.stack}}),n},Me(Rc,Ps);var ul=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},al=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&il(t,e)}(o,t);var e,n,r=(e=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(t){return!1}}(),function(){var t,r=ol(e);if(n){var o=ol(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Sr(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Ys);(0,po.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.1"]&&_()}catch(Yo){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var cl=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},sl=function(t,e){this.type=t,Object.assign(this,e)},ll={type:"SKIP_WAITING"};!function(t){var e,n,r=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new cl,r.en=new cl,r.on=new cl,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!jr(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new sl(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new sl("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new sl("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return Er(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new sl("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o,i=r.prototype;i.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var i=this;return e=function(){return i.mn=Boolean(navigator.serviceWorker.controller),i.yn=i.pn(),Er(i.bn(),(function(t){i.fn=t,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 e=i.fn.waiting;return e&&jr(e.scriptURL,i.sn.toString())&&(i.hn=e,Promise.resolve().then((function(){i.dispatchEvent(new sl("waiting",{sw:e,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 Ar(new Promise((function(t){return window.addEventListener("load",t)})))}(),n&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},i.update=function(){try{return this.fn?Ar(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(t){try{return Er(this.getSW(),(function(e){return xr(e,t)}))}catch(t){return Promise.reject(t)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&xr(this.fn.waiting,ll)},i.pn=function(){var t=navigator.serviceWorker.controller;return t&&jr(t.scriptURL,this.sn.toString())?t:void 0},i.bn=function(){try{var t=this;return function(e,n){try{var r=Er(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(r.prototype,o)}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Or(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(t,e):void 0}}(t))){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(n)}(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),new al,(0,po.createGlobalStore)("offline-synchronization",{}),lo.default.createContext({moduleName:""}),x(3103),x(7435);try{n(6983).createContext()}catch(t){}var fl,hl,dl=x(7064);dl.default.default||dl.default,function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(fl||(fl={})),function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(hl||(hl={})),Tr((0,ho.getExtensionInternalStore)()),Tr((0,ho.getExtensionStore)());var pl,vl=function(){},yl=void 0,gl=Object,ml=function(t){return t===yl},bl=function(t){return"function"==typeof t},wl=function(t,e){return gl.assign({},t,e)},_l="undefined",Sl=function(){return("undefined"==typeof window?"undefined":h(window))!=_l},xl=new WeakMap,Ol=0,jl=function(t){var e,n,r=void 0===t?"undefined":h(t),o=t&&t.constructor,i=o==Date;if(gl(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=xl.get(t))return e;if(e=++Ol+"~",xl.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=jl(t[n])+",";xl.set(t,e)}if(o==gl){e="#";for(var u=gl.keys(t).sort();!ml(n=u.pop());)ml(t[n])||(e+=n+":"+jl(t[n])+",");xl.set(t,e)}}return e},El=!0,kl=Sl(),Al=("undefined"==typeof document?"undefined":h(document))!=_l,Cl=kl&&window.addEventListener?window.addEventListener.bind(window):vl,Pl=Al?document.addEventListener.bind(document):vl,Tl=kl&&window.removeEventListener?window.removeEventListener.bind(window):vl,Il=Al?document.removeEventListener.bind(document):vl,Rl={isOnline:function(){return El},isVisible:function(){var t=Al&&document.visibilityState;return ml(t)||"hidden"!==t}},Dl={initFocus:function(t){return Pl("visibilitychange",t),Cl("focus",t),function(){Il("visibilitychange",t),Tl("focus",t)}},initReconnect:function(t){var e=function(){El=!0,t()},n=function(){El=!1};return Cl("online",e),Cl("offline",n),function(){Tl("online",e),Tl("offline",n)}}},Ml=!Sl()||"Deno"in window,Ll=Ml?lo.useEffect:lo.useLayoutEffect,Bl="undefined"!=typeof navigator&&navigator.connection,Nl=!Ml&&Bl&&(["slow-2g","2g"].includes(Bl.effectiveType)||Bl.saveData),$l=function(t){if(bl(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?jl(t):"",e,t?"$swr$"+t:""]},Ul=new WeakMap,Fl=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Ul.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var d=0;d<h.length;++d)h[d](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Kl=0,zl=function(){return++Kl},Hl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ir(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,d,p,v,y,g,m,b,w;return Rr(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!ml((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=$l(n),f=l[0],h=l[2],!f)return[2];if(d=Ul.get(e),p=d[2],t.length<3)return[2,Fl(e,f,e.get(f),yl,yl,a,!0)];if(v=r,g=zl(),p[f]=[g,0],m=!ml(s),b=e.get(f),m&&(e.set(f,s),Fl(e,f,s)),bl(v))try{v=v(e.get(f))}catch(t){y=t}return v&&bl(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==p[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(bl(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,wl(e.get(h),{error:y}))),p[f][1]=zl(),[4,Fl(e,f,v,y,yl,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},Vl=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},ql=function(t,e){if(!Ul.has(t)){var n=wl(Dl,e),r={},o=Hl.bind(yl,t),i=vl;if(Ul.set(t,[r,{},{},{},o]),!Ml){var u=n.initFocus(setTimeout.bind(yl,Vl.bind(yl,r,0))),a=n.initReconnect(setTimeout.bind(yl,Vl.bind(yl,r,1)));i=function(){u&&u(),a&&a(),Ul.delete(t)}}return[t,o,i]}return[t,Ul.get(t)[4]]},Wl=ql(new Map),Gl=Wl[0],Zl=Wl[1],Jl=wl({onLoadingSlow:vl,onSuccess:vl,onError:vl,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!ml(i)&&u>i||setTimeout(r,a,o)},onDiscarded:vl,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Nl?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Nl?5e3:3e3,compare:function(t,e){return jl(t)==jl(e)},isPaused:function(){return!1},cache:Gl,mutate:Zl,fallback:{}},Rl),Yl=(0,lo.createContext)({}),Ql=(gl.defineProperty((function(t){var e=t.value,n=function(t,e){var n=wl(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=wl(o,u))}return n}((0,lo.useContext)(Yl),e),r=e&&e.provider,o=(0,lo.useState)((function(){return r?ql(r(n.cache||Gl),e):yl}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Ll((function(){return o?o[2]:yl}),[]),(0,lo.createElement)(Yl.Provider,wl(t,{value:n}))}),"default",{value:Jl}),x(3023)),Xl=x.n(Ql),tf=x(1701),ef=x.n(tf);Xl().extend(ef()),pl=function(t,e){document.documentElement.style.setProperty(t,e)},(0,so.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:so.Type.String},"Brand color #2":{_default:"#004144",_type:so.Type.String},"Brand color #3":{_default:"#007d79",_type:so.Type.String}}),(0,so.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(pl("--brand-01",t.config["Brand color #1"]),pl("--brand-02",t.config["Brand color #2"]),pl("--brand-03",t.config["Brand color #3"]))})),r("omrs-logo-full-color",Dr),r("omrs-logo-full-mono",Dr),r("omrs-logo-full-grey",Dr),r("omrs-logo-partial-color",Mr),r("omrs-logo-partial-mono",Mr),r("omrs-logo-partial-grey",Mr),r("omrs-logo-icon-color",Lr),r("omrs-logo-icon-mono",Lr),r("omrs-logo-icon-grey",Lr),r("omrs-logo-white",Br),r("omrs-icon-visibility",Ur),r("omrs-icon-menu",Fr),r("omrs-icon-search",Kr),r("omrs-icon-arrow-back",zr),r("omrs-icon-arrow-forward",Hr),r("omrs-icon-arrow-downward",Vr),r("omrs-icon-arrow-upward",qr),r("omrs-icon-chevron-left",Wr),r("omrs-icon-chevron-right",Gr),r("omrs-icon-chevron-up",Zr),r("omrs-icon-chevron-down",Jr),r("omrs-icon-supervised-user-circle",Yr),r("omrs-icon-home",Qr),r("omrs-icon-close",Xr),r("omrs-icon-important-notification",to),r("omrs-icon-calendar",eo),r("omrs-icon-access-time",no),r("omrs-icon-add",ro),r("omrs-icon-remove",oo),r("omrs-icon-check-circle",io),r("omrs-icon-zoomoutmap",uo),r("omrs-icon-location",ao),r("omrs-icon-download",co)}(),function(){"use strict";x.r(O)}(),O}())}}}))}}]);
2
+ (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[889],{159:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),d=new p(o||[]);return h._invoke=(a=t,c=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(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===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?E:x,o.arg===j)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,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,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e](r,r.exports,c),r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,X)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Y.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},d=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(t){return!1}},v=function(t,e){return!e||"object"!==jt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),_t(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(W().mark((function t(e){var r,i;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,St.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(At)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,St.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Ct(n,r,e,o)}),(function(t){throw new Ct(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new it((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Rt<Date.now()-6e4||!Dt.getState().loaded)&&x(),new it((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Dt.getState()),Dt.subscribe(n)}))},S=function(){return(Rt<Date.now()-6e4||!Dt.getState().loaded)&&x(),Dt},x=function(){return new Promise((function(t,e){Rt=Date.now(),g(At).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Dt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,It.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Dt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(t,e){return n=t,e.privileges.find((function(t){return n===t.display}))||e.roles.find((function(t){return"System Developer"===t.display}));var n},j=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Dt.getState()),t||(e=Dt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Lt.apply(this,arguments)},C=function(){(0,St.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:St.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:St.Type.String,_default:"${openmrsSpaBase}/login",_validators:[St.validators.isUrl]},errors:{_type:St.Type.Array,_default:[401],_elements:{_type:St.Type.Number,_validators:[St.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:St.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Tt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?qt:e.lift(new Wt(t))}},D=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Zt(t,e))}},R=function(t,e,n){var r=null!=n?n:Jt;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(D((function(t){return t})))},L=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},N=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},B=function(){return m("/ws/rest/v1/visittype").pipe(D((function(t){return t.data.results.map(N)}))).pipe(I(1))},U=function(t){return{uuid:t.uuid,display:t.display}},F=function(){return m("/ws/rest/v1/location").pipe(D((function(t){return t.data.results.map(U)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Ct},VisitMode:function(){return Mt},VisitStatus:function(){return Nt},backendDependencies:function(){return Xt},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Jt},fetchCurrentPatient:function(){return T},fhir:function(){return Tt},fhirBaseUrl:function(){return Pt},getCurrentUser:function(){return _},getLocations:function(){return F},getLoggedInUser:function(){return j},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return Qt},getVisitTypes:function(){return B},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return L},sessionEndpoint:function(){return At},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return M},userHasAccess:function(){return E}});var K,$,z,H,V,q=c(602),W=c.n(q),G=function(t,e){return(G=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},Z=!1,Y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,Z=t},get useDeprecatedSynchronousErrorHandling(){return Z}},J={closed:!0,next:function(t){},error:function(t){if(Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},Q=Array.isArray||function(t){return t&&"number"==typeof t.length},X=(K=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},K.prototype=Object.create(Error.prototype),K),tt=function(){var t,n=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)};return n.prototype.unsubscribe=function(){var t;if(!this.closed){var o,i=this,a=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(a,n))a.remove(this);else if(null!==a)for(var f=0;f<a.length;++f)a[f].remove(this);if(e(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(e){t=r(e,X)?u(e.errors):[e]}}if(Q(l)){f=-1;for(var h=l.length;++f<h;){var p=l[f];if(null!==(o=p)&&"object"==typeof o)try{p.unsubscribe()}catch(e){t=t||[],r(e,X)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new X(t)}},n.prototype.add=function(t){var e=t;if(!t)return n.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new n(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,n)){var i=e;(e=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var u=e._parentOrParents;if(null===u)e._parentOrParents=this;else if(r(u,n)){if(u===this)return e;e._parentOrParents=[u,this]}else{if(-1!==u.indexOf(this))return e;u.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[e]:a.push(e),e},n.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},n.EMPTY=((t=new n).closed=!0,t),n}(),et="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),nt=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=J;break;case 1:if(!t){u.destination=J;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new rt(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new rt(u,t,o,i)}return u}return t(n,e),n.prototype[et]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(tt),rt=(z=function(t,n,r,o){var i,u=$.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==J&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,$=nt),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Y.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!Y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Y.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ot="function"==typeof Symbol&&Symbol.observable||"@@observable",it=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,nt))return t;if(t[et])return t[et]()}return t||e||n?new nt(t,e,n):new nt(J)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Y.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Y.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Y.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,nt)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,at="object"==typeof self&&self&&self.Object===Object&&self,ct=(ut||at||Function("return this")()).Symbol,st=Object.prototype,lt=st.hasOwnProperty,ft=st.toString,ht=ct?ct.toStringTag:void 0,pt=Object.prototype.toString,dt=ct?ct.toStringTag:void 0,vt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),yt=Function.prototype,gt=Object.prototype,mt=yt.toString,bt=gt.hasOwnProperty,wt=mt.call(Object),_t=function(t){if(null==(e=t)||"object"!=typeof e||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?function(t){var e=lt.call(t,ht),n=t[ht];try{t[ht]=void 0;var r=!0}catch(t){}var o=ft.call(t);return r&&(e?t[ht]=n:delete t[ht]),o}(t):(e=t,pt.call(e));var e}(t))return!1;var e,n=vt(t);if(null===n)return!0;var o=bt.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&mt.call(o)==wt},St=c(824);function xt(t,e,n){return xt=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Et(o,n.prototype),o},xt.apply(null,arguments)}function Ot(t){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Et(t,e){return(Et=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var jt=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function kt(t){var e="function"==typeof Map?new Map:void 0;return kt=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xt(t,arguments,Ot(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Et(r,t)},kt(t)}var At="/ws/rest/v1/session",Ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Et(t,e)}(i,t);var e,n,o=(e=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(t){return!1}}(),function(){var t,r=Ot(e);if(n){var o=Ot(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(kt(Error)),Pt="/ws/fhir2/R4",Tt={read:function(t){var e,n;return g((n={url:"".concat(Pt,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},It=c(254),Dt=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Rt=0;function Lt(){return(Lt=w(W().mark((function t(e,n){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(At,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Mt,Nt,Bt,Ut=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),Ft=function(e){var n=function(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 t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(tt),Kt=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(nt),$t=function(e){var n=function(){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[et]=function(){return new Kt(this)},n.prototype.lift=function(t){var e=new zt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Ut;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Ut;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ut;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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 Ut;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Ut;return this.hasError?(t.error(this.thrownError),tt.EMPTY):this.isStopped?(t.complete(),tt.EMPTY):(this.observers.push(t),new Ft(this,t))},n.prototype.asObservable=function(){var t=new it;return t.source=this,t},n.create=function(t,e){return new zt(t,e)},n}(it),zt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):tt.EMPTY},n}($t),Ht=function(e){var n=function(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 Ut;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}($t),Vt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),qt=new it((function(t){return t.complete()})),Wt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Vt};return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.total))},t}(),Gt=function(e){var n=function(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(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(nt),Zt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.project,this.thisArg))},t}(),Yt=function(e){var n=function(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(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(nt),Jt="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)",Qt=new Ht(null);(Bt=Mt||(Mt={})).NEWVISIT="startVisit",Bt.EDITVISIT="editVisit",Bt.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Nt||(Nt={}));var Xt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},9810:()=>{function t(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.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](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?d(e.matcher):d(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return h(l(),t)};function d(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return d(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",d="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,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(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},6347:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=o(t);function u(t,e){return st(t,e,n.slice(),r.slice())}return!a((function(t,e){return!a(u,e,t)}),o(e),i)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},h=function(t,e,n,r){return t["@@transducer/result"](n[r](bt(t["@@transducer/step"],t),e))},p=function(t){return"[object Object]"===Object.prototype.toString.call(t)},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Tt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Tt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Tt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},E=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=K(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(F(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=j(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=j(h.value,2),v=d[0];U(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return E({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:E({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Bt(dt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=j(a.value,2);n=z([n,Ut(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Nt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},D=function(t,e){Ft(t,e);var n=Dt.getState();Dt.setState({schemas:E({},n.schemas,O({},t,e))})},R=function(t,e){Ft(t,e);var n=Dt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Dt.setState({schemas:E({},n.schemas,O({},t,e))})},L=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Dt.getState();Dt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},M=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},N=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=zt(t,e,r);return $t(t,o,n),o},B=function(t,e,n,r,o,i){var u,a,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=F(o,i),d=$(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(h,p),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=zt(g,y,o.devDefaultsAreOn);return $t(g,m,h),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},F=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},K=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=$(t,F(e,n));H(r,o,t);var i=zt(r,o,e.devDefaultsAreOn);return $t(r,i,t),delete i.extensionSlots,i},$=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return _t(Ot)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Kt(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:Et,Boolean:jt,ConceptUuid:Pt,Number:kt,Object:Ct,String:At,UUID:Pt,PersonAttributeTypeUuid:Pt,PatientIdentifierTypeUuid:Pt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(e,n);o.startsWith(r)?(0,Ht.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return ht},configExtensionStore:function(){return Mt},configInternalStore:function(){return Dt},defineConfigSchema:function(){return D},defineExtensionConfigSchema:function(){return R},getConfig:function(){return M},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Nt},inRange:function(){return Vt},interpolateString:function(){return J},interpolateUrl:function(){return Y},isUrl:function(){return Wt},isUrlWithTemplateParameters:function(){return qt},navigate:function(){return Q},oneOf:function(){return Gt},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Lt},validator:function(){return d},validators:function(){return Zt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!c(d,n)||!st(n[d],e[d],h,p))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])}));function ft(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?ft(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ht,pt,dt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():ft(t,[],[],!0)})),vt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},yt=n((function(t){return!!vt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),gt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),mt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),bt=mt,wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t=l((function(t,e,n){if("function"==typeof t&&(t=new gt(t)),yt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return h(t,e,n,"fantasy-land/reduce");if(null!=n[wt])return f(t,e,n[wt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return h(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),St=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),xt=l((function t(e,n,r){return St((function(n,r,o){return p(r)&&p(o)?t(e,r,o):e(n,r,o)}),n,r)})),Ot=r((function(t,e){return xt((function(t,e,n){return n}),t,e)}));(pt=ht||(ht={})).Array="Array",pt.Boolean="Boolean",pt.ConceptUuid="ConceptUuid",pt.Number="Number",pt.Object="Object",pt.String="String",pt.UUID="UUID",pt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",pt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Et=d((function(t){return Array.isArray(t)}),"must be an array"),jt=d((function(t){return"boolean"==typeof t}),"must be a boolean"),kt=d((function(t){return"number"==typeof t}),"must be a number"),At=d((function(t){return"string"==typeof t}),"must be a string"),Ct=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Pt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Tt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Dt=(0,Tt.createGlobalStore)("config-internal",It),Rt=v();Dt.subscribe((function(t){var e;t.devDefaultsAreOn!=Rt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Rt=t.devDefaultsAreOn)}));var Lt=(0,Tt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Lt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Mt=(0,Tt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Nt=(0,Tt.createGlobalStore)("config-implementer-tools",{config:{}});function Bt(t){return t.hasOwnProperty("_default")?E({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Bt(t[n]),e}),{}):{}}function Ut(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=Ut(t[r],e),n}),{}):{_value:t,_source:e}}function Ft(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ft(t,c,a);var s=c._elements;if(W(s)&&Ft(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=c._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(ht).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ht).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ht.Array,ht.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Kt(t,e,n){V(n,t._type,e),G(e)?t._type===ht.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===ht.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Kt(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function $t(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ht.Object&&t._elements?$t(t._elements,s,l):$t(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)$t(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return C(t,Lt.getState())})),Lt.subscribe((function(t){return C(Dt.getState(),t)})),T(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return T(t,Lt.getState())})),Lt.subscribe((function(t){return T(Dt.getState(),t)})),P(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return P(t,Lt.getState())})),Lt.subscribe((function(t){return P(Dt.getState(),t)})),I(Dt.getState(),Mt.getState(),Lt.getState()),Dt.subscribe((function(t){I(t,Mt.getState(),Lt.getState())})),Mt.subscribe((function(t){I(Dt.getState(),t,Lt.getState())})),Lt.subscribe((function(t){I(Dt.getState(),Mt.getState(),t)}));var zt=function(t,e,n){var r=dt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ht.Array&&Array.isArray(u)){var l=u.map((function(t){return zt(s,t,n)}));r[i]=l}else if(a._type===ht.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=zt(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=zt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Ht=i(645),Vt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},qt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Wt=qt([]),Gt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:Vt,isUrl:Wt,isUrlWithTemplateParameters:qt,oneOf:Gt}}(),u}())}}}))},7708:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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):o instanceof i))return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});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}())}}}))},547:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,u){var a={},c={},s={};return{setters:[function(t){a.configExtensionStore=t.configExtensionStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionSlotConfig=t.getExtensionSlotConfig,a.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,a.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){c.createGlobalStore=t.createGlobalStore,c.getGlobalStore=t.getGlobalStore},function(t){s.mountRootParcel=t.mountRootParcel}],execute:function(){i(function(){var i={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=a},685:function(t){"use strict";t.exports=c},645:function(t){"use strict";t.exports=s}},l={};function f(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={exports:{}};return i[t](n,n.exports,f),n.exports}f.y=u,f.d=function(t,e){for(var n in e)f.o(e,n)&&!f.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;f.g.importScripts&&(t=f.g.location+"");var e=f.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=t}();var h={};return(0,f(968).s)(1),function(){"use strict";var i=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},u=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},a=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},c=function(t){var e=this.__data__=new V(t);this.size=e.size},s=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new St;++e<n;)this.add(t[e])},l=function(t){var e=Le.getState(),n=t(e);n!==e&&Le.setState(n)},p=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:a.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}Ie(De.configExtensionStore.getState().mountedExtensions,e)||De.configExtensionStore.setState({mountedExtensions:e})},d=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},v=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){v(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},g=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||b(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},m=function(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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.")}()},b=function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}},w=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=g(a.value,2),l=s[0],f=s[1],h=P(l,t,(0,De.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}Ie(Ue.getState().slots,r)||Ue.setState({slots:r})},_=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}},S=function(t){return g(t.split("#"),1)[0]},x=function(t,e){var n=S(e);return t.extensions[n]},O=function(t){return x(Be.getState(),t)},E=function(t,e){l((function(n){var r=n.slots[t];return y({},n,r?{slots:y({},n.slots,v({},t,y({},r,{attachedIds:m(r.attachedIds).concat([e])})))}:{slots:y({},n.slots,v({},t,y({},_(t),{attachedIds:[e]})))})}))},j=function(t,e){l((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?y({},n,{slots:y({},n.slots,v({},t,y({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))},k=function(t){l((function(e){var n=e.slots[t];return n?y({},e,{slots:y({},e.slots,v({},t,y({},n,{attachedIds:[]})))}):e}))},A=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return D(n,t.online,t.offline)}))},P=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Be.getState().extensions,m(i).concat(m(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=A(t,c,null===(n=s[S(t)])||void 0===n?void 0:n.order,i),u=A(e,c,null===(r=s[S(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=!0,p=!1,d=void 0;try{for(var v,y=l[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var g=v.value,b=(0,De.getExtensionConfigFromStore)(r,t,g).config,w=S(g),_=e.extensions[w];_&&f.push({id:g,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(t){p=!0,d=t}finally{try{h||null==y.return||y.return()}finally{if(p)throw d}}return f},T=function(t){return P(t,Be.getState(),(0,De.getExtensionSlotConfig)(t).config,Ke.getState())},I=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return D(n,t,e)},D=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)},R=function(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}},L=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},M=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},N=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){M(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},B=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o},U=function(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},F=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=S(r),a=O(r),c=!0,s=null;if(t){if(!a)throw Error("Couldn't find extension '".concat(u,"' to attach to '").concat(e,"'"));var f=a.load,h=a.online,p=a.offline,d=a.meta,v=a.moduleName;I(h,p)&&(f().then((function(u){var a=u.default,l=B(u,["default"]);c&&(s=(0,Ve.mountRootParcel)(o(null!=a?a:l),N({},R(h,p),i,{_meta:d,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:v},domElement:t})))})),l((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return N({},o,{extensions:N({},o.extensions,M({},u,N({},o.extensions[u],{instances:U(o.extensions[u].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," 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(h),f.d(h,{attach:function(){return E},checkStatus:function(){return I},checkStatusFor:function(){return D},detach:function(){return j},detachAll:function(){return k},extensionStore:function(){return qe},getAssignedExtensions:function(){return T},getConnectedExtensions:function(){return C},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Me},getExtensionNameFromId:function(){return S},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Ne},registerExtension:function(){return $e},registerExtensionSlot:function(){return ze},renderExtension:function(){return F},reset:function(){return He},updateInternalExtensionStore:function(){return l}});var K=function(t,e){return t===e||t!=t&&e!=e},$=function(t,e){for(var n=t.length;n--;)if(K(t[n][0],e))return n;return-1},z=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=$(e,t);return!(n<0||(n==e.length-1?e.pop():z.call(e,n,1),--this.size,0))},i.prototype.get=function(t){var e=this.__data__,n=$(e,t);return n<0?void 0:e[n][1]},i.prototype.has=function(t){return $(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=$(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var H,V=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,G=q||W||Function("return this")(),Z=G.Symbol,Y=Object.prototype,J=Y.hasOwnProperty,Q=Y.toString,X=Z?Z.toStringTag:void 0,tt=Object.prototype.toString,et=Z?Z.toStringTag:void 0,nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?function(t){var e=J.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var o=Q.call(t);return r&&(e?t[X]=n:delete t[X]),o}(t):(e=t,tt.call(e));var e},rt=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},ot=function(t){if(!rt(t))return!1;var e=nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},it=G["__core-js_shared__"],ut=(H=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",at=Function.prototype.toString,ct=function(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""},st=/^\[object .+?Constructor\]$/,lt=Function.prototype,ft=Object.prototype,ht=lt.toString,pt=ft.hasOwnProperty,dt=RegExp("^"+ht.call(pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!rt(t)||(e=t,ut&&ut in e))&&(ot(t)?dt:st).test(ct(t));var e}(r)?r:void 0},yt=vt(G,"Map"),gt=vt(Object,"create"),mt=Object.prototype.hasOwnProperty,bt=Object.prototype.hasOwnProperty;u.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},u.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},u.prototype.get=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},u.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:bt.call(e,t)},u.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};var wt=u,_t=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};a.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(yt||V),string:new wt}},a.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},a.prototype.get=function(t){return _t(this,t).get(t)},a.prototype.has=function(t){return _t(this,t).has(t)},a.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var St=a;c.prototype.clear=function(){this.__data__=new V,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(r(n,V)){var o=n.__data__;if(!yt||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new St(o)}return n.set(t,e),this.size=n.size,this};var xt=c;s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},s.prototype.has=function(t){return this.__data__.has(t)};var Ot=s,Et=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},jt=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new Ot:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Et(e,(function(t,e){if(u=e,!p.has(u)&&(d===t||o(d,t,n,r,i)))return p.push(e);var u}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},kt=G.Uint8Array,At=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ct=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Pt=Z?Z.prototype:void 0,Tt=Pt?Pt.valueOf:void 0,It=Array.isArray,Dt=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Lt=Rt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Rt(t),(function(e){return Dt.call(t,e)})))}:function(){return[]},Mt=function(t){return null!=t&&"object"==typeof t},Nt=function(t){return Mt(t)&&"[object Arguments]"==nt(t)},Bt=Object.prototype,Ut=Bt.hasOwnProperty,Ft=Bt.propertyIsEnumerable,Kt=Nt(function(){return arguments}())?Nt:function(t){return Mt(t)&&Ut.call(t,"callee")&&!Ft.call(t,"callee")},$t=Kt,zt=e&&!e.nodeType&&e,Ht=zt&&t&&!t.nodeType&&t,Vt=Ht&&Ht.exports===zt?G.Buffer:void 0,qt=(Vt?Vt.isBuffer:void 0)||function(){return!1},Wt=/^(?:0|[1-9]\d*)$/,Gt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var Yt,Jt,Qt,Xt=e&&!e.nodeType&&e,te=Xt&&t&&!t.nodeType&&t,ee=te&&te.exports===Xt&&q.process,ne=function(){try{return te&&te.require&&te.require("util").types||ee&&ee.binding&&ee.binding("util")}catch(t){}}(),re=ne&&ne.isTypedArray,oe=re?(Yt=re,function(t){return Yt(t)}):function(t){return Mt(t)&&Gt(t.length)&&!!Zt[nt(t)]},ie=Object.prototype.hasOwnProperty,ue=Object.prototype,ae=(Jt=Object.keys,Qt=Object,function(t){return Jt(Qt(t))}),ce=Object.prototype.hasOwnProperty,se=function(t){return n=Lt,r=function(t){return null!=(e=t)&&Gt(e.length)&&!ot(e)?function(t,e){var n,r,i,u=It(t),a=!u&&$t(t),c=!u&&!a&&qt(t),s=!u&&!a&&!c&&oe(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var p in t)!ie.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=h,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&Wt.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||ue))return ae(t);var e,n,r=[];for(var o in Object(t))ce.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),It(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},le=Object.prototype.hasOwnProperty,fe=vt(G,"DataView"),he=vt(G,"Promise"),pe=vt(G,"Set"),de=vt(G,"WeakMap"),ve="[object Map]",ye="[object Promise]",ge="[object Set]",me="[object WeakMap]",be="[object DataView]",we=ct(fe),_e=ct(yt),Se=ct(he),xe=ct(pe),Oe=ct(de),Ee=nt;(fe&&Ee(new fe(new ArrayBuffer(1)))!=be||yt&&Ee(new yt)!=ve||he&&Ee(he.resolve())!=ye||pe&&Ee(new pe)!=ge||de&&Ee(new de)!=me)&&(Ee=function(t){var e=nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case we:return be;case _e:return ve;case Se:return ye;case xe:return ge;case Oe:return me}return e});var je=Ee,ke="[object Arguments]",Ae="[object Array]",Ce="[object Object]",Pe=Object.prototype.hasOwnProperty,Te=function t(e,n,o,i,u){return e===n||(null==e||null==n||!Mt(e)&&!Mt(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=It(t),c=It(e),s=a?Ae:je(t),l=c?Ae:je(e),f=(s=s==ke?Ce:s)==Ce,h=(l=l==ke?Ce:l)==Ce,p=s==l;if(p&&qt(t)){if(!qt(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new xt),a||oe(t)?jt(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new kt(t),new kt(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return K(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=At;case"[object Set]":var c=1&r;if(a||(a=Ct),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=jt(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Tt)return Tt.call(t)==Tt.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var d=f&&Pe.call(t,"__wrapped__"),v=h&&Pe.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return u||(u=new xt),i(y,g,n,o,u)}}return!!p&&(u||(u=new xt),function(t,e,n,o,i,u){var a=1&n,c=se(t),s=c.length;if(s!=se(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:le.call(e,f)))return!1}var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(d=!1)}return u.delete(t),u.delete(e),d}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Ie=function(t,e){return Te(t,e)},De=f(824),Re=f(685),Le=(0,Re.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Me=function(){return(0,Re.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Ne=function(){return(0,Re.getGlobalStore)("extensions",{slots:{}})};p(Le.getState()),Le.subscribe(p);var Be=Me(),Ue=Ne(),Fe=(0,De.getExtensionSlotsConfigStore)(),Ke=(0,De.getExtensionsConfigStore)();Be.subscribe((function(t){w(t,Fe.getState(),Ke.getState())})),Fe.subscribe((function(t){w(Be.getState(),t,Ke.getState())})),Ke.subscribe((function(t){w(Be.getState(),Fe.getState(),t)}));var $e=Be.action((function(t,e){t.extensions[e.name]=y({},e,{instances:[]})})),ze=Be.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)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,".")),t;if(o&&o==e)return t;if(t.slots[n])return y({},t,{slots:y({},t.slots,v({},n,y({},t.slots[n],{moduleName:e})))});var i=_(n,e);return y({},t,{slots:y({},t.slots,v({},n,i))})})),He=Ue.action((function(){return{slots:{},extensions:{}}})),Ve=f(645),qe=Me()}(),h}())}}}))},4889:(t,e,n)=>{"use strict";n.r(e);var r=n(159),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(9810);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var u=n(6347);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var a=n(7708);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var c=n(547);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var s=n(9473);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var l=n(2630);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(9336);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var h=n(1493);o={};for(const t in h)"default"!==t&&(o[t]=()=>h[t]);n.d(e,o);var p=n(2390);o={};for(const t in p)"default"!==t&&(o[t]=()=>p[t]);n.d(e,o)},9473:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},a=function(t){window.dispatchEvent(new CustomEvent(d,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",d="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},2630:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function p(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},i={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){i.createGlobalStore=t.createGlobalStore}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var u,a,s,l,f=e&&c(e.prototype,i)?e:i,h=Object.create(f.prototype),d=new p(r||[]);return h._invoke=(u=t,a=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(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===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(u,a,s);if("normal"===i.type){if(l=s.done?E:x,i.arg===j)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=E,s.method="throw",s.arg=i.arg)}}),h},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=a.prototype=i.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,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,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,j;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return u.prototype=a,n(P,"constructor",a),n(a,"constructor",u),u.displayName=n(a,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=r},685:function(t){"use strict";t.exports=i}},p={};function d(e){var n=p[e];if(void 0!==n)return n.exports;var r=p[e]={exports:{}};return t[e](r,r.exports,d),r.exports}d.y=e,d.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return d.d(e,{a:e}),e},d.d=function(t,e){for(var n in e)d.o(e,n)&&!d.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},d.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;d.g.importScripts&&(t=d.g.location+"");var e=d.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=t}();var v={};return(0,d(968).s)(1),function(){"use strict";var t=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},e=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},r=function(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(r)},i=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},p=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},y=function(){},g=function(t,e){if(!e)return t&&t.then?t.then(y):Promise.resolve()},m=function(t,e){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Tn(t,e);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=In?In:Promise.resolve(void 0)},w=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},S=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){w(i,r,o,u,a,"next",t)}function a(t){w(i,r,o,u,a,"throw",t)}u(void 0)}))}},x=function(t){return Bn.apply(this,arguments)},O=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},E=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){O(i,r,o,u,a,"next",t)}function a(t){O(i,r,o,u,a,"throw",t)}u(void 0)}))}},j=function(){return Un.apply(this,arguments)},k=function(){return Fn.apply(this,arguments)},A=function(){return Kn.apply(this,arguments)},C=function(){return $n.apply(this,arguments)},P=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},T=function(t){"unavailable"!==Hn&&"unavailable"!==t&&(localStorage.setItem(zn,"on"===t?"active":"disabled"),Hn=t)},I=function(){return Vn.apply(this,arguments)},D=function(t,e){return"object"!=typeof e||Wn(e).forEach((function(n){t[n]=e[n]})),t},R=function(t,e){return Yn.call(t,e)},L=function(t,e){"function"==typeof e&&(e=e(Zn(t))),("undefined"==typeof Reflect?Wn:Reflect.ownKeys)(e).forEach((function(n){M(t,n,e[n])}))},M=function(t,e,n,r){Jn(t,e,D(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},N=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),M(t.prototype,"constructor",t),{extend:L.bind(null,t.prototype)}}}},B=function(t,e,n){return tr.call(t,e,n)},U=function(t,e){return e(t)},F=function(t){if(!t)throw new Error("Assertion Failed")},K=function(t){qn.setImmediate?setImmediate(t):setTimeout(t,0)},$=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},z=function(t){var e={};for(var n in t)R(t,n)&&(e[n]=t[n]);return e},H=function(t){return rr.apply([],t)},V=function(t){ur="undefined"!=typeof WeakMap&&new WeakMap;var e=ar(t);return ur=null,e},q=function(t){return cr.call(t).slice(8,-1)},W=function(t){var e,n,r,o;if(1===arguments.length){if(Gn(t))return t.slice();if(this===fr&&"string"==typeof t)return[t];if(o=lr(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},G=function(t,e){pr=t,dr=e},Z=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(dr).map((function(t){return"\n"+t})).join("")):""},Y=function(t,e){this._e=yr(),this.name=t,this.message=e},J=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Q=function(t,e,n,r){this._e=yr(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=J(t,e)},X=function(t,e){this._e=yr(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=J(t,e)},tt=function(){},et=function(t){return t},nt=function(t,e){return null==t||t===et?e:function(n){return e(t(n))}},rt=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},ot=function(t,e){return t===tt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rt(o,this.onerror):o),void 0!==i?i:n}},it=function(t,e){return t===tt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rt(r,this.onerror):r)}},ut=function(t,e){return t===tt?e:function(n){var r=t.apply(this,arguments);D(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rt(i,this.onerror):i),void 0===r?void 0===u?void 0:u:D(r,u)}},at=function(t,e){return t===tt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},ct=function(t,e){return t===tt?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},st=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=tt,this._lib=!1;var e=this._PSD=zr;if(pr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Er)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ft(this,this._value))}this._state=null,this._value=null,++e.ref,Gr(this,t)},lt=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},ft=function(t,e){if(Ur.push(e),null===t._state){var n=t._lib&&gt();e=Kr(e),t._state=!1,t._value=e,pr&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=Xn(e,"stack");e._promise=t,M(e,"stack",{get:function(){return Dr?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,Br.some((function(t){return t._value===r._value}))||Br.push(r),ht(t),n&&mt()}var r},ht=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)pt(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Vr&&(++Vr,Lr((function(){0==--Vr&&bt()}),[]))},pt=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Vr,Lr(dt,[n,t,e])}else t._listeners.push(e)},dt=function(t,e,n){try{Fr=e;var r,o=e._value;e._state?r=t(o):(Ur.length&&(Ur=[]),r=t(o),-1===Ur.indexOf(o)&&function(t){for(var e=Br.length;e;)if(Br[--e]._value===t._value)return void Br.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Fr=null,0==--Vr&&bt(),--n.psd.ref||n.psd.finalize()}},vt=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},yt=function(){gt()&&mt()},gt=function(){var t=Mr;return Mr=!1,Nr=!1,t},mt=function(){var t,e,n;do{for(;Hr.length>0;)for(t=Hr,Hr=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Hr.length>0);Mr=!0,Nr=!0},bt=function(){var t=Br;Br=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=qr.slice(0),n=e.length;n;)e[--n]()},wt=function(t){return new st(Er,!1,t)},_t=function(t,e){var n=zr;return function(){var r=gt(),o=zr;try{return At(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{At(o,!1),r&&mt()}}},St=function(t,e,n,r){var o=zr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var u=$r.env;i.env=Ir?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject,nthen:Dt(u.nthen,i),gthen:Dt(u.gthen,i)}:{},e&&D(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Pt(i,t,n,r);return 0===i.ref&&i.finalize(),a},xt=function(){return Yr.id||(Yr.id=++Jr),++Yr.awaits,Yr.echoes+=100,Yr.id},Ot=function(){return!!Yr.awaits&&(0==--Yr.awaits&&(Yr.id=0),Yr.echoes=100*Yr.awaits,!0)},Et=function(t){return Yr.echoes&&t&&t.constructor===Tr?(xt(),t.then((function(t){return Ot(),t}),(function(t){return Ot(),no(t)}))):t},jt=function(t){++to,Yr.echoes&&0!=--Yr.echoes||(Yr.echoes=Yr.id=0),Qr.push(zr),At(t,!0)},kt=function(){var t=Qr[Qr.length-1];Qr.pop(),At(t,!1)},At=function(t,e){var n=zr;if((e?!Yr.echoes||Xr++&&t===zr:!Xr||--Xr&&t===zr)||Tt(e?jt.bind(null,t):kt),t!==zr&&(zr=t,n===$r&&($r.env=Ct()),Ir)){var r=$r.env.Promise,o=t.env;Ar.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(qn,"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))}},Ct=function(){var t=qn.Promise;return Ir?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(qn,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Ar.then,gthen:t.prototype.then}:{}},Pt=function(t,e,n,r,o){var i=zr;try{return At(t,!0),e(n,r,o)}finally{At(i,!1)}},Tt=function(t){Pr.call(kr,t)},It=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=zr;n&&xt(),At(e,!0);try{return t.apply(this,arguments)}finally{At(o,!1),r&&Tt(Ot)}}},Dt=function(t,e){return function(n,r){return t.call(this,It(n,e),It(r,e))}},Rt=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(qn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),D(r,o)):qn.CustomEvent&&D(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&qn.dispatchEvent&&(dispatchEvent(r),!qn.PromiseRejectionEvent&&qn.onunhandledrejection))try{qn.onunhandledrejection(r)}catch(t){}pr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},Lt=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},Mt=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=V(e))[t],e}},Nt=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=at),o||(o=tt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){Wn(t).forEach((function(e){var n=t[e];if(Gn(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Sr.InvalidArgument("Invalid event config");var r=i(e,et,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){K((function(){t.apply(null,e)}))}))}))}}))}},Bt=function(t,e){return N(e).from({prototype:t}),e},Ut=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},Ft=function(t,e){t.filter=Lt(t.filter,e)},Kt=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Lt(r(),e())}:e,t.justLimit=n&&!r},$t=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Sr.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},zt=function(t,e,n){var r=$t(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},Ht=function(t,e,n,r){var o=t.replayFilter?Lt(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),R(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Vt(zt(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Vt(zt(t,r,n),Lt(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Vt=function(t,e,n,r){var o=_t(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=tt}),(function(e){t.fail(e),n=tt}))||o(t.value,t,(function(t){return n=t})),n()}))}))},qt=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=q(t);return"ArrayBuffer"===n?"binary":n},Wt=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Gt=function(t,e){return t<e?-1:t===e?0:1},Zt=function(t,e){return t>e?-1:t===e?0:1},Yt=function(t,e,n){var r=c(t,go)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Jt=function(t){return new t.Collection(t,(function(){return ee("")})).limit(0)},Qt=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Xt=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Yt(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?Gt:Zt;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return te(a[0],c[f-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<f;++v){var y=Qt(o,h,a[v],c[v],u,s);null===y&&null===p?d=v+1:(null===p||u(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p},te=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},ee=function(t){return{type:1,lower:t,upper:t}},ne=function(t){return _t((function(e){return re(e),t(e.target.error),!1}))},re=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},oe=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+ie(e)}},ie=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},ue=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:$(n,(function(t){return[t.name,t]}))}},ae=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return er(t,e)}:function(e){return er(e,t)};var e},ce=function(t){return[].slice.call(t)},se=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},le=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,p=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=ce((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=Gn(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:ae(e)},indexes:ce(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:Gn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ae(o)};return i[se(o)]=u,u})),getIndexByKeyPath:function(t){return i[se(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[se(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=_t(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,d=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,re(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(p=s.clear()):v.push(p=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<d;++S)v.push(p=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),p.onerror=m;else for(var x=0;x<d;++x)v.push(p=s[n](w[x])),p.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};p.onerror=function(t){m(t),O(t)},p.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=_t(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=ne(r),p=0;p<a;++p)null!=n[p]&&((i=u.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=_t(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=ne(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=_t(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,p=u.objectStore(o),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?d.getAll(v,l):d.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=ne(i)}else{var g=0,m=a||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=ne(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=_t(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),p=u?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=ne(c),d.onsuccess=_t((function(n){var r=d.result;if(r){r.___id=++_o,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=_t(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=_t(t),d.onerror=ne(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=_t((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=_t((function(e){return t(e.target.result)})),l.onerror=ne(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:wo(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=p.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},fe=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=Xn(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?M(e,t,{get:function(){return this.table(t)},set:function(e){Jn(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},he=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},pe=function(t,e){return t._cfg.version-e._cfg.version},de=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},ve=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return ye(o,t)})),o},ye=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},ge=function(t,e,n){var r={};return B(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=oe(ie(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=oe(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=ue(t,i,u)})),r},me=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+B(f).join("+")+"]";if(e[u]){var p=e[u].idxByName[h];p&&(p.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&qn.WorkerGlobalScope&&c(qn,qn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},be=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Io("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},we=function(t){return t&&"function"==typeof t.databases},_e=function(t){return St((function(){return zr.letThrough=!0,t()}))},Se=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},xe=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Gn(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},Oe=function(t,e,n){var r=arguments.length;if(r<2)throw new Sr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=H(o);return[t,i,n]},Ee=function(t,e,n){for(var r=Gn(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},je=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===po(e.keys[o],t[i])&&(r.push(n?V(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},ke=function(t){return!("from"in t)},Ae=function(t,e){ke(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Co(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},Ce=function(t){var e=ke(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&po(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||po(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},Pe=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=Te(u)}t.d=Te(t)},Te=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},Ie=function(t,e){return Wn(e).forEach((function(n){Ae(t[n]||(t[n]=new Ao),e[n])})),t},De=function(t){var e=Mo;try{Mo=!0,mo.storagemutated.fire(t)}finally{Mo=e}},Re=function(t,e){return!e||"object"!==Ho(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},Le=function(){return new Vo},Me=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Ne=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},Be=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Ne(i,r,o,u,a,"next",t)}function a(t){Ne(i,r,o,u,a,"throw",t)}u(void 0)}))}},Ue=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Fe=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Ue(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Ke=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},$e=function(){return Go},ze=function(){return Zo.apply(this,arguments)},He=function(t,e,n,r){return Yo.apply(this,arguments)},Ve=function(){return Jo.apply(this,arguments)},qe=function(t,e,n,r){return Qo.apply(this,arguments)},We=function(t,e,n){return Xo.apply(this,arguments)},Ge=function(t,e){return ti.apply(this,arguments)},Ze=function(t,e){return ei.apply(this,arguments)},Ye=function(t){return ni.apply(this,arguments)},Je=function(t){return ri.apply(this,arguments)},Qe=function(t){return oi.apply(this,arguments)},Xe=function(t){var e;return!!(null===(e=Wo[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)},tn=function(t){return ii.apply(this,arguments)},en=function(t){return ui.apply(this,arguments)},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[t]={type:t,dependsOn:e,process:n,options:r}},rn=function(){if(!zo&&!(zo="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 zo(ai)},on=function(){return pi+hi()},un=function(t){return t.startsWith(pi)},an=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},cn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},sn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){cn(i,r,o,u,a,"next",t)}function a(t){cn(i,r,o,u,a,"throw",t)}u(void 0)}))}},ln=function(t){return function(t){if(Array.isArray(t))return an(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return an(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fn=function(){return Object.values(di)},hn=function(t){di[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.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.')),di[t.id]=t},pn=function(t){return vi.apply(this,arguments)},dn=function(t,e){return yi.apply(this,arguments)},vn=function(t,e){return gi.apply(this,arguments)},yn=function(t,e,n){return mi.apply(this,arguments)},gn=function(t,e){return bi.apply(this,arguments)},mn=function(t,e,n){return wi.apply(this,arguments)},bn=function(t,e){return _i.apply(this,arguments)},wn=function(t,e,n){return Si.apply(this,arguments)},_n=function(){return xi.apply(this,arguments)},Sn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},xn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Sn(i,r,o,u,a,"next",t)}function a(t){Sn(i,r,o,u,a,"throw",t)}u(void 0)}))}},On=function(){return kn(),Oi},En=function(t,e){kn(),hn({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})},jn=function(t){return Ei.apply(this,arguments)},kn=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.")};d.r(v),d.d(v,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return tn},canBeginEditSynchronizationItemsOfType:function(){return Xe},deleteSynchronizationItem:function(){return en},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return pn},getDynamicOfflineDataEntriesFor:function(){return dn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Je},getFullSynchronizationItemsFor:function(){return Ze},getOfflineDb:function(){return Le},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return $e},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Qe},getSynchronizationItems:function(){return Ye},getSynchronizationItemsFor:function(){return Ge},isOfflineUuid:function(){return un},messageOmrsServiceWorker:function(){return x},offlineUuidPrefix:function(){return pi},omrsOfflineCachingStrategyHttpHeaderName:function(){return Ln},omrsOfflineResponseBodyHttpHeaderName:function(){return Dn},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return We},queueSynchronizationItemFor:function(){return qe},registerOfflinePatientHandler:function(){return En},registerOmrsServiceWorker:function(){return m},removeDynamicOfflineData:function(){return gn},removeDynamicOfflineDataFor:function(){return mn},runSynchronization:function(){return ze},setCurrentOfflineMode:function(){return T},setupDynamicOfflineDataHandler:function(){return hn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return jn}});try{self["workbox:window:6.5.1"]&&_()}catch(t){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var An=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Cn=function(t,e){this.type=t,Object.assign(this,e)},Pn={type:"SKIP_WAITING"},Tn=function(e){var n,r,o=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new An,r.en=new An,r.on=new An,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new Cn(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Cn("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Cn("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return p(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Cn("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,a=o.prototype;return a.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var u=this;return e=function(){return u.mn=Boolean(navigator.serviceWorker.controller),u.yn=u.pn(),p(u.bn(),(function(t){u.fn=t,u.yn&&(u.hn=u.yn,u.en.resolve(u.yn),u.on.resolve(u.yn),u.yn.addEventListener("statechange",u.ln,{once:!0}));var e=u.fn.waiting;return e&&i(e.scriptURL,u.sn.toString())&&(u.hn=e,Promise.resolve().then((function(){u.dispatchEvent(new Cn("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})).then((function(){}))),u.hn&&(u.rn.resolve(u.hn),u.an.add(u.hn)),u.fn.addEventListener("updatefound",u.cn),navigator.serviceWorker.addEventListener("controllerchange",u.dn),u.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return g(new Promise((function(t){return window.addEventListener("load",t)})))}())&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},a.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},a.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(e){try{return p(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,Pn)},a.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},a.bn=function(){try{var t=this;return function(e,n){try{var r=p(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(o.prototype,u),o}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),In=void 0,Dn="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Ln="x-omrs-offline-caching-strategy",Mn=d(602),Nn=d.n(Mn);function Bn(){return(Bn=S(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.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 t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Un(){return(Un=E(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function Fn(){return(Fn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kn(){return Kn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),Kn.apply(this,arguments)}function $n(){return($n=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,k();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,j();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var zn="openmrs3:offline-mode",Hn="unavailable";function Vn(){return(Vn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,C();case 2:t.sent||(Hn="active"===localStorage.getItem(zn)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Wn=Object.keys,Gn=Array.isArray;"undefined"==typeof Promise||qn.Promise||(qn.Promise=Promise);var Zn=Object.getPrototypeOf,Yn={}.hasOwnProperty,Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(t,e){var n;return Qn(t,e)||(n=Zn(t))&&Xn(n,e)}var tr=[].slice;function er(t,e){if(R(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=er(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:er(a,e.substr(u+1))}}function nr(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){F("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)nr(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?Gn(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),nr(c,a,n)}}else void 0===n?Gn(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return qn[t]})),ir=or.map((function(t){return qn[t]}));$(or,(function(t){return[t,!0]}));var ur=null;function ar(t){if(!t||"object"!=typeof t)return t;var e=ur&&ur.get(t);if(e)return e;if(Gn(t)){e=[],ur&&ur.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(ar(t[n]))}else if(ir.indexOf(t.constructor)>=0)e=t;else{var o=Zn(t);for(var i in e=o===Object.prototype?{}:Object.create(o),ur&&ur.set(t,e),t)R(t,i)&&(e[i]=ar(t[i]))}return e}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":h(sr))?function(t){var e;return null!=t&&(e=t[sr])&&e.apply(t)}:function(){return null},fr={},hr="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},pr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),dr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(t){return t}return new Error}var gr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(gr),br={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"};N(Y).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),N(Q).from(Y),N(X).from(Y);var wr=mr.reduce((function(t,e){return t[e]=e+"Error",t}),{}),_r=Y,Sr=mr.reduce((function(t,e){var n=function(t,n){this._e=yr(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=br[e]||r,this.inner=null)},r=e+"Error";return N(n).from(_r),t[e]=n,t}),{});Sr.Syntax=SyntaxError,Sr.Type=TypeError,Sr.Range=RangeError;var xr=gr.reduce((function(t,e){return t[e+"Error"]=Sr[e],t}),{}),Or=mr.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Sr[e]),t}),{});Or.ModifyError=Q,Or.DexieError=Y,Or.BulkError=X;var Er={},jr=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,Zn(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Zn(e),t]}(),3),kr=jr[0],Ar=jr[1],Cr=jr[2],Pr=Ar&&Ar.then,Tr=kr&&kr.constructor,Ir=!!Cr,Dr=!1,Rr=Cr?function(){Cr.then(yt)}:qn.setImmediate?setImmediate.bind(null,yt):qn.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){yt(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(yt,0)},Lr=function(t,e){Hr.push([t,e]),Nr&&(Rr(),Nr=!1)},Mr=!0,Nr=!0,Br=[],Ur=[],Fr=null,Kr=et,$r={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Rt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Rt(t[0],t[1])}catch(t){}}))}},zr=$r,Hr=[],Vr=0,qr=[],Wr={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==zr||n!==to),u=i&&!Ot(),a=new st((function(n,a){pt(o,new lt(It(t,e,i,u),It(r,e,i,u),n,a,e))}));return pr&&vt(a,this),a},e=zr,n=to;return t.prototype=Er,t},set:function(t){M(this,"then",t&&t.prototype===Er?Wr:{get:function(){return t},set:Wr.set})}};function Gr(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&gt();e&&"function"==typeof e.then?Gr(t,(function(t,n){c(e,st)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,ht(t)),n&&mt()}}),ft.bind(null,t))}catch(e){ft(t,e)}}function Zr(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Z(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return pr&&((r=Z(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Zr(t._prev,e,n)),e}L(st.prototype,{then:Wr,_then:function(t,e){pt(this,new lt(null,null,t,e,zr))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):wt(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):wt(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),wt(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Dr=!0;var t=Zr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Dr=!1}}},timeout:function(t,e){var n=this;return t<1/0?new st((function(r,o){var i=setTimeout((function(){return o(new Sr.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&M(st.prototype,Symbol.toStringTag,"Dexie.Promise"),$r.env=Ct(),L(st,{all:function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return st.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,st))return t;if(t&&"function"==typeof t.then)return new st((function(e,n){t.then(e,n)}));var e=new st(Er,!0,t);return vt(e,Fr),e},reject:wt,race:function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){t.map((function(t){return st.resolve(t).then(e,n)}))}))},PSD:{get:function(){return zr},set:function(t){return zr=t}},totalEchoes:{get:function(){return to}},newPSD:St,usePSD:Pt,scheduler:{get:function(){return Lr},set:function(t){Lr=t}},rejectionMapper:{get:function(){return Kr},set:function(t){Kr=t}},follow:function(t,e){return new st((function(n,r){return St((function(e,n){var r=zr;r.unhandleds=[],r.onunhandled=n,r.finalize=rt((function(){var t=this;qr.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),qr.splice(qr.indexOf(r),1)})),++Vr,Lr((function(){0==--Vr&&bt()}),[])}),r.finalize),t()}),e,n,r)}))}}),Tr&&(Tr.allSettled&&M(st,"allSettled",(function(){var t=W.apply(null,arguments).map(Et);return new st((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return st.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Tr.any&&"undefined"!=typeof AggregateError&&M(st,"any",(function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return st.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var Yr={awaits:0,echoes:0,id:0},Jr=0,Qr=[],Xr=0,to=0,eo=0;-1===(""+Pr).indexOf("[native code]")&&(xt=Ot=tt);var no=st.reject;function ro(t,e,n,r){if(t.idbdb&&(t._state.openComplete||zr.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return ro(t,e,n,r)}))):no(o)}return o._promise(e,(function(t,e){return St((function(){return zr.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return no(new Sr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return no(new Sr.DatabaseClosed);t.open().catch(tt)}return t._state.dbReadyPromise.then((function(){return ro(t,e,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",uo=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=ao,so=ao,lo=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},ho=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Sr.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||zr.trans,i=this.name,u=gt();try{return o&&o.db===this.db?o===zr.trans?o._promise(t,r,n):St((function(){return o._promise(t,r,n)}),{trans:o,transless:zr.transless||zr}):ro(this.db,t,[this.name],r)}finally{u&&mt()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(Gn(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=Wn(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&pr&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?Lt(a,c&&c.multi?function(t){var n=er(t,r);return Gn(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,er(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,Gn(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(R(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){D(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Mt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||Gn(t))return this.where(":id").equals(t).modify(e);var n=er(t,this.schema.primKey.keyPath);if(void 0===n)return no(new Sr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?Wn(e).forEach((function(n){nr(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Mt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:fo})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Mt(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Mt(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new X("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function po(t,e){try{var n=qt(t),r=qt(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Wt(t),Wt(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=po(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var vo=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,no.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=Lt(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return Ht(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&D(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return Ht(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(Ut(n,!0))return r.count({trans:t,query:{index:$t(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return Ht(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&Ut(n,!0)&&n.limit>0){var r=n.valueMapper,o=$t(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return Ht(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,Ut(e)?Kt(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):Kt(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Kt(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return Ft(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return Ft(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=Lt(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&Ut(e,!0)&&e.limit>0)return this._read((function(t){var n=$t(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ft(this._ctx,(function(t){var e=t.primaryKey.toString(),r=R(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=Wn(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];er(e,o)!==a&&(nr(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],p=0,d=[],v=function(t,e){var n=e.failures,r=e.numFailures;p+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=Wn(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var p=[],d=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:V(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===po(l(b),l(w.value))?(d.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),p.push(w.value)))}var _=Ut(n)&&n.limit===1/0&&("function"!=typeof t||t===yo)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(p.length,t)}))).then((function(){return(d.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:d,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(d.length,t)}))})).then((function(){return(g.length>0||_&&t===yo)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new Q("Error modifying one or more objects",h,p,d);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return Ut(t)&&(t.isPrimKey&&!so||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(yo)}}]),t}(),yo=function(t,e){return e.value=null},go=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Jt(this):new this.Collection(this,(function(){return te(t,e,!n,!r)}))}catch(t){return Yt(this,io)}}},{key:"equals",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return ee(t)}))}},{key:"above",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Yt(this,"String expected."):this.between(t,t+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Xt(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],oo)}},{key:"equalsIgnoreCase",value:function(t){return Xt(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Jt(this):Xt(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Jt(this):Xt(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,oo)}},{key:"anyOf",value:function(){var t=this,e=W.apply(fr,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Yt(this,io)}if(0===e.length)return Jt(this);var r=new this.Collection(this,(function(){return te(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=W.apply(fr,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Yt(this,io)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Jt(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Yt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Sr.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{(s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[])).sort(r)}catch(t){return Yt(this,io)}var p=0,d=f?function(t){return i(t,s[p][1])>0}:function(t){return i(t,s[p][1])>=0},v=l?function(t){return u(t,s[p][0])>0}:function(t){return u(t,s[p][0])>=0},y=d,g=new this.Collection(this,(function(){return te(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=d,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++p===s.length)return e(r),!1;return!((d(u=o)||v(u))&&(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||e((function(){h===i?t.continue(s[p][0]):t.continue(s[p][1])})),1));var u})),g}},{key:"startsWithAnyOf",value:function(){var t=W.apply(fr,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Jt(this):this.inAnyRange(t.map((function(t){return[t,t+oo]}))):Yt(this,"startsWithAnyOf() only works with strings")}}]),t}(),mo=Nt(null,"storagemutated"),bo=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return F(!zr.global),++this._reculock,1!==this._reculock||zr.global||(zr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(F(!zr.global),0==--this._reculock)for(zr.global||(zr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Pt(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&zr.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(F(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Sr.DatabaseClosed(r);case"MissingAPIError":throw new Sr.MissingAPI(r.message,r);default:throw new Sr.OpenFailed(r)}if(!this.active)throw new Sr.TransactionInactive;return F(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=_t((function(n){re(n),e._reject(t.error)})),t.onabort=_t((function(n){re(n),e.active&&e._reject(new Sr.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=_t((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&mo.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return no(new Sr.ReadOnly("Transaction is readonly"));if(!this.active)return no(new Sr.TransactionInactive);if(this._locked())return new st((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},zr])}));if(n)return St((function(){var t=r,n=new st((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new st((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=st.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new st((function(t,r){n.then((function(n){return e._waitingQueue.push(_t(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(_t(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Sr.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(R(e,t))return e[t];var n=this.schema[t];if(!n)throw new Sr.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),wo=function(t){try{return t.only([[]]),wo=function(){return[[]]},[[]]}catch(t){return wo=function(){return oo},oo}},_o=0,So=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){Wn(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return oe(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),Gn(r),0===e)})),o=r.shift();if(o.multi)throw new Sr.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Sr.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Sr.Schema("Index must have a name and cannot be an empty string")})),e[n]=ue(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?D(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){D(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,he(e,[e._allTables,e,e.Transaction.prototype]),fe(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],Wn(o),o),e._storeNames=Wn(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=ct(this._cfg.contentUpgrade||tt,t),this}}]),t}();function xo(t,e,n,r,o){return st.resolve().then((function(){var i=zr.transless||zr,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return xo(t,e,n,null,o)}))):no(r)}var c,s=hr(o);s&&xt();var l=st.follow((function(){if(c=o.call(u,u))if(s){var t=Ot.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xe(c))}),a);return(c&&"function"==typeof c.then?st.resolve(c).then((function(t){return u.active?t:no(new Sr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),no(t)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Ee(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:Ee(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=se(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:ae(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var p,d=o.indexes[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[se(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(Ee(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(Ee(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function Eo(t,e,n,r){return n=n||{},r=r||"",Wn(t).forEach((function(o){if(R(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=q(i);a!==q(u)?n[r+o]=e[o]:"Object"===a?Eo(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),Wn(e).forEach((function(o){R(t,o)||(n[r+o]=e[o])})),n}var jo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e,o,i=zr.trans,u=t.keys||(e=r,"delete"===(o=t).type?o.keys:o.keys||o.values.map(e.extractKey));if(!u)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:u}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,u).then((function(e){var o=u.map((function(n,o){var u=e[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,i);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],i);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||nr(t.values[o],r.keyPath,n))}else{var h=Eo(u,t.values[o]),p=l.fire.call(s,h,n,u,i);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){R(d,t)?d[t]=p[t]:nr(d,t,p[t])}))}}return s}));return n.mutate(t).then((function(n){for(var r=n.failures,i=n.results,a=n.numFailures,c=n.lastResult,s=0;s<u.length;++s){var l=i?i[s]:u[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===t.type&&e[s]?t.values[s]:l)}return{failures:r,results:i,numFailures:a,lastResult:c}})).catch((function(t){return o.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=zr.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===tt&&l.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===tt)break;return i._promise("readwrite",(function(){return h((e=t).trans,e.range,1e4);var e}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},ko={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=je(t.keys,t.trans._cache,"clone"===t.cache);return e?st.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?V(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Ao=function(t,e){if(!this){var n=new Ao;return t&&"d"in t&&D(n,t),n}D(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Co(t,e,n){var r=po(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(ke(t))return D(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(po(n,t.from)<0)return o?Co(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},Pe(t);if(po(e,t.to)>0)return i?Co(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},Pe(t);po(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),po(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&Ae(t,o),i&&u&&Ae(t,i)}}L(Ao.prototype,a({add:function(t){return Ae(this,t),this},addKey:function(t){return Co(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Co(e,t,t)})),this}},sr,(function(){return Ce(this)})));var Po,To={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Ao(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Ao)},s=c(""),f=c(":dels"),h=t.type,p=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),d=p[0],v=p[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(Gn(d)){"delete"!==h&&(d=t.results),s.addKeys(d);var e=je(d,y);e||"add"===h||f.addKeys(d),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&Gn(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==po(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(d){var r={from:d.lower,to:d.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Ao(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},p={get:function(t){return[u,new Ao(t.key)]},getMany:function(t){return[u,(new Ao).addKeys(t.keys)]},count:h,query:h,openCursor:h};return Wn(p).forEach((function(t){f[t]=function(i){var u=zr.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Ao)},h=f(""),d=f(":dels"),v=l(p[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):d.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return d.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return d.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}d.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Io=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f,h={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:tt,dbReadyPromise:null,cancelOpen:tt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};h.dbReadyPromise=new st((function(t){h.dbReadyResolve=t})),h.openCanceller=new st((function(t,e){h.cancelOpen=e})),this._state=h,this.name=e,this.on=Nt(this,"populate","blocked","versionchange","close",{ready:[ct,tt]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||st.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Bt(vo.prototype,(function(t,e){this.db=a;var n=fo,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=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:u!==et?u:null}}))),this.Table=(f=this,Bt(ho.prototype,(function(t,e,n){this.db=f,this._tx=n,this.name=t,this.schema=e,this.hook=f._allTables[t]?f._allTables[t].hook:Nt(null,{creating:[ot,tt],reading:[nt,et],updating:[ut,tt],deleting:[it,tt]})}))),this.Transaction=(l=this,Bt(bo.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Nt(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 st((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),no(t)}))}))),this.Version=function(t){return Bt(So.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Bt(go.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Sr.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.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(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),uo.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Oo),this.use(jo),this.use(To),this.use(ko),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Sr.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Sr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(pe),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||zr.letThrough||this._vip)?t():new st((function(t,n){if(e._state.openComplete)return n(new Sr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Sr.DatabaseClosed);e.open().catch(tt)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Sr.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):t}));pr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return st.race([o,("undefined"==typeof navigator?st.resolve():Se()).then((function(){return new st((function(o,i){if(e(),!r)throw new Sr.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Sr.MissingAPI;s.onerror=ne(i),s.onblocked=_t(t._fireOnBlocked),s.onupgradeneeded=_t((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=re,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=_t((function(){i(new Sr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=ne(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=zr.transless||zr;St((function(){var r,c,s,l,f,h,p,d,v;zr.trans=i,zr.transless=a,0===e?(Wn(o).forEach((function(t){ve(n,t,o[t].primKey,o[t].indexes)})),le(t,n),st.follow((function(){return t.on.populate.fire(i)})).catch(u)):(r=t,c=e,s=i,l=n,f=r._novip,h=[],p=f._versions,d=f._dbSchema=ge(0,f.idbdb,l),v=!1,p.filter((function(t){return t._cfg.version>=c})).forEach((function(t){h.push((function(){var e=d,n=t._cfg.dbschema;me(f,e,l),me(f,n,l),d=f._dbSchema=n;var r=de(e,n);r.add.forEach((function(t){ve(l,t[0],t[1].primKey,t[1].indexes)})),r.change.forEach((function(t){if(t.recreate)throw new Sr.Upgrade("Not yet support for changing primary key");var e=l.objectStore(t.name);t.add.forEach((function(t){return ye(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),ye(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var o=t._cfg.contentUpgrade;if(o&&t._cfg.version>c){le(f,l),s._memoizedTables={},v=!0;var i=z(n);r.del.forEach((function(t){i[t]=e[t]})),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],Wn(i),i),s.schema=i;var u,a=hr(o);a&&xt();var h=st.follow((function(){if((u=o(s))&&a){var t=Ot.bind(null,null);u.then(t,t)}}));return u&&"function"==typeof u.then?st.resolve(u):h.then((function(){return u}))}})),h.push((function(e){var n,r;v&&co||(n=t._cfg.dbschema,r=e,[].slice.call(r.db.objectStoreNames).forEach((function(t){return null==n[t]&&r.db.deleteObjectStore(t)}))),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function t(){return h.length?st.resolve(h.shift()(s.idbtrans)).then(t):st.resolve()}().then((function(){var t,e;e=l,Wn(t=d).forEach((function(n){e.db.objectStoreNames.contains(n)||ve(e,n,t[n].primKey,t[n].indexes)}))}))).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=_t((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=B(f.objectStoreNames);if(h.length>0)try{var p=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=ge(0,e,n);r._storeNames=B(e.objectStoreNames,0),fe(r,[r._allTables],Wn(o),o)}(t,f,p):(me(t,t._dbSchema,p),r=p,!((i=de(ge(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),le(t,p)}catch(t){}uo.push(t),f.onversionchange=_t((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=_t((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).put({name:e}).catch(tt)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],st.resolve(_e((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ct,tt);return n.onReadyBeingFired=[],st.resolve(_e((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),no(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=uo.indexOf(this);if(e>=0&&uo.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new st((function(e){t.dbReadyResolve=e})),t.openCanceller=new st((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Sr.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new st((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=_t((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).delete(e).catch(tt)}(t._deps,t.name),r()})),e.onerror=ne(o),e.onblocked=i._fireOnBlocked};if(e)throw new Sr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return Wn(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=Oe.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=zr.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Sr.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Sr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Sr.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):no(t)}var l=xo.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):zr.trans?Pt(zr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!R(this._allTables,t))throw new Sr.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Do="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ro=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Do,value:function(){return this}}]),t}();try{Po={indexedDB:qn.indexedDB||qn.mozIndexedDB||qn.webkitIndexedDB||qn.msIndexedDB,IDBKeyRange:qn.IDBKeyRange||qn.webkitIDBKeyRange}}catch(t){Po={indexedDB:null,IDBKeyRange:null}}var Lo=Io;L(Lo,s({},Or,{delete:function(t){return new Lo(t,{addons:[]}).delete()},exists:function(t){return new Lo(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return we(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):be(e,n).toCollection().primaryKeys()}(Lo.dependencies).then(t)}catch(t){return no(new Sr.MissingAPI)}},defineClass:function(){return function(t){D(this,t)}},ignoreTransaction:function(t){return zr.trans?Pt(zr.transless,t):t()},vip:_e,async:function(t){return function(){try{var e=xe(t.apply(this,arguments));return e&&"function"==typeof e.then?e:st.resolve(e)}catch(t){return no(t)}}},spawn:function(t,e,n){try{var r=xe(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:st.resolve(r)}catch(t){return no(t)}},currentTransaction:{get:function(){return zr.trans||null}},waitFor:function(t,e){var n=st.resolve("function"==typeof t?Lo.ignoreTransaction(t):t).timeout(e||6e4);return zr.trans?zr.trans.waitFor(n):n},Promise:st,debug:{get:function(){return pr},set:function(t){G(t,"dexie"===t?function(){return!0}:lo)}},derive:N,extend:D,props:L,override:U,Events:Nt,on:mo,liveQuery:function(t){return new Ro((function(e){var n=function(){return Wn(u).some((function(t){return i[t]&&function(t,e){var n=Ce(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=Ce(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(po(a.from,o.to)<=0&&po(a.to,o.from)>=0)return!0;po(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=hr(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){Ie(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},p=function(e){r&&xt();var n=function(){return St(t,{subscr:e,trans:null})},o=zr.trans?Pt(zr.transless,n):n();return r&&o.then(Ot,Ot),o}(h);s||(mo("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:Ie,getByKeyPath:er,setByKeyPath:nr,delByKeyPath:function(t,e){"string"==typeof e?nr(t,e,void 0):"length"in e&&[].map.call(e,(function(e){nr(t,e,void 0)}))},shallowClone:z,deepClone:V,getObjectDiff:Eo,cmp:po,asap:K,minKey:-1/0,addons:[],connections:uo,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),Lo.maxKey=wo(Lo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(t){var e;Mo||(ao?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),Mo=!0,dispatchEvent(e),Mo=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;Mo||De(e)})));var Mo=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");mo("storagemutated",(function(t){Mo||No.postMessage(t)})),No.onmessage=function(t){t.data&&De(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(t){try{Mo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&De(e.changedParts)}}));var Bo=self.document&&navigator.serviceWorker;Bo&&Bo.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&De(e.changedParts)}))}st.rejectionMapper=function(t,e){if(!t||c(t,Y)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!xr[t.name])return t;var n=new xr[t.name](e||t.message,t);return"stack"in t&&M(n,"stack",{get:function(){return this.inner.stack}}),n},G(pr,lo);var Uo=d(766),Fo=d(685);function Ko(t){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $o(t,e){return($o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var zo,Ho=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$o(t,e)}(o,t);var e,n,r=(e=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(t){return!1}}(),function(){var t,r=Ko(e);if(n){var o=Ko(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Re(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Io),qo=new Vo,Wo={},Go=(0,Fo.createGlobalStore)("offline-synchronization",{});function Zo(){return Zo=Be(Nn().mark((function t(){var e,n,r,o,i,u,a,c,s,l,f,h,p;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Go.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,qo.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Wo),o=r.length,i={},u=new AbortController,a=function(){var t=Go.getState().synchronization;Go.setState({synchronization:Fe({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Go.setState({synchronization:{totalCount:e,pendingCount:e,abortController:u}}),c=0;case 14:if(!(c<o&&r.length>0)){t.next=30;break}s=r.length;case 16:if(!s--){t.next=27;break}if(l=Ke(r[s],2),f=l[0],h=l[1],!(p=h.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(p);case 23:n[f]=He(h,i,u,a),r.splice(s,1);case 25:t.next=16;break;case 27:c++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Go.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),Zo.apply(this,arguments)}function Yo(){return Yo=Be(Nn().mark((function t(e,n,r,o){var i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,u=e.dependsOn,a=e.process,c=[],s=[],t.next=5,Ve();case 5:return l=t.sent,t.next=8,qo.syncQueue.where({type:i,userId:l}).each((function(t,e){c.push([e.primaryKey,t.content,t.descriptor]),s.push(t.content)}));case 8:f=0;case 9:if(!(f<c.length)){t.next=31;break}return h=Ke(c[f],3),p=h[0],d=h[1],v=h[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,a(d,{abort:r,index:f,items:s,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return u.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,qo.syncQueue.delete(p);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,qo.syncQueue.update(p,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),Yo.apply(this,arguments)}function Jo(){return(Jo=Be(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(){return(Qo=Be(Nn().mark((function t(e,n,r,o){var i,u;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,qo.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(Io.errnames.DatabaseClosed);case 4:return t.next=6,qo.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(Io.errnames.DatabaseClosed,(function(){return-1}));case 6:return u=t.sent,t.abrupt("return",u);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xo(){return(Xo=Be(Nn().mark((function t(e,n,r){var o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return o=t.sent,t.next=5,qe(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ti(){return(ti=Be(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ze(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(){return(ei=Be(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,qo.syncQueue.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ni(){return(ni=Be(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ge(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ri(){return(ri=Be(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ze(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oi(){return(oi=Be(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.get(e).catch(Io.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ii(){return(ii=Be(Nn().mark((function t(e){var n,r,o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Qe(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}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(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(){return(ui=Be(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.delete(e).catch(Io.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}for(var ai=new Uint8Array(16),ci=/^(?:[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,si=function(t){return"string"==typeof t&&ci.test(t)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var hi=function(t,e,n){var r=(t=t||{}).random||(t.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[t[e+0]]+li[t[e+1]]+li[t[e+2]]+li[t[e+3]]+"-"+li[t[e+4]]+li[t[e+5]]+"-"+li[t[e+6]]+li[t[e+7]]+"-"+li[t[e+8]]+li[t[e+9]]+"-"+li[t[e+10]]+li[t[e+11]]+li[t[e+12]]+li[t[e+13]]+li[t[e+14]]+li[t[e+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},pi="OFFLINE+",di={};function vi(){return(vi=sn(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return n=t.sent,t.next=5,dn(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yi(){return(yi=sn(Nn().mark((function t(e,n){var r,o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Vo,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gi(){return(gi=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,yn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mi(){return(mi=sn(Nn().mark((function t(e,n,r){var o,i;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(Io.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([e])}).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bi(){return(bi=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,mn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wi(){return(wi=sn(Nn().mark((function t(e,n,r){var o,i;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(Io.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _i(){return _i=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pn(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=sn(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",wn(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),_i.apply(this,arguments)}function Si(){return Si=sn(Nn().mark((function t(e,n,r){var o,i,u,a,c,s,l,f,h;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vn(e,n);case 2:return o=new Vo,t.next=5,_n();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(Io.errnames.DatabaseClosed,(function(){}));case 8:if(u=t.sent,a=fn().filter((function(t){return t.type===e})),u){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(a.map(function(){var t=sn(Nn().mark((function t(e){var o,i,u;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),u=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:u});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(c=t.sent,s=c.filter((function(t){return!t.error})).map((function(t){return t.id})),l=c.filter((function(t){return t.error})).map((function(t){return t.id})),f=c.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),h={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!u.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(u.id,{syncState:h}).catch(Io.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),Si.apply(this,arguments)}function xi(){return(xi=sn(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oi=(0,Fo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Ei(){return(Ei=xn(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return kn(),t.next=3,wn("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}(),v}())}}}))},9336:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,u){var a={},c={},s={},l={},f={},h={},p={},d={},v={};return{setters:[function(t){a.createContext=t.createContext,a.createElement=t.createElement,a.default=t.default,a.useCallback=t.useCallback,a.useContext=t.useContext,a.useDebugValue=t.useDebugValue,a.useEffect=t.useEffect,a.useLayoutEffect=t.useLayoutEffect,a.useMemo=t.useMemo,a.useReducer=t.useReducer,a.useRef=t.useRef,a.useState=t.useState},function(t){c.getConfigStore=t.getConfigStore,c.getExtensionConfigFromStore=t.getExtensionConfigFromStore,c.getExtensionsConfigStore=t.getExtensionsConfigStore,c.interpolateUrl=t.interpolateUrl,c.navigate=t.navigate},function(t){s.getConnectedExtensions=t.getConnectedExtensions,s.getExtensionInternalStore=t.getExtensionInternalStore,s.getExtensionStore=t.getExtensionStore,s.registerExtensionSlot=t.registerExtensionSlot,s.renderExtension=t.renderExtension},function(t){l.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){f.default=t.default},function(t){h.default=t.default},function(t){p.I18nextProvider=t.I18nextProvider},function(t){d.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,d.fetchCurrentPatient=t.fetchCurrentPatient,d.getCurrentUser=t.getCurrentUser,d.getLocations=t.getLocations,d.getSessionStore=t.getSessionStore,d.getVisitTypes=t.getVisitTypes,d.openmrsFetch=t.openmrsFetch,d.userHasAccess=t.userHasAccess},function(t){v.default=t.default}],execute:function(){i(function(){var i={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var i;t=n.nmd(t),function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},d=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},E=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:tt},j=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,q(t)+1).replace(Vt,""):t},I=function(t){return function(e){return t(e)}},D=function(t,e){return v(e,(function(e){return t[e]}))},R=function(t,e){return t.has(e)},L=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},M=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},N=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},B=function(t){return"\\"+$e[t]},U=function(t){return Me.test(t)},F=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},K=function(t,e){return function(n){return t(e(n))}},$=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Z||(t[n]=Z,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t){return U(t)?function(t){for(var e=Re.lastIndex=0;Re.test(t);)++e;return e}(t):un(t)},V=function(t){return U(t)?t.match(Re)||[]:t.split("")},q=function(t){for(var e=t.length;e--&&qt.test(t.charAt(e)););return e},W="Expected a function",G="__lodash_hash_undefined__",Z="__lodash_placeholder__",Y=32,J=128,Q=1/0,X=9007199254740991,tt=NaN,et=4294967295,nt=[["ary",J],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],rt="[object Arguments]",ot="[object Array]",it="[object Boolean]",ut="[object Date]",at="[object Error]",ct="[object Function]",st="[object GeneratorFunction]",lt="[object Map]",ft="[object Number]",ht="[object Object]",pt="[object Promise]",dt="[object RegExp]",vt="[object Set]",yt="[object String]",gt="[object Symbol]",mt="[object WeakMap]",bt="[object ArrayBuffer]",wt="[object DataView]",_t="[object Float32Array]",St="[object Float64Array]",xt="[object Int8Array]",Ot="[object Int16Array]",Et="[object Int32Array]",jt="[object Uint8Array]",kt="[object Uint8ClampedArray]",At="[object Uint16Array]",Ct="[object Uint32Array]",Pt=/\b__p \+= '';/g,Tt=/\b(__p \+=) '' \+/g,It=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dt=/&(?:amp|lt|gt|quot|#39);/g,Rt=/[&<>"']/g,Lt=RegExp(Dt.source),Mt=RegExp(Rt.source),Nt=/<%-([\s\S]+?)%>/g,Bt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/,$t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(zt.source),Vt=/^\s+/,qt=/\s/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Zt=/,? & /,Yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jt=/[()=,{}\[\]\/\s]/,Qt=/\\(\\)?/g,Xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ie=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ae=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",le="a-z\\xdf-\\xf6\\xf8-\\xff",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\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",pe="["+he+"]",de="["+se+"]",ve="\\d+",ye="["+le+"]",ge="[^\ud800-\udfff"+he+ve+"\\u2700-\\u27bf"+le+fe+"]",me="\ud83c[\udffb-\udfff]",be="[^\ud800-\udfff]",we="(?:\ud83c[\udde6-\uddff]){2}",_e="[\ud800-\udbff][\udc00-\udfff]",Se="["+fe+"]",xe="(?:"+ye+"|"+ge+")",Oe="(?:"+Se+"|"+ge+")",Ee="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",ke="(?:"+de+"|"+me+")?",Ae="[\\ufe0e\\ufe0f]?",Ce=Ae+ke+"(?:\\u200d(?:"+[be,we,_e].join("|")+")"+Ae+ke+")*",Pe="(?:"+["[\\u2700-\\u27bf]",we,_e].join("|")+")"+Ce,Te="(?:"+[be+de+"?",de,we,_e,"[\ud800-\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),De=RegExp(de,"g"),Re=RegExp(me+"(?="+me+")|"+Te+Ce,"g"),Le=RegExp([Se+"?"+ye+"+"+Ee+"(?="+[pe,Se,"$"].join("|")+")",Oe+"+"+je+"(?="+[pe,Se+xe,"$"].join("|")+")",Se+"?"+xe+"+"+Ee,Se+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Pe].join("|"),"g"),Me=RegExp("[\\u200d\ud800-\udfff"+se+"\\ufe0e\\ufe0f]"),Ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be=["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"],Ue=-1,Fe={};Fe[_t]=Fe[St]=Fe[xt]=Fe[Ot]=Fe[Et]=Fe[jt]=Fe[kt]=Fe[At]=Fe[Ct]=!0,Fe[rt]=Fe[ot]=Fe[bt]=Fe[it]=Fe[wt]=Fe[ut]=Fe[at]=Fe[ct]=Fe[lt]=Fe[ft]=Fe[ht]=Fe[dt]=Fe[vt]=Fe[yt]=Fe[mt]=!1;var Ke={};Ke[rt]=Ke[ot]=Ke[bt]=Ke[wt]=Ke[it]=Ke[ut]=Ke[_t]=Ke[St]=Ke[xt]=Ke[Ot]=Ke[Et]=Ke[lt]=Ke[ft]=Ke[ht]=Ke[dt]=Ke[vt]=Ke[yt]=Ke[gt]=Ke[jt]=Ke[kt]=Ke[At]=Ke[Ct]=!0,Ke[at]=Ke[ct]=Ke[mt]=!1;var $e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,He=parseInt,Ve="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,qe="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||qe||Function("return this")(),Ge=e&&!e.nodeType&&e,Ze=Ge&&t&&!t.nodeType&&t,Ye=Ze&&Ze.exports===Ge,Je=Ye&&Ve.process,Qe=function(){try{return Ze&&Ze.require&&Ze.require("util").types||Je&&Je.binding&&Je.binding("util")}catch(t){}}(),Xe=Qe&&Qe.isArrayBuffer,tn=Qe&&Qe.isDate,en=Qe&&Qe.isMap,nn=Qe&&Qe.isRegExp,rn=Qe&&Qe.isSet,on=Qe&&Qe.isTypedArray,un=j("length"),an=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({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function t(e){var n,i,k=function(t){if(Po(t)&&!Pa(t)&&!r(t,le)){if(r(t,se))return t;if(bi.call(t,"__wrapped__"))return no(t)}return new se(t)},qt=function(){},se=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},le=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]},fe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Pa(t),r=!n&&Ca(t),o=!n&&!r&&Ia(t),i=!n&&!r&&!o&&Na(t),u=n||r||o||i,a=u?P(t.length,hi):[],c=a.length;for(var s in t)!e&&!bi.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Fr(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return Xr(or(t),ke(e,0,t.length))},be=function(t){return Xr(or(t))},we=function(t,e,n){(n!==u&&!So(t[e],n)||n===u&&!(e in t))&&Ee(t,e,n)},_e=function(t,e,n){var r=t[e];bi.call(t,e)&&So(r,n)&&(n!==u||e in t)||Ee(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(So(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return mu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ir(e,Ho(e),t)},Ee=function(t,e,n){"__proto__"==e&&Ni?Ni(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},je=function(t,e){for(var n=-1,r=e.length,o=ii(r),i=null==t;++n<r;)o[n]=i?u:$o(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=li(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new pi(W);return Ku((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=p,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=d,u=!1):e.length>=200&&(i=R,u=!1,e=new de(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return mu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Re=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Ro(a):n(a,c)))var c=a,s=i}return s},Me=function(t,e){var n=[];return mu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},$e=function(t,e){return t&&_u(t,e,Ho)},Ve=function(t,e){return t&&Su(t,e,Ho)},qe=function(t,e){return h(e,(function(e){return jo(t[e])}))},Ge=function(t,e){for(var n=0,r=(e=Yn(e,t)).length;null!=t&&n<r;)t=t[to(e[n++])];return n&&n==r?t:u},Ze=function(t,e,n){var r=e(t);return Pa(t)?r:y(r,n(t))},Je=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":Mi&&Mi in li(t)?function(t){var e=bi.call(t,Mi),n=t[Mi];try{t[Mi]=u;var r=!0}catch(t){}var o=Si.call(t);return r&&(e?t[Mi]=n:delete t[Mi]),o}(t):(e=t,Si.call(e));var e},Qe=function(t,e){return t>e},un=function(t,e){return null!=t&&bi.call(t,e)},fn=function(t,e){return null!=t&&e in li(t)},hn=function(t,e,n){for(var r=n?d:p,o=t[0].length,i=t.length,a=i,c=ii(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=Zi(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new de(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?R(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?R(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){var r=null==(t=Gr(t,e=Yn(e,t)))?t:t[to(ao(e))];return null==r?u:a(r,t,n)},dn=function(t){return Po(t)&&Je(t)==rt},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=li(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var p=r(l,f,s,t,e,h);if(!(p===u?xu(f,l,3,r,h):p))return!1}}return!0},yn=function(t){return!(!Co(t)||(e=t,_i&&_i in e))&&(jo(t)?Ei:re).test(eo(t));var e},gn=function(t){return"function"==typeof t?t:null==t?Qo:"object"==typeof t?Pa(t)?Sn(t[0],t[1]):_n(t):ni(t)},mn=function(t){if(!Hr(t))return Wi(t);var e=[];for(var n in li(t))bi.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=xo(t)?ii(t.length):[];return mu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Lr(t);return 1==e.length&&e[0][2]?qr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return $r(t)&&Vr(e)?qr(to(t),e):function(n){var r=$o(n,t);return r===u&&r===e?zo(n,t):xu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Fr(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Pa(t)?function(e){return Ge(e,1===t.length?t[0]:t)}:t})):[Qo];var r=-1;return e=v(e,I(Dr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},En=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=Ge(t,u);n(a,u)&&Dn(i,Yn(u,t),a)}return i},jn=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Di.call(a,c,1),Di.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Fr(o)?Di.call(t,o,1):$n(t,o)}}return t},An=function(t,e){return t+$i(Qi()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>X)return n;do{e%2&&(n+=t),(e=$i(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return $u(Wr(t,e,Qo),t+"")},Tn=function(t){return ge(Wo(t))},In=function(t,e){var n=Wo(t);return Xr(n,ke(e,0,n.length))},Dn=function(t,e,n,r){if(!Co(t))return t;for(var o=-1,i=(e=Yn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=to(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Co(f)?f:Fr(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Rn=function(t){return Xr(Wo(t))},Ln=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=ii(o);++r<o;)i[r]=t[r+e];return i},Mn=function(t,e){var n;return mu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Nn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Ro(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Bn(t,e,Qo,n)},Bn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Ro(e),l=e===u;o<i;){var f=$i((o+i)/2),h=n(t[f]),p=h!==u,d=null===h,v=h==h,y=Ro(h);if(a)var g=r||v;else g=l?v&&(r||p):c?v&&p&&(r||!d):s?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return Zi(i,4294967294)},Un=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!So(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Fn=function(t){return"number"==typeof t?t:Ro(t)?tt:+t},Kn=function(t,e,n){var r=-1,o=p,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=d;else if(i>=200){var s=e?null:Tu(t);if(s)return z(s);u=!1,o=R,c=new de}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},$n=function(t,e){return null==(t=Gr(t,e=Yn(e,t)))||delete t[to(ao(e))]},zn=function(t,e,n,r){return Dn(t,e,n(Ge(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Ln(t,r?0:i,r?i+1:o):Ln(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return r(n,le)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Kn(t[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Kn(wu(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return Oo(t)?t:[]},Zn=function(t){return"function"==typeof t?t:Qo},Yn=function(t,e){return Pa(t)?t:$r(t,e)?[t]:zu(Ko(t))},Jn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Ln(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Ci?Ci(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Ai(e).set(new Ai(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Ro(t),a=e!==u,c=null===e,s=e==e,l=Ro(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=Gi(i-u,0),l=ii(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=Gi(i-a,0),f=ii(l+s),h=!r;++o<l;)f[o]=t[o];for(var p=o;++c<s;)f[p+c]=e[c];for(;++u<a;)(h||o<i)&&(f[p+n[u]]=t[o++]);return f},or=function(t,e){var n=-1,r=t.length;for(e||(e=ii(r));++n<r;)e[n]=t[n];return e},ir=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?Ee(n,c,s):_e(n,c,s)}return n},ur=function(t,e){return function(n,r){var o=Pa(n)?c:xe,i=e?e():{};return o(n,t,Dr(r,2),i)}},ar=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&Kr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=li(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},cr=function(t,e){return function(n,r){if(null==n)return n;if(!xo(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=li(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},sr=function(t){return function(e,n,r){for(var o=-1,i=li(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},lr=function(t){return function(e){var n=U(e=Ko(e))?V(e):u,r=n?n[0]:e.charAt(0),o=n?Jn(n,1).join(""):e.slice(1);return r[t]()+o}},fr=function(t){return function(e){return g(Yo(Zo(e).replace(Ie,"")),t,"")}},hr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=yu(t.prototype),r=t.apply(n,e);return Co(r)?r:n}},pr=function(t){return function(e,n,r){var o=li(e);if(!xo(e)){var i=Dr(n,3);e=Ho(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},dr=function(t){return Ar((function(e){var n=e.length,r=n,o=se.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new pi(W);if(o&&!a&&"wrapper"==Tr(i))var a=new se([],!0)}for(r=a?r:n;++r<n;){var c=Tr(i=e[r]),s="wrapper"==c?Du(i):u;a=s&&zr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Tr(s[0])].apply(a,s[3]):1==i.length&&zr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Pa(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},vr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},$e(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},yr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=ku(n),r=ku(r)):(n=Fn(n),r=Fn(r)),o=t(n,r)}return o}},gr=function(t){return Ar((function(e){return e=v(e,I(Dr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},mr=function(t,e){var n=(e=e===u?" ":ku(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Ki(t/H(e)));return U(e)?Jn(V(r),0,t).join(""):r.slice(0,t)},br=function(t){return function(e,n,r){return r&&"number"!=typeof r&&Kr(e,n,r)&&(n=r=u),e=Mo(e),n===u?(n=e,e=0):n=Mo(n),function(t,e,n,r){for(var o=-1,i=Gi(Ki((e-t)/(n||1)),0),u=ii(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:Mo(r),t)}},wr=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Uo(e),n=Uo(n)),t(e,n)}},_r=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?Y:64,4&(e&=~(f?64:Y))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],p=n.apply(u,h);return zr(t)&&Fu(p,h),p.placeholder=r,Jr(p,t,e)},Sr=function(t){var e=si[t];return function(t,n){if(t=Uo(t),(n=null==n?0:Zi(No(n),292))&&Vi(t)){var r=(Ko(t)+"e").split("e");return+((r=(Ko(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},xr=function(t){return function(e){var n,r,o=Mu(e);return o==lt?F(e):o==vt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Or=function(t,e,n,o,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new pi(W);var h=o?o.length:0;if(h||(e&=-97,o=i=u),s=s===u?s:Gi(No(s),0),l=l===u?l:No(l),h-=i?i.length:0,64&e){var p=o,d=i;o=i=u}var v,y,g,m,b=f?u:Du(t),w=[t,e,n,o,i,p,d,c,s,l];if(b&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==J&&8==n||r==J&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?nr(c,a,e[4]):a,t[4]=c?$(t[3],Z):e[4]}(a=e[5])&&(c=t[5],t[5]=c?rr(c,a,e[6]):a,t[6]=c?$(t[5],Z):e[6]),(a=e[7])&&(t[7]=a),r&J&&(t[8]=null==t[8]?e[8]:Zi(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(w,b),t=w[0],e=w[1],n=w[2],o=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:Gi(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=hr(v=t),function t(){for(var e=arguments.length,n=ii(e),o=e,i=Ir(t);o--;)n[o]=arguments[o];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:$(n,i);return(e-=c.length)<g?_r(v,y,Pu,t.placeholder,u,n,c,u,u,g-e):a(this&&this!==We&&r(this,t)?m:v,this,n)}):e!=Y&&33!=e||i.length?Pu.apply(u,w):function(t,e,n,o){var i=1&e,u=hr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=o.length,h=ii(f+s),p=this&&this!==We&&r(this,e)?u:t;++l<f;)h[l]=o[l];for(;s--;)h[l++]=arguments[++c];return a(p,i?n:this,h)}}(t,e,n,o);else var _=function(t,e,n){var o=1&e,i=hr(t);return function e(){return(this&&this!==We&&r(this,e)?i:t).apply(o?n:this,arguments)}}(t,e,n);return Jr((b?Eu:Fu)(_,w),t,e)},Er=function(t,e,n,r){return t===u||So(t,yi[n])&&!bi.call(r,n)?e:t},jr=function(t){return Io(t)?u:t},kr=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new de:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;p=!1;break}if(d){if(!b(e,(function(t,e){if(!R(d,e)&&(v===t||o(v,t,n,r,i)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Ar=function(t){return $u(Wr(t,u,io),t+"")},Cr=function(t){return Ze(t,Ho,Ru)},Pr=function(t){return Ze(t,Vo,Lu)},Tr=function(t){for(var e=t.name+"",n=au[e],r=bi.call(au,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Ir=function(t){return(bi.call(k,"placeholder")?k:t).placeholder},Dr=function(){var t=k.iteratee||Xo;return t=t===Xo?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Rr=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map},Lr=function(t){for(var e=Ho(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Vr(o)]}return e},Mr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Nr=function(t,e,n){for(var r=-1,o=(e=Yn(e,t)).length,i=!1;++r<o;){var u=to(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ao(o)&&Fr(u,o)&&(Pa(t)||Ca(t))},Br=function(t){return"function"!=typeof t.constructor||Hr(t)?{}:yu(Pi(t))},Ur=function(t){return Pa(t)||Ca(t)||!!(Ri&&t&&t[Ri])},Fr=function(t,e){var n=void 0===t?"undefined":o(t);return!!(e=null==e?X:e)&&("number"==n||"symbol"!=n&&ie.test(t))&&t>-1&&t%1==0&&t<e},Kr=function(t,e,n){if(!Co(n))return!1;var r=void 0===e?"undefined":o(e);return!!("number"==r?xo(n)&&Fr(e,n.length):"string"==r&&e in n)&&So(n[e],t)},$r=function(t,e){if(Pa(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ro(t))||Kt.test(t)||!Ft.test(t)||null!=e&&t in li(e)},zr=function(t){var e=Tr(t),n=k[e];if("function"!=typeof n||!(e in le.prototype))return!1;if(t===n)return!0;var r=Du(n);return!!r&&t===r[0]},Hr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yi)},Vr=function(t){return t==t&&!Co(t)},qr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in li(n))}},Wr=function(t,e,n){return e=Gi(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Gi(r.length-e,0),u=ii(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=ii(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},Gr=function(t,e){return e.length<2?t:Ge(t,Ln(e,0,-1))},Zr=function(t,e){for(var n=t.length,r=Zi(e.length,n),o=or(t);r--;){var i=e[r];t[r]=Fr(i,n)?o[i]:u}return t},Yr=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Jr=function(t,e,n){var r,o,i,u=e+"";return $u(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Wt,"{\n/* [wrapped with "+e+"] */\n")}(u,(o=(r=u.match(Gt))?r[1].split(Zt):[],i=n,s(nt,(function(t){var e="_."+t[0];i&t[1]&&!p(o,e)&&o.push(e)})),o.sort())))},Qr=function(t){var e=0,n=0;return function(){var r=Yi(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},Xr=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},to=function(t){if("string"==typeof t||Ro(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},eo=function(t){if(null!=t){try{return mi.call(t)}catch(t){}try{return t+""}catch(t){}}return""},no=function(t){if(r(t,le))return t.clone();var e=new se(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},ro=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),_(t,Dr(e,3),o)},oo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=No(n),o=n<0?Gi(r+o,0):Zi(o,r-1)),_(t,Dr(e,3),o,!0)},io=function(t){return null!=t&&t.length?wu(t,1):[]},uo=function(t){return t&&t.length?t[0]:u},ao=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},co=function(t,e){return t&&t.length&&e&&e.length?jn(t,e):t},so=function(t){return null==t?t:Xi.call(t)},lo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(Oo(t))return e=Gi(t.length,e),!0})),P(e,(function(e){return v(t,j(e))}))},fo=function(t,e){if(!t||!t.length)return[];var n=lo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},ho=function(t){var e=k(t);return e.__chain__=!0,e},po=function(t,e){return e(t)},vo=function(t,e){return(Pa(t)?s:mu)(t,Dr(e,3))},yo=function(t,e){return(Pa(t)?l:bu)(t,Dr(e,3))},go=function(t,e){return(Pa(t)?v:wn)(t,Dr(e,3))},mo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Or(t,J,u,u,u,u,e)},bo=function(t,e){var n;if("function"!=typeof e)throw new pi(W);return t=No(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},wo=function(t,e,n){var r,o,i,a,c,s,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new pi(W);function d(e){var n=r,i=o;return r=o=u,l=e,a=t.apply(i,n)}function v(t){return l=t,c=Ku(g,e),f?d(t):a}function y(t){var n=t-s;return s===u||n>=e||n<0||h&&t-l>=i}function g(){var t,n,r=ya();if(y(r))return m(r);c=Ku(g,(n=e-((t=r)-s),h?Zi(n,i-(t-l)):n))}function m(t){return c=u,p&&r?d(t):(r=o=u,a)}function b(){var t=ya(),n=y(t);if(r=arguments,o=this,s=t,n){if(c===u)return v(s);if(h)return Cu(c),c=Ku(g,e),d(s)}return c===u&&(c=Ku(g,e)),a}return e=Uo(e)||0,Co(n)&&(f=!!n.leading,i=(h="maxWait"in n)?Gi(Uo(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==u&&Cu(c),l=0,r=s=o=c=u},b.flush=function(){return c===u?a:m(ya())},b},_o=function(t){if("function"!=typeof t)throw new pi(W);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},So=function(t,e){return t===e||t!=t&&e!=e},xo=function(t){return null!=t&&Ao(t.length)&&!jo(t)},Oo=function(t){return Po(t)&&xo(t)},Eo=function(t){if(!Po(t))return!1;var e=Je(t);return e==at||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Io(t)},jo=function(t){if(!Co(t))return!1;var e=Je(t);return e==ct||e==st||"[object AsyncFunction]"==e||"[object Proxy]"==e},ko=function(t){return"number"==typeof t&&t==No(t)},Ao=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=X},Co=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Po=function(t){return null!=t&&"object"==typeof t},To=function(t){return"number"==typeof t||Po(t)&&Je(t)==ft},Io=function(t){if(!Po(t)||Je(t)!=ht)return!1;var e=Pi(t);if(null===e)return!0;var n=bi.call(e,"constructor")&&e.constructor;return"function"==typeof n&&r(n,n)&&mi.call(n)==xi},Do=function(t){return"string"==typeof t||!Pa(t)&&Po(t)&&Je(t)==yt},Ro=function(t){return"symbol"==(void 0===t?"undefined":o(t))||Po(t)&&Je(t)==gt},Lo=function(t){if(!t)return[];if(xo(t))return Do(t)?V(t):or(t);if(Li&&t[Li])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Li]());var e=Mu(t);return(e==lt?F:e==vt?z:Wo)(t)},Mo=function(t){return t?(t=Uo(t))===Q||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},No=function(t){var e=Mo(t),n=e%1;return e==e?n?e-n:e:0},Bo=function(t){return t?ke(No(t),0,et):0},Uo=function(t){if("number"==typeof t)return t;if(Ro(t))return tt;if(Co(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Co(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ne.test(t);return n||oe.test(t)?He(t.slice(2),n?2:8):ee.test(t)?tt:+t},Fo=function(t){return ir(t,Vo(t))},Ko=function(t){return null==t?"":ku(t)},$o=function(t,e,n){var r=null==t?u:Ge(t,e);return r===u?n:r},zo=function(t,e){return null!=t&&Nr(t,e,fn)},Ho=function(t){return xo(t)?ye(t):mn(t)},Vo=function(t){return xo(t)?ye(t,!0):function(t){if(!Co(t))return function(t){var e=[];if(null!=t)for(var n in li(t))e.push(n);return e}(t);var e=Hr(t),n=[];for(var r in t)("constructor"!=r||!e&&bi.call(t,r))&&n.push(r);return n}(t)},qo=function(t,e){if(null==t)return{};var n=v(Pr(t),(function(t){return[t]}));return e=Dr(e),En(t,n,(function(t,n){return e(t,n[0])}))},Wo=function(t){return null==t?[]:D(t,Ho(t))},Go=function(t){return sc(Ko(t).toLowerCase())},Zo=function(t){return(t=Ko(t))&&t.replace(ue,an).replace(De,"")},Yo=function(t,e,n){return t=Ko(t),(e=n?u:e)===u?(r=t,Ne.test(r)?function(t){return t.match(Le)||[]}(t):function(t){return t.match(Yt)||[]}(t)):t.match(e)||[];var r},Jo=function(t){return function(){return t}},Qo=function(t){return t},Xo=function(t){return gn("function"==typeof t?t:gu(t,1))},ti=function(t,e,n){var r=Ho(e),o=qe(e,r);null!=n||Co(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=qe(e,Ho(e)));var i=!(Co(n)&&"chain"in n&&!n.chain),u=jo(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ei=function(){},ni=function(t){return $r(t)?j(to(t)):(e=t,function(t){return Ge(t,e)});var e},ri=function(){return[]},oi=function(){return!1},ii=(e=null==e?We:ln.defaults(We.Object(),e,ln.pick(We,Be))).Array,ui=e.Date,ai=e.Error,ci=e.Function,si=e.Math,li=e.Object,fi=e.RegExp,hi=e.String,pi=e.TypeError,di=ii.prototype,vi=ci.prototype,yi=li.prototype,gi=e["__core-js_shared__"],mi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Si=yi.toString,xi=mi.call(li),Oi=We._,Ei=fi("^"+mi.call(bi).replace(zt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ji=Ye?e.Buffer:u,ki=e.Symbol,Ai=e.Uint8Array,Ci=ji?ji.allocUnsafe:u,Pi=K(li.getPrototypeOf,li),Ti=li.create,Ii=yi.propertyIsEnumerable,Di=di.splice,Ri=ki?ki.isConcatSpreadable:u,Li=ki?ki.iterator:u,Mi=ki?ki.toStringTag:u,Ni=function(){try{var t=Mr(li,"defineProperty");return t({},"",{}),t}catch(t){}}(),Bi=e.clearTimeout!==We.clearTimeout&&e.clearTimeout,Ui=ui&&ui.now!==We.Date.now&&ui.now,Fi=e.setTimeout!==We.setTimeout&&e.setTimeout,Ki=si.ceil,$i=si.floor,zi=li.getOwnPropertySymbols,Hi=ji?ji.isBuffer:u,Vi=e.isFinite,qi=di.join,Wi=K(li.keys,li),Gi=si.max,Zi=si.min,Yi=ui.now,Ji=e.parseInt,Qi=si.random,Xi=di.reverse,tu=Mr(e,"DataView"),eu=Mr(e,"Map"),nu=Mr(e,"Promise"),ru=Mr(e,"Set"),ou=Mr(e,"WeakMap"),iu=Mr(li,"create"),uu=ou&&new ou,au={},cu=eo(tu),su=eo(eu),lu=eo(nu),fu=eo(ru),hu=eo(ou),pu=ki?ki.prototype:u,du=pu?pu.valueOf:u,vu=pu?pu.toString:u,yu=(i=function(){},function(t){if(!Co(t))return{};if(Ti)return Ti(t);i.prototype=t;var e=new i;return i.prototype=u,e});function gu(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Co(t))return t;var h,p,d,v=Pa(t);if(v){if(p=(h=t).length,d=new h.constructor(p),p&&"string"==typeof h[0]&&bi.call(h,"index")&&(d.index=h.index,d.input=h.input),a=d,!c)return or(t,a)}else{var y=Mu(t),g=y==ct||y==st;if(Ia(t))return Qn(t,c);if(y==ht||y==rt||g&&!o){if(a=l||g?{}:Br(t),!c)return l?function(t,e){return ir(t,Lu(t),e)}(t,function(t,e){return t&&ir(e,Vo(e),t)}(a,t)):function(t,e){return ir(t,Ru(t),e)}(t,Oe(a,t))}else{if(!Ke[y])return o?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case bt:return Xn(t);case it:case ut:return new o(+t);case wt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case _t:case St:case xt:case Ot:case Et:case jt:case kt:case At:case Ct:return tr(t,n);case lt:return new o;case ft:case yt:return new o(t);case dt:return function(t){var e=new t.constructor(t.source,te.exec(t));return e.lastIndex=t.lastIndex,e}(t);case vt:return new o;case gt:return r=t,du?li(du.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Ma(t)?t.forEach((function(r){a.add(gu(r,e,n,r,t,i))})):Ra(t)&&t.forEach((function(r,o){a.set(o,gu(r,e,n,o,t,i))}));var b=v?u:(f?l?Pr:Cr:l?Vo:Ho)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,gu(r,e,n,o,t,i))})),a}k.templateSettings={escape:Nt,evaluate:Bt,interpolate:Ut,variable:"",imports:{_:k}},(k.prototype=qt.prototype).constructor=k,se.prototype=yu(qt.prototype),se.prototype.constructor=se,le.prototype=yu(qt.prototype),le.prototype.constructor=le,fe.prototype.clear=function(){this.__data__=iu?iu(null):{},this.size=0},fe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fe.prototype.get=function(t){var e=this.__data__;if(iu){var n=e[t];return n===G?u:n}return bi.call(e,t)?e[t]:u},fe.prototype.has=function(t){var e=this.__data__;return iu?e[t]!==u:bi.call(e,t)},fe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=iu&&e===u?G:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Di.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new fe,map:new(eu||he),string:new fe}},pe.prototype.delete=function(t){var e=Rr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Rr(this,t).get(t)},pe.prototype.has=function(t){return Rr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},de.prototype.add=de.prototype.push=function(t){return this.__data__.set(t,G),this},de.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(r(n,he)){var o=n.__data__;if(!eu||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(o)}return n.set(t,e),this.size=n.size,this};var mu=cr($e),bu=cr(Ve,!0);function wu(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Ur),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?wu(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var _u=sr(),Su=sr(!0);function xu(t,e,n,o,i){return t===e||(null==t||null==e||!Po(t)&&!Po(e)?t!=t&&e!=e:function(t,e,n,o,i,a){var c=Pa(t),s=Pa(e),l=c?ot:Mu(t),f=s?ot:Mu(e),h=(l=l==rt?ht:l)==ht,p=(f=f==rt?ht:f)==ht,d=l==f;if(d&&Ia(t)){if(!Ia(e))return!1;c=!0,h=!1}if(d&&!h)return a||(a=new ve),c||Na(t)?kr(t,e,n,o,i,a):function(t,e,n,r,o,i,u){switch(n){case wt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case bt:return!(t.byteLength!=e.byteLength||!i(new Ai(t),new Ai(e)));case it:case ut:case ft:return So(+t,+e);case at:return t.name==e.name&&t.message==e.message;case dt:case yt:return t==e+"";case lt:var a=F;case vt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=kr(a(t),a(e),r,o,i,u);return u.delete(t),l;case gt:if(du)return du.call(t)==du.call(e)}return!1}(t,e,l,n,o,i,a);if(!(1&n)){var v=h&&bi.call(t,"__wrapped__"),y=p&&bi.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,o,a)}}return!!d&&(a||(a=new ve),function(t,e,n,o,i,a){var c=1&n,s=Cr(t),l=s.length;if(l!=Cr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:bi.call(e,h)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(o)var b=c?o(m,g,h,e,t,a):o(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,o,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,o,i,a))}(t,e,n,o,xu,i))}function Ou(t,e,n,r,o){t!==e&&_u(e,(function(i,a){if(o||(o=new ve),Co(i))!function(t,e,n,r,o,i,a){var c=Yr(t,n),s=Yr(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var p=Pa(s),d=!p&&Ia(s),v=!p&&!d&&Na(s);f=s,p||d||v?Pa(c)?f=c:Oo(c)?f=or(c):d?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:Io(s)||Ca(s)?(f=c,Ca(c)?f=Fo(c):Co(c)&&!jo(c)||(f=Br(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Ou,r,o);else{var c=r?r(Yr(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Vo)}var Eu=uu?function(t,e){return uu.set(t,e),t}:Qo,ju=Ni?function(t,e){return Ni(t,"toString",{configurable:!0,enumerable:!1,value:Jo(e),writable:!0})}:Qo;function ku(t){if("string"==typeof t)return t;if(Pa(t))return v(t,ku)+"";if(Ro(t))return vu?vu.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Au=Pn,Cu=Bi||function(t){return We.clearTimeout(t)};function Pu(t,e,n,o,i,a,c,s,l,f){var h=e&J,p=1&e,d=2&e,v=24&e,y=512&e,g=d?u:hr(t);return function u(){for(var m=arguments.length,b=ii(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Ir(u),S=N(b,_);if(o&&(b=nr(b,o,i,v)),a&&(b=rr(b,a,c,v)),m-=S,v&&m<f){var x=$(b,_);return _r(t,e,Pu,u.placeholder,n,b,x,s,l,f-m)}var O=p?n:this,E=d?O[t]:t;return m=b.length,s?b=Zr(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==We&&r(this,u)&&(E=g||hr(E)),E.apply(O,b)}}var Tu=ru&&1/z(new ru([,-0]))[1]==Q?function(t){return new ru(t)}:ei;function Iu(t,e,n,r,o,i){return Co(t)&&Co(e)&&(i.set(e,t),Ou(t,e,u,Iu,i),i.delete(e)),t}var Du=uu?function(t){return uu.get(t)}:ei,Ru=zi?function(t){return null==t?[]:(t=li(t),h(zi(t),(function(e){return Ii.call(t,e)})))}:ri,Lu=zi?function(t){for(var e=[];t;)y(e,Ru(t)),t=Pi(t);return e}:ri,Mu=Je;(tu&&Mu(new tu(new ArrayBuffer(1)))!=wt||eu&&Mu(new eu)!=lt||nu&&Mu(nu.resolve())!=pt||ru&&Mu(new ru)!=vt||ou&&Mu(new ou)!=mt)&&(Mu=function(t){var e=Je(t),n=e==ht?t.constructor:u,r=n?eo(n):"";if(r)switch(r){case cu:return wt;case su:return lt;case lu:return pt;case fu:return vt;case hu:return mt}return e});var Nu,Bu,Uu=gi?jo:oi,Fu=Qr(Eu),Ku=Fi||function(t,e){return We.setTimeout(t,e)},$u=Qr(ju),zu=(Nu=_a((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace($t,(function(t,n,r,o){e.push(r?o.replace(Qt,"$1"):n||t)})),e}),(function(t){return 500===Bu.size&&Bu.clear(),t})),Bu=Nu.cache,Nu),Hu=Pn((function(t,e){return Oo(t)?Pe(t,wu(e,1,Oo,!0)):[]})),Vu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),Dr(n,2)):[]})),qu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),u,n):[]})),Wu=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?hn(e):[]})),Gu=Pn((function(t){var e=ao(t),n=v(t,Gn);return e===ao(n)?e=u:n.pop(),n.length&&n[0]===t[0]?hn(n,Dr(e,2)):[]})),Zu=Pn((function(t){var e=ao(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?hn(n,u,e):[]})),Yu=Pn(co),Ju=Ar((function(t,e){var n=null==t?0:t.length,r=je(t,e);return kn(t,v(e,(function(t){return Fr(t,n)?+t:t})).sort(er)),r})),Qu=Pn((function(t){return Kn(wu(t,1,Oo,!0))})),Xu=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),Kn(wu(t,1,Oo,!0),Dr(e,2))})),ta=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,Kn(wu(t,1,Oo,!0),u,e)})),ea=Pn((function(t,e){return Oo(t)?Pe(t,e):[]})),na=Pn((function(t){return qn(h(t,Oo))})),ra=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),qn(h(t,Oo),Dr(e,2))})),oa=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,qn(h(t,Oo),u,e)})),ia=Pn(lo),ua=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,fo(t,n)})),aa=Ar((function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return je(e,t)};return e>1||this.__actions__.length||!r(o,le)||!Fr(n)?this.thru(i):((o=o.slice(n,+n+(e?1:0))).__actions__.push({func:po,args:[i],thisArg:u}),new se(o,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ca=ur((function(t,e,n){bi.call(t,n)?++t[n]:Ee(t,n,1)})),sa=pr(ro),la=pr(oo),fa=ur((function(t,e,n){bi.call(t,n)?t[n].push(e):Ee(t,n,[e])})),ha=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=xo(t)?ii(t.length):[];return mu(t,(function(t){i[++r]=o?a(e,t,n):pn(t,e,n)})),i})),pa=ur((function(t,e,n){Ee(t,n,e)})),da=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),va=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Kr(t,e[0],e[1])?e=[]:n>2&&Kr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,wu(e,1),[])})),ya=Ui||function(){return We.Date.now()},ga=Pn((function(t,e,n){var r=1;if(n.length){var o=$(n,Ir(ga));r|=Y}return Or(t,r,e,n,o)})),ma=Pn((function(t,e,n){var r=3;if(n.length){var o=$(n,Ir(ma));r|=Y}return Or(e,r,t,n,o)})),ba=Pn((function(t,e){return Ce(t,1,e)})),wa=Pn((function(t,e,n){return Ce(t,Uo(e)||0,n)}));function _a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new pi(W);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(_a.Cache||pe),n}_a.Cache=pe;var Sa,xa=Au((function(t,e){var n=(e=1==e.length&&Pa(e[0])?v(e[0],I(Dr())):v(wu(e,1),I(Dr()))).length;return Pn((function(r){for(var o=-1,i=Zi(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Oa=Pn((function(t,e){var n=$(e,Ir(Oa));return Or(t,Y,u,e,n)})),Ea=Pn((function(t,e){var n=$(e,Ir(Ea));return Or(t,64,u,e,n)})),ja=Ar((function(t,e){return Or(t,256,u,u,u,e)})),ka=wr(Qe),Aa=wr((function(t,e){return t>=e})),Ca=dn(function(){return arguments}())?dn:function(t){return Po(t)&&bi.call(t,"callee")&&!Ii.call(t,"callee")},Pa=ii.isArray,Ta=Xe?I(Xe):function(t){return Po(t)&&Je(t)==bt},Ia=Hi||oi,Da=tn?I(tn):function(t){return Po(t)&&Je(t)==ut},Ra=en?I(en):function(t){return Po(t)&&Mu(t)==lt},La=nn?I(nn):function(t){return Po(t)&&Je(t)==dt},Ma=rn?I(rn):function(t){return Po(t)&&Mu(t)==vt},Na=on?I(on):function(t){return Po(t)&&Ao(t.length)&&!!Fe[Je(t)]},Ba=wr(bn),Ua=wr((function(t,e){return t<=e})),Fa=ar((function(t,e){if(Hr(e)||xo(e))ir(e,Ho(e),t);else for(var n in e)bi.call(e,n)&&_e(t,n,e[n])})),Ka=ar((function(t,e){ir(e,Vo(e),t)})),$a=ar((function(t,e,n,r){ir(e,Vo(e),t,r)})),za=ar((function(t,e,n,r){ir(e,Ho(e),t,r)})),Ha=Ar(je),Va=Pn((function(t,e){t=li(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&Kr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Vo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||So(f,yi[l])&&!bi.call(t,l))&&(t[l]=i[l])}return t})),qa=Pn((function(t){return t.push(u,Iu),a(Ja,u,t)})),Wa=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),t[e]=n}),Jo(Qo)),Ga=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),bi.call(t,e)?t[e].push(n):t[e]=[n]}),Dr),Za=Pn(pn),Ya=ar((function(t,e,n){Ou(t,e,n)})),Ja=ar((function(t,e,n,r){Ou(t,e,n,r)})),Qa=Ar((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Yn(e,t),r||(r=e.length>1),e})),ir(t,Pr(t),n),r&&(n=gu(n,7,jr));for(var o=e.length;o--;)$n(n,e[o]);return n})),Xa=Ar((function(t,e){return null==t?{}:En(n=t,e,(function(t,e){return zo(n,e)}));var n})),tc=xr(Ho),ec=xr(Vo),nc=fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Go(e):e)})),rc=fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),oc=fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ic=lr("toLowerCase"),uc=fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ac=fr((function(t,e,n){return t+(n?" ":"")+sc(e)})),cc=fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return Eo(t)?t:new ai(t)}})),fc=Ar((function(t,e){return s(e,(function(e){e=to(e),Ee(t,e,ga(t[e],t))})),t})),hc=dr(),pc=dr(!0),dc=Pn((function(t,e){return function(n){return pn(n,t,e)}})),vc=Pn((function(t,e){return function(n){return pn(t,n,e)}})),yc=gr(v),gc=gr(f),mc=gr(b),bc=br(),wc=br(!0),_c=yr((function(t,e){return t+e}),0),Sc=Sr("ceil"),xc=yr((function(t,e){return t/e}),1),Oc=Sr("floor"),Ec=yr((function(t,e){return t*e}),1),jc=Sr("round"),kc=yr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new pi(W);return t=No(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=mo,k.assign=Fa,k.assignIn=Ka,k.assignInWith=$a,k.assignWith=za,k.at=Ha,k.before=bo,k.bind=ga,k.bindAll=fc,k.bindKey=ma,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Pa(t)?t:[t]},k.chain=ho,k.chunk=function(t,e,n){e=(n?Kr(t,e,n):e===u)?1:Gi(No(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=ii(Ki(r/e));o<r;)a[i++]=Ln(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ii(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Pa(n)?or(n):[n],wu(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Dr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new pi(W);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=gu(t,1),n=Ho(e),function(t){return Ae(t,e,n)};var e,n},k.constant=Jo,k.countBy=ca,k.create=function(t,e){var n=yu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=Or(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=Or(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=wo,k.defaults=Va,k.defaultsDeep=qa,k.defer=ba,k.delay=wa,k.difference=Hu,k.differenceBy=Vu,k.differenceWith=qu,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,(e=n||e===u?1:No(e))<0?0:e,r):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,0,(e=r-(e=n||e===u?1:No(e)))<0?0:e):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Kr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=No(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:No(r))<0&&(r+=o),r=n>r?0:Bo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Pa(t)?h:Me)(t,Dr(e,3))},k.flatMap=function(t,e){return wu(go(t,e),1)},k.flatMapDeep=function(t,e){return wu(go(t,e),Q)},k.flatMapDepth=function(t,e,n){return n=n===u?1:No(n),wu(go(t,e),n)},k.flatten=io,k.flattenDeep=function(t){return null!=t&&t.length?wu(t,Q):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?wu(t,e=e===u?1:No(e)):[]},k.flip=function(t){return Or(t,512)},k.flow=hc,k.flowRight=pc,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:qe(t,Ho(t))},k.functionsIn=function(t){return null==t?[]:qe(t,Vo(t))},k.groupBy=fa,k.initial=function(t){return null!=t&&t.length?Ln(t,0,-1):[]},k.intersection=Wu,k.intersectionBy=Gu,k.intersectionWith=Zu,k.invert=Wa,k.invertBy=Ga,k.invokeMap=ha,k.iteratee=Xo,k.keyBy=pa,k.keys=Ho,k.keysIn=Vo,k.map=go,k.mapKeys=function(t,e){var n={};return e=Dr(e,3),$e(t,(function(t,r,o){Ee(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Dr(e,3),$e(t,(function(t,r,o){Ee(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(gu(t,1))},k.matchesProperty=function(t,e){return Sn(t,gu(e,1))},k.memoize=_a,k.merge=Ya,k.mergeWith=Ja,k.method=dc,k.methodOf=vc,k.mixin=ti,k.negate=_o,k.nthArg=function(t){return t=No(t),Pn((function(e){return xn(e,t)}))},k.omit=Qa,k.omitBy=function(t,e){return qo(t,_o(Dr(e)))},k.once=function(t){return bo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Pa(e)||(e=null==e?[]:[e]),Pa(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=yc,k.overArgs=xa,k.overEvery=gc,k.overSome=mc,k.partial=Oa,k.partialRight=Ea,k.partition=da,k.pick=Xa,k.pickBy=qo,k.property=ni,k.propertyOf=function(t){return function(e){return null==t?u:Ge(t,e)}},k.pull=Yu,k.pullAll=co,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,Dr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,u,n):t},k.pullAt=Ju,k.range=bc,k.rangeRight=wc,k.rearg=ja,k.reject=function(t,e){return(Pa(t)?h:Me)(t,_o(Dr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Dr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new pi(W);return Pn(t,e=e===u?e:No(e))},k.reverse=so,k.sampleSize=function(t,e,n){return e=(n?Kr(t,e,n):e===u)?1:No(e),(Pa(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Dn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Dn(t,e,n,r)},k.shuffle=function(t){return(Pa(t)?be:Rn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Kr(t,e,n)?(e=0,n=r):(e=null==e?0:No(e),n=n===u?r:No(n)),Ln(t,e,n)):[]},k.sortBy=va,k.sortedUniq=function(t){return t&&t.length?Un(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?Un(t,Dr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&Kr(t,e,n)&&(e=n=u),(n=n===u?et:n>>>0)?(t=Ko(t))&&("string"==typeof e||null!=e&&!La(e))&&!(e=ku(e))&&U(t)?Jn(V(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new pi(W);return e=null==e?0:Gi(No(e),0),Pn((function(n){var r=n[e],o=Jn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Ln(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?Ln(t,0,(e=n||e===u?1:No(e))<0?0:e):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,(e=r-(e=n||e===u?1:No(e)))<0?0:e,r):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new pi(W);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=po,k.toArray=Lo,k.toPairs=tc,k.toPairsIn=ec,k.toPath=function(t){return Pa(t)?v(t,to):Ro(t)?[t]:or(zu(Ko(t)))},k.toPlainObject=Fo,k.transform=function(t,e,n){var r=Pa(t),o=r||Ia(t)||Na(t);if(e=Dr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Co(t)&&jo(i)?yu(Pi(t)):{}}return(o?s:$e)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return mo(t,1)},k.union=Qu,k.unionBy=Xu,k.unionWith=ta,k.uniq=function(t){return t&&t.length?Kn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Kn(t,Dr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Kn(t,u,e):[]},k.unset=function(t,e){return null==t||$n(t,e)},k.unzip=lo,k.unzipWith=fo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=Wo,k.valuesIn=function(t){return null==t?[]:D(t,Vo(t))},k.without=ea,k.words=Yo,k.wrap=function(t,e){return Oa(Zn(e),t)},k.xor=na,k.xorBy=ra,k.xorWith=oa,k.zip=ia,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Dn)},k.zipWith=ua,k.entries=tc,k.entriesIn=ec,k.extend=Ka,k.extendWith=$a,ti(k,k),k.add=_c,k.attempt=lc,k.camelCase=nc,k.capitalize=Go,k.ceil=Sc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=Uo(n))==n?n:0),e!==u&&(e=(e=Uo(e))==e?e:0),ke(Uo(t),e,n)},k.clone=function(t){return gu(t,4)},k.cloneDeep=function(t){return gu(t,5)},k.cloneDeepWith=function(t,e){return gu(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return gu(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Ho(e))},k.deburr=Zo,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=xc,k.endsWith=function(t,e,n){t=Ko(t),e=ku(e);var r=t.length,o=n=n===u?r:ke(No(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=So,k.escape=function(t){return(t=Ko(t))&&Mt.test(t)?t.replace(Rt,cn):t},k.escapeRegExp=function(t){return(t=Ko(t))&&Ht.test(t)?t.replace(zt,"\\$&"):t},k.every=function(t,e,n){var r=Pa(t)?f:Te;return n&&Kr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.find=sa,k.findIndex=ro,k.findKey=function(t,e){return w(t,Dr(e,3),$e)},k.findLast=la,k.findLastIndex=oo,k.findLastKey=function(t,e){return w(t,Dr(e,3),Ve)},k.floor=Oc,k.forEach=vo,k.forEachRight=yo,k.forIn=function(t,e){return null==t?t:_u(t,Dr(e,3),Vo)},k.forInRight=function(t,e){return null==t?t:Su(t,Dr(e,3),Vo)},k.forOwn=function(t,e){return t&&$e(t,Dr(e,3))},k.forOwnRight=function(t,e){return t&&Ve(t,Dr(e,3))},k.get=$o,k.gt=ka,k.gte=Aa,k.has=function(t,e){return null!=t&&Nr(t,e,un)},k.hasIn=zo,k.head=uo,k.identity=Qo,k.includes=function(t,e,n,r){t=xo(t)?t:Wo(t),n=n&&!r?No(n):0;var o=t.length;return n<0&&(n=Gi(o+n,0)),Do(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=Mo(e),n===u?(n=e,e=0):n=Mo(n),(r=t=Uo(t))>=Zi(o=e,i=n)&&r<Gi(o,i);var r,o,i},k.invoke=Za,k.isArguments=Ca,k.isArray=Pa,k.isArrayBuffer=Ta,k.isArrayLike=xo,k.isArrayLikeObject=Oo,k.isBoolean=function(t){return!0===t||!1===t||Po(t)&&Je(t)==it},k.isBuffer=Ia,k.isDate=Da,k.isElement=function(t){return Po(t)&&1===t.nodeType&&!Io(t)},k.isEmpty=function(t){if(null==t)return!0;if(xo(t)&&(Pa(t)||"string"==typeof t||"function"==typeof t.splice||Ia(t)||Na(t)||Ca(t)))return!t.length;var e=Mu(t);if(e==lt||e==vt)return!t.size;if(Hr(t))return!mn(t).length;for(var n in t)if(bi.call(t,n))return!1;return!0},k.isEqual=function(t,e){return xu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?xu(t,e,u,n):!!r},k.isError=Eo,k.isFinite=function(t){return"number"==typeof t&&Vi(t)},k.isFunction=jo,k.isInteger=ko,k.isLength=Ao,k.isMap=Ra,k.isMatch=function(t,e){return t===e||vn(t,e,Lr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Lr(e),n)},k.isNaN=function(t){return To(t)&&t!=+t},k.isNative=function(t){if(Uu(t))throw new ai("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=To,k.isObject=Co,k.isObjectLike=Po,k.isPlainObject=Io,k.isRegExp=La,k.isSafeInteger=function(t){return ko(t)&&t>=-9007199254740991&&t<=X},k.isSet=Ma,k.isString=Do,k.isSymbol=Ro,k.isTypedArray=Na,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return Po(t)&&Mu(t)==mt},k.isWeakSet=function(t){return Po(t)&&"[object WeakSet]"==Je(t)},k.join=function(t,e){return null==t?"":qi.call(t,e)},k.kebabCase=rc,k.last=ao,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=No(n))<0?Gi(r+o,0):Zi(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=oc,k.lowerFirst=ic,k.lt=Ba,k.lte=Ua,k.max=function(t){return t&&t.length?Re(t,Qo,Qe):u},k.maxBy=function(t,e){return t&&t.length?Re(t,Dr(e,2),Qe):u},k.mean=function(t){return E(t,Qo)},k.meanBy=function(t,e){return E(t,Dr(e,2))},k.min=function(t){return t&&t.length?Re(t,Qo,bn):u},k.minBy=function(t,e){return t&&t.length?Re(t,Dr(e,2),bn):u},k.stubArray=ri,k.stubFalse=oi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Ec,k.nth=function(t,e){return t&&t.length?xn(t,No(e)):u},k.noConflict=function(){return We._===this&&(We._=Oi),this},k.noop=ei,k.now=ya,k.pad=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return mr($i(o),n)+t+mr(Ki(o),n)},k.padEnd=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;return e&&r<e?t+mr(e-r,n):t},k.padStart=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;return e&&r<e?mr(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Ji(Ko(t).replace(Vt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Kr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=Mo(t),e===u?(e=t,t=0):e=Mo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Qi();return Zi(t+o*(e-t+ze("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Pa(t)?g:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,mu)},k.reduceRight=function(t,e,n){var r=Pa(t)?m:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,bu)},k.repeat=function(t,e,n){return e=(n?Kr(t,e,n):e===u)?1:No(e),Cn(Ko(t),e)},k.replace=function(){var t=arguments,e=Ko(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Yn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[to(e[r])];i===u&&(r=o,i=n),t=jo(i)?i.call(t):i}return t},k.round=jc,k.runInContext=t,k.sample=function(t){return(Pa(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(xo(t))return Do(t)?H(t):t.length;var e=Mu(t);return e==lt||e==vt?t.size:mn(t).length},k.snakeCase=uc,k.some=function(t,e,n){var r=Pa(t)?b:Mn;return n&&Kr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.sortedIndex=function(t,e){return Nn(t,e)},k.sortedIndexBy=function(t,e,n){return Bn(t,e,Dr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Nn(t,e);if(r<n&&So(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Nn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Bn(t,e,Dr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Nn(t,e,!0)-1;if(So(t[n],e))return n}return-1},k.startCase=ac,k.startsWith=function(t,e,n){return t=Ko(t),n=null==n?0:ke(No(n),0,t.length),e=ku(e),t.slice(n,n+e.length)==e},k.subtract=kc,k.sum=function(t){return t&&t.length?C(t,Qo):0},k.sumBy=function(t,e){return t&&t.length?C(t,Dr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&Kr(t,e,n)&&(e=u),t=Ko(t),e=$a({},e,r,Er);var o,i,a=$a({},e.imports,r.imports,Er),c=Ho(a),s=D(a,c),l=0,f=e.interpolate||ae,h="__p += '",p=fi((e.escape||ae).source+"|"+f.source+"|"+(f===Ut?Xt:ae).source+"|"+(e.evaluate||ae).source+"|$","g"),d="//# sourceURL="+(bi.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ue+"]")+"\n";t.replace(p,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(ce,B),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=bi.call(e,"variable")&&e.variable;if(v){if(Jt.test(v))throw new ai("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Pt,""):h).replace(Tt,"$1").replace(It,"$1;"),h="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")+h+"return __p\n}";var y=lc((function(){return ci(c,d+"return "+h).apply(u,s)}));if(y.source=h,Eo(y))throw y;return y},k.times=function(t,e){if((t=No(t))<1||t>X)return[];var n=et,r=Zi(t,et);e=Dr(e),t-=et;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=Mo,k.toInteger=No,k.toLength=Bo,k.toLower=function(t){return Ko(t).toLowerCase()},k.toNumber=Uo,k.toSafeInteger=function(t){return t?ke(No(t),-9007199254740991,X):0===t?t:0},k.toString=Ko,k.toUpper=function(t){return Ko(t).toUpperCase()},k.trim=function(t,e,n){if((t=Ko(t))&&(n||e===u))return T(t);if(!t||!(e=ku(e)))return t;var r=V(t),o=V(e);return Jn(r,L(r,o),M(r,o)+1).join("")},k.trimEnd=function(t,e,n){if((t=Ko(t))&&(n||e===u))return t.slice(0,q(t)+1);if(!t||!(e=ku(e)))return t;var r=V(t);return Jn(r,0,M(r,V(e))+1).join("")},k.trimStart=function(t,e,n){if((t=Ko(t))&&(n||e===u))return t.replace(Vt,"");if(!t||!(e=ku(e)))return t;var r=V(t);return Jn(r,L(r,V(e))).join("")},k.truncate=function(t,e){var n=30,r="...";if(Co(e)){var o="separator"in e?e.separator:o;n="length"in e?No(e.length):n,r="omission"in e?ku(e.omission):r}var i=(t=Ko(t)).length;if(U(t)){var a=V(t);i=a.length}if(n>=i)return t;var c=n-H(r);if(c<1)return r;var s=a?Jn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),La(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,Ko(te.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(ku(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},k.unescape=function(t){return(t=Ko(t))&&Lt.test(t)?t.replace(Dt,sn):t},k.uniqueId=function(t){var e=++wi;return Ko(t)+e},k.upperCase=cc,k.upperFirst=sc,k.each=vo,k.eachRight=yo,k.first=uo,ti(k,(Sa={},$e(k,(function(t,e){bi.call(k.prototype,e)||(Sa[e]=t)})),Sa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){le.prototype[t]=function(n){n=n===u?1:Gi(No(n),0);var r=this.__filtered__&&!e?new le(this):this.clone();return r.__filtered__?r.__takeCount__=Zi(n,r.__takeCount__):r.__views__.push({size:Zi(n,et),type:t+(r.__dir__<0?"Right":"")}),r},le.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;le.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Dr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");le.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");le.prototype[t]=function(){return this.__filtered__?new le(this):this[n](1)}})),le.prototype.compact=function(){return this.filter(Qo)},le.prototype.find=function(t){return this.filter(t).head()},le.prototype.findLast=function(t){return this.reverse().find(t)},le.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new le(this):this.map((function(n){return pn(n,t,e)}))})),le.prototype.reject=function(t){return this.filter(_o(Dr(t)))},le.prototype.slice=function(t,e){t=No(t);var n=this;return n.__filtered__&&(t>0||e<0)?new le(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=No(e))<0?n.dropRight(-e):n.take(e-t)),n)},le.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},le.prototype.toArray=function(){return this.take(et)},$e(le.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),i=k[o?"take"+("last"==e?"Right":""):e],a=o||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,s=r(e,le),l=c[0],f=s||Pa(e),h=function(t){var e=i.apply(k,y([t],c));return o&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,v=a&&!p,g=s&&!d;if(!a&&f){e=g?e:new le(this);var m=t.apply(e,c);return m.__actions__.push({func:po,args:[h],thisArg:u}),new se(m,p)}return v&&g?t.apply(this,c):(m=this.thru(h),v?o?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=di[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Pa(o)?o:[],t)}return this[n]((function(n){return e.apply(Pa(n)?n:[],t)}))}})),$e(le.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";bi.call(au,r)||(au[r]=[]),au[r].push({name:e,func:n})}})),au[Pu(u,2).name]=[{name:"wrapper",func:u}],le.prototype.clone=function(){var t=new le(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},le.prototype.reverse=function(){if(this.__filtered__){var t=new le(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},le.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pa(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Zi(e,t+u);break;case"takeRight":t=Gi(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,p=Zi(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Vn(t,this.__actions__);var d=[];t:for(;c--&&h<p;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},k.prototype.at=aa,k.prototype.chain=function(){return ho(this)},k.prototype.commit=function(){return new se(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=Lo(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;r(n,qt);){var o=no(n);o.__index__=0,o.__values__=u,e?i.__wrapped__=o:e=o;var i=o;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(r(t,le)){var e=t;return this.__actions__.length&&(e=new le(this)),(e=e.reverse()).__actions__.push({func:po,args:[so],thisArg:u}),new se(e,this.__chain__)}return this.thru(so)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Li&&(k.prototype[Li]=function(){return this}),k}();We._=ln,(i=function(){return ln}.call(e,n,e,t))===u||(t.exports=i)}.call(this)},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=d},824:function(t){"use strict";t.exports=c},45:function(t){"use strict";t.exports=s},728:function(t){"use strict";t.exports=l},688:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=h},954:function(t){"use strict";t.exports=a},493:function(t){"use strict";t.exports=f},281:function(t){"use strict";t.exports=p}},y={};function g(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,g),n.loaded=!0,n.exports}g.y=u,g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,{a:e}),e},g.d=function(t,e){for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;g.g.importScripts&&(t=g.g.location+"");var e=g.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=t}();var m={};return(0,g(968).s)(1),function(){"use strict";var i=function(t){var e=t.to,n=t.templateParams,r=t.children,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","templateParams","children"]);return Rt.default.createElement("a",Nt({onClick:function(t){return o=e,i=n,void((r=t).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Mt.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Mt.interpolateUrl)(e,n)},o),r)},u=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},c=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,Rt.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return u(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,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,Rt.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var c={};return e&&(c=(0,Rt.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){a(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,c)}},s=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},l=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},f=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(window.navigator.onLine))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){return(0,Ft.subscribeConnectivityChanged)((function(t){var e=t.online;return r(e)}))}),[]),n},h=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},p=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return h(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){var e=function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,Kt.isEqual)(u,r)||o(u)};return e((0,Bt.getExtensionStore)().getState()),(0,Bt.getExtensionStore)().subscribe(e)}),[t,r]),r},d=function(t){var e=f(),n=p(t);return(0,Rt.useMemo)((function(){return(0,Bt.getConnectedExtensions)(n,e)}),[n,e])},v=function(t){var e=(0,Rt.useContext)(Lt).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Rt.useEffect)((function(){(0,Bt.registerExtensionSlot)(e,t)}),[]),{extensions:d(t),extensionSlotName:t,extensionSlotModuleName:e}},y=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},b=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){y(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},w=function(t){return t},_=function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n},S=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{};n%2?_(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))},r=1;r<arguments.length;r++)n(r);return t},x=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=function(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)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(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(qt(n)));return function(){var t=n(e);if(!r(t,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(qt(t)));return t}},E=function(t){if("object"!==Vt(t))throw new Error("single-spa-react requires a configuration object");var e=S(S({},Gt),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Wt&&e.React.createContext&&(Wt=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:j.bind(null,e),mount:k.bind(null,e),unmount:A.bind(null,e)};return e.parcelCanUpdate&&(n.update=C.bind(null,e)),n},j=function(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))},k=function(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=P(t,e,(function(){n(this)})),i=O(t,e)(),u=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=u}))},A=function(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))},C=function(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=P(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=O(t,e)();t.ReactDOM.render(r,i)}}))},P=function(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=Wt?t.React.createElement(Wt.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,S(S({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)},T=function(t,e){return!e||"object"!==te(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},I=function(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},ne,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xt(t,e)}(a,n);var o,i,u=(o=a,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(t){return!1}}(),function(){var t,e=Qt(o);if(i){var n=Qt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return T(this,t)});function a(t){var n;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=a.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Rt.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Rt.default.createElement(Lt.Provider,{value:this.state.config},Rt.default.createElement(Rt.default.Suspense,{fallback:null},e.disableTranslations?Rt.default.createElement(t,Jt({},this.props)):Rt.default.createElement(re,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},Rt.default.createElement(Yt.I18nextProvider,{i18n:ee,defaultNS:e.moduleName},Rt.default.createElement(t,Jt({},this.props))))));return e.strictMode||!Rt.default.StrictMode?r:Rt.default.createElement(Rt.default.StrictMode,null,r)},a}(Rt.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}},D=function(t,e){return E({React:Rt.default,ReactDOM:Ht.default,rootComponent:I(e)(t)})},R=function(t,e){return function(){return t().then((function(t){return D(t.default,e)}))}},L=function(t,e){return function(){return Promise.resolve(D(t,e))}},M=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},N=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return M(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(t,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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){return(0,Bt.getExtensionStore)().subscribe((function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,Kt.isEqual)(u,r)||o(u)}))}),[]),r},B=function(t){(0,Rt.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])},U=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},F=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},K=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},$=function(t){var e=this.__data__=new se(t);this.size=e.size},z=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fe;++e<n;)this.add(t[e])},H=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},V=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},q=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},W=function(){var t=(0,Rt.useContext)(Lt),e=t.moduleName,n=t.extension;if(!e&&!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(t){var e,n,r,o,i,u,a=(0,Rt.useMemo)((function(){return(0,Mt.getConfigStore)(t)}),[t]),c=t,s=(e=a,o=(r=q((0,Rt.useState)((n=e,function(){var t=n.getState();return t.loaded&&t.config?t.config:null})),2))[0],i=r[1],(0,Rt.useEffect)((function(){return null==e?void 0:e.subscribe((function(t){t.loaded&&t.config&&i(t.config)}))}),[e]),o);if(!s)throw tr[c]||(tr[c]=(u=a,new Promise((function(t){var e=u.subscribe((function(n){n.loaded&&n.config&&(t(n.config),e())}))})))),tr[c];return s}(e),o=function(t){var e,n,r,o,i,u,a,c=(0,Rt.useMemo)(Mt.getExtensionsConfigStore,[]),s=(e=c,n=t,i=q((0,Rt.useState)((r=e,(o=n)?function(){var t=r.getState(),e=(0,Mt.getExtensionConfigFromStore)(t,o.extensionSlotName,o.extensionId);if(e.loaded&&e.config)return e.config}:null)),2),u=i[0],a=i[1],(0,Rt.useEffect)((function(){if(n)return e.subscribe((function(t){var e=(0,Mt.getExtensionConfigFromStore)(t,n.extensionSlotName,n.extensionId);e.loaded&&e.config&&!Xn(e.config,u)&&a(e.config)}))}),[e,n,u]),u);if(!s&&t){var l="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!tr[l]&&c&&(tr[l]=function(t,e){return new Promise((function(n){var r=t.subscribe((function(t){var o=(0,Mt.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,t)),tr[l]}return s||{}}(n),i=(0,Rt.useMemo)((function(){return function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){V(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},r,o)}),[r,o]);return i},G=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},J=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},Q=function(t,e){switch(e.type){case qn.loadPatient:return Y({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case qn.newPatient:return Y({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case qn.loadError:return Y({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}},X=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useReducer)(Q,Y({},rr,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t})))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return G(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){if(r.isPendingUuid){var t=J();o(t?{type:qn.loadPatient,patientUuid:t}:{type:qn.newPatient,patient:null})}var e=!0;return r.isLoadingPatient&&r.patientUuid&&(0,er.fetchCurrentPatient)(r.patientUuid).then((function(t){return e&&o({patient:t.data,type:qn.newPatient})}),(function(t){return e&&o({err:t,type:qn.loadError})})),function(){e=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Rt.useEffect)((function(){var t=function(t){var e=J();e!=r.patientUuid&&o({type:qn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=t?t:r.patientUuid,error:r.err}},tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},et=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},nt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){et(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},rt=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},ot=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},it=function(t,e){switch(e.type){case nr.loadPatient:return nt({},t,{patient:null,isLoadingPatient:!0,err:null});case nr.newPatient:return nt({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case nr.loadError:return nt({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}},ut=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot(),e=rt((0,Rt.useReducer)(it,ar),2),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var e=!0;return t?((0,er.fetchCurrentPatient)(t).then((function(t){return e&&r({patient:t.data,type:nr.newPatient})}),(function(t){return e&&r({err:t,type:nr.loadError})})),r({type:nr.loadPatient})):r({type:nr.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]},at=function(t){var e=d(t);return(0,Rt.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])},ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},st=function(){var t,e=(t=(0,Rt.useState)(0),function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(t,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.")}())[1];return(0,Rt.useCallback)((function(){e((function(t){return t+1}))}),[])},lt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ft=function(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t},ht=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(ft))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return lt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=function(){r(ft())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),n},pt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},dt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return pt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(t,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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=(0,er.getLocations)().subscribe((function(t){r(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},vt=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Rt.useRef)(null);return(0,Rt.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n},yt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},gt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},mt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return gt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(t,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.")}(),n=e[0],r=e[1],o=null;if(!n){if(or){var i=(0,er.getSessionStore)().getState();i.loaded&&(o=i.session)}else or=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,ir&&ir(),ir=void 0)};e((0,er.getSessionStore)().getState()),o||(ir=(0,er.getSessionStore)().subscribe(e))}));if(!o)throw or;r(o)}(0,Rt.useEffect)((function(){return ir||(ir=(0,er.getSessionStore)().subscribe((function(t){var e=t.loaded,n=t.session;e&&(o=n,r(n))}))),function(){ir&&ir(),ir=void 0}}),[]);var u=n||o;if(!u)throw or?(console.warn("useSession is in an unexpected state. Attempting to recover."),or):Error("useSession is in an invalid state.");return u},bt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},wt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},_t=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){wt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},St=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},xt=function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n},Ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr,n=arguments.length>2?arguments[2]:void 0,r=St((0,Rt.useState)((function(){return e(t.getState())})),2),o=r[0],i=r[1];(0,Rt.useEffect)((function(){return(0,fr.subscribeTo)(t,e,i)}),[t,e]);var u={};return n&&(u=(0,Rt.useMemo)((function(){return xt(t,n)}),[t,n])),_t({},o,u)},Et=function(t,e){return Ot(t,hr,e)},jt=function(t,e,n,o){return new(n||(n=Promise))((function(i,u){function a(t){try{s(o.next(t))}catch(t){u(t)}}function c(t){try{s(o.throw(t))}catch(t){u(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,r(e,n)?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))},kt=function(t,e){var n,r,o,i,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;function a(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=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},At=function(t){var e,n=eo(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(er.defaultVisitCustomRepresentation,"&includeInactive=false"):null,er.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Rt.useMemo)((function(){return null!==(e=null==r?void 0:r.data.results.find((function(t){return null===t.stopDatetime&&(0,no.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Pt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=(0,er.getVisitTypes)().subscribe((function(t){r(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},Tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},It=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=It((0,Rt.useState)(1),2),r=n[0],o=n[1],i=(0,Rt.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,Rt.useMemo)((function(){var n=(r-1)*e,o=(r+0)*e;return t.slice(n,o)}),[t,r,e]);return{results:u,totalPages:i,currentPage:r,paginated:t.length>e,showNextButton:r<i,showPreviousButton:r>1,goTo:function(t){o(Math.max(1,Math.min(i,t)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};g.r(m),g.d(m,{ComponentContext:function(){return Lt},ConfigurableLink:function(){return i},Extension:function(){return Ut},ExtensionSlot:function(){return zt},UserHasAccess:function(){return lr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return oe},getAsyncLifecycle:function(){return R},getLifecycle:function(){return D},getSyncLifecycle:function(){return L},openmrsComponentDecorator:function(){return I},useAssignedExtensionIds:function(){return N},useAssignedExtensions:function(){return p},useBodyScrollLock:function(){return B},useConfig:function(){return W},useConnectedExtensions:function(){return d},useConnectivity:function(){return f},useCurrentPatient:function(){return ut},useExtensionInternalStore:function(){return cr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return at},useExtensionStore:function(){return sr},useForceUpdate:function(){return st},useLayoutType:function(){return ht},useLocations:function(){return dt},useOnClickOutside:function(){return vt},usePagination:function(){return Dt},usePatient:function(){return X},useSession:function(){return mt},useStore:function(){return Ot},useStoreWithActions:function(){return Et},useVisit:function(){return At},useVisitTypes:function(){return Pt}});var Rt=g(954),Lt=Rt.default.createContext({moduleName:""}),Mt=g(824);function Nt(){return Nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nt.apply(this,arguments)}var Bt=g(45),Ut=function(t){var e,n=t.state,r=t.wrap,o=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)())||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,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.")}(),i=o[0],u=o[1],a=(0,Rt.useContext)(Lt).extension,c=(0,Rt.useCallback)((function(t){u(t)}),[]);(0,Rt.useEffect)((function(){if(null!=i&&a)return(0,Bt.renderExtension)(i,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,n)}),[null==a?void 0:a.extensionSlotName,null==a?void 0:a.extensionId,null==a?void 0:a.extensionSlotModuleName,n,i]);var l=Rt.default.createElement("div",{ref:c,"data-extension-id":null==a?void 0:a.extensionId,style:{position:"relative"}});return a&&r?r(l,a):l},Ft=g(728),Kt=g(891);function $t(){return $t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$t.apply(this,arguments)}var zt=function(t){var e=t.extensionSlotName,n=t.select,r=void 0===n?w:n,o=t.children,i=t.state,u=t.style,a=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["extensionSlotName","select","children","state","style"]),c=(0,Rt.useRef)(null),s=v(e),l=s.extensions,f=s.extensionSlotModuleName,h=(0,Rt.useRef)(i);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(h.current,i)||(h.current=i);var p=(0,Rt.useMemo)((function(){return e&&r(l).map((function(t){return Rt.default.createElement(Lt.Provider,{key:t.id,value:{moduleName:f,extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:f}}},null!=o?o:Rt.default.createElement(Ut,{state:h.current}))}))}),[r,l,e,h.current]);return Rt.default.createElement("div",$t({ref:c,"data-extension-slot-name":e,"data-extension-slot-module-name":f,style:b({},u,{position:"relative"})},a),p)},Ht=g(493);function Vt(t){return(Vt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}function qt(t){return(qt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}var Wt=null;try{Wt=n(6983).createContext()}catch(t){}var Gt={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Zt=g(64),Yt=g(281);function Jt(){return Jt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jt.apply(this,arguments)}function Qt(t){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var te=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)},ee=Zt.default.default||Zt.default,ne={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},re=function(t){(0,Rt.useEffect)((function(){return ee.on("languageChanged",t.forceUpdate),function(){return ee.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,Rt.useRef)(null);if(e.current)throw e.current;if(!ee.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.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 ee.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return Rt.default.createElement(Rt.default.Fragment,null,t.children)},oe=R,ie=function(t,e){return t===e||t!=t&&e!=e},ue=function(t,e){for(var n=t.length;n--;)if(ie(t[n][0],e))return n;return-1},ae=Array.prototype.splice;U.prototype.clear=function(){this.__data__=[],this.size=0},U.prototype.delete=function(t){var e=this.__data__,n=ue(e,t);return!(n<0||(n==e.length-1?e.pop():ae.call(e,n,1),--this.size,0))},U.prototype.get=function(t){var e=this.__data__,n=ue(e,t);return n<0?void 0:e[n][1]},U.prototype.has=function(t){return ue(this.__data__,t)>-1},U.prototype.set=function(t,e){var n=this.__data__,r=ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ce,se=U,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fe="object"==typeof self&&self&&self.Object===Object&&self,he=le||fe||Function("return this")(),pe=he.Symbol,de=Object.prototype,ve=de.hasOwnProperty,ye=de.toString,ge=pe?pe.toStringTag:void 0,me=Object.prototype.toString,be=pe?pe.toStringTag:void 0,we=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":be&&be in Object(t)?function(t){var e=ve.call(t,ge),n=t[ge];try{t[ge]=void 0;var r=!0}catch(t){}var o=ye.call(t);return r&&(e?t[ge]=n:delete t[ge]),o}(t):(e=t,me.call(e));var e},_e=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Se=function(t){if(!_e(t))return!1;var e=we(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},xe=he["__core-js_shared__"],Oe=(ce=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"",Ee=Function.prototype.toString,je=function(t){if(null!=t){try{return Ee.call(t)}catch(t){}try{return t+""}catch(t){}}return""},ke=/^\[object .+?Constructor\]$/,Ae=Function.prototype,Ce=Object.prototype,Pe=Ae.toString,Te=Ce.hasOwnProperty,Ie=RegExp("^"+Pe.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!_e(t)||(e=t,Oe&&Oe in e))&&(Se(t)?Ie:ke).test(je(t));var e}(r)?r:void 0},Re=De(he,"Map"),Le=De(Object,"create"),Me=Object.prototype.hasOwnProperty,Ne=Object.prototype.hasOwnProperty;F.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},F.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},F.prototype.get=function(t){var e=this.__data__;if(Le){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(e,t)?e[t]:void 0},F.prototype.has=function(t){var e=this.__data__;return Le?void 0!==e[t]:Ne.call(e,t)},F.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};var Be=F,Ue=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};K.prototype.clear=function(){this.size=0,this.__data__={hash:new Be,map:new(Re||se),string:new Be}},K.prototype.delete=function(t){var e=Ue(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return Ue(this,t).get(t)},K.prototype.has=function(t){return Ue(this,t).has(t)},K.prototype.set=function(t,e){var n=Ue(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Fe=K;$.prototype.clear=function(){this.__data__=new se,this.size=0},$.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},$.prototype.get=function(t){return this.__data__.get(t)},$.prototype.has=function(t){return this.__data__.has(t)},$.prototype.set=function(t,e){var n=this.__data__;if(r(n,se)){var o=n.__data__;if(!Re||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fe(o)}return n.set(t,e),this.size=n.size,this};var Ke=$;z.prototype.add=z.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},z.prototype.has=function(t){return this.__data__.has(t)};var $e=z,ze=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},He=function(t,e){return t.has(e)},Ve=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new $e:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!ze(e,(function(t,e){if(!He(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},qe=he.Uint8Array,We=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ge=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Ze=pe?pe.prototype:void 0,Ye=Ze?Ze.valueOf:void 0,Je=Array.isArray,Qe=Object.prototype.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,tn=Xe?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Xe(t),(function(e){return Qe.call(t,e)})))}:function(){return[]},en=function(t){return null!=t&&"object"==typeof t},nn=function(t){return en(t)&&"[object Arguments]"==we(t)},rn=Object.prototype,on=rn.hasOwnProperty,un=rn.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(t){return en(t)&&on.call(t,"callee")&&!un.call(t,"callee")},cn=an,sn=e&&!e.nodeType&&e,ln=sn&&t&&!t.nodeType&&t,fn=ln&&ln.exports===sn?he.Buffer:void 0,hn=(fn?fn.isBuffer:void 0)||function(){return!1},pn=/^(?:0|[1-9]\d*)$/,dn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=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,gn,mn,bn=e&&!e.nodeType&&e,wn=bn&&t&&!t.nodeType&&t,_n=wn&&wn.exports===bn&&le.process,Sn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),xn=Sn&&Sn.isTypedArray,On=xn?(yn=xn,function(t){return yn(t)}):function(t){return en(t)&&dn(t.length)&&!!vn[we(t)]},En=Object.prototype.hasOwnProperty,jn=Object.prototype,kn=(gn=Object.keys,mn=Object,function(t){return gn(mn(t))}),An=Object.prototype.hasOwnProperty,Cn=function(t){return n=tn,r=function(t){return null!=(e=t)&&dn(e.length)&&!Se(e)?function(t,e){var n,r,i,u=Je(t),a=!u&&cn(t),c=!u&&!a&&hn(t),s=!u&&!a&&!c&&On(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var p in t)!En.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=h,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&pn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||jn))return kn(t);var e,n,r=[];for(var o in Object(t))An.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Je(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Pn=Object.prototype.hasOwnProperty,Tn=De(he,"DataView"),In=De(he,"Promise"),Dn=De(he,"Set"),Rn=De(he,"WeakMap"),Ln="[object Map]",Mn="[object Promise]",Nn="[object Set]",Bn="[object WeakMap]",Un="[object DataView]",Fn=je(Tn),Kn=je(Re),$n=je(In),zn=je(Dn),Hn=je(Rn),Vn=we;(Tn&&Vn(new Tn(new ArrayBuffer(1)))!=Un||Re&&Vn(new Re)!=Ln||In&&Vn(In.resolve())!=Mn||Dn&&Vn(new Dn)!=Nn||Rn&&Vn(new Rn)!=Bn)&&(Vn=function(t){var e=we(t),n="[object Object]"==e?t.constructor:void 0,r=n?je(n):"";if(r)switch(r){case Fn:return Un;case Kn:return Ln;case $n:return Mn;case zn:return Nn;case Hn:return Bn}return e});var qn,Wn=Vn,Gn="[object Arguments]",Zn="[object Array]",Yn="[object Object]",Jn=Object.prototype.hasOwnProperty,Qn=function t(e,n,o,i,u){return e===n||(null==e||null==n||!en(e)&&!en(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=Je(t),c=Je(e),s=a?Zn:Wn(t),l=c?Zn:Wn(e),f=(s=s==Gn?Yn:s)==Yn,h=(l=l==Gn?Yn:l)==Yn,p=s==l;if(p&&hn(t)){if(!hn(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new Ke),a||On(t)?Ve(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new qe(t),new qe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=We;case"[object Set]":var c=1&r;if(a||(a=Ge),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ve(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Ye)return Ye.call(t)==Ye.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var d=f&&Jn.call(t,"__wrapped__"),v=h&&Jn.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return u||(u=new Ke),i(y,g,n,o,u)}}return!!p&&(u||(u=new Ke),function(t,e,n,o,i,u){var a=1&n,c=Cn(t),s=c.length;if(s!=Cn(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:Pn.call(e,f)))return!1}var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(d=!1)}return u.delete(t),u.delete(e),d}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Xn=function(t,e){return Qn(t,e)},tr={},er=g(766);!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(qn||(qn={}));var nr,rr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(nr||(nr={}));var or,ir,ur,ar={patient:null,isLoadingPatient:!0,err:null},cr=c((0,Bt.getExtensionInternalStore)()),sr=c((0,Bt.getExtensionStore)()),lr=function(t){var e,n=t.privilege,r=t.fallback,o=t.children,i=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return yt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(t,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.")}(),u=i[0],a=i[1];return(0,Rt.useEffect)((function(){var t=(0,er.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return t.unsubscribe()}}),[]),u&&(0,er.userHasAccess)(n,u)?Rt.default.createElement(Rt.default.Fragment,null,o):r?Rt.default.createElement(Rt.default.Fragment,null,r):null},fr=g(385),hr=function(t){return t},pr=function(){},dr=void 0,vr=Object,yr=function(t){return t===dr},gr=function(t){return"function"==typeof t},mr=function(t,e){return vr.assign({},t,e)},br="undefined",wr=function(){return("undefined"==typeof window?"undefined":o(window))!=br},_r=new WeakMap,Sr=0,xr=function(t){var e,n,r=void 0===t?"undefined":o(t),i=t&&t.constructor,u=i==Date;if(vr(t)!==t||u||i==RegExp)e=u?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=_r.get(t))return e;if(e=++Sr+"~",_r.set(t,e),i==Array){for(e="@",n=0;n<t.length;n++)e+=xr(t[n])+",";_r.set(t,e)}if(i==vr){e="#";for(var a=vr.keys(t).sort();!yr(n=a.pop());)yr(t[n])||(e+=n+":"+xr(t[n])+",");_r.set(t,e)}}return e},Or=!0,Er=wr(),jr=("undefined"==typeof document?"undefined":o(document))!=br,kr=Er&&window.addEventListener?window.addEventListener.bind(window):pr,Ar=jr?document.addEventListener.bind(document):pr,Cr=Er&&window.removeEventListener?window.removeEventListener.bind(window):pr,Pr=jr?document.removeEventListener.bind(document):pr,Tr={isOnline:function(){return Or},isVisible:function(){var t=jr&&document.visibilityState;return yr(t)||"hidden"!==t}},Ir={initFocus:function(t){return Ar("visibilitychange",t),kr("focus",t),function(){Pr("visibilitychange",t),Cr("focus",t)}},initReconnect:function(t){var e=function(){Or=!0,t()},n=function(){Or=!1};return kr("online",e),kr("offline",n),function(){Cr("online",e),Cr("offline",n)}}},Dr=!wr()||"Deno"in window,Rr=Dr?Rt.useEffect:Rt.useLayoutEffect,Lr="undefined"!=typeof navigator&&navigator.connection,Mr=!Dr&&Lr&&(["slow-2g","2g"].includes(Lr.effectiveType)||Lr.saveData),Nr=function(t){if(gr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?xr(t):"",e,t?"$swr$"+t:""]},Br=new WeakMap,Ur=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Br.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Fr=0,Kr=function(){return++Fr},$r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return jt(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return kt(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!yr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Nr(n),f=l[0],h=l[2],!f)return[2];if(p=Br.get(e),d=p[2],t.length<3)return[2,Ur(e,f,e.get(f),dr,dr,a,!0)];if(v=r,g=Kr(),d[f]=[g,0],m=!yr(s),b=e.get(f),m&&(e.set(f,s),Ur(e,f,s)),gr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&gr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(gr(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,mr(e.get(h),{error:y}))),d[f][1]=Kr(),[4,Ur(e,f,v,y,dr,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},zr=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Hr=function(t,e){if(!Br.has(t)){var n=mr(Ir,e),r={},o=$r.bind(dr,t),i=pr;if(Br.set(t,[r,{},{},{},o]),!Dr){var u=n.initFocus(setTimeout.bind(dr,zr.bind(dr,r,0))),a=n.initReconnect(setTimeout.bind(dr,zr.bind(dr,r,1)));i=function(){u&&u(),a&&a(),Br.delete(t)}}return[t,o,i]}return[t,Br.get(t)[4]]},Vr=Hr(new Map),qr=Vr[0],Wr=Vr[1],Gr=mr({onLoadingSlow:pr,onSuccess:pr,onError:pr,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!yr(i)&&u>i||setTimeout(r,a,o)},onDiscarded:pr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Mr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Mr?5e3:3e3,compare:function(t,e){return xr(t)==xr(e)},isPaused:function(){return!1},cache:qr,mutate:Wr,fallback:{}},Tr),Zr=function(t,e){var n=mr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=mr(o,u))}return n},Yr=(0,Rt.createContext)({}),Jr=function(t){return gr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},Qr=function(){return mr(Gr,(0,Rt.useContext)(Yr))},Xr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},to={dedupe:!0},eo=(vr.defineProperty((function(t){var e=t.value,n=Zr((0,Rt.useContext)(Yr),e),r=e&&e.provider,o=(0,Rt.useState)((function(){return r?Hr(r(n.cache||qr),e):dr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Rr((function(){return o?o[2]:dr}),[]),(0,Rt.createElement)(Yr.Provider,mr(t,{value:n}))}),"default",{value:Gr}),ur=function(t,e,n){var r=n.cache,i=n.compare,u=n.fallbackData,a=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,h=Br.get(r),p=h[0],d=h[1],v=h[2],y=h[3],g=Nr(t),m=g[0],b=g[1],w=g[2],_=(0,Rt.useRef)(!1),S=(0,Rt.useRef)(!1),x=(0,Rt.useRef)(m),O=(0,Rt.useRef)(e),E=(0,Rt.useRef)(n),j=function(){return E.current},k=function(){return j().isVisible()&&j().isOnline()},A=function(t){return r.set(w,mr(r.get(w),t))},C=r.get(m),P=yr(u)?n.fallback[m]:u,T=yr(C)?P:C,I=r.get(w)||{},D=I.error,R=!_.current,L=function(){return R&&!yr(c)?c:!j().isPaused()&&(a?!yr(T):yr(T)||n.revalidateIfStale)},M=!(!m||!e)&&(!!I.isValidating||R&&L()),N=function(t,e){var n=(0,Rt.useState)({})[1],r=(0,Rt.useRef)(t),o=(0,Rt.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Rt.useCallback)((function(t){var i=!1,u=r.current;for(var a in t){var c=a;u[c]!==t[c]&&(u[c]=t[c],o.current[c]&&(i=!0))}i&&!e.current&&n({})}),[]);return Rr((function(){r.current=t})),[r,o.current,i]}({data:T,error:D,isValidating:M},S),B=N[0],U=N[1],F=N[2],K=(0,Rt.useCallback)((function(t){return jt(void 0,void 0,void 0,(function(){var e,o,u,a,c,s,l,f,h,p,d,g,w;return kt(this,(function(E){switch(E.label){case 0:if(e=O.current,!m||!e||S.current||j().isPaused())return[2,!1];a=!0,c=t||{},s=!y[m]||!c.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var t=y[m];t&&t[1]===u&&delete y[m]},h={isValidating:!1},p=function(){A({isValidating:!1}),l()&&F(h)},A({isValidating:!0}),F({isValidating:!0}),E.label=1;case 1:return E.trys.push([1,3,,4]),s&&(Ur(r,m,B.current.data,B.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){a&&l()&&j().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Kr()]),w=y[m],o=w[0],u=w[1],[4,o];case 2:return o=E.sent(),s&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===u?(A({error:dr}),h.error=dr,d=v[m],!yr(d)&&(u<=d[0]||u<=d[1]||0===d[1])?(p(),s&&l()&&j().onDiscarded(m),[2,!1]):(i(B.current.data,o)?h.data=B.current.data:h.data=o,i(r.get(m),o)||r.set(m,o),s&&l()&&j().onSuccess(o,m,n),[3,4])):(s&&l()&&j().onDiscarded(m),[2,!1]);case 3:return g=E.sent(),f(),j().isPaused()||(A({error:g}),h.error=g,s&&l()&&(j().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&k()&&j().onErrorRetry(g,m,n,K,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return a=!1,p(),l()&&s&&Ur(r,m,h.data,h.error,!1),[2,!0]}}))}))}),[m]),$=(0,Rt.useCallback)($r.bind(dr,r,(function(){return x.current})),[]);if(Rr((function(){O.current=e,E.current=n})),Rr((function(){if(m){var t=m!==x.current,e=K.bind(dr,to),n=0,r=Xr(m,d,(function(t,e,n){F(mr({error:e,isValidating:n},i(B.current.data,t)?dr:{data:t}))})),u=Xr(m,p,(function(t){if(0==t){var r=Date.now();j().revalidateOnFocus&&r>n&&k()&&(n=r+j().focusThrottleInterval,e())}else if(1==t)j().revalidateOnReconnect&&k()&&e();else if(2==t)return K()}));return S.current=!1,x.current=m,_.current=!0,t&&F({data:T,error:D,isValidating:M}),L()&&(yr(T)||Dr?e():(a=e,wr()&&o(window.requestAnimationFrame)!=br?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),u()}}var a}),[m,K]),Rr((function(){var t,e=function(){var e=gr(s)?s(T):s;e&&-1!==t&&(t=setTimeout(n,e))},n=function(){B.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?e():K(to).then(e)};return e(),function(){t&&(clearTimeout(t),t=-1)}}),[s,l,f,K]),(0,Rt.useDebugValue)(T),a&&yr(T)&&m)throw O.current=e,E.current=n,S.current=!1,yr(D)?K(to):D;return{mutate:$,get data(){return U.data=!0,T},get error(){return U.error=!0,D},get isValidating(){return U.isValidating=!0,M}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr(),r=Jr(t),o=r[0],i=r[1],u=r[2],a=Zr(n,u),c=ur,s=a.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||a.fetcher,a)}),no=g(688),ro=g(332),oo=g.n(ro);no.default.extend(oo())}(),m}())}}}))},1493:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var u=n,a=0;a<u.length;a++)u[a](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 u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},2390:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(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.")}()}t=n.nmd(t);var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function p(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","i18next","react","react-dom","react-i18next","rxjs"],(function(r,i){var p={},d={},v={},y={},g={},m={},b={},w={};return{setters:[function(t){p.getExtensionInternalStore=t.getExtensionInternalStore,p.getExtensionStore=t.getExtensionStore},function(){},function(t){v.createGlobalStore=t.createGlobalStore,v.getGlobalStore=t.getGlobalStore},function(t){y.default=t.default},function(t){g.createContext=t.createContext,g.createElement=t.createElement,g.default=t.default,g.useCallback=t.useCallback,g.useContext=t.useContext,g.useDebugValue=t.useDebugValue,g.useEffect=t.useEffect,g.useLayoutEffect=t.useLayoutEffect,g.useMemo=t.useMemo,g.useRef=t.useRef,g.useState=t.useState},function(){},function(){},function(t){w.BehaviorSubject=t.BehaviorSubject,w.Subject=t.Subject}],execute:function(){r(function(){var r={23:function(t){var e=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t.exports=function(){"use strict";var t=6e4,n=36e5,r="millisecond",o="second",i="minute",u="hour",a="day",c="week",s="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\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("_")},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},m={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,s),i=n-o<0,u=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-u:u-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:f,w:c,d:a,D:h,h:u,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=y;var _=function(t){return e(t,k)},S=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var u=e.split("-");if(!o&&u.length>1)return t(u[0])}else{var a=e.name;w[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},x=function(t,e){if(_(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},O=m;O.l=S,O.i=_,O.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E,j,k=((j=(E=function(t){this.$L=S(t.locale,null,!0),this.parse(t)}).prototype).parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(O.u(n))return new Date;if(e(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,u=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,u)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,u)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},j.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return!(this.$d.toString()===p)},j.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},j.isAfter=function(t,e){return x(t)<this.startOf(e)},j.isBefore=function(t,e){return this.endOf(e)<x(t)},j.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(t,e){var n=this,r=!!O.u(e)||e,l=O.p(t),p=function(t,e){var o=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},d=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,y=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case s:return r?p(1,y):p(0,y+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(r?g-w:g+(6-w),y);case a:case h:return d(m+"Hours",0);case u:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},j.endOf=function(t){return this.startOf(t,!1)},j.$set=function(t,e){var n,c=O.p(t),l="set"+(this.$u?"UTC":""),p=(n={},n[a]=l+"Date",n[h]=l+"Date",n[s]=l+"Month",n[f]=l+"FullYear",n[u]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],d=c===a?this.$D+(e-this.$W):e;if(c===s||c===f){var v=this.clone().set(h,1);v.$d[p](d),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},j.set=function(t,e){return this.clone().$set(t,e)},j.get=function(t){return this[O.p(t)]()},j.add=function(e,r){var l,h=this;e=Number(e);var p=O.p(r),d=function(t){var n=x(h);return O.w(n.date(n.date()+Math.round(t*e)),h)};if(p===s)return this.set(s,this.$M+e);if(p===f)return this.set(f,this.$y+e);if(p===a)return d(1);if(p===c)return d(7);var v=(l={},l[i]=t,l[u]=n,l[o]=1e3,l)[p]||1,y=this.$d.getTime()+e*v;return O.w(y,this)},j.subtract=function(t,e){return this.add(-1*t,e)},j.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),i=this.$H,u=this.$m,a=this.$M,c=n.weekdays,s=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].substr(0,i)},f=function(t){return O.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:l(n.monthsShort,a,s,3),MMMM:l(s,a),D:this.$D,DD:O.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:O.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,u,!0),A:h(i,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(t,e){return e||d[t]||o.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(e,r,h){var p,d=O.p(r),v=x(e),y=(v.utcOffset()-this.utcOffset())*t,g=this-v,m=O.m(this,v);return m=(p={},p[f]=m/12,p[s]=m,p[l]=m/3,p[c]=(g-y)/6048e5,p[a]=(g-y)/864e5,p[u]=g/n,p[i]=g/t,p[o]=g/1e3,p)[d]||g,h?m:O.a(m)},j.daysInMonth=function(){return this.endOf(s).$D},j.$locale=function(){return w[this.$L]},j.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},j.clone=function(){return O.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()},E),A=k.prototype;return x.prototype=A,[["$ms",r],["$s",o],["$m",i],["$H",u],["$W",a],["$M",s],["$y",f],["$D",h]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,k,x),t.$i=!0),x},x.locale=S,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}()},701:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},435:function(t,e,n){var r,o=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t=n.nmd(t);var i=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};(function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},d=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?H(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},E=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:rt},j=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,W(t)+1).replace(Gt,""):t},I=function(t){return function(e){return t(e)}},D=function(t,e){return v(e,(function(e){return t[e]}))},R=function(t,e){return t.has(e)},L=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},M=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},N=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},B=function(t){return"\\"+He[t]},U=function(t){return Be.test(t)},F=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},K=function(t,e){return function(n){return t(e(n))}},$=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Q||(t[n]=Q,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1},V=function(t){return U(t)?G(t):cn(t)},q=function(t){return U(t)?Z(t):t.split("")},W=function(t){for(var e=t.length;e--&&Zt.test(t.charAt(e)););return e},G=function(t){for(var e=Me.lastIndex=0;Me.test(t);)++e;return e},Z=function(t){return t.match(Me)||[]},Y="Expected a function",J="__lodash_hash_undefined__",Q="__lodash_placeholder__",X=32,tt=128,et=1/0,nt=9007199254740991,rt=NaN,ot=4294967295,it=[["ary",tt],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",X],["partialRight",64],["rearg",256]],ut="[object Arguments]",at="[object Array]",ct="[object Boolean]",st="[object Date]",lt="[object Error]",ft="[object Function]",ht="[object GeneratorFunction]",pt="[object Map]",dt="[object Number]",vt="[object Object]",yt="[object Promise]",gt="[object RegExp]",mt="[object Set]",bt="[object String]",wt="[object Symbol]",_t="[object WeakMap]",St="[object ArrayBuffer]",xt="[object DataView]",Ot="[object Float32Array]",Et="[object Float64Array]",jt="[object Int8Array]",kt="[object Int16Array]",At="[object Int32Array]",Ct="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Tt="[object Uint16Array]",It="[object Uint32Array]",Dt=/\b__p \+= '';/g,Rt=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Nt=/[&<>"']/g,Bt=RegExp(Mt.source),Ut=RegExp(Nt.source),Ft=/<%-([\s\S]+?)%>/g,Kt=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ht=/^\w*$/,Vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(qt.source),Gt=/^\s+/,Zt=/\s/,Yt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,Qt=/,? & /,Xt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ue=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="a-z\\xdf-\\xf6\\xf8-\\xff",de="A-Z\\xc0-\\xd6\\xd8-\\xde",ve="\\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",ye="["+ve+"]",ge="["+he+"]",me="\\d+",be="["+pe+"]",we="[^\ud800-\udfff"+ve+me+"\\u2700-\\u27bf"+pe+de+"]",_e="[^\ud800-\udfff]",Se="(?:\ud83c[\udde6-\uddff]){2}",xe="[\ud800-\udbff][\udc00-\udfff]",Oe="["+de+"]",Ee="(?:"+be+"|"+we+")",je="(?:"+Oe+"|"+we+")",ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ae="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ce="(?:"+ge+"|\ud83c[\udffb-\udfff])?",Pe="[\\ufe0e\\ufe0f]?",Te=Pe+Ce+"(?:\\u200d(?:"+[_e,Se,xe].join("|")+")"+Pe+Ce+")*",Ie="(?:"+["[\\u2700-\\u27bf]",Se,xe].join("|")+")"+Te,De="(?:"+[_e+ge+"?",ge,Se,xe,"[\ud800-\udfff]"].join("|")+")",Re=RegExp("['’]","g"),Le=RegExp(ge,"g"),Me=RegExp("\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|"+De+Te,"g"),Ne=RegExp([Oe+"?"+be+"+"+ke+"(?="+[ye,Oe,"$"].join("|")+")",je+"+"+Ae+"(?="+[ye,Oe+Ee,"$"].join("|")+")",Oe+"?"+Ee+"+"+ke,Oe+"+"+Ae,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ie].join("|"),"g"),Be=RegExp("[\\u200d\ud800-\udfff"+he+"\\ufe0e\\ufe0f]"),Ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fe=["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"],Ke=-1,$e={};$e[Ot]=$e[Et]=$e[jt]=$e[kt]=$e[At]=$e[Ct]=$e[Pt]=$e[Tt]=$e[It]=!0,$e[ut]=$e[at]=$e[St]=$e[ct]=$e[xt]=$e[st]=$e[lt]=$e[ft]=$e[pt]=$e[dt]=$e[vt]=$e[gt]=$e[mt]=$e[bt]=$e[_t]=!1;var ze={};ze[ut]=ze[at]=ze[St]=ze[xt]=ze[ct]=ze[st]=ze[Ot]=ze[Et]=ze[jt]=ze[kt]=ze[At]=ze[pt]=ze[dt]=ze[vt]=ze[gt]=ze[mt]=ze[bt]=ze[wt]=ze[Ct]=ze[Pt]=ze[Tt]=ze[It]=!0,ze[lt]=ze[ft]=ze[_t]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,qe=parseInt,We="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ze=We||Ge||Function("return this")(),Ye=e&&!e.nodeType&&e,Je=Ye&&t&&!t.nodeType&&t,Qe=Je&&Je.exports===Ye,Xe=Qe&&We.process,tn=function(){try{return Je&&Je.require&&Je.require("util").types||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),en=tn&&tn.isArrayBuffer,nn=tn&&tn.isDate,rn=tn&&tn.isMap,on=tn&&tn.isRegExp,un=tn&&tn.isSet,an=tn&&tn.isTypedArray,cn=j("length"),sn=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"}),ln=k({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),fn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hn=function t(e){var n,r,k=function(t){if(No(t)&&!Ba(t)&&!o(t,Z)){if(o(t,G))return t;if(ji.call(t,"__wrapped__"))return so(t)}return new G(t)},H=function(){},G=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},Z=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]},Zt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Ba(t),r=!n&&Na(t),o=!n&&!r&&Fa(t),i=!n&&!r&&!o&&Va(t),u=n||r||o||i,a=u?P(t.length,bi):[],c=a.length;for(var s in t)!e&&!ji.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||$r(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return io(ir(t),ke(e,0,t.length))},be=function(t){return io(ir(t))},we=function(t,e,n){(n!==u&&!Co(t[e],n)||n===u&&!(e in t))&&Ee(t,e,n)},_e=function(t,e,n){var r=t[e];ji.call(t,e)&&Co(r,n)&&(n!==u||e in t)||Ee(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(Co(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return Eu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ur(e,Jo(e),t)},Ee=function(t,e,n){"__proto__"==e&&Hi?Hi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},je=function(t,e){for(var n=-1,r=e.length,o=hi(r),i=null==t;++n<r;)o[n]=i?u:Zo(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=gi(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new wi(Y);return Zu((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=p,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=d,u=!1):e.length>=200&&(i=R,u=!1,e=new de(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return Eu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Ie=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Ko(a):n(a,c)))var c=a,s=i}return s},De=function(t,e){var n=[];return Eu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Me=function(t,e){return t&&Au(t,e,Jo)},Be=function(t,e){return t&&Cu(t,e,Jo)},He=function(t,e){return h(e,(function(e){return Do(t[e])}))},We=function(t,e){for(var n=0,r=(e=Yn(e,t)).length;null!=t&&n<r;)t=t[uo(e[n++])];return n&&n==r?t:u},Ge=function(t,e,n){var r=e(t);return Ba(t)?r:y(r,n(t))},Ye=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":zi&&zi in gi(t)?Br(t):Qr(t)},Je=function(t,e){return t>e},Xe=function(t,e){return null!=t&&ji.call(t,e)},tn=function(t,e){return null!=t&&e in gi(t)},cn=function(t,e,n){for(var r=n?d:p,o=t[0].length,i=t.length,a=i,c=hi(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=nu(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new de(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?R(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?R(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){e=Yn(e,t);var r=null==(t=to(t,e))?t:t[uo(vo(e))];return null==r?u:a(r,t,n)},dn=function(t){return No(t)&&Ye(t)==ut},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=gi(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var p=r(l,f,s,t,e,h);if(!(p===u?Pu(f,l,3,r,h):p))return!1}}return!0},yn=function(t){return!(!Mo(t)||Wr(t))&&(Do(t)?Ii:ue).test(ao(t))},gn=function(t){return"function"==typeof t?t:null==t?ii:"object"==typeof t?Ba(t)?Sn(t[0],t[1]):_n(t):si(t)},mn=function(t){if(!Gr(t))return tu(t);var e=[];for(var n in gi(t))ji.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=Po(t)?hi(t.length):[];return Eu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Mr(t);return 1==e.length&&e[0][2]?Yr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Hr(t)&&Zr(e)?Yr(uo(t),e):function(n){var r=Zo(n,t);return r===u&&r===e?Yo(n,t):Pu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return $r(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Ba(t)?function(e){return We(e,1===t.length?t[0]:t)}:t})):[ii];var r=-1;return e=v(e,I(Rr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return nr(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},En=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=We(t,u);n(a,u)&&Dn(i,Yn(u,t),a)}return i},jn=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=ir(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Fi.call(a,c,1),Fi.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;$r(o)?Fi.call(t,o,1):$n(t,o)}}return t},An=function(t,e){return t+Zi(iu()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>nt)return n;do{e%2&&(n+=t),(e=Zi(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return Yu(Xr(t,e,ii),t+"")},Tn=function(t){return ge(ti(t))},In=function(t,e){var n=ti(t);return io(n,ke(e,0,n.length))},Dn=function(t,e,n,r){if(!Mo(t))return t;for(var o=-1,i=(e=Yn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=uo(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Mo(f)?f:$r(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Rn=function(t){return io(ti(t))},Ln=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=hi(o);++r<o;)i[r]=t[r+e];return i},Mn=function(t,e){var n;return Eu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Nn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Ko(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Bn(t,e,ii,n)},Bn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Ko(e),l=e===u;o<i;){var f=Zi((o+i)/2),h=n(t[f]),p=h!==u,d=null===h,v=h==h,y=Ko(h);if(a)var g=r||v;else g=l?v&&(r||p):c?v&&p&&(r||!d):s?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return nu(i,4294967294)},Un=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Co(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Fn=function(t){return"number"==typeof t?t:Ko(t)?rt:+t},Kn=function(t,e,n){var r=-1,o=p,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=d;else if(i>=200){var s=e?null:Bu(t);if(s)return z(s);u=!1,o=R,c=new de}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},$n=function(t,e){return e=Yn(e,t),null==(t=to(t,e))||delete t[uo(vo(e))]},zn=function(t,e,n,r){return Dn(t,e,n(We(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Ln(t,r?0:i,r?i+1:o):Ln(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return o(n,Z)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Kn(t[0]):[];for(var o=-1,i=hi(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Kn(ku(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return To(t)?t:[]},Zn=function(t){return"function"==typeof t?t:ii},Yn=function(t,e){return Ba(t)?t:Hr(t,e)?[t]:Ju(Go(t))},Jn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Ln(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Mi?Mi(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Li(e).set(new Li(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Ko(t),a=e!==u,c=null===e,s=e==e,l=Ko(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=eu(i-u,0),l=hi(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},or=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=eu(i-a,0),f=hi(l+s),h=!r;++o<l;)f[o]=t[o];for(var p=o;++c<s;)f[p+c]=e[c];for(;++u<a;)(h||o<i)&&(f[p+n[u]]=t[o++]);return f},ir=function(t,e){var n=-1,r=t.length;for(e||(e=hi(r));++n<r;)e[n]=t[n];return e},ur=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?Ee(n,c,s):_e(n,c,s)}return n},ar=function(t,e){return function(n,r){var o=Ba(n)?c:xe,i=e?e():{};return o(n,t,Rr(r,2),i)}},cr=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&zr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=gi(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},sr=function(t,e){return function(n,r){if(null==n)return n;if(!Po(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=gi(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},lr=function(t){return function(e,n,r){for(var o=-1,i=gi(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},fr=function(t){return function(e){e=Go(e);var n=U(e)?q(e):u,r=n?n[0]:e.charAt(0),o=n?Jn(n,1).join(""):e.slice(1);return r[t]()+o}},hr=function(t){return function(e){return g(ri(ni(e).replace(Re,"")),t,"")}},pr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=xu(t.prototype),r=t.apply(n,e);return Mo(r)?r:n}},dr=function(t){return function(e,n,r){var o=gi(e);if(!Po(e)){var i=Rr(n,3);e=Jo(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},vr=function(t){return Cr((function(e){var n=e.length,r=n,o=G.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new wi(Y);if(o&&!a&&"wrapper"==Ir(i))var a=new G([],!0)}for(r=a?r:n;++r<n;){i=e[r];var c=Ir(i),s="wrapper"==c?Fu(i):u;a=s&&qr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Ir(s[0])].apply(a,s[3]):1==i.length&&qr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Ba(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},yr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},Me(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},gr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=Ru(n),r=Ru(r)):(n=Fn(n),r=Fn(r)),o=t(n,r)}return o}},mr=function(t){return Cr((function(e){return e=v(e,I(Rr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},br=function(t,e){var n=(e=e===u?" ":Ru(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Gi(t/V(e)));return U(e)?Jn(q(r),0,t).join(""):r.slice(0,t)},wr=function(t){return function(e,n,r){return r&&"number"!=typeof r&&zr(e,n,r)&&(n=r=u),e=zo(e),n===u?(n=e,e=0):n=zo(n),function(t,e,n,r){for(var o=-1,i=eu(Gi((e-t)/(n||1)),0),u=hi(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:zo(r),t)}},_r=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=qo(e),n=qo(n)),t(e,n)}},Sr=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?X:64,4&(e&=~(f?64:X))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],p=n.apply(u,h);return qr(t)&&Gu(p,h),p.placeholder=r,ro(p,t,e)},xr=function(t){var e=yi[t];return function(t,n){if(t=qo(t),(n=null==n?0:nu(Ho(n),292))&&Qi(t)){var r=(Go(t)+"e").split("e"),o=e(r[0]+"e"+(+r[1]+n));return+((r=(Go(o)+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},Or=function(t){return function(e){var n,r,o=zu(e);return o==pt?F(e):o==mt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Er=function(t,e,n,r,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new wi(Y);var h=r?r.length:0;if(h||(e&=-97,r=i=u),s=s===u?s:eu(Ho(s),0),l=l===u?l:Ho(l),h-=i?i.length:0,64&e){var p=r,d=i;r=i=u}var v,y,g,m,b=f?u:Fu(t),w=[t,e,n,r,i,p,d,c,s,l];if(b&&Jr(w,b),t=w[0],e=w[1],n=w[2],r=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:eu(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=pr(v=t),function t(){for(var e=arguments.length,n=hi(e),r=e,i=Dr(t);r--;)n[r]=arguments[r];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:$(n,i);if((e-=c.length)<g)return Sr(v,y,Nu,t.placeholder,u,n,c,u,u,g-e);var s=this&&this!==Ze&&o(this,t)?m:v;return a(s,this,n)}):e!=X&&33!=e||i.length?Nu.apply(u,w):function(t,e,n,r){var i=1&e,u=pr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=r.length,h=hi(f+s),p=this&&this!==Ze&&o(this,e)?u:t;++l<f;)h[l]=r[l];for(;s--;)h[l++]=arguments[++c];return a(p,i?n:this,h)}}(t,e,n,r);else var _=function(t,e,n){var r=1&e,i=pr(t);return function e(){return(this&&this!==Ze&&o(this,e)?i:t).apply(r?n:this,arguments)}}(t,e,n);return ro((b?Iu:Gu)(_,w),t,e)},jr=function(t,e,n,r){return t===u||Co(t,xi[n])&&!ji.call(r,n)?e:t},kr=function(t){return Uo(t)?u:t},Ar=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new de:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;p=!1;break}if(d){if(!b(e,(function(t,e){if(!R(d,e)&&(v===t||o(v,t,n,r,i)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Cr=function(t){return Yu(Xr(t,u,ho),t+"")},Pr=function(t){return Ge(t,Jo,Ku)},Tr=function(t){return Ge(t,Qo,$u)},Ir=function(t){for(var e=t.name+"",n=du[e],r=ji.call(du,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Dr=function(t){return(ji.call(k,"placeholder")?k:t).placeholder},Rr=function(){var t=k.iteratee||ui;return t=t===ui?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Lr=function(t,e){var n=t.__data__;return Vr(e)?n["string"==typeof e?"string":"hash"]:n.map},Mr=function(t){for(var e=Jo(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zr(o)]}return e},Nr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Br=function(t){var e=ji.call(t,zi),n=t[zi];try{t[zi]=u;var r=!0}catch(t){}var o=Ci.call(t);return r&&(e?t[zi]=n:delete t[zi]),o},Ur=function(t,e,n){for(var r=-1,o=(e=Yn(e,t)).length,i=!1;++r<o;){var u=uo(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Lo(o)&&$r(u,o)&&(Ba(t)||Na(t))},Fr=function(t){return"function"!=typeof t.constructor||Gr(t)?{}:xu(Ni(t))},Kr=function(t){return Ba(t)||Na(t)||!!(Ki&&t&&t[Ki])},$r=function(t,e){var n=void 0===t?"undefined":i(t);return!!(e=null==e?nt:e)&&("number"==n||"symbol"!=n&&ce.test(t))&&t>-1&&t%1==0&&t<e},zr=function(t,e,n){if(!Mo(n))return!1;var r=void 0===e?"undefined":i(e);return!!("number"==r?Po(n)&&$r(e,n.length):"string"==r&&e in n)&&Co(n[e],t)},Hr=function(t,e){if(Ba(t))return!1;var n=void 0===t?"undefined":i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ko(t))||Ht.test(t)||!zt.test(t)||null!=e&&t in gi(e)},Vr=function(t){var e=void 0===t?"undefined":i(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},qr=function(t){var e=Ir(t),n=k[e];if("function"!=typeof n||!(e in Z.prototype))return!1;if(t===n)return!0;var r=Fu(n);return!!r&&t===r[0]},Wr=function(t){return!!Ai&&Ai in t},Gr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xi)},Zr=function(t){return t==t&&!Mo(t)},Yr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in gi(n))}},Jr=function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==tt&&8==n||r==tt&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?rr(c,a,e[4]):a,t[4]=c?$(t[3],Q):e[4]}return(a=e[5])&&(c=t[5],t[5]=c?or(c,a,e[6]):a,t[6]=c?$(t[5],Q):e[6]),(a=e[7])&&(t[7]=a),r&tt&&(t[8]=null==t[8]?e[8]:nu(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t},Qr=function(t){return Ci.call(t)},Xr=function(t,e,n){return e=eu(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=eu(r.length-e,0),u=hi(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=hi(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},to=function(t,e){return e.length<2?t:We(t,Ln(e,0,-1))},eo=function(t,e){for(var n=t.length,r=nu(e.length,n),o=ir(t);r--;){var i=e[r];t[r]=$r(i,n)?o[i]:u}return t},no=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},ro=function(t,e,n){var r,o=e+"";return Yu(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Yt,"{\n/* [wrapped with "+e+"] */\n")}(o,co((r=o.match(Jt))?r[1].split(Qt):[],n)))},oo=function(t){var e=0,n=0;return function(){var r=ru(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},io=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},uo=function(t){if("string"==typeof t||Ko(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},ao=function(t){if(null!=t){try{return Ei.call(t)}catch(t){}try{return t+""}catch(t){}}return""},co=function(t,e){return s(it,(function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)})),t.sort()},so=function(t){if(o(t,Z))return t.clone();var e=new G(t.__wrapped__,t.__chain__);return e.__actions__=ir(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},lo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),_(t,Rr(e,3),o)},fo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=Ho(n),o=n<0?eu(r+o,0):nu(o,r-1)),_(t,Rr(e,3),o,!0)},ho=function(t){return null!=t&&t.length?ku(t,1):[]},po=function(t){return t&&t.length?t[0]:u},vo=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},yo=function(t,e){return t&&t.length&&e&&e.length?jn(t,e):t},go=function(t){return null==t?t:uu.call(t)},mo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(To(t))return e=eu(t.length,e),!0})),P(e,(function(e){return v(t,j(e))}))},bo=function(t,e){if(!t||!t.length)return[];var n=mo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},wo=function(t){var e=k(t);return e.__chain__=!0,e},_o=function(t,e){return e(t)},So=function(t,e){return(Ba(t)?s:Eu)(t,Rr(e,3))},xo=function(t,e){return(Ba(t)?l:ju)(t,Rr(e,3))},Oo=function(t,e){return(Ba(t)?v:wn)(t,Rr(e,3))},Eo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Er(t,tt,u,u,u,u,e)},jo=function(t,e){var n;if("function"!=typeof e)throw new wi(Y);return t=Ho(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},ko=function(t,e,n){var r,o,i,a,c,s,l=function(e){var n=r,i=o;return r=o=u,v=e,a=t.apply(i,n)},f=function(t){return v=t,c=Zu(b,e),y?l(t):a},h=function(t){var n=t-s;return s===u||n>=e||n<0||g&&t-v>=i},p=function(t){return c=u,m&&r?l(t):(r=o=u,a)},d=function(){var t=Oa(),n=h(t);if(r=arguments,o=this,s=t,n){if(c===u)return f(s);if(g)return Mu(c),c=Zu(b,e),l(s)}return c===u&&(c=Zu(b,e)),a},v=0,y=!1,g=!1,m=!0;if("function"!=typeof t)throw new wi(Y);function b(){var t,n,r=Oa();if(h(r))return p(r);c=Zu(b,(n=e-((t=r)-s),g?nu(n,i-(t-v)):n))}return e=qo(e)||0,Mo(n)&&(y=!!n.leading,i=(g="maxWait"in n)?eu(qo(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m),d.cancel=function(){c!==u&&Mu(c),v=0,r=s=o=c=u},d.flush=function(){return c===u?a:p(Oa())},d},Ao=function(t){if("function"!=typeof t)throw new wi(Y);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},Co=function(t,e){return t===e||t!=t&&e!=e},Po=function(t){return null!=t&&Lo(t.length)&&!Do(t)},To=function(t){return No(t)&&Po(t)},Io=function(t){if(!No(t))return!1;var e=Ye(t);return e==lt||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Uo(t)},Do=function(t){if(!Mo(t))return!1;var e=Ye(t);return e==ft||e==ht||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ro=function(t){return"number"==typeof t&&t==Ho(t)},Lo=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=nt},Mo=function(t){var e=void 0===t?"undefined":i(t);return null!=t&&("object"==e||"function"==e)},No=function(t){return null!=t&&"object"==typeof t},Bo=function(t){return"number"==typeof t||No(t)&&Ye(t)==dt},Uo=function(t){if(!No(t)||Ye(t)!=vt)return!1;var e=Ni(t);if(null===e)return!0;var n=ji.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o(n,n)&&Ei.call(n)==Pi},Fo=function(t){return"string"==typeof t||!Ba(t)&&No(t)&&Ye(t)==bt},Ko=function(t){return"symbol"==(void 0===t?"undefined":i(t))||No(t)&&Ye(t)==wt},$o=function(t){if(!t)return[];if(Po(t))return Fo(t)?q(t):ir(t);if($i&&t[$i])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[$i]());var e=zu(t);return(e==pt?F:e==mt?z:ti)(t)},zo=function(t){return t?(t=qo(t))===et||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Ho=function(t){var e=zo(t),n=e%1;return e==e?n?e-n:e:0},Vo=function(t){return t?ke(Ho(t),0,ot):0},qo=function(t){if("number"==typeof t)return t;if(Ko(t))return rt;if(Mo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Mo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ie.test(t);return n||ae.test(t)?qe(t.slice(2),n?2:8):oe.test(t)?rt:+t},Wo=function(t){return ur(t,Qo(t))},Go=function(t){return null==t?"":Ru(t)},Zo=function(t,e,n){var r=null==t?u:We(t,e);return r===u?n:r},Yo=function(t,e){return null!=t&&Ur(t,e,tn)},Jo=function(t){return Po(t)?ye(t):mn(t)},Qo=function(t){return Po(t)?ye(t,!0):function(t){if(!Mo(t))return function(t){var e=[];if(null!=t)for(var n in gi(t))e.push(n);return e}(t);var e=Gr(t),n=[];for(var r in t)("constructor"!=r||!e&&ji.call(t,r))&&n.push(r);return n}(t)},Xo=function(t,e){if(null==t)return{};var n=v(Tr(t),(function(t){return[t]}));return e=Rr(e),En(t,n,(function(t,n){return e(t,n[0])}))},ti=function(t){return null==t?[]:D(t,Jo(t))},ei=function(t){return gc(Go(t).toLowerCase())},ni=function(t){return(t=Go(t))&&t.replace(se,sn).replace(Le,"")},ri=function(t,e,n){return t=Go(t),(e=n?u:e)===u?(r=t,Ue.test(r)?function(t){return t.match(Ne)||[]}(t):function(t){return t.match(Xt)||[]}(t)):t.match(e)||[];var r},oi=function(t){return function(){return t}},ii=function(t){return t},ui=function(t){return gn("function"==typeof t?t:Ou(t,1))},ai=function(t,e,n){var r=Jo(e),o=He(e,r);null!=n||Mo(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=He(e,Jo(e)));var i=!(Mo(n)&&"chain"in n&&!n.chain),u=Do(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=ir(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ci=function(){},si=function(t){return Hr(t)?j(uo(t)):(e=t,function(t){return We(t,e)});var e},li=function(){return[]},fi=function(){return!1},hi=(e=null==e?Ze:hn.defaults(Ze.Object(),e,hn.pick(Ze,Fe))).Array,pi=e.Date,di=e.Error,vi=e.Function,yi=e.Math,gi=e.Object,mi=e.RegExp,bi=e.String,wi=e.TypeError,_i=hi.prototype,Si=vi.prototype,xi=gi.prototype,Oi=e["__core-js_shared__"],Ei=Si.toString,ji=xi.hasOwnProperty,ki=0,Ai=(n=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ci=xi.toString,Pi=Ei.call(gi),Ti=Ze._,Ii=mi("^"+Ei.call(ji).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Di=Qe?e.Buffer:u,Ri=e.Symbol,Li=e.Uint8Array,Mi=Di?Di.allocUnsafe:u,Ni=K(gi.getPrototypeOf,gi),Bi=gi.create,Ui=xi.propertyIsEnumerable,Fi=_i.splice,Ki=Ri?Ri.isConcatSpreadable:u,$i=Ri?Ri.iterator:u,zi=Ri?Ri.toStringTag:u,Hi=function(){try{var t=Nr(gi,"defineProperty");return t({},"",{}),t}catch(t){}}(),Vi=e.clearTimeout!==Ze.clearTimeout&&e.clearTimeout,qi=pi&&pi.now!==Ze.Date.now&&pi.now,Wi=e.setTimeout!==Ze.setTimeout&&e.setTimeout,Gi=yi.ceil,Zi=yi.floor,Yi=gi.getOwnPropertySymbols,Ji=Di?Di.isBuffer:u,Qi=e.isFinite,Xi=_i.join,tu=K(gi.keys,gi),eu=yi.max,nu=yi.min,ru=pi.now,ou=e.parseInt,iu=yi.random,uu=_i.reverse,au=Nr(e,"DataView"),cu=Nr(e,"Map"),su=Nr(e,"Promise"),lu=Nr(e,"Set"),fu=Nr(e,"WeakMap"),hu=Nr(gi,"create"),pu=fu&&new fu,du={},vu=ao(au),yu=ao(cu),gu=ao(su),mu=ao(lu),bu=ao(fu),wu=Ri?Ri.prototype:u,_u=wu?wu.valueOf:u,Su=wu?wu.toString:u,xu=(r=function(){},function(t){if(!Mo(t))return{};if(Bi)return Bi(t);r.prototype=t;var e=new r;return r.prototype=u,e});function Ou(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Mo(t))return t;var h,p,d,v=Ba(t);if(v){if(p=(h=t).length,d=new h.constructor(p),p&&"string"==typeof h[0]&&ji.call(h,"index")&&(d.index=h.index,d.input=h.input),a=d,!c)return ir(t,a)}else{var y=zu(t),g=y==ft||y==ht;if(Fa(t))return Qn(t,c);if(y==vt||y==ut||g&&!o){if(a=l||g?{}:Fr(t),!c)return l?function(t,e){return ur(t,$u(t),e)}(t,function(t,e){return t&&ur(e,Qo(e),t)}(a,t)):function(t,e){return ur(t,Ku(t),e)}(t,Oe(a,t))}else{if(!ze[y])return o?t:{};a=function(t,e,n){var r,o,i,u=t.constructor;switch(e){case St:return Xn(t);case ct:case st:return new u(+t);case xt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case Ot:case Et:case jt:case kt:case At:case Ct:case Pt:case Tt:case It:return tr(t,n);case pt:return new u;case dt:case bt:return new u(t);case gt:return(i=new(o=t).constructor(o.source,re.exec(o))).lastIndex=o.lastIndex,i;case mt:return new u;case wt:return r=t,_u?gi(_u.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Ha(t)?t.forEach((function(r){a.add(Ou(r,e,n,r,t,i))})):$a(t)&&t.forEach((function(r,o){a.set(o,Ou(r,e,n,o,t,i))}));var b=v?u:(f?l?Tr:Pr:l?Qo:Jo)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,Ou(r,e,n,o,t,i))})),a}k.templateSettings={escape:Ft,evaluate:Kt,interpolate:$t,variable:"",imports:{_:k}},(k.prototype=H.prototype).constructor=k,G.prototype=xu(H.prototype),G.prototype.constructor=G,Z.prototype=xu(H.prototype),Z.prototype.constructor=Z,Zt.prototype.clear=function(){this.__data__=hu?hu(null):{},this.size=0},Zt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Zt.prototype.get=function(t){var e=this.__data__;if(hu){var n=e[t];return n===J?u:n}return ji.call(e,t)?e[t]:u},Zt.prototype.has=function(t){var e=this.__data__;return hu?e[t]!==u:ji.call(e,t)},Zt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hu&&e===u?J:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Fi.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Zt,map:new(cu||he),string:new Zt}},pe.prototype.delete=function(t){var e=Lr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Lr(this,t).get(t)},pe.prototype.has=function(t){return Lr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Lr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},de.prototype.add=de.prototype.push=function(t){return this.__data__.set(t,J),this},de.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(o(n,he)){var r=n.__data__;if(!cu||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(r)}return n.set(t,e),this.size=n.size,this};var Eu=sr(Me),ju=sr(Be,!0);function ku(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Kr),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?ku(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var Au=lr(),Cu=lr(!0);function Pu(t,e,n,r,i){return t===e||(null==t||null==e||!No(t)&&!No(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var c=Ba(t),s=Ba(e),l=c?at:zu(t),f=s?at:zu(e),h=(l=l==ut?vt:l)==vt,p=(f=f==ut?vt:f)==vt,d=l==f;if(d&&Fa(t)){if(!Fa(e))return!1;c=!0,h=!1}if(d&&!h)return a||(a=new ve),c||Va(t)?Ar(t,e,n,r,i,a):function(t,e,n,r,o,i,u){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case St:return!(t.byteLength!=e.byteLength||!i(new Li(t),new Li(e)));case ct:case st:case dt:return Co(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case gt:case bt:return t==e+"";case pt:var a=F;case mt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ar(a(t),a(e),r,o,i,u);return u.delete(t),l;case wt:if(_u)return _u.call(t)==_u.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var v=h&&ji.call(t,"__wrapped__"),y=p&&ji.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,r,a)}}return!!d&&(a||(a=new ve),function(t,e,n,r,i,a){var c=1&n,s=Pr(t),l=s.length;if(l!=Pr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:ji.call(e,h)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(r)var b=c?r(m,g,h,e,t,a):r(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,r,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&o(w,w)&&"function"==typeof _&&o(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,i,a))}(t,e,n,r,Pu,i))}function Tu(t,e,n,r,o){t!==e&&Au(e,(function(i,a){if(o||(o=new ve),Mo(i))!function(t,e,n,r,o,i,a){var c=no(t,n),s=no(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var p=Ba(s),d=!p&&Fa(s),v=!p&&!d&&Va(s);f=s,p||d||v?Ba(c)?f=c:To(c)?f=ir(c):d?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:Uo(s)||Na(s)?(f=c,Na(c)?f=Wo(c):Mo(c)&&!Do(c)||(f=Fr(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Tu,r,o);else{var c=r?r(no(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Qo)}var Iu=pu?function(t,e){return pu.set(t,e),t}:ii,Du=Hi?function(t,e){return Hi(t,"toString",{configurable:!0,enumerable:!1,value:oi(e),writable:!0})}:ii;function Ru(t){if("string"==typeof t)return t;if(Ba(t))return v(t,Ru)+"";if(Ko(t))return Su?Su.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Lu=Pn,Mu=Vi||function(t){return Ze.clearTimeout(t)};function Nu(t,e,n,r,i,a,c,s,l,f){var h=e&tt,p=1&e,d=2&e,v=24&e,y=512&e,g=d?u:pr(t);return function u(){for(var m=arguments.length,b=hi(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Dr(u),S=N(b,_);if(r&&(b=rr(b,r,i,v)),a&&(b=or(b,a,c,v)),m-=S,v&&m<f){var x=$(b,_);return Sr(t,e,Nu,u.placeholder,n,b,x,s,l,f-m)}var O=p?n:this,E=d?O[t]:t;return m=b.length,s?b=eo(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==Ze&&o(this,u)&&(E=g||pr(E)),E.apply(O,b)}}var Bu=lu&&1/z(new lu([,-0]))[1]==et?function(t){return new lu(t)}:ci;function Uu(t,e,n,r,o,i){return Mo(t)&&Mo(e)&&(i.set(e,t),Tu(t,e,u,Uu,i),i.delete(e)),t}var Fu=pu?function(t){return pu.get(t)}:ci,Ku=Yi?function(t){return null==t?[]:(t=gi(t),h(Yi(t),(function(e){return Ui.call(t,e)})))}:li,$u=Yi?function(t){for(var e=[];t;)y(e,Ku(t)),t=Ni(t);return e}:li,zu=Ye;(au&&zu(new au(new ArrayBuffer(1)))!=xt||cu&&zu(new cu)!=pt||su&&zu(su.resolve())!=yt||lu&&zu(new lu)!=mt||fu&&zu(new fu)!=_t)&&(zu=function(t){var e=Ye(t),n=e==vt?t.constructor:u,r=n?ao(n):"";if(r)switch(r){case vu:return xt;case yu:return pt;case gu:return yt;case mu:return mt;case bu:return _t}return e});var Hu,Vu,qu,Wu=Oi?Do:fi,Gu=oo(Iu),Zu=Wi||function(t,e){return Ze.setTimeout(t,e)},Yu=oo(Du),Ju=(Hu=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Vt,(function(t,n,r,o){e.push(r?o.replace(ee,"$1"):n||t)})),e},Vu=Ca(Hu,(function(t){return 500===qu.size&&qu.clear(),t})),qu=Vu.cache,Vu),Qu=Pn((function(t,e){return To(t)?Pe(t,ku(e,1,To,!0)):[]})),Xu=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),Rr(n,2)):[]})),ta=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),u,n):[]})),ea=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?cn(e):[]})),na=Pn((function(t){var e=vo(t),n=v(t,Gn);return e===vo(n)?e=u:n.pop(),n.length&&n[0]===t[0]?cn(n,Rr(e,2)):[]})),ra=Pn((function(t){var e=vo(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?cn(n,u,e):[]})),oa=Pn(yo),ia=Cr((function(t,e){var n=null==t?0:t.length,r=je(t,e);return kn(t,v(e,(function(t){return $r(t,n)?+t:t})).sort(er)),r})),ua=Pn((function(t){return Kn(ku(t,1,To,!0))})),aa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),Kn(ku(t,1,To,!0),Rr(e,2))})),ca=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,Kn(ku(t,1,To,!0),u,e)})),sa=Pn((function(t,e){return To(t)?Pe(t,e):[]})),la=Pn((function(t){return qn(h(t,To))})),fa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),qn(h(t,To),Rr(e,2))})),ha=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,qn(h(t,To),u,e)})),pa=Pn(mo),da=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,bo(t,n)})),va=Cr((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return je(e,t)};return e>1||this.__actions__.length||!o(r,Z)||!$r(n)?this.thru(i):((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:_o,args:[i],thisArg:u}),new G(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ya=ar((function(t,e,n){ji.call(t,n)?++t[n]:Ee(t,n,1)})),ga=dr(lo),ma=dr(fo),ba=ar((function(t,e,n){ji.call(t,n)?t[n].push(e):Ee(t,n,[e])})),wa=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=Po(t)?hi(t.length):[];return Eu(t,(function(t){i[++r]=o?a(e,t,n):pn(t,e,n)})),i})),_a=ar((function(t,e,n){Ee(t,n,e)})),Sa=ar((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),xa=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&zr(t,e[0],e[1])?e=[]:n>2&&zr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,ku(e,1),[])})),Oa=qi||function(){return Ze.Date.now()},Ea=Pn((function(t,e,n){var r=1;if(n.length){var o=$(n,Dr(Ea));r|=X}return Er(t,r,e,n,o)})),ja=Pn((function(t,e,n){var r=3;if(n.length){var o=$(n,Dr(ja));r|=X}return Er(e,r,t,n,o)})),ka=Pn((function(t,e){return Ce(t,1,e)})),Aa=Pn((function(t,e,n){return Ce(t,qo(e)||0,n)}));function Ca(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new wi(Y);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Ca.Cache||pe),n}Ca.Cache=pe;var Pa,Ta=Lu((function(t,e){var n=(e=1==e.length&&Ba(e[0])?v(e[0],I(Rr())):v(ku(e,1),I(Rr()))).length;return Pn((function(r){for(var o=-1,i=nu(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Ia=Pn((function(t,e){var n=$(e,Dr(Ia));return Er(t,X,u,e,n)})),Da=Pn((function(t,e){var n=$(e,Dr(Da));return Er(t,64,u,e,n)})),Ra=Cr((function(t,e){return Er(t,256,u,u,u,e)})),La=_r(Je),Ma=_r((function(t,e){return t>=e})),Na=dn(function(){return arguments}())?dn:function(t){return No(t)&&ji.call(t,"callee")&&!Ui.call(t,"callee")},Ba=hi.isArray,Ua=en?I(en):function(t){return No(t)&&Ye(t)==St},Fa=Ji||fi,Ka=nn?I(nn):function(t){return No(t)&&Ye(t)==st},$a=rn?I(rn):function(t){return No(t)&&zu(t)==pt},za=on?I(on):function(t){return No(t)&&Ye(t)==gt},Ha=un?I(un):function(t){return No(t)&&zu(t)==mt},Va=an?I(an):function(t){return No(t)&&Lo(t.length)&&!!$e[Ye(t)]},qa=_r(bn),Wa=_r((function(t,e){return t<=e})),Ga=cr((function(t,e){if(Gr(e)||Po(e))ur(e,Jo(e),t);else for(var n in e)ji.call(e,n)&&_e(t,n,e[n])})),Za=cr((function(t,e){ur(e,Qo(e),t)})),Ya=cr((function(t,e,n,r){ur(e,Qo(e),t,r)})),Ja=cr((function(t,e,n,r){ur(e,Jo(e),t,r)})),Qa=Cr(je),Xa=Pn((function(t,e){t=gi(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&zr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Qo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||Co(f,xi[l])&&!ji.call(t,l))&&(t[l]=i[l])}return t})),tc=Pn((function(t){return t.push(u,Uu),a(ic,u,t)})),ec=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),t[e]=n}),oi(ii)),nc=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),ji.call(t,e)?t[e].push(n):t[e]=[n]}),Rr),rc=Pn(pn),oc=cr((function(t,e,n){Tu(t,e,n)})),ic=cr((function(t,e,n,r){Tu(t,e,n,r)})),uc=Cr((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Yn(e,t),r||(r=e.length>1),e})),ur(t,Tr(t),n),r&&(n=Ou(n,7,kr));for(var o=e.length;o--;)$n(n,e[o]);return n})),ac=Cr((function(t,e){return null==t?{}:En(n=t,e,(function(t,e){return Yo(n,e)}));var n})),cc=Or(Jo),sc=Or(Qo),lc=hr((function(t,e,n){return e=e.toLowerCase(),t+(n?ei(e):e)})),fc=hr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),hc=hr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),pc=fr("toLowerCase"),dc=hr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),vc=hr((function(t,e,n){return t+(n?" ":"")+gc(e)})),yc=hr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),gc=fr("toUpperCase"),mc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return Io(t)?t:new di(t)}})),bc=Cr((function(t,e){return s(e,(function(e){e=uo(e),Ee(t,e,Ea(t[e],t))})),t})),wc=vr(),_c=vr(!0),Sc=Pn((function(t,e){return function(n){return pn(n,t,e)}})),xc=Pn((function(t,e){return function(n){return pn(t,n,e)}})),Oc=mr(v),Ec=mr(f),jc=mr(b),kc=wr(),Ac=wr(!0),Cc=gr((function(t,e){return t+e}),0),Pc=xr("ceil"),Tc=gr((function(t,e){return t/e}),1),Ic=xr("floor"),Dc=gr((function(t,e){return t*e}),1),Rc=xr("round"),Lc=gr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new wi(Y);return t=Ho(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=Eo,k.assign=Ga,k.assignIn=Za,k.assignInWith=Ya,k.assignWith=Ja,k.at=Qa,k.before=jo,k.bind=Ea,k.bindAll=bc,k.bindKey=ja,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ba(t)?t:[t]},k.chain=wo,k.chunk=function(t,e,n){e=(n?zr(t,e,n):e===u)?1:eu(Ho(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=hi(Gi(r/e));o<r;)a[i++]=Ln(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=hi(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Ba(n)?ir(n):[n],ku(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Rr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new wi(Y);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=Ou(t,1),n=Jo(e),function(t){return Ae(t,e,n)};var e,n},k.constant=oi,k.countBy=ya,k.create=function(t,e){var n=xu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=Er(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=Er(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=ko,k.defaults=Xa,k.defaultsDeep=tc,k.defer=ka,k.delay=Aa,k.difference=Qu,k.differenceBy=Xu,k.differenceWith=ta,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,e<0?0:e,r)):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,0,(e=r-e)<0?0:e)):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&zr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Ho(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:Ho(r))<0&&(r+=o),r=n>r?0:Vo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Ba(t)?h:De)(t,Rr(e,3))},k.flatMap=function(t,e){return ku(Oo(t,e),1)},k.flatMapDeep=function(t,e){return ku(Oo(t,e),et)},k.flatMapDepth=function(t,e,n){return n=n===u?1:Ho(n),ku(Oo(t,e),n)},k.flatten=ho,k.flattenDeep=function(t){return null!=t&&t.length?ku(t,et):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?ku(t,e=e===u?1:Ho(e)):[]},k.flip=function(t){return Er(t,512)},k.flow=wc,k.flowRight=_c,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:He(t,Jo(t))},k.functionsIn=function(t){return null==t?[]:He(t,Qo(t))},k.groupBy=ba,k.initial=function(t){return null!=t&&t.length?Ln(t,0,-1):[]},k.intersection=ea,k.intersectionBy=na,k.intersectionWith=ra,k.invert=ec,k.invertBy=nc,k.invokeMap=wa,k.iteratee=ui,k.keyBy=_a,k.keys=Jo,k.keysIn=Qo,k.map=Oo,k.mapKeys=function(t,e){var n={};return e=Rr(e,3),Me(t,(function(t,r,o){Ee(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Rr(e,3),Me(t,(function(t,r,o){Ee(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(Ou(t,1))},k.matchesProperty=function(t,e){return Sn(t,Ou(e,1))},k.memoize=Ca,k.merge=oc,k.mergeWith=ic,k.method=Sc,k.methodOf=xc,k.mixin=ai,k.negate=Ao,k.nthArg=function(t){return t=Ho(t),Pn((function(e){return xn(e,t)}))},k.omit=uc,k.omitBy=function(t,e){return Xo(t,Ao(Rr(e)))},k.once=function(t){return jo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Ba(e)||(e=null==e?[]:[e]),Ba(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=Oc,k.overArgs=Ta,k.overEvery=Ec,k.overSome=jc,k.partial=Ia,k.partialRight=Da,k.partition=Sa,k.pick=ac,k.pickBy=Xo,k.property=si,k.propertyOf=function(t){return function(e){return null==t?u:We(t,e)}},k.pull=oa,k.pullAll=yo,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,Rr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,u,n):t},k.pullAt=ia,k.range=kc,k.rangeRight=Ac,k.rearg=Ra,k.reject=function(t,e){return(Ba(t)?h:De)(t,Ao(Rr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Rr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=e===u?e:Ho(e),Pn(t,e)},k.reverse=go,k.sampleSize=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),(Ba(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Dn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Dn(t,e,n,r)},k.shuffle=function(t){return(Ba(t)?be:Rn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&zr(t,e,n)?(e=0,n=r):(e=null==e?0:Ho(e),n=n===u?r:Ho(n)),Ln(t,e,n)):[]},k.sortBy=xa,k.sortedUniq=function(t){return t&&t.length?Un(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?Un(t,Rr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&zr(t,e,n)&&(e=n=u),(n=n===u?ot:n>>>0)?(t=Go(t))&&("string"==typeof e||null!=e&&!za(e))&&!(e=Ru(e))&&U(t)?Jn(q(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=null==e?0:eu(Ho(e),0),Pn((function(n){var r=n[e],o=Jn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Ln(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?(e=n||e===u?1:Ho(e),Ln(t,0,e<0?0:e)):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,(e=r-e)<0?0:e,r)):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new wi(Y);return Mo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ko(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=_o,k.toArray=$o,k.toPairs=cc,k.toPairsIn=sc,k.toPath=function(t){return Ba(t)?v(t,uo):Ko(t)?[t]:ir(Ju(Go(t)))},k.toPlainObject=Wo,k.transform=function(t,e,n){var r=Ba(t),o=r||Fa(t)||Va(t);if(e=Rr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Mo(t)&&Do(i)?xu(Ni(t)):{}}return(o?s:Me)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return Eo(t,1)},k.union=ua,k.unionBy=aa,k.unionWith=ca,k.uniq=function(t){return t&&t.length?Kn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Kn(t,Rr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Kn(t,u,e):[]},k.unset=function(t,e){return null==t||$n(t,e)},k.unzip=mo,k.unzipWith=bo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=ti,k.valuesIn=function(t){return null==t?[]:D(t,Qo(t))},k.without=sa,k.words=ri,k.wrap=function(t,e){return Ia(Zn(e),t)},k.xor=la,k.xorBy=fa,k.xorWith=ha,k.zip=pa,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Dn)},k.zipWith=da,k.entries=cc,k.entriesIn=sc,k.extend=Za,k.extendWith=Ya,ai(k,k),k.add=Cc,k.attempt=mc,k.camelCase=lc,k.capitalize=ei,k.ceil=Pc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=qo(n))==n?n:0),e!==u&&(e=(e=qo(e))==e?e:0),ke(qo(t),e,n)},k.clone=function(t){return Ou(t,4)},k.cloneDeep=function(t){return Ou(t,5)},k.cloneDeepWith=function(t,e){return Ou(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return Ou(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Jo(e))},k.deburr=ni,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=Tc,k.endsWith=function(t,e,n){t=Go(t),e=Ru(e);var r=t.length,o=n=n===u?r:ke(Ho(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=Co,k.escape=function(t){return(t=Go(t))&&Ut.test(t)?t.replace(Nt,ln):t},k.escapeRegExp=function(t){return(t=Go(t))&&Wt.test(t)?t.replace(qt,"\\$&"):t},k.every=function(t,e,n){var r=Ba(t)?f:Te;return n&&zr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.find=ga,k.findIndex=lo,k.findKey=function(t,e){return w(t,Rr(e,3),Me)},k.findLast=ma,k.findLastIndex=fo,k.findLastKey=function(t,e){return w(t,Rr(e,3),Be)},k.floor=Ic,k.forEach=So,k.forEachRight=xo,k.forIn=function(t,e){return null==t?t:Au(t,Rr(e,3),Qo)},k.forInRight=function(t,e){return null==t?t:Cu(t,Rr(e,3),Qo)},k.forOwn=function(t,e){return t&&Me(t,Rr(e,3))},k.forOwnRight=function(t,e){return t&&Be(t,Rr(e,3))},k.get=Zo,k.gt=La,k.gte=Ma,k.has=function(t,e){return null!=t&&Ur(t,e,Xe)},k.hasIn=Yo,k.head=po,k.identity=ii,k.includes=function(t,e,n,r){t=Po(t)?t:ti(t),n=n&&!r?Ho(n):0;var o=t.length;return n<0&&(n=eu(o+n,0)),Fo(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=zo(e),n===u?(n=e,e=0):n=zo(n),(r=t=qo(t))>=nu(o=e,i=n)&&r<eu(o,i);var r,o,i},k.invoke=rc,k.isArguments=Na,k.isArray=Ba,k.isArrayBuffer=Ua,k.isArrayLike=Po,k.isArrayLikeObject=To,k.isBoolean=function(t){return!0===t||!1===t||No(t)&&Ye(t)==ct},k.isBuffer=Fa,k.isDate=Ka,k.isElement=function(t){return No(t)&&1===t.nodeType&&!Uo(t)},k.isEmpty=function(t){if(null==t)return!0;if(Po(t)&&(Ba(t)||"string"==typeof t||"function"==typeof t.splice||Fa(t)||Va(t)||Na(t)))return!t.length;var e=zu(t);if(e==pt||e==mt)return!t.size;if(Gr(t))return!mn(t).length;for(var n in t)if(ji.call(t,n))return!1;return!0},k.isEqual=function(t,e){return Pu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?Pu(t,e,u,n):!!r},k.isError=Io,k.isFinite=function(t){return"number"==typeof t&&Qi(t)},k.isFunction=Do,k.isInteger=Ro,k.isLength=Lo,k.isMap=$a,k.isMatch=function(t,e){return t===e||vn(t,e,Mr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Mr(e),n)},k.isNaN=function(t){return Bo(t)&&t!=+t},k.isNative=function(t){if(Wu(t))throw new di("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=Bo,k.isObject=Mo,k.isObjectLike=No,k.isPlainObject=Uo,k.isRegExp=za,k.isSafeInteger=function(t){return Ro(t)&&t>=-9007199254740991&&t<=nt},k.isSet=Ha,k.isString=Fo,k.isSymbol=Ko,k.isTypedArray=Va,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return No(t)&&zu(t)==_t},k.isWeakSet=function(t){return No(t)&&"[object WeakSet]"==Ye(t)},k.join=function(t,e){return null==t?"":Xi.call(t,e)},k.kebabCase=fc,k.last=vo,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=Ho(n))<0?eu(r+o,0):nu(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=hc,k.lowerFirst=pc,k.lt=qa,k.lte=Wa,k.max=function(t){return t&&t.length?Ie(t,ii,Je):u},k.maxBy=function(t,e){return t&&t.length?Ie(t,Rr(e,2),Je):u},k.mean=function(t){return E(t,ii)},k.meanBy=function(t,e){return E(t,Rr(e,2))},k.min=function(t){return t&&t.length?Ie(t,ii,bn):u},k.minBy=function(t,e){return t&&t.length?Ie(t,Rr(e,2),bn):u},k.stubArray=li,k.stubFalse=fi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Dc,k.nth=function(t,e){return t&&t.length?xn(t,Ho(e)):u},k.noConflict=function(){return Ze._===this&&(Ze._=Ti),this},k.noop=ci,k.now=Oa,k.pad=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return br(Zi(o),n)+t+br(Gi(o),n)},k.padEnd=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?t+br(e-r,n):t},k.padStart=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?br(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ou(Go(t).replace(Gt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&zr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=zo(t),e===u?(e=t,t=0):e=zo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=iu();return nu(t+o*(e-t+Ve("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Ba(t)?g:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,Eu)},k.reduceRight=function(t,e,n){var r=Ba(t)?m:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,ju)},k.repeat=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),Cn(Go(t),e)},k.replace=function(){var t=arguments,e=Go(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Yn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[uo(e[r])];i===u&&(r=o,i=n),t=Do(i)?i.call(t):i}return t},k.round=Rc,k.runInContext=t,k.sample=function(t){return(Ba(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(Po(t))return Fo(t)?V(t):t.length;var e=zu(t);return e==pt||e==mt?t.size:mn(t).length},k.snakeCase=dc,k.some=function(t,e,n){var r=Ba(t)?b:Mn;return n&&zr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.sortedIndex=function(t,e){return Nn(t,e)},k.sortedIndexBy=function(t,e,n){return Bn(t,e,Rr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Nn(t,e);if(r<n&&Co(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Nn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Bn(t,e,Rr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Nn(t,e,!0)-1;if(Co(t[n],e))return n}return-1},k.startCase=vc,k.startsWith=function(t,e,n){return t=Go(t),n=null==n?0:ke(Ho(n),0,t.length),e=Ru(e),t.slice(n,n+e.length)==e},k.subtract=Lc,k.sum=function(t){return t&&t.length?C(t,ii):0},k.sumBy=function(t,e){return t&&t.length?C(t,Rr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&zr(t,e,n)&&(e=u),t=Go(t),e=Ya({},e,r,jr);var o,i,a=Ya({},e.imports,r.imports,jr),c=Jo(a),s=D(a,c),l=0,f=e.interpolate||le,h="__p += '",p=mi((e.escape||le).source+"|"+f.source+"|"+(f===$t?ne:le).source+"|"+(e.evaluate||le).source+"|$","g"),d="//# sourceURL="+(ji.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";t.replace(p,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(fe,B),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=ji.call(e,"variable")&&e.variable;if(v){if(te.test(v))throw new di("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Dt,""):h).replace(Rt,"$1").replace(Lt,"$1;"),h="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")+h+"return __p\n}";var y=mc((function(){return vi(c,d+"return "+h).apply(u,s)}));if(y.source=h,Io(y))throw y;return y},k.times=function(t,e){if((t=Ho(t))<1||t>nt)return[];var n=ot,r=nu(t,ot);e=Rr(e),t-=ot;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=zo,k.toInteger=Ho,k.toLength=Vo,k.toLower=function(t){return Go(t).toLowerCase()},k.toNumber=qo,k.toSafeInteger=function(t){return t?ke(Ho(t),-9007199254740991,nt):0===t?t:0},k.toString=Go,k.toUpper=function(t){return Go(t).toUpperCase()},k.trim=function(t,e,n){if((t=Go(t))&&(n||e===u))return T(t);if(!t||!(e=Ru(e)))return t;var r=q(t),o=q(e),i=L(r,o),a=M(r,o)+1;return Jn(r,i,a).join("")},k.trimEnd=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.slice(0,W(t)+1);if(!t||!(e=Ru(e)))return t;var r=q(t),o=M(r,q(e))+1;return Jn(r,0,o).join("")},k.trimStart=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.replace(Gt,"");if(!t||!(e=Ru(e)))return t;var r=q(t),o=L(r,q(e));return Jn(r,o).join("")},k.truncate=function(t,e){var n=30,r="...";if(Mo(e)){var o="separator"in e?e.separator:o;n="length"in e?Ho(e.length):n,r="omission"in e?Ru(e.omission):r}var i=(t=Go(t)).length;if(U(t)){var a=q(t);i=a.length}if(n>=i)return t;var c=n-V(r);if(c<1)return r;var s=a?Jn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),za(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=mi(o.source,Go(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(Ru(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},k.unescape=function(t){return(t=Go(t))&&Bt.test(t)?t.replace(Mt,fn):t},k.uniqueId=function(t){var e=++ki;return Go(t)+e},k.upperCase=yc,k.upperFirst=gc,k.each=So,k.eachRight=xo,k.first=po,ai(k,(Pa={},Me(k,(function(t,e){ji.call(k.prototype,e)||(Pa[e]=t)})),Pa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){Z.prototype[t]=function(n){n=n===u?1:eu(Ho(n),0);var r=this.__filtered__&&!e?new Z(this):this.clone();return r.__filtered__?r.__takeCount__=nu(n,r.__takeCount__):r.__views__.push({size:nu(n,ot),type:t+(r.__dir__<0?"Right":"")}),r},Z.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Z.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Rr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Z.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Z.prototype[t]=function(){return this.__filtered__?new Z(this):this[n](1)}})),Z.prototype.compact=function(){return this.filter(ii)},Z.prototype.find=function(t){return this.filter(t).head()},Z.prototype.findLast=function(t){return this.reverse().find(t)},Z.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new Z(this):this.map((function(n){return pn(n,t,e)}))})),Z.prototype.reject=function(t){return this.filter(Ao(Rr(t)))},Z.prototype.slice=function(t,e){t=Ho(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Z(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=Ho(e))<0?n.dropRight(-e):n.take(e-t)),n)},Z.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Z.prototype.toArray=function(){return this.take(ot)},Me(Z.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=k[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=r?[1]:arguments,s=o(e,Z),l=c[0],f=s||Ba(e),h=function(t){var e=i.apply(k,y([t],c));return r&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,v=a&&!p,g=s&&!d;if(!a&&f){e=g?e:new Z(this);var m=t.apply(e,c);return m.__actions__.push({func:_o,args:[h],thisArg:u}),new G(m,p)}return v&&g?t.apply(this,c):(m=this.thru(h),v?r?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_i[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ba(o)?o:[],t)}return this[n]((function(n){return e.apply(Ba(n)?n:[],t)}))}})),Me(Z.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";ji.call(du,r)||(du[r]=[]),du[r].push({name:e,func:n})}})),du[Nu(u,2).name]=[{name:"wrapper",func:u}],Z.prototype.clone=function(){var t=new Z(this.__wrapped__);return t.__actions__=ir(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ir(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ir(this.__views__),t},Z.prototype.reverse=function(){if(this.__filtered__){var t=new Z(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Z.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ba(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=nu(e,t+u);break;case"takeRight":t=eu(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,p=nu(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Vn(t,this.__actions__);var d=[];t:for(;c--&&h<p;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},k.prototype.at=va,k.prototype.chain=function(){return wo(this)},k.prototype.commit=function(){return new G(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=$o(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;o(n,H);){var r=so(n);r.__index__=0,r.__values__=u,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(o(t,Z)){var e=t;return this.__actions__.length&&(e=new Z(this)),(e=e.reverse()).__actions__.push({func:_o,args:[go],thisArg:u}),new G(e,this.__chain__)}return this.thru(go)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,$i&&(k.prototype[$i]=function(){return this}),k}();Ze._=hn,(r=function(){return hn}.call(e,n,e,t))===u||(t.exports=r)}).call(this)},980:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var o,u,a=e&&(o=e.prototype,null!=(u=i)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](o):c(o,u))?e:i,s=Object.create(a.prototype),l=new d(r||[]);return s._invoke=f(t,n,l),s},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t,e,n){var r=x;return function(i,u){if(r===E)throw new Error("Generator is already running");if(r===j){if("throw"===i)throw u;return y()}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=I(a,n);if(c){if(c===k)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===x)throw r=j,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=E;var s=o(t,e,n);if("normal"===s.type){if(r=n.done?j:O,s.arg===k)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=j,n.method="throw",n.arg=s.arg)}}},h=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},p=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},d=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)},v=function(t){if(t){var n=t[w];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(m.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:y}},y=function(){return{value:e,done:!0}},g=Object.prototype,m=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",_=b.asyncIterator||"@@asyncIterator",S=b.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var x="suspendedStart",O="suspendedYield",E="executing",j="completed",k={},A={};n(A,w,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(v([])));P&&P!==g&&m.call(P,w)&&(A=P);var T=a.prototype=i.prototype=Object.create(A);function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,k;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,k):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=a,n(T,"constructor",a),n(a,"constructor",u),u.displayName=n(a,S,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,S,"GeneratorFunction")),t.prototype=Object.create(T),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,_,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(T),n(T,S,"Generator"),n(T,w,(function(){return this})),n(T,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=v,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(p),!t)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),k},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:v(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),k}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},584:function(t,e,n){var r=n(518).R;e.s=function(t){if(t||(t=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,t)}},518:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},641:function(t,e,n){var r=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),d=new p(o||[]);return h._invoke=(a=t,c=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(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===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?E:x,o.arg===j)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,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,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){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(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];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=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e](r,r.exports,c),r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){var n=function(){this.constructor=t};Y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,et)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Q.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},d=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(t){return!1}},v=function(t,e){return!e||"object"!==At(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),xt(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(Z().mark((function t(e){var r,i;return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,Ot.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(Pt)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,Ot.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Tt(n,r,e,o)}),(function(t){throw new Tt(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new at((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Mt<Date.now()-6e4||!Lt.getState().loaded)&&x(),new at((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Lt.getState()),Lt.subscribe(n)}))},S=function(){return(Mt<Date.now()-6e4||!Lt.getState().loaded)&&x(),Lt},x=function(){return new Promise((function(t,e){Mt=Date.now(),g(Pt).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Lt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,Rt.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Lt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(t,e){return n=t,e.privileges.find((function(t){return n===t.display}))||e.roles.find((function(t){return"System Developer"===t.display}));var n},j=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Lt.getState()),t||(e=Lt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Nt.apply(this,arguments)},C=function(){(0,Ot.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Ot.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Ot.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Ot.validators.isUrl]},errors:{_type:Ot.Type.Array,_default:[401],_elements:{_type:Ot.Type.Number,_validators:[Ot.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Ot.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Dt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?Zt:e.lift(new Yt(t))}},D=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Qt(t,e))}},R=function(t,e,n){var r=null!=n?n:te;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(D((function(t){return t})))},L=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},N=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},B=function(){return m("/ws/rest/v1/visittype").pipe(D((function(t){return t.data.results.map(N)}))).pipe(I(1))},U=function(t){return{uuid:t.uuid,display:t.display}},F=function(){return m("/ws/rest/v1/location").pipe(D((function(t){return t.data.results.map(U)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Tt},VisitMode:function(){return Bt},VisitStatus:function(){return Ut},backendDependencies:function(){return ne},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return te},fetchCurrentPatient:function(){return T},fhir:function(){return Dt},fhirBaseUrl:function(){return It},getCurrentUser:function(){return _},getLocations:function(){return F},getLoggedInUser:function(){return j},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return ee},getVisitTypes:function(){return B},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return L},sessionEndpoint:function(){return Pt},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return M},userHasAccess:function(){return E}});var K,$,z,H,V,q,W,G=c(602),Z=c.n(G),Y=function(t,e){return(Y=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},J=!1,Q={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,J=t},get useDeprecatedSynchronousErrorHandling(){return J}},X={closed:!0,next:function(t){},error:function(t){if(Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},tt=Array.isArray||function(t){return t&&"number"==typeof t.length},et=(K=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},K.prototype=Object.create(Error.prototype),K),nt=(W=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)},W.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,a=o._ctorUnsubscribe,c=o._unsubscribe,s=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,W))i.remove(this);else if(null!==i)for(var l=0;l<i.length;++l)i[l].remove(this);if(e(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){t=r(e,et)?u(e.errors):[e]}}if(tt(s)){l=-1;for(var f=s.length;++l<f;){var h=s[l];if(null!==(n=h)&&"object"==typeof n)try{h.unsubscribe()}catch(e){t=t||[],r(e,et)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new et(t)}},W.prototype.add=function(t){var e=t;if(!t)return W.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new W(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,W)){var n=e;(e=new W)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=e._parentOrParents;if(null===i)e._parentOrParents=this;else if(r(i,W)){if(i===this)return e;e._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return e;i.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[e]:u.push(e),e},W.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},W.EMPTY=((q=new W).closed=!0,q),W),rt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ot=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=X;break;case 1:if(!t){u.destination=X;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new it(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new it(u,t,o,i)}return u}return t(n,e),n.prototype[rt]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(nt),it=(z=function(t,n,r,o){var i,u=$.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==X&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,$=ot),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Q.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!Q.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Q.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ut="function"==typeof Symbol&&Symbol.observable||"@@observable",at=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,ot))return t;if(t[rt])return t[rt]()}return t||e||n?new ot(t,e,n):new ot(X)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Q.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Q.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Q.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,ot)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ut]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,st="object"==typeof self&&self&&self.Object===Object&&self,lt=(ct||st||Function("return this")()).Symbol,ft=Object.prototype,ht=ft.hasOwnProperty,pt=ft.toString,dt=lt?lt.toStringTag:void 0,vt=Object.prototype.toString,yt=lt?lt.toStringTag:void 0,gt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),mt=Function.prototype,bt=Object.prototype,wt=mt.toString,_t=bt.hasOwnProperty,St=wt.call(Object),xt=function(t){if(null==(o=t)||"object"!=typeof o||"[object Object]"!=(null==(e=t)?void 0===e?"[object Undefined]":"[object Null]":yt&&yt in Object(e)?function(t){var e=ht.call(t,dt),n=t[dt];try{t[dt]=void 0;var r=!0}catch(t){}var o=pt.call(t);return r&&(e?t[dt]=n:delete t[dt]),o}(e):(n=e,vt.call(n))))return!1;var e,n,o,i=gt(t);if(null===i)return!0;var u=_t.call(i,"constructor")&&i.constructor;return"function"==typeof u&&r(u,u)&&wt.call(u)==St},Ot=c(824);function Et(t,e,n){return Et=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&kt(o,n.prototype),o},Et.apply(null,arguments)}function jt(t){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kt(t,e){return(kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var At=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function Ct(t){var e="function"==typeof Map?new Map:void 0;return Ct=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Et(t,arguments,jt(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),kt(r,t)},Ct(t)}var Pt="/ws/rest/v1/session",Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}(i,t);var e,n,o=(e=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(t){return!1}}(),function(){var t,r=jt(e);if(n){var o=jt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(Ct(Error)),It="/ws/fhir2/R4",Dt={read:function(t){var e,n;return g((n={url:"".concat(It,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},Rt=c(254),Lt=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Mt=0;function Nt(){return(Nt=w(Z().mark((function t(e,n){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(Pt,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Bt,Ut,Ft,Kt,$t=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),zt=function(e){var n=function(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 t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(nt),Ht=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(ot),Vt=function(e){var n=function(){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[rt]=function(){return new Ht(this)},n.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new $t;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new $t;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new $t;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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 $t;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new $t;return this.hasError?(t.error(this.thrownError),nt.EMPTY):this.isStopped?(t.complete(),nt.EMPTY):(this.observers.push(t),new zt(this,t))},n.prototype.asObservable=function(){var t=new at;return t.source=this,t},n.create=function(t,e){return new qt(t,e)},n}(at),qt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):nt.EMPTY},n}(Vt),Wt=function(e){var n=function(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 $t;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Vt),Gt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),Zt=new at((function(t){return t.complete()})),Yt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Gt};return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.total))},t}(),Jt=function(e){var n=function(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(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(ot),Qt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.project,this.thisArg))},t}(),Xt=function(e){var n=function(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(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(ot),te="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)",ee=new Wt(null);(Ft=Bt||(Bt={})).NEWVISIT="startVisit",Ft.EDITVISIT="editVisit",Ft.LOADING="loadingVisit",(Kt=Ut||(Ut={})).NOTSTARTED="notStarted",Kt.ONGOING="ongoing";var ne={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},66:function(){var t=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.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](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?d(e.matcher):d(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return h(l(),t)};function d(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return d(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",d="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,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(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},78:function(){var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=function(t,e){return st(t,e,n.slice(),r.slice())},u=o(t);return!a((function(t,e){return!a(i,e,t)}),o(e),u)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},h=function(t,e,n,r){return t["@@transducer/result"](n[r](bt(t["@@transducer/step"],t),e))},p=function(t){return"[object Object]"===Object.prototype.toString.call(t)},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Tt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Tt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Tt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},E=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=K(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(F(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=j(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=j(h.value,2),v=d[0];U(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return E({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:E({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Bt(dt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=j(a.value,2);n=z([n,Ut(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Nt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},D=function(t,e){Ft(t,e);var n=Dt.getState();Dt.setState({schemas:E({},n.schemas,O({},t,e))})},R=function(t,e){Ft(t,e);var n=Dt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Dt.setState({schemas:E({},n.schemas,O({},t,e))})},L=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Dt.getState();Dt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},M=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},N=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=zt(t,e,r);return $t(t,o,n),o},B=function(t,e,n,r,o,i){var u,a,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=F(o,i),d=$(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(h,p),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=zt(g,y,o.devDefaultsAreOn);return $t(g,m,h),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},F=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},K=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=$(t,F(e,n));H(r,o,t);var i=zt(r,o,e.devDefaultsAreOn);return $t(r,i,t),delete i.extensionSlots,i},$=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return _t(Ot)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Kt(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:Et,Boolean:jt,ConceptUuid:Pt,Number:kt,Object:Ct,String:At,UUID:Pt,PersonAttributeTypeUuid:Pt,PatientIdentifierTypeUuid:Pt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(e,n);o.startsWith(r)?(0,Ht.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return ht},configExtensionStore:function(){return Mt},configInternalStore:function(){return Dt},defineConfigSchema:function(){return D},defineExtensionConfigSchema:function(){return R},getConfig:function(){return M},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Nt},inRange:function(){return Vt},interpolateString:function(){return J},interpolateUrl:function(){return Y},isUrl:function(){return Wt},isUrlWithTemplateParameters:function(){return qt},navigate:function(){return Q},oneOf:function(){return Gt},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Lt},validator:function(){return d},validators:function(){return Zt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!c(d,n)||!st(n[d],e[d],h,p))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])}));function ft(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?ft(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ht,pt,dt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():ft(t,[],[],!0)})),vt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},yt=n((function(t){return!!vt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),gt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),mt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),bt=mt,wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t=l((function(t,e,n){if("function"==typeof t&&(t=new gt(t)),yt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return h(t,e,n,"fantasy-land/reduce");if(null!=n[wt])return f(t,e,n[wt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return h(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),St=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),xt=l((function t(e,n,r){return St((function(n,r,o){return p(r)&&p(o)?t(e,r,o):e(n,r,o)}),n,r)})),Ot=r((function(t,e){return xt((function(t,e,n){return n}),t,e)}));(pt=ht||(ht={})).Array="Array",pt.Boolean="Boolean",pt.ConceptUuid="ConceptUuid",pt.Number="Number",pt.Object="Object",pt.String="String",pt.UUID="UUID",pt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",pt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Et=d((function(t){return Array.isArray(t)}),"must be an array"),jt=d((function(t){return"boolean"==typeof t}),"must be a boolean"),kt=d((function(t){return"number"==typeof t}),"must be a number"),At=d((function(t){return"string"==typeof t}),"must be a string"),Ct=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Pt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Tt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Dt=(0,Tt.createGlobalStore)("config-internal",It),Rt=v();Dt.subscribe((function(t){var e;t.devDefaultsAreOn!=Rt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Rt=t.devDefaultsAreOn)}));var Lt=(0,Tt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Lt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Mt=(0,Tt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Nt=(0,Tt.createGlobalStore)("config-implementer-tools",{config:{}});function Bt(t){return t.hasOwnProperty("_default")?E({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Bt(t[n]),e}),{}):{}}function Ut(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=Ut(t[r],e),n}),{}):{_value:t,_source:e}}function Ft(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ft(t,c,a);var s=c._elements;if(W(s)&&Ft(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=c._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(ht).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ht).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ht.Array,ht.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Kt(t,e,n){V(n,t._type,e),G(e)?t._type===ht.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===ht.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Kt(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function $t(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ht.Object&&t._elements?$t(t._elements,s,l):$t(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)$t(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return C(t,Lt.getState())})),Lt.subscribe((function(t){return C(Dt.getState(),t)})),T(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return T(t,Lt.getState())})),Lt.subscribe((function(t){return T(Dt.getState(),t)})),P(Dt.getState(),Lt.getState()),Dt.subscribe((function(t){return P(t,Lt.getState())})),Lt.subscribe((function(t){return P(Dt.getState(),t)})),I(Dt.getState(),Mt.getState(),Lt.getState()),Dt.subscribe((function(t){I(t,Mt.getState(),Lt.getState())})),Mt.subscribe((function(t){I(Dt.getState(),t,Lt.getState())})),Lt.subscribe((function(t){I(Dt.getState(),Mt.getState(),t)}));var zt=function(t,e,n){var r=dt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ht.Array&&Array.isArray(u)){var l=u.map((function(t){return zt(s,t,n)}));r[i]=l}else if(a._type===ht.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=zt(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=zt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Ht=i(645),Vt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},qt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Wt=qt([]),Gt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:Vt,isUrl:Wt,isUrlWithTemplateParameters:qt,oneOf:Gt}}(),u}())}}}))},674:function(){System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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 t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});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}())}}}))},103:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},a=function(t){window.dispatchEvent(new CustomEvent(d,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",d="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},991:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.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:function(t){"use strict";t.exports=p},740:function(t){"use strict";t.exports=d},685:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=y},954:function(t){"use strict";t.exports=g},493:function(t){"use strict";t.exports=m},281:function(t){"use strict";t.exports=b},792:function(t){"use strict";t.exports=w}},S={};function x(t){var e=S[t];if(void 0!==e)return e.exports;var n=S[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,x),n.loaded=!0,n.exports}x.y=i,x.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return x.d(e,{a:e}),e},x.d=function(t,e){for(var n in e)x.o(e,n)&&!x.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),x.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},x.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},x.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;x.g.importScripts&&(t=x.g.location+"");var e=x.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=t}();var O={};return(0,x(584).s)(1),function(){"use strict";var r=function(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,Rr.appendChild(n))},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(t){return!1}},p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},d=function(t,e,n){var r=m(t,e,n);$o.length?$o.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))},v=function(t){if("function"!=typeof t)throw Error(g(28,!1));$o.push(t)},y=function(t){if("function"!=typeof t)throw Error(g(29,!1));var e=!1;return $o=$o.filter((function(n){var r=n===t;return e=e||r,!r})),e},g=function(t,e){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(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},m=function(t,e,n){var r,o,i,u="".concat(E(e)," '").concat(S(e),"' died in status ").concat(e.status,": ");if(o=t,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):c(o,i)){try{t.message=u+t.message}catch(t){}r=t}else{console.warn(g(30,!1,e.status,S(e)));try{r=Error(u+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=S(e),e.status=n,r},b=function(t){return t.status===Zo},w=function(t){try{return t.activeWhen(window.location)}catch(e){return d(e,t,Xo),!1}},S=function(t){return t.name},O=function(t){return Boolean(t.unmountThisParcel)},E=function(t){return O(t)?"parcel":"application"},j=function(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]},k=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},A=function(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!k(e,(function(t){return"function"!=typeof t}))));var e},C=function(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(t),o=S(t);return function(t){return n.reduce((function(n,i,u){return n.then((function(){var n=i(t);return P(n)?n:Promise.reject(g(15,!1,r,o,e,u))}))}),Promise.resolve())}},P=function(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch},T=function(t,e){var n=function(){return t.status=Wo,t};return Promise.resolve().then((function(){return t.status!==Vo?t:(t.status=qo,t.bootstrap?$(t,"bootstrap").then(n).catch((function(n){if(e)throw m(n,t,Xo);return d(n,t,Xo),t})):Promise.resolve().then(n))}))},I=function(t,e){return Promise.resolve().then((function(){var n=function(){return $(t,"unmount").then((function(){t.status=Wo})).catch((function(n){if(e)throw m(n,t,Xo);d(n,t,Xo)}))};if(t.status!==Zo)return t;t.status=Jo;var r=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(e)throw m(n,t,Xo);d(n,t,Xo)}))})).then((function(){return t}))}))},D=function(t,e){return Promise.resolve().then((function(){return t.status!==Wo?t:(ti||(window.dispatchEvent(new Ko("single-spa:before-first-mount")),ti=!0),$(t,"mount").then((function(){return t.status=Zo,ei||(window.dispatchEvent(new Ko("single-spa:first-mount")),ei=!0),t})).catch((function(n){var r=function(){if(e)throw m(n,t,Xo);return d(n,t,Xo),t};return t.status=Zo,I(t,!0).then(r,r)})))}))},R=function(){return L.apply(ri,arguments)},L=function(t,e){var n=this;if(!t||"object"!==Bo(t)&&"function"!=typeof t)throw Error(g(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(g(3,!1,Bo(t.name)));if("object"!==Bo(e))throw Error(g(4,!1,name,Bo(e)));if(!e.domElement)throw Error(g(5,!1,name));var r,o=ni++,i="function"==typeof t,u=i?t:function(){return Promise.resolve(t)},a={id:o,parcels:{},status:i?Ho:Vo,customProps:e,parentName:S(n),unmountThisParcel:function(){return h.then((function(){if(a.status!==Zo)throw Error(g(6,!1,name,a.status));return I(a,!0)})).then((function(t){return a.parentName&&delete n.parcels[a.id],t})).then((function(t){return s(t),t})).catch((function(t){throw a.status=Xo,l(t),t}))}};n.parcels[o]=a;var c=u();if(!c||"function"!=typeof c.then)throw Error(g(7,!1));var s,l,f=(c=c.then((function(t){if(!t)throw Error(g(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap))throw Error(g(9,!1,e));if(!A(t.mount))throw Error(g(10,!1,e));if(!A(t.unmount))throw Error(g(11,!1,e));if(t.update&&!A(t.update))throw Error(g(12,!1,e));var n=C(t,"bootstrap"),i=C(t,"mount"),u=C(t,"unmount");a.status=Vo,a.name=e,a.bootstrap=n,a.mount=i,a.unmount=u,a.timeouts=z(t.timeouts),t.update&&(a.update=C(t,"update"),r.update=function(t){return a.customProps=t,M((e=a,Promise.resolve().then((function(){if(e.status!==Zo)throw Error(g(32,!1,S(e)));return e.status=Yo,$(e,"update").then((function(){return e.status=Zo,e})).catch((function(t){throw m(t,e,Xo)}))}))));var e})}))).then((function(){return T(a,!0)})),h=f.then((function(){return D(a,!0)})),p=new Promise((function(t,e){s=t,l=e}));return r={mount:function(){return M(Promise.resolve().then((function(){if(a.status!==Wo)throw Error(g(13,!1,name,a.status));return n.parcels[o]=a,D(a)})))},unmount:function(){return M(a.unmountThisParcel())},getStatus:function(){return a.status},loadPromise:M(c),bootstrapPromise:M(f),mountPromise:M(h),unmountPromise:M(p)}},M=function(t){return t.then((function(){return null}))},N=function(t){var e=S(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==Bo(n)||null===n||Array.isArray(n))&&(n={},console.warn(g(40,!1),e,n));var r=j({},n,{name:e,mountParcel:L.bind(t),singleSpa:No});return O(t)&&(r.unmountSelf=t.unmountThisParcel),r},B=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(16,!1));oi.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},U=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(17,!1));oi.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},F=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(18,!1));oi.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},K=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(19,!1));oi.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},$=function(t,e){var n=t.timeouts[e],r=n.warningMillis,o=E(t);return new Promise((function(i,u){var a=!1,c=!1;t[e](N(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var s=g(31,!1,e,o,S(t),n.millis);function l(t){if(!a)if(!0===t)c=!0,n.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var e=t,o=e*r;console.warn(s),o+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))},z=function(t){var e={};for(var n in oi)e[n]=j({},oi[n],t&&t[n]||{});return e},H=function(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==zo&&t.status!==Qo?t:(t.status=Ho,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(N(t));if(!P(r))throw n=!0,Error(g(33,!1,S(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==Bo(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap)&&(r=35),A(e.mount)||(r=36),A(e.unmount)||(r=37);var o=E(e);if(r){var i;try{i=JSON.stringify(e)}catch(t){}return console.error(g(r,!1,o,S(t),i),e),d(void 0,t,Xo),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=j({},t.devtools.overlays,e.devtools.overlays)),t.status=Vo,t.bootstrap=C(e,"bootstrap"),t.mount=C(e,"mount"),t.unmount=C(e,"unmount"),t.unload=C(e,"unload"),t.timeouts=z(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=Xo:(r=Qo,t.loadErrorTime=(new Date).getTime()),d(e,t,r),t})));var e,n}))},V=function(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(g(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=Y(window.location.href),r=Y(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)},q=function(t){var e=this;if(t){var n=t[0].type;ai.indexOf(n)>=0&&ui[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}},W=function(){yi([],arguments)},G=function(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Uo&&n===o||(gt()?window.dispatchEvent(Z(window.history.state,e)):yi([])),r}},Z=function(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n},Y=function(t){var e=document.createElement("a");return e.href=t,e},J=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!li){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return Q.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return Q.call(this,n,window.removeEventListener,t,e,arguments)},li=!0}},Q=function(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){ai.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))},X=function(t){return Promise.resolve().then((function(){var e=fi[S(t)];if(!e)return t;if(t.status===zo)return tt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==Wo&&t.status!==Qo)return t;var n=t.status===Qo?Promise.resolve():$(t,"unload");return t.status="UNLOADING",n.then((function(){return tt(t,e),t})).catch((function(n){return o=e,i=n,delete fi[S(r=t)],delete r.bootstrap,delete r.mount,delete r.unmount,delete r.unload,d(i,r,Xo),o.reject(i),t;var r,o,i}))}))},tt=function(t,e){delete fi[S(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=zo,e.resolve()},et=function(t,e,n,r){fi[S(t)]={app:t,resolve:n,reject:r},Object.defineProperty(fi[S(t)],"promise",{get:e})},nt=function(t){return fi[t]},rt=function(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return hi.forEach((function(i){var u=i.status!==Xo&&w(i);switch(i.status){case Qo:u&&o-i.loadErrorTime>=200&&n.push(i);break;case zo:case Ho:u&&n.push(i);break;case Vo:case Wo:!u&&nt(S(i))?t.push(i):u&&r.push(i);break;case Zo:u||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}},ot=function(){return hi.filter(b).map(S)},it=function(){return hi.map(S)},ut=function(t){var e=k(hi,(function(e){return S(e)===t}));return e?e.status:null},at=function(t,e,n,r){var o=function(t,e,n,r){var o,i,u,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Bo(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(g(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(g(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(g(20,!1));if("object"!==Bo(t.app)&&"function"!=typeof t.app)throw Error(g(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(g(24,!1));if(!ht(t.customProps))throw Error(g(22,!1))}(t),a.name=t.name,a.loadApp=t.app,a.activeWhen=t.activeWhen,a.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(g(20,!1));if(!e)throw Error(g(23,!1));if("function"!=typeof n)throw Error(g(24,!1));if(!ht(r))throw Error(g(22,!1))}(t,e,n,r),a.name=t,a.loadApp=e,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?function(){return Promise.resolve(o)}:o,a.customProps=a.customProps||{},a.activeWhen=(i=a.activeWhen,u=(u=Array.isArray(i)?i:[i]).map((function(t){return"function"==typeof t?t:pt(t)})),function(t){return u.some((function(e){return e(t)}))}),a}(t,e,n,r);if(-1!==it().indexOf(o.name))throw Error(g(21,!1,o.name));hi.push(j({loadErrorTime:null,status:zo,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ii&&(J(),yi())},ct=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return hi.filter((function(e){return e.activeWhen(t)})).map(S)},st=function(t){if(0===hi.filter((function(e){return S(e)===t})).length)throw Error(g(25,!1,t));return lt(t).then((function(){var e=hi.map(S).indexOf(t);hi.splice(e,1)}))},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(g(26,!1));var n=k(hi,(function(e){return S(e)===t}));if(!n)throw Error(g(27,!1,t));var r,o=nt(S(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){et(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,ft(n,o.resolve,o.reject)):r=new Promise((function(t,e){et(n,(function(){return r}),t,e),ft(n,t,e)})),r},ft=function(t,e,n){I(t).then(X).then((function(){e(),setTimeout((function(){yi()}))})).catch(n)},ht=function(t){return!t||"function"==typeof t||"object"===Bo(t)&&null!==t&&!Array.isArray(t)},pt=function(t,e){var n=function(t,e){var n=function(n){var u=t.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":u,n===t.length)if(o)e&&(i+="$");else{var a=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(a,"$"):"".concat(i,"(/").concat(a,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var u=0;u<t.length;u++){var a=t[u];(!o&&":"===a||o&&"/"===a)&&n(u)}return n(t.length),new RegExp(i,"i")}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}},dt=function(){return yi()},vt=function(t,e){return w(t)?T(t).then((function(t){return e.then((function(){return w(t)?D(t):t}))})):e.then((function(){return t}))},yt=function(t){var e;gi=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,Uo=e),ii&&yi()},gt=function(){return gi},mt=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},bt=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},wt=function(t){return function e(n){return 0===arguments.length||bt(n)?e:t.apply(this,arguments)}},_t=function(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return bt(n)?e:wt((function(e){return t(n,e)}));default:return bt(n)&&bt(r)?e:bt(n)?wt((function(e){return t(e,r)})):bt(r)?wt((function(e){return t(n,e)})):t(n,r)}}},St=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},xt=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},Ot=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},Et=function(t,e,n,r){var o=function(t,e){return Ti(t,e,n.slice(),r.slice())},i=St(t);return!xt((function(t,e){return!xt(o,e,t)}),St(e),i)},jt=function(t){return function e(n,r,o){switch(arguments.length){case 0:return e;case 1:return bt(n)?e:_t((function(e,r){return t(n,e,r)}));case 2:return bt(n)&&bt(r)?e:bt(n)?_t((function(e,n){return t(e,r,n)})):bt(r)?_t((function(e,r){return t(n,e,r)})):wt((function(e){return t(n,r,e)}));default:return bt(n)&&bt(r)&&bt(o)?e:bt(n)&&bt(r)?_t((function(e,n){return t(e,n,o)})):bt(n)&&bt(o)?_t((function(e,n){return t(e,r,n)})):bt(r)&&bt(o)?_t((function(e,r){return t(n,e,r)})):bt(n)?wt((function(e){return t(e,r,o)})):bt(r)?wt((function(e){return t(n,e,o)})):bt(o)?wt((function(e){return t(n,r,e)})):t(n,r,o)}}},kt=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},At=function(t,e,n,r){return t["@@transducer/result"](n[r]($i(t["@@transducer/step"],t),e))},Ct=function(t){return"[object Object]"===Object.prototype.toString.call(t)},Pt=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},Tt=function(t){return(0,so.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},It=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Dt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Rt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Dt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Lt=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||Nt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Mt=function(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nt(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.")}()},Nt=function(t,e){if(t){if("string"==typeof t)return It(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?It(t,e):void 0}},Bt=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=Vt(a,t,e);Tt(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},Ut=function(t,e){var n,r,o=(n=Wt(Ht(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=Lt(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=Lt(h.value,2),v=d[0];zt(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return Rt({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=Lt(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=(0,so.getGlobalStore)("config-extension-slots",{slots:{}}),a=u.getState(),c={slots:Rt({},a.slots,i)};Di(a,c)||u.setState(c)},Ft=function(t,e){var n=function(t,e){var n=cu(Mi(t.schemas)),r=Mt(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=Lt(a.value,2);n=Wt([n,su(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);au.setState({config:n})},Kt=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=$t(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=Rt({},r[s.slotName],Dt({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}(0,so.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})},$t=function(t,e,n,r,o,i){var u,a,c,s,l=Lt(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=Ht(o,i),d=qt(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=Wt([qt(h,p),v]),g=null!=f?f:o.schemas[e];Gt(g,y,h);var m=hu(g,y,o.devDefaultsAreOn);return fu(g,m,h),delete m.extensionSlots,m},zt=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Qt(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},Ht=function(t,e){return Mt(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},Vt=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=qt(t,Ht(e,n));Gt(r,o,t);var i=hu(r,o,e.devDefaultsAreOn);return fu(r,i,t),delete i.extensionSlots,i},qt=function(t,e){var n=e.map((function(e){return e[t]})).filter((function(t){return!!t}));return Wt(n)},Wt=function(t){return Hi(Zi)({},t)},Gt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?lu(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},Zt=function(t,e,n){e&&Yt(t,[{Array:Yi,Boolean:Ji,ConceptUuid:eu,Number:Qi,Object:tu,String:Xi,UUID:eu,PersonAttributeTypeUuid:eu,PatientIdentifierTypeUuid:eu}[e]],n)},Yt=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},Jt=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},Qt=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Xt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},te=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ee=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ne=function(t){var e=this.__data__=new gu(t);this.size=e.size},re=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Nu;++e<n;)this.add(t[e])},oe=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},ie=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:a.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}qa(io.configExtensionStore.getState().mountedExtensions,e)||io.configExtensionStore.setState({mountedExtensions:e})},ue=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ae=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ce=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){ae(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},se=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||fe(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},le=function(t){return function(t){if(Array.isArray(t))return ue(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fe(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.")}()},fe=function(t,e){if(t){if("string"==typeof t)return ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(t,e):void 0}},he=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=se(a.value,2),l=s[0],f=s[1],h=ve(l,t,(0,io.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}qa(Ya.getState().slots,r)||Ya.setState({slots:r})},pe=function(t){return se(t.split("#"),1)[0]},de=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},ve=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Za.getState().extensions,le(i).concat(le(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=de(t,c,null===(n=s[pe(t)])||void 0===n?void 0:n.order,i),u=de(e,c,null===(r=s[pe(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=!0,p=!1,d=void 0;try{for(var v,y=l[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){var g=v.value,m=(0,io.getExtensionConfigFromStore)(r,t,g).config,b=pe(g),w=e.extensions[b];w&&f.push({id:g,name:b,moduleName:w.moduleName,config:m,meta:w.meta,online:w.online,offline:w.offline})}}catch(t){p=!0,d=t}finally{try{h||null==y.return||y.return()}finally{if(p)throw d}}return f},ye=function(t,e){return"object"!=typeof e||tc(e).forEach((function(n){t[n]=e[n]})),t},ge=function(t,e){return rc.call(t,e)},me=function(t,e){"function"==typeof e&&(e=e(nc(t))),("undefined"==typeof Reflect?tc:Reflect.ownKeys)(e).forEach((function(n){be(t,n,e[n])}))},be=function(t,e,n,r){oc(t,e,ye(n&&ge(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},we=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),be(t.prototype,"constructor",t),{extend:me.bind(null,t.prototype)}}}},_e=function(t,e,n){return ac.call(t,e,n)},Se=function(t,e){return e(t)},xe=function(t){if(!t)throw new Error("Assertion Failed")},Oe=function(t){Xa.setImmediate?setImmediate(t):setTimeout(t,0)},Ee=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},je=function(t){var e={};for(var n in t)ge(t,n)&&(e[n]=t[n]);return e},ke=function(t){return lc.apply([],t)},Ae=function(t){pc="undefined"!=typeof WeakMap&&new WeakMap;var e=dc(t);return pc=null,e},Ce=function(t){return vc.call(t).slice(8,-1)},Pe=function(t){var e,n,r,o;if(1===arguments.length){if(ec(t))return t.slice();if(this===mc&&"string"==typeof t)return[t];if(o=gc(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},Te=function(t,e){wc=t,_c=e},Ie=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(_c).map((function(t){return"\n"+t})).join("")):""},De=function(t,e){this._e=xc(),this.name=t,this.message=e},Re=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Le=function(t,e,n,r){this._e=xc(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Re(t,e)},Me=function(t,e){this._e=xc(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=Re(t,e)},Ne=function(){},Be=function(t){return t},Ue=function(t,e){return null==t||t===Be?e:function(n){return e(t(n))}},Fe=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},Ke=function(t,e){return t===Ne?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Fe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Fe(o,this.onerror):o),void 0!==i?i:n}},$e=function(t,e){return t===Ne?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Fe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Fe(r,this.onerror):r)}},ze=function(t,e){return t===Ne?e:function(n){var r=t.apply(this,arguments);ye(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Fe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Fe(i,this.onerror):i),void 0===r?void 0===u?void 0:u:ye(r,u)}},He=function(t,e){return t===Ne?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},Ve=function(t,e){return t===Ne?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},qe=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ne,this._lib=!1;var e=this._PSD=Yc;if(wc&&(this._stackHolder=xc(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Ic)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Ge(this,this._value))}this._state=null,this._value=null,++e.ref,es(this,t)},We=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},Ge=function(t,e){if(qc.push(e),null===t._state){var n=t._lib&&tn();e=Gc(e),t._state=!1,t._value=e,wc&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=uc(e,"stack");e._promise=t,be(e,"stack",{get:function(){return Fc?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,Vc.some((function(t){return t._value===r._value}))||Vc.push(r),Ze(t),n&&en()}var r},Ze=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)Ye(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Qc&&(++Qc,$c((function(){0==--Qc&&nn()}),[]))},Ye=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Qc,$c(Je,[n,t,e])}else t._listeners.push(e)},Je=function(t,e,n){try{Wc=e;var r,o=e._value;e._state?r=t(o):(qc.length&&(qc=[]),r=t(o),-1===qc.indexOf(o)&&function(t){for(var e=Vc.length;e;)if(Vc[--e]._value===t._value)return void Vc.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Wc=null,0==--Qc&&nn(),--n.psd.ref||n.psd.finalize()}},Qe=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},Xe=function(){tn()&&en()},tn=function(){var t=zc;return zc=!1,Hc=!1,t},en=function(){var t,e,n;do{for(;Jc.length>0;)for(t=Jc,Jc=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Jc.length>0);zc=!0,Hc=!0},nn=function(){var t=Vc;Vc=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=Xc.slice(0),n=e.length;n;)e[--n]()},rn=function(t){return new qe(Ic,!1,t)},on=function(t,e){var n=Yc;return function(){var r=tn(),o=Yc;try{return hn(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{hn(o,!1),r&&en()}}},un=function(t,e,n,r){var o=Yc,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++cs;var u=Zc.env;i.env=Uc?{Promise:qe,PromiseProp:{value:qe,configurable:!0,writable:!0},all:qe.all,race:qe.race,allSettled:qe.allSettled,any:qe.any,resolve:qe.resolve,reject:qe.reject,nthen:gn(u.nthen,i),gthen:gn(u.gthen,i)}:{},e&&ye(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=dn(i,t,n,r);return 0===i.ref&&i.finalize(),a},an=function(){return rs.id||(rs.id=++os),++rs.awaits,rs.echoes+=100,rs.id},cn=function(){return!!rs.awaits&&(0==--rs.awaits&&(rs.id=0),rs.echoes=100*rs.awaits,!0)},sn=function(t){return rs.echoes&&t&&t.constructor===Bc?(an(),t.then((function(t){return cn(),t}),(function(t){return cn(),ss(t)}))):t},ln=function(t){++as,rs.echoes&&0!=--rs.echoes||(rs.echoes=rs.id=0),is.push(Yc),hn(t,!0)},fn=function(){var t=is[is.length-1];is.pop(),hn(t,!1)},hn=function(t,e){var n=Yc;if((e?!rs.echoes||us++&&t===Yc:!us||--us&&t===Yc)||vn(e?ln.bind(null,t):fn),t!==Yc&&(Yc=t,n===Zc&&(Zc.env=pn()),Uc)){var r=Zc.env.Promise,o=t.env;Lc.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(Xa,"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))}},pn=function(){var t=Xa.Promise;return Uc?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(Xa,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Lc.then,gthen:t.prototype.then}:{}},dn=function(t,e,n,r,o){var i=Yc;try{return hn(t,!0),e(n,r,o)}finally{hn(i,!1)}},vn=function(t){Nc.call(Rc,t)},yn=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=Yc;n&&an(),hn(e,!0);try{return t.apply(this,arguments)}finally{hn(o,!1),r&&vn(cn)}}},gn=function(t,e){return function(n,r){return t.call(this,yn(n,e),yn(r,e))}},mn=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(Xa.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),ye(r,o)):Xa.CustomEvent&&ye(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Xa.dispatchEvent&&(dispatchEvent(r),!Xa.PromiseRejectionEvent&&Xa.onunhandledrejection))try{Xa.onunhandledrejection(r)}catch(t){}wc&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},bn=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},wn=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=Ae(e))[t],e}},_n=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=He),o||(o=Ne);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){tc(t).forEach((function(e){var n=t[e];if(ec(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Cc.InvalidArgument("Invalid event config");var r=i(e,Be,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){Oe((function(){t.apply(null,e)}))}))}))}}))}},Sn=function(t,e){return we(e).from({prototype:t}),e},xn=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},On=function(t,e){t.filter=bn(t.filter,e)},En=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return bn(r(),e())}:e,t.justLimit=n&&!r},jn=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Cc.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},kn=function(t,e,n){var r=jn(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},An=function(t,e,n,r){var o=t.replayFilter?bn(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),ge(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Cn(kn(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Cn(kn(t,r,n),bn(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Cn=function(t,e,n,r){var o=on(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=Ne}),(function(e){t.fail(e),n=Ne}))||o(t.value,t,(function(t){return n=t})),n()}))}))},Pn=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=Ce(t);return"ArrayBuffer"===n?"binary":n},Tn=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},In=function(t,e){return t<e?-1:t===e?0:1},Dn=function(t,e){return t>e?-1:t===e?0:1},Rn=function(t,e,n){var r=c(t,xs)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Ln=function(t){return new t.Collection(t,(function(){return Un("")})).limit(0)},Mn=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Nn=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Rn(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?In:Dn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return Bn(a[0],c[f-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<f;++v){var y=Mn(o,h,a[v],c[v],u,s);null===y&&null===p?d=v+1:(null===p||u(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p},Bn=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},Un=function(t){return{type:1,lower:t,upper:t}},Fn=function(t){return on((function(e){return Kn(e),t(e.target.error),!1}))},Kn=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},$n=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+zn(e)}},zn=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},Hn=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:Ee(n,(function(t){return[t.name,t]}))}},Vn=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return cc(t,e)}:function(e){return cc(e,t)};var e},qn=function(t){return[].slice.call(t)},Wn=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},Gn=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,p=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=qn((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=ec(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:Vn(e)},indexes:qn(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:ec(o),keyPath:o,unique:n,multiEntry:r,extractKey:Vn(o)};return i[Wn(o)]=u,u})),getIndexByKeyPath:function(t){return i[Wn(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[Wn(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=on(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,d=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,Kn(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(p=s.clear()):v.push(p=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<d;++S)v.push(p=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),p.onerror=m;else for(var x=0;x<d;++x)v.push(p=s[n](w[x])),p.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};p.onerror=function(t){m(t),O(t)},p.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=on(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=Fn(r),p=0;p<a;++p)null!=n[p]&&((i=u.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=on(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=Fn(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=on(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,p=u.objectStore(o),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?d.getAll(v,l):d.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=Fn(i)}else{var g=0,m=a||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=Fn(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=on(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),p=u?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Fn(c),d.onsuccess=on((function(n){var r=d.result;if(r){r.___id=++ks,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=on(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=on(t),d.onerror=Fn(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=on((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=on((function(e){return t(e.target.result)})),l.onerror=Fn(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:js(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=p.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},Zn=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=uc(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?be(e,t,{get:function(){return this.table(t)},set:function(e){oc(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},Yn=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},Jn=function(t,e){return t._cfg.version-e._cfg.version},Qn=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ds)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},Xn=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return tr(o,t)})),o},tr=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},er=function(t,e,n){var r={};return _e(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=$n(zn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=$n(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=Hn(t,i,u)})),r},nr=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+_e(f).join("+")+"]";if(e[u]){var p=e[u].idxByName[h];p&&(p.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Xa.WorkerGlobalScope&&c(Xa,Xa.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},rr=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Bs("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},or=function(t){return t&&"function"==typeof t.databases},ir=function(t){return un((function(){return Yc.letThrough=!0,t()}))},ur=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},ar=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):ec(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},cr=function(t,e,n){var r=arguments.length;if(r<2)throw new Cc.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=ke(o);return[t,i,n]},sr=function(t,e,n){for(var r=ec(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},lr=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===ws(e.keys[o],t[i])&&(r.push(n?Ae(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},fr=function(t){return!("from"in t)},hr=function(t,e){fr(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Ls(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},pr=function(t){var e=fr(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&ws(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||ws(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},dr=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=vr(u)}t.d=vr(t)},vr=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},yr=function(t,e){return tc(e).forEach((function(n){hr(t[n]||(t[n]=new Rs),e[n])})),t},gr=function(t){var e=$s;try{$s=!0,Os.storagemutated.fire(t)}finally{$s=e}},mr=function(t,e){return!e||"object"!==Ws(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},br=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},wr=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},_r=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},Sr=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},xr=function(){},Or=function(t,e){if(!e)return t&&t.then?t.then(xr):Promise.resolve()},Er=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},jr=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},kr=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,uo.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return Er(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Er(t,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,uo.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var u={};return e&&(u=(0,uo.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){jr(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,u)}},Ar=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,c(e,n)?e:new n((function(t){t(e)}))).then(u,a)}s((r=r.apply(t,e||[])).next())}))},Cr=function(t,e){var n,r,o,i,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;function a(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=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Pr=x(885),Tr=x(93),Ir=x(575),Dr=x(839),Rr=document.createElement("div"),Lr=function(){document.body.appendChild(Rr)};Rr.id="omrs-svgs-container",Rr.style.display="none","complete"===document.readyState?Lr():window.addEventListener("load",Lr);var Mr=x(141),Nr=x(739),Br=x(787),Ur=x(865),Fr=x(509),Kr=x(646),$r=x(250),zr=x(76),Hr=x(600),Vr=x(40),qr=x(61),Wr=x(592),Gr=x(862),Zr=x(714),Yr=x(601),Jr=x(142),Qr=x(991),Xr=x(662),to=x(524),eo=x(451),no=x(647),ro=x(879),oo=x(752),io=x(78),uo=x(954),ao=(x(493),x(792));new ao.Subject,new ao.Subject;var co=x(45),so=x(685);(0,so.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,x(740),(0,so.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),x(281),x(980);var lo="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fo="object"==typeof self&&self&&self.Object===Object&&self,ho=lo||fo||Function("return this")(),po=ho.Symbol,vo=Object.prototype,yo=vo.hasOwnProperty,go=vo.toString,mo=po?po.toStringTag:void 0,bo=Object.prototype.toString,wo=po?po.toStringTag:void 0,_o=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":wo&&wo in Object(t)?function(t){var e=yo.call(t,mo),n=t[mo];try{t[mo]=void 0;var r=!0}catch(t){}var o=go.call(t);return r&&(e?t[mo]=n:delete t[mo]),o}(t):(e=t,bo.call(e));var e},So=function(t,e){return function(n){return t(e(n))}};So(Object.getPrototypeOf,Object);var xo,Oo,Eo,jo,ko,Ao=function(t){return null!=t&&"object"==typeof t},Co=Function.prototype,Po=Object.prototype,To=Co.toString;function Io(t,e,n){return(Io=i()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Ro(o,n.prototype),o}).apply(null,arguments)}function Do(t){return(Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ro(t,e){return(Ro=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lo(t){var e="function"==typeof Map?new Map:void 0;return Lo=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Io(t,arguments,Do(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ro(r,t)},Lo(t)}Po.hasOwnProperty,To.call(Object),Lo(Error),x(674),(0,so.createGlobalStore)("session",{loaded:!1,session:null}),new ao.BehaviorSubject(null),(ko=xo||(xo={})).NEWVISIT="startVisit",ko.EDITVISIT="editVisit",ko.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Oo||(Oo={})),x(66),(jo=Eo||(Eo={})).Array="Array",jo.Boolean="Boolean",jo.ConceptUuid="ConceptUuid",jo.Number="Number",jo.Object="Object",jo.String="String",jo.UUID="UUID",jo.PersonAttributeTypeUuid="PersonAttributeTypeUuid",jo.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Mo=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},No=Object.freeze({__proto__:null,get start(){return yt},get ensureJQuerySupport(){return J},get setBootstrapMaxTime(){return B},get setMountMaxTime(){return U},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return K},get registerApplication(){return at},get unregisterApplication(){return st},get getMountedApps(){return ot},get getAppStatus(){return ut},get unloadApplication(){return lt},get checkActivityFunctions(){return ct},get getAppNames(){return it},get pathToActiveWhen(){return pt},get navigateToUrl(){return V},get triggerAppChange(){return dt},get addErrorHandler(){return v},get removeErrorHandler(){return y},get mountRootParcel(){return R},get NOT_LOADED(){return zo},get LOADING_SOURCE_CODE(){return Ho},get NOT_BOOTSTRAPPED(){return Vo},get BOOTSTRAPPING(){return qo},get NOT_MOUNTED(){return Wo},get MOUNTING(){return Go},get UPDATING(){return Yo},get LOAD_ERROR(){return Qo},get MOUNTED(){return Zo},get UNMOUNTING(){return Jo},get SKIP_BECAUSE_BROKEN(){return Xo}});function Bo(t){return(Bo="function"==typeof Symbol&&"symbol"==Mo(Symbol.iterator)?function(t){return void 0===t?"undefined":Mo(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":Mo(t)})(t)}var Uo,Fo=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==x.g?x.g:"undefined"!=typeof self?self:{}).CustomEvent,Ko=function(){try{var t=new Fo("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?Fo:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},$o=[],zo="NOT_LOADED",Ho="LOADING_SOURCE_CODE",Vo="NOT_BOOTSTRAPPED",qo="BOOTSTRAPPING",Wo="NOT_MOUNTED",Go="MOUNTING",Zo="MOUNTED",Yo="UPDATING",Jo="UNMOUNTING",Qo="LOAD_ERROR",Xo="SKIP_BECAUSE_BROKEN",ti=!1,ei=!1,ni=0,ri={parcels:{}},oi={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}},ii="undefined"!=typeof window,ui={hashchange:[],popstate:[]},ai=["hashchange","popstate"];if(ii){window.addEventListener("hashchange",W),window.addEventListener("popstate",W);var ci=window.addEventListener,si=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&ai.indexOf(t)>=0)||k(ui[t],(function(t){return t===e})))return ci.apply(this,arguments);ui[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&ai.indexOf(t)>=0))return si.apply(this,arguments);ui[t]=ui[t].filter((function(t){return t!==e}))},window.history.pushState=G(window.history.pushState,"pushState"),window.history.replaceState=G(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(g(41,!1)):window.singleSpaNavigate=V}var li=!1,fi={},hi=[],pi=!1,di=[],vi=ii&&window.location.href;function yi(){var t=function(){v=!0},e=function(){return Promise.resolve().then((function(){var t=h.map(H);return Promise.all(t).then(o).then((function(){return[]})).catch((function(t){throw o(),t}))}))},n=function(){return Promise.resolve().then((function(){if(window.dispatchEvent(new Ko(0===c.length?"single-spa:before-no-app-change":"single-spa:before-app-change",i(!0))),window.dispatchEvent(new Ko("single-spa:before-routing-event",i(!0,{cancelNavigation:t}))),v)return window.dispatchEvent(new Ko("single-spa:before-mount-routing-event",i(!0))),r(),void V(y);var e=l.map(X),n=f.map(I).map((function(t){return t.then(X)})).concat(e),a=Promise.all(n);a.then((function(){window.dispatchEvent(new Ko("single-spa:before-mount-routing-event",i(!0)))}));var s=h.map((function(t){return H(t).then((function(t){return vt(t,a)}))})),p=d.filter((function(t){return h.indexOf(t)<0})).map((function(t){return vt(t,a)}));return a.catch((function(t){throw o(),t})).then((function(){return o(),Promise.all(s.concat(p)).catch((function(t){throw u.forEach((function(e){return e.reject(t)})),t})).then(r)}))}))},r=function(){var t=ot();u.forEach((function(e){return e.resolve(t)}));try{var e=0===c.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Ko(e,i())),window.dispatchEvent(new Ko("single-spa:routing-event",i()))}catch(t){setTimeout((function(){throw t}))}if(pi=!1,di.length>0){var n=di;di=[],yi(n)}return t},o=function(){u.forEach((function(t){q(t.eventArguments)})),q(a)},i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(p(t={},Zo,[]),p(t,Wo,[]),p(t,zo,[]),p(t,Xo,[]),t);e?(h.concat(d).forEach((function(t,e){u(t,Zo)})),l.forEach((function(t){u(t,zo)})),f.forEach((function(t){u(t,Wo)}))):c.forEach((function(t){u(t)}));var i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:c.length,originalEvent:null==a?void 0:a[0],oldUrl:y,newUrl:g,navigationIsCanceled:v}};return n&&j(i.detail,n),i;function u(t,e){var n=S(t);e=e||ut(n),r[n]=e,(o[e]=o[e]||[]).push(n)}},u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;if(pi)return new Promise((function(t,e){di.push({resolve:t,reject:e,eventArguments:a})}));var c,s=rt(),l=s.appsToUnload,f=s.appsToUnmount,h=s.appsToLoad,d=s.appsToMount,v=!1,y=vi,g=vi=window.location.href;return gt()?(pi=!0,c=l.concat(h,f,d),n()):(c=h,e())}var gi=!1;ii&&setTimeout((function(){gi||console.warn(g(1,!1))}),5e3);var mi,bi={getRawAppData:function(){return[].concat(hi)},reroute:yi,NOT_LOADED:zo,toLoadPromise:H,toBootstrapPromise:T,unregisterApplication:st};ii&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=bi),mt((function(t){if(!t||"string"!=typeof t)return!1;for(var e=/\${(.*?)}/g,n=e.exec(t);n;){if(!mi.includes(n[1]))return!1;n=e.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+(mi=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(t){return"${"+t+"}"})).join(", "));var wi="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},_i=Object.prototype.toString,Si=function(){return"[object Arguments]"===_i.call(arguments)?function(t){return"[object Arguments]"===_i.call(t)}:function(t){return Ot("callee",t)}}(),xi=Si,Oi=!{toString:null}.propertyIsEnumerable("toString"),Ei=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ji=function(){return arguments.propertyIsEnumerable("length")}(),ki=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},Ai="function"!=typeof Object.keys||ji?wt((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=ji&&xi(t);for(e in t)!Ot(e,t)||o&&"length"===e||(r[r.length]=e);if(Oi)for(n=Ei.length-1;n>=0;)Ot(e=Ei[n],t)&&!ki(r,e)&&(r[r.length]=e),n-=1;return r})):wt((function(t){return Object(t)!==t?[]:Object.keys(t)})),Ci=wt((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)})),Pi=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};function Ti(t,e,n,r){if(wi(t,e))return!0;var o=Ci(t);if(o!==Ci(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":Pi(t))!==(void 0===e?"undefined":Pi(e))||!wi(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!wi(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===t)return r[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&Et(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&Et(t.values(),e.values(),n.concat([t]),r.concat([e]));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 u=Ai(t);if(u.length!==Ai(e).length)return!1;var a=n.concat([t]),c=r.concat([e]);for(i=u.length-1;i>=0;){var s=u[i];if(!Ot(s,e)||!Ti(e[s],t[s],a,c))return!1;i-=1}return!0}var Ii=_t((function(t,e){return Ti(t,e,[],[])})),Di=Ii;function Ri(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?Ri(t[a],e,n,!0):t[a];return o};switch(Ci(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var Li,Mi=wt((function(t){return null!=t&&"function"==typeof t.clone?t.clone():Ri(t,[],[],!0)})),Ni=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},Bi=wt((function(t){return!!Ni(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),Ui=Bi,Fi=(Li=function(t){this.f=t},Li.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},Li.prototype["@@transducer/result"]=function(t){return t},Li.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},Li),Ki=_t((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),$i=Ki,zi="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Hi=jt((function(t,e,n){if("function"==typeof t&&(t=new Fi(t)),Ui(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return At(t,e,n,"fantasy-land/reduce");if(null!=n[zi])return kt(t,e,n[zi]());if("function"==typeof n.next)return kt(t,e,n);if("function"==typeof n.reduce)return At(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),Vi=jt((function(t,e,n){var r,o={};for(r in e)Ot(r,e)&&(o[r]=Ot(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)Ot(r,n)&&!Ot(r,o)&&(o[r]=n[r]);return o})),qi=Vi,Wi=jt((function t(e,n,r){return qi((function(n,r,o){return Ct(r)&&Ct(o)?t(e,r,o):e(n,r,o)}),n,r)})),Gi=Wi,Zi=_t((function(t,e){return Gi((function(t,e,n){return n}),t,e)})),Yi=mt((function(t){return Array.isArray(t)}),"must be an array"),Ji=mt((function(t){return"boolean"==typeof t}),"must be a boolean"),Qi=mt((function(t){return"number"==typeof t}),"must be a number"),Xi=mt((function(t){return"string"==typeof t}),"must be a string"),tu=mt((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),eu=mt((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),nu={providedConfigs:[],schemas:{},devDefaultsAreOn:Pt()},ru=(0,so.createGlobalStore)("config-internal",nu),ou=Pt();ru.subscribe((function(t){var e;t.devDefaultsAreOn!=ou&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),ou=t.devDefaultsAreOn)}));var iu=(0,so.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});iu.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var uu=(0,so.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),au=(0,so.createGlobalStore)("config-implementer-tools",{config:{}});function cu(t){return t.hasOwnProperty("_default")?Rt({},t,{_value:t._default,_source:"default"}):Qt(t)?Object.keys(t).reduce((function(e,n){return e[n]=cu(t[n]),e}),{}):{}}function su(t,e){return Qt(t)?Object.keys(t).reduce((function(n,r){return n[r]=su(t[r],e),n}),{}):{_value:t,_source:e}}function lu(t,e,n){Zt(n,t._type,e),Qt(e)?t._type===Eo.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];Gt(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||Gt(t,e,n):t._type===Eo.Array&&function(t,e,n){if(Jt(t._elements))for(var r=0;r<e.length;r++)lu(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;Zt("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function fu(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&Yt(n,t._validators,e),Qt(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===Eo.Object&&t._elements?fu(t._elements,s,l):fu(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)fu(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}Bt(ru.getState(),iu.getState()),ru.subscribe((function(t){return Bt(t,iu.getState())})),iu.subscribe((function(t){return Bt(ru.getState(),t)})),Ft(ru.getState(),iu.getState()),ru.subscribe((function(t){return Ft(t,iu.getState())})),iu.subscribe((function(t){return Ft(ru.getState(),t)})),Ut(ru.getState(),iu.getState()),ru.subscribe((function(t){return Ut(t,iu.getState())})),iu.subscribe((function(t){return Ut(ru.getState(),t)})),Kt(ru.getState(),uu.getState(),iu.getState()),ru.subscribe((function(t){Kt(t,uu.getState(),iu.getState())})),uu.subscribe((function(t){Kt(ru.getState(),t,iu.getState())})),iu.subscribe((function(t){Kt(ru.getState(),uu.getState(),t)}));var hu=function(t,e,n){var r=Mi(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&Jt(s))if(a._type===Eo.Array&&Array.isArray(u)){var l=u.map((function(t){return hu(s,t,n)}));r[i]=l}else if(a._type===Eo.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=hu(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(Qt(a)){var g=r.hasOwnProperty(i)?u:{};Qt(g)&&(r[i]=hu(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},pu=function(t,e){return t===e||t!=t&&e!=e},du=function(t,e){for(var n=t.length;n--;)if(pu(t[n][0],e))return n;return-1},vu=Array.prototype.splice;Xt.prototype.clear=function(){this.__data__=[],this.size=0},Xt.prototype.delete=function(t){var e=this.__data__,n=du(e,t);return!(n<0||(n==e.length-1?e.pop():vu.call(e,n,1),--this.size,0))},Xt.prototype.get=function(t){var e=this.__data__,n=du(e,t);return n<0?void 0:e[n][1]},Xt.prototype.has=function(t){return du(this.__data__,t)>-1},Xt.prototype.set=function(t,e){var n=this.__data__,r=du(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var yu,gu=Xt,mu=function(t){var e,n=void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":h(e);return null!=t&&("object"==n||"function"==n)},bu=function(t){if(!mu(t))return!1;var e=_o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},wu=ho["__core-js_shared__"],_u=(yu=/[^.]+$/.exec(wu&&wu.keys&&wu.keys.IE_PROTO||""))?"Symbol(src)_1."+yu:"",Su=Function.prototype.toString,xu=function(t){if(null!=t){try{return Su.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ou=/^\[object .+?Constructor\]$/,Eu=Function.prototype,ju=Object.prototype,ku=Eu.toString,Au=ju.hasOwnProperty,Cu=RegExp("^"+ku.call(Au).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pu=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!mu(t)||(e=t,_u&&_u in e))&&(bu(t)?Cu:Ou).test(xu(t));var e}(n)?n:void 0},Tu=Pu(ho,"Map"),Iu=Pu(Object,"create"),Du=Object.prototype.hasOwnProperty,Ru=Object.prototype.hasOwnProperty;te.prototype.clear=function(){this.__data__=Iu?Iu(null):{},this.size=0},te.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},te.prototype.get=function(t){var e=this.__data__;if(Iu){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Du.call(e,t)?e[t]:void 0},te.prototype.has=function(t){var e=this.__data__;return Iu?void 0!==e[t]:Ru.call(e,t)},te.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Iu&&void 0===e?"__lodash_hash_undefined__":e,this};var Lu=te,Mu=function(t,e){var n,r,o,i=t.__data__;return("string"==(o=void 0===(n=e)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":void 0===r?"undefined":h(r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};ee.prototype.clear=function(){this.size=0,this.__data__={hash:new Lu,map:new(Tu||gu),string:new Lu}},ee.prototype.delete=function(t){var e=Mu(this,t).delete(t);return this.size-=e?1:0,e},ee.prototype.get=function(t){return Mu(this,t).get(t)},ee.prototype.has=function(t){return Mu(this,t).has(t)},ee.prototype.set=function(t,e){var n=Mu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Nu=ee;ne.prototype.clear=function(){this.__data__=new gu,this.size=0},ne.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ne.prototype.get=function(t){return this.__data__.get(t)},ne.prototype.has=function(t){return this.__data__.has(t)},ne.prototype.set=function(t,e){var n,r,o=this.__data__;if(n=o,null!=(r=gu)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):c(n,r)){var i=o.__data__;if(!Tu||i.length<199)return i.push([t,e]),this.size=++o.size,this;o=this.__data__=new Nu(i)}return o.set(t,e),this.size=o.size,this};var Bu=ne;re.prototype.add=re.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},re.prototype.has=function(t){return this.__data__.has(t)};var Uu=re,Fu=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Ku=function(t,e){return t.has(e)},$u=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new Uu:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Fu(e,(function(t,e){if(!Ku(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},zu=ho.Uint8Array,Hu=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Vu=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},qu=po?po.prototype:void 0,Wu=qu?qu.valueOf:void 0,Gu=Array.isArray,Zu=Object.prototype.propertyIsEnumerable,Yu=Object.getOwnPropertySymbols,Ju=Yu?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Yu(t),(function(e){return Zu.call(t,e)})))}:function(){return[]},Qu=function(t){return Ao(t)&&"[object Arguments]"==_o(t)},Xu=Object.prototype,ta=Xu.hasOwnProperty,ea=Xu.propertyIsEnumerable,na=Qu(function(){return arguments}())?Qu:function(t){return Ao(t)&&ta.call(t,"callee")&&!ea.call(t,"callee")},ra=na,oa=e&&!e.nodeType&&e,ia=oa&&t&&!t.nodeType&&t,ua=ia&&ia.exports===oa?ho.Buffer:void 0,aa=(ua?ua.isBuffer:void 0)||function(){return!1},ca=/^(?:0|[1-9]\d*)$/,sa=function(t,e){var n,r=void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":h(n);return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&ca.test(t))&&t>-1&&t%1==0&&t<e},la=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},fa={};fa["[object Float32Array]"]=fa["[object Float64Array]"]=fa["[object Int8Array]"]=fa["[object Int16Array]"]=fa["[object Int32Array]"]=fa["[object Uint8Array]"]=fa["[object Uint8ClampedArray]"]=fa["[object Uint16Array]"]=fa["[object Uint32Array]"]=!0,fa["[object Arguments]"]=fa["[object Array]"]=fa["[object ArrayBuffer]"]=fa["[object Boolean]"]=fa["[object DataView]"]=fa["[object Date]"]=fa["[object Error]"]=fa["[object Function]"]=fa["[object Map]"]=fa["[object Number]"]=fa["[object Object]"]=fa["[object RegExp]"]=fa["[object Set]"]=fa["[object String]"]=fa["[object WeakMap]"]=!1;var ha,pa=e&&!e.nodeType&&e,da=pa&&t&&!t.nodeType&&t,va=da&&da.exports===pa&&lo.process,ya=function(){try{return da&&da.require&&da.require("util").types||va&&va.binding&&va.binding("util")}catch(t){}}(),ga=ya&&ya.isTypedArray,ma=ga?(ha=ga,function(t){return ha(t)}):function(t){return Ao(t)&&la(t.length)&&!!fa[_o(t)]},ba=Object.prototype.hasOwnProperty,wa=Object.prototype,_a=So(Object.keys,Object),Sa=Object.prototype.hasOwnProperty,xa=function(t){return n=Ju,r=function(t){return null!=(e=t)&&la(e.length)&&!bu(e)?function(t,e){var n=Gu(t),r=!n&&ra(t),o=!n&&!r&&aa(t),i=!n&&!r&&!o&&ma(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!ba.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||sa(s,c))||a.push(s);return a}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||wa))return _a(t);var e,n,r=[];for(var o in Object(t))Sa.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Gu(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Oa=Object.prototype.hasOwnProperty,Ea=Pu(ho,"DataView"),ja=Pu(ho,"Promise"),ka=Pu(ho,"Set"),Aa=Pu(ho,"WeakMap"),Ca="[object Map]",Pa="[object Promise]",Ta="[object Set]",Ia="[object WeakMap]",Da="[object DataView]",Ra=xu(Ea),La=xu(Tu),Ma=xu(ja),Na=xu(ka),Ba=xu(Aa),Ua=_o;(Ea&&Ua(new Ea(new ArrayBuffer(1)))!=Da||Tu&&Ua(new Tu)!=Ca||ja&&Ua(ja.resolve())!=Pa||ka&&Ua(new ka)!=Ta||Aa&&Ua(new Aa)!=Ia)&&(Ua=function(t){var e=_o(t),n="[object Object]"==e?t.constructor:void 0,r=n?xu(n):"";if(r)switch(r){case Ra:return Da;case La:return Ca;case Ma:return Pa;case Na:return Ta;case Ba:return Ia}return e});var Fa=Ua,Ka="[object Arguments]",$a="[object Array]",za="[object Object]",Ha=Object.prototype.hasOwnProperty,Va=function t(e,n,r,o,i){return e===n||(null==e||null==n||!Ao(e)&&!Ao(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var u=Gu(t),a=Gu(e),c=u?$a:Fa(t),s=a?$a:Fa(e),l=(c=c==Ka?za:c)==za,f=(s=s==Ka?za:s)==za,h=c==s;if(h&&aa(t)){if(!aa(e))return!1;u=!0,l=!1}if(h&&!l)return i||(i=new Bu),u||ma(t)?$u(t,e,n,r,o,i):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new zu(t),new zu(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pu(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Hu;case"[object Set]":var c=1&r;if(a||(a=Vu),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=$u(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Wu)return Wu.call(t)==Wu.call(e)}return!1}(t,e,c,n,r,o,i);if(!(1&n)){var p=l&&Ha.call(t,"__wrapped__"),d=f&&Ha.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return i||(i=new Bu),o(v,y,n,r,i)}}return!!h&&(i||(i=new Bu),function(t,e,n,r,o,i){var u=1&n,a=xa(t),c=a.length;if(c!=xa(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:Oa.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=u;++s<c;){var v=t[l=a[s]],y=e[l];if(r)var g=u?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&oe(m,m)&&"function"==typeof b&&oe(b,b)||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}(e,n,r,o,t,i))},qa=function(t,e){return Va(t,e)},Wa=(0,so.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Ga=function(){return(0,so.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};ie(Wa.getState()),Wa.subscribe(ie),Ga();var Za=Ga(),Ya=(0,so.getGlobalStore)("extensions",{slots:{}}),Ja=(0,io.getExtensionSlotsConfigStore)(),Qa=(0,io.getExtensionsConfigStore)();Za.subscribe((function(t){he(t,Ja.getState(),Qa.getState())})),Ja.subscribe((function(t){he(Za.getState(),t,Qa.getState())})),Qa.subscribe((function(t){he(Za.getState(),Ja.getState(),t)})),Za.action((function(t,e){t.extensions[e.name]=ce({},e,{instances:[]})})),Za.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)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,".")),t;if(o&&o==e)return t;if(t.slots[n])return ce({},t,{slots:ce({},t.slots,ae({},n,ce({},t.slots[n],{moduleName:e})))});var i=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}(n,e);return ce({},t,{slots:ce({},t.slots,ae({},n,i))})})),Ya.action((function(){return{slots:{},extensions:{}}})),x(641);var Xa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,tc=Object.keys,ec=Array.isArray;"undefined"==typeof Promise||Xa.Promise||(Xa.Promise=Promise);var nc=Object.getPrototypeOf,rc={}.hasOwnProperty,oc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor;function uc(t,e){var n;return ic(t,e)||(n=nc(t))&&uc(n,e)}var ac=[].slice;function cc(t,e){if(ge(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=cc(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:cc(a,e.substr(u+1))}}function sc(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){xe("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)sc(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?ec(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),sc(c,a,n)}}else void 0===n?ec(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var lc=[].concat,fc="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ke([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return Xa[t]})),hc=fc.map((function(t){return Xa[t]}));Ee(fc,(function(t){return[t,!0]}));var pc=null;function dc(t){if(!t||"object"!=typeof t)return t;var e=pc&&pc.get(t);if(e)return e;if(ec(t)){e=[],pc&&pc.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(dc(t[n]))}else if(hc.indexOf(t.constructor)>=0)e=t;else{var o=nc(t);for(var i in e=o===Object.prototype?{}:Object.create(o),pc&&pc.set(t,e),t)ge(t,i)&&(e[i]=dc(t[i]))}return e}var vc={}.toString,yc="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",gc="symbol"==(void 0===yc?"undefined":h(yc))?function(t){var e;return null!=t&&(e=t[yc])&&e.apply(t)}:function(){return null},mc={},bc="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},wc="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),_c=function(){return!0},Sc=!new Error("").stack;function xc(){if(Sc)try{throw xc.arguments,new Error}catch(t){return t}return new Error}var Oc=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ec=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Oc),jc={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"};we(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}}),we(Le).from(De),we(Me).from(De);var kc=Ec.reduce((function(t,e){return t[e]=e+"Error",t}),{}),Ac=De,Cc=Ec.reduce((function(t,e){var n=function(t,n){this._e=xc(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=jc[e]||r,this.inner=null)},r=e+"Error";return we(n).from(Ac),t[e]=n,t}),{});Cc.Syntax=SyntaxError,Cc.Type=TypeError,Cc.Range=RangeError;var Pc=Oc.reduce((function(t,e){return t[e+"Error"]=Cc[e],t}),{}),Tc=Ec.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Cc[e]),t}),{});Tc.ModifyError=Le,Tc.DexieError=De,Tc.BulkError=Me;var Ic={},Dc=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,nc(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,nc(e),t]}(),3),Rc=Dc[0],Lc=Dc[1],Mc=Dc[2],Nc=Lc&&Lc.then,Bc=Rc&&Rc.constructor,Uc=!!Mc,Fc=!1,Kc=Mc?function(){Mc.then(Xe)}:Xa.setImmediate?setImmediate.bind(null,Xe):Xa.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){Xe(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(Xe,0)},$c=function(t,e){Jc.push([t,e]),Hc&&(Kc(),Hc=!1)},zc=!0,Hc=!0,Vc=[],qc=[],Wc=null,Gc=Be,Zc={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{mn(t[0],t[1])}catch(t){}}))}},Yc=Zc,Jc=[],Qc=0,Xc=[],ts={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==Yc||n!==as),u=i&&!cn(),a=new qe((function(n,a){Ye(o,new We(yn(t,e,i,u),yn(r,e,i,u),n,a,e))}));return wc&&Qe(a,this),a},e=Yc,n=as;return t.prototype=Ic,t},set:function(t){be(this,"then",t&&t.prototype===Ic?ts:{get:function(){return t},set:ts.set})}};function es(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&tn();e&&"function"==typeof e.then?es(t,(function(t,n){c(e,qe)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,Ze(t)),n&&en()}}),Ge.bind(null,t))}catch(e){Ge(t,e)}}function ns(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Ie(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return wc&&((r=Ie(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&ns(t._prev,e,n)),e}me(qe.prototype,{then:ts,_then:function(t,e){Ye(this,new We(null,null,t,e,Yc))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):rn(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):rn(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),rn(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Fc=!0;var t=ns(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Fc=!1}}},timeout:function(t,e){var n=this;return t<1/0?new qe((function(r,o){var i=setTimeout((function(){return o(new Cc.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&be(qe.prototype,Symbol.toStringTag,"Dexie.Promise"),Zc.env=pn(),me(qe,{all:function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return qe.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,qe))return t;if(t&&"function"==typeof t.then)return new qe((function(e,n){t.then(e,n)}));var e=new qe(Ic,!0,t);return Qe(e,Wc),e},reject:rn,race:function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){t.map((function(t){return qe.resolve(t).then(e,n)}))}))},PSD:{get:function(){return Yc},set:function(t){return Yc=t}},totalEchoes:{get:function(){return as}},newPSD:un,usePSD:dn,scheduler:{get:function(){return $c},set:function(t){$c=t}},rejectionMapper:{get:function(){return Gc},set:function(t){Gc=t}},follow:function(t,e){return new qe((function(n,r){return un((function(e,n){var r=Yc;r.unhandleds=[],r.onunhandled=n,r.finalize=Fe((function(){var t=this;Xc.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),Xc.splice(Xc.indexOf(r),1)})),++Qc,$c((function(){0==--Qc&&nn()}),[])}),r.finalize),t()}),e,n,r)}))}}),Bc&&(Bc.allSettled&&be(qe,"allSettled",(function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return qe.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Bc.any&&"undefined"!=typeof AggregateError&&be(qe,"any",(function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return qe.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var rs={awaits:0,echoes:0,id:0},os=0,is=[],us=0,as=0,cs=0;-1===(""+Nc).indexOf("[native code]")&&(an=cn=Ne);var ss=qe.reject;function ls(t,e,n,r){if(t.idbdb&&(t._state.openComplete||Yc.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===kc.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return ls(t,e,n,r)}))):ss(o)}return o._promise(e,(function(t,e){return un((function(){return Yc.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return ss(new Cc.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return ss(new Cc.DatabaseClosed);t.open().catch(Ne)}return t._state.dbReadyPromise.then((function(){return ls(t,e,n,r)}))}var fs=String.fromCharCode(65535),hs="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ps=[],ds="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),vs=ds,ys=ds,gs=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},ms={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},bs=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Cc.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||Yc.trans,i=this.name,u=tn();try{return o&&o.db===this.db?o===Yc.trans?o._promise(t,r,n):un((function(){return o._promise(t,r,n)}),{trans:o,transless:Yc.transless||Yc}):ls(this.db,t,[this.name],r)}finally{u&&en()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(ec(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=tc(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==fs)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&wc&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?bn(a,c&&c.multi?function(t){var n=cc(t,r);return ec(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,cc(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,ec(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(ge(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){ye(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=wn(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{sc(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||ec(t))return this.where(":id").equals(t).modify(e);var n=cc(t,this.schema.primKey.keyPath);if(void 0===n)return ss(new Cc.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?tc(e).forEach((function(n){sc(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=wn(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{sc(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:ms})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Cc.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Cc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(wn(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Me("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Cc.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Cc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(wn(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Me("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new Me("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function ws(t,e){try{var n=Pn(t),r=Pn(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Tn(t),Tn(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=ws(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var _s=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,ss.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,ss.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=bn(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return An(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&ye(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return An(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(xn(n,!0))return r.count({trans:t,query:{index:jn(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return An(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&xn(n,!0)&&n.limit>0){var r=n.valueMapper,o=jn(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return An(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,xn(e)?En(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):En(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),En(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return On(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return On(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=bn(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&xn(e,!0)&&e.limit>0)return this._read((function(t){var n=jn(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return On(this._ctx,(function(t){var e=t.primaryKey.toString(),r=ge(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=tc(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];cc(e,o)!==a&&(sc(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],p=0,d=[],v=function(t,e){var n=e.failures,r=e.numFailures;p+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=tc(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var p=[],d=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:Ae(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===ws(l(b),l(w.value))?(d.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),p.push(w.value)))}var _=xn(n)&&n.limit===1/0&&("function"!=typeof t||t===Ss)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(p.length,t)}))).then((function(){return(d.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:d,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(d.length,t)}))})).then((function(){return(g.length>0||_&&t===Ss)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new Le("Error modifying one or more objects",h,p,d);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return xn(t)&&(t.isPrimKey&&!ys||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Le("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(Ss)}}]),t}(),Ss=function(t,e){return e.value=null},xs=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Ln(this):new this.Collection(this,(function(){return Bn(t,e,!n,!r)}))}catch(t){return Rn(this,hs)}}},{key:"equals",value:function(t){return null==t?Rn(this,hs):new this.Collection(this,(function(){return Un(t)}))}},{key:"above",value:function(t){return null==t?Rn(this,hs):new this.Collection(this,(function(){return Bn(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Rn(this,hs):new this.Collection(this,(function(){return Bn(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Rn(this,hs):new this.Collection(this,(function(){return Bn(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Rn(this,hs):new this.Collection(this,(function(){return Bn(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Rn(this,"String expected."):this.between(t,t+fs,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Nn(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],fs)}},{key:"equalsIgnoreCase",value:function(t){return Nn(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=Pe.apply(mc,arguments);return 0===t.length?Ln(this):Nn(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=Pe.apply(mc,arguments);return 0===t.length?Ln(this):Nn(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,fs)}},{key:"anyOf",value:function(){var t=this,e=Pe.apply(mc,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Rn(this,hs)}if(0===e.length)return Ln(this);var r=new this.Collection(this,(function(){return Bn(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=Pe.apply(mc,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Rn(this,hs)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Ln(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Rn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Cc.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[]),s.sort(r)}catch(t){return Rn(this,hs)}var p=0,d=f?function(t){return i(t,s[p][1])>0}:function(t){return i(t,s[p][1])>=0},v=l?function(t){return u(t,s[p][0])>0}:function(t){return u(t,s[p][0])>=0},y=d,g=new this.Collection(this,(function(){return Bn(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=d,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++p===s.length)return e(r),!1;return!!function(t){return!d(t)&&!v(t)}(o)||(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||e((function(){h===i?t.continue(s[p][0]):t.continue(s[p][1])})),!1)})),g}},{key:"startsWithAnyOf",value:function(){var t=Pe.apply(mc,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Ln(this):this.inAnyRange(t.map((function(t){return[t,t+fs]}))):Rn(this,"startsWithAnyOf() only works with strings")}}]),t}(),Os=_n(null,"storagemutated"),Es=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return xe(!Yc.global),++this._reculock,1!==this._reculock||Yc.global||(Yc.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(xe(!Yc.global),0==--this._reculock)for(Yc.global||(Yc.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{dn(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&Yc.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(xe(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Cc.DatabaseClosed(r);case"MissingAPIError":throw new Cc.MissingAPI(r.message,r);default:throw new Cc.OpenFailed(r)}if(!this.active)throw new Cc.TransactionInactive;return xe(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=on((function(n){Kn(n),e._reject(t.error)})),t.onabort=on((function(n){Kn(n),e.active&&e._reject(new Cc.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=on((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&Os.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return ss(new Cc.ReadOnly("Transaction is readonly"));if(!this.active)return ss(new Cc.TransactionInactive);if(this._locked())return new qe((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},Yc])}));if(n)return un((function(){var t=r,n=new qe((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new qe((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=qe.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new qe((function(t,r){n.then((function(n){return e._waitingQueue.push(on(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(on(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Cc.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(ge(e,t))return e[t];var n=this.schema[t];if(!n)throw new Cc.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),js=function(t){try{return t.only([[]]),js=function(){return[[]]},[[]]}catch(t){return js=function(){return fs},fs}},ks=0,As=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){tc(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return $n(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),ec(r),0===e)})),o=r.shift();if(o.multi)throw new Cc.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Cc.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Cc.Schema("Index must have a name and cannot be an empty string")})),e[n]=Hn(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?ye(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){ye(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,Yn(e,[e._allTables,e,e.Transaction.prototype]),Zn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],tc(o),o),e._storeNames=tc(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=Ve(this._cfg.contentUpgrade||Ne,t),this}}]),t}();function Cs(t,e,n,r,o){return qe.resolve().then((function(){var i=Yc.transless||Yc,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===kc.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return Cs(t,e,n,null,o)}))):ss(r)}var c,s=bc(o);s&&an();var l=qe.follow((function(){if(c=o.call(u,u))if(s){var t=cn.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=ar(c))}),a);return(c&&"function"==typeof c.then?qe.resolve(c).then((function(t){return u.active?t:ss(new Cc.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),ss(t)}))}))}var Ps={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:sr(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:sr(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=Wn(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:Vn(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var p,d=o.indexes[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[Wn(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(sr(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(sr(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function Ts(t,e,n,r){return n=n||{},r=r||"",tc(t).forEach((function(o){if(ge(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=Ce(i);a!==Ce(u)?n[r+o]=e[o]:"Object"===a?Ts(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),tc(e).forEach((function(o){ge(t,o)||(n[r+o]=e[o])})),n}var Is={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e=Yc.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:o}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((function(i){var u=o.map((function(n,o){var u=i[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,e);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],e);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||sc(t.values[o],r.keyPath,n))}else{var h=Ts(u,t.values[o]),p=l.fire.call(s,h,n,u,e);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){ge(d,t)?d[t]=p[t]:sc(d,t,p[t])}))}}return s}));return n.mutate(t).then((function(e){for(var n=e.failures,r=e.results,a=e.numFailures,c=e.lastResult,s=0;s<o.length;++s){var l=r?r[s]:o[s],f=u[s];null==l?f.onerror&&f.onerror(n[s]):f.onsuccess&&f.onsuccess("put"===t.type&&i[s]?t.values[s]:l)}return{failures:n,results:r,numFailures:a,lastResult:c}})).catch((function(t){return u.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=Yc.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===Ne&&l.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===Ne)break;return i._promise("readwrite",(function(){return function(t){return h(t.trans,t.range,1e4)}(t)}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Ds={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=lr(t.keys,t.trans._cache,"clone"===t.cache);return e?qe.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?Ae(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Rs=function(t,e){if(!this){var n=new Rs;return t&&"d"in t&&ye(n,t),n}ye(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Ls(t,e,n){var r=ws(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(fr(t))return ye(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(ws(n,t.from)<0)return o?Ls(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},dr(t);if(ws(e,t.to)>0)return i?Ls(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},dr(t);ws(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),ws(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&hr(t,o),i&&u&&hr(t,i)}}me(Rs.prototype,a({add:function(t){return hr(this,t),this},addKey:function(t){return Ls(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Ls(e,t,t)})),this}},yc,(function(){return pr(this)})));var Ms,Ns={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Rs(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Rs)},s=c(""),f=c(":dels"),h=t.type,p=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),d=p[0],v=p[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(ec(d)){"delete"!==h&&(d=t.results),s.addKeys(d);var e=lr(d,y);e||"add"===h||f.addKeys(d),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&ec(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==ws(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(d){var r={from:d.lower,to:d.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Rs(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},p={get:function(t){return[u,new Rs(t.key)]},getMany:function(t){return[u,(new Rs).addKeys(t.keys)]},count:h,query:h,openCursor:h};return tc(p).forEach((function(t){f[t]=function(i){var u=Yc.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Rs)},h=f(""),d=f(":dels"),v=l(p[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):d.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return d.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return d.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}d.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Bs=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ne,dbReadyPromise:null,cancelOpen:Ne,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};f.dbReadyPromise=new qe((function(t){f.dbReadyResolve=t})),f.openCanceller=new qe((function(t,e){f.cancelOpen=e})),this._state=f,this.name=e,this.on=_n(this,"populate","blocked","versionchange","close",{ready:[Ve,Ne]}),this.on.ready.subscribe=Se(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||qe.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Sn(_s.prototype,(function(t,e){this.db=a;var n=ms,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=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:u!==Be?u:null}}))),this.Table=function(t){return Sn(bs.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:_n(null,{creating:[Ke,Ne],reading:[Ue,Be],updating:[ze,Ne],deleting:[$e,Ne]})}))}(this),this.Transaction=(l=this,Sn(Es.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=_n(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 qe((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),ss(t)}))}))),this.Version=function(t){return Sn(As.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Sn(xs.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Cc.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.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(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=js(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),ps.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Ps),this.use(Is),this.use(Ns),this.use(Ds),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Cc.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Cc.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Jn),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||Yc.letThrough||this._vip)?t():new qe((function(t,n){if(e._state.openComplete)return n(new Cc.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Cc.DatabaseClosed);e.open().catch(Ne)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Cc.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?ss(n.dbOpenError):t}));wc&&(n.openCanceller._stackHolder=xc()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return qe.race([o,("undefined"==typeof navigator?qe.resolve():ur()).then((function(){return new qe((function(o,i){if(e(),!r)throw new Cc.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Cc.MissingAPI;s.onerror=Fn(i),s.onblocked=on(t._fireOnBlocked),s.onupgradeneeded=on((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=Kn,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=on((function(){i(new Cc.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=Fn(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=Yc.transless||Yc;un((function(){Yc.trans=i,Yc.transless=a,0===e?(tc(o).forEach((function(t){Xn(n,t,o[t].primKey,o[t].indexes)})),Gn(t,n),qe.follow((function(){return t.on.populate.fire(i)})).catch(u)):function(t,e,n,r){var o=t._novip,i=[],u=o._versions,a=o._dbSchema=er(0,o.idbdb,r),c=!1;return u.filter((function(t){return t._cfg.version>=e})).forEach((function(t){i.push((function(){var i=a,u=t._cfg.dbschema;nr(o,i,r),nr(o,u,r),a=o._dbSchema=u;var s=Qn(i,u);s.add.forEach((function(t){Xn(r,t[0],t[1].primKey,t[1].indexes)})),s.change.forEach((function(t){if(t.recreate)throw new Cc.Upgrade("Not yet support for changing primary key");var e=r.objectStore(t.name);t.add.forEach((function(t){return tr(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),tr(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var l=t._cfg.contentUpgrade;if(l&&t._cfg.version>e){Gn(o,r),n._memoizedTables={},c=!0;var f=je(u);s.del.forEach((function(t){f[t]=i[t]})),Yn(o,[o.Transaction.prototype]),Zn(o,[o.Transaction.prototype],tc(f),f),n.schema=f;var h,p=bc(l);p&&an();var d=qe.follow((function(){if((h=l(n))&&p){var t=cn.bind(null,null);h.then(t,t)}}));return h&&"function"==typeof h.then?qe.resolve(h):d.then((function(){return h}))}})),i.push((function(e){c&&vs||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((function(n){return null==t[n]&&e.db.deleteObjectStore(n)}))}(t._cfg.dbschema,e),Yn(o,[o.Transaction.prototype]),Zn(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function t(){return i.length?qe.resolve(i.shift()(n.idbtrans)).then(t):qe.resolve()}().then((function(){var t,e;e=r,tc(t=a).forEach((function(n){e.db.objectStoreNames.contains(n)||Xn(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=on((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=_e(f.objectStoreNames);if(h.length>0)try{var p=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=er(0,e,n);r._storeNames=_e(e.objectStoreNames,0),Zn(r,[r._allTables],tc(o),o)}(t,f,p):(nr(t,t._dbSchema,p),r=p,!((i=Qn(er(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gn(t,p)}catch(t){}ps.push(t),f.onversionchange=on((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=on((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!or(n)&&"__dbnames"!==e&&rr(n,r).put({name:e}).catch(Ne)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],qe.resolve(ir((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(Ve,Ne);return n.onReadyBeingFired=[],qe.resolve(ir((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),ss(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=ps.indexOf(this);if(e>=0&&ps.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new qe((function(e){t.dbReadyResolve=e})),t.openCanceller=new qe((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Cc.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new qe((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=on((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!or(n)&&"__dbnames"!==e&&rr(n,r).delete(e).catch(Ne)}(t._deps,t.name),r()})),e.onerror=Fn(o),e.onblocked=i._fireOnBlocked};if(e)throw new Cc.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return tc(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=cr.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=Yc.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Cc.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Cc.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Cc.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):ss(t)}var l=Cs.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):Yc.trans?dn(Yc.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!ge(this._allTables,t))throw new Cc.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Us="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Fs=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Us,value:function(){return this}}]),t}();try{Ms={indexedDB:Xa.indexedDB||Xa.mozIndexedDB||Xa.webkitIndexedDB||Xa.msIndexedDB,IDBKeyRange:Xa.IDBKeyRange||Xa.webkitIDBKeyRange}}catch(t){Ms={indexedDB:null,IDBKeyRange:null}}var Ks=Bs;me(Ks,s({},Tc,{delete:function(t){return new Ks(t,{addons:[]}).delete()},exists:function(t){return new Ks(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return or(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):rr(e,n).toCollection().primaryKeys()}(Ks.dependencies).then(t)}catch(t){return ss(new Cc.MissingAPI)}},defineClass:function(){return function(t){ye(this,t)}},ignoreTransaction:function(t){return Yc.trans?dn(Yc.transless,t):t()},vip:ir,async:function(t){return function(){try{var e=ar(t.apply(this,arguments));return e&&"function"==typeof e.then?e:qe.resolve(e)}catch(t){return ss(t)}}},spawn:function(t,e,n){try{var r=ar(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:qe.resolve(r)}catch(t){return ss(t)}},currentTransaction:{get:function(){return Yc.trans||null}},waitFor:function(t,e){var n=qe.resolve("function"==typeof t?Ks.ignoreTransaction(t):t).timeout(e||6e4);return Yc.trans?Yc.trans.waitFor(n):n},Promise:qe,debug:{get:function(){return wc},set:function(t){Te(t,"dexie"===t?function(){return!0}:gs)}},derive:we,extend:ye,props:me,override:Se,Events:_n,on:Os,liveQuery:function(t){return new Fs((function(e){var n=function(){return tc(u).some((function(t){return i[t]&&function(t,e){var n=pr(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=pr(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(ws(a.from,o.to)<=0&&ws(a.to,o.from)>=0)return!0;ws(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=bc(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,Os.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){yr(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},p=function(e){r&&an();var n=function(){return un(t,{subscr:e,trans:null})},o=Yc.trans?dn(Yc.transless,n):n();return r&&o.then(cn,cn),o}(h);s||(Os("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:yr,getByKeyPath:cc,setByKeyPath:sc,delByKeyPath:function(t,e){"string"==typeof e?sc(t,e,void 0):"length"in e&&[].map.call(e,(function(e){sc(t,e,void 0)}))},shallowClone:je,deepClone:Ae,getObjectDiff:Ts,cmp:ws,asap:Oe,minKey:-1/0,addons:[],connections:ps,errnames:kc,dependencies:Ms,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),Ks.maxKey=js(Ks.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Os("storagemutated",(function(t){var e;$s||(ds?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),$s=!0,dispatchEvent(e),$s=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;$s||gr(e)})));var $s=!1;if("undefined"!=typeof BroadcastChannel){var zs=new BroadcastChannel("x-storagemutated-1");Os("storagemutated",(function(t){$s||zs.postMessage(t)})),zs.onmessage=function(t){t.data&&gr(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Os("storagemutated",(function(t){try{$s||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&gr(e.changedParts)}}));var Hs=self.document&&navigator.serviceWorker;Hs&&Hs.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&gr(e.changedParts)}))}function Vs(t){return Vs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vs(t)}function qs(t,e){return qs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},qs(t,e)}qe.rejectionMapper=function(t,e){if(!t||c(t,De)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!Pc[t.name])return t;var n=new Pc[t.name](e||t.message,t);return"stack"in t&&be(n,"stack",{get:function(){return this.inner.stack}}),n},Te(wc,gs);var Ws=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Gs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qs(t,e)}(o,t);var e,n,r=(e=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(t){return!1}}(),function(){var t,r=Vs(e);if(n){var o=Vs(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return mr(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Bs);(0,so.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.1"]&&_()}catch(Bo){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var Zs=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Ys=function(t,e){this.type=t,Object.assign(this,e)},Js={type:"SKIP_WAITING"};!function(t){var e,n,r=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new Zs,r.en=new Zs,r.on=new Zs,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!_r(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new Ys(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Ys("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Ys("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return Sr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Ys("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o,i=r.prototype;i.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var i=this;return e=function(){return i.mn=Boolean(navigator.serviceWorker.controller),i.yn=i.pn(),Sr(i.bn(),(function(t){i.fn=t,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 e=i.fn.waiting;return e&&_r(e.scriptURL,i.sn.toString())&&(i.hn=e,Promise.resolve().then((function(){i.dispatchEvent(new Ys("waiting",{sw:e,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 Or(new Promise((function(t){return window.addEventListener("load",t)})))}(),n&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},i.update=function(){try{return this.fn?Or(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(t){try{return Sr(this.getSW(),(function(e){return br(e,t)}))}catch(t){return Promise.reject(t)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&br(this.fn.waiting,Js)},i.pn=function(){var t=navigator.serviceWorker.controller;return t&&_r(t.scriptURL,this.sn.toString())?t:void 0},i.bn=function(){try{var t=this;return function(e,n){try{var r=Sr(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(r.prototype,o)}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}}(t))){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(n)}(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),new Gs,(0,so.createGlobalStore)("offline-synchronization",{}),uo.default.createContext({moduleName:""}),x(103),x(435);try{n(6983).createContext()}catch(t){}var Qs,Xs,tl=x(64);tl.default.default||tl.default,function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(Qs||(Qs={})),function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(Xs||(Xs={})),kr((0,co.getExtensionInternalStore)()),kr((0,co.getExtensionStore)());var el,nl=function(){},rl=void 0,ol=Object,il=function(t){return t===rl},ul=function(t){return"function"==typeof t},al=function(t,e){return ol.assign({},t,e)},cl="undefined",sl=function(){return("undefined"==typeof window?"undefined":h(window))!=cl},ll=new WeakMap,fl=0,hl=function(t){var e,n,r=void 0===t?"undefined":h(t),o=t&&t.constructor,i=o==Date;if(ol(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=ll.get(t))return e;if(e=++fl+"~",ll.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=hl(t[n])+",";ll.set(t,e)}if(o==ol){e="#";for(var u=ol.keys(t).sort();!il(n=u.pop());)il(t[n])||(e+=n+":"+hl(t[n])+",");ll.set(t,e)}}return e},pl=!0,dl=sl(),vl=("undefined"==typeof document?"undefined":h(document))!=cl,yl=dl&&window.addEventListener?window.addEventListener.bind(window):nl,gl=vl?document.addEventListener.bind(document):nl,ml=dl&&window.removeEventListener?window.removeEventListener.bind(window):nl,bl=vl?document.removeEventListener.bind(document):nl,wl={isOnline:function(){return pl},isVisible:function(){var t=vl&&document.visibilityState;return il(t)||"hidden"!==t}},_l={initFocus:function(t){return gl("visibilitychange",t),yl("focus",t),function(){bl("visibilitychange",t),ml("focus",t)}},initReconnect:function(t){var e=function(){pl=!0,t()},n=function(){pl=!1};return yl("online",e),yl("offline",n),function(){ml("online",e),ml("offline",n)}}},Sl=!sl()||"Deno"in window,xl=Sl?uo.useEffect:uo.useLayoutEffect,Ol="undefined"!=typeof navigator&&navigator.connection,El=!Sl&&Ol&&(["slow-2g","2g"].includes(Ol.effectiveType)||Ol.saveData),jl=function(t){if(ul(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?hl(t):"",e,t?"$swr$"+t:""]},kl=new WeakMap,Al=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=kl.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Cl=0,Pl=function(){return++Cl},Tl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ar(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return Cr(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!il((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=jl(n),f=l[0],h=l[2],!f)return[2];if(p=kl.get(e),d=p[2],t.length<3)return[2,Al(e,f,e.get(f),rl,rl,a,!0)];if(v=r,g=Pl(),d[f]=[g,0],m=!il(s),b=e.get(f),m&&(e.set(f,s),Al(e,f,s)),ul(v))try{v=v(e.get(f))}catch(t){y=t}return v&&ul(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(ul(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,al(e.get(h),{error:y}))),d[f][1]=Pl(),[4,Al(e,f,v,y,rl,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},Il=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Dl=function(t,e){if(!kl.has(t)){var n=al(_l,e),r={},o=Tl.bind(rl,t),i=nl;if(kl.set(t,[r,{},{},{},o]),!Sl){var u=n.initFocus(setTimeout.bind(rl,Il.bind(rl,r,0))),a=n.initReconnect(setTimeout.bind(rl,Il.bind(rl,r,1)));i=function(){u&&u(),a&&a(),kl.delete(t)}}return[t,o,i]}return[t,kl.get(t)[4]]},Rl=Dl(new Map),Ll=Rl[0],Ml=Rl[1],Nl=al({onLoadingSlow:nl,onSuccess:nl,onError:nl,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!il(i)&&u>i||setTimeout(r,a,o)},onDiscarded:nl,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:El?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:El?5e3:3e3,compare:function(t,e){return hl(t)==hl(e)},isPaused:function(){return!1},cache:Ll,mutate:Ml,fallback:{}},wl),Bl=(0,uo.createContext)({}),Ul=(ol.defineProperty((function(t){var e=t.value,n=function(t,e){var n=al(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=al(o,u))}return n}((0,uo.useContext)(Bl),e),r=e&&e.provider,o=(0,uo.useState)((function(){return r?Dl(r(n.cache||Ll),e):rl}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),xl((function(){return o?o[2]:rl}),[]),(0,uo.createElement)(Bl.Provider,al(t,{value:n}))}),"default",{value:Nl}),x(23)),Fl=x.n(Ul),Kl=x(701),$l=x.n(Kl);Fl().extend($l()),el=function(t,e){document.documentElement.style.setProperty(t,e)},(0,io.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:io.Type.String},"Brand color #2":{_default:"#004144",_type:io.Type.String},"Brand color #3":{_default:"#007d79",_type:io.Type.String}}),(0,io.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(el("--brand-01",t.config["Brand color #1"]),el("--brand-02",t.config["Brand color #2"]),el("--brand-03",t.config["Brand color #3"]))})),r("omrs-logo-full-color",Pr),r("omrs-logo-full-mono",Pr),r("omrs-logo-full-grey",Pr),r("omrs-logo-partial-color",Tr),r("omrs-logo-partial-mono",Tr),r("omrs-logo-partial-grey",Tr),r("omrs-logo-icon-color",Ir),r("omrs-logo-icon-mono",Ir),r("omrs-logo-icon-grey",Ir),r("omrs-logo-white",Dr),r("omrs-icon-visibility",Mr),r("omrs-icon-menu",Nr),r("omrs-icon-search",Br),r("omrs-icon-arrow-back",Ur),r("omrs-icon-arrow-forward",Fr),r("omrs-icon-arrow-downward",Kr),r("omrs-icon-arrow-upward",$r),r("omrs-icon-chevron-left",zr),r("omrs-icon-chevron-right",Hr),r("omrs-icon-chevron-up",Vr),r("omrs-icon-chevron-down",qr),r("omrs-icon-supervised-user-circle",Wr),r("omrs-icon-home",Gr),r("omrs-icon-close",Zr),r("omrs-icon-important-notification",Yr),r("omrs-icon-calendar",Jr),r("omrs-icon-access-time",Qr),r("omrs-icon-add",Xr),r("omrs-icon-remove",to),r("omrs-icon-check-circle",eo),r("omrs-icon-zoomoutmap",no),r("omrs-icon-location",ro),r("omrs-icon-download",oo)}(),function(){"use strict";x.r(O)}(),O}())}}}))}}]);